@pie-element/placement-ordering 14.1.2-next.0 → 14.1.2-next.2

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 (229) hide show
  1. package/dist/author/choice-editor.js +16 -17
  2. package/dist/author/design.js +49 -50
  3. package/dist/author/index.js +21 -21
  4. package/dist/author/utils.js +1 -1
  5. package/dist/browser/author/index.js +8227 -8516
  6. package/dist/browser/author/index.js.map +1 -1
  7. package/dist/browser/browser-Dbw2uHQ7.js +372 -0
  8. package/dist/browser/browser-Dbw2uHQ7.js.map +1 -0
  9. package/dist/browser/controller/index.js +86 -163
  10. package/dist/browser/controller/index.js.map +1 -1
  11. package/dist/browser/delivery/index.js +299 -296
  12. package/dist/browser/delivery/index.js.map +1 -1
  13. package/dist/browser/{dist-BTHiIs74.js → dist-D9ARZhQk.js} +354 -538
  14. package/dist/browser/dist-D9ARZhQk.js.map +1 -0
  15. package/dist/browser/{drag-provider-DaPxkh4j.js → drag-provider-C4BiCI76.js} +3281 -3559
  16. package/dist/browser/drag-provider-C4BiCI76.js.map +1 -0
  17. package/dist/controller/index.js +44 -49
  18. package/dist/controller/scoring.js +1 -3
  19. package/dist/delivery/index.js +10 -10
  20. package/dist/delivery/ordering.js +2 -5
  21. package/dist/delivery/placement-ordering.js +37 -39
  22. package/dist/index.iife.js +33 -33
  23. package/dist/runtime-support.d.ts +12 -0
  24. package/dist/runtime-support.js +12 -0
  25. package/package.json +14 -11
  26. package/dist/browser/browser-CvJkn_Ec.js +0 -1019
  27. package/dist/browser/browser-CvJkn_Ec.js.map +0 -1
  28. package/dist/browser/dist-BTHiIs74.js.map +0 -1
  29. package/dist/browser/drag-provider-DaPxkh4j.js.map +0 -1
  30. package/dist/browser/last-D7N4Qfx4.js +0 -9
  31. package/dist/browser/last-D7N4Qfx4.js.map +0 -1
  32. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  33. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  34. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEvery.js +0 -7
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +0 -7
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +0 -7
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayShuffle.js +0 -8
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +0 -23
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEvery.js +0 -10
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +0 -9
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +0 -6
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRandom.js +0 -7
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseShuffle.js +0 -8
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +0 -27
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseValues.js +0 -9
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +0 -9
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shuffleSelf.js +0 -12
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +0 -7
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js +0 -16
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js +0 -10
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.js +0 -10
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +0 -12
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/every.js +0 -12
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +0 -7
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +0 -4
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js +0 -9
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +0 -7
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +0 -9
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/values.js +0 -8
@@ -1,44 +1,39 @@
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/every.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
4
- import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
5
- import i from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
6
- import a from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
7
- import { flattenCorrect as o, getAllCorrectResponses as s, score as c } from "./scoring.js";
8
- import l from "./defaults.js";
1
+ import { flattenCorrect as e, getAllCorrectResponses as t, score as n } from "./scoring.js";
2
+ import r from "./defaults.js";
3
+ import { every as i, isArray as a, isEmpty as o, isEqual as s, map as c, reduce as l } from "@pie-element/shared-lodash";
9
4
  import u from "debug";
10
5
  import d from "@pie-lib/translator";
11
6
  import { getFeedbackForCorrectness as f } from "@pie-element/shared-feedback";
12
7
  import { partialScoring as p } from "@pie-element/shared-controller-utils";
13
8
  //#region src/controller/index.ts
