@pie-element/hotspot 11.1.1 → 11.1.2-next.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 (354) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/DeleteWidget.d.ts +38 -0
  4. package/dist/author/DeleteWidget.js +46 -0
  5. package/dist/author/button.d.ts +31 -0
  6. package/dist/author/button.js +27 -0
  7. package/dist/author/buttons/circle.d.ts +18 -0
  8. package/dist/author/buttons/circle.js +25 -0
  9. package/dist/author/buttons/polygon.d.ts +18 -0
  10. package/dist/author/buttons/polygon.js +36 -0
  11. package/dist/author/buttons/rectangle.d.ts +18 -0
  12. package/dist/author/buttons/rectangle.js +36 -0
  13. package/dist/author/defaults.d.ts +157 -0
  14. package/dist/author/defaults.js +119 -0
  15. package/dist/author/hotspot-circle.d.ts +21 -0
  16. package/dist/author/hotspot-circle.js +124 -0
  17. package/dist/author/hotspot-container.d.ts +29 -0
  18. package/dist/author/hotspot-container.js +210 -0
  19. package/dist/author/hotspot-drawable.d.ts +31 -0
  20. package/dist/author/hotspot-drawable.js +312 -0
  21. package/dist/author/hotspot-palette.d.ts +14 -0
  22. package/dist/author/hotspot-palette.js +72 -0
  23. package/dist/author/hotspot-polygon.d.ts +38 -0
  24. package/dist/author/hotspot-polygon.js +200 -0
  25. package/dist/author/hotspot-rectangle.d.ts +20 -0
  26. package/dist/author/hotspot-rectangle.js +119 -0
  27. package/dist/author/icons.d.ts +9 -0
  28. package/dist/author/icons.js +4 -0
  29. package/dist/author/image-konva.d.ts +19 -0
  30. package/dist/author/image-konva.js +49 -0
  31. package/dist/author/index.d.ts +52 -0
  32. package/dist/author/index.js +143 -0
  33. package/dist/author/root.d.ts +15 -0
  34. package/dist/author/root.js +215 -0
  35. package/dist/author/shapes/circle.d.ts +18 -0
  36. package/dist/author/shapes/circle.js +47 -0
  37. package/dist/author/shapes/index.d.ts +12 -0
  38. package/dist/author/shapes/polygon.d.ts +19 -0
  39. package/dist/author/shapes/polygon.js +51 -0
  40. package/dist/author/shapes/rectagle.d.ts +18 -0
  41. package/dist/author/shapes/rectagle.js +57 -0
  42. package/dist/author/shapes/utils.d.ts +19 -0
  43. package/dist/author/shapes/utils.js +16 -0
  44. package/dist/author/upload-control.d.ts +29 -0
  45. package/dist/author/upload-control.js +28 -0
  46. package/dist/author/utils.d.ts +24 -0
  47. package/dist/author/utils.js +83 -0
  48. package/dist/browser/ReactKonva-Z9-1H-UZ.js +19329 -0
  49. package/dist/browser/ReactKonva-Z9-1H-UZ.js.map +1 -0
  50. package/dist/browser/author/index.js +42297 -0
  51. package/dist/browser/author/index.js.map +1 -0
  52. package/dist/browser/browser-CfnAFove.js +210 -0
  53. package/dist/browser/browser-CfnAFove.js.map +1 -0
  54. package/dist/browser/controller/index.js +198 -0
  55. package/dist/browser/controller/index.js.map +1 -0
  56. package/dist/browser/delivery/index.js +2460 -0
  57. package/dist/browser/delivery/index.js.map +1 -0
  58. package/dist/browser/hotspot.css +2 -0
  59. package/dist/browser/isEqual-D3CTSc6W.js +601 -0
  60. package/dist/browser/isEqual-D3CTSc6W.js.map +1 -0
  61. package/dist/controller/defaults.d.ts +35 -0
  62. package/dist/controller/defaults.js +29 -0
  63. package/dist/controller/index.d.ts +22 -0
  64. package/dist/controller/index.js +154 -0
  65. package/dist/controller/utils.d.ts +10 -0
  66. package/dist/controller/utils.js +13 -0
  67. package/dist/delivery/hotspot/circle.d.ts +19 -0
  68. package/dist/delivery/hotspot/circle.js +100 -0
  69. package/dist/delivery/hotspot/container.d.ts +16 -0
  70. package/dist/delivery/hotspot/container.js +150 -0
  71. package/dist/delivery/hotspot/icons.d.ts +10 -0
  72. package/dist/delivery/hotspot/icons.js +4 -0
  73. package/dist/delivery/hotspot/image-konva-tooltip.d.ts +19 -0
  74. package/dist/delivery/hotspot/image-konva-tooltip.js +66 -0
  75. package/dist/delivery/hotspot/index.d.ts +17 -0
  76. package/dist/delivery/hotspot/index.js +114 -0
  77. package/dist/delivery/hotspot/polygon.d.ts +21 -0
  78. package/dist/delivery/hotspot/polygon.js +108 -0
  79. package/dist/delivery/hotspot/rectangle.d.ts +19 -0
  80. package/dist/delivery/hotspot/rectangle.js +104 -0
  81. package/dist/delivery/index.d.ts +20 -0
  82. package/dist/delivery/index.js +107 -0
  83. package/dist/delivery/session-updater.d.ts +10 -0
  84. package/dist/delivery/session-updater.js +14 -0
  85. package/dist/index.d.ts +1 -0
  86. package/dist/index.iife.d.ts +8 -0
  87. package/dist/index.iife.js +169 -0
  88. package/dist/index.js +2 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  211. package/package.json +78 -16
  212. package/CHANGELOG.json +0 -997
  213. package/CHANGELOG.md +0 -2214
  214. package/LICENSE.md +0 -5
  215. package/README.md +0 -1
  216. package/configure/CHANGELOG.json +0 -682
  217. package/configure/CHANGELOG.md +0 -1951
  218. package/configure/lib/DeleteWidget.js +0 -64
  219. package/configure/lib/DeleteWidget.js.map +0 -1
  220. package/configure/lib/button.js +0 -42
  221. package/configure/lib/button.js.map +0 -1
  222. package/configure/lib/buttons/circle.js +0 -33
  223. package/configure/lib/buttons/circle.js.map +0 -1
  224. package/configure/lib/buttons/polygon.js +0 -39
  225. package/configure/lib/buttons/polygon.js.map +0 -1
  226. package/configure/lib/buttons/rectangle.js +0 -39
  227. package/configure/lib/buttons/rectangle.js.map +0 -1
  228. package/configure/lib/defaults.js +0 -155
  229. package/configure/lib/defaults.js.map +0 -1
  230. package/configure/lib/hotspot-circle.js +0 -192
  231. package/configure/lib/hotspot-circle.js.map +0 -1
  232. package/configure/lib/hotspot-container.js +0 -320
  233. package/configure/lib/hotspot-container.js.map +0 -1
  234. package/configure/lib/hotspot-drawable.js +0 -519
  235. package/configure/lib/hotspot-drawable.js.map +0 -1
  236. package/configure/lib/hotspot-palette.js +0 -107
  237. package/configure/lib/hotspot-palette.js.map +0 -1
  238. package/configure/lib/hotspot-polygon.js +0 -293
  239. package/configure/lib/hotspot-polygon.js.map +0 -1
  240. package/configure/lib/hotspot-rectangle.js +0 -190
  241. package/configure/lib/hotspot-rectangle.js.map +0 -1
  242. package/configure/lib/icons.js +0 -7
  243. package/configure/lib/icons.js.map +0 -1
  244. package/configure/lib/image-konva.js +0 -66
  245. package/configure/lib/image-konva.js.map +0 -1
  246. package/configure/lib/index.js +0 -194
  247. package/configure/lib/index.js.map +0 -1
  248. package/configure/lib/root.js +0 -330
  249. package/configure/lib/root.js.map +0 -1
  250. package/configure/lib/shapes/circle.js +0 -84
  251. package/configure/lib/shapes/circle.js.map +0 -1
  252. package/configure/lib/shapes/index.js +0 -50
  253. package/configure/lib/shapes/index.js.map +0 -1
  254. package/configure/lib/shapes/polygon.js +0 -82
  255. package/configure/lib/shapes/polygon.js.map +0 -1
  256. package/configure/lib/shapes/rectagle.js +0 -84
  257. package/configure/lib/shapes/rectagle.js.map +0 -1
  258. package/configure/lib/shapes/utils.js +0 -21
  259. package/configure/lib/shapes/utils.js.map +0 -1
  260. package/configure/lib/upload-control.js +0 -41
  261. package/configure/lib/upload-control.js.map +0 -1
  262. package/configure/lib/utils.js +0 -185
  263. package/configure/lib/utils.js.map +0 -1
  264. package/configure/package.json +0 -26
  265. package/configure/src/DeleteWidget.jsx +0 -51
  266. package/configure/src/__tests__/DeleteWidget.test.jsx +0 -366
  267. package/configure/src/__tests__/button.test.jsx +0 -198
  268. package/configure/src/__tests__/hotspot-circle.test.jsx +0 -259
  269. package/configure/src/__tests__/hotspot-container.test.js +0 -366
  270. package/configure/src/__tests__/hotspot-drawable.test.js +0 -271
  271. package/configure/src/__tests__/hotspot-palette.test.jsx +0 -71
  272. package/configure/src/__tests__/image-konva.test.jsx +0 -226
  273. package/configure/src/__tests__/index.test.js +0 -329
  274. package/configure/src/__tests__/root.test.js +0 -400
  275. package/configure/src/__tests__/utils.test.js +0 -241
  276. package/configure/src/button.jsx +0 -35
  277. package/configure/src/buttons/circle.jsx +0 -18
  278. package/configure/src/buttons/polygon.jsx +0 -29
  279. package/configure/src/buttons/rectangle.jsx +0 -29
  280. package/configure/src/defaults.js +0 -109
  281. package/configure/src/hotspot-circle.jsx +0 -183
  282. package/configure/src/hotspot-container.jsx +0 -330
  283. package/configure/src/hotspot-drawable.jsx +0 -527
  284. package/configure/src/hotspot-palette.jsx +0 -90
  285. package/configure/src/hotspot-polygon.jsx +0 -294
  286. package/configure/src/hotspot-rectangle.jsx +0 -169
  287. package/configure/src/icons.js +0 -5
  288. package/configure/src/image-konva.jsx +0 -63
  289. package/configure/src/index.js +0 -208
  290. package/configure/src/root.jsx +0 -346
  291. package/configure/src/shapes/circle.js +0 -81
  292. package/configure/src/shapes/index.js +0 -4
  293. package/configure/src/shapes/polygon.js +0 -81
  294. package/configure/src/shapes/rectagle.js +0 -82
  295. package/configure/src/shapes/utils.js +0 -16
  296. package/configure/src/upload-control.jsx +0 -33
  297. package/configure/src/utils.js +0 -210
  298. package/controller/CHANGELOG.json +0 -362
  299. package/controller/CHANGELOG.md +0 -1304
  300. package/controller/lib/defaults.js +0 -33
  301. package/controller/lib/defaults.js.map +0 -1
  302. package/controller/lib/index.js +0 -341
  303. package/controller/lib/index.js.map +0 -1
  304. package/controller/lib/utils.js +0 -32
  305. package/controller/lib/utils.js.map +0 -1
  306. package/controller/package.json +0 -18
  307. package/controller/src/__tests__/index.test.js +0 -419
  308. package/controller/src/__tests__/utils.test.js +0 -5
  309. package/controller/src/defaults.js +0 -19
  310. package/controller/src/index.js +0 -328
  311. package/controller/src/utils.js +0 -29
  312. package/docs/config-schema.json +0 -2023
  313. package/docs/config-schema.json.md +0 -1495
  314. package/docs/demo/config.js +0 -8
  315. package/docs/demo/generate.js +0 -118
  316. package/docs/demo/index.html +0 -1
  317. package/docs/demo/session.js +0 -11
  318. package/docs/pie-schema.json +0 -1204
  319. package/docs/pie-schema.json.md +0 -851
  320. package/lib/hotspot/circle.js +0 -156
  321. package/lib/hotspot/circle.js.map +0 -1
  322. package/lib/hotspot/container.js +0 -206
  323. package/lib/hotspot/container.js.map +0 -1
  324. package/lib/hotspot/icons.js +0 -8
  325. package/lib/hotspot/icons.js.map +0 -1
  326. package/lib/hotspot/image-konva-tooltip.js +0 -86
  327. package/lib/hotspot/image-konva-tooltip.js.map +0 -1
  328. package/lib/hotspot/index.js +0 -163
  329. package/lib/hotspot/index.js.map +0 -1
  330. package/lib/hotspot/polygon.js +0 -203
  331. package/lib/hotspot/polygon.js.map +0 -1
  332. package/lib/hotspot/rectangle.js +0 -175
  333. package/lib/hotspot/rectangle.js.map +0 -1
  334. package/lib/index.js +0 -213
  335. package/lib/index.js.map +0 -1
  336. package/lib/session-updater.js +0 -42
  337. package/lib/session-updater.js.map +0 -1
  338. package/src/__tests__/container.test.jsx +0 -58
  339. package/src/__tests__/index.test.js +0 -123
  340. package/src/__tests__/session-updater.test.jsx +0 -69
  341. package/src/hotspot/__tests__/circle.test.jsx +0 -464
  342. package/src/hotspot/__tests__/container.test.jsx +0 -546
  343. package/src/hotspot/__tests__/image-konva-tooltip.test.jsx +0 -510
  344. package/src/hotspot/__tests__/polygon.test.jsx +0 -502
  345. package/src/hotspot/__tests__/rectangle.test.jsx +0 -418
  346. package/src/hotspot/circle.jsx +0 -152
  347. package/src/hotspot/container.jsx +0 -217
  348. package/src/hotspot/icons.js +0 -7
  349. package/src/hotspot/image-konva-tooltip.jsx +0 -76
  350. package/src/hotspot/index.jsx +0 -165
  351. package/src/hotspot/polygon.jsx +0 -195
  352. package/src/hotspot/rectangle.jsx +0 -171
  353. package/src/index.js +0 -226
  354. package/src/session-updater.js +0 -29
