lido-player 0.0.2-beta-24 → 0.0.2-beta-26-dev

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 (240) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{decode-BCvdWRyT.js → decode-CE64w_Pc.js} +1 -1
  3. package/dist/cjs/{index-DjM03fsg.js → index-Cf9LHdIw.js} +238 -87
  4. package/dist/cjs/{index-DBCFoh1I.js → index-DnaH8sO-.js} +1 -1
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/lido-avatar_22.cjs.entry.js +214 -53
  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 +214 -214
  12. package/dist/collection/components/avatar/readme.md +49 -49
  13. package/dist/collection/components/calculator/lido-calculator.css +89 -89
  14. package/dist/collection/components/calculator/lido-calculator.js +2 -2
  15. package/dist/collection/components/canvas/lido-canvas.css +33 -33
  16. package/dist/collection/components/canvas/lido-canvas.js +1 -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 +34 -10
  22. package/dist/collection/components/container/lido-container.js +55 -9
  23. package/dist/collection/components/flashCard/lido-flash-card.css +72 -72
  24. package/dist/collection/components/flashCard/lido-flash-card.js +84 -15
  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 -309
  28. package/dist/collection/components/home/lido-home.js +38 -14
  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 +6 -6
  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/assets/Shadow.svg +9 -9
  43. package/dist/collection/components/scale/lido-balance.css +174 -174
  44. package/dist/collection/components/scale/lido-balance.js +13 -13
  45. package/dist/collection/components/shape/lido-shape.css +216 -216
  46. package/dist/collection/components/shape/lido-shape.js +6 -6
  47. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  48. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  49. package/dist/collection/components/text/lido-text.css +53 -53
  50. package/dist/collection/components/text/lido-text.js +6 -6
  51. package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -8
  52. package/dist/collection/components/trace/lido-trace.css +97 -97
  53. package/dist/collection/components/trace/lido-trace.js +2 -2
  54. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  55. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  56. package/dist/collection/css/animation.css +211 -211
  57. package/dist/collection/css/index.css +323 -323
  58. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
  59. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  60. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
  61. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
  62. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
  63. package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
  64. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  65. package/dist/collection/stories/Templates/blender/blender.stories.js +59 -59
  66. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  67. package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
  68. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  69. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  70. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
  71. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  72. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  73. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  74. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
  75. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  76. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  77. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  78. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  79. package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
  80. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  81. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  82. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  83. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  84. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
  85. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
  86. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  87. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  88. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
  89. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
  90. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
  91. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
  92. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
  93. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
  94. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
  95. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
  96. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
  97. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
  98. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  99. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
  100. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
  101. package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
  102. package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
  103. package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
  104. package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
  105. package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
  106. package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
  107. package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
  108. package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
  109. package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
  110. package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
  111. package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
  112. package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
  113. package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
  114. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
  115. package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
  116. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
  117. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
  118. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  119. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  120. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
  121. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  122. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  123. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  124. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +633 -633
  125. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  126. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
  127. package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
  128. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
  129. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
  130. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
  131. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
  132. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  133. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  134. package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
  135. package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
  136. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
  137. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
  138. package/dist/collection/stories/Templates/total/total.stories.js +28 -28
  139. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
  140. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
  141. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
  142. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
  143. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
  144. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
  145. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
  146. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  147. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  148. package/dist/collection/stories/components/slider.stories.js +4 -4
  149. package/dist/collection/stories/components/trace.stories.js +5 -5
  150. package/dist/collection/utils/audioPlayer.js +10 -3
  151. package/dist/collection/utils/constants.js +6 -0
  152. package/dist/collection/utils/utils.js +109 -14
  153. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +8 -8
  154. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  155. package/dist/collection/utils/utilsHandlers/slideHandler.js +58 -19
  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-B4iWvszS.js +1 -0
  181. package/dist/components/{p-C5jvgiPE.js → p-BA-XmR9g.js} +1 -1
  182. package/dist/components/p-BJt-z8VW.js +1 -0
  183. package/dist/components/{p-CTlcpv4a.js → p-BfwUqpXc.js} +1 -1
  184. package/dist/components/{p-DNo3iX_r.js → p-BiBt9LGP.js} +1 -1
  185. package/dist/components/{p-DG0KR2iN.js → p-BlN0IsR4.js} +1 -1
  186. package/dist/components/{p-CFPSty2U.js → p-BpVpANK9.js} +1 -1
  187. package/dist/components/{p-CgsPIpg0.js → p-Bw-OC9iR.js} +1 -1
  188. package/dist/components/p-C2J7-bcH.js +1 -0
  189. package/dist/components/{p-CFWohOId.js → p-CEmofYPx.js} +1 -1
  190. package/dist/components/{p-C5WmmkI6.js → p-CPYnt0P-.js} +1 -1
  191. package/dist/components/{p-CsDu4kiC.js → p-ChfVUoX4.js} +1 -1
  192. package/dist/components/p-CnQ-4EIw.js +1 -0
  193. package/dist/components/{p-CXHPZN3m.js → p-CyGxEcn7.js} +1 -1
  194. package/dist/components/{p-C-pHQRbp.js → p-D1cBkIab.js} +1 -1
  195. package/dist/components/p-DP6jQ5ML.js +1 -0
  196. package/dist/components/{p-Bv1hunWk.js → p-DV-k1ulI.js} +1 -1
  197. package/dist/components/p-Qhj9-H6e.js +12 -0
  198. package/dist/components/{p-Bh_vemY3.js → p-hUfX1As2.js} +1 -1
  199. package/dist/components/p-leIEepjl.js +1 -0
  200. package/dist/components/{p-B8nzzM8c.js → p-s4oGlKg6.js} +1 -1
  201. package/dist/components/{p-C70ykycD.js → p-useuhkjH.js} +1 -1
  202. package/dist/esm/{decode-BxzUG5XP.js → decode-DhjaTUf2.js} +1 -1
  203. package/dist/esm/{index-C_uxZLF-.js → index-Bc6Y7rds.js} +235 -88
  204. package/dist/esm/{index-mMpK8062.js → index-Dvjbti-h.js} +1 -1
  205. package/dist/esm/index.js +2 -2
  206. package/dist/esm/lido-avatar_22.entry.js +214 -53
  207. package/dist/esm/lido-player.js +3 -3
  208. package/dist/esm/loader.js +3 -3
  209. package/dist/lido-player/assets/Shadow.svg +9 -9
  210. package/dist/lido-player/assets/Tracing-hand.svg +8 -8
  211. package/dist/lido-player/index.esm.js +1 -1
  212. package/dist/lido-player/lido-avatar.css +4 -4
  213. package/dist/lido-player/lido-avatar.tsx +214 -214
  214. package/dist/lido-player/lido-player.css +7 -7
  215. package/dist/lido-player/lido-player.esm.js +1 -1
  216. package/dist/lido-player/{p-CsCr7DlS.js → p-CORilAH-.js} +1 -1
  217. package/dist/lido-player/p-D66K5DXn.js +1 -0
  218. package/dist/lido-player/p-Dvjbti-h.js +2 -0
  219. package/dist/lido-player/p-ca195982.entry.js +12 -0
  220. package/dist/lido-player/readme.md +49 -49
  221. package/dist/types/components/container/lido-container.d.ts +7 -0
  222. package/dist/types/components/flashCard/lido-flash-card.d.ts +2 -0
  223. package/dist/types/components.d.ts +1 -0
  224. package/dist/types/types/json.d.ts +3 -3
  225. package/dist/types/utils/audioPlayer.d.ts +1 -1
  226. package/dist/types/utils/constants.d.ts +2 -0
  227. package/dist/types/utils/utils.d.ts +11 -0
  228. package/dist/types/utils/utilsHandlers/slideHandler.d.ts +1 -1
  229. package/package.json +73 -73
  230. package/readme.md +113 -113
  231. package/dist/components/p-CgBwmr9A.js +0 -12
  232. package/dist/components/p-Ckb8QhUV.js +0 -1
  233. package/dist/components/p-DDwqmTYM.js +0 -1
  234. package/dist/components/p-DLyacZap.js +0 -1
  235. package/dist/components/p-DONbWJGn.js +0 -1
  236. package/dist/components/p-DXy70SGv.js +0 -1
  237. package/dist/components/p-Gwko4CTL.js +0 -1
  238. package/dist/lido-player/p-00993d1a.entry.js +0 -12
  239. package/dist/lido-player/p-mMpK8062.js +0 -2
  240. package/dist/lido-player/p-v3GBrpv9.js +0 -1
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-DjM03fsg.js');
3
+ var index = require('./index-Cf9LHdIw.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  m.forEach(function (e) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index$1 = require('./index-DBCFoh1I.js');
3
+ var index$1 = require('./index-DnaH8sO-.js');
4
4
 
5
5
  const DragMapKey = 'lidoDragMap';
6
6
  const SelectedValuesKey = 'lidoSelectedValues';
@@ -21,6 +21,12 @@ const DropTimeAttr = 'drop-time';
21
21
  const LidoContainer = 'lido-container';
22
22
  const LIDO_COMMON_AUDIO_PATH = '__LIDO_COMMON_AUDIO_PATH__';
23
23
  const LIDO_COMMON_AUDIO_READY_EVENT = 'lidoCommonAudioPathReady';
24
+ const GOOD_JOB_AUDIO_FILE = 'goodJob.mp3';
25
+ const resolveCommonAudioPath = (basePath, fileName) => {
26
+ if (!basePath || !fileName)
27
+ return undefined;
28
+ return `${basePath}/${fileName}`;
29
+ };
24
30
  const LIDO_INTERACTION_CLEANUP_EVENT = 'lido:interaction-cleanup';
25
31
  const TemplateID = 'template-id';
26
32
  const CalculatorOk = 'calculator-ok';
@@ -1351,14 +1357,14 @@ async function onClickDropOrDragElement(element, type) {
1351
1357
  if (!document.querySelector('#dynamic-highlight-style')) {
1352
1358
  const style = document.createElement('style');
1353
1359
  style.id = 'dynamic-highlight-style';
1354
- style.innerHTML = `
1355
- .highlight {
1356
- // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
1357
- // border-radius: 12px; /* Larger rounded corners */
1358
- // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
1359
- // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
1360
- // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
1361
- }
1360
+ style.innerHTML = `
1361
+ .highlight {
1362
+ // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
1363
+ // border-radius: 12px; /* Larger rounded corners */
1364
+ // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
1365
+ // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
1366
+ // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
1367
+ }
1362
1368
  `;
1363
1369
  document.head.appendChild(style);
1364
1370
  }
@@ -1546,34 +1552,34 @@ function highlightSpeakingElement(element) {
1546
1552
  if (!document.getElementById(styleId)) {
1547
1553
  const style = document.createElement('style');
1548
1554
  style.id = styleId;
1549
- style.innerHTML = `
1550
- .speaking-highlight {
1551
- --base-transform: ${element.style.transform};
1552
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1553
- // border: 3px solid green !important;
1554
- // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1555
- // transform: scale(1.05); /* Subtle scale effect to pop the element */
1556
- // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1557
-
1558
- }
1559
-
1560
- @keyframes pulseEffect {
1561
- 0% {
1562
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1563
- // transform: var(--base-transform) scale(1.05);
1564
- // background-color: #FFFF0B;
1565
- }
1566
- 50% {
1567
- box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1568
- // transform: var(--base-transform) scale(1.1);
1569
- // background-color: #FFFF0B;
1570
- }
1571
- 100% {
1572
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1573
- // transform: var(--base-transform) scale(1.05);
1574
- // background-color: #FFFF0B;
1575
- }
1576
- }
1555
+ style.innerHTML = `
1556
+ .speaking-highlight {
1557
+ --base-transform: ${element.style.transform};
1558
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1559
+ // border: 3px solid green !important;
1560
+ // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1561
+ // transform: scale(1.05); /* Subtle scale effect to pop the element */
1562
+ // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1563
+
1564
+ }
1565
+
1566
+ @keyframes pulseEffect {
1567
+ 0% {
1568
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1569
+ // transform: var(--base-transform) scale(1.05);
1570
+ // background-color: #FFFF0B;
1571
+ }
1572
+ 50% {
1573
+ box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1574
+ // transform: var(--base-transform) scale(1.1);
1575
+ // background-color: #FFFF0B;
1576
+ }
1577
+ 100% {
1578
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1579
+ // transform: var(--base-transform) scale(1.05);
1580
+ // background-color: #FFFF0B;
1581
+ }
1582
+ }
1577
1583
  `;
1578
1584
  document.head.appendChild(style);
1579
1585
  }
@@ -1749,7 +1755,7 @@ class AudioPlayer {
1749
1755
  return el;
1750
1756
  return el.closest('lido-text');
1751
1757
  }
1752
- async play(targetElement, suppressHighlight = false, playbackContext) {
1758
+ async play(targetElement, suppressHighlight = false, playbackContext, fallbackAudio) {
1753
1759
  this.registerVisibilityEvents();
1754
1760
  this.playbackHasStarted = false;
1755
1761
  if (!this.isWindowVisible()) {
@@ -1852,7 +1858,12 @@ class AudioPlayer {
1852
1858
  };
1853
1859
  });
1854
1860
  }
1855
- catch (error) { }
1861
+ catch (error) {
1862
+ if (fallbackAudio && fallbackAudio !== audioUrl) {
1863
+ targetElement.setAttribute('audio', fallbackAudio);
1864
+ await this.play(targetElement, suppressHighlight, playbackContext);
1865
+ }
1866
+ }
1856
1867
  finally {
1857
1868
  this.audioElement.onended = null;
1858
1869
  this.audioElement.onloadedmetadata = null;
@@ -2066,7 +2077,9 @@ class AudioPlayer {
2066
2077
  const duration = timeline[timeline.length - 1].endMs - timeline[0].startMs;
2067
2078
  const averageWordMs = duration / timeline.length;
2068
2079
  const speedLead = averageWordMs < 190 ? 120 : averageWordMs < 260 ? 90 : 60;
2069
- return Math.max(profile.preemptiveOffsetMs, speedLead);
2080
+ // Advance the estimated highlight slightly to compensate for perceived lag.
2081
+ const playbackLeadAdjustmentMs = 40;
2082
+ return Math.max(profile.preemptiveOffsetMs, speedLead) + playbackLeadAdjustmentMs;
2070
2083
  }
2071
2084
  getTimelineIndex(timeline, currentMs) {
2072
2085
  if (!timeline.length)
@@ -2282,11 +2295,11 @@ function enableReorderDrag(element) {
2282
2295
  onDropToCategory(element, category);
2283
2296
  }
2284
2297
  if (divEl) {
2285
- const keyframes = `
2286
- @keyframes widthDecrease {
2287
- 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
2288
- 100% { width: 0px; height: 0px;}
2289
- }
2298
+ const keyframes = `
2299
+ @keyframes widthDecrease {
2300
+ 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
2301
+ 100% { width: 0px; height: 0px;}
2302
+ }
2290
2303
  `;
2291
2304
  const styleSheet = document.styleSheets[0];
2292
2305
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -2509,11 +2522,11 @@ function moveWithAnimation(target, overlapped) {
2509
2522
  const dummy = createDummyElement(target);
2510
2523
  dummy.style.visibility = 'hidden';
2511
2524
  dummy.setAttribute('type', 'dummy');
2512
- const keyframes = `
2513
- @keyframes widthIncrease {
2514
- 0% { width: 0px; height: 0px; }
2515
- 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
2516
- }
2525
+ const keyframes = `
2526
+ @keyframes widthIncrease {
2527
+ 0% { width: 0px; height: 0px; }
2528
+ 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
2529
+ }
2517
2530
  `;
2518
2531
  if (!overlapped) {
2519
2532
  const overlapCategory = findMostoverlappedElement(target, 'category');
@@ -2739,6 +2752,7 @@ function slidingWithScaling(element) {
2739
2752
  };
2740
2753
  // Start observing the element
2741
2754
  observer.observe(parentElement, observerConfig);
2755
+ let mostOverlappedElement;
2742
2756
  const onMove = (event) => {
2743
2757
  if (!isDragging)
2744
2758
  return;
@@ -2759,12 +2773,14 @@ function slidingWithScaling(element) {
2759
2773
  // Get the dimensions and scale-corrected position of the container and element
2760
2774
  const containerRect = parentElement.getBoundingClientRect();
2761
2775
  const elementRect = element.getBoundingClientRect();
2762
- const numbers = element.style.transform.match(/-?\d+(\.\d+)?/g);
2763
- const result = numbers.map(Number);
2764
- const initialElementLeftPx = elementRect.left / parentElementScale - result[0];
2765
- const initialElementTopPx = elementRect.top - result[1];
2766
- const initialElementRightPx = elementRect.right / parentElementScale - result[0];
2767
- const initialElementBottomPx = elementRect.bottom - result[1];
2776
+ // Firefox serializes translate(x, 0) as translate(x), so parsing the
2777
+ // inline string can lose Y and produce NaN. Read the computed matrix instead.
2778
+ const transform = window.getComputedStyle(element).transform;
2779
+ const translation = new DOMMatrixReadOnly(transform === 'none' ? undefined : transform);
2780
+ const initialElementLeftPx = elementRect.left / parentElementScale - translation.m41;
2781
+ const initialElementTopPx = elementRect.top - translation.m42;
2782
+ const initialElementRightPx = elementRect.right / parentElementScale - translation.m41;
2783
+ const initialElementBottomPx = elementRect.bottom - translation.m42;
2768
2784
  const maxRight = containerRect.right - initialElementRightPx;
2769
2785
  const maxLeft = containerRect.left - initialElementLeftPx;
2770
2786
  const maxTop = containerRect.top - initialElementTopPx;
@@ -2774,7 +2790,7 @@ function slidingWithScaling(element) {
2774
2790
  // Apply transform with translation within boundaries
2775
2791
  element.style.transform = `translate(${newLeftClamp}px, ${newTopClamp}px)`;
2776
2792
  // Check for overlaps and highlight only the most overlapping element
2777
- let mostOverlappedElement = findMostoverlappedElement$1(element, 'slide');
2793
+ mostOverlappedElement = findMostoverlappedElement$1(element, 'slide');
2778
2794
  // Apply styles only to the most overlapped element
2779
2795
  if (mostOverlappedElement) {
2780
2796
  if (mostOverlappedElement != element) {
@@ -2835,6 +2851,7 @@ function slidingWithScaling(element) {
2835
2851
  setTimeout(() => {
2836
2852
  if (overlapElement) {
2837
2853
  void slideCompleted(element);
2854
+ updateReorderCorrectness(container, element, mostOverlappedElement);
2838
2855
  overlapElement = false;
2839
2856
  }
2840
2857
  }, 300);
@@ -2877,18 +2894,50 @@ const isArrangeLettersComplete = (slideValues, objectiveString) => {
2877
2894
  return slideValues.length === objectiveValues.length
2878
2895
  && slideValues.every((value, index) => value === objectiveValues[index]);
2879
2896
  };
2880
- const updateReorderCorrectness = (container, slideValues, objectiveValues) => {
2881
- const slideElements = Array.from(container.querySelectorAll('[type="slide"]'));
2882
- slideElements.forEach((element, index) => {
2883
- const isCorrect = index < objectiveValues.length && slideValues[index] === objectiveValues[index].trim();
2884
- if (isCorrect) {
2885
- applyBorderToClickableCell(element, '#65BC46');
2886
- }
2887
- else {
2888
- element.style.removeProperty('box-shadow');
2889
- }
2890
- });
2897
+ const updateReorderCorrectness = (container, slideElement, overlappedElement) => {
2898
+ const allSlideElements = Array.from(container.querySelectorAll('[type="slide"]'));
2899
+ const elementIndex = allSlideElements.indexOf(slideElement);
2900
+ const overlappedElementIndex = allSlideElements.indexOf(overlappedElement);
2901
+ const objectiveString = document.getElementById(LidoContainer)['objective'];
2902
+ const objectiveArray = objectiveString.split(',');
2903
+ const slideValues = getSlideValuesForValidation(container, allSlideElements);
2904
+ const isCorrect = elementIndex >= 0 && elementIndex < objectiveArray.length
2905
+ ? matchStringPattern(slideValues[elementIndex], [objectiveArray[elementIndex].trim()])
2906
+ : false;
2907
+ const isCorrectOverlap = overlappedElementIndex >= 0 && overlappedElementIndex < objectiveArray.length
2908
+ ? matchStringPattern(slideValues[overlappedElementIndex], [objectiveArray[overlappedElementIndex].trim()])
2909
+ : false;
2910
+ if (isCorrect && isCorrectOverlap) {
2911
+ updateElementCategoryClass(slideElement, true);
2912
+ updateElementCategoryClass(overlappedElement, true);
2913
+ }
2914
+ else if (isCorrect) {
2915
+ updateElementCategoryClass(slideElement, true);
2916
+ updateElementCategoryClass(overlappedElement, false);
2917
+ }
2918
+ else if (isCorrectOverlap) {
2919
+ updateElementCategoryClass(slideElement, false);
2920
+ updateElementCategoryClass(overlappedElement, true);
2921
+ }
2922
+ else {
2923
+ updateElementCategoryClass(slideElement, false);
2924
+ updateElementCategoryClass(overlappedElement, false);
2925
+ }
2891
2926
  };
2927
+ function updateElementCategoryClass(element, isCorrect) {
2928
+ if (!element)
2929
+ return;
2930
+ const correctClass = 'category-dropped-onCorrect';
2931
+ const incorrectClass = 'category-dropped-onInCorrect';
2932
+ if (isCorrect) {
2933
+ element.classList.add(correctClass);
2934
+ element.classList.remove(incorrectClass);
2935
+ }
2936
+ else {
2937
+ element.classList.add(incorrectClass);
2938
+ element.classList.remove(correctClass);
2939
+ }
2940
+ }
2892
2941
  const isReorderComplete = (slideValues, objectiveString) => {
2893
2942
  if (!objectiveString)
2894
2943
  return false;
@@ -2916,7 +2965,10 @@ const slideCompleted = async (slideElement) => {
2916
2965
  updateArrangeLettersCorrectness(container, slideValues, objectiveArray);
2917
2966
  }
2918
2967
  else if (isReorderContainer(container)) {
2919
- updateReorderCorrectness(container, slideValues, objectiveArray);
2968
+ if (isReorderComplete(slideValues, objectiveString)) {
2969
+ allSlideElements.forEach(item => updateElementCategoryClass(item, true));
2970
+ }
2971
+ // updateReorderCorrectness(container, slideValues, objectiveArray);
2920
2972
  }
2921
2973
  if (container.getAttribute('is-continue-on-correct') === 'true') {
2922
2974
  storingEachActivityScore(true);
@@ -32022,15 +32074,15 @@ function _typeof(o) {
32022
32074
  }, _typeof(o);
32023
32075
  }
32024
32076
 
32025
- function toPrimitive(t, e) {
32077
+ function toPrimitive(t, r) {
32026
32078
  if ("object" != _typeof(t) || !t) return t;
32027
- var r;
32028
- if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
32029
- var i = r.call(t, e);
32079
+ var e = t[Symbol.toPrimitive];
32080
+ if (void 0 !== e) {
32081
+ var i = e.call(t, r);
32030
32082
  if ("object" != _typeof(i)) return i;
32031
32083
  throw new TypeError("@@toPrimitive must return a primitive value.");
32032
32084
  }
32033
- return ("string" === e ? String : Number)(t);
32085
+ return ("string" === r ? String : Number)(t);
32034
32086
  }
32035
32087
 
32036
32088
  function toPropertyKey(t) {
@@ -72841,6 +72893,44 @@ class Timer {
72841
72893
  let ACTIVYTY_TIME_SPEND_ARRAY = [];
72842
72894
 
72843
72895
  const gameScore = new GameScore();
72896
+ const GOOD_JOB_TEMPLATES = new Set(['flashcardtemplate', 'writeCard', 'drawShape', 'storyTale']);
72897
+ const isGoodJobAudioTarget = (element) => {
72898
+ var _a;
72899
+ const templateId = (_a = element === null || element === void 0 ? void 0 : element.closest('lido-container')) === null || _a === void 0 ? void 0 : _a.getAttribute('template-id');
72900
+ if (!GOOD_JOB_TEMPLATES.has(templateId || ''))
72901
+ return false;
72902
+ if ((element === null || element === void 0 ? void 0 : element.id) === 'arrow')
72903
+ return true;
72904
+ return templateId === 'storyTale' && (element === null || element === void 0 ? void 0 : element.id) === 'arrow1' && !!element.closest('#arrow');
72905
+ };
72906
+ const resetGoodJobAudioTracking = (home) => {
72907
+ home.__lidoGoodJobTemplates = new Set();
72908
+ };
72909
+ const shouldPlayGoodJobAudio = (element) => {
72910
+ var _a;
72911
+ if (!isGoodJobAudioTarget(element))
72912
+ return false;
72913
+ // Standalone templates and editor previews have no lesson host. Preserve
72914
+ // their existing behavior rather than making them depend on lido-home.
72915
+ const home = element.closest('lido-home');
72916
+ if (!home)
72917
+ return true;
72918
+ const templateId = (_a = element.closest('lido-container')) === null || _a === void 0 ? void 0 : _a.getAttribute('template-id');
72919
+ if (!templateId)
72920
+ return true;
72921
+ const played = home.__lidoGoodJobTemplates || (home.__lidoGoodJobTemplates = new Set());
72922
+ if (played.has(templateId))
72923
+ return false;
72924
+ played.add(templateId);
72925
+ return true;
72926
+ };
72927
+ const getGoodJobAudio = (element) => {
72928
+ if (!element)
72929
+ return undefined;
72930
+ if (!isGoodJobAudioTarget(element))
72931
+ return undefined;
72932
+ return resolveCommonAudioPath(window[LIDO_COMMON_AUDIO_PATH], GOOD_JOB_AUDIO_FILE);
72933
+ };
72844
72934
  function buildDragSelectedMapFromDOM() {
72845
72935
  const map = {};
72846
72936
  const draggedEls = document.querySelectorAll(`[${DropToAttr}]`);
@@ -72973,6 +73063,22 @@ const initEventsForElement = async (element, type) => {
72973
73063
  }
72974
73064
  onTouchListenerForOnTouch(element);
72975
73065
  };
73066
+ /**
73067
+ * Re-enable the gameplay handlers for interactive children that were created
73068
+ * while the player was in edit mode. This is intentionally limited to the
73069
+ * drag/drop elements used by Food Jar; other templates retain their existing
73070
+ * component-load initialization path.
73071
+ */
73072
+ const initializePlayModeDragDropElements = async (root) => {
73073
+ const elements = root.querySelectorAll('[type="drag"], [type="drop"]');
73074
+ for (const element of Array.from(elements)) {
73075
+ const type = element.getAttribute('type') || undefined;
73076
+ const initializedElement = element;
73077
+ if (initializedElement.__lidoInitializationKey === `${type || ''}:true`)
73078
+ continue;
73079
+ await initEventsForElement(element, type);
73080
+ }
73081
+ };
72976
73082
  // Function to execute actions parsed from the onMatch string
72977
73083
  const executeActions = async (actionsString, thisElement, element, options = {}) => {
72978
73084
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -73046,7 +73152,21 @@ const executeActions = async (actionsString, thisElement, element, options = {})
73046
73152
  const val = (action.value || '').toString().trim().toLowerCase();
73047
73153
  if (val === 'true' || val === '1' || val === 'yes') {
73048
73154
  try {
73049
- await AudioPlayer.getI().play(targetElement);
73155
+ if (isGoodJobAudioTarget(targetElement) && !shouldPlayGoodJobAudio(targetElement))
73156
+ break;
73157
+ const isGoodJobTarget = isGoodJobAudioTarget(targetElement);
73158
+ const currentAudio = targetElement.getAttribute('audio') || undefined;
73159
+ const originalAudio = isGoodJobTarget
73160
+ ? (targetElement.getAttribute('data-lido-original-audio') || currentAudio)
73161
+ : currentAudio;
73162
+ const localizedAudio = getGoodJobAudio(targetElement);
73163
+ if (localizedAudio) {
73164
+ if (currentAudio && !targetElement.hasAttribute('data-lido-original-audio')) {
73165
+ targetElement.setAttribute('data-lido-original-audio', currentAudio);
73166
+ }
73167
+ targetElement.setAttribute('audio', localizedAudio);
73168
+ }
73169
+ await AudioPlayer.getI().play(targetElement, false, undefined, originalAudio);
73050
73170
  }
73051
73171
  catch (err) {
73052
73172
  console.error('Error playing audio for speak action:', err);
@@ -73256,12 +73376,25 @@ const afterDropDragHandling = (dragElement, dropElement) => {
73256
73376
  const element = dragElement;
73257
73377
  const isAppend = container.getAttribute('drop-action') === exports.DropAction.Move;
73258
73378
  const isInfinite = container.getAttribute('drop-action') === exports.DropAction.InfiniteDrop;
73379
+ const isCreateSentence = container.getAttribute('template-id') === 'createSentence';
73380
+ // Reserve the source slot synchronously so an overlapping drag sees the
73381
+ // updated source layout before the dropped element is reparented.
73382
+ let sourcePlaceholder = null;
73383
+ if (isAppend && isCreateSentence) {
73384
+ const computedStyle = window.getComputedStyle(dragElement);
73385
+ sourcePlaceholder = document.createElement('div');
73386
+ sourcePlaceholder.style.width = `${dragElement.offsetWidth}px`;
73387
+ sourcePlaceholder.style.height = `${dragElement.offsetHeight}px`;
73388
+ sourcePlaceholder.style.margin = computedStyle.margin;
73389
+ sourcePlaceholder.style.visibility = 'hidden';
73390
+ dragElement.replaceWith(sourcePlaceholder);
73391
+ }
73259
73392
  if (isAppend || isInfinite) {
73260
- setTimeout(() => {
73393
+ const finishDrop = () => {
73261
73394
  var _a, _b;
73262
73395
  dragElement.style.transform = 'translate(0,0)';
73263
73396
  dragElement.style.transition = '';
73264
- let dummyElement = document.createElement('div');
73397
+ let dummyElement = sourcePlaceholder || document.createElement('div');
73265
73398
  if (isInfinite) {
73266
73399
  dummyElement = cloneElementWithComputedStyles(dragElement);
73267
73400
  dummyElement.classList.remove('dropped');
@@ -73276,17 +73409,25 @@ const afterDropDragHandling = (dragElement, dropElement) => {
73276
73409
  }, 100);
73277
73410
  }
73278
73411
  dummyElement.setAttribute('id', dragElement.getAttribute('id'));
73279
- dragElement.replaceWith(dummyElement);
73280
- const keyframes = `
73281
- @keyframes widthDecrease {
73282
- 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
73283
- 100% { width: 0px; height: 0px; margin: 0px;}
73284
- }
73412
+ if (!sourcePlaceholder) {
73413
+ dragElement.replaceWith(dummyElement);
73414
+ }
73415
+ const keyframes = `
73416
+ @keyframes widthDecrease {
73417
+ 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
73418
+ 100% { width: 0px; height: 0px; margin: 0px;}
73419
+ }
73285
73420
  `;
73286
73421
  if (!isInfinite) {
73287
- dummyElement.style.width = element.style.width;
73288
- dummyElement.style.height = element.style.height;
73289
- dummyElement.style.margin = element.style.margin;
73422
+ dummyElement.style.width = sourcePlaceholder
73423
+ ? sourcePlaceholder.style.width
73424
+ : element.style.width;
73425
+ dummyElement.style.height = sourcePlaceholder
73426
+ ? sourcePlaceholder.style.height
73427
+ : element.style.height;
73428
+ dummyElement.style.margin = sourcePlaceholder
73429
+ ? sourcePlaceholder.style.margin
73430
+ : element.style.margin;
73290
73431
  const styleSheet = document.styleSheets[0];
73291
73432
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
73292
73433
  dummyElement.style.animation = `widthDecrease 0.5s`;
@@ -73316,7 +73457,13 @@ const afterDropDragHandling = (dragElement, dropElement) => {
73316
73457
  const scaledLeft = (dropCenterX - dragCenterX) / containerScale;
73317
73458
  const scaledTop = (dropCenterY - dragCenterY) / containerScale;
73318
73459
  dragElement.style.transform = `translate(${scaledLeft}px, ${scaledTop}px)`;
73319
- }, 700);
73460
+ };
73461
+ if (isAppend && isCreateSentence) {
73462
+ finishDrop();
73463
+ }
73464
+ else {
73465
+ setTimeout(finishDrop, 700);
73466
+ }
73320
73467
  }
73321
73468
  };
73322
73469
  // function cloneElementWithComputedStyles(originalEl: HTMLElement): HTMLElement {
@@ -74579,19 +74726,23 @@ exports.fraction = fraction;
74579
74726
  exports.generateUUIDFallback = generateUUIDFallback;
74580
74727
  exports.getCancelBtnPopup = getCancelBtnPopup;
74581
74728
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
74729
+ exports.getGoodJobAudio = getGoodJobAudio;
74582
74730
  exports.handleElementClick = handleElementClick;
74583
74731
  exports.handleFloatElementPosition = handleFloatElementPosition;
74584
74732
  exports.handlingChildElements = handlingChildElements;
74585
74733
  exports.highlightElement = highlightElement;
74586
74734
  exports.initEventsForElement = initEventsForElement;
74735
+ exports.initializePlayModeDragDropElements = initializePlayModeDragDropElements;
74587
74736
  exports.matchStringPattern = matchStringPattern;
74588
74737
  exports.nextUrl = nextUrl;
74589
74738
  exports.parseProp = parseProp;
74590
74739
  exports.prevUrl = prevUrl;
74591
74740
  exports.resetFloatState = resetFloatState;
74741
+ exports.resetGoodJobAudioTracking = resetGoodJobAudioTracking;
74592
74742
  exports.setActiveZipAssets = setActiveZipAssets;
74593
74743
  exports.setCancelBtnPopup = setCancelBtnPopup;
74594
74744
  exports.setVisibilityWithDelay = setVisibilityWithDelay;
74745
+ exports.shouldPlayGoodJobAudio = shouldPlayGoodJobAudio;
74595
74746
  exports.speakIcon = speakIcon;
74596
74747
  exports.speakUrl = speakUrl;
74597
74748
  exports.stopHighlightForSpeakingElement = stopHighlightForSpeakingElement;
@@ -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 = "@font-face{font-family:'Baloo Bhai 2';font-style:normal;font-weight:400 800;font-display:swap;src:url('../assets/offline-assets/fonts/Baloo-Bhai-2/Baloo-Bhai-2-Variable.woff2') format('woff2')}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-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}.category-dropped-onCorrect{box-shadow:rgba(129, 193, 39, 1) 0px 8px 8px 0px !important}.category-dropped-onInCorrect{box-shadow:rgba(255, 4, 16, 1) 0px 8px 8px 0px !important}";
25
+ const globalStyles = "@font-face{font-family:'Baloo Bhai 2';font-style:normal;font-weight:400 800;font-display:swap;src:url('../assets/offline-assets/fonts/Baloo-Bhai-2/Baloo-Bhai-2-Variable.woff2') format('woff2')}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-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(\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:width 25ms ease-out,\r\n height 25ms ease-out,\r\n opacity 80ms ease-out;opacity:0.95;will-change:transform, width, height;contain:layout paint style}.category-dropped-onCorrect{box-shadow:rgba(129, 193, 39, 1) 0px 8px 8px 0px !important}.category-dropped-onInCorrect{box-shadow:rgba(255, 4, 16, 1) 0px 8px 8px 0px !important}";
26
26
 
27
27
  /*
28
28
  Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DjM03fsg.js');
4
- require('./index-DBCFoh1I.js');
3
+ var index = require('./index-Cf9LHdIw.js');
4
+ require('./index-DnaH8sO-.js');
5
5
 
6
6
 
7
7