14
- var m = u("@pie-element:placement-ordering:controller"), { translator: h } = d, g = () => /* @__PURE__ */ Error("Question is missing required array: correctResponse"), _ = (e, t, n) => {
15
- let r = [], a = t?.value || [];
9
+ var m = u("@pie-element:placement-ordering:controller"), { translator: h } = d, g = () => /* @__PURE__ */ Error("Question is missing required array: correctResponse"), _ = (e, r, i) => {
10
+ let a = [], o = r?.value || [];
16
11
  e?.correctResponse;
17
- let o = e?.placementArea === !0;
18
- if (!a.length) return o ? r.push("Student did not place any tiles in the target area.") : r.push("Student did not reorder any tiles."), r.push("Final score: 0."), r;
19
- let l = s(e), u = {
12
+ let c = e?.placementArea === !0;
13
+ if (!o.length) return c ? a.push("Student did not place any tiles in the target area.") : a.push("Student did not reorder any tiles."), a.push("Final score: 0."), a;
14
+ let l = t(e), u = {
20
15
  score: 0,
21
16
  response: []
22
17
  };
23
18
  l.forEach((e) => {
24
19
  let t = 0;
25
- a.forEach((n, r) => {
20
+ o.forEach((n, r) => {
26
21
  e[r] === n && t++;
27
22
  }), t > u.score && (u = {
28
23
  score: t,
29
24
  response: e
30
25
  });
31
26
  });
32
- let d = u.score, f = a.length - d;
33
- d > 0 && r.push(`${d} tile(s) placed in the correct order.`), f > 0 && r.push(`${f} tile(s) placed in an incorrect order.`), l.some((e) => i(e, a));
34
- let m = p.enabled(e, n || {});
35
- m ? (r.push("Score calculated using partial scoring."), r.push("Each tile placed in the correct position contributes to the score.")) : (r.push("Score calculated using all-or-nothing scoring."), o ? r.push("Student must place all tiles in the correct positions within the target area to receive full credit.") : r.push("Student must arrange all tiles in the correct order to receive full credit."));
36
- let h = c(e, t), g = m ? h : +(h === 1);
37
- return r.push(`Final score: ${g}.`), r;
27
+ let d = u.score, f = o.length - d;
28
+ d > 0 && a.push(`${d} tile(s) placed in the correct order.`), f > 0 && a.push(`${f} tile(s) placed in an incorrect order.`), l.some((e) => s(e, o));
29
+ let m = p.enabled(e, i || {});
30
+ m ? (a.push("Score calculated using partial scoring."), a.push("Each tile placed in the correct position contributes to the score.")) : (a.push("Score calculated using all-or-nothing scoring."), c ? a.push("Student must place all tiles in the correct positions within the target area to receive full credit.") : a.push("Student must arrange all tiles in the correct order to receive full credit."));
31
+ let h = n(e, r), g = m ? h : +(h === 1);
32
+ return a.push(`Final score: ${g}.`), a;
38
33
  };
39
- function v(e, t, n) {
34
+ function v(e, t, r) {
40
35
  return new Promise((i, a) => {
41
- if (!t || r(t)) {
36
+ if (!t || o(t)) {
42
37
  i({
43
38
  score: 0,
44
39
  empty: !0,
@@ -46,12 +41,12 @@ function v(e, t, n) {
46
41
  });
47
42
  return;
48
43
  }
49
- if (!e || !e.correctResponse || r(e.correctResponse)) a(g());
44
+ if (!e || !e.correctResponse || o(e.correctResponse)) a(g());
50
45
  else try {
51
- let r = c(e, t);
46
+ let a = n(e, t);
52
47
  i({
53
- score: p.enabled(e, n || {}) ? r : +(r === 1),
54
- logTrace: _(e, t, n)
48
+ score: p.enabled(e, r || {}) ? a : +(a === 1),
49
+ logTrace: _(e, t, r)
55
50
  });
56
51
  } catch (e) {
57
52
  a(e);
@@ -61,13 +56,13 @@ function v(e, t, n) {
61
56
  function y(e = {}) {
62
57
  return new Promise((t) => {
63
58
  t({
64
- ...l,
59
+ ...r,
65
60
  ...e
66
61
  });
67
62
  });
68
63
  }
69
64
  var b = (e) => ({
70
- ...l,
65
+ ...r,
71
66
  rationaleEnabled: !0,
72
67
  feedbackEnabled: !1,
73
68
  promptEnabled: !0,
@@ -75,9 +70,9 @@ var b = (e) => ({
75
70
  studentInstructionsEnabled: !0,
76
71
  ...e
77
72
  });
78
- async function x(r, l, u) {
73
+ async function x(r, o, u) {
79
74
  let d = b(r), g = {};
80
- if (r.alternateResponses && t(r.alternateResponses, e) && (m("Deprecated structure of alternateResponses is in use"), console.error("Deprecated structure of alternateResponses is in use")), g.env = u, g.extraCSSRules = d.extraCSSRules, g.outcomes = [], g.completeLength = (d.correctResponse || []).length, g.choices = (d.choices || []).filter((e) => e.label), g.note = d.note, g.showNote = d.alternateResponses && d.alternateResponses.length > 0, g.language = d.language, m("[model] removing tileSize for the moment."), g.prompt = d.promptEnabled ? d.prompt : null, g.config = {
75
+ if (r.alternateResponses && i(r.alternateResponses, a) && (m("Deprecated structure of alternateResponses is in use"), console.error("Deprecated structure of alternateResponses is in use")), g.env = u, g.extraCSSRules = d.extraCSSRules, g.outcomes = [], g.completeLength = (d.correctResponse || []).length, g.choices = (d.choices || []).filter((e) => e.label), g.note = d.note, g.showNote = d.alternateResponses && d.alternateResponses.length > 0, g.language = d.language, m("[model] removing tileSize for the moment."), g.prompt = d.promptEnabled ? d.prompt : null, g.config = {
81
76
  orientation: d.orientation || "vertical",
82
77
  includeTargets: d.placementArea,
83
78
  choiceLabelEnabled: d.choiceLabelEnabled,
@@ -86,43 +81,43 @@ async function x(r, l, u) {
86
81
  showOrdering: d.numberedGuides,
87
82
  allowSameChoiceInTargets: !d.removeTilesAfterPlacing
88
83
  }, g.disabled = u.mode !== "gather", g.note ||= h.t("common:commonCorrectAnswerWithAlternates", { lng: d.language }), u.role === "instructor" && (u.mode === "view" || u.mode === "evaluate") ? (g.rationale = d.rationaleEnabled ? d.rationale : null, g.teacherInstructions = d.teacherInstructionsEnabled ? d.teacherInstructions : null) : (g.rationale = null, g.teacherInstructions = null), u.mode === "evaluate") {
89
- let e = l && l.value || [], t = s(d), m = t.reduce((t, n) => {
90
- let r = a(e, (e, t, r) => e + (Array.isArray(n) && n[r] === t ? 1 : 0), 0);
91
- return r > t.score ? {
92
- arr: n,
93
- score: r
94
- } : t;
84
+ let i = o && o.value || [], a = t(d), m = a.reduce((e, t) => {
85
+ let n = l(i, (e, n, r) => e + (Array.isArray(t) && t[r] === n ? 1 : 0), 0);
86
+ return n > e.score ? {
87
+ arr: t,
88
+ score: n
89
+ } : e;
95
90
  }, {
96
91
  arr: [],
97
92
  score: 0
98
93
  });
99
- g.outcomes = n(e, (e, t) => ({
94
+ g.outcomes = c(i, (e, t) => ({
100
95
  id: e,
101
96
  outcome: m.arr[t] === e ? "correct" : "incorrect"
102
97
  }));
103
- let h = t.some((t) => i(t, e)), _ = c(r, l), v = _ === 1, y = !v && p.enabled(d, u || {}) && _ !== 0;
104
- return g.correctness = v ? "correct" : y ? "partial" : "incorrect", h || (g.correctResponse = o(d)), d.feedback || (d.feedbackEnabled = !1), g.feedback = d.feedbackEnabled ? await f(g.correctness, d.feedback) : void 0, g;
98
+ let h = a.some((e) => s(e, i)), _ = n(r, o), v = _ === 1, y = !v && p.enabled(d, u || {}) && _ !== 0;
99
+ return g.correctness = v ? "correct" : y ? "partial" : "incorrect", h || (g.correctResponse = e(d)), d.feedback || (d.feedbackEnabled = !1), g.feedback = d.feedbackEnabled ? await f(g.correctness, d.feedback) : void 0, g;
105
100
  } else return g;
106
101
  }
107
- var S = (e, t) => new Promise((n) => {
108
- t.mode !== "evaluate" && t.role === "instructor" ? n({
102
+ var S = (t, n) => new Promise((r) => {
103
+ n.mode !== "evaluate" && n.role === "instructor" ? r({
109
104
  id: "1",
110
- value: o(e)
111
- }) : n(null);
105
+ value: e(t)
106
+ }) : r(null);
112
107
  }), C = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), w = (e = {}, t = {}) => {
113
- let { choices: n, correctResponse: a } = e, o = {};
108
+ let { choices: n, correctResponse: r } = e, i = {};
114
109
  [
115
110
  "teacherInstructions",
116
111
  "prompt",
117
112
  "rationale"
118
113
  ].forEach((n) => {
119
- t[n]?.required && !C(e[n]) && (o[n] = "This field is required.");
114
+ t[n]?.required && !C(e[n]) && (i[n] = "This field is required.");
120
115
  });
121
- let s = [...n || []].reverse(), c = {};
122
- return s.forEach((e, t) => {
116
+ let a = [...n || []].reverse(), c = {};
117
+ return a.forEach((e, t) => {
123
118
  let { id: n, label: r } = e;
124
- C(r) ? s.slice(t + 1).some((e) => e.label === r) && (c[n] = "Content should be unique.") : c[n] = "Content should not be empty.";
125
- }), i((n || []).map((e) => e.id), (a || []).map((e) => e.id || e)) && (o.orderError = "The correct ordering should not be identical to the initial ordering."), r(c) || (o.choicesErrors = c), o;
119
+ C(r) ? a.slice(t + 1).some((e) => e.label === r) && (c[n] = "Content should be unique.") : c[n] = "Content should not be empty.";
120
+ }), s((n || []).map((e) => e.id), (r || []).map((e) => e.id || e)) && (i.orderError = "The correct ordering should not be identical to the initial ordering."), o(c) || (i.choicesErrors = c), i;
126
121
  };
127
122
  //#endregion
128
123
  export { S as createCorrectResponseSession, y as createDefaultModel, _ as getLogTrace, x as model, b as normalize, v as outcome, g as questionError, w as validate };
@@ -1,6 +1,4 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.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/uniq.js";
1
+ import { differenceWith as e, isEqual as t, uniq as n } from "@pie-element/shared-lodash";
4
2
  import r from "debug";
5
3
  import { combination as i } from "js-combinatorics";
6
4
  //#region src/controller/scoring.ts
@@ -1,14 +1,14 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js";
2
- import t from "./main.js";
3
- import n from "react";
4
- import { createRoot as r } from "react-dom/client";
1
+ import e from "./main.js";
2
+ import t from "react";
3
+ import { createRoot as n } from "react-dom/client";
4
+ import { compact as r } from "@pie-element/shared-lodash";
5
5
  import i from "debug";
6
6
  import { renderMath as a } from "@pie-element/shared-math-rendering-mathjax";
7
7
  import { SessionChangedEvent as o } from "@pie-element/shared-player-events";
8
8
  //#region src/delivery/index.ts
9
- var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) => {
10
- let { config: r } = t, i = (n && e(n.value) || []).length === t.choices.length;
11
- return r.includeTargets || i;
9
+ var s = i("pie-elements:placement-ordering"), c = ({ model: e, session: t }) => {
10
+ let { config: n } = e, i = (t && r(t.value) || []).length === e.choices.length;
11
+ return n.includeTargets || i;
12
12
  }, l = class extends HTMLElement {
13
13
  constructor() {
14
14
  super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
@@ -32,7 +32,7 @@ var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) =>
32
32
  _disconnectMathObserver() {
33
33
  this._mathObserver &&= (this._mathObserver.disconnect(), null);
34
34
  }
35
- isComplete = (t) => t && e(t).length === this._model.completeLength;
35
+ isComplete = (e) => e && r(e).length === this._model.completeLength;
36
36
  sessionChange = (e) => {
37
37
  this._session.value = e.value, this.render(), this.dispatchEvent(new o(this.tagName.toLowerCase(), this._session && this.isComplete(this._session.value)));
38
38
  };
@@ -51,12 +51,12 @@ var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) =>
51
51
  render() {
52
52
  if (this._model && this._session) {
53
53
  s("[render] session: ", this._session.value), s("[render] model: ", this._model), this._initMathObserver();
54
- let e = n.createElement(t, {
54
+ let r = t.createElement(e, {
55
55
  model: this._model,
56
56
  session: this._session,
57
57
  onSessionChange: this.sessionChange
58
58
  });
59
- this._root ||= r(this), this._root.render(e);
59
+ this._root ||= n(this), this._root.render(r);
60
60
  }
61
61
  }
62
62
  connectedCallback() {
@@ -1,7 +1,4 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
4
- import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
1
+ import { assign as e, cloneDeep as t, isEmpty as n, map as r } from "@pie-element/shared-lodash";
5
2
  import i from "debug";
6
3
  //#region src/delivery/ordering.ts
7
4
  var a = i("pie-elements:placement-ordering:ordering"), o = (e, t, n) => {
@@ -65,7 +62,7 @@ function u(e, t, n, r) {
65
62
  }, []);
66
63
  }
67
64
  function d(t, i, a, o) {
68
- return o = e({ includeTargets: !0 }, o), a ||= [], i = !i || r(i) ? o.includeTargets ? Array(t.length) : n(t, (e) => e.id) : i, {
65
+ return o = e({ includeTargets: !0 }, o), a ||= [], i = !i || n(i) ? o.includeTargets ? Array(t.length) : r(t, (e) => e.id) : i, {
69
66
  choices: t,
70
67
  response: i,
71
68
  opts: o,
@@ -1,10 +1,8 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.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/uniqueId.js";
4
- import { HorizontalTiler as r, VerticalTiler as i } from "./tiler.js";
5
- import { buildState as a, reducer as o } from "./ordering.js";
6
- import { haveSameValuesButDifferentOrder as s } from "./utils.js";
7
- import c from "react";
1
+ import { HorizontalTiler as e, VerticalTiler as t } from "./tiler.js";
2
+ import { buildState as n, reducer as r } from "./ordering.js";
3
+ import { haveSameValuesButDifferentOrder as i } from "./utils.js";
4
+ import a from "react";
5
+ import { difference as o, isEqual as s, uniqueId as c } from "@pie-element/shared-lodash";
8
6
  import l from "debug";
9
7
  import { renderMath as u } from "@pie-element/shared-math-rendering-mathjax";
10
8
  import d from "prop-types";
@@ -49,18 +47,18 @@ W.propTypes = {
49
47
  onDropChoice: d.func,
50
48
  onRemoveChoice: d.func
51
49
  };
52
- var G = class extends c.Component {
50
+ var G = class extends a.Component {
53
51
  static propTypes = {
54
52
  onSessionChange: d.func.isRequired,
55
53
  model: d.object.isRequired,
56
54
  session: d.oneOfType([d.array.isRequired, d.object.isRequired])
57
55
  };
58
56
  constructor(e) {
59
- super(e), this.instanceId = n();
60
- let { value: t, needsReset: r } = this.validateSession(e);
57
+ super(e), this.instanceId = c();
58
+ let { value: t, needsReset: n } = this.validateSession(e);
61
59
  this.state = { showingCorrect: !1 };
62
- let { model: i } = e || {}, { env: a } = i || {}, { mode: o } = a || {};
63
- r && o === "gather" && this.props.onSessionChange({
60
+ let { model: r } = e || {}, { env: i } = r || {}, { mode: a } = i || {};
61
+ n && a === "gather" && this.props.onSessionChange({
64
62
  ...e.session,
65
63
  value: t
66
64
  });
@@ -69,16 +67,16 @@ var G = class extends c.Component {
69
67
  componentDidUpdate() {
70
68
  u(f.findDOMNode(this));
71
69
  }
72
- validateSession = ({ model: n, session: r }, i = !1) => {
73
- let { config: a, choices: o } = n || {}, { includeTargets: s } = a || {}, c = o.map((e) => e.id), { value: l } = r || {}, u;
74
- if (s) l && l.length !== c.length && (u = !0, l = l.length < c.length ? l.concat(Array(c.length - l.length)) : l.filter((e) => c.includes(e)));
70
+ validateSession = ({ model: e, session: t }, n = !1) => {
71
+ let { config: r, choices: i } = e || {}, { includeTargets: a } = r || {}, c = i.map((e) => e.id), { value: l } = t || {}, u;
72
+ if (a) l && l.length !== c.length && (u = !0, l = l.length < c.length ? l.concat(Array(c.length - l.length)) : l.filter((e) => c.includes(e)));
75
73
  else {
76
- if (!l || !l.length || i) l = c;
74
+ if (!l || !l.length || n) l = c;
77
75
  else {
78
- let t = e(c, l), n = e(l, c);
79
- (t.length || n.length) && (l = c);
76
+ let e = o(c, l), t = o(l, c);
77
+ (e.length || t.length) && (l = c);
80
78
  }
81
- u = !t(r.value, l);
79
+ u = !s(t.value, l);
82
80
  }
83
81
  return u && console.warn("This session is not valid anymore. It will be reset."), {
84
82
  value: l,
@@ -86,49 +84,49 @@ var G = class extends c.Component {
86
84
  };
87
85
  };
88
86
  UNSAFE_componentWillReceiveProps(e) {
89
- let { model: t = {} } = e || {}, { model: n = {} } = this.props || {}, { correctResponse: r, config: i, choices: a = [], env: o } = t, { includeTargets: c } = i || {}, l = {}, u = n.language && n.language !== t.language, d = n.note && n.note === L.t("common:commonCorrectAnswerWithAlternates", { lng: n.language });
87
+ let { model: t = {} } = e || {}, { model: n = {} } = this.props || {}, { correctResponse: r, config: a, choices: o = [], env: s } = t, { includeTargets: c } = a || {}, l = {}, u = n.language && n.language !== t.language, d = n.note && n.note === L.t("common:commonCorrectAnswerWithAlternates", { lng: n.language });
90
88
  u && d && (n.note = L.t("common:commonCorrectAnswerWithAlternates", { lng: t.language })), r || (l.showingCorrect = !1);
91
- let f = s(a, n.choices), { value: p, needsReset: m } = this.validateSession(e, f), h = {
89
+ let f = i(o, n.choices), { value: p, needsReset: m } = this.validateSession(e, f), h = {
92
90
  ...e.session,
93
91
  value: p
94
92
  }, g = n.config?.includeTargets !== c;
95
93
  c && g && (m = !0, delete h.value), this.setState(l, () => {
96
- let { mode: e } = o || {};
94
+ let { mode: e } = s || {};
97
95
  m && e === "gather" && this.props.onSessionChange(h);
98
96
  });
99
97
  }
100
98
  onDropChoice = (e, t, n) => {
101
- let { onSessionChange: r, session: i } = this.props, a = n.tiles.find((e) => e.id === t.id && e.type === t.type && e.index === t.index), s = e;
102
- R("[onDropChoice] ", a, s);
103
- let c = o({
99
+ let { onSessionChange: i, session: a } = this.props, o = n.tiles.find((e) => e.id === t.id && e.type === t.type && e.index === t.index), s = e;
100
+ R("[onDropChoice] ", o, s);
101
+ let c = r({
104
102
  type: "move",
105
- from: a,
103
+ from: o,
106
104
  to: s
107
105
  }, n);
108
- r(Object.assign({}, i, { value: c.response }));
106
+ i(Object.assign({}, a, { value: c.response }));
109
107
  };
110
108
  onRemoveChoice = (e, t) => {
111
- let { onSessionChange: n, session: r } = this.props;
109
+ let { onSessionChange: n, session: i } = this.props;
112
110
  R("[onRemoveChoice]", e);
113
- let i = o({
111
+ let a = r({
114
112
  type: "remove",
115
113
  target: e
116
114
  }, t);
117
- n(Object.assign({}, r, { value: i.response }));
115
+ n(Object.assign({}, i, { value: a.response }));
118
116
  };
119
117
  createOrdering = () => {
120
- let { model: e, session: t } = this.props, { showingCorrect: n } = this.state, { includeTargets: r } = e.config || {
118
+ let { model: e, session: t } = this.props, { showingCorrect: r } = this.state, { includeTargets: i } = e.config || {
121
119
  orientation: "vertical",
122
120
  includeTargets: !0
123
121
  };
124
- return n ? a(e.choices, e.correctResponse, e.correctResponse.map((e) => ({
122
+ return r ? n(e.choices, e.correctResponse, e.correctResponse.map((e) => ({
125
123
  id: e,
126
124
  outcome: "correct"
127
125
  })), {
128
- includeTargets: r,
126
+ includeTargets: i,
129
127
  allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
130
- }) : a(e.choices, t.value, e.outcomes, {
131
- includeTargets: r,
128
+ }) : n(e.choices, t.value, e.outcomes, {
129
+ includeTargets: i,
132
130
  allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
133
131
  });
134
132
  };
@@ -147,10 +145,10 @@ var G = class extends c.Component {
147
145
  }
148
146
  };
149
147
  render() {
150
- let { model: e } = this.props, { correctResponse: t, correctness: n, extraCSSRules: a, prompt: o, rationale: s, feedback: c, config: l, note: u, showNote: d, env: f, disabled: p, teacherInstructions: h, language: g } = e, _ = t && t.length > 0, { showingCorrect: v } = this.state, y = l || {
148
+ let { model: n } = this.props, { correctResponse: r, correctness: i, extraCSSRules: a, prompt: o, rationale: s, feedback: c, config: l, note: u, showNote: d, env: f, disabled: p, teacherInstructions: h, language: g } = n, _ = r && r.length > 0, { showingCorrect: v } = this.state, y = l || {
151
149
  orientation: "vertical",
152
150
  includeTargets: !0
153
- }, { orientation: T, includeTargets: E } = y, O = T === "vertical", k = this.createOrdering(), { mode: N, role: P } = f || {}, F = O ? i : r, I = (v || N === "view" && P === "instructor") && d && u, L = s && (S(s) || x(s)), R = h && (S(h) || x(h)), G = {
151
+ }, { orientation: T, includeTargets: E } = y, O = T === "vertical", k = this.createOrdering(), { mode: N, role: P } = f || {}, F = O ? t : e, I = (v || N === "view" && P === "instructor") && d && u, L = s && (S(s) || x(s)), R = h && (S(h) || x(h)), G = {
154
152
  color: b.text(),
155
153
  backgroundColor: b.background(),
156
154
  display: "flex",
@@ -191,7 +189,7 @@ var G = class extends c.Component {
191
189
  addGuide: y.showOrdering,
192
190
  tileSize: y.tileSize,
193
191
  includeTargets: E,
194
- choiceLabelEnabled: e.config && e.config.choiceLabelEnabled
192
+ choiceLabelEnabled: n.config && n.config.choiceLabelEnabled
195
193
  }),
196
194
  I && /* @__PURE__ */ C(V, { dangerouslySetInnerHTML: { __html: u } }),
197
195
  L && /* @__PURE__ */ C(U, {
@@ -203,7 +201,7 @@ var G = class extends c.Component {
203
201
  children: /* @__PURE__ */ C(j, { prompt: s })
204
202
  }),
205
203
  !v && /* @__PURE__ */ C(M, {
206
- correctness: n,
204
+ correctness: i,
207
205
  feedback: c
208
206
  })
209
207
  ]