@@ -0,0 +1,210 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, n) => {
3
+ let r = {};
4
+ for (var i in e) t(r, i, {
5
+ get: e[i],
6
+ enumerable: !0
7
+ });
8
+ return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ }, l = (e, i, o, s) => {
10
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
+ get: ((e) => i[e]).bind(null, d),
12
+ enumerable: !(s = n(i, d)) || s.enumerable
13
+ });
14
+ return e;
15
+ }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
16
+ value: n,
17
+ enumerable: !0
18
+ }) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e), f = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
19
+ if (typeof require < "u") return require.apply(this, arguments);
20
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
21
+ }), p = /* @__PURE__ */ s(((e, t) => {
22
+ var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25;
23
+ t.exports = function(e, t) {
24
+ t ||= {};
25
+ var n = typeof e;
26
+ if (n === "string" && e.length > 0) return c(e);
27
+ if (n === "number" && isFinite(e)) return t.long ? u(e) : l(e);
28
+ throw Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e));
29
+ };
30
+ function c(e) {
31
+ if (e = String(e), !(e.length > 100)) {
32
+ var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
33
+ if (t) {
34
+ var c = parseFloat(t[1]);
35
+ switch ((t[2] || "ms").toLowerCase()) {
36
+ case "years":
37
+ case "year":
38
+ case "yrs":
39
+ case "yr":
40
+ case "y": return c * s;
41
+ case "weeks":
42
+ case "week":
43
+ case "w": return c * o;
44
+ case "days":
45
+ case "day":
46
+ case "d": return c * a;
47
+ case "hours":
48
+ case "hour":
49
+ case "hrs":
50
+ case "hr":
51
+ case "h": return c * i;
52
+ case "minutes":
53
+ case "minute":
54
+ case "mins":
55
+ case "min":
56
+ case "m": return c * r;
57
+ case "seconds":
58
+ case "second":
59
+ case "secs":
60
+ case "sec":
61
+ case "s": return c * n;
62
+ case "milliseconds":
63
+ case "millisecond":
64
+ case "msecs":
65
+ case "msec":
66
+ case "ms": return c;
67
+ default: return;
68
+ }
69
+ }
70
+ }
71
+ }
72
+ function l(e) {
73
+ var t = Math.abs(e);
74
+ return t >= a ? Math.round(e / a) + "d" : t >= i ? Math.round(e / i) + "h" : t >= r ? Math.round(e / r) + "m" : t >= n ? Math.round(e / n) + "s" : e + "ms";
75
+ }
76
+ function u(e) {
77
+ var t = Math.abs(e);
78
+ return t >= a ? d(e, t, a, "day") : t >= i ? d(e, t, i, "hour") : t >= r ? d(e, t, r, "minute") : t >= n ? d(e, t, n, "second") : e + " ms";
79
+ }
80
+ function d(e, t, n, r) {
81
+ var i = t >= n * 1.5;
82
+ return Math.round(e / n) + " " + r + (i ? "s" : "");
83
+ }
84
+ })), m = /* @__PURE__ */ s(((e, t) => {
85
+ function n(e) {
86
+ n.debug = n, n.default = n, n.coerce = c, n.disable = o, n.enable = i, n.enabled = s, n.humanize = p(), n.destroy = l, Object.keys(e).forEach((t) => {
87
+ n[t] = e[t];
88
+ }), n.names = [], n.skips = [], n.formatters = {};
89
+ function t(e) {
90
+ let t = 0;
91
+ for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
92
+ return n.colors[Math.abs(t) % n.colors.length];
93
+ }
94
+ n.selectColor = t;
95
+ function n(e) {
96
+ let t, i = null, a, o;
97
+ function s(...e) {
98
+ if (!s.enabled) return;
99
+ let r = s, i = Number(/* @__PURE__ */ new Date());
100
+ r.diff = i - (t || i), r.prev = t, r.curr = i, t = i, e[0] = n.coerce(e[0]), typeof e[0] != "string" && e.unshift("%O");
101
+ let a = 0;
102
+ e[0] = e[0].replace(/%([a-zA-Z%])/g, (t, i) => {
103
+ if (t === "%%") return "%";
104
+ a++;
105
+ let o = n.formatters[i];
106
+ if (typeof o == "function") {
107
+ let n = e[a];
108
+ t = o.call(r, n), e.splice(a, 1), a--;
109
+ }
110
+ return t;
111
+ }), n.formatArgs.call(r, e), (r.log || n.log).apply(r, e);
112
+ }
113
+ return s.namespace = e, s.useColors = n.useColors(), s.color = n.selectColor(e), s.extend = r, s.destroy = n.destroy, Object.defineProperty(s, "enabled", {
114
+ enumerable: !0,
115
+ configurable: !1,
116
+ get: () => i === null ? (a !== n.namespaces && (a = n.namespaces, o = n.enabled(e)), o) : i,
117
+ set: (e) => {
118
+ i = e;
119
+ }
120
+ }), typeof n.init == "function" && n.init(s), s;
121
+ }
122
+ function r(e, t) {
123
+ let r = n(this.namespace + (t === void 0 ? ":" : t) + e);
124
+ return r.log = this.log, r;
125
+ }
126
+ function i(e) {
127
+ n.save(e), n.namespaces = e, n.names = [], n.skips = [];
128
+ let t = (typeof e == "string" ? e : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
129
+ for (let e of t) e[0] === "-" ? n.skips.push(e.slice(1)) : n.names.push(e);
130
+ }
131
+ function a(e, t) {
132
+ let n = 0, r = 0, i = -1, a = 0;
133
+ for (; n < e.length;) if (r < t.length && (t[r] === e[n] || t[r] === "*")) t[r] === "*" ? (i = r, a = n, r++) : (n++, r++);
134
+ else if (i !== -1) r = i + 1, a++, n = a;
135
+ else return !1;
136
+ for (; r < t.length && t[r] === "*";) r++;
137
+ return r === t.length;
138
+ }
139
+ function o() {
140
+ let e = [...n.names, ...n.skips.map((e) => "-" + e)].join(",");
141
+ return n.enable(""), e;
142
+ }
143
+ function s(e) {
144
+ for (let t of n.skips) if (a(e, t)) return !1;
145
+ for (let t of n.names) if (a(e, t)) return !0;
146
+ return !1;
147
+ }
148
+ function c(e) {
149
+ return e instanceof Error ? e.stack || e.message : e;
150
+ }
151
+ function l() {
152
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
153
+ }
154
+ return n.enable(n.load()), n;
155
+ }
156
+ t.exports = n;
157
+ })), h = /* @__PURE__ */ s(((e, t) => {
158
+ e.formatArgs = r, e.save = i, e.load = a, e.useColors = n, e.storage = o(), e.destroy = (() => {
159
+ let e = !1;
160
+ return () => {
161
+ e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
162
+ };
163
+ })(), e.colors = /* @__PURE__ */ "#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33".split(".");
164
+ function n() {
165
+ if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return !0;
166
+ if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
167
+ let e;
168
+ return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (e = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(e[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
169
+ }
170
+ function r(e) {
171
+ if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors) return;
172
+ let n = "color: " + this.color;
173
+ e.splice(1, 0, n, "color: inherit");
174
+ let r = 0, i = 0;
175
+ e[0].replace(/%[a-zA-Z%]/g, (e) => {
176
+ e !== "%%" && (r++, e === "%c" && (i = r));
177
+ }), e.splice(i, 0, n);
178
+ }
179
+ e.log = console.debug || console.log || (() => {});
180
+ function i(t) {
181
+ try {
182
+ t ? e.storage.setItem("debug", t) : e.storage.removeItem("debug");
183
+ } catch {}
184
+ }
185
+ function a() {
186
+ let t;
187
+ try {
188
+ t = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
189
+ } catch {}
190
+ return !t && typeof process < "u" && "env" in process && (t = process.env.DEBUG), t;
191
+ }
192
+ function o() {
193
+ try {
194
+ return localStorage;
195
+ } catch {}
196
+ }
197
+ t.exports = m()(e);
198
+ var { formatters: s } = t.exports;
199
+ s.j = function(e) {
200
+ try {
201
+ return JSON.stringify(e);
202
+ } catch (e) {
203
+ return "[UnexpectedJSONParseError]: " + e.message;
204
+ }
205
+ };
206
+ }));
207
+ //#endregion
208
+ export { f as a, c as i, s as n, d as o, o as r, u as s, h as t };
209
+
210
+ //# sourceMappingURL=browser-CfnAFove.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-CfnAFove.js","names":[],"sources":["../../../../../node_modules/.bun/ms@2.1.3/node_modules/ms/index.js","../../../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/common.js","../../../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/browser.js"],"sourcesContent":["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;;;;;;;;CAIA,IAAI,IAAI,KACJ,IAAI,IAAI,IACR,IAAI,IAAI,IACR,IAAI,IAAI,IACR,IAAI,IAAI,GACR,IAAI,IAAI;CAgBZ,EAAO,UAAU,SAAU,GAAK,GAAS;EACvC,MAAqB,CAAC;EACtB,IAAI,IAAO,OAAO;EAClB,IAAI,MAAS,YAAY,EAAI,SAAS,GACpC,OAAO,EAAM,CAAG;EACX,IAAI,MAAS,YAAY,SAAS,CAAG,GAC1C,OAAO,EAAQ,OAAO,EAAQ,CAAG,IAAI,EAAS,CAAG;EAEnD,MAAU,MACR,0DACE,KAAK,UAAU,CAAG,CACtB;CACF;CAUA,SAAS,EAAM,GAAK;EAClB,QAAM,OAAO,CAAG,GACZ,IAAI,SAAS,MAGjB;OAAI,IAAQ,mIAAmI,KAC7I,CACF;GACK,OAGL;QAAI,IAAI,WAAW,EAAM,EAAE;IAE3B,SADY,EAAM,MAAM,MAAM,YACnB,GAAX;KACE,KAAK;KACL,KAAK;KACL,KAAK;KACL,KAAK;KACL,KAAK,KACH,OAAO,IAAI;KACb,KAAK;K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EA,EAAO,UAAA,EAAA,EAA8B,CAAO;CAE5C,IAAM,EAAC,kBAAc,EAAO;CAM5B,EAAW,IAAI,SAAU,GAAG;EAC3B,IAAI;GACH,OAAO,KAAK,UAAU,CAAC;EACxB,SAAS,GAAO;GACf,OAAO,iCAAiC,EAAM;EAC/C;CACD"}
@@ -0,0 +1,198 @@
1
+ import { s as e, t } from "../browser-CfnAFove.js";
2
+ import { g as n, t as r } from "../isEqual-D3CTSc6W.js";
3
+ //#region ../../shared/controller-utils/dist/index.js
4
+ var i = /* @__PURE__ */ e(t(), 1), a = Object.defineProperty, o = /* @__PURE__ */ ((e, t) => {
5
+ let n = {};
6
+ for (var r in e) a(n, r, {
7
+ get: e[r],
8
+ enumerable: !0
9
+ });
10
+ return t || a(n, Symbol.toStringTag, { value: "Module" }), n;
11
+ })({ enabled: () => s });
12
+ function s(e, t, n) {
13
+ return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == "boolean" ? n : !0;
14
+ }
15
+ //#endregion
16
+ //#region src/controller/utils.ts
17
+ var c = (e) => e.filter((e) => e.correct).map((e) => e.id).sort(), l = (e, t) => {
18
+ let { shapes: { rectangles: i = [], polygons: a = [], circles: o = [] } } = e, s = c([
19
+ ...i,
20
+ ...a,
21
+ ...o
22
+ ]);
23
+ return !t || n(t) ? !1 : t.answers && t.answers.length ? r((t.answers || []).map((e) => e.id).sort(), s) : !(s && s.length);
24
+ }, u = {
25
+ dimensions: {
26
+ height: 0,
27
+ width: 0
28
+ },
29
+ hotspotColor: "rgba(137, 183, 244, 0.25)",
30
+ hotspotList: ["rgba(137, 183, 244, 0.25)"],
31
+ imageUrl: "",
32
+ multipleCorrect: !0,
33
+ outlineColor: "blue",
34
+ outlineList: ["blue"],
35
+ partialScoring: !1,
36
+ prompt: "",
37
+ promptEnabled: !0,
38
+ rationaleEnabled: !0,
39
+ shapes: {
40
+ rectangles: [],
41
+ polygons: [],
42
+ circles: []
43
+ },
44
+ strokeWidth: 5,
45
+ studentInstructionsEnabled: !0,
46
+ teacherInstructions: "",
47
+ teacherInstructionsEnabled: !0,
48
+ toolbarEditorPosition: "bottom"
49
+ }, d = (0, i.default)("pie-elements:hotspot:controller"), f = (e) => ({
50
+ ...u,
51
+ ...e
52
+ });
53
+ function p(e, t, n) {
54
+ let r = f(e), { imageUrl: i, dimensions: a, hotspotColor: o, hoverOutlineColor: s, selectedHotspotColor: c, multipleCorrect: u, outlineColor: d, partialScoring: p, prompt: m, shapes: h, language: g, fontSizeFactor: _, autoplayAudioEnabled: v, completeAudioEnabled: y, customAudioButton: b } = r, { rectangles: x, polygons: S, circles: C } = h || {}, w = n.mode === "evaluate" || n.role === "instructor" && n.mode === "view";
55
+ return new Promise((e) => {
56
+ let f = {
57
+ disabled: n.mode !== "gather",
58
+ mode: n.mode,
59
+ dimensions: a,
60
+ imageUrl: i,
61
+ outlineColor: d,
62
+ hotspotColor: o,
63
+ hoverOutlineColor: s,
64
+ selectedHotspotColor: c,
65
+ multipleCorrect: u,
66
+ partialScoring: p,
67
+ language: g,
68
+ fontSizeFactor: _,
69
+ autoplayAudioEnabled: v,
70
+ completeAudioEnabled: y,
71
+ customAudioButton: b,
72
+ shapes: {
73
+ ...h,
74
+ rectangles: (x || []).map(({ index: e, correct: t, ...n }) => w ? {
75
+ correct: t,
76
+ ...n
77
+ } : { ...n }),
78
+ polygons: (S || []).map(({ index: e, correct: t, ...n }) => w ? {
79
+ correct: t,
80
+ ...n
81
+ } : { ...n }),
82
+ circles: (C || []).map(({ index: e, correct: t, ...n }) => w ? {
83
+ correct: t,
84
+ ...n
85
+ } : { ...n })
86
+ },
87
+ responseCorrect: n.mode === "evaluate" ? l(r, t) : void 0,
88
+ extraCSSRules: r.extraCSSRules
89
+ };
90
+ n.role === "instructor" && (n.mode === "view" || n.mode === "evaluate") ? (f.rationale = r.rationaleEnabled ? r.rationale : null, f.teacherInstructions = r.teacherInstructionsEnabled ? r.teacherInstructions : null) : (f.rationale = null, f.teacherInstructions = null), f.prompt = r.promptEnabled ? m : null, f.strokeWidth = r.strokeWidth, e(f);
91
+ });
92
+ }
93
+ var m = (e = {}) => new Promise((t) => {
94
+ t({
95
+ ...u,
96
+ ...e
97
+ });
98
+ }), h = (e, t, n = {}) => {
99
+ let { answers: r } = t || {};
100
+ if (!e.shapes || !e.shapes.rectangles && !e.shapes.polygons && !e.shapes.circles) return 0;
101
+ let { shapes: { rectangles: i = [], polygons: a = [], circles: s = [] } = {} } = e;
102
+ if (!o.enabled(e, n)) return +!!l(e, t);
103
+ let c = 0, u = 0, d = [
104
+ ...i,
105
+ ...a,
106
+ ...s
107
+ ], f = d.filter((e) => e.correct);
108
+ d.forEach((e) => {
109
+ let t = r && r.filter((t) => t.id === e.id)[0], n = e.correct && t;
110
+ t && (u += 1), n && (c += 1);
111
+ });
112
+ let p = u > f.length ? u - f.length : 0, m = f.length === 0 ? 1 : f.length, h = ((c - p) / m).toFixed(2);
113
+ return h < 0 ? 0 : parseFloat(h);
114
+ }, g = (e, t, n) => {
115
+ let r = [], { answers: i } = t || {}, { shapes: a } = e || {}, s = [];
116
+ a && (a.rectangles && s.push(...a.rectangles), a.polygons && s.push(...a.polygons), a.circles && s.push(...a.circles));
117
+ let c = s.filter((e) => e.correct), l = s.length;
118
+ if (r.push(`Total of ${l} hotspot(s) defined, ${c.length} correct.`), i && i.length > 0) {
119
+ r.push(`Student selected ${i.length} hotspot(s).`);
120
+ let e = 0, t = 0;
121
+ i.forEach((n) => {
122
+ let r = s.find((e) => e.id === n.id);
123
+ r && r.correct ? e++ : t++;
124
+ });
125
+ let n = c.filter((e) => !i.some((t) => t.id === e.id)).length;
126
+ e > 0 && r.push(`${e} correct hotspot(s) selected.`), t > 0 && r.push(`${t} incorrect hotspot(s) selected.`), n > 0 && r.push(`${n} correct hotspot(s) missed.`);
127
+ } else r.push("No hotspots selected.");
128
+ if (o.enabled(e, n)) {
129
+ if (r.push("Score calculated using partial scoring."), i && i.length > 0) {
130
+ let e = 0, t = 0;
131
+ i.forEach((n) => {
132
+ let r = s.find((e) => e.id === n.id);
133
+ r && r.correct ? e++ : t++;
134
+ });
135
+ let n = c.length;
136
+ if (r.push(`Partial scoring calculation: ${e} correct selections out of ${n} available.`), t > n) {
137
+ let i = t - (n - e);
138
+ r.push(`${i} extra incorrect selection(s) beyond required amount are deducted from score.`);
139
+ }
140
+ }
141
+ } else r.push("Score calculated using all-or-nothing scoring.");
142
+ let u = h(e, t, n);
143
+ return r.push(`Score: ${u}.`), r;
144
+ };
145
+ function _(e, t, r = {}) {
146
+ return new Promise((i) => {
147
+ if (d("outcome..."), (!t || n(t)) && i({
148
+ score: 0,
149
+ empty: !0,
150
+ traceLog: ["No hotspots selected. Score: 0."]
151
+ }), t.answers) {
152
+ let n = g(e, t, r);
153
+ i({
154
+ score: h(e, t, r),
155
+ empty: !1,
156
+ traceLog: n
157
+ });
158
+ } else i({
159
+ score: 0,
160
+ empty: !0,
161
+ traceLog: ["No hotspots selected. Score: 0."]
162
+ });
163
+ });
164
+ }
165
+ var v = (e) => {
166
+ let t = [];
167
+ return e.forEach((e) => {
168
+ let { correct: n, id: r } = e;
169
+ n && t.push({ id: r });
170
+ }), t;
171
+ }, y = (e, t) => new Promise((n) => {
172
+ if (t.mode !== "evaluate" && t.role === "instructor") {
173
+ let { shapes: { rectangles: t = [], circles: r = [], polygons: i = {} } = {} } = e, a = v(t), o = v(i), s = v(r);
174
+ n({
175
+ answers: [
176
+ ...a,
177
+ ...o,
178
+ ...s
179
+ ],
180
+ id: "1"
181
+ });
182
+ } else n(null);
183
+ }), b = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), x = (e = {}, t = {}) => {
184
+ let { shapes: n } = e, { minShapes: r = 2, maxShapes: i, maxSelections: a } = t, o = {};
185
+ [
186
+ "teacherInstructions",
187
+ "prompt",
188
+ "rationale"
189
+ ].forEach((n) => {
190
+ t[n]?.required && !b(e[n]) && (o[n] = "This field is required.");
191
+ });
192
+ let s = Object.values(n || {}).reduce((e, t) => [...e, ...t], []), c = (s || []).reduce((e, t) => t.correct ? e + 1 : e, 0), l = (s || []).length;
193
+ return l < r ? o.shapes = `There should be at least ${r} shapes defined.` : l > i && (o.shapes = `No more than ${i} shapes should be defined.`), c < 1 ? o.selections = "There should be at least 1 shape selected." : c > a && (o.selections = `No more than ${a} shapes should be selected.`), o;
194
+ };
195
+ //#endregion
196
+ export { y as createCorrectResponseSession, m as createDefaultModel, g as getLogTrace, p as model, f as normalize, _ as outcome, x as validate };
197
+
198
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/controller-utils/dist/index.js","../../../src/controller/utils.ts","../../../src/controller/defaults.ts","../../../src/controller/index.ts"],"sourcesContent":["//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\n//#region src/persistence.ts\nfunction n(e) {\n\treturn Array.isArray(e) ? e.filter((e) => e != null) : [];\n}\nfunction r(e) {\n\tlet t = [...e];\n\tfor (let e = t.length - 1; e > 0; e--) {\n\t\tlet n = Math.floor(Math.random() * (e + 1));\n\t\t[t[e], t[n]] = [t[n], t[e]];\n\t}\n\treturn t;\n}\nfunction i(e) {\n\treturn e == null ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == \"object\" ? Object.keys(e).length === 0 : !1;\n}\nasync function a(e, t, a, o = \"value\") {\n\tlet s = n(t?.data?.shuffledValues ?? t?.shuffledValues ?? []);\n\tif (!t) {\n\t\tconsole.warn(\"Unable to save shuffled choices because there's no session.\");\n\t\treturn;\n\t}\n\tif (!i(s)) return n(s.map((t) => e.find((e) => e[o] === t)));\n\tlet c = r(e);\n\tif (a && typeof a == \"function\") try {\n\t\tlet e = n(c.map((e) => e[o]));\n\t\ti(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(c)}, key: ${o}`) : t.id && t.element && await a(t.id, t.element, { shuffledValues: e });\n\t} catch (e) {\n\t\tconsole.warn(\"Unable to save shuffled order for choices\"), console.error(e);\n\t}\n\telse console.warn(\"Unable to save shuffled choices, shuffle will happen every time.\");\n\treturn c;\n}\nfunction o(e, t, n) {\n\treturn !!(e.lockChoiceOrder || n[\"@pie-element\"]?.lockChoiceOrder || (n.role ?? \"student\") === \"instructor\");\n}\n//#endregion\n//#region src/partial-scoring.ts\nvar s = /* @__PURE__ */ t({ enabled: () => c });\nfunction c(e, t, n) {\n\treturn e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == \"boolean\" ? n : !0;\n}\n//#endregion\nexport { a as getShuffledChoices, o as lockChoices, s as partialScoring };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/hotspot/controller/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { isEmpty, isEqual } from 'lodash-es';\n\nexport const getCorrectResponse = (choices) =>\n choices\n .filter((c) => c.correct)\n .map((c) => c.id)\n .sort();\n\nexport const isResponseCorrect = (question, session) => {\n const {\n shapes: { rectangles = [], polygons = [], circles = [] },\n } = question;\n const choices = [...rectangles, ...polygons, ...circles];\n let correctResponseIds = getCorrectResponse(choices);\n\n if (!session || isEmpty(session)) {\n return false;\n }\n\n if (session.answers && session.answers.length) {\n let answerIds = (session.answers || []).map((a) => a.id);\n\n return isEqual(answerIds.sort(), correctResponseIds);\n } else if (!(correctResponseIds && correctResponseIds.length)) {\n return true;\n }\n\n return false;\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/hotspot/controller/src/defaults.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nexport default {\n dimensions: { height: 0, width: 0 },\n hotspotColor: 'rgba(137, 183, 244, 0.25)',\n hotspotList: ['rgba(137, 183, 244, 0.25)'],\n imageUrl: '',\n multipleCorrect: true,\n outlineColor: 'blue',\n outlineList: ['blue'],\n partialScoring: false,\n prompt: '',\n promptEnabled: true,\n rationaleEnabled: true,\n shapes: { rectangles: [], polygons: [], circles: [] },\n strokeWidth: 5,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/hotspot/controller/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport debug from 'debug';\nimport { isEmpty } from 'lodash-es';\nimport { partialScoring } from '@pie-element/shared-controller-utils';\n\nimport { isResponseCorrect } from './utils.js';\n\nimport defaults from './defaults.js';\n\nconst log = debug('pie-elements:hotspot:controller');\n\nexport const normalize = (question) => ({\n ...defaults,\n ...question,\n});\n\nexport function model(question, session, env) {\n const normalizedQuestion = normalize(question);\n const {\n imageUrl,\n dimensions,\n hotspotColor,\n hoverOutlineColor,\n selectedHotspotColor,\n multipleCorrect,\n outlineColor,\n partialScoring,\n prompt,\n shapes,\n language,\n fontSizeFactor,\n autoplayAudioEnabled,\n completeAudioEnabled,\n customAudioButton,\n } = normalizedQuestion;\n const { rectangles, polygons, circles } = shapes || {};\n\n const shouldIncludeCorrectResponse = env.mode === 'evaluate' || (env.role === 'instructor' && env.mode === 'view');\n\n return new Promise((resolve) => {\n const out = {\n disabled: env.mode !== 'gather',\n mode: env.mode,\n dimensions,\n imageUrl,\n outlineColor,\n hotspotColor,\n hoverOutlineColor,\n selectedHotspotColor,\n multipleCorrect,\n partialScoring,\n language,\n fontSizeFactor,\n autoplayAudioEnabled,\n completeAudioEnabled,\n customAudioButton,\n shapes: {\n ...shapes,\n // eslint-disable-next-line no-unused-vars\n rectangles: (rectangles || []).map(({ index, correct, ...rectProps }) =>\n shouldIncludeCorrectResponse ? { correct, ...rectProps } : { ...rectProps },\n ),\n // eslint-disable-next-line no-unused-vars\n polygons: (polygons || []).map(({ index, correct, ...polyProps }) =>\n shouldIncludeCorrectResponse ? { correct, ...polyProps } : { ...polyProps },\n ),\n // eslint-disable-next-line no-unused-vars\n circles: (circles || []).map(({ index, correct, ...circleProps }) =>\n shouldIncludeCorrectResponse ? { correct, ...circleProps } : { ...circleProps },\n ),\n },\n responseCorrect: env.mode === 'evaluate' ? isResponseCorrect(normalizedQuestion, session) : undefined,\n extraCSSRules: normalizedQuestion.extraCSSRules,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : null;\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.rationale = null;\n out.teacherInstructions = null;\n }\n\n out.prompt = normalizedQuestion.promptEnabled ? prompt : null;\n out.strokeWidth = normalizedQuestion.strokeWidth;\n\n resolve(out);\n });\n}\n\nexport const createDefaultModel = (model = {}) =>\n new Promise((resolve) => {\n resolve({\n ...defaults,\n ...model,\n });\n });\n\nconst getScore = (config, session, env = {}) => {\n const { answers } = session || {};\n\n if (!config.shapes || (!config.shapes.rectangles && !config.shapes.polygons && !config.shapes.circles)) {\n return 0;\n }\n\n const { shapes: { rectangles = [], polygons = [], circles = [] } = {} } = config;\n const partialScoringEnabled = partialScoring.enabled(config, env);\n\n if (!partialScoringEnabled) {\n return isResponseCorrect(config, session) ? 1 : 0;\n }\n\n let correctAnswers = 0;\n let selectedChoices = 0;\n\n const choices = [...rectangles, ...polygons, ...circles];\n\n const correctChoices = choices.filter((choice) => choice.correct);\n\n choices.forEach((shape) => {\n const selected = answers && answers.filter((answer) => answer.id === shape.id)[0];\n const correctlySelected = shape.correct && selected;\n\n if (selected) {\n selectedChoices += 1;\n }\n\n if (correctlySelected) {\n correctAnswers += 1;\n }\n });\n\n const extraAnswers = selectedChoices > correctChoices.length ? selectedChoices - correctChoices.length : 0;\n\n const total = correctChoices.length === 0 ? 1 : correctChoices.length;\n const str = ((correctAnswers - extraAnswers) / total).toFixed(2);\n\n return str < 0 ? 0 : parseFloat(str);\n};\n\n /**\n * Generates detailed trace log for scoring evaluation\n * @param {Object} model - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array} traceLog - array of trace messages\n */\nexport const getLogTrace = (model, session, env) => {\n const traceLog = [];\n const { answers } = session || {};\n const { shapes } = model || {};\n \n const allShapes = [];\n if (shapes) {\n if (shapes.rectangles) allShapes.push(...shapes.rectangles);\n if (shapes.polygons) allShapes.push(...shapes.polygons);\n if (shapes.circles) allShapes.push(...shapes.circles);\n }\n \n const correctShapes = allShapes.filter(shape => shape.correct);\n const totalShapes = allShapes.length;\n \n traceLog.push(`Total of ${totalShapes} hotspot(s) defined, ${correctShapes.length} correct.`);\n \n if (answers && answers.length > 0) {\n traceLog.push(`Student selected ${answers.length} hotspot(s).`);\n \n let correctSelections = 0;\n let incorrectSelections = 0;\n \n answers.forEach(answer => {\n const shape = allShapes.find(s => s.id === answer.id);\n if (shape && shape.correct) {\n correctSelections++;\n } else {\n incorrectSelections++;\n }\n });\n \n const missedCorrect = correctShapes.filter(correctShape => \n !answers.some(answer => answer.id === correctShape.id)\n ).length;\n \n if (correctSelections > 0) {\n traceLog.push(`${correctSelections} correct hotspot(s) selected.`);\n }\n if (incorrectSelections > 0) {\n traceLog.push(`${incorrectSelections} incorrect hotspot(s) selected.`);\n }\n if (missedCorrect > 0) {\n traceLog.push(`${missedCorrect} correct hotspot(s) missed.`);\n }\n } else {\n traceLog.push('No hotspots selected.');\n }\n\n const partialScoringEnabled = partialScoring.enabled(model, env);\n \n if (partialScoringEnabled) {\n traceLog.push(`Score calculated using partial scoring.`);\n \n if (answers && answers.length > 0) {\n let correctSelections = 0;\n let incorrectSelections = 0;\n \n answers.forEach(answer => {\n const shape = allShapes.find(s => s.id === answer.id);\n if (shape && shape.correct) {\n correctSelections++;\n } else {\n incorrectSelections++;\n }\n });\n \n const totalCorrectAvailable = correctShapes.length;\n traceLog.push(`Partial scoring calculation: ${correctSelections} correct selections out of ${totalCorrectAvailable} available.`);\n \n if (incorrectSelections > totalCorrectAvailable) {\n const extraSelections = incorrectSelections - (totalCorrectAvailable - correctSelections);\n traceLog.push(`${extraSelections} extra incorrect selection(s) beyond required amount are deducted from score.`);\n }\n }\n } else {\n traceLog.push(`Score calculated using all-or-nothing scoring.`);\n }\n\n const score = getScore(model, session, env);\n traceLog.push(`Score: ${score}.`);\n\n return traceLog;\n}\n\nexport function outcome(config, session, env = {}) {\n return new Promise((resolve) => {\n log('outcome...');\n\n if (!session || isEmpty(session)) {\n resolve({ \n score: 0, \n empty: true, \n traceLog: ['No hotspots selected. Score: 0.'] \n });\n } \n\n if (session.answers) {\n const traceLog = getLogTrace(config, session, env);\n const score = getScore(config, session, env);\n\n resolve({ score, empty: false, traceLog });\n } else {\n resolve({ \n score: 0, \n empty: true, \n traceLog: ['No hotspots selected. Score: 0.'] \n });\n }\n });\n}\n\nconst returnShapesCorrect = (shapes) => {\n let answers = [];\n\n shapes.forEach((i) => {\n const { correct, id } = i;\n if (correct) {\n answers.push({ id });\n }\n });\n return answers;\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { shapes: { rectangles = [], circles = [], polygons = {} } = {} } = question;\n\n const rectangleCorrect = returnShapesCorrect(rectangles);\n const polygonsCorrect = returnShapesCorrect(polygons);\n const circlesCorrect = returnShapesCorrect(circles);\n\n resolve({\n answers: [...rectangleCorrect, ...polygonsCorrect, ...circlesCorrect],\n id: '1',\n });\n } else {\n resolve(null);\n }\n });\n};\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { shapes } = model;\n const { minShapes = 2, maxShapes, maxSelections } = config;\n const errors = {};\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n const allShapes = Object.values(shapes || {}).reduce((acc, shape) => [...acc, ...shape], []);\n\n const nbOfSelections = (allShapes || []).reduce((acc, shape) => (shape.correct ? acc + 1 : acc), 0);\n\n const nbOfShapes = (allShapes || []).length;\n\n if (nbOfShapes < minShapes) {\n errors.shapes = `There should be at least ${minShapes} shapes defined.`;\n } else if (nbOfShapes > maxShapes) {\n errors.shapes = `No more than ${maxShapes} shapes should be defined.`;\n }\n\n if (nbOfSelections < 1) {\n errors.selections = 'There should be at least 1 shape selected.';\n } else if (nbOfSelections > maxSelections) {\n errors.selections = `No more than ${maxSelections} shapes should be selected.`;\n }\n\n return errors;\n};\n"],"mappings":";;;mCACA,IAAA,OAAA,gBA8CA,IAAA,kBA9CA,GAAA,MAAA;;;;;;;AAOA,GAuCA,EAAA,eAAA,EAAA,CAAA;AACA,SAAA,EAAA,GAAA,GAAA,GAAA;;AAEA;;;ACtCA,IAAa,KAAsB,MACjC,EACG,QAAQ,MAAM,EAAE,OAAO,EACvB,KAAK,MAAM,EAAE,EAAE,EACf,KAAK,GAEG,KAAqB,GAAU,MAAY;CACtD,IAAM,EACJ,QAAQ,EAAE,gBAAa,CAAC,GAAG,cAAW,CAAC,GAAG,aAAU,CAAC,QACnD,GAEA,IAAqB,EAAmB;EAD3B,GAAG;EAAY,GAAG;EAAU,GAAG;CACJ,CAAO;CAcnD,OAZI,CAAC,KAAW,EAAQ,CAAO,IACtB,KAGL,EAAQ,WAAW,EAAQ,QAAQ,SAG9B,GAFU,EAAQ,WAAW,CAAC,GAAG,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