lido-player 0.0.2-beta-03 → 0.0.2-beta-05

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 (237) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{decode-CjtxAc2C.js → decode-Cswyhtx_.js} +1 -1
  3. package/dist/cjs/{index-Bsk4M2Qz.js → index-ChRpftJ2.js} +1 -1
  4. package/dist/cjs/{index-Bt9s5WYs.js → index-Qz_Mg9Ok.js} +155 -101
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/lido-avatar_22.cjs.entry.js +136 -54
  7. package/dist/cjs/lido-player.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/collection/components/avatar/lido-avatar.css +4 -4
  10. package/dist/collection/components/avatar/lido-avatar.js +1 -1
  11. package/dist/collection/components/avatar/lido-avatar.tsx +207 -207
  12. package/dist/collection/components/avatar/readme.md +49 -49
  13. package/dist/collection/components/calculator/lido-calculator.css +89 -87
  14. package/dist/collection/components/calculator/lido-calculator.js +2 -2
  15. package/dist/collection/components/canvas/lido-canvas.css +33 -36
  16. package/dist/collection/components/canvas/lido-canvas.js +47 -1
  17. package/dist/collection/components/cell/lido-cell.css +100 -100
  18. package/dist/collection/components/cell/lido-cell.js +12 -12
  19. package/dist/collection/components/column/lido-col.css +19 -19
  20. package/dist/collection/components/column/lido-col.js +6 -6
  21. package/dist/collection/components/container/lido-container.css +10 -10
  22. package/dist/collection/components/container/lido-container.js +8 -8
  23. package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
  24. package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
  25. package/dist/collection/components/float/lido-float.css +30 -30
  26. package/dist/collection/components/float/lido-float.js +2 -2
  27. package/dist/collection/components/home/lido-home.css +309 -282
  28. package/dist/collection/components/home/lido-home.js +11 -11
  29. package/dist/collection/components/image/lido-image.css +17 -17
  30. package/dist/collection/components/image/lido-image.js +6 -6
  31. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  32. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  33. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  34. package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
  35. package/dist/collection/components/position/lido-pos.css +16 -16
  36. package/dist/collection/components/position/lido-pos.js +2 -2
  37. package/dist/collection/components/random/lido-random.css +8 -8
  38. package/dist/collection/components/random/lido-random.js +2 -2
  39. package/dist/collection/components/root/lido-root.js +5 -5
  40. package/dist/collection/components/row/lido-row.css +10 -10
  41. package/dist/collection/components/row/lido-row.js +6 -6
  42. package/dist/collection/components/scale/lido-balance.css +145 -145
  43. package/dist/collection/components/scale/lido-balance.js +13 -13
  44. package/dist/collection/components/shape/lido-shape.css +185 -185
  45. package/dist/collection/components/shape/lido-shape.js +6 -6
  46. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  47. package/dist/collection/components/slideFill/lido-slide-fill.js +11 -11
  48. package/dist/collection/components/text/lido-text.css +53 -53
  49. package/dist/collection/components/text/lido-text.js +5 -5
  50. package/dist/collection/components/trace/lido-trace.css +97 -97
  51. package/dist/collection/components/trace/lido-trace.js +91 -15
  52. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  53. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  54. package/dist/collection/css/animation.css +211 -211
  55. package/dist/collection/css/index.css +312 -311
  56. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
  57. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  58. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
  59. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
  60. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
  61. package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
  62. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  63. package/dist/collection/stories/Templates/blender/blender.stories.js +58 -58
  64. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  65. package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
  66. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  67. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  68. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
  69. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  70. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  71. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  72. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
  73. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  74. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  75. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  76. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  77. package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
  78. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  79. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  80. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  81. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  82. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
  83. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
  84. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  85. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  86. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
  87. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
  88. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
  89. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
  90. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
  91. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
  92. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
  93. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
  94. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
  95. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
  96. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  97. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
  98. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
  99. package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
  100. package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
  101. package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
  102. package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
  103. package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
  104. package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
  105. package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
  106. package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
  107. package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
  108. package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
  109. package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
  110. package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
  111. package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
  112. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
  113. package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
  114. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
  115. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
  116. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  117. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  118. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
  119. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  120. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  121. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  122. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +631 -631
  123. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  124. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
  125. package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
  126. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
  127. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
  128. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
  129. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
  130. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  131. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  132. package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
  133. package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
  134. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
  135. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
  136. package/dist/collection/stories/Templates/total/total.stories.js +28 -28
  137. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
  138. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
  139. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
  140. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
  141. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
  142. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
  143. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
  144. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  145. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  146. package/dist/collection/stories/components/slider.stories.js +4 -4
  147. package/dist/collection/stories/components/trace.stories.js +5 -5
  148. package/dist/collection/utils/audioPlayer.js +55 -33
  149. package/dist/collection/utils/constants.js +8 -2
  150. package/dist/collection/utils/customEvents.js +14 -2
  151. package/dist/collection/utils/i18n.js +2 -2
  152. package/dist/collection/utils/utils.js +23 -8
  153. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +10 -10
  154. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  155. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +8 -8
  156. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  157. package/dist/components/index.js +1 -1
  158. package/dist/components/lido-avatar.js +1 -1
  159. package/dist/components/lido-balance.js +1 -1
  160. package/dist/components/lido-calculator.js +1 -1
  161. package/dist/components/lido-canvas.js +1 -1
  162. package/dist/components/lido-cell.js +1 -1
  163. package/dist/components/lido-col.js +1 -1
  164. package/dist/components/lido-container.js +1 -1
  165. package/dist/components/lido-flash-card.js +1 -1
  166. package/dist/components/lido-float.js +1 -1
  167. package/dist/components/lido-home.js +1 -1
  168. package/dist/components/lido-image.js +1 -1
  169. package/dist/components/lido-keyboard.js +1 -1
  170. package/dist/components/lido-math-matrix.js +1 -1
  171. package/dist/components/lido-pos.js +1 -1
  172. package/dist/components/lido-random.js +1 -1
  173. package/dist/components/lido-root.js +1 -1
  174. package/dist/components/lido-row.js +1 -1
  175. package/dist/components/lido-shape.js +1 -1
  176. package/dist/components/lido-slide-fill.js +1 -1
  177. package/dist/components/lido-text.js +1 -1
  178. package/dist/components/lido-trace.js +1 -1
  179. package/dist/components/lido-wrap.js +1 -1
  180. package/dist/components/{p-04xe3uUh.js → p-B8ICWIo1.js} +1 -1
  181. package/dist/components/{p-BPsom7z0.js → p-BCYmXxEx.js} +1 -1
  182. package/dist/components/{p-CwDTdXe5.js → p-BeRr8u5m.js} +1 -1
  183. package/dist/components/{p-COBnIJEZ.js → p-BjX-MmtH.js} +1 -1
  184. package/dist/components/p-C6X7ZrrK.js +1 -0
  185. package/dist/components/p-C7HA_TAh.js +1 -0
  186. package/dist/components/{p-BfMfgi8h.js → p-CADVkDjz.js} +1 -1
  187. package/dist/components/p-CFNuecus.js +12 -0
  188. package/dist/components/p-CP7kK5or.js +1 -0
  189. package/dist/components/p-CU9cbGhF.js +1 -0
  190. package/dist/components/{p-DU-N8vrM.js → p-CcsBtz2t.js} +1 -1
  191. package/dist/components/{p-D23sDjqf.js → p-Ch7qbeup.js} +1 -1
  192. package/dist/components/{p-B_jNkxEx.js → p-CrMTVeHT.js} +1 -1
  193. package/dist/components/{p-DPAlnts-.js → p-D4s9ZWCB.js} +1 -1
  194. package/dist/components/p-DJktjdy4.js +1 -0
  195. package/dist/components/p-DVTigdH_.js +1 -0
  196. package/dist/components/{p-D0bKCljc.js → p-DxQHTjUA.js} +1 -1
  197. package/dist/components/p-Xn4MRzQ1.js +1 -0
  198. package/dist/components/p-_0ruH-wh.js +1 -0
  199. package/dist/components/{p-D62lkidF.js → p-lLpL3FCd.js} +1 -1
  200. package/dist/components/{p-C9eb2B-B.js → p-qa-uYZdx.js} +1 -1
  201. package/dist/esm/{decode-DN6duCrB.js → decode-D7qCHcG0.js} +1 -1
  202. package/dist/esm/{index-Dfvjtz8r.js → index-BN5SjFfj.js} +1 -1
  203. package/dist/esm/{index-Bfvjs1z9.js → index-CsIh2jqb.js} +156 -101
  204. package/dist/esm/index.js +2 -2
  205. package/dist/esm/lido-avatar_22.entry.js +136 -54
  206. package/dist/esm/lido-player.js +3 -3
  207. package/dist/esm/loader.js +3 -3
  208. package/dist/lido-player/index.esm.js +1 -1
  209. package/dist/lido-player/lido-avatar.css +4 -4
  210. package/dist/lido-player/lido-avatar.tsx +207 -207
  211. package/dist/lido-player/lido-player.css +8 -10
  212. package/dist/lido-player/lido-player.esm.js +1 -1
  213. package/dist/lido-player/p-7df96366.entry.js +12 -0
  214. package/dist/lido-player/p-BN5SjFfj.js +2 -0
  215. package/dist/lido-player/{p-DngrRzrw.js → p-ByVuCyJv.js} +1 -1
  216. package/dist/lido-player/p-CHrXrDKb.js +1 -0
  217. package/dist/lido-player/readme.md +49 -49
  218. package/dist/types/components/canvas/lido-canvas.d.ts +2 -0
  219. package/dist/types/components/trace/lido-trace.d.ts +4 -1
  220. package/dist/types/components.d.ts +18 -0
  221. package/dist/types/types/json.d.ts +3 -3
  222. package/dist/types/utils/audioPlayer.d.ts +3 -0
  223. package/dist/types/utils/constants.d.ts +8 -2
  224. package/package.json +74 -74
  225. package/readme.md +113 -113
  226. package/dist/components/p-2ox8u4JO.js +0 -1
  227. package/dist/components/p-BHtfrGiU.js +0 -12
  228. package/dist/components/p-BsHyhW7k.js +0 -1
  229. package/dist/components/p-C5Gn0SKo.js +0 -1
  230. package/dist/components/p-C7tEzlkQ.js +0 -1
  231. package/dist/components/p-D-B1groh.js +0 -1
  232. package/dist/components/p-D_BBs_vA.js +0 -1
  233. package/dist/components/p-JN426a_v.js +0 -1
  234. package/dist/components/p-iNMFyxvU.js +0 -1
  235. package/dist/lido-player/p-94ee3a4f.entry.js +0 -12
  236. package/dist/lido-player/p-DXsy15Ek.js +0 -1
  237. package/dist/lido-player/p-Dfvjtz8r.js +0 -2
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2018
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2018
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Bt9s5WYs.js');
3
+ var index = require('./index-Qz_Mg9Ok.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  m.forEach(function (e) {
@@ -22,7 +22,7 @@ const NAMESPACE = 'lido-player';
22
22
  const BUILD = /* lido-player */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
23
23
 
24
24
  const globalScripts = () => {};
25
- const globalStyles = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+Bhai+2:wght@400..800&display=swap'); body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}*{user-select:none}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}.diagonal-target,.diagonal-drop *{transform:scale(0.8) !important;opacity:1 !important}.cloned-element{display:flex !important;position:absolute !important;filter:grayscale(100%);pointer-events:none}.removeShadow{box-shadow:0px 0px 0px 0px #ff8900 !important}.highlight-element{border:2px solid white;box-shadow:rgb(243, 77, 8) 0px 0px 40px !important}.drop-element.empty{border:4px dashed #f34d08 !important}.drop-element.filled{border:'none' !important}.drag-element{box-shadow:0px 15px 11px rgba(43, 0, 0, 0.3) !important}.drag-element.dropped{box-shadow:none !important}.click-element{background-color:var(--btn-bg-color, rgba(255, 172, 76, 1)) !important;box-shadow:var(--btn-shadow-px) var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;cursor:pointer;transition:box-shadow 0.1s ease-out, transform 0.2s ease-out;}.click-element:active{box-shadow:0px 0px 0px var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;transform:translateY(var(--btn-active));}.click-element:focus{outline:2px solid dodgerblue;outline-offset:3px}.after-drop-popup-container{width:200%;height:200%;background-color:rgba(0, 0, 0, 0.8);position:absolute;display:flex;flex-direction:row-reverse;align-items:center;justify-content:center !important;gap:80px}.after-drop-popup-drag-element{scale:1.5;border-radius:8px;transform:none !important;position:unset !important}.after-drop-popup-drop-element{scale:1.5;border:unset;border-radius:8px;transform:none !important;position:unset !important}@keyframes zoomFadeIn{0%{transform:scale(0.6);opacity:0}100%{transform:scale(1);opacity:1}}.zoom-fade-in{animation:zoomFadeIn 0.8s ease-out forwards}@keyframes zoomFadeOut{0%{transform:scale(1);opacity:1}100%{transform:scale(0.6);opacity:0}}.zoom-fade-out{animation:zoomFadeOut 0.8s ease-in forwards}.slide-numbers{width:70px;height:70px;border:1px solid #f57139;background-color:white;font-weight:500;color:#f57139;font-size:44px;border-radius:40px;display:flex;align-items:center;justify-content:center;font-family:'Baloo Bhai 2', serif}.slide-numbers-bottom{position:absolute;display:flex;justify-content:space-around;align-items:center;bottom:-25px;width:100%;height:50px}.slide-numbers-left{position:absolute;display:flex;flex-direction:column;justify-content:space-around;height:100%;width:50px;left:-25px;bottom:0px}.lido-speak-icon{width:56px;height:56px;position:absolute;top:-25px;right:-25px;z-index:10;background-image:url(\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/template/audioIcon.png\");background-color:white;border:4px solid #F34D08;border-radius:16px;box-shadow:0px 4px 0px 0px #F34D08;background-size:contain;background-repeat:no-repeat;cursor:pointer}.lido-speak-icon:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px !important}.lido-strong-shake{animation:strongShake 0.3s ease}.lido-scaled-shake{animation:scaledShake 0.6s ease-in-out}.lido-horizontal-shake{animation:horizontalShake 0.6s ease-in-out;border-radius:20px}.lido-vertical-shake{animation:verticalShake 0.6s ease-in-out;border-radius:20px}.lido-diagonal-shake{animation:diagonalShake 0.5s ease-in-out;border-radius:20px;will-change:transform}.lido-glow{animation:glowPulse 1s infinite alternate;transition:opacity 0.5s ease-in-out}.lido-box-highlight{animation:topToPlace 0.3s linear}.lido-display-hiddenvalue{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:80px;font-weight:1000;color:brown;-webkit-text-stroke:2px white;font-family:'Baloo Bhai 2', sans-serif;pointer-events:none}.lido-image-colorize{position:relative;display:inline-block}.lido-image-colorize::after{content:'';position:absolute;inset:0;background:var(--tint-color);mix-blend-mode:multiply;opacity:0.8;pointer-events:none;mask-image:var(--mask-url);mask-size:cover;mask-repeat:no-repeat;mask-position:center}.lido-tts-highlight-overlay{position:fixed;pointer-events:none;z-index:9999;background:linear-gradient(\r\n 180deg,\r\n rgba(255, 235, 59, 0.95),\r\n rgba(255, 214, 0, 0.95)\r\n );border-radius:6px;box-shadow:0 2px 6px rgba(0, 0, 0, 0.18),\r\n inset 0 -1px 0 rgba(255, 255, 255, 0.25);transition:left 55ms linear,\r\n top 55ms linear,\r\n width 55ms ease-out,\r\n height 55ms ease-out,\r\n opacity 80ms ease-out;opacity:0.95;will-change:transform, width, height}";
25
+ const globalStyles = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+Bhai+2:wght@400..800&display=swap'); body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}*{user-select:none}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}.diagonal-target,.diagonal-drop *{transform:scale(0.8) !important;opacity:1 !important}.cloned-element{display:flex !important;position:absolute !important;filter:grayscale(100%);pointer-events:none}.removeShadow{box-shadow:0px 0px 0px 0px #ff8900 !important}.highlight-element{border:2px solid white;box-shadow:rgb(243, 77, 8) 0px 0px 40px !important}.drop-element.empty{border:4px dashed #f34d08 !important}.drop-element.filled{border:'none' !important}.drag-element{box-shadow:0px 15px 11px rgba(43, 0, 0, 0.3) !important}.drag-element.dropped{box-shadow:none !important}.click-element{background-color:var(--btn-bg-color, rgba(255, 172, 76, 1)) !important;box-shadow:var(--btn-shadow-px) var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;cursor:pointer;transition:box-shadow 0.1s ease-out, transform 0.2s ease-out;}.click-element:active{box-shadow:0px 0px 0px var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;transform:translateY(var(--btn-active));}.click-element:focus{outline:2px solid dodgerblue;outline-offset:3px}.after-drop-popup-container{width:200%;height:200%;background-color:rgba(0, 0, 0, 0.8);position:absolute;display:flex;flex-direction:row-reverse;align-items:center;justify-content:center !important;gap:80px}.after-drop-popup-drag-element{scale:1.5;border-radius:8px;transform:none !important;position:unset !important}.after-drop-popup-drop-element{scale:1.5;border:unset;border-radius:8px;transform:none !important;position:unset !important}@keyframes zoomFadeIn{0%{transform:scale(0.6);opacity:0}100%{transform:scale(1);opacity:1}}.zoom-fade-in{animation:zoomFadeIn 0.8s ease-out forwards}@keyframes zoomFadeOut{0%{transform:scale(1);opacity:1}100%{transform:scale(0.6);opacity:0}}.zoom-fade-out{animation:zoomFadeOut 0.8s ease-in forwards}.slide-numbers{width:70px;height:70px;border:1px solid #f57139;background-color:white;font-weight:500;color:#f57139;font-size:44px;border-radius:40px;display:flex;align-items:center;justify-content:center;font-family:'Baloo Bhai 2', serif}.slide-numbers-bottom{position:absolute;display:flex;justify-content:space-around;align-items:center;bottom:-25px;width:100%;height:50px}.slide-numbers-left{position:absolute;display:flex;flex-direction:column;justify-content:space-around;height:100%;width:50px;left:-25px;bottom:0px}.lido-speak-icon{width:56px;height:56px;position:absolute;top:-25px;right:-25px;z-index:10;background-image:url(\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/template/audioIcon.png\");background-color:white;border:4px solid #F34D08;border-radius:16px;box-shadow:0px 4px 0px 0px #F34D08;background-size:contain;background-repeat:no-repeat;cursor:pointer}.lido-speak-icon:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px !important}.lido-strong-shake{animation:strongShake 0.3s ease}.lido-scaled-shake{animation:scaledShake 0.6s ease-in-out}.lido-horizontal-shake{animation:horizontalShake 0.6s ease-in-out;border-radius:20px}.lido-vertical-shake{animation:verticalShake 0.6s ease-in-out;border-radius:20px}.lido-diagonal-shake{animation:diagonalShake 0.5s ease-in-out;border-radius:20px;will-change:transform}.lido-glow{animation:glowPulse 1s infinite alternate;transition:opacity 0.5s ease-in-out}.lido-box-highlight{animation:topToPlace 0.3s linear}.lido-display-hiddenvalue{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:80px;font-weight:1000;color:brown;-webkit-text-stroke:2px white;font-family:'Baloo Bhai 2', sans-serif;pointer-events:none}.lido-image-colorize{position:relative;display:inline-block}.lido-image-colorize::after{content:'';position:absolute;inset:0;background:var(--tint-color);mix-blend-mode:multiply;opacity:0.8;pointer-events:none;mask-image:var(--mask-url);mask-size:cover;mask-repeat:no-repeat;mask-position:center}.lido-tts-highlight-overlay{position:fixed;left:0;top:0;pointer-events:none;z-index:9999;background:linear-gradient(\n 180deg,\n rgba(255, 235, 59, 0.95),\n rgba(255, 214, 0, 0.95)\n );border-radius:6px;box-shadow:0 2px 6px rgba(0, 0, 0, 0.18),\n inset 0 -1px 0 rgba(255, 255, 255, 0.25);transition:width 25ms ease-out,\n height 25ms ease-out,\n opacity 80ms ease-out;opacity:0.95;will-change:transform, width, height;contain:layout paint style}";
26
26
 
27
27
  /*
28
28
  Stencil Client Platform v4.43.4 | MIT Licensed | https://stenciljs.com
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index$1 = require('./index-Bsk4M2Qz.js');
3
+ var index$1 = require('./index-ChRpftJ2.js');
4
4
 
5
5
  const DragMapKey = 'lidoDragMap';
6
6
  const SelectedValuesKey = 'lidoSelectedValues';
@@ -22,6 +22,10 @@ const LIDO_COMMON_AUDIO_PATH = '__LIDO_COMMON_AUDIO_PATH__';
22
22
  const LIDO_COMMON_AUDIO_READY_EVENT = 'lidoCommonAudioPathReady';
23
23
  const TemplateID = 'template-id';
24
24
  const CalculatorOk = 'calculator-ok';
25
+ const MicroProblemEndKey = 'problemEnd';
26
+ const MicroLessonEndKey = 'lessonEnd';
27
+ const MicroGameEndKey = 'gameEnd';
28
+ const MicroGameExitKey = 'gameExit';
25
29
  exports.TraceMode = void 0;
26
30
  (function (TraceMode) {
27
31
  TraceMode["NoFlow"] = "noFlow";
@@ -32,6 +36,8 @@ exports.TraceMode = void 0;
32
36
  })(exports.TraceMode || (exports.TraceMode = {}));
33
37
  class GameScore {
34
38
  constructor() {
39
+ this.totalRightMovesCount = 0;
40
+ this.totalWrongMovesCount = 0;
35
41
  this.rightMoves = 0;
36
42
  this.wrongMoves = 0;
37
43
  this.finalScore = 0;
@@ -69,7 +75,7 @@ const FAST_WORDS_BY_LANG = {
69
75
  'तो', 'को',
70
76
  'है', 'था', 'थे',
71
77
  ]),
72
- 'ka': new Set([
78
+ 'kn': new Set([
73
79
  'ಅದು', 'ಇದು',
74
80
  'ನಲ್ಲಿ', 'ಮೇಲೆ',
75
81
  'ಮತ್ತು', 'ಇದೆ',
@@ -97,7 +103,7 @@ const LANGUAGE_PROFILES = {
97
103
  fastWordMultiplier: 0.9, // much weaker compression
98
104
  fastClusterMultiplier: 0.9,
99
105
  },
100
- 'ka': {
106
+ 'kn': {
101
107
  expectedWPM: 85,
102
108
  minWordMs: 35,
103
109
  syllableWeight: 1.75,
@@ -114,7 +120,7 @@ function dispatchCustomEvent(eventName, detail) {
114
120
  console.log("👍Event Name : ", eventName, "Detail : ", detail.toString());
115
121
  const event = new CustomEvent(eventName, { detail });
116
122
  window.dispatchEvent(event);
117
- if (eventName === ActivityEndKey || eventName === LessonEndKey || eventName === GameCompletedKey || eventName === GameExitKey) {
123
+ if (eventName === ActivityEndKey || eventName === LessonEndKey || eventName === GameCompletedKey || eventName === GameExitKey || eventName === MicroGameEndKey || eventName === MicroGameExitKey || eventName === MicroLessonEndKey || eventName === MicroProblemEndKey) {
118
124
  (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({
119
125
  eventName,
120
126
  detail: toSerializableDetail(detail),
@@ -133,8 +139,10 @@ function toSerializableDetail(detail) {
133
139
  }
134
140
  function dispatchActivityEndEvent(totalIndex, currentIndex, score, rightMoves, wrongMoves, timeSpentForActivity, lessonTrackingParams, gameCompleted) {
135
141
  dispatchCustomEvent(ActivityEndKey, Object.assign(Object.assign({ currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity }, lessonTrackingParams), { gameCompleted }));
142
+ dispatchCustomEvent(MicroProblemEndKey, Object.assign(Object.assign({ currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity }, lessonTrackingParams), { gameCompleted }));
136
143
  }
137
144
  function dispatchLessonEndEvent(totalIndex, rightMoves, wrongMoves, finalScore, timeSpendForLesson, lessonTrackingParams) {
145
+ dispatchCustomEvent(MicroLessonEndKey, Object.assign({ totalIndex, rightMoves, wrongMoves, finalScore, score: finalScore, timeSpendForLesson }, lessonTrackingParams));
138
146
  if (getLessonTrackingParams().end === "blank" || getLessonTrackingParams().end === "complete" || getLessonTrackingParams().end === "completed") {
139
147
  console.log("Lesson end event skipped. Reason: Lesson end type is set to 'blank' in lesson tracking parameters.");
140
148
  return;
@@ -148,9 +156,19 @@ function dispatchPrevContainerEvent() {
148
156
  dispatchCustomEvent(PrevContainerKey, {});
149
157
  }
150
158
  function dispatchGameCompletedEvent() {
159
+ dispatchCustomEvent(MicroGameEndKey, {});
160
+ if (getLessonTrackingParams().end === "blank" || getLessonTrackingParams().end === "complete" || getLessonTrackingParams().end === "completed") {
161
+ console.log("Game end event skipped. Reason: Lesson end type is set to 'blank' in lesson tracking parameters.");
162
+ return;
163
+ }
151
164
  dispatchCustomEvent(GameCompletedKey, {});
152
165
  }
153
166
  function dispatchGameExitEvent() {
167
+ dispatchCustomEvent(MicroGameExitKey, {});
168
+ if (getLessonTrackingParams().end === "blank" || getLessonTrackingParams().end === "complete" || getLessonTrackingParams().end === "completed") {
169
+ console.log("Game exit event skipped. Reason: Lesson end type is set to 'blank' in lesson tracking parameters.");
170
+ return;
171
+ }
154
172
  dispatchCustomEvent(GameExitKey, {});
155
173
  }
156
174
  function dispatchActivityChangeEvent(index) {
@@ -1096,14 +1114,14 @@ async function onClickDropOrDragElement(element, type) {
1096
1114
  if (!document.querySelector('#dynamic-highlight-style')) {
1097
1115
  const style = document.createElement('style');
1098
1116
  style.id = 'dynamic-highlight-style';
1099
- style.innerHTML = `
1100
- .highlight {
1101
- // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
1102
- // border-radius: 12px; /* Larger rounded corners */
1103
- // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
1104
- // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
1105
- // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
1106
- }
1117
+ style.innerHTML = `
1118
+ .highlight {
1119
+ // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
1120
+ // border-radius: 12px; /* Larger rounded corners */
1121
+ // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
1122
+ // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
1123
+ // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
1124
+ }
1107
1125
  `;
