@pie-element/explicit-constructed-response 11.1.2-next.0 → 11.1.2-next.10

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 (239) hide show
  1. package/dist/author/alternateResponses.js +37 -40
  2. package/dist/author/alternateSection.d.ts +1 -1
  3. package/dist/author/alternateSection.js +82 -83
  4. package/dist/author/defaults.js +1 -1
  5. package/dist/author/ecr-toolbar.js +1 -1
  6. package/dist/author/index.d.ts +1 -0
  7. package/dist/author/index.js +22 -20
  8. package/dist/author/main.d.ts +1 -1
  9. package/dist/author/main.js +139 -142
  10. package/dist/author/markupUtils.js +2 -2
  11. package/dist/browser/author/index.js +750 -867
  12. package/dist/browser/author/index.js.map +1 -1
  13. package/dist/browser/browser-xPiwYICU.js +364 -0
  14. package/dist/browser/browser-xPiwYICU.js.map +1 -0
  15. package/dist/browser/controller/index.js +65 -96
  16. package/dist/browser/controller/index.js.map +1 -1
  17. package/dist/browser/delivery/index.js +3 -3
  18. package/dist/browser/delivery/index.js.map +1 -1
  19. package/dist/browser/{dist-DnL6t4VO.js → dist-Bf-VDZs4.js} +25287 -22964
  20. package/dist/browser/dist-Bf-VDZs4.js.map +1 -0
  21. package/dist/browser/{dist-D9ARZhQk.js → dist-DiGNNRzu.js} +2 -2
  22. package/dist/browser/{dist-D9ARZhQk.js.map → dist-DiGNNRzu.js.map} +1 -1
  23. package/dist/browser/{main-V_e6PRBN.js → main-DfIrflzI.js} +258 -243
  24. package/dist/browser/main-DfIrflzI.js.map +1 -0
  25. package/dist/browser/print/index.js +5 -5
  26. package/dist/browser/print/index.js.map +1 -1
  27. package/dist/controller/defaults.js +1 -1
  28. package/dist/controller/index.d.ts +3 -3
  29. package/dist/controller/index.js +39 -42
  30. package/dist/delivery/index.js +2 -2
  31. package/dist/delivery/main.js +29 -31
  32. package/dist/index.iife.js +109 -105
  33. package/dist/print/index.js +10 -10
  34. package/dist/runtime-support.d.ts +12 -0
  35. package/dist/runtime-support.js +12 -0
  36. package/module/explicit-constructed-response.css +2 -0
  37. package/module/print.js +57016 -0
  38. package/module/print.js.map +1 -0
  39. package/package.json +30 -14
  40. package/print.js +2 -0
  41. package/dist/browser/browser-DbR93LB7.js +0 -950
  42. package/dist/browser/browser-DbR93LB7.js.map +0 -1
  43. package/dist/browser/dist-DnL6t4VO.js.map +0 -1
  44. package/dist/browser/main-V_e6PRBN.js.map +0 -1
  45. package/dist/browser/reduce-Bqz7DMQ0.js +0 -172
  46. package/dist/browser/reduce-Bqz7DMQ0.js.map +0 -1
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +0 -11
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +0 -6
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePick.js +0 -10
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +0 -13
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +0 -8
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +0 -22
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +0 -19
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +0 -11
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +0 -9
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +0 -50
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +0 -9
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +0 -6
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +0 -13
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +0 -7
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +0 -9
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +0 -7
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +0 -8
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/throttle.js +0 -15
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +0 -8
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +0 -8
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
@@ -1,42 +1,39 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
4
- import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
5
- import i from "./alternateSection.js";
6
- import a from "react";
7
- import o from "prop-types";
1
+ import { AlternateSection as e } from "./alternateSection.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { cloneDeep as r, isEqual as i, map as a, reduce as o } from "@pie-element/shared-lodash";
8
5
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
6
  //#region src/author/alternateResponses.tsx
