lido-player 0.0.2-alpha-53-dev → 0.0.2-alpha-56-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 (99) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_22.cjs.entry.js +141 -23
  3. package/dist/cjs/lido-player.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-3c1ce74e.js → utils-a61cfc6b.js} +41 -12
  6. package/dist/collection/components/calculator/lido-calculator.js +4 -2
  7. package/dist/collection/components/home/lido-home.js +35 -6
  8. package/dist/collection/components/mathMatrix/lido-math-matrix.js +8 -6
  9. package/dist/collection/components/shape/lido-shape.css +90 -0
  10. package/dist/collection/components/shape/lido-shape.js +41 -6
  11. package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
  12. package/dist/collection/components/text/lido-text.js +26 -1
  13. package/dist/collection/components/trace/lido-trace.js +57 -4
  14. package/dist/collection/components/wrap/lido-wrap.js +1 -1
  15. package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
  16. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +2 -2
  17. package/dist/collection/stories/Templates/blender/blender.stories.js +3 -3
  18. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +6 -4
  19. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +38 -32
  20. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +2 -2
  21. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +68 -60
  22. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +6 -5
  23. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +991 -0
  24. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +8 -8
  25. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +144 -0
  26. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +8 -4
  27. package/dist/collection/utils/constants.js +2 -0
  28. package/dist/collection/utils/customEvents.js +1 -0
  29. package/dist/collection/utils/utils.js +7 -1
  30. package/dist/collection/utils/utilsHandlers/animationHandler.js +21 -1
  31. package/dist/collection/utils/utilsHandlers/clickHandler.js +1 -1
  32. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +4 -3
  33. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +4 -5
  34. package/dist/components/index.js +1 -1
  35. package/dist/components/lido-avatar.js +1 -1
  36. package/dist/components/lido-balance.js +1 -1
  37. package/dist/components/lido-calculator.js +1 -1
  38. package/dist/components/lido-canvas.js +1 -1
  39. package/dist/components/lido-cell.js +1 -1
  40. package/dist/components/lido-col.js +1 -1
  41. package/dist/components/lido-container.js +1 -1
  42. package/dist/components/lido-flash-card.js +1 -1
  43. package/dist/components/lido-float.js +1 -1
  44. package/dist/components/lido-home.js +1 -1
  45. package/dist/components/lido-image.js +1 -1
  46. package/dist/components/lido-keyboard.js +1 -1
  47. package/dist/components/lido-math-matrix.js +1 -1
  48. package/dist/components/lido-pos.js +1 -1
  49. package/dist/components/lido-random.js +1 -1
  50. package/dist/components/lido-root.js +22 -22
  51. package/dist/components/lido-row.js +1 -1
  52. package/dist/components/lido-shape.js +1 -1
  53. package/dist/components/lido-slide-fill.js +1 -1
  54. package/dist/components/lido-text.js +1 -1
  55. package/dist/components/lido-trace.js +1 -1
  56. package/dist/components/lido-wrap.js +1 -1
  57. package/dist/components/{p-511377d2.js → p-0712a27e.js} +39 -13
  58. package/dist/components/{p-df1af62c.js → p-0a41b2f8.js} +1 -1
  59. package/dist/components/{p-d568d595.js → p-17f84b2f.js} +1 -1
  60. package/dist/components/{p-09b3b152.js → p-21852d55.js} +1 -1
  61. package/dist/components/{p-561908ec.js → p-2829c82c.js} +1 -1
  62. package/dist/components/{p-71ded596.js → p-330caab8.js} +2 -2
  63. package/dist/components/{p-8774f517.js → p-480f708a.js} +1 -1
  64. package/dist/components/{p-cca545f9.js → p-4d332eab.js} +1 -1
  65. package/dist/components/{p-92b9ae9e.js → p-4e041807.js} +2 -2
  66. package/dist/components/{p-b3e67e7f.js → p-7ab0a273.js} +26 -2
  67. package/dist/components/{p-567983a9.js → p-882b291d.js} +2 -2
  68. package/dist/components/{p-875c1411.js → p-9104d427.js} +1 -1
  69. package/dist/components/{p-3e8ae1c5.js → p-b9875116.js} +57 -4
  70. package/dist/components/{p-004adc43.js → p-c4739621.js} +6 -4
  71. package/dist/components/p-cca36777.js +128 -0
  72. package/dist/components/{p-9ea1a67d.js → p-d1b5079b.js} +1 -1
  73. package/dist/components/{p-057fb7b8.js → p-e1ba0c44.js} +38 -26
  74. package/dist/components/{p-3f0e4436.js → p-eab0ebb7.js} +1 -1
  75. package/dist/components/{p-90f7dd48.js → p-f2b53e8e.js} +2 -2
  76. package/dist/components/{p-d2fe2bb6.js → p-f3bc4577.js} +1 -1
  77. package/dist/components/{p-6beee44b.js → p-ff801ba1.js} +1 -1
  78. package/dist/components/{p-23549651.js → p-ffc40642.js} +7 -5
  79. package/dist/esm/index.js +1 -1
  80. package/dist/esm/lido-avatar_22.entry.js +141 -23
  81. package/dist/esm/lido-player.js +1 -1
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/esm/{utils-eefe4a1c.js → utils-7ed76799.js} +39 -13
  84. package/dist/lido-player/index.esm.js +1 -1
  85. package/dist/lido-player/lido-player.esm.js +1 -1
  86. package/dist/lido-player/{p-589fc3b8.js → p-17d93181.js} +2 -2
  87. package/dist/lido-player/p-fa9dfdf8.entry.js +1 -0
  88. package/dist/types/components/home/lido-home.d.ts +3 -0
  89. package/dist/types/components/shape/lido-shape.d.ts +8 -2
  90. package/dist/types/components/text/lido-text.d.ts +1 -0
  91. package/dist/types/components/trace/lido-trace.d.ts +2 -1
  92. package/dist/types/components.d.ts +2 -0
  93. package/dist/types/stories/Templates/fillAnswer/fill-answer.stories.d.ts +1 -1
  94. package/dist/types/stories/Templates/quizMaths/quizMaths.stories.d.ts +16 -0
  95. package/dist/types/stories/Templates/tenBox/tenBox.stories.d.ts +4 -0
  96. package/dist/types/utils/constants.d.ts +2 -0
  97. package/package.json +1 -1
  98. package/dist/components/p-0733b277.js +0 -100
  99. package/dist/lido-player/p-4d9ad047.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { L as LidoText$1, d as defineCustomElement$1 } from './p-b3e67e7f.js';