1108
1126
  document.head.appendChild(style);
1109
1127
  }
@@ -1206,8 +1224,8 @@ const appendingDragElementsInDrop = () => {
1206
1224
  if (isAllowOnlyCorrect === true) {
1207
1225
  if (drop['value'] === drag['value']) {
1208
1226
  drag.style.transform = 'translate(0,0)';
1209
- drag.style.width = "stretch";
1210
- drag.style.padding = '0';
1227
+ // drag.style.width = "stretch";
1228
+ // drag.style.padding = '0'
1211
1229
  drop.appendChild(drag);
1212
1230
  appendedDragIds.add(drag.id);
1213
1231
  drag.style.pointerEvents = 'none';
@@ -1293,34 +1311,34 @@ function highlightSpeakingElement(element) {
1293
1311
  if (!document.getElementById(styleId)) {
1294
1312
  const style = document.createElement('style');
1295
1313
  style.id = styleId;
1296
- style.innerHTML = `
1297
- .speaking-highlight {
1298
- --base-transform: ${element.style.transform};
1299
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1300
- // border: 3px solid green !important;
1301
- // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1302
- // transform: scale(1.05); /* Subtle scale effect to pop the element */
1303
- // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1304
-
1305
- }
1306
-
1307
- @keyframes pulseEffect {
1308
- 0% {
1309
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1310
- // transform: var(--base-transform) scale(1.05);
1311
- // background-color: #FFFF0B;
1312
- }
1313
- 50% {
1314
- box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1315
- // transform: var(--base-transform) scale(1.1);
1316
- // background-color: #FFFF0B;
1317
- }
1318
- 100% {
1319
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1320
- // transform: var(--base-transform) scale(1.05);
1321
- // background-color: #FFFF0B;
1322
- }
1323
- }
1314
+ style.innerHTML = `
1315
+ .speaking-highlight {
1316
+ --base-transform: ${element.style.transform};
1317
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1318
+ // border: 3px solid green !important;
1319
+ // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1320
+ // transform: scale(1.05); /* Subtle scale effect to pop the element */
1321
+ // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1322
+
1323
+ }
1324
+
1325
+ @keyframes pulseEffect {
1326
+ 0% {
1327
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1328
+ // transform: var(--base-transform) scale(1.05);
1329
+ // background-color: #FFFF0B;
1330
+ }
1331
+ 50% {
1332
+ box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1333
+ // transform: var(--base-transform) scale(1.1);
1334
+ // background-color: #FFFF0B;
1335
+ }
1336
+ 100% {
1337
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1338
+ // transform: var(--base-transform) scale(1.05);
1339
+ // background-color: #FFFF0B;
1340
+ }
1341
+ }
1324
1342
  `;
1325
1343
  document.head.appendChild(style);
1326
1344
  }
@@ -1551,26 +1569,18 @@ class AudioPlayer {
1551
1569
  this.audioElement.onended = null;
1552
1570
  // If word-by-word highlighting is enabled prepare timeline & rects
1553
1571
  if (isWordByWord) {
1554
- this.audioElement.onloadedmetadata = () => {
1555
- const durationMs = this.audioElement.duration * 1000;
1556
- const textContent = targetElement.textContent || '';
1557
- timeline = this.buildWordTimeline(textContent, durationMs, profile, language);
1558
- this.wordRects = this.computeWordRects(targetElement);
1559
- };
1572
+ await this.waitForAudioMetadata();
1573
+ const durationMs = this.audioElement.duration * 1000;
1574
+ const textContent = targetElement.textContent || '';
1575
+ timeline = this.buildWordTimeline(textContent, durationMs, profile, language);
1576
+ this.wordRects = this.computeWordRects(targetElement);
1560
1577
  }
1561
1578
  else {
1562
1579
  highlightSpeakingElement(targetElement);
1563
1580
  }
1564
1581
  // PLAY ONCE
1565
1582
  await this.audioElement.play();
1566
- // ensure metadata processed before overlay
1567
- if (isWordByWord && timeline.length === 0) {
1568
- await new Promise(resolve => {
1569
- this.audioElement.onloadedmetadata = () => resolve();
1570
- });
1571
- this.startOverlayHighlightLoop(timeline, profile);
1572
- }
1573
- else if (isWordByWord) {
1583
+ if (isWordByWord) {
1574
1584
  this.startOverlayHighlightLoop(timeline, profile);
1575
1585
  }
1576
1586
  // unified end
@@ -1684,17 +1694,6 @@ class AudioPlayer {
1684
1694
  }
1685
1695
  buildWordTimeline(text, totalDurationMs, profile, language) {
1686
1696
  const tokens = this.tokenize(text).filter(t => t.trim());
1687
- console.log('[buildTimeline] words:', tokens);
1688
- const expectedDurationMs = (tokens.length / profile.expectedWPM) * 60000;
1689
- let speedScale = 1;
1690
- // Only scale if mismatch is significant
1691
- if (expectedDurationMs > 0) {
1692
- const ratio = totalDurationMs / expectedDurationMs;
1693
- if (ratio > 1.15)
1694
- speedScale = 1.1; // audio slower
1695
- else if (ratio < 0.85)
1696
- speedScale = 0.9; // audio faster
1697
- }
1698
1697
  const weights = tokens.map((word, i) => {
1699
1698
  var _a, _b;
1700
1699
  const prev = (_a = tokens[i - 1]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
@@ -1720,8 +1719,6 @@ class AudioPlayer {
1720
1719
  let cursor = 0;
1721
1720
  const timeline = tokens.map((word, i) => {
1722
1721
  let duration = (weights[i] / totalWeight) * totalDurationMs;
1723
- // NEW: minimum readable duration
1724
- duration *= speedScale;
1725
1722
  duration = Math.max(profile.minWordMs, duration);
1726
1723
  const entry = {
1727
1724
  word,
@@ -1734,7 +1731,7 @@ class AudioPlayer {
1734
1731
  return entry;
1735
1732
  });
1736
1733
  const last = timeline[timeline.length - 1];
1737
- if (last && last.endMs > totalDurationMs) {
1734
+ if (last && last.endMs !== totalDurationMs) {
1738
1735
  const scale = totalDurationMs / last.endMs;
1739
1736
  timeline.forEach(t => {
1740
1737
  t.startMs *= scale;
@@ -1743,6 +1740,27 @@ class AudioPlayer {
1743
1740
  }
1744
1741
  return timeline;
1745
1742
  }
1743
+ waitForAudioMetadata() {
1744
+ if (Number.isFinite(this.audioElement.duration) && this.audioElement.duration > 0) {
1745
+ return Promise.resolve();
1746
+ }
1747
+ return new Promise((resolve, reject) => {
1748
+ const cleanup = () => {
1749
+ this.audioElement.removeEventListener('loadedmetadata', handleLoadedMetadata);
1750
+ this.audioElement.removeEventListener('error', handleError);
1751
+ };
1752
+ const handleLoadedMetadata = () => {
1753
+ cleanup();
1754
+ resolve();
1755
+ };
1756
+ const handleError = () => {
1757
+ cleanup();
1758
+ reject(new Error('Audio metadata failed to load'));
1759
+ };
1760
+ this.audioElement.addEventListener('loadedmetadata', handleLoadedMetadata, { once: true });
1761
+ this.audioElement.addEventListener('error', handleError, { once: true });
1762
+ });
1763
+ }
1746
1764
  ensureOverlay() {
1747
1765
  if (this.highlightOverlay)
1748
1766
  return;
@@ -1786,22 +1804,44 @@ class AudioPlayer {
1786
1804
  moveOverlay(rect) {
1787
1805
  if (!this.highlightOverlay)
1788
1806
  return;
1789
- this.highlightOverlay.style.left = `${rect.left}px`;
1790
- this.highlightOverlay.style.top = `${rect.top}px`;
1807
+ this.highlightOverlay.style.transform = `translate3d(${rect.left}px, ${rect.top}px, 0)`;
1791
1808
  this.highlightOverlay.style.width = `${rect.width}px`;
1792
1809
  this.highlightOverlay.style.height = `${rect.height}px`;
1793
1810
  }
1811
+ getHighlightLeadMs(timeline, profile) {
1812
+ if (!timeline.length)
1813
+ return profile.preemptiveOffsetMs;
1814
+ const duration = timeline[timeline.length - 1].endMs - timeline[0].startMs;
1815
+ const averageWordMs = duration / timeline.length;
1816
+ const speedLead = averageWordMs < 190 ? 120 : averageWordMs < 260 ? 90 : 60;
1817
+ return Math.max(profile.preemptiveOffsetMs, speedLead);
1818
+ }
1819
+ getTimelineIndex(timeline, currentMs) {
1820
+ if (!timeline.length)
1821
+ return -1;
1822
+ if (currentMs <= timeline[0].startMs)
1823
+ return 0;
1824
+ for (let i = 0; i < timeline.length; i++) {
1825
+ if (currentMs >= timeline[i].startMs && currentMs < timeline[i].endMs) {
1826
+ return i;
1827
+ }
1828
+ if (timeline[i + 1] && currentMs < timeline[i + 1].startMs) {
1829
+ return i;
1830
+ }
1831
+ }
1832
+ return timeline.length - 1;
1833
+ }
1794
1834
  startOverlayHighlightLoop(timeline, profile) {
1795
1835
  this.ensureOverlay();
1796
1836
  this.activeWordIndex = -1;
1837
+ const highlightLeadMs = this.getHighlightLeadMs(timeline, profile);
1797
1838
  const tick = () => {
1798
1839
  if (this.audioElement.paused || this.audioElement.ended) {
1799
1840
  this.stopOverlayHighlightLoop();
1800
1841
  return;
1801
1842
  }
1802
- const currentMs = this.audioElement.currentTime * 1000 + profile.preemptiveOffsetMs;
1803
- const index = timeline.findIndex(w => (currentMs + profile.smoothingMs >= w.startMs) &&
1804
- (currentMs - profile.smoothingMs < w.endMs));
1843
+ const currentMs = this.audioElement.currentTime * 1000 + highlightLeadMs;
1844
+ const index = this.getTimelineIndex(timeline, currentMs);
1805
1845
  // NEW: drift correction
1806
1846
  if (index >= 0 && this.activeWordIndex >= 0 && index - this.activeWordIndex >= 2) {
1807
1847
  const nextIndex = this.activeWordIndex + 1;
@@ -1990,11 +2030,11 @@ function enableReorderDrag(element) {
1990
2030
  onDropToCategory(element, category);
1991
2031
  }
1992
2032
  if (divEl) {
1993
- const keyframes = `
1994
- @keyframes widthDecrease {
1995
- 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
1996
- 100% { width: 0px; height: 0px;}
1997
- }
2033
+ const keyframes = `
2034
+ @keyframes widthDecrease {
2035
+ 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
2036
+ 100% { width: 0px; height: 0px;}
2037
+ }
1998
2038
  `;
1999
2039
  const styleSheet = document.styleSheets[0];
2000
2040
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -2207,11 +2247,11 @@ function moveWithAnimation(target, overlapped) {
2207
2247
  const dummy = createDummyElement(target);
2208
2248
  dummy.style.visibility = 'hidden';
2209
2249
  dummy.setAttribute('type', 'dummy');
2210
- const keyframes = `
2211
- @keyframes widthIncrease {
2212
- 0% { width: 0px; height: 0px; }
2213
- 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
2214
- }
2250
+ const keyframes = `
2251
+ @keyframes widthIncrease {
2252
+ 0% { width: 0px; height: 0px; }
2253
+ 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
2254
+ }
2215
2255
  `;
2216
2256
  if (!overlapped) {
2217
2257
  const overlapCategory = findMostoverlappedElement(target, 'category');
@@ -71842,14 +71882,14 @@ const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
71842
71882
  /* ------------------ animation ------------------ */
71843
71883
  const animationToRemoveEquationSolvedCellForNimbleTable = (activeCell, container) => {
71844
71884
  return new Promise((resolve) => {
71845
- const keyframes = `
71846
- @keyframes widthDecrease {
71847
- 0% {
71848
- background-color: ${activeCell.style.backgroundColor};
71849
- height: ${activeCell.style.height};
71850
- margin: ${activeCell.style.margin};
71851
- }
71852
- 100% { background-color: transparent; height: 0px; margin: 0px; }
71885
+ const keyframes = `
71886
+ @keyframes widthDecrease {
71887
+ 0% {
71888
+ background-color: ${activeCell.style.backgroundColor};
71889
+ height: ${activeCell.style.height};
71890
+ margin: ${activeCell.style.margin};
71891
+ }
71892
+ 100% { background-color: transparent; height: 0px; margin: 0px; }
71853
71893
  }`;
71854
71894
  const styleSheet = document.styleSheets[0];
71855
71895
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -72679,15 +72719,15 @@ const afterDropDragHandling = (dragElement, dropElement) => {
72679
72719
  dragElement.setAttribute('hasDummy', 'true');
72680
72720
  setTimeout(() => {
72681
72721
  dummyElement.style.pointerEvents = "";
72682
- }, 1000);
72722
+ }, 100);
72683
72723
  }
72684
72724
  dummyElement.setAttribute('id', dragElement.getAttribute('id'));
72685
72725
  dragElement.replaceWith(dummyElement);
72686
- const keyframes = `
72687
- @keyframes widthDecrease {
72688
- 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
72689
- 100% { width: 0px; height: 0px; margin: 0px;}
72690
- }
72726
+ const keyframes = `
72727
+ @keyframes widthDecrease {
72728
+ 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
72729
+ 100% { width: 0px; height: 0px; margin: 0px;}
72730
+ }
72691
72731
  `;
72692
72732
  if (!isInfinite) {
72693
72733
  dummyElement.style.width = element.style.width;
@@ -72883,6 +72923,8 @@ const calculateScore = () => {
72883
72923
  }
72884
72924
  const rightMoves = gameScore.rightMoves;
72885
72925
  const wrongMoves = gameScore.wrongMoves;
72926
+ gameScore.totalRightMovesCount += rightMoves;
72927
+ gameScore.totalWrongMovesCount += wrongMoves;
72886
72928
  let finalScore = Math.floor((rightMoves / (rightMoves + wrongMoves)) * 100);
72887
72929
  storeActivityScore(finalScore);
72888
72930
  gameScore.rightMoves = 0;
@@ -72899,6 +72941,11 @@ async function onActivityComplete(dragElement, dropElement) {
72899
72941
  // storing each activity score based on isCorrect for (all drag-drop events)
72900
72942
  // storingEachActivityScore(isCorrect);
72901
72943
  if (isCorrect) {
72944
+ if (dropElement.getAttribute('type') === "category") {
72945
+ gameScore.rightMoves += 1;
72946
+ console.log("Right Moves : ", gameScore.rightMoves);
72947
+ console.log("Wrong Moves : ", gameScore.wrongMoves);
72948
+ }
72902
72949
  const onCorrect = dropElement.getAttribute('onCorrect');
72903
72950
  if (onCorrect) {
72904
72951
  await executeActions(onCorrect, dropElement, dragElement);
@@ -72909,6 +72956,11 @@ async function onActivityComplete(dragElement, dropElement) {
72909
72956
  }
72910
72957
  }
72911
72958
  else {
72959
+ if (dropElement.getAttribute('type') === "category") {
72960
+ gameScore.wrongMoves += 1;
72961
+ console.log("Right Moves : ", gameScore.rightMoves);
72962
+ console.log("Wrong Moves : ", gameScore.wrongMoves);
72963
+ }
72912
72964
  const onInCorrect = dropElement.getAttribute('onInCorrect');
72913
72965
  if (onInCorrect) {
72914
72966
  await executeActions(onInCorrect, dropElement, dragElement);
@@ -72993,7 +73045,10 @@ const storeActivityScore = (score) => {
72993
73045
  console.log('Total Score : ', gameScore.finalScore);
72994
73046
  // window.dispatchEvent(new CustomEvent(LessonEndKey, { detail: { score: finalScore } }));
72995
73047
  const timeSpendForLesson = ACTIVYTY_TIME_SPEND_ARRAY.reduce((sum, current) => sum + current, 0);
72996
- dispatchLessonEndEvent(totalIndex, gameScore.rightMoves, gameScore.wrongMoves, finalScore, timeSpendForLesson, lessonTrackingParams);
73048
+ dispatchLessonEndEvent(totalIndex, gameScore.totalRightMovesCount, gameScore.totalWrongMovesCount, finalScore, timeSpendForLesson, lessonTrackingParams);
73049
+ gameScore.totalRightMovesCount = 0;
73050
+ gameScore.totalWrongMovesCount = 0;
73051
+ dispatchGameCompletedEvent();
72997
73052
  localStorage.removeItem(ActivityScoreKey);
72998
73053
  }
72999
73054
  };
@@ -73906,7 +73961,6 @@ exports.clearActiveZipAssets = clearActiveZipAssets;
73906
73961
  exports.commonjsGlobal = commonjsGlobal;
73907
73962
  exports.convertUrlToRelative = convertUrlToRelative;
73908
73963
  exports.dispatchActivityChangeEvent = dispatchActivityChangeEvent;
73909
- exports.dispatchGameCompletedEvent = dispatchGameCompletedEvent;
73910
73964
  exports.dispatchGameExitEvent = dispatchGameExitEvent;
73911
73965
  exports.equationCheck = equationCheck;
73912
73966
  exports.executeActions = executeActions;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Bt9s5WYs.js');
4
- require('./index-Bsk4M2Qz.js');
3
+ var index = require('./index-Qz_Mg9Ok.js');
4
+ require('./index-ChRpftJ2.js');
5
5
 
6
6
 
7
7