lido-player 0.0.2-beta-19-dev → 0.0.2-beta-22-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 (237) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{decode-Bny56MQ9.js → decode-Cr5DANqc.js} +1 -1
  3. package/dist/cjs/{index-BY9fvbr8.js → index-0BvcfeCt.js} +144 -68
  4. package/dist/cjs/{index-DjsCseV8.js → index-DnaH8sO-.js} +20 -67
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/lido-avatar_22.cjs.entry.js +279 -66
  7. package/dist/cjs/lido-player.cjs.js +3 -3
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/collection/collection-manifest.json +1 -1
  10. package/dist/collection/components/avatar/lido-avatar.css +4 -4
  11. package/dist/collection/components/avatar/lido-avatar.js +1 -1
  12. package/dist/collection/components/avatar/lido-avatar.tsx +207 -207
  13. package/dist/collection/components/avatar/readme.md +49 -49
  14. package/dist/collection/components/calculator/lido-calculator.css +89 -89
  15. package/dist/collection/components/calculator/lido-calculator.js +2 -2
  16. package/dist/collection/components/canvas/lido-canvas.css +33 -33
  17. package/dist/collection/components/canvas/lido-canvas.js +1 -1
  18. package/dist/collection/components/cell/lido-cell.css +100 -100
  19. package/dist/collection/components/cell/lido-cell.js +12 -12
  20. package/dist/collection/components/column/lido-col.css +19 -19
  21. package/dist/collection/components/column/lido-col.js +6 -6
  22. package/dist/collection/components/container/lido-container.css +10 -10
  23. package/dist/collection/components/container/lido-container.js +8 -8
  24. package/dist/collection/components/flashCard/lido-flash-card.css +46 -28
  25. package/dist/collection/components/flashCard/lido-flash-card.js +131 -14
  26. package/dist/collection/components/float/lido-float.css +30 -30
  27. package/dist/collection/components/float/lido-float.js +2 -2
  28. package/dist/collection/components/home/lido-home.css +309 -309
  29. package/dist/collection/components/home/lido-home.js +9 -6
  30. package/dist/collection/components/image/lido-image.css +17 -17
  31. package/dist/collection/components/image/lido-image.js +6 -6
  32. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  33. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  34. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  35. package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
  36. package/dist/collection/components/position/lido-pos.css +16 -16
  37. package/dist/collection/components/position/lido-pos.js +2 -2
  38. package/dist/collection/components/random/lido-random.css +8 -8
  39. package/dist/collection/components/random/lido-random.js +2 -2
  40. package/dist/collection/components/root/lido-root.js +5 -5
  41. package/dist/collection/components/row/lido-row.css +10 -10
  42. package/dist/collection/components/row/lido-row.js +6 -6
  43. package/dist/collection/components/scale/assets/Shadow.svg +9 -9
  44. package/dist/collection/components/scale/lido-balance.css +174 -145
  45. package/dist/collection/components/scale/lido-balance.js +54 -14
  46. package/dist/collection/components/shape/lido-shape.css +216 -216
  47. package/dist/collection/components/shape/lido-shape.js +6 -6
  48. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  49. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  50. package/dist/collection/components/text/lido-text.css +53 -53
  51. package/dist/collection/components/text/lido-text.js +5 -5
  52. package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -8
  53. package/dist/collection/components/trace/lido-trace.css +97 -97
  54. package/dist/collection/components/trace/lido-trace.js +119 -23
  55. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  56. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  57. package/dist/collection/css/animation.css +211 -211
  58. package/dist/collection/css/index.css +323 -323
  59. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
  60. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  61. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
  62. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
  63. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
  64. package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
  65. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  66. package/dist/collection/stories/Templates/blender/blender.stories.js +59 -59
  67. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  68. package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
  69. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  70. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  71. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
  72. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  73. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  74. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  75. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
  76. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  77. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  78. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  79. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  80. package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
  81. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  82. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  83. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  84. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  85. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
  86. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
  87. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  88. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  89. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
  90. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
  91. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
  92. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
  93. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
  94. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
  95. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
  96. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
  97. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
  98. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
  99. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  100. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
  101. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
  102. package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
  103. package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
  104. package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
  105. package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
  106. package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
  107. package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
  108. package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
  109. package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
  110. package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
  111. package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
  112. package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
  113. package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
  114. package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
  115. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
  116. package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
  117. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
  118. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
  119. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  120. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  121. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
  122. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  123. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  124. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  125. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +631 -631
  126. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  127. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
  128. package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
  129. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
  130. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
  131. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
  132. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
  133. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  134. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  135. package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
  136. package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
  137. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
  138. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
  139. package/dist/collection/stories/Templates/total/total.stories.js +28 -28
  140. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
  141. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
  142. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
  143. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
  144. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
  145. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
  146. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
  147. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  148. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  149. package/dist/collection/stories/components/slider.stories.js +4 -4
  150. package/dist/collection/stories/components/trace.stories.js +5 -5
  151. package/dist/collection/utils/audioPlayer.js +9 -12
  152. package/dist/collection/utils/utils.js +24 -8
  153. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +16 -10
  154. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  155. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +58 -1
  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-keyboard.js +1 -1
  169. package/dist/components/lido-math-matrix.js +1 -1
  170. package/dist/components/lido-pos.js +1 -1
  171. package/dist/components/lido-random.js +1 -1
  172. package/dist/components/lido-root.js +1 -1
  173. package/dist/components/lido-row.js +1 -1
  174. package/dist/components/lido-shape.js +1 -1
  175. package/dist/components/lido-slide-fill.js +1 -1
  176. package/dist/components/lido-text.js +1 -1
  177. package/dist/components/lido-trace.js +1 -1
  178. package/dist/components/lido-wrap.js +1 -1
  179. package/dist/components/{p-BOQDbCrm.js → p-BJiyBHYT.js} +1 -1
  180. package/dist/components/p-BUfCIPRa.js +1 -0
  181. package/dist/components/{p-CTlcpv4a.js → p-BfwUqpXc.js} +1 -1
  182. package/dist/components/p-BiBt9LGP.js +1 -0
  183. package/dist/components/{p-CgsPIpg0.js → p-Bw-OC9iR.js} +1 -1
  184. package/dist/components/{p-B4YAipq-.js → p-CFzvgrMa.js} +1 -1
  185. package/dist/components/{p-C5WmmkI6.js → p-CPYnt0P-.js} +1 -1
  186. package/dist/components/{p-CCR42e0i.js → p-ChfVUoX4.js} +1 -1
  187. package/dist/components/{p-CWwymnbk.js → p-CkxAm8rY.js} +2 -2
  188. package/dist/components/{p-BeRr8u5m.js → p-CwDTdXe5.js} +1 -1
  189. package/dist/components/{p-CXHPZN3m.js → p-CyGxEcn7.js} +1 -1
  190. package/dist/components/{p-BJMjg5wu.js → p-D2GhaM-T.js} +1 -1
  191. package/dist/components/{p-BBHM059l.js → p-DDS30M3y.js} +1 -1
  192. package/dist/components/p-DP6jQ5ML.js +1 -0
  193. package/dist/components/{p-CljvnHkI.js → p-DZRNZCPt.js} +1 -1
  194. package/dist/components/p-DbR5sNOj.js +1 -0
  195. package/dist/components/{p-B8nzzM8c.js → p-DdQ1eqJr.js} +1 -1
  196. package/dist/components/p-leIEepjl.js +1 -0
  197. package/dist/components/p-u3czV7QM.js +1 -0
  198. package/dist/components/{p-C70ykycD.js → p-useuhkjH.js} +1 -1
  199. package/dist/esm/{decode-Buyq-Iy5.js → decode-DkSXjv7K.js} +1 -1
  200. package/dist/esm/{index-CQXciux9.js → index-D9-TTsdZ.js} +144 -68
  201. package/dist/esm/{index-DQZfuGjI.js → index-Dvjbti-h.js} +20 -67
  202. package/dist/esm/index.js +2 -2
  203. package/dist/esm/lido-avatar_22.entry.js +279 -66
  204. package/dist/esm/lido-player.js +4 -4
  205. package/dist/esm/loader.js +3 -3
  206. package/dist/lido-player/assets/Shadow.svg +9 -9
  207. package/dist/lido-player/assets/Tracing-hand.svg +8 -8
  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 +7 -7
  212. package/dist/lido-player/lido-player.esm.js +1 -1
  213. package/dist/lido-player/p-35fa0b8b.entry.js +12 -0
  214. package/dist/lido-player/p-D2iINRNN.js +1 -0
  215. package/dist/lido-player/{p-CFtq4Thh.js → p-Dc8j8Hxw.js} +1 -1
  216. package/dist/lido-player/p-Dvjbti-h.js +2 -0
  217. package/dist/lido-player/readme.md +49 -49
  218. package/dist/types/components/flashCard/lido-flash-card.d.ts +10 -0
  219. package/dist/types/components/scale/lido-balance.d.ts +5 -0
  220. package/dist/types/components/trace/lido-trace.d.ts +9 -1
  221. package/dist/types/components.d.ts +10 -0
  222. package/dist/types/stencil-public-runtime.d.ts +55 -73
  223. package/dist/types/types/json.d.ts +3 -3
  224. package/dist/types/utils/audioPlayer.d.ts +1 -1
  225. package/dist/types/utils/utilsHandlers/lidoBalanceHandler.d.ts +10 -0
  226. package/loader/index.d.ts +1 -1
  227. package/package.json +74 -74
  228. package/readme.md +113 -113
  229. package/dist/components/p-BfqihbR6.js +0 -1
  230. package/dist/components/p-CwIlwnQk.js +0 -1
  231. package/dist/components/p-DLyacZap.js +0 -1
  232. package/dist/components/p-DONbWJGn.js +0 -1
  233. package/dist/components/p-DVTigdH_.js +0 -1
  234. package/dist/components/p-DYFVwyRr.js +0 -1
  235. package/dist/lido-player/p-37736e11.entry.js +0 -12
  236. package/dist/lido-player/p-3Ry570XH.js +0 -1
  237. package/dist/lido-player/p-DQZfuGjI.js +0 -3
