lido-player 0.0.2-alpha-50-dev → 0.0.2-alpha-51-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 (213) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{index-6a69c33a.js → index-baff5c15.js} +48 -14
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/{lido-avatar_21.cjs.entry.js → lido-avatar_22.cjs.entry.js} +3043 -162
  5. package/dist/cjs/lido-player.cjs.js +2 -2
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/{utils-079a5e7d.js → utils-dc02d753.js} +150 -95
  8. package/dist/collection/collection-manifest.json +1 -0
  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/calculator/lido-calculator.css +87 -87
  12. package/dist/collection/components/calculator/lido-calculator.js +14 -8
  13. package/dist/collection/components/canvas/lido-canvas.css +38 -0
  14. package/dist/collection/components/canvas/lido-canvas.js +220 -0
  15. package/dist/collection/components/cell/lido-cell.css +100 -100
  16. package/dist/collection/components/cell/lido-cell.js +12 -12
  17. package/dist/collection/components/column/lido-col.css +19 -19
  18. package/dist/collection/components/column/lido-col.js +6 -6
  19. package/dist/collection/components/container/lido-container.css +10 -10
  20. package/dist/collection/components/container/lido-container.js +70 -8
  21. package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
  22. package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
  23. package/dist/collection/components/float/lido-float.css +30 -30
  24. package/dist/collection/components/float/lido-float.js +2 -2
  25. package/dist/collection/components/home/lido-home.css +278 -278
  26. package/dist/collection/components/home/lido-home.js +92 -12
  27. package/dist/collection/components/image/lido-image.css +17 -17
  28. package/dist/collection/components/image/lido-image.js +6 -6
  29. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  30. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  31. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  32. package/dist/collection/components/mathMatrix/lido-math-matrix.js +56 -2
  33. package/dist/collection/components/position/lido-pos.css +16 -16
  34. package/dist/collection/components/position/lido-pos.js +2 -2
  35. package/dist/collection/components/random/lido-random.css +8 -8
  36. package/dist/collection/components/random/lido-random.js +2 -2
  37. package/dist/collection/components/root/lido-root.js +42 -6
  38. package/dist/collection/components/row/lido-row.css +10 -10
  39. package/dist/collection/components/row/lido-row.js +6 -6
  40. package/dist/collection/components/scale/lido-balance.css +145 -114
  41. package/dist/collection/components/scale/lido-balance.js +17 -17
  42. package/dist/collection/components/shape/lido-shape.css +96 -96
  43. package/dist/collection/components/shape/lido-shape.js +5 -5
  44. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  45. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  46. package/dist/collection/components/text/lido-text.css +53 -53
  47. package/dist/collection/components/text/lido-text.js +6 -5
  48. package/dist/collection/components/trace/lido-trace.css +97 -97
  49. package/dist/collection/components/trace/lido-trace.js +2 -2
  50. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  51. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  52. package/dist/collection/css/animation.css +194 -194
  53. package/dist/collection/css/index.css +277 -277
  54. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +60 -60
  55. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  56. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +55 -48
  57. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +29 -29
  58. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +42 -42
  59. package/dist/collection/stories/Templates/balancing/balancing.stories.js +37 -31
  60. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  61. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  62. package/dist/collection/stories/Templates/calculator/calculator.stories.js +48 -0
  63. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  64. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  65. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
  66. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  67. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  68. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  69. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +37 -37
  70. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  71. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  72. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  73. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  74. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  75. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  76. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  77. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  78. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
  79. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +23 -23
  80. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  81. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  82. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
  83. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
  84. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
  85. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +38 -38
  86. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
  87. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
  88. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
  89. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +96 -96
  90. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  91. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
  92. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  93. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  94. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
  95. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  96. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  97. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  98. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  99. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
  100. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
  101. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
  102. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
  103. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
  104. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  105. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  106. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
  107. package/dist/collection/stories/Templates/total/total.stories.js +27 -27
  108. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
  109. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
  110. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
  111. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
  112. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
  113. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  114. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  115. package/dist/collection/stories/components/slider.stories.js +4 -4
  116. package/dist/collection/stories/components/trace.stories.js +5 -5
  117. package/dist/collection/utils/audioPlayer.js +43 -6
  118. package/dist/collection/utils/constants.js +1 -0
  119. package/dist/collection/utils/i18n.js +36 -0
  120. package/dist/collection/utils/utils.js +36 -29
  121. package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
  122. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +17 -9
  123. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  124. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
  125. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
  126. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  127. package/dist/components/index.js +1 -1
  128. package/dist/components/lido-avatar.js +1 -1
  129. package/dist/components/lido-balance.js +1 -1
  130. package/dist/components/lido-calculator.js +1 -1
  131. package/dist/components/lido-canvas.d.ts +11 -0
  132. package/dist/components/lido-canvas.js +6 -0
  133. package/dist/components/lido-cell.js +1 -1
  134. package/dist/components/lido-col.js +1 -1
  135. package/dist/components/lido-container.js +1 -1
  136. package/dist/components/lido-flash-card.js +1 -1
  137. package/dist/components/lido-float.js +1 -1
  138. package/dist/components/lido-home.js +1 -1
  139. package/dist/components/lido-image.js +1 -1
  140. package/dist/components/lido-keyboard.js +1 -1
  141. package/dist/components/lido-math-matrix.js +1 -1
  142. package/dist/components/lido-pos.js +1 -1
  143. package/dist/components/lido-random.js +1 -1
  144. package/dist/components/lido-root.js +49 -25
  145. package/dist/components/lido-row.js +1 -1
  146. package/dist/components/lido-shape.js +1 -1
  147. package/dist/components/lido-slide-fill.js +1 -1
  148. package/dist/components/lido-text.js +1 -1
  149. package/dist/components/lido-trace.js +1 -1
  150. package/dist/components/lido-wrap.js +1 -1
  151. package/dist/components/{p-73e31a86.js → p-04e904b5.js} +8 -8
  152. package/dist/components/p-0fbeb3a1.js +2700 -0
  153. package/dist/components/{p-1fbdb431.js → p-12432f23.js} +2 -2
  154. package/dist/components/p-1c84cf65.js +123 -0
  155. package/dist/components/{p-74849cdd.js → p-1f3c2783.js} +4 -4
  156. package/dist/components/{p-e4e42677.js → p-4fd6b588.js} +2 -2
  157. package/dist/components/{p-e36ddcc1.js → p-56c8f3da.js} +14 -11
  158. package/dist/components/{p-cbac3cbc.js → p-62d2a5b3.js} +2 -2
  159. package/dist/components/{p-44808985.js → p-6ba0f1af.js} +7 -7
  160. package/dist/components/{p-52844fa4.js → p-6be6c5eb.js} +2 -2
  161. package/dist/components/{p-08d0deab.js → p-74b90a9c.js} +9 -3
  162. package/dist/components/{p-d37ab4dc.js → p-988477ad.js} +2 -2
  163. package/dist/components/{p-7f7e5672.js → p-a8724f06.js} +2 -2
  164. package/dist/components/{p-3f406017.js → p-b7efadad.js} +2 -2
  165. package/dist/components/{p-15971ede.js → p-b89371ac.js} +1 -1
  166. package/dist/components/{p-904711c8.js → p-bb907e43.js} +2 -2
  167. package/dist/components/{p-afbc196f.js → p-bef96764.js} +3 -2
  168. package/dist/components/{p-322acda6.js → p-c8815e84.js} +67 -31
  169. package/dist/components/{p-835b973d.js → p-caa05d1e.js} +2 -2
  170. package/dist/components/{p-bed94c37.js → p-d0131159.js} +187 -105
  171. package/dist/components/{p-29bdd953.js → p-d3f7d561.js} +2 -2
  172. package/dist/components/{p-90465904.js → p-d7693f47.js} +2 -2
  173. package/dist/components/{p-9be56729.js → p-e9548986.js} +46 -2
  174. package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
  175. package/dist/esm/index.js +2 -2
  176. package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
  177. package/dist/esm/lido-player.js +3 -3
  178. package/dist/esm/loader.js +3 -3
  179. package/dist/esm/{utils-5df09162.js → utils-b5eb2360.js} +150 -95
  180. package/dist/lido-player/index.esm.js +1 -1
  181. package/dist/lido-player/lido-player.esm.js +1 -1
  182. package/dist/lido-player/p-9a9d5339.js +2 -0
  183. package/dist/lido-player/{p-7556e652.js → p-9fd87d44.js} +2 -2
  184. package/dist/lido-player/p-e1a9c26f.entry.js +1 -0
  185. package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
  186. package/dist/types/components/container/lido-container.d.ts +6 -0
  187. package/dist/types/components/home/lido-home.d.ts +8 -0
  188. package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -0
  189. package/dist/types/components/root/lido-root.d.ts +5 -0
  190. package/dist/types/components.d.ts +71 -0
  191. package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
  192. package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
  193. package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
  194. package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
  195. package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
  196. package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
  197. package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
  198. package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
  199. package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
  200. package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
  201. package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
  202. package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
  203. package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
  204. package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
  205. package/dist/types/types/json.d.ts +4 -0
  206. package/dist/types/utils/audioPlayer.d.ts +2 -0
  207. package/dist/types/utils/constants.d.ts +1 -0
  208. package/dist/types/utils/i18n.d.ts +5 -0
  209. package/dist/types/utils/utils.d.ts +1 -0
  210. package/package.json +71 -69
  211. package/readme.md +113 -113
  212. package/dist/lido-player/p-137c99ce.js +0 -2
  213. package/dist/lido-player/p-eb956325.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'lido-player';