1
+ import { L as LidoText$1, d as defineCustomElement$1 } from './p-7ab0a273.js';
2
2
 
3
3
  const LidoText = LidoText$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoTrace$1, d as defineCustomElement$1 } from './p-3e8ae1c5.js';
1
+ import { L as LidoTrace$1, d as defineCustomElement$1 } from './p-b9875116.js';
2
2
 
3
3
  const LidoTrace = LidoTrace$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoWrap$1, d as defineCustomElement$1 } from './p-92b9ae9e.js';
1
+ import { L as LidoWrap$1, d as defineCustomElement$1 } from './p-4e041807.js';
2
2
 
3
3
  const LidoWrap = LidoWrap$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1383,6 +1383,8 @@ const DropLength = 'dropLength';
1383
1383
  const DropToAttr = 'drop-to';
1384
1384
  const DropTimeAttr = 'drop-time';
1385
1385
  const LidoContainer = 'lido-container';
1386
+ const LIDO_COMMON_AUDIO_PATH = '__LIDO_COMMON_AUDIO_PATH__';
1387
+ const LIDO_COMMON_AUDIO_READY_EVENT = 'lidoCommonAudioPathReady';
1386
1388
  var TraceMode;
1387
1389
  (function (TraceMode) {
1388
1390
  TraceMode["NoFlow"] = "noFlow";
@@ -1418,6 +1420,7 @@ const speakUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/pub
1418
1420
  const fingerUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg';
1419
1421
 
1420
1422
  function dispatchCustomEvent(eventName, detail) {
1423
+ console.log("👍Event Name : ", eventName, "Detail : ", detail.toString());
1421
1424
  const event = new CustomEvent(eventName, { detail });
1422
1425
  window.dispatchEvent(event);
1423
1426
  }
@@ -1613,7 +1616,7 @@ function updateBalanceOnDrop(dragElement, dropElement) {
1613
1616
  }
1614
1617
  function calculateValue(elements, operation) {
1615
1618
  if (elements.length === 0)
1616
- return 0;
1619
+ return null;
1617
1620
  if (operation === "count") {
1618
1621
  return elements.length;
1619
1622
  }
@@ -1645,18 +1648,15 @@ function calculateValue(elements, operation) {
1645
1648
  }
1646
1649
  }
1647
1650
  function balanceResult(container, objectiveString) {
1648
- var _a, _b, _c, _d, _e, _f;
1649
1651
  const additionalCheck = container.getAttribute('equationCheck');
1650
1652
  if (!additionalCheck)
1651
1653
  return false;
1652
1654
  const balanceEl = document.querySelector('lido-balance');
1653
1655
  if (!balanceEl)
1654
1656
  return false;
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);
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);
1657
- const hasLeft = !isNaN(leftVal);
1658
- const hasRight = !isNaN(rightVal);
1659
- if (!hasLeft || !hasRight) {
1657
+ const leftVal = balanceEl.leftVal;
1658
+ const rightVal = balanceEl.rightVal;
1659
+ if (leftVal == null || rightVal == null) {
1660
1660
  return false;
1661
1661
  }
1662
1662
  const symbol = leftVal > rightVal ? '>' : leftVal < rightVal ? '<' : '=';
@@ -1665,9 +1665,11 @@ function balanceResult(container, objectiveString) {
1665
1665
  return res;
1666
1666
  }
1667
1667
 
1668
+ const tempVanishedValues = [];
1668
1669
  function dragDropAnimation(container, dragElement, dropElement) {
1669
- container.style.pointerEvents = 'none';
1670
+ container.style.pointerEvents = "none";
1670
1671
  setTimeout(() => {
1672
+ var _a, _b, _c;
1671
1673
  const div = document.createElement('div');
1672
1674
  container.append(div);
1673
1675
  div.classList.add('after-drop-popup-container');
@@ -1676,6 +1678,11 @@ function dragDropAnimation(container, dragElement, dropElement) {
1676
1678
  const allDragElements = container.querySelectorAll('[type="drag"]');
1677
1679
  const dragParents = Array.from(allDragElements).map(el => el.parentElement);
1678
1680
  const allSameParent = dragParents.every(parent => parent === dragElement.parentElement);
1681
+ JSON.parse((_a = container.getAttribute(SelectedValuesKey)) !== null && _a !== void 0 ? _a : '[]');
1682
+ const vanishedValue = (_b = dragElement.getAttribute('value')) !== null && _b !== void 0 ? _b : (_c = dragElement.textContent) === null || _c === void 0 ? void 0 : _c.trim();
1683
+ if (vanishedValue) {
1684
+ tempVanishedValues.push(vanishedValue);
1685
+ }
1679
1686
  // Remove from old parents
1680
1687
  if (allSameParent) {
1681
1688
  dragElement.remove();
@@ -1699,6 +1706,17 @@ function dragDropAnimation(container, dragElement, dropElement) {
1699
1706
  setTimeout(() => {
1700
1707
  div.remove();
1701
1708
  container.style.pointerEvents = 'auto';
1709
+ const objective = container.getAttribute('objective');
1710
+ if (objective && tempVanishedValues.map(v => v.trim()).sort().join(',') === objective.split(',').map(v => v.trim()).sort().join(',')) {
1711
+ (async () => {
1712
+ // isCorrect=true;
1713
+ const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
1714
+ await executeActions(onCorrect, container);
1715
+ window.dispatchEvent(new CustomEvent(NextContainerKey));
1716
+ calculateScore();
1717
+ tempVanishedValues.length = 0;
1718
+ })();
1719
+ }
1702
1720
  }, 800); // match animation duration
1703
1721
  }, 2000); // stay for 2 seconds
1704
1722
  }, 250);
@@ -1973,9 +1991,12 @@ function enableDraggingWithScaling(element) {
1973
1991
  otherElement.style.border = ''; // Reset border
1974
1992
  otherElement.style.backgroundColor = 'transparent'; // Reset background color
1975
1993
  }
1976
- if (otherElement.tagName.toLowerCase() === 'lido-image') {
1994
+ else if (otherElement.tagName.toLowerCase() === 'lido-image') {
1977
1995
  otherElement.style.opacity = '0';
1978
1996
  }
1997
+ else {
1998
+ otherElement.style.opacity = '1';
1999
+ }
1979
2000
  }
1980
2001
  }
1981
2002
  else {
@@ -2407,7 +2428,6 @@ async function onElementDropComplete(dragElement, dropElement) {
2407
2428
  dispatchElementDropEvent(dragElement, dropElement, isCorrect);
2408
2429
  // storingEachActivityScore(isCorrect);
2409
2430
  dragElement.style.opacity = '1';
2410
- await onActivityComplete(dragElement, dropElement);
2411
2431
  const allDropElements = document.querySelectorAll('.drop-element');
2412
2432
  allDropElements.forEach(el => updateDropBorder(el));
2413
2433
  await onActivityComplete(dragElement, dropElement);
@@ -4572,7 +4592,7 @@ function onTouchListenerForOnTouch(element) {
4572
4592
  return;
4573
4593
  const container = document.getElementById('lido-container');
4574
4594
  // const container = element.closest('lido-container') as HTMLElement;
4575
- if (container && container.getAttribute('disableSpeak') === 'true') {
4595
+ if (container && container.getAttribute('disable-speak') === 'true') {
4576
4596
  return;
4577
4597
  }
4578
4598
  // if (element.closest('[disableSpeak="true"]')) {
@@ -70495,6 +70515,8 @@ async function onActivityComplete(dragElement, dropElement) {
70495
70515
  await executeActions("this.alignMatch='true'", dropElement, dragElement);
70496
70516
  if (dragElement && dropElement) {
70497
70517
  const isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
70518
+ // storing each activity score based on isCorrect for (all drag-drop events)
70519
+ storingEachActivityScore(isCorrect);
70498
70520
  if (isCorrect) {
70499
70521
  const onCorrect = dropElement.getAttribute('onCorrect');
70500
70522
  if (onCorrect) {
@@ -70641,6 +70663,7 @@ const validateObjectiveStatus = async () => {
70641
70663
  if (attach === 'true') {
70642
70664
  appendingDragElementsInDrop();
70643
70665
  }
70666
+ storingEachActivityScore(true);
70644
70667
  await executeActions(onCorrect, container);
70645
70668
  }
70646
70669
  if (container.getAttribute('dropAttr') === 'EnableAnimation') {
@@ -70656,12 +70679,12 @@ const validateObjectiveStatus = async () => {
70656
70679
  else {
70657
70680
  const isContinueOnCorrect = container.getAttribute('is-continue-on-correct') === 'true';
70658
70681
  if (!isContinueOnCorrect) {
70659
- triggerNextContainer();
70660
70682
  await calculateScore();
70661
70683
  triggerNextContainer();
70662
70684
  }
70663
70685
  else {
70664
70686
  const onInCorrect = container.getAttribute('onInCorrect');
70687
+ storingEachActivityScore(false);
70665
70688
  await executeActions(onInCorrect, container);
70666
70689
  }
70667
70690
  }
@@ -70684,6 +70707,9 @@ function convertUrlToRelative(url) {
70684
70707
  if ((url === null || url === void 0 ? void 0 : url.startsWith('http')) || (url === null || url === void 0 ? void 0 : url.startsWith('blob')) || (url === null || url === void 0 ? void 0 : url.startsWith('data'))) {
70685
70708
  return url;
70686
70709
  }
70710
+ if (url.startsWith('/Lido-CommonAudios/')) {
70711
+ return url;
70712
+ }
70687
70713
  if (baseUrl) {
70688
70714
  const newUrl = url.startsWith('/') ? url.slice(1) : url;
70689
70715
  if (newUrl.startsWith(baseUrl.replace(/^\/+|\/+$/g, '')))
@@ -71316,4 +71342,4 @@ const updateCalculatorAnswer = (el) => {
71316
71342
  el.setAttribute('string', value);
71317
71343
  };
71318
71344
 
71319
- export { ActivityScoreKey as A, generateUUIDFallback as B, exitUrl as C, prevUrl as D, nextUrl as E, speakUrl as F, getCancelBtnPopup as G, H, matchStringPattern as I, triggerNextContainer as J, triggerPrevcontainer as K, LidoContainer as L, setCancelBtnPopup as M, NextContainerKey as N, getDefaultExportFromCjs as O, PrevContainerKey as P, tinyColor as Q, RiveService as R, SelectedValuesKey as S, DropAction as T, validateObjectiveStatus as U, fraction as V, TraceMode as W, speakIcon as X, fingerUrl as Y, 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 };
71345
+ export { fingerUrl as $, ActivityScoreKey as A, dispatchGameExitEvent as B, AudioPlayer as C, generateUUIDFallback as D, exitUrl as E, prevUrl as F, nextUrl as G, H, speakUrl as I, LidoContainer as J, getCancelBtnPopup as K, LIDO_COMMON_AUDIO_READY_EVENT as L, matchStringPattern as M, NextContainerKey as N, triggerNextContainer as O, PrevContainerKey as P, triggerPrevcontainer as Q, RiveService as R, SelectedValuesKey as S, setCancelBtnPopup as T, getDefaultExportFromCjs as U, tinyColor as V, DropAction as W, validateObjectiveStatus as X, fraction as Y, TraceMode as Z, speakIcon as _, 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, calculateScore as q, handlingChildElements as r, setAssetPath as s, attachSpeakIcon as t, LIDO_COMMON_AUDIO_PATH as u, calculateScale as v, handleFloatElementPosition as w, handleElementClick as x, dispatchActivityChangeEvent as y, dispatchGameCompletedEvent as z };
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, p as proxyCustomElement, H, g as getAssetPath, d as setVisibilityWithDelay, i as initEventsForElement, e as convertUrlToRelative, h, j as Host, R as RiveService } from './p-511377d2.js';
1
+ import { c as commonjsGlobal, p as proxyCustomElement, H, g as getAssetPath, d as setVisibilityWithDelay, i as initEventsForElement, e as convertUrlToRelative, h, j as Host, R as RiveService } from './p-0712a27e.js';
2
2
 
3
3
  var rive = {exports: {}};
4
4
 
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, u as handleFloatElementPosition, v as handleElementClick, k as parseProp, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, w as handleFloatElementPosition, x as handleElementClick, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoFloatCss = ".lido-float{position:relative}.lido-float>*{position:absolute;cursor:pointer}@keyframes float-up{from{top:var(--el-top)}to{top:-500px}}#removeShadow{box-shadow:unset !important}@keyframes float-lr{from{right:var(--el-left)}to{right:-500px}}";
4
4
  const LidoFloatStyle0 = lidoFloatCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoBalanceCss = "#lido-balance{position:relative;height:500px;width:1205px;top:20%;left:-91px;z-index:0}.lido-balance-symbol{position:absolute;top:64%;left:50%;transform:translate(-50%, -50%);font-size:5vw;font-weight:bold;color:black;pointer-events:none;z-index:999}@media (orientation: portrait){.lido-balance-shadow{height:100px;position:absolute;top:80%;left:28%}}@media (orientation: landscape){.lido-balance-shadow{height:100px;position:absolute;top:90%;left:33%}}@media (orientation: portrait){#pivotimg{position:absolute;height:auto;width:23%;bottom:18%;left:38%;z-index:100}}#pivotimg::after{content:\"\";position:absolute;bottom:-30px;left:50%;transform:translateX(-50%);width:120%;height:60px;background-image:url(\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/balancing/Shadow.svg\");background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;z-index:10}@media (orientation: landscape){#pivotimg{position:absolute;height:auto;width:23%;bottom:8%;left:38%;z-index:100}}.lido-balance .pivot svg{width:100%;height:auto}#scaleimg{position:absolute;width:73%;height:auto;top:61%;left:14%;z-index:90}.lido-balance .scale svg{width:100%;height:auto}@media (orientation: landscape){#handlerimg{position:absolute;width:35%;height:auto;top:49%;left:2%}}@media (orientation:portrait ){#handlerimg{position:absolute;width:35%;height:auto;top:53%;left:2%}}.lido-balance .handler svg{width:100%;height:auto;fill:brown}@media (orientation: landscape){#handimg{position:absolute;width:35%;height:auto;top:49%;right:2%}}@media (orientation:portrait){#handimg{position:absolute;width:35%;height:auto;top:53%;right:2%}}.lido-balance .hand svg{width:100%;height:auto;fill:brown}.pivot svg path:nth-of-type(1){fill:brown}.pivot svg path[d^=\"M78.9414\"]{fill:white}";
4
4
  const LidoBalanceStyle0 = lidoBalanceCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, q as handlingChildElements, r as attachSpeakIcon, k as parseProp, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoRowCss = ".lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}";
4
4
  const LidoRowStyle0 = lidoRowCss;
@@ -1,5 +1,5 @@
1
- import { p as proxyCustomElement, H, S as SelectedValuesKey, L as LidoContainer, o as executeActions, J as triggerNextContainer, u as handleFloatElementPosition, n as storingEachActivityScore, T as DropAction, k as parseProp, h, j as Host } from './p-511377d2.js';
2
- import { d as defineCustomElement$1 } from './p-b3e67e7f.js';
1
+ import { p as proxyCustomElement, H, S as SelectedValuesKey, J as LidoContainer, o as executeActions, O as triggerNextContainer, w as handleFloatElementPosition, n as storingEachActivityScore, W as DropAction, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
+ import { d as defineCustomElement$1 } from './p-7ab0a273.js';
3
3
 
4
4
  const lidoKeyboardCss = ".lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type=\"text\"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}";
5
5
  const LidoKeyboardStyle0 = lidoKeyboardCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, k as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, k as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoFlashCardCss = ".card{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform 0.6s ease;cursor:pointer}.card.flipped{transform:rotateY(180deg)}.card-face{position:absolute;width:100%;height:100%;backface-visibility:hidden;display:flex;align-items:center;justify-content:center}.card-back{transform:rotateY(180deg)}";
4
4
  const LidoFlashCardStyle0 = lidoFlashCardCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoPosCss = ".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}";
4
4
  const LidoPosStyle0 = lidoPosCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, q as handlingChildElements, r as attachSpeakIcon, k as parseProp, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoWrapCss = ".lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;background-color:var(--child-bg-color, #f0f0f0);box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}";
4
4
  const LidoWrapStyle0 = lidoWrapCss;
@@ -78,7 +78,7 @@ const LidoWrap = /*@__PURE__*/ proxyCustomElement(class LidoWrap extends H {
78
78
  };
79
79
  }
80
80
  render() {
81
- return (h(Host, { key: '50bc5770105477d0ef7cb080957c8d00198c8b09', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, disableSpeak: this.disableSpeak }, h("slot", { key: 'fcd1f5801e34171d1925e39f6c543f229a5d42bd' })));
81
+ return (h(Host, { key: 'ba0767c8fb70d3c20dbcc0835794ec58d62078b3', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, disableSpeak: this.disableSpeak }, h("slot", { key: '359ff37390f0d20e650481cd8d531ad4da55b308' })));
82
82
  }
83
83
  get el() { return this; }
84
84
  static get style() { return LidoWrapStyle0; }
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, r as attachSpeakIcon, e as convertUrlToRelative, k as parseProp, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, t as attachSpeakIcon, L as LIDO_COMMON_AUDIO_READY_EVENT, e as convertUrlToRelative, k as parseProp, h, j as Host, u as LIDO_COMMON_AUDIO_PATH } from './p-0712a27e.js';
2
2
  import { i as instance } from './p-73e3f0f4.js';
3
3
 
4
4
  const lidoTextCss = ".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}";
@@ -57,6 +57,30 @@ const LidoText = /*@__PURE__*/ proxyCustomElement(class LidoText extends H {
57
57
  if (this.showSpeakIcon) {
58
58
  attachSpeakIcon(this.el);
59
59
  }
60
+ if (!this.audio || this.audio.trim() === "") {
61
+ const applyAutoAudio = () => {
62
+ const autoAudio = this.resolveAutoAudio();
63
+ if (autoAudio) {
64
+ this.audio = autoAudio;
65
+ console.log("[LidoText] Auto audio applied:", autoAudio);
66
+ }
67
+ };
68
+ // If path is already available, apply immediately
69
+ if (window.__LIDO_COMMON_AUDIO_PATH__) {
70
+ applyAutoAudio();
71
+ }
72
+ else {
73
+ // Otherwise, wait for it
74
+ window.addEventListener(LIDO_COMMON_AUDIO_READY_EVENT, applyAutoAudio, { once: true });
75
+ }
76
+ }
77
+ }
78
+ resolveAutoAudio() {
79
+ const base = window[LIDO_COMMON_AUDIO_PATH];
80
+ if (!base || !this.string)
81
+ return null;
82
+ const fileName = this.string.toLowerCase().trim().replace(/\s+/g, "_").replace(/[^\w-]/g, "");
83
+ return `${base}/${fileName}.mp3`;
60
84
  }
61
85
  /**
62
86
  * Lifecycle method that runs before the component is rendered.
@@ -122,7 +146,7 @@ const LidoText = /*@__PURE__*/ proxyCustomElement(class LidoText extends H {
122
146
  }
123
147
  }
124
148
  render() {
125
- return (h(Host, { key: '89ed432cbbf1f3ca2cdcaf4df80628350badef6d', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType, "disable-speak": this.disableSpeak }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, " ", instance.t(this.string)) : instance.t(this.string)));
149
+ return (h(Host, { key: '87d82cc0bf52e1eaba8f44d1bdd80c98e896ddbf', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType, "disable-speak": this.disableSpeak }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, " ", instance.t(this.string)) : instance.t(this.string)));
126
150
  }
127
151
  get el() { return this; }
128
152
  static get style() { return LidoTextStyle0; }
@@ -1,5 +1,5 @@
1
- import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-511377d2.js';
2
- import { d as defineCustomElement$1 } from './p-b3e67e7f.js';
1
+ import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
+ import { d as defineCustomElement$1 } from './p-7ab0a273.js';
3
3
 
4
4
  const lidoCanvasCss = ":host{display:flex;justify-content:center;align-items:center}.lido-canvas{background:red;border:2px solid #ccc;border-radius:8px;display:flex;flex-direction:column;overflow:hidden;position:relative}#lido-exit-button{padding:6px 14px;border:none;background:transparent;color:#fff;border-radius:6px;cursor:pointer;font-size:14px;position:relative;top:-43%;left:18%;z-index:10}canvas{touch-action:none;display:block}";
5
5
  const LidoCanvasStyle0 = lidoCanvasCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, r as attachSpeakIcon, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, t as attachSpeakIcon, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoRandomCss = ".lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}";
4
4
  const LidoRandomStyle0 = lidoRandomCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, W as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, X as speakIcon, o as executeActions, J as triggerNextContainer, L as LidoContainer, k as parseProp, h, j as Host, Y as fingerUrl } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, Z as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, _ as speakIcon, n as storingEachActivityScore, o as executeActions, q as calculateScore, O as triggerNextContainer, J as LidoContainer, k as parseProp, h, j as Host, $ as fingerUrl } from './p-0712a27e.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;
@@ -389,7 +389,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
389
389
  });
390
390
  }
391
391
  // Modified handlePointerMove function
392
- handlePointerMove(state) {
392
+ async handlePointerMove(state) {
393
393
  var _a, _b, _c, _d, _e, _f;
394
394
  if (!state.isDragging)
395
395
  return;
@@ -536,13 +536,15 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
536
536
  }
537
537
  (_f = currentPath.greenPath) === null || _f === void 0 ? void 0 : _f.setAttribute('stroke-dashoffset', (state.totalPathLength - state.lastLength).toString());
538
538
  // Completion logic for closed paths: only allow completion if almost all points are traced
539
- const COMPLETION_THRESHOLD = 0.90; // 90% of the path must be traced
539
+ const COMPLETION_THRESHOLD = 0.95; // 95% of the path must be traced
540
540
  let percentComplete = state.lastLength / state.totalPathLength;
541
541
  let startPoint = currentPath.getPointAtLength(0);
542
542
  let endPoint = currentPath.getPointAtLength(currentPath.getTotalLength());
543
543
  let pathIsClosed = this.getDistanceSquared(startPoint, endPoint) < 200; // threshold for overlap
544
544
  if (pathIsClosed && state.totalPathLength > 50) {
545
545
  if (percentComplete >= COMPLETION_THRESHOLD) {
546
+ // Animate the draggable circle & green trace to the very end, then proceed
547
+ await this.animatePathToEnd(state, currentPath);
546
548
  if (state.currentPathIndex < state.paths.length - 1) {
547
549
  this.moveToNextPath(state);
548
550
  }
@@ -563,6 +565,55 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
563
565
  }
564
566
  // this.resetIdleTimer(state); // ← keep timer alive
565
567
  }
568
+ // Smoothly animate the draggable circle + green stroke from current lastLength to totalPathLength
569
+ animatePathToEnd(state, path, duration = 300) {
570
+ if (!path || !state.svg)
571
+ return Promise.resolve();
572
+ if (state._animatingToEnd)
573
+ return Promise.resolve();
574
+ state._animatingToEnd = true;
575
+ const start = state.lastLength || 0;
576
+ const end = path.getTotalLength();
577
+ const startTime = performance.now();
578
+ // get greenPath safely: prefer the attached property, otherwise query by class near the original path
579
+ const greenPath = path.greenPath ||
580
+ (path.parentNode && path.parentNode.querySelector('.lido-trace-path-green'));
581
+ return new Promise(resolve => {
582
+ const step = (now) => {
583
+ const t = Math.min(1, (now - startTime) / duration);
584
+ const eased = t; // linear easing
585
+ const currentLen = start + (end - start) * eased;
586
+ state.lastLength = currentLen;
587
+ // update circle position and green path dashoffset
588
+ const pt = path.getPointAtLength(currentLen);
589
+ if (state.circle) {
590
+ state.circle.setAttribute('cx', pt.x.toString());
591
+ state.circle.setAttribute('cy', pt.y.toString());
592
+ }
593
+ if (greenPath) {
594
+ greenPath.setAttribute('stroke-dashoffset', (state.totalPathLength - currentLen).toString());
595
+ }
596
+ if (t < 1) {
597
+ requestAnimationFrame(step);
598
+ }
599
+ else {
600
+ // ensure fully complete
601
+ state.lastLength = end;
602
+ if (state.circle) {
603
+ const finalPt = path.getPointAtLength(end);
604
+ state.circle.setAttribute('cx', finalPt.x.toString());
605
+ state.circle.setAttribute('cy', finalPt.y.toString());
606
+ }
607
+ if (greenPath) {
608
+ greenPath.setAttribute('stroke-dashoffset', '0');
609
+ }
610
+ state._animatingToEnd = false;
611
+ resolve();
612
+ }
613
+ };
614
+ requestAnimationFrame(step);
615
+ });
616
+ }
566
617
  // Move to the next container after completing the current SVG
567
618
  async moveToNextContainer() {
568
619
  this.isDragging = false;
@@ -575,6 +626,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
575
626
  if (this.animationTrace) {
576
627
  await this.playTraceAnimation();
577
628
  }
629
+ storingEachActivityScore(true);
578
630
  console.log(`Moving to next container after SVG index: ${this.currentSvgIndex}`);
579
631
  const delay = 1000; // milliseconds
580
632
  if (this.currentSvgIndex < this.svgUrls.length - 1) {
@@ -589,6 +641,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
589
641
  if (this.el && this.onCorrect) {
590
642
  await executeActions(this.onCorrect, this.el);
591
643
  }
644
+ calculateScore();
592
645
  console.log('All SVGs completed, hiding component.');
593
646
  triggerNextContainer();
594
647
  }
@@ -789,7 +842,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
789
842
  };
790
843
  }
791
844
  render() {
792
- return (h(Host, { key: '3f12119394502b6750874aaa50f43bf42e9f63cc', 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: '4fddd90d12251c4020006690f8c769ab452c8f6a', style: this.style, id: "lido-svgContainer" })));
845
+ return (h(Host, { key: 'aef0bf373de0c1d6ac49e7782838d9679c2b093f', 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: 'f5223ad78568213f7965b3ea7eeb56b1b965fe78', style: this.style, id: "lido-svgContainer" })));
793
846
  }
794
847
  static get assetsDirs() { return ["svg", "images"]; }
795
848
  get el() { return this; }
@@ -1,6 +1,6 @@
1
- import { p as proxyCustomElement, H, l as createEvent, m as equationCheck, n as storingEachActivityScore, o as executeActions, N as NextContainerKey, h, j as Host } from './p-511377d2.js';
2
- import { d as defineCustomElement$2 } from './p-d2fe2bb6.js';
3
- import { d as defineCustomElement$1 } from './p-b3e67e7f.js';
1
+ import { p as proxyCustomElement, H, l as createEvent, m as equationCheck, n as storingEachActivityScore, o as executeActions, q as calculateScore, N as NextContainerKey, h, j as Host } from './p-0712a27e.js';
2
+ import { d as defineCustomElement$2 } from './p-f3bc4577.js';
3
+ import { d as defineCustomElement$1 } from './p-7ab0a273.js';
4
4
 
5
5
  const lidoCalculatorCss = "#lidoCalculator{border-radius:19px;border:5px solid #029A9A;position:relative;display:flex;flex-direction:column;padding:2%;box-sizing:border-box}.lido-calculator-btn-special{background-color:#014D4D !important;--btn-shadow-color:#0a2f2f !important}.lido-calculator-btn-default{background-color:#029A9A !important;color:#000;--btn-shadow-color:#0f4242 !important}#lido-calculator-penIcon{--btn-bg-color:#FB7038 !important;--btn-shadow-px:0 8px 0 !important;--btn-shadow-color:#D74B12 !important;border-radius:5px !important}.lido-calculator-displayParent{width:89%;height:107px;background-color:rgb(68, 186, 186);border-radius:5px;margin:14px auto 17px auto;overflow:hidden;display:flex;align-items:end}.lido-calculator-display{width:97%;height:94px;background:#029A9A;color:#fff;text-align:right;display:flex;justify-content:flex-end;align-items:center;font-size:72px;font-weight:700;font-family:'Baloo Bhai 2', serif;border-radius:5px 0px 0px 5px;box-sizing:border-box;margin:0 0px -6px auto}.lido-calculator-buttons{flex:1;display:grid;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr;gap:0%;width:100%;justify-items:center;align-items:center;position:relative;top:-1%}.lido-calculator-buttons lido-text{display:flex !important;justify-content:center;align-items:center;width:96px !important;height:80px !important;font-size:72px !important;font-weight:700 !important;color:#fff;border-radius:5px !important;cursor:pointer;text-align:center;line-height:1;box-sizing:border-box;transition:transform 0.1s}.lido-calculator-buttons lido-text:active{transform:scale(0.95)}";
6
6
  const LidoCalculatorStyle0 = lidoCalculatorCss;
@@ -105,10 +105,12 @@ const LidoCalculator = /*@__PURE__*/ proxyCustomElement(class LidoCalculator ext
105
105
  await executeActions(onCorrect, container);
106
106
  if (onCorrect.includes('scrollCellAfterEquationSolved')) {
107
107
  if (this.objective.length === 0) {
108
+ calculateScore();
108
109
  window.dispatchEvent(new CustomEvent(NextContainerKey));
109
110
  }
110
111
  }
111
112
  else {
113
+ calculateScore();
112
114
  window.dispatchEvent(new CustomEvent(NextContainerKey));
113
115
  }
114
116
  }
@@ -121,7 +123,7 @@ const LidoCalculator = /*@__PURE__*/ proxyCustomElement(class LidoCalculator ext
121
123
  }
122
124
  render() {
123
125
  const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
124
- return (h(Host, { key: 'de394a3b14826c7fb6d6cf33fbbf1726238cbe3b', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, h("lido-cell", { key: '6dbc01d1032553ba6376d60d451b546851f5ebed', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: '353396c173bbdeb5f2fbb235e54fa900d2d0b771', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: '083b53c01a3d7bfff1c39a408ed064fd18d3e8a3', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: 'b0936ba134feda621d5f0f26b7de70db51f56cf8', class: "lido-calculator-displayParent" }, h("div", { key: '35507ac35c70c4bf515c904a402e5312dafeffc3', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: 'd7412b0d4c8971aa09d9ca22ee8d25f2773cd2c8', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
126
+ return (h(Host, { key: '394177b08965252a6008cce3284475c6176eca3d', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, h("lido-cell", { key: '1c79a951e666ad4171b686400f0ba391783e693f', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: '70da4a0990c7ae72367f8d61026c1d4e6f682d48', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: 'c510e7f1cc6ec5d34683030fff988054ac721225', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: '790d7bd307e296cc8e05e29705ebf4bfdda49906', class: "lido-calculator-displayParent" }, h("div", { key: 'f0195ce772bffdee06483da524f8a392dffdde38', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: '00fda79dab52a801acafe6006db0dd50923ea74b', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
125
127
  'lido-calculator-btn-special': num === '←' || num === 'OK',
126
128
  'lido-calculator-btn-default': num !== '←' && num !== 'OK'
127
129
  }, onClick: () => this.handleClick(num) }))))));
@@ -0,0 +1,128 @@
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
+
3
+ const lidoShapeCss = ".lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z);justify-content:center;align-items:center}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-trapezoid{width:var(--trapezoidWidth);height:var(--trapezoidHeight);background-color:var(--bgColor);clip-path:polygon(\r\n 20% 0%, \r\n 80% 0%, \r\n 100% 100%,\r\n 0% 100% \r\n )}.lido-hexagon{width:var(--hexagonWidth);height:var(--hexagonHeight);background-color:var(--bgColor);clip-path:polygon(\r\n 25% 0%, \r\n 75% 0%, \r\n 100% 50%, \r\n 75% 100%, \r\n 25% 100%, \r\n 0% 50% \r\n )}.lido-cone{width:var(--coneWidth);height:var(--coneHeight);background-color:var(--bgColor);clip-path:polygon(\r\n \r\n 15% 10%,\r\n 25% 4%,\r\n 35% 1%,\r\n 50% 0%,\r\n 65% 1%,\r\n 75% 4%,\r\n 85% 10%,\r\n\r\n \r\n 50% 100%\r\n )}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}.cube{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform:rotateX(-20deg) rotateY(45deg)}.face{position:absolute;width:var(--face-width,150px);height:var(--face-width,150px);background:var(--face-bg-color,150px);box-shadow:inset -20px -20px 40px rgba(0,0,0,0.3)}.front{transform:rotateY( 0deg) translateZ(var(--face-translate, 75px))}.back{transform:rotateY(180deg) translateZ(var(--face-translate, 75px))}.right{transform:rotateY( 90deg) translateZ(var(--face-translate, 75px))}.left{transform:rotateY(-90deg) translateZ(var(--face-translate, 75px))}.top{transform:rotateX( 90deg) translateZ(var(--face-translate, 75px))}.bottom{transform:rotateX(-90deg) translateZ(var(--face-translate, 75px))}.lido-cylinder{width:var(--width);height:var(--height);border-radius:100% / 80px;background:radial-gradient(50% 40px at 50% 40px, #0003 99.99%, #0000 0),\r\n radial-gradient(50% 40px at 50% calc(100% - 40px), #fff3 99.99%, #0000 0),\r\n red}";
4
+ const LidoShapeStyle0 = lidoShapeCss;
5
+
6
+ const LidoShape = /*@__PURE__*/ proxyCustomElement(class LidoShape extends H {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.id = '';
11
+ this.value = '';
12
+ this.height = 'auto';
13
+ this.width = 'auto';
14
+ this.ariaLabel = '';
15
+ this.ariaHidden = '';
16
+ this.x = '0px';
17
+ this.y = '0px';
18
+ this.z = '0';
19
+ this.bgColor = '';
20
+ this.type = '';
21
+ this.tabIndex = 0;
22
+ this.shapeType = 'circle';
23
+ this.visible = false;
24
+ this.audio = '';
25
+ this.onTouch = '';
26
+ this.onInCorrect = '';
27
+ this.onCorrect = '';
28
+ this.onEntry = '';
29
+ this.minDrops = 1;
30
+ this.maxDrops = 1;
31
+ this.margin = '';
32
+ this.delayVisible = '';
33
+ this.disableSpeak = false;
34
+ this.style = {};
35
+ }
36
+ /**
37
+ * Lifecycle hook that runs after the component is loaded into the DOM.
38
+ * It initializes custom events based on the `type` of the shape component.
39
+ */
40
+ componentDidLoad() {
41
+ setVisibilityWithDelay(this.el, this.delayVisible);
42
+ initEventsForElement(this.el, this.type);
43
+ this.updateStyles();
44
+ this.lido3DShapes();
45
+ }
46
+ updateStyles() {
47
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
48
+ this.style = {
49
+ x: parseProp(`${this.x}`, orientation),
50
+ y: parseProp(`${this.y}`, orientation),
51
+ height: parseProp(`${this.height}`, orientation),
52
+ width: parseProp(`${this.width}`, orientation),
53
+ };
54
+ }
55
+ lido3DShapes() {
56
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
57
+ if (this.shapeType === "lido-cube") {
58
+ const faces = this.el.querySelectorAll(".face");
59
+ faces.forEach(item => {
60
+ const face = item;
61
+ face.style.setProperty("--face-width", parseProp(`${this.width}`, orientation));
62
+ const translateValue = parseInt(parseProp(`${this.width}`, orientation)) / 2;
63
+ console.log("translate : ", translateValue);
64
+ face.style.setProperty("--face-translate", `${translateValue}px`);
65
+ face.style.setProperty("--face-bg-color", this.bgColor);
66
+ });
67
+ }
68
+ }
69
+ render() {
70
+ // Inline styles to position and size the shape component
71
+ const style = {
72
+ height: this.shapeType !== 'polygon' ? this.style.height : undefined, // Set height unless it's a polygon
73
+ width: this.shapeType !== 'polygon' ? this.style.width : undefined, // Set width unless it's a polygon
74
+ top: this.style.y,
75
+ left: this.style.x,
76
+ display: this.visible ? 'block' : 'none', // Toggle visibility
77
+ zIndex: this.z,
78
+ backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
79
+ margin: this.margin,
80
+ };
81
+ return (h(Host, { key: 'fde795dbc7c3a295a84bb1e5e74ff57cf3fe103a', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, "tab-index": this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, this.shapeType === "lido-cube" &&
82
+ h("div", { key: '620b82948d6eea342a2e00fab780696fcd2d6794', class: "cube" }, h("div", { key: 'b505a156896edd12c8d686966945168c5eb056d7', class: "face top" }), h("div", { key: '806b4d6aec720340d7a207854b20f910bb845829', class: "face bottom" }), h("div", { key: 'd2619804cabb2761e624139e33d759992d632468', class: "face left" }), h("div", { key: '3874ba7bcbe3eebc133b107a4bfefb38638eeb0f', class: "face right" }), h("div", { key: '0e19cfb0feba399b9a98336b0f6c349ff22e29ed', class: "face front" }), h("div", { key: '9b1d9d75d8897756f32bc023533eb1dc025d8e2f', class: "face back" }))));
83
+ }
84
+ get el() { return this; }
85
+ static get style() { return LidoShapeStyle0; }
86
+ }, [0, "lido-shape", {
87
+ "id": [1],
88
+ "value": [1],
89
+ "height": [1],
90
+ "width": [1],
91
+ "ariaLabel": [1, "aria-label"],
92
+ "ariaHidden": [1, "aria-hidden"],
93
+ "x": [1],
94
+ "y": [1],
95
+ "z": [1],
96
+ "bgColor": [1, "bg-color"],
97
+ "type": [1],
98
+ "tabIndex": [2, "tab-index"],
99
+ "shapeType": [1, "shape-type"],
100
+ "visible": [4],
101
+ "audio": [1],
102
+ "onTouch": [1, "on-touch"],
103
+ "onInCorrect": [1, "on-in-correct"],
104
+ "onCorrect": [1, "on-correct"],
105
+ "onEntry": [1, "on-entry"],
106
+ "minDrops": [2, "min-drops"],
107
+ "maxDrops": [2, "max-drops"],
108
+ "margin": [1],
109
+ "delayVisible": [1, "delay-visible"],
110
+ "disableSpeak": [4, "disable-speak"],
111
+ "style": [32]
112
+ }]);
113
+ function defineCustomElement() {
114
+ if (typeof customElements === "undefined") {
115
+ return;
116
+ }
117
+ const components = ["lido-shape"];
118
+ components.forEach(tagName => { switch (tagName) {
119
+ case "lido-shape":
120
+ if (!customElements.get(tagName)) {
121
+ customElements.define(tagName, LidoShape);
122
+ }
123
+ break;
124
+ } });
125
+ }
126
+ defineCustomElement();
127
+
128
+ export { LidoShape as L, defineCustomElement as d };
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, t as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-511377d2.js';
1
+ import { p as proxyCustomElement, H, v as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-0712a27e.js';
2
2
  import { i as instance } from './p-73e3f0f4.js';
3
3
 
4
4
  const lidoContainerCss = ".lido-container{position:relative;height:100%;width:100%;background-color:var(--bgColor, transparent);display:flex;flex-direction:column;justify-content:center;align-items:center}";