@@ -1,4 +1,4 @@
1
- import { c as getAssetPath } from './index-DQZfuGjI.js';
1
+ import { c as getAssetPath } from './index-Dvjbti-h.js';
2
2
 
3
3
  const DragMapKey = 'lidoDragMap';
4
4
  const SelectedValuesKey = 'lidoSelectedValues';
@@ -197,7 +197,51 @@ class RiveService {
197
197
  }
198
198
  }
199
199
 
200
+ /**
201
+ * Mount a drag item on a balance plate without using the generic
202
+ * `drop-action="move"` flow. The generic flow creates a new source placeholder
203
+ * for every move, which makes a previously used plate become the item's source.
204
+ *
205
+ * A balance item gets exactly one home placeholder: its original source. It can
206
+ * then move freely between plate parents while continuing to inherit the plate's
207
+ * tilt translation.
208
+ */
209
+ function placeDragOnBalancePlate(dragElement, dropElement) {
210
+ var _a;
211
+ const balanceEl = document.querySelector('lido-balance');
212
+ const plateParent = dropElement === null || dropElement === void 0 ? void 0 : dropElement.parentElement;
213
+ if (!balanceEl || !plateParent)
214
+ return;
215
+ const drag = dragElement;
216
+ if (!((_a = drag.__lidoBalanceHome) === null || _a === void 0 ? void 0 : _a.isConnected)) {
217
+ const home = document.createElement('div');
218
+ home.className = 'lido-balance-source-placeholder';
219
+ home.setAttribute('aria-hidden', 'true');
220
+ drag.replaceWith(home);
221
+ drag.__lidoBalanceHome = home;
222
+ }
223
+ // Appending an existing element moves it; it does not leave a second
224
+ // placeholder in the previous plate.
225
+ plateParent.append(drag);
226
+ drag.style.position = 'absolute';
227
+ drag.style.zIndex = '1';
228
+ // The generic drag handler also uses transform. Disable transitions while
229
+ // changing parents and calculating the new local offset so this is one
230
+ // placement, rather than a right/left correction animation.
231
+ drag.style.transition = 'none';
232
+ drag.style.transform = 'translate(0, 0)';
233
+ const dropRect = dropElement.getBoundingClientRect();
234
+ const dragRect = drag.getBoundingClientRect();
235
+ const scale = calculateScale() || 1;
236
+ const x = (dropRect.left + dropRect.width / 2 - (dragRect.left + dragRect.width / 2)) / scale;
237
+ const y = (dropRect.top + dropRect.height / 2 - (dragRect.top + dragRect.height / 2)) / scale;
238
+ drag.style.transform = `translate(${x}px, ${y}px)`;
239
+ requestAnimationFrame(() => {
240
+ drag.style.transition = '';
241
+ });
242
+ }
200
243
  function updateBalanceOnDrop(dragElement, dropElement) {
244
+ var _a, _b;
201
245
  const balanceEl = document.querySelector('lido-balance');
202
246
  if (!balanceEl)
203
247
  return;
@@ -205,7 +249,20 @@ function updateBalanceOnDrop(dragElement, dropElement) {
205
249
  const rightDrag = Array.from(document.querySelectorAll('[drop-to^="righthandle"]'));
206
250
  balanceEl.leftVal = calculateValue(leftDrag, balanceEl.operation);
207
251
  balanceEl.rightVal = calculateValue(rightDrag, balanceEl.operation);
252
+ const container = document.getElementById('lido-container');
253
+ const objectiveString = (_b = (_a = container === null || container === void 0 ? void 0 : container['objective']) !== null && _a !== void 0 ? _a : container === null || container === void 0 ? void 0 : container.getAttribute('objective')) !== null && _b !== void 0 ? _b : '';
254
+ const isCorrect = !!container && balanceResult(container, objectiveString);
255
+ const dropElements = container ? Array.from(container.querySelectorAll('[type="drop"]')) : [];
256
+ const filledDropCount = dropElements.filter(drop => !!(container === null || container === void 0 ? void 0 : container.querySelector(`[drop-to="${drop.id}"]`))).length;
257
+ const allDropsFilled = dropElements.length > 0 && filledDropCount === dropElements.length;
258
+ if (balanceEl.setFeedbackColor) {
259
+ balanceEl.setFeedbackColor(allDropsFilled && isCorrect ? '#81C127' : allDropsFilled ? '#FF0410' : '');
260
+ }
208
261
  if (balanceEl.updateTilt) {
262
+ if (!isCorrect) {
263
+ balanceEl.updateTilt(0, 0);
264
+ return;
265
+ }
209
266
  balanceEl.updateTilt(balanceEl.leftVal, balanceEl.rightVal);
210
267
  }
211
268
  }
@@ -773,7 +830,8 @@ async function handleResetDragElement(dragElement, dropElement, dropHasDrag, sel
773
830
  dragElement.classList.remove('dropped');
774
831
  const container = document.getElementById(LidoContainer);
775
832
  const cloneArray = container.querySelectorAll(`#${dragElement.id}`);
776
- const cloneDragElement = Array.from(cloneArray).find(item => dragElement !== item && !item.classList.contains('dropped'));
833
+ const balanceHome = dragElement.__lidoBalanceHome;
834
+ const cloneDragElement = ((balanceHome === null || balanceHome === void 0 ? void 0 : balanceHome.isConnected) ? balanceHome : Array.from(cloneArray).find(item => dragElement !== item && !item.classList.contains('dropped')));
777
835
  dragElement.style.transition = 'transform 0.5s ease';
778
836
  if (cloneDragElement) {
779
837
  animateDragToTarget(dragElement, cloneDragElement, container);
@@ -790,6 +848,7 @@ async function handleResetDragElement(dragElement, dropElement, dropHasDrag, sel
790
848
  dragElement.style.transform = 'translate(0,0)';
791
849
  dragElement.style.position = 'unset';
792
850
  cloneDragElement.replaceWith(dragElement);
851
+ delete dragElement.__lidoBalanceHome;
793
852
  }, 500);
794
853
  }
795
854
  else {
@@ -1112,6 +1171,10 @@ async function onElementDropComplete(dragElement, dropElement) {
1112
1171
  }
1113
1172
  highlightElement();
1114
1173
  await onActivityComplete(dragElement, dropElement);
1174
+ const dropAction = container.getAttribute('drop-action');
1175
+ if (container.querySelector('lido-balance') && dropAction !== DropAction.Move && dropAction !== DropAction.InfiniteDrop) {
1176
+ placeDragOnBalancePlate(dragElement, dropElement);
1177
+ }
1115
1178
  }
1116
1179
  function updateDropBorder(element) {
1117
1180
  var _a;
@@ -1177,14 +1240,14 @@ async function onClickDropOrDragElement(element, type) {
1177
1240
  if (!document.querySelector('#dynamic-highlight-style')) {
1178
1241
  const style = document.createElement('style');
1179
1242
  style.id = 'dynamic-highlight-style';
1180
- style.innerHTML = `
1181
- .highlight {
1182
- // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
1183
- // border-radius: 12px; /* Larger rounded corners */
1184
- // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
1185
- // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
1186
- // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
1187
- }
1243
+ style.innerHTML = `
1244
+ .highlight {
1245
+ // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
1246
+ // border-radius: 12px; /* Larger rounded corners */
1247
+ // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
1248
+ // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
1249
+ // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
1250
+ }
1188
1251
  `;
1189
1252
  document.head.appendChild(style);
1190
1253
  }
@@ -1372,34 +1435,34 @@ function highlightSpeakingElement(element) {
1372
1435
  if (!document.getElementById(styleId)) {
1373
1436
  const style = document.createElement('style');
1374
1437
  style.id = styleId;
1375
- style.innerHTML = `
1376
- .speaking-highlight {
1377
- --base-transform: ${element.style.transform};
1378
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1379
- // border: 3px solid green !important;
1380
- // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1381
- // transform: scale(1.05); /* Subtle scale effect to pop the element */
1382
- // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1383
-
1384
- }
1385
-
1386
- @keyframes pulseEffect {
1387
- 0% {
1388
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1389
- // transform: var(--base-transform) scale(1.05);
1390
- // background-color: #FFFF0B;
1391
- }
1392
- 50% {
1393
- box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1394
- // transform: var(--base-transform) scale(1.1);
1395
- // background-color: #FFFF0B;
1396
- }
1397
- 100% {
1398
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1399
- // transform: var(--base-transform) scale(1.05);
1400
- // background-color: #FFFF0B;
1401
- }
1402
- }
1438
+ style.innerHTML = `
1439
+ .speaking-highlight {
1440
+ --base-transform: ${element.style.transform};
1441
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1442
+ // border: 3px solid green !important;
1443
+ // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1444
+ // transform: scale(1.05); /* Subtle scale effect to pop the element */
1445
+ // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1446
+
1447
+ }
1448
+
1449
+ @keyframes pulseEffect {
1450
+ 0% {
1451
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1452
+ // transform: var(--base-transform) scale(1.05);
1453
+ // background-color: #FFFF0B;
1454
+ }
1455
+ 50% {
1456
+ box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1457
+ // transform: var(--base-transform) scale(1.1);
1458
+ // background-color: #FFFF0B;
1459
+ }
1460
+ 100% {
1461
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1462
+ // transform: var(--base-transform) scale(1.05);
1463
+ // background-color: #FFFF0B;
1464
+ }
1465
+ }
1403
1466
  `;
1404
1467
  document.head.appendChild(style);
1405
1468
  }
@@ -1574,7 +1637,7 @@ class AudioPlayer {
1574
1637
  return el;
1575
1638
  return el.closest('lido-text');
1576
1639
  }
1577
- async play(targetElement) {
1640
+ async play(targetElement, suppressHighlight = false) {
1578
1641
  this.registerVisibilityEvents();
1579
1642
  this.playbackHasStarted = false;
1580
1643
  if (!this.isWindowVisible()) {
@@ -1598,11 +1661,6 @@ class AudioPlayer {
1598
1661
  console.warn('[AudioPlayer] No lido-container found');
1599
1662
  return;
1600
1663
  }
1601
- // Check if speaking is disabled on the target element or its closest lido-text parent
1602
- targetElement.closest('lido-text');
1603
- // if(text && text.getAttribute('disable-speak')==='true'){
1604
- // return;
1605
- // }
1606
1664
  if (container.getAttribute('highlight-word-by-word') === 'true') {
1607
1665
  const textElement = this.getLidoTextElement(targetElement);
1608
1666
  if (!textElement) {
@@ -1614,6 +1672,7 @@ class AudioPlayer {
1614
1672
  targetElement = textElement;
1615
1673
  }
1616
1674
  this.currentTargetElement = targetElement;
1675
+ window.dispatchEvent(new CustomEvent('lidoAudioStarted', { detail: { target: targetElement } }));
1617
1676
  // then play the target element audio.
1618
1677
  let audioUrl = targetElement.getAttribute('audio') || '';
1619
1678
  // If no direct audio attribute, check childrens for audio
@@ -1663,7 +1722,8 @@ class AudioPlayer {
1663
1722
  this.wordRects = this.computeWordRects(targetElement);
1664
1723
  }
1665
1724
  else {
1666
- highlightSpeakingElement(targetElement);
1725
+ if (!suppressHighlight)
1726
+ highlightSpeakingElement(targetElement);
1667
1727
  }
1668
1728
  // PLAY ONCE
1669
1729
  await this.audioElement.play();
@@ -1687,18 +1747,17 @@ class AudioPlayer {
1687
1747
  this.audioElement.onended = null; // cleanup
1688
1748
  setDraggingDisabled(false);
1689
1749
  if (container.getAttribute('highlight-word-by-word') !== 'true') {
1690
- stopHighlightForSpeakingElement(targetElement);
1750
+ if (!suppressHighlight)
1751
+ stopHighlightForSpeakingElement(targetElement);
1691
1752
  }
1692
1753
  }
1693
1754
  }
1694
1755
  // If no audio, use text-to-speech
1695
1756
  else if (targetElement.textContent) {
1696
1757
  try {
1697
- highlightSpeakingElement(targetElement);
1698
- // window.addEventListener('click', this.handleUserClick, true);
1758
+ if (!suppressHighlight)
1759
+ highlightSpeakingElement(targetElement);
1699
1760
  await speakText(targetElement.textContent, targetElement);
1700
- document.querySelectorAll('.speaking-highlight');
1701
- // highlightedElements.forEach(element => stopHighlightForSpeakingElement(element as HTMLElement));
1702
1761
  }
1703
1762
  catch (error) { }
1704
1763
  finally {
@@ -1716,6 +1775,7 @@ class AudioPlayer {
1716
1775
  if (this.currentTargetElement === targetElement) {
1717
1776
  this.currentTargetElement = null;
1718
1777
  }
1778
+ window.dispatchEvent(new CustomEvent('lidoAudioEnded', { detail: { target: targetElement } }));
1719
1779
  }
1720
1780
  // GLOBAL STOP EVENTS (container change, activity change…)
1721
1781
  registerGlobalStopEvents() {
@@ -2108,11 +2168,11 @@ function enableReorderDrag(element) {
2108
2168
  onDropToCategory(element, category);
2109
2169
  }
2110
2170
  if (divEl) {
2111
- const keyframes = `
2112
- @keyframes widthDecrease {
2113
- 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
2114
- 100% { width: 0px; height: 0px;}
2115
- }
2171
+ const keyframes = `
2172
+ @keyframes widthDecrease {
2173
+ 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
2174
+ 100% { width: 0px; height: 0px;}
2175
+ }
2116
2176
  `;
2117
2177
  const styleSheet = document.styleSheets[0];
2118
2178
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -2335,11 +2395,11 @@ function moveWithAnimation(target, overlapped) {
2335
2395
  const dummy = createDummyElement(target);
2336
2396
  dummy.style.visibility = 'hidden';
2337
2397
  dummy.setAttribute('type', 'dummy');
2338
- const keyframes = `
2339
- @keyframes widthIncrease {
2340
- 0% { width: 0px; height: 0px; }
2341
- 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
2342
- }
2398
+ const keyframes = `
2399
+ @keyframes widthIncrease {
2400
+ 0% { width: 0px; height: 0px; }
2401
+ 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
2402
+ }
2343
2403
  `;
2344
2404
  if (!overlapped) {
2345
2405
  const overlapCategory = findMostoverlappedElement(target, 'category');
@@ -73037,11 +73097,11 @@ const afterDropDragHandling = (dragElement, dropElement) => {
73037
73097
  }
73038
73098
  dummyElement.setAttribute('id', dragElement.getAttribute('id'));
73039
73099
  dragElement.replaceWith(dummyElement);
73040
- const keyframes = `
73041
- @keyframes widthDecrease {
73042
- 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
73043
- 100% { width: 0px; height: 0px; margin: 0px;}
73044
- }
73100
+ const keyframes = `
73101
+ @keyframes widthDecrease {
73102
+ 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
73103
+ 100% { width: 0px; height: 0px; margin: 0px;}
73104
+ }
73045
73105
  `;
73046
73106
  if (!isInfinite) {
73047
73107
  dummyElement.style.width = element.style.width;
@@ -73251,7 +73311,16 @@ async function onActivityComplete(dragElement, dropElement) {
73251
73311
  if (!container)
73252
73312
  return;
73253
73313
  const isBlender = container.getAttribute('template-id') === 'blender';
73254
- await executeActions("this.alignMatch='true'", dropElement, dragElement);
73314
+ const isBalancing = !!container.querySelector('lido-balance');
73315
+ const usesBalancePlacement = isBalancing
73316
+ && container.getAttribute('drop-action') !== DropAction.Move
73317
+ && container.getAttribute('drop-action') !== DropAction.InfiniteDrop;
73318
+ // Balance plates perform their own single placement pass after this method.
73319
+ // Running alignMatch first makes two transforms compete and produces a visible
73320
+ // horizontal drift as the item is re-parented.
73321
+ if (!usesBalancePlacement) {
73322
+ await executeActions("this.alignMatch='true'", dropElement, dragElement);
73323
+ }
73255
73324
  if (dragElement && dropElement) {
73256
73325
  let isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
73257
73326
  if (isBlender) {
@@ -73274,7 +73343,7 @@ async function onActivityComplete(dragElement, dropElement) {
73274
73343
  const onCorrect = ((_b = container.getAttribute('dropAttr')) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === DropMode.EnableAnimation.toLowerCase()
73275
73344
  ? ''
73276
73345
  : dropElement.getAttribute('onCorrect');
73277
- if (onCorrect && !isBlender) {
73346
+ if (onCorrect && !isBlender && !isBalancing) {
73278
73347
  await executeActions(onCorrect, dropElement, dragElement);
73279
73348
  }
73280
73349
  //for multiply beeds
@@ -73313,7 +73382,7 @@ async function onActivityComplete(dragElement, dropElement) {
73313
73382
  }, 2000);
73314
73383
  }
73315
73384
  const onInCorrect = dropElement.getAttribute('onInCorrect');
73316
- if (onInCorrect && !isBlender) {
73385
+ if (onInCorrect && !isBlender && !isBalancing) {
73317
73386
  await executeActions(onInCorrect, dropElement, dragElement);
73318
73387
  }
73319
73388
  }
@@ -73481,6 +73550,13 @@ const validateObjectiveStatus = async () => {
73481
73550
  else {
73482
73551
  res = matchStringPattern(objectiveString, objectiveArray);
73483
73552
  }
73553
+ const isBalancing = !!container.querySelector('lido-balance');
73554
+ if (isBalancing && !res) {
73555
+ const dropElements = Array.from(container.querySelectorAll('[type="drop"]'));
73556
+ const filledDropCount = dropElements.filter(drop => !!container.querySelector(`[drop-to="${drop.id}"]`)).length;
73557
+ if (filledDropCount < dropElements.length)
73558
+ return;
73559
+ }
73484
73560
  if (res) {
73485
73561
  container.setAttribute("game-completed", "true");
73486
73562
  const attach = container.getAttribute('appendToDropOnCompletion');
@@ -2,10 +2,10 @@ const NAMESPACE = 'lido-player';
2
2
  const BUILD = /* lido-player */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
3
3
 
4
4
  const globalScripts = () => {};
5
- 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}";
5
+ 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}";
6
6
 
7
7
  /*
8
- Stencil Client Platform v4.45.1 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
 
11
11
 
@@ -93,9 +93,7 @@ var consoleError = (e, el) => (0, console.error)(e, el);
93
93
 
94
94
  // src/client/client-load-module.ts
95
95
  var cmpModules = /* @__PURE__ */ new Map();
96
- var failedLoadAttempts = /* @__PURE__ */ new Map();
97
96
  var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
98
- var _a;
99
97
  const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
100
98
  const bundleId = cmpMeta.$lazyBundleId$;
101
99
  if (!bundleId) {
@@ -105,11 +103,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
105
103
  if (module) {
106
104
  return module[exportName];
107
105
  }
108
- const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
109
- const cacheBustParams = [
110
- retryCount > 0 ? `s-retry=${retryCount}` : "",
111
- ""
112
- ].filter(Boolean).join("&");
113
106
 
114
107
  if (!hmrVersionId || !BUILD.hotModuleReplacement) {
115
108
  const processMod = importedModule => {
@@ -129,17 +122,15 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
129
122
  /* webpackInclude: /\.entry\.js$/ */
130
123
  /* webpackExclude: /\.system\.entry\.js$/ */
131
124
  /* webpackMode: "lazy" */
132
- `./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
125
+ `./${bundleId}.entry.js${""}`
133
126
  ).then(
134
127
  (importedModule) => {
135
128
  {
136
- failedLoadAttempts.delete(bundleId);
137
129
  cmpModules.set(bundleId, importedModule);
138
130
  }
139
131
  return importedModule[exportName];
140
132
  },
141
133
  (e) => {
142
- failedLoadAttempts.set(bundleId, retryCount + 1);
143
134
  consoleError(e, hostRef.$hostElement$);
144
135
  }
145
136
  );
@@ -150,8 +141,6 @@ var styles = /* @__PURE__ */ new Map();
150
141
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
151
142
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
152
143
  var XLINK_NS = "http://www.w3.org/1999/xlink";
153
- var MAX_LAZY_LOAD_RETRIES = 3;
154
- var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
155
144
  var win = typeof window !== "undefined" ? window : {};
156
145
  var plt = {
157
146
  $flags$: 0,
@@ -178,10 +167,6 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
178
167
  var queuePending = false;
179
168
  var queueDomReads = [];
180
169
  var queueDomWrites = [];
181
- var scheduleFlush = () => {
182
- var _a;
183
- return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
184
- };
185
170
  var queueTask = (queue, write) => (cb) => {
186
171
  queue.push(cb);
187
172
  if (!queuePending) {
@@ -189,7 +174,7 @@ var queueTask = (queue, write) => (cb) => {
189
174
  if (write && plt.$flags$ & 4 /* queueSync */) {
190
175
  nextTick(flush);
191
176
  } else {
192
- scheduleFlush();
177
+ plt.raf(flush);
193
178
  }
194
179
  }
195
180
  };
@@ -208,7 +193,7 @@ var flush = () => {
208
193
  {
209
194
  consume(queueDomWrites);
210
195
  if (queuePending = queueDomReads.length > 0) {
211
- scheduleFlush();
196
+ plt.raf(flush);
212
197
  }
213
198
  }
214
199
  };
@@ -289,7 +274,7 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
289
274
  slottedNodes.push(childNode);
290
275
  if (typeof slotName !== "undefined") return slottedNodes;
291
276
  }
292
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
277
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
293
278
  }
294
279
  return slottedNodes;
295
280
  }
@@ -533,11 +518,6 @@ var h = (nodeName, vnodeData, ...children) => {
533
518
  } else if (child != null && typeof child !== "boolean") {
534
519
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
535
520
  child = String(child);
536
- } else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
537
- {
538
- consoleError("Invalid vNode child");
539
- }
540
- continue;
541
521
  }
542
522
  if (simple && lastSimple) {
543
523
  vNodeChildren[vNodeChildren.length - 1].$text$ += child;
@@ -782,7 +762,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
782
762
  }
783
763
  }
784
764
  if (newValue == null || newValue === false) {
785
- if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
765
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
786
766
  if (xlink) {
787
767
  elm.removeAttributeNS(XLINK_NS, memberName);
788
768
  } else {
@@ -799,8 +779,6 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
799
779
  }
800
780
  }
801
781
  };
802
- var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
803
- var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
804
782
  var parseClassListRegex = /\s/;
805
783
  var parseClassList = (value) => {
806
784
  if (typeof value === "object" && value && "baseVal" in value) {
@@ -1069,7 +1047,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1069
1047
  if (idxInOld >= 0) {
1070
1048
  elmToMove = oldCh[idxInOld];
1071
1049
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1072
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1050
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1073
1051
  } else {
1074
1052
  patch(elmToMove, newStartVnode, isInitialRender);
1075
1053
  oldCh[idxInOld] = void 0;
@@ -1168,10 +1146,7 @@ var markSlotContentForRelocation = (elm) => {
1168
1146
  const slotName = childNode["s-sn"];
1169
1147
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1170
1148
  node = hostContentNodes[j];
1171
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
1172
- // `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
1173
- // would trivially "match" on every re-render and force pointless re-insertion.
1174
- (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
1149
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1175
1150
  if (isNodeLocatedInSlot(node, slotName)) {
1176
1151
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1177
1152
  checkSlotFallbackVisibility = true;
@@ -1239,7 +1214,7 @@ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
1239
1214
  return newNode;
1240
1215
  }
1241
1216
  }
1242
- if ((parent == null ? void 0 : parent.__insertBefore)) {
1217
+ if (parent.__insertBefore) {
1243
1218
  return parent.__insertBefore(newNode, reference);
1244
1219
  } else {
1245
1220
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
@@ -1606,7 +1581,6 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1606
1581
  };
1607
1582
 
1608
1583
  // src/runtime/proxy-component.ts
1609
- var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
1610
1584
  var proxyComponent = (Cstr, cmpMeta, flags) => {
1611
1585
  var _a, _b;
1612
1586
  const prototype = Cstr.prototype;
@@ -1677,26 +1651,21 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1677
1651
  }
1678
1652
  return;
1679
1653
  }
1680
- const parsedValue = parsePropertyValue(
1681
- newValue,
1682
- memberFlags);
1683
- const setterSetVal = (val) => {
1654
+ const setterSetVal = () => {
1684
1655
  const currentValue = ref.$lazyInstance$[memberName];
1685
1656
  if (!ref.$instanceValues$.get(memberName) && currentValue) {
1686
1657
  ref.$instanceValues$.set(memberName, currentValue);
1687
1658
  }
1688
- ref.$lazyInstance$[memberName] = val;
1659
+ ref.$lazyInstance$[memberName] = parsePropertyValue(
1660
+ newValue,
1661
+ memberFlags);
1689
1662
  setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1690
1663
  };
1691
1664
  if (ref.$lazyInstance$) {
1692
- setterSetVal(parsedValue);
1665
+ setterSetVal();
1693
1666
  } else {
1694
- ref.$instanceValues$.set(memberName, parsedValue);
1695
1667
  ref.$fetchedCbList$.push(() => {
1696
- const pendingValue = ref.$instanceValues$.get(memberName);
1697
- if (ref.$lazyInstance$[memberName] !== pendingValue) {
1698
- setterSetVal(pendingValue);
1699
- }
1668
+ setterSetVal();
1700
1669
  });
1701
1670
  }
1702
1671
  }
@@ -1744,20 +1713,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1744
1713
  return;
1745
1714
  }
1746
1715
  const propFlags = members.find(([m]) => m === propName);
1747
- const propMemberFlags = propFlags ? propFlags[1][0] : 0;
1748
- const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
1749
- if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
1750
- // one is always external
1751
- !isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
1752
- return;
1753
- }
1716
+ const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
1754
1717
  const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
1755
1718
  if (isBooleanTarget) {
1756
1719
  newValue = newValue === null || newValue === "false" ? false : true;
1757
1720
  }
1758
- const currentValue = propMemberFlags & 4096 /* Setter */ ? hostRef.$instanceValues$.get(propName) : this[propName];
1759
1721
  const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1760
- if (!isSpuriousBooleanRemoval && newValue != currentValue && (!propDesc.get || !!propDesc.set)) {
1722
+ if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1761
1723
  this[propName] = newValue;
1762
1724
  }
1763
1725
  });
@@ -1783,12 +1745,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1783
1745
 
1784
1746
  // src/runtime/initialize-component.ts
1785
1747
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1786
- var _a;
1787
1748
  let Cstr;
1788
1749
  try {
1789
1750
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1790
1751
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1791
- hostRef.$flags$ &= -1025 /* hasFailedLoad */;
1792
1752
  const bundleId = cmpMeta.$lazyBundleId$;
1793
1753
  if (bundleId) {
1794
1754
  const CstrImport = loadModule(cmpMeta, hostRef);
@@ -1800,11 +1760,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1800
1760
  Cstr = CstrImport;
1801
1761
  }
1802
1762
  if (!Cstr) {
1803
- hostRef.$flags$ &= -33 /* hasInitializedComponent */;
1804
- hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
1805
- if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
1806
- hostRef.$flags$ |= 1024 /* hasFailedLoad */;
1807
- }
1808
1763
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1809
1764
  }
1810
1765
  if (!Cstr.isProxied) {
@@ -1869,7 +1824,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1869
1824
  hostRef.$onRenderResolve$();
1870
1825
  hostRef.$onRenderResolve$ = void 0;
1871
1826
  }
1872
- if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
1827
+ if (hostRef.$onReadyResolve$) {
1873
1828
  hostRef.$onReadyResolve$(elm);
1874
1829
  }
1875
1830
  }
@@ -1921,8 +1876,6 @@ var connectedCallback = (elm) => {
1921
1876
  } else {
1922
1877
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1923
1878
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
1924
- } else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
1925
- setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
1926
1879
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1927
1880
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1928
1881
  }
@@ -2049,7 +2002,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2049
2002
  }
2050
2003
  disconnectedCallback() {
2051
2004
  plt.jmp(() => disconnectedCallback(this));
2052
- nextTick(() => {
2005
+ plt.raf(() => {
2053
2006
  var _a3;
2054
2007
  const hostRef = getHostRef(this);
2055
2008
  if (!hostRef) {
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { $ as format } from './index-CQXciux9.js';
2
- import './index-DQZfuGjI.js';
1
+ export { $ as format } from './index-D9-TTsdZ.js';
2
+ import './index-Dvjbti-h.js';