2
- const BUILD = /* lido-player */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
2
+ const BUILD = /* lido-player */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
@@ -45,7 +45,6 @@ var plt$1 = {
45
45
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
46
46
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
47
47
  };
48
- var supportsShadow = BUILD.shadowDom;
49
48
  var promiseResolve = (v) => Promise.resolve(v);
50
49
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
51
50
  try {
@@ -344,10 +343,15 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
344
343
  var attachStyles = (hostRef) => {
345
344
  const cmpMeta = hostRef.$cmpMeta$;
346
345
  const elm = hostRef.$hostElement$;
346
+ const flags = cmpMeta.$flags$;
347
347
  const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
348
- addStyle(
349
- elm.getRootNode(),
348
+ const scopeId2 = addStyle(
349
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
350
350
  cmpMeta);
351
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
352
+ elm["s-sc"] = scopeId2;
353
+ elm.classList.add(scopeId2 + "-h");
354
+ }
351
355
  endAttachStyles();
352
356
  };
353
357
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
@@ -496,6 +500,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
496
500
  if (!useNativeShadowDom) {
497
501
  checkSlotRelocate = true;
498
502
  if (newVNode2.$tag$ === "slot") {
503
+ if (scopeId) {
504
+ parentElm.classList.add(scopeId + "-s");
505
+ }
499
506
  newVNode2.$flags$ |= newVNode2.$children$ ? (
500
507
  // slot element has fallback content
501
508
  // still create an element that "mocks" the slot element
@@ -526,7 +533,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
526
533
  }
527
534
  if (newVNode2.$children$) {
528
535
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
529
- childNode = createElm(oldParentVNode, newVNode2, i2);
536
+ childNode = createElm(oldParentVNode, newVNode2, i2, elm);
530
537
  if (childNode) {
531
538
  elm.appendChild(childNode);
532
539
  }
@@ -579,9 +586,12 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
579
586
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
580
587
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
581
588
  let childNode;
589
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
590
+ containerElm = containerElm.shadowRoot;
591
+ }
582
592
  for (; startIdx <= endIdx; ++startIdx) {
583
593
  if (vnodes[startIdx]) {
584
- childNode = createElm(null, parentVNode, startIdx);
594
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
585
595
  if (childNode) {
586
596
  vnodes[startIdx].$elm$ = childNode;
587
597
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -668,7 +678,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
668
678
  if (idxInOld >= 0) {
669
679
  elmToMove = oldCh[idxInOld];
670
680
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
671
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
681
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
672
682
  } else {
673
683
  patch(elmToMove, newStartVnode, isInitialRender);
674
684
  oldCh[idxInOld] = void 0;
@@ -676,7 +686,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
676
686
  }
677
687
  newStartVnode = newCh[++newStartIdx];
678
688
  } else {
679
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
689
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
680
690
  newStartVnode = newCh[++newStartIdx];
681
691
  }
682
692
  if (node) {
@@ -880,8 +890,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
880
890
  rootVnode.$tag$ = null;
881
891
  rootVnode.$flags$ |= 4 /* isHost */;
882
892
  hostRef.$vnode$ = rootVnode;
883
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
884
- useNativeShadowDom = supportsShadow ;
893
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
894
+ {
895
+ scopeId = hostElm["s-sc"];
896
+ }
897
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
885
898
  {
886
899
  contentRef = hostElm["s-cr"];
887
900
  checkSlotFallbackVisibility = false;
@@ -1309,6 +1322,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1309
1322
  {
1310
1323
  cmpMeta.$attrsToReflect$ = [];
1311
1324
  }
1325
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
1312
1326
  const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1313
1327
  Object.assign(Cstr.prototype, {
1314
1328
  __registerHost() {
@@ -1317,6 +1331,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1317
1331
  connectedCallback() {
1318
1332
  getHostRef(this);
1319
1333
  connectedCallback(this);
1334
+ if (originalConnectedCallback) {
1335
+ originalConnectedCallback.call(this);
1336
+ }
1320
1337
  },
1321
1338
  disconnectedCallback() {
1322
1339
  disconnectedCallback(this);
@@ -1326,7 +1343,17 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1326
1343
  },
1327
1344
  __attachShadow() {
1328
1345
  {
1329
- this.shadowRoot = this;
1346
+ if (!this.shadowRoot) {
1347
+ {
1348
+ this.attachShadow({ mode: "open" });
1349
+ }
1350
+ } else {
1351
+ if (this.shadowRoot.mode !== "open") {
1352
+ throw new Error(
1353
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
1354
+ );
1355
+ }
1356
+ }
1330
1357
  }
1331
1358
  }
1332
1359
  });
@@ -1528,34 +1555,34 @@ function highlightSpeakingElement(element) {
1528
1555
  if (!document.querySelector(styleId)) {
1529
1556
  const style = document.createElement('style');
1530
1557
  style.id = styleId;
1531
- style.innerHTML = `
1532
- .speaking-highlight {
1533
- --base-transform: ${element.style.transform};
1534
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1535
- // border: 3px solid green !important;
1536
- // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1537
- // transform: scale(1.05); /* Subtle scale effect to pop the element */
1538
- // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1539
-
1540
- }
1541
-
1542
- @keyframes pulseEffect {
1543
- 0% {
1544
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1545
- // transform: var(--base-transform) scale(1.05);
1546
- // background-color: #FFFF0B;
1547
- }
1548
- 50% {
1549
- box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1550
- // transform: var(--base-transform) scale(1.1);
1551
- // background-color: #FFFF0B;
1552
- }
1553
- 100% {
1554
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1555
- // transform: var(--base-transform) scale(1.05);
1556
- // background-color: #FFFF0B;
1557
- }
1558
- }
1558
+ style.innerHTML = `
1559
+ .speaking-highlight {
1560
+ --base-transform: ${element.style.transform};
1561
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1562
+ // border: 3px solid green !important;
1563
+ // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1564
+ // transform: scale(1.05); /* Subtle scale effect to pop the element */
1565
+ // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1566
+
1567
+ }
1568
+
1569
+ @keyframes pulseEffect {
1570
+ 0% {
1571
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1572
+ // transform: var(--base-transform) scale(1.05);
1573
+ // background-color: #FFFF0B;
1574
+ }
1575
+ 50% {
1576
+ box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1577
+ // transform: var(--base-transform) scale(1.1);
1578
+ // background-color: #FFFF0B;
1579
+ }
1580
+ 100% {
1581
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1582
+ // transform: var(--base-transform) scale(1.05);
1583
+ // background-color: #FFFF0B;
1584
+ }
1585
+ }
1559
1586
  `;
1560
1587
  document.head.appendChild(style);
1561
1588
  }
@@ -1627,8 +1654,8 @@ function balanceResult(container, objectiveString) {
1627
1654
  return false;
1628
1655
  const leftVal = Number((_c = (_a = balanceEl.leftVal) !== null && _a !== void 0 ? _a : (_b = balanceEl.dataset) === null || _b === void 0 ? void 0 : _b.leftVal) !== null && _c !== void 0 ? _c : 0);
1629
1656
  const rightVal = Number((_f = (_d = balanceEl.rightVal) !== null && _d !== void 0 ? _d : (_e = balanceEl.dataset) === null || _e === void 0 ? void 0 : _e.rightVal) !== null && _f !== void 0 ? _f : 0);
1630
- const hasLeft = !isNaN(leftVal) && leftVal !== 0;
1631
- const hasRight = !isNaN(rightVal) && rightVal !== 0;
1657
+ const hasLeft = !isNaN(leftVal);
1658
+ const hasRight = !isNaN(rightVal);
1632
1659
  if (!hasLeft || !hasRight) {
1633
1660
  return false;
1634
1661
  }
@@ -1678,6 +1705,7 @@ function enableOptionArea(element) {
1678
1705
  }
1679
1706
  let isDraggingDisabled = false;
1680
1707
  const setDraggingDisabled = (disabled) => {
1708
+ console.log("Setting dragging disabled to:", disabled);
1681
1709
  isDraggingDisabled = disabled;
1682
1710
  };
1683
1711
  function enableDraggingWithScaling(element) {
@@ -2160,6 +2188,9 @@ async function onElementDropComplete(dragElement, dropElement) {
2160
2188
  if (!isCorrect) {
2161
2189
  dragElement.style.transition = 'transform 0.5s ease';
2162
2190
  animateDragToTarget(dragElement, dropElement, container);
2191
+ const onInCorrect = dropElement.getAttribute('onInCorrect');
2192
+ console.log("onincorrectttt", onInCorrect);
2193
+ await executeActions(onInCorrect, dropElement, dragElement);
2163
2194
  setTimeout(() => {
2164
2195
  dragElement.style.transform = 'translate(0, 0)';
2165
2196
  // const oldDropIndex = dragToDropMap[dragElement.getAttribute('data-id')];
@@ -2428,14 +2459,14 @@ async function onClickDropOrDragElement(element, type) {
2428
2459
  if (!document.querySelector('#dynamic-highlight-style')) {
2429
2460
  const style = document.createElement('style');
2430
2461
  style.id = 'dynamic-highlight-style';
2431
- style.innerHTML = `
2432
- .highlight {
2433
- // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
2434
- // border-radius: 12px; /* Larger rounded corners */
2435
- // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
2436
- // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
2437
- // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
2438
- }
2462
+ style.innerHTML = `
2463
+ .highlight {
2464
+ // border: 4px solid #e74c3c; /* Thicker red border for more visibility */
2465
+ // border-radius: 12px; /* Larger rounded corners */
2466
+ // background-color: rgba(231, 76, 60, 0.3); /* Stronger, more noticeable background */
2467
+ // box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.2); /* Stronger shadow */
2468
+ // outline: 4px solid rgba(231, 76, 60, 0.6); /* Glow effect */
2469
+ }
2439
2470
  `;
2440
2471
  document.head.appendChild(style);
2441
2472
  }
@@ -2477,7 +2508,11 @@ async function onClickDropOrDragElement(element, type) {
2477
2508
  }
2478
2509
  const dragToDropMap = new Map();
2479
2510
  async function onClickDragElement(element) {
2480
- AudioPlayer.getI().stop();
2511
+ const audioAttr = element.getAttribute('audio');
2512
+ const hasValidAudio = audioAttr && audioAttr.trim().length > 0;
2513
+ if (hasValidAudio) {
2514
+ AudioPlayer.getI().stop();
2515
+ }
2481
2516
  const dropElements = buildDropHasDragFromDOM();
2482
2517
  const dragEl = element;
2483
2518
  if (!dragEl) {
@@ -2552,6 +2587,7 @@ class AudioPlayer {
2552
2587
  this.audioElement = document.createElement('audio');
2553
2588
  this.audioElement.id = 'audio';
2554
2589
  document.body.appendChild(this.audioElement);
2590
+ this.registerGlobalStopEvents();
2555
2591
  }
2556
2592
  static getI() {
2557
2593
  if (!AudioPlayer.instance) {
@@ -2577,13 +2613,23 @@ class AudioPlayer {
2577
2613
  }
2578
2614
  }
2579
2615
  async play(targetElement) {
2616
+ // Stop any currently playing audio first if target element has audio given
2617
+ try {
2618
+ await AudioPlayer.getI().stop();
2619
+ }
2620
+ catch (e) {
2621
+ console.error('Error stopping audio before speak action:', e);
2622
+ }
2623
+ // then play the target element audio.
2580
2624
  let audioUrl = targetElement.getAttribute('audio') || '';
2625
+ // If no direct audio attribute, check childrens for audio
2581
2626
  if (!audioUrl) {
2582
2627
  const childElements = targetElement.children;
2583
2628
  for (let i = 0; i < childElements.length; i++) {
2584
2629
  const childAudioUrl = childElements[i].getAttribute('audio');
2585
2630
  if (childAudioUrl) {
2586
2631
  audioUrl = childAudioUrl;
2632
+ break;
2587
2633
  }
2588
2634
  }
2589
2635
  }
@@ -2593,18 +2639,21 @@ class AudioPlayer {
2593
2639
  console.log('🚀 Playing audio:', this.audioElement.src);
2594
2640
  try {
2595
2641
  setDraggingDisabled(true);
2596
- await this.audioElement.play();
2597
2642
  highlightSpeakingElement(targetElement);
2643
+ await this.audioElement.play();
2598
2644
  await new Promise(resolve => {
2599
2645
  this.audioElement.onended = () => {
2600
- stopHighlightForSpeakingElement(targetElement);
2601
2646
  resolve();
2602
- setDraggingDisabled(false);
2603
2647
  };
2604
2648
  });
2605
2649
  }
2606
2650
  catch (error) {
2607
- console.log('🚀 Audio play error:', error);
2651
+ console.log('🎧 Audio play error:', error);
2652
+ }
2653
+ finally {
2654
+ this.audioElement.onended = null; // cleanup
2655
+ setDraggingDisabled(false);
2656
+ stopHighlightForSpeakingElement(targetElement);
2608
2657
  }
2609
2658
  }
2610
2659
  // If no audio, use text-to-speech
@@ -2614,12 +2663,34 @@ class AudioPlayer {
2614
2663
  await speakText(targetElement.textContent, targetElement);
2615
2664
  const highlightedElements = document.querySelectorAll('.speaking-highlight');
2616
2665
  highlightedElements.forEach(element => stopHighlightForSpeakingElement(element));
2617
- setDraggingDisabled(false);
2618
2666
  }
2619
2667
  catch (error) {
2620
- console.log('🚀 TTS Error:', error);
2668
+ console.log('🎧 TTS Error:', error);
2621
2669
  }
2670
+ finally {
2671
+ setDraggingDisabled(false);
2672
+ }
2673
+ }
2674
+ }
2675
+ // GLOBAL STOP EVENTS (container change, activity change…)
2676
+ registerGlobalStopEvents() {
2677
+ const stopEvents = [
2678
+ NextContainerKey, PrevContainerKey, LessonEndKey, ActivityChangeKey,
2679
+ ActivityEndKey, GameCompletedKey, GameExitKey
2680
+ ];
2681
+ stopEvents.forEach(key => {
2682
+ window.addEventListener(key, () => this.stop());
2683
+ });
2684
+ }
2685
+ // DESTROY (for hot-reload)
2686
+ destroy() {
2687
+ console.log("AudioPlayer destroyed (hot-reload safe)");
2688
+ this.stop();
2689
+ // Remove DOM element
2690
+ if (this.audioElement.parentNode) {
2691
+ this.audioElement.parentNode.removeChild(this.audioElement);
2622
2692
  }
2693
+ AudioPlayer.instance = undefined;
2623
2694
  }
2624
2695
  }
2625
2696
 
@@ -2779,11 +2850,11 @@ function enableReorderDrag(element) {
2779
2850
  onDropToCategory(element, category);
2780
2851
  }
2781
2852
  if (divEl) {
2782
- const keyframes = `
2783
- @keyframes widthDecrease {
2784
- 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
2785
- 100% { width: 0px; height: 0px;}
2786
- }
2853
+ const keyframes = `
2854
+ @keyframes widthDecrease {
2855
+ 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
2856
+ 100% { width: 0px; height: 0px;}
2857
+ }
2787
2858
  `;
2788
2859
  const styleSheet = document.styleSheets[0];
2789
2860
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -2993,11 +3064,11 @@ function moveWithAnimation(target, overlapped) {
2993
3064
  const dummy = createDummyElement(target);
2994
3065
  dummy.style.visibility = 'hidden';
2995
3066
  dummy.setAttribute('type', 'dummy');
2996
- const keyframes = `
2997
- @keyframes widthIncrease {
2998
- 0% { width: 0px; height: 0px; }
2999
- 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
3000
- }
3067
+ const keyframes = `
3068
+ @keyframes widthIncrease {
3069
+ 0% { width: 0px; height: 0px; }
3070
+ 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
3071
+ }
3001
3072
  `;
3002
3073
  if (!overlapped) {
3003
3074
  const overlapCategory = findMostoverlappedElement(target, 'category');
@@ -4554,7 +4625,11 @@ function addClickListenerForClickType(element) {
4554
4625
  if (lido_buttons === 'lido-arrow-left' || lido_buttons === 'lido-arrow-right') {
4555
4626
  return;
4556
4627
  }
4557
- AudioPlayer.getI().stop();
4628
+ const audioAttr = element.getAttribute('audio');
4629
+ const hasValidAudio = audioAttr && audioAttr.trim().length > 0;
4630
+ if (hasValidAudio) {
4631
+ AudioPlayer.getI().stop();
4632
+ }
4558
4633
  const container = document.getElementById(LidoContainer);
4559
4634
  const objective = container['objective'].split(',');
4560
4635
  const checkButton = document.querySelector('#lido-checkButton');
@@ -69467,15 +69542,15 @@ function calculateFill(input, currentFill = 0) {
69467
69542
  // Helper to animate and remove the active equation cell
69468
69543
  const animationToRemoveEquationSolvedCellForNimbleTable = (activeCell, allCalculateTypes) => {
69469
69544
  return new Promise((resolve) => {
69470
- const keyframes = `
69471
- @keyframes widthDecrease {
69472
- 0% {
69473
- background-color: ${activeCell.style.backgroundColor};
69474
- height: ${activeCell.style.height};
69475
- margin: ${activeCell.style.margin};
69476
- ${activeCell.innerHTML = ""}
69477
- }
69478
- 100% { background-color: transparent; height: 0px; margin: 0px; }
69545
+ const keyframes = `
69546
+ @keyframes widthDecrease {
69547
+ 0% {
69548
+ background-color: ${activeCell.style.backgroundColor};
69549
+ height: ${activeCell.style.height};
69550
+ margin: ${activeCell.style.margin};
69551
+ ${activeCell.innerHTML = ""}
69552
+ }
69553
+ 100% { background-color: transparent; height: 0px; margin: 0px; }
69479
69554
  }`;
69480
69555
  const styleSheet = document.styleSheets[0];
69481
69556
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -70008,7 +70083,15 @@ const executeActions = async (actionsString, thisElement, element) => {
70008
70083
  break;
70009
70084
  }
70010
70085
  case 'speak': {
70011
- await AudioPlayer.getI().play(targetElement);
70086
+ const val = (action.value || '').toString().trim().toLowerCase();
70087
+ if (val === 'true' || val === '1' || val === 'yes') {
70088
+ try {
70089
+ await AudioPlayer.getI().play(targetElement);
70090
+ }
70091
+ catch (err) {
70092
+ console.error('Error playing audio for speak action:', err);
70093
+ }
70094
+ }
70012
70095
  break;
70013
70096
  }
70014
70097
  case 'fill-slide': {
@@ -70130,6 +70213,10 @@ const executeActions = async (actionsString, thisElement, element) => {
70130
70213
  }
70131
70214
  break;
70132
70215
  }
70216
+ case 'updatedAnswer': {
70217
+ updatedAnswer();
70218
+ break;
70219
+ }
70133
70220
  default: {
70134
70221
  targetElement.style[action.action] = action.value;
70135
70222
  break;
@@ -70160,11 +70247,11 @@ const afterDropDragHandling = (dragElement, dropElement) => {
70160
70247
  }
70161
70248
  dummyElement.setAttribute('id', dragElement.getAttribute('id'));
70162
70249
  dragElement.replaceWith(dummyElement);
70163
- const keyframes = `
70164
- @keyframes widthDecrease {
70165
- 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
70166
- 100% { width: 0px; height: 0px; margin: 0px;}
70167
- }
70250
+ const keyframes = `
70251
+ @keyframes widthDecrease {
70252
+ 0% { width: ${dragElement.style.width}; height: ${dragElement.style.height}; margin: ${dragElement.style.margin}; }
70253
+ 100% { width: 0px; height: 0px; margin: 0px;}
70254
+ }
70168
70255
  `;
70169
70256
  if (!isInfinite) {
70170
70257
  dummyElement.style.width = element.style.width;
@@ -70327,10 +70414,6 @@ async function onActivityComplete(dragElement, dropElement) {
70327
70414
  await executeActions(onCorrect, dropElement, dragElement);
70328
70415
  }
70329
70416
  }
70330
- else {
70331
- const onInCorrect = dropElement.getAttribute('onInCorrect');
70332
- await executeActions(onInCorrect, dropElement, dragElement);
70333
- }
70334
70417
  }
70335
70418
  let dragScore = buildDragSelectedMapFromDOM();
70336
70419
  const sortedValues = getSortedValuesArrayFromMap(dragScore);
@@ -70342,21 +70425,6 @@ async function onActivityComplete(dragElement, dropElement) {
70342
70425
  drag[index] = [];
70343
70426
  }
70344
70427
  drag[index].push(dragElement.id);
70345
- // localStorage.setItem(DragMapKey, JSON.stringify(drag));
70346
- Object.keys(dragScore).sort((a, b) => parseInt(a) - parseInt(b));
70347
- if (dragElement && dropElement) {
70348
- const isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
70349
- if (isCorrect) {
70350
- const onCorrect = dropElement.getAttribute('onCorrect');
70351
- if (onCorrect) {
70352
- await executeActions(onCorrect, dropElement, dragElement);
70353
- }
70354
- }
70355
- else {
70356
- const onInCorrect = dropElement.getAttribute('onInCorrect');
70357
- await executeActions(onInCorrect, dropElement, dragElement);
70358
- }
70359
- }
70360
70428
  const allElements = document.querySelectorAll("[type='drop']");
70361
70429
  allElements.forEach(otherElement => {
70362
70430
  var _a;
@@ -70446,6 +70514,7 @@ const validateObjectiveStatus = async () => {
70446
70514
  return;
70447
70515
  const objectiveString = container['objective'];
70448
70516
  const additionalCheck = container.getAttribute('equationCheck');
70517
+ container.getAttribute('isAllowOnlyCorrect') === 'true' || '';
70449
70518
  console.log('🚀 ~ validateObjectiveStatus ~ additionalCheck:', additionalCheck);
70450
70519
  let equationGiven = false;
70451
70520
  if (objectiveString == null || objectiveString.length === 0) {
@@ -70497,13 +70566,15 @@ const validateObjectiveStatus = async () => {
70497
70566
  await calculateScore();
70498
70567
  }
70499
70568
  else {
70500
- const onInCorrect = container.getAttribute('onInCorrect');
70501
- await executeActions(onInCorrect, container);
70502
70569
  const isContinueOnCorrect = container.getAttribute('is-continue-on-correct') === 'true';
70503
70570
  if (!isContinueOnCorrect) {
70504
70571
  triggerNextContainer();
70505
70572
  await calculateScore();
70506
70573
  }
70574
+ else {
70575
+ const onInCorrect = container.getAttribute('onInCorrect');
70576
+ await executeActions(onInCorrect, container);
70577
+ }
70507
70578
  }
70508
70579
  };
70509
70580
  const triggerNextContainer = () => {
@@ -71067,14 +71138,14 @@ const SumTogetherAnimation = async (element, value) => {
71067
71138
  const sign = ((signElement && ((signElement.getAttribute('string') || signElement.textContent) || '')).toString().trim() === '+') ? '+' : '-';
71068
71139
  if (sign === '-') {
71069
71140
  // '-' flow: reveal one by one then change bgColor of last B to red
71070
- for (let i = 0; i < topRowChildren.length; i++) {
71141
+ for (let i = 0; i < Math.min(number1, topRowChildren.length); i++) {
71071
71142
  await new Promise(resolve => setTimeout(resolve, 75));
71072
71143
  showElement(topRowChildren[i]);
71073
71144
  }
71074
71145
  elementAppearance(true);
71075
71146
  await new Promise(r => setTimeout(r, 500));
71076
71147
  for (let k = 0; k < Math.min(number2, topRowChildren.length); k++) {
71077
- const idx = topRowChildren.length - 1 - k;
71148
+ const idx = Math.min(number1, topRowChildren.length) - 1 - k;
71078
71149
  setImageBackground(topRowChildren[idx], 'red');
71079
71150
  await new Promise(r => setTimeout(r, 200));
71080
71151
  }
@@ -71099,5 +71170,16 @@ const SumTogetherAnimation = async (element, value) => {
71099
71170
  elementAppearance(false);
71100
71171
  }
71101
71172
  };
71173
+ const updatedAnswer = () => {
71174
+ const container = document.getElementById(LidoContainer);
71175
+ if (!container)
71176
+ return;
71177
+ const answerText = container.querySelector('#answer');
71178
+ if (!answerText)
71179
+ return;
71180
+ const equationAttr = container.getAttribute('equationCheck') || '';
71181
+ const calculatedValue = equationCheck(equationAttr);
71182
+ answerText.setAttribute('string', String(calculatedValue));
71183
+ };
71102
71184
 
71103
71185
  export { ActivityScoreKey as A, generateUUIDFallback as B, exitUrl as C, prevUrl as D, nextUrl as E, speakUrl as F, getCancelBtnPopup as G, H, triggerPrevcontainer as I, setCancelBtnPopup as J, getDefaultExportFromCjs as K, LidoContainer as L, tinyColor as M, NextContainerKey as N, triggerNextContainer as O, PrevContainerKey as P, DropAction as Q, RiveService as R, SelectedValuesKey as S, validateObjectiveStatus as T, fraction as U, TraceMode as V, speakIcon as W, fingerUrl as X, setNonce as a, setPlatformOptions as b, commonjsGlobal as c, setVisibilityWithDelay as d, convertUrlToRelative as e, format as f, getAssetPath$1 as g, h, initEventsForElement as i, Host as j, parseProp as k, createEvent as l, equationCheck as m, storingEachActivityScore as n, executeActions as o, proxyCustomElement as p, handlingChildElements as q, attachSpeakIcon as r, setAssetPath as s, calculateScale as t, handleFloatElementPosition as u, handleElementClick as v, dispatchActivityChangeEvent as w, dispatchGameCompletedEvent as x, dispatchGameExitEvent as y, AudioPlayer as z };
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, q as handlingChildElements, r as attachSpeakIcon, k as parseProp, h, j as Host } from './p-bed94c37.js';
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, q as handlingChildElements, r as attachSpeakIcon, k as parseProp, h, j as Host } from './p-d0131159.js';
2
2
 
3
3
  const lidoCellCss = ".lido-col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.lido-col>*{}.lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}.lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}.lido-pos{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);display:flex;justify-content:space-around;flex-direction:column;position:fixed}.lido-pos>*{position:absolute}.lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}.lido-col::-webkit-scrollbar,.lido-wrap::-webkit-scrollbar,.lido-flex::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width)}.lido-col::-webkit-scrollbar-thumb,.lido-wrap::-webkit-scrollbar-thumb,.lido-flex::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px;border:3px solid transparent;background-clip:content-box}.lido-col::-webkit-scrollbar-track,.lido-wrap::-webkit-scrollbar-track,.lido-flex::-webkit-scrollbar-track{background:#f1f1f1}";
4
4
  const LidoCellStyle0 = lidoCellCss;
@@ -129,7 +129,7 @@ const LidoCell = /*@__PURE__*/ proxyCustomElement(class LidoCell extends H {
129
129
  this.el.className = `lido-${parseProp(this.layout, orientation)}`;
130
130
  }
131
131
  render() {
132
- return (h(Host, { key: '00183a8d67c4c64eae2d2bb2e3db5def7ffe3caf', id: this.id, class: "lido-cell", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, minDrops: this.minDrops, maxDrops: this.maxDrops, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "flex-direction": this.flexDirection, "disable-speak": this.disableSpeak }, h("slot", { key: '33fbb691c5c8f015bc9c6cf1e86c237758f126c3' })));
132
+ return (h(Host, { key: 'eaf89c6fa3df6df4438063d4e2c2ca59cbf8aa25', id: this.id, class: "lido-cell", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, minDrops: this.minDrops, maxDrops: this.maxDrops, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "flex-direction": this.flexDirection, "disable-speak": this.disableSpeak }, h("slot", { key: '9efb1d5e7de65783cab4de3e5479260c85ffc3b1' })));
133
133
  }
134
134
  get el() { return this; }
135
135
  static get style() { return LidoCellStyle0; }
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, V as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, W as speakIcon, o as executeActions, O as triggerNextContainer, L as LidoContainer, k as parseProp, h, j as Host, X as fingerUrl } from './p-bed94c37.js';
1
+ import { p as proxyCustomElement, H, V as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, W as speakIcon, o as executeActions, O as triggerNextContainer, L as LidoContainer, k as parseProp, h, j as Host, X as fingerUrl } from './p-d0131159.js';
2
2
 
3
3
  const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#CF1565;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{}.lido-flow-indicator{stroke:blue;stroke-width:2;stroke-dasharray:6, 6;fill:none}.lido-trace{height:700px;width:700px;z-index:1;justify-items:center;align-content:center}.trace-animate{animation:trace-bounce 0.5s}@keyframes trace-bounce{0%{transform:scale(1)}30%{transform:scale(1.05)}60%{transform:scale(0.95)}100%{transform:scale(1)}}";
4
4
  const LidoTraceStyle0 = lidoTraceCss;
@@ -715,7 +715,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
715
715
  };
716
716
  }
717
717
  render() {
718
- return (h(Host, { key: '6be6d97477a80afc0275eef5b17718a5f43ce358', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: '4e650d7142c61549aec021fd2a8da4e592eaf94e', style: this.style, id: "lido-svgContainer" })));
718
+ return (h(Host, { key: 'b562e07d98a06f422ce5b8ca1d08f9c4307a313c', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: 'fc2cb8355a26e5b483c24c59641bd20fa37e853b', style: this.style, id: "lido-svgContainer" })));
719
719
  }
720
720
  static get assetsDirs() { return ["svg", "images"]; }
721
721
  get el() { return this; }