10
- var l = class extends a.Component {
7
+ var l = class extends t.Component {
11
8
  static propTypes = {
12
- choicesErrors: o.object,
13
- model: o.object.isRequired,
14
- onChange: o.func.isRequired,
15
- onLengthChange: o.func.isRequired,
16
- maxLengthPerChoiceEnabled: o.bool.isRequired,
17
- spellCheck: o.bool,
18
- pluginProps: o.object
9
+ choicesErrors: n.object,
10
+ model: n.object.isRequired,
11
+ onChange: n.func.isRequired,
12
+ onLengthChange: n.func.isRequired,
13
+ maxLengthPerChoiceEnabled: n.bool.isRequired,
14
+ spellCheck: n.bool,
15
+ pluginProps: n.object
19
16
  };
20
- state = { maxLengthPerChoice: e(this.props.model.maxLengthPerChoice) };
17
+ state = { maxLengthPerChoice: r(this.props.model.maxLengthPerChoice) };
21
18
  UNSAFE_componentWillReceiveProps(e) {
22
19
  this.updateChoicesIfNeeded(e);
23
20
  }
24
21
  componentDidMount() {
25
22
  this.updateChoicesIfNeeded(this.props);
26
23
  }
27
- updateChoicesIfNeeded = (t) => {
28
- if (!this.state.choices || !n(this.state.choices, t.model.choices) || !n(t.model.choices, this.props.model.choices) || this.state.values && Object.keys(this.state.values).length !== Object.keys(this.props.model.choices).length || t.maxLengthPerChoiceEnabled !== this.props.maxLengthPerChoiceEnabled) {
29
- let { choices: n, maxLengthPerChoice: i } = t.model, a = r(n, (e, n, r) => (n && (t.maxLengthPerChoiceEnabled || n.length > 1) && (e[r] = n[0]), e), {});
24
+ updateChoicesIfNeeded = (e) => {
25
+ if (!this.state.choices || !i(this.state.choices, e.model.choices) || !i(e.model.choices, this.props.model.choices) || this.state.values && Object.keys(this.state.values).length !== Object.keys(this.props.model.choices).length || e.maxLengthPerChoiceEnabled !== this.props.maxLengthPerChoiceEnabled) {
26
+ let { choices: t, maxLengthPerChoice: n } = e.model, i = o(t, (t, n, r) => (n && (e.maxLengthPerChoiceEnabled || n.length > 1) && (t[r] = n[0]), t), {});
30
27
  this.setState({
31
- choices: t.model.choices,
32
- values: a,
33
- maxLengthPerChoice: e(i)
28
+ choices: e.model.choices,
29
+ values: i,
30
+ maxLengthPerChoice: r(n)
34
31
  });
35
32
  }
36
33
  };
37
34
  getRemainingChoices = (e) => {
38
35
  let { choices: t } = this.state;
39
- return r(t, (t, n, r) => (n && n.length === 1 && !e && t.push({
36
+ return o(t, (t, n, r) => (n && n.length === 1 && !e && t.push({
40
37
  label: n[0].label,
41
38
  value: r
42
39
  }), t), []);
@@ -82,35 +79,35 @@ var l = class extends a.Component {
82
79
  i[t] = e, r(i);
83
80
  };
84
81
  render() {
85
- let { choices: e } = this.state, { model: { maxLengthPerChoice: n, maxLengthPerChoiceEnabled: r }, spellCheck: a, choicesErrors: o, pluginProps: l } = this.props;
86
- return /* @__PURE__ */ c("div", { children: [t(e, (e, t) => {
87
- if (e && (r || e.length > 1)) {
88
- let c = this.state.values[t];
89
- return /* @__PURE__ */ s(i, {
82
+ let { choices: t } = this.state, { model: { maxLengthPerChoice: n, maxLengthPerChoiceEnabled: r }, spellCheck: i, choicesErrors: o, pluginProps: l } = this.props;
83
+ return /* @__PURE__ */ c("div", { children: [a(t, (t, a) => {
84
+ if (t && (r || t.length > 1)) {
85
+ let c = this.state.values[a];
86
+ return /* @__PURE__ */ s(e, {
90
87
  value: c && c.value,
91
- errors: o && o[t],
92
- onSelect: (e) => this.onSectionSelect(e, t),
93
- choiceChanged: (e) => this.onChoiceChanged(e, t),
94
- choiceRemoved: (e) => this.onChoiceRemoved(e, t),
95
- lengthChanged: (e) => this.onLengthChanged(e, t),
88
+ errors: o && o[a],
89
+ onSelect: (e) => this.onSectionSelect(e, a),
90
+ choiceChanged: (e) => this.onChoiceChanged(e, a),
91
+ choiceRemoved: (e) => this.onChoiceRemoved(e, a),
92
+ lengthChanged: (e) => this.onLengthChanged(e, a),
96
93
  selectChoices: [c],
97
- choices: e,
98
- maxLength: n[t],
94
+ choices: t,
95
+ maxLength: n[a],
99
96
  showMaxLength: r,
100
- spellCheck: a,
97
+ spellCheck: i,
101
98
  pluginProps: l
102
- }, t);
99
+ }, a);
103
100
  }
104
- }), e && Object.keys(this.state.values).length !== Object.keys(e).length && /* @__PURE__ */ s(i, {
101
+ }), t && Object.keys(this.state.values).length !== Object.keys(t).length && /* @__PURE__ */ s(e, {
105
102
  value: "",
106
103
  onSelect: (e) => this.onSectionSelect(e, e.value),
107
104
  choiceChanged: (e) => this.onChoiceChanged(e),
108
105
  choiceRemoved: (e) => this.onChoiceRemoved(e),
109
106
  selectChoices: this.getRemainingChoices(),
110
- spellCheck: a,
107
+ spellCheck: i,
111
108
  pluginProps: l
112
109
  })] });
113
110
  }
114
111
  };
115
112
  //#endregion
116
- export { l as default };
113
+ export { l as AlternateResponses, l as default };
@@ -22,7 +22,7 @@ export declare class Choice extends React.Component {
22
22
  state: {
23
23
  value: any;
24
24
  };
25
- updateText: any;
25
+ updateText: import("@pie-element/shared-lodash").CancelableFunction<any>;
26
26
  UNSAFE_componentWillReceiveProps(nextProps: any): void;
27
27
  onChange: any;
28
28
  onKeyDown: any;
@@ -1,20 +1,19 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js";
4
- import { decodeHTML as r, getAdjustedLength as i, stripHtmlTags as a } from "./markupUtils.js";
5
- import o from "react";
6
- import s from "prop-types";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
- import { styled as u } from "@mui/material/styles";
9
- import d from "@pie-lib/editable-html-tip-tap";
10
- import f from "@mui/material/Button";
11
- import p from "@mui/icons-material/Delete";
12
- import m from "@mui/material/IconButton";
13
- import h from "@mui/material/MenuItem";
14
- import g from "@mui/material/Select";
15
- import _ from "@mui/material/TextField";
1
+ import { decodeHTML as e, getAdjustedLength as t, stripHtmlTags as n } from "./markupUtils.js";
2
+ import r from "react";
3
+ import i from "prop-types";
4
+ import { debounce as a, isEqual as o, max as s } from "@pie-element/shared-lodash";
5
+ import { color as c } from "@pie-lib/render-ui";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
+ import { styled as d } from "@mui/material/styles";
8
+ import f from "@pie-lib/editable-html-tip-tap";
9
+ import p from "@mui/material/Button";
10
+ import m from "@mui/icons-material/Delete";
11
+ import h from "@mui/material/IconButton";
12
+ import g from "@mui/material/MenuItem";
13
+ import _ from "@mui/material/Select";
14
+ import v from "@mui/material/TextField";
16
15
  //#region src/author/alternateSection.tsx
17
- var v = u("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), y = u("div")(({ theme: e }) => ({
16
+ var y = d("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), b = d("div")(({ theme: e }) => ({
18
17
  alignItems: "flex-start",
19
18
  flexDirection: "column",
20
19
  display: "flex",
@@ -23,97 +22,97 @@ var v = u("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), y = u("di
23
22
  marginBottom: e.spacing(2.5),
24
23
  width: "100%"
25
24
  }
26
- })), b = u(d)(({ theme: e, hasError: t }) => ({
25
+ })), x = d(f)(({ theme: e, hasError: t }) => ({
27
26
  flex: "1",
28
27
  marginRight: e.spacing(2.5),
29
28
  ...t && {
30
29
  border: `2px solid ${e.palette.error.main}`,
31
30
  borderRadius: "6px"
32
31
  }
33
- })), x = u(m)(({ theme: e }) => ({ "& svg": { fill: e.palette.grey[600] } })), S = u("div")({
32
+ })), S = d(h)(() => ({ "& svg": { fill: c.text() } })), C = d("div")({
34
33
  alignItems: "flex-end",
35
34
  display: "flex",
36
35
  justifyContent: "space-between",
37
36
  width: "100%"
38
- }), C = u("div")({
37
+ }), w = d("div")({
39
38
  alignItems: "center",
40
39
  display: "flex"
41
- }), w = u(_)(({ theme: e }) => ({
40
+ }), T = d(v)(({ theme: e }) => ({
42
41
  width: "230px",
43
42
  marginRight: e.spacing(2.5),
44
43
  "& .MuiInput-underline:before": { borderBottomColor: e.palette.divider },
45
44
  "& .MuiInput-underline:hover:not(.Mui-disabled):before": { borderBottomColor: e.palette.text.primary },
46
45
  "& .MuiInput-underline:after": { borderBottomColor: e.palette.primary.main }
47
- })), T = u("div")(({ theme: e }) => ({
46
+ })), E = d("div")(({ theme: e }) => ({
48
47
  fontSize: e.typography.fontSize - 2,
49
48
  color: e.palette.error.main,
50
49
  paddingTop: e.spacing(.5)
51
- })), E = u("div")({
50
+ })), D = d("div")({
52
51
  alignItems: "center",
53
52
  display: "flex",
54
53
  justifyContent: "space-between"
55
- }), D = class extends o.Component {
54
+ }), O = class extends r.Component {
56
55
  static propTypes = {
57
- error: s.string,
58
- markup: s.string,
59
- onChange: s.func.isRequired,
60
- onDelete: s.func.isRequired,
61
- value: s.string,
62
- spellCheck: s.bool,
63
- showMaxLength: s.bool,
64
- pluginProps: s.object
56
+ error: i.string,
57
+ markup: i.string,
58
+ onChange: i.func.isRequired,
59
+ onDelete: i.func.isRequired,
60
+ value: i.string,
61
+ spellCheck: i.bool,
62
+ showMaxLength: i.bool,
63
+ pluginProps: i.object
65
64
  };
66
65
  state = { value: this.props.markup };
67
- updateText = e(this.props.onChange, 300);
66
+ updateText = a(this.props.onChange, 300);
68
67
  UNSAFE_componentWillReceiveProps(e) {
69
68
  e.markup && this.setState({ value: e.markup });
70
69
  }
71
70
  onChange = (e) => {
72
- let t = a(e);
71
+ let t = n(e);
73
72
  this.setState({ value: t }), this.updateText(t);
74
73
  };
75
74
  onKeyDown = (e) => {
76
75
  if (e.key === "Enter") return !0;
77
76
  };
78
77
  render() {
79
- let { value: e } = this.state, { onDelete: t, spellCheck: n, error: r, showMaxLength: i, pluginProps: a } = this.props, s = i ? {} : { maxLength: 25 };
80
- return /* @__PURE__ */ l(o.Fragment, { children: [/* @__PURE__ */ l(E, { children: [/* @__PURE__ */ c(b, {
81
- hasError: !!r,
78
+ let { value: e } = this.state, { onDelete: t, spellCheck: n, error: i, showMaxLength: a, pluginProps: o } = this.props, s = a ? {} : { maxLength: 25 };
79
+ return /* @__PURE__ */ u(r.Fragment, { children: [/* @__PURE__ */ u(D, { children: [/* @__PURE__ */ l(x, {
80
+ hasError: !!i,
82
81
  disableUnderline: !0,
83
82
  onChange: this.onChange,
84
83
  onKeyDown: this.onKeyDown,
85
84
  markup: e || "",
86
85
  activePlugins: ["languageCharacters"],
87
- pluginProps: a,
86
+ pluginProps: o,
88
87
  languageCharactersProps: [{ language: "spanish" }],
89
88
  spellCheck: n,
90
89
  autoWidthToolbar: !0,
91
90
  toolbarOpts: {
92
91
  minWidth: "auto",
93
- isHidden: !!a?.characters?.disabled
92
+ isHidden: !!o?.characters?.disabled
94
93
  },
95
94
  ...s
96
- }), /* @__PURE__ */ c(x, {
95
+ }), /* @__PURE__ */ l(S, {
97
96
  "aria-label": "delete",
98
97
  onClick: t,
99
98
  size: "large",
100
- children: /* @__PURE__ */ c(p, {})
101
- })] }), r && /* @__PURE__ */ c(T, { children: r })] });
99
+ children: /* @__PURE__ */ l(m, {})
100
+ })] }), i && /* @__PURE__ */ l(E, { children: i })] });
102
101
  }
103
- }, O = class extends o.Component {
102
+ }, k = class extends r.Component {
104
103
  static propTypes = {
105
- choices: s.array,
106
- selectChoices: s.array.isRequired,
107
- errors: s.object,
108
- onSelect: s.func.isRequired,
109
- choiceChanged: s.func.isRequired,
110
- lengthChanged: s.func,
111
- choiceRemoved: s.func.isRequired,
112
- value: s.string,
113
- maxLength: s.number,
114
- showMaxLength: s.bool,
115
- spellCheck: s.bool,
116
- pluginProps: s.object
104
+ choices: i.array,
105
+ selectChoices: i.array.isRequired,
106
+ errors: i.object,
107
+ onSelect: i.func.isRequired,
108
+ choiceChanged: i.func.isRequired,
109
+ lengthChanged: i.func,
110
+ choiceRemoved: i.func.isRequired,
111
+ value: i.string,
112
+ maxLength: i.number,
113
+ showMaxLength: i.bool,
114
+ spellCheck: i.bool,
115
+ pluginProps: i.object
117
116
  };
118
117
  state = {};
119
118
  UNSAFE_componentWillReceiveProps(e) {
@@ -123,7 +122,7 @@ var v = u("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), y = u("di
123
122
  this.updateChoicesIfNeeded(this.props);
124
123
  }
125
124
  updateChoicesIfNeeded = (e) => {
126
- (!this.state.choices || !t(e.choices, this.state.choices) || !t(e.choices, this.props.choices)) && this.setState({ choices: e.choices });
125
+ (!this.state.choices || !o(e.choices, this.state.choices) || !o(e.choices, this.props.choices)) && this.setState({ choices: e.choices });
127
126
  };
128
127
  handleSelect = (e) => {
129
128
  let { onSelect: t, selectChoices: n } = this.props, { value: r } = e.target;
@@ -132,57 +131,57 @@ var v = u("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), y = u("di
132
131
  onAddChoice = () => {
133
132
  let { choices: e } = this.state;
134
133
  if (e.length && e[e.length - 1].label !== "") {
135
- let t = n(e.map((e) => parseInt(e.value)).filter((e) => !isNaN(e))) || 0;
134
+ let t = s(e.map((e) => parseInt(e.value)).filter((e) => !isNaN(e))) || 0;
136
135
  this.setState({ choices: [...e, {
137
136
  value: `${t + 1}`,
138
137
  label: ""
139
138
  }] });
140
139
  }
141
140
  };
142
- onChoiceChanged = (e, t, n) => {
143
- let { choiceChanged: a, lengthChanged: o, maxLength: s, choices: c } = this.props, l = c.map((e) => r(e.label || "").length);
144
- l[n] = r(t).length;
141
+ onChoiceChanged = (n, r, i) => {
142
+ let { choiceChanged: a, lengthChanged: o, maxLength: s, choices: c } = this.props, l = c.map((t) => e(t.label || "").length);
143
+ l[i] = e(r).length;
145
144
  let u = Math.max(...l);
146
145
  a({
147
- ...e,
148
- label: t
149
- }), (u > s || u + 10 <= s) && o(i(u));
146
+ ...n,
147
+ label: r
148
+ }), (u > s || u + 10 <= s) && o(t(u));
150
149
  };
151
150
  onRemoveChoice = (e) => {
152
151
  let { choiceRemoved: t } = this.props;
153
152
  t(e.value);
154
153
  };
155
154
  getChoicesMaxLength = () => {
156
- let { choices: e } = this.state;
157
- if (!e) return 1;
158
- let t = e.map((e) => r(e.label || "").length);
159
- return Math.max(...t);
155
+ let { choices: t } = this.state;
156
+ if (!t) return 1;
157
+ let n = t.map((t) => e(t.label || "").length);
158
+ return Math.max(...n);
160
159
  };
161
160
  changeLength = (e) => {
162
161
  let { lengthChanged: t } = this.props, n = parseInt(e.target.value, 10), r = this.getChoicesMaxLength();
163
162
  n && n >= r && n <= r + 10 && t(n);
164
163
  };
165
164
  render() {
166
- let { selectChoices: e, maxLength: t, showMaxLength: n, value: i, spellCheck: a, errors: o, pluginProps: s } = this.props, { choices: u } = this.state, d = this.getChoicesMaxLength();
167
- return /* @__PURE__ */ l(v, { children: [
168
- /* @__PURE__ */ l(S, { children: [/* @__PURE__ */ l(g, {
165
+ let { selectChoices: t, maxLength: n, showMaxLength: r, value: i, spellCheck: a, errors: o, pluginProps: s } = this.props, { choices: c } = this.state, d = this.getChoicesMaxLength();
166
+ return /* @__PURE__ */ u(y, { children: [
167
+ /* @__PURE__ */ u(C, { children: [/* @__PURE__ */ u(_, {
169
168
  variant: "standard",
170
169
  displayEmpty: !0,
171
170
  onChange: this.handleSelect,
172
171
  value: i || "",
173
- readOnly: n,
172
+ readOnly: r,
174
173
  MenuProps: { transitionDuration: {
175
174
  enter: 225,
176
175
  exit: 195
177
176
  } },
178
- children: [/* @__PURE__ */ c(h, {
177
+ children: [/* @__PURE__ */ l(g, {
179
178
  value: "",
180
- children: /* @__PURE__ */ c("em", { children: i ? "Remove selection" : "Select a response" })
181
- }), e.map((e, t) => /* @__PURE__ */ c(h, {
182
- value: e?.value,
183
- children: r(e?.label)
184
- }, t))]
185
- }), u && u.length > 0 && /* @__PURE__ */ l(C, { children: [t && n && /* @__PURE__ */ c(w, {
179
+ children: /* @__PURE__ */ l("em", { children: i ? "Remove selection" : "Select a response" })
180
+ }), t.map((t, n) => /* @__PURE__ */ l(g, {
181
+ value: t?.value,
182
+ children: e(t?.label)
183
+ }, n))]
184
+ }), c && c.length > 0 && /* @__PURE__ */ u(w, { children: [n && r && /* @__PURE__ */ l(T, {
186
185
  variant: "standard",
187
186
  label: "Maximum length (characters)",
188
187
  type: "number",
@@ -190,26 +189,26 @@ var v = u("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), y = u("di
190
189
  min: d,
191
190
  max: d + 10
192
191
  },
193
- value: t,
192
+ value: n,
194
193
  onChange: this.changeLength
195
- }), /* @__PURE__ */ c(f, {
194
+ }), /* @__PURE__ */ l(p, {
196
195
  variant: "contained",
197
196
  color: "primary",
198
197
  onClick: this.onAddChoice,
199
198
  children: "Add"
200
199
  })] })] }),
201
- o && o[0] && /* @__PURE__ */ c(T, { children: o[0] }),
202
- /* @__PURE__ */ c(y, { children: u && u.map((e, t) => t > 0 && /* @__PURE__ */ c(D, {
200
+ o && o[0] && /* @__PURE__ */ l(E, { children: o[0] }),
201
+ /* @__PURE__ */ l(b, { children: c && c.map((e, t) => t > 0 && /* @__PURE__ */ l(O, {
203
202
  markup: e.label,
204
203
  onChange: (n) => this.onChoiceChanged(e, n, t),
205
204
  onDelete: () => this.onRemoveChoice(e),
206
205
  spellCheck: a,
207
206
  error: o && o[t],
208
- showMaxLength: n,
207
+ showMaxLength: r,
209
208
  pluginProps: s
210
209
  }, t)) })
211
210
  ] });
212
211
  }
213
212
  };
214
213
  //#endregion
215
- export { O as default };
214
+ export { k as AlternateSection, k as default, O as Choice };
@@ -5,7 +5,7 @@ var e = {
5
5
  displayType: "block",
6
6
  markup: "",
7
7
  maxLengthPerChoiceEnabled: !0,
8
- playerSpellCheckEnabled: !0,
8
+ playerSpellCheckEnabled: !1,
9
9
  prompt: "",
10
10
  promptEnabled: !0,
11
11
  rationale: "",
@@ -97,4 +97,4 @@ var o = i(a)(({ theme: e }) => ({
97
97
  }
98
98
  };
99
99
  //#endregion
100
- export { s as default };
100
+ export { s as ECRToolbar, s as default };
@@ -38,5 +38,6 @@ export default class ExplicitConstructedResponse extends HTMLElement {
38
38
  insertSound(handler: any): void;
39
39
  onDeleteSound(src: any, done: any): void;
40
40
  _render(): void;
41
+ connectedCallback(): void;
41
42
  disconnectedCallback(): void;
42
43
  }
@@ -1,38 +1,37 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js";
3
- import { createSlateMarkup as n, processMarkup as r } from "./markupUtils.js";
4
- import i from "./main.js";
5
- import a from "./defaults.js";
6
- import o from "react";
7
- import { createRoot as s } from "react-dom/client";
1
+ import { createSlateMarkup as e, processMarkup as t } from "./markupUtils.js";
2
+ import { Main as n } from "./main.js";
3
+ import r from "./defaults.js";
4
+ import i from "react";
5
+ import { createRoot as a } from "react-dom/client";
6
+ import { defaults as o, isArray as s } from "@pie-element/shared-lodash";
8
7
  import c from "debug";
9
8
  import { DeleteImageEvent as l, DeleteSoundEvent as u, InsertImageEvent as d, InsertSoundEvent as f, ModelUpdatedEvent as p } from "@pie-element/shared-configure-events";
10
9
  //#region src/author/index.ts
11
10
  var m = c("explicit-constructed-response:configure"), h = class c extends HTMLElement {
12
- static prepareModel = (t = {}) => {
11
+ static prepareModel = (n = {}) => {
13
12
  let i = {
14
- ...a.model,
15
- ...t
16
- }, o = i.slateMarkup || n(i.markup, i.choices), s = r(o);
17
- return i.choices && Object.keys(i.choices).forEach((t) => {
18
- e(i.choices[t]) && (i.choices[t] = (i.choices[t] || []).map((e, t) => e.value ? e : (m("Choice does not contain \"value\" property, which is required.", e), {
13
+ ...r.model,
14
+ ...n
15
+ }, a = i.slateMarkup || e(i.markup, i.choices), o = t(a);
16
+ return i.choices && Object.keys(i.choices).forEach((e) => {
17
+ s(i.choices[e]) && (i.choices[e] = (i.choices[e] || []).map((e, t) => e.value ? e : (m("Choice does not contain \"value\" property, which is required.", e), {
19
18
  value: `${t}`,
20
19
  ...e
21
20
  })));
22
21
  }), {
23
22
  ...i,
24
- slateMarkup: o,
25
- markup: s
23
+ slateMarkup: a,
24
+ markup: o
26
25
  };
27
26
  };
28
27
  constructor() {
29
- super(), this._root = null, this._model = c.prepareModel(), this._configuration = a.configuration;
28
+ super(), this._root = null, this._model = c.prepareModel(), this._configuration = r.configuration;
30
29
  }
31
30
  set model(e) {
32
31
  this._model = c.prepareModel(e), this._model.responseAreaInputConfiguration && (this._model.responseAreaInputConfiguration = this._configuration.responseAreaInputConfiguration?.inputConfiguration), this._render();
33
32
  }
34
33
  set configuration(e) {
35
- this._configuration = t(e, a.configuration), e.language?.enabled ? e.languageChoices?.options?.length && (this._model.language = e.languageChoices.options[0].value) : e.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
34
+ this._configuration = o(e, r.configuration), e.language?.enabled ? e.languageChoices?.options?.length && (this._model.language = e.languageChoices.options[0].value) : e.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
36
35
  value: this._model.language,
37
36
  label: this._model.language
38
37
  })) : delete this._model.language, this._render();
@@ -72,7 +71,7 @@ var m = c("explicit-constructed-response:configure"), h = class c extends HTMLEl
72
71
  }
73
72
  _render() {
74
73
  m("_render");
75
- let e = o.createElement(i, {
74
+ let e = i.createElement(n, {
76
75
  model: this._model,
77
76
  configuration: this._configuration,
78
77
  onModelChanged: this.onModelChanged,
@@ -87,10 +86,13 @@ var m = c("explicit-constructed-response:configure"), h = class c extends HTMLEl
87
86
  delete: this.onDeleteSound.bind(this)
88
87
  }
89
88
  });
90
- this._root ||= s(this), this._root.render(e);
89
+ this._root ||= a(this), this._root.render(e);
90
+ }
91
+ connectedCallback() {
92
+ this._render();
91
93
  }
92
94
  disconnectedCallback() {
93
- this._root && this._root.unmount();
95
+ this._root &&= (this._root.unmount(), null);
94
96
  }
95
97
  };
96
98
  //#endregion
@@ -32,7 +32,7 @@ export declare class Main extends React.Component {
32
32
  onLengthChanged: any;
33
33
  onChangeResponse: any;
34
34
  onChange: any;
35
- onHandleAreaChange: any;
35
+ onHandleAreaChange: import("@pie-element/shared-lodash").CancelableFunction<(nodes: any) => void>;
36
36
  render(): React.JSX.Element;
37
37
  }
38
38
  export default Main;