lido-player 0.0.2-alpha-52-dev → 0.0.2-alpha-55-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.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-avatar_22.cjs.entry.js +187 -59
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-ce99b0d0.js → utils-4b44610b.js} +111 -86
- package/dist/collection/components/calculator/lido-calculator.js +4 -2
- package/dist/collection/components/container/lido-container.js +24 -2
- package/dist/collection/components/home/lido-home.css +4 -0
- package/dist/collection/components/home/lido-home.js +27 -3
- package/dist/collection/components/trace/lido-trace.js +122 -47
- package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +26 -25
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +3 -1
- package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +1 -1
- package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +1 -1
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
- package/dist/collection/stories/Templates/blender/blender.stories.js +1 -1
- package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +1 -1
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +1 -1
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +1 -1
- package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +1 -1
- package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +1 -1
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +1 -1
- package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +1 -1
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +1 -1
- package/dist/collection/stories/Templates/grid/grid.stories.js +5 -1
- package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +1 -1
- package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +4 -2
- package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +1 -1
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +1 -1
- package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +4 -2
- package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +1 -1
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +1 -1
- package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +1 -1
- package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +1 -1
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +1 -1
- package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +1 -1
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +2 -2
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +2 -2
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +1 -1
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +1 -1
- package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +1 -1
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +5 -1
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +1 -1
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +1 -1
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +1 -1
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +1 -1
- package/dist/collection/stories/Templates/reorder/reorder.stories.js +3 -1
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +2 -2
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +6 -6
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +7 -6
- package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +1 -1
- package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +25 -21
- package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +1 -1
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +8 -6
- package/dist/collection/stories/Templates/total/total.stories.js +1 -1
- package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +1 -1
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +2 -2
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +6 -6
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +1 -1
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +7 -6
- package/dist/collection/utils/customEvents.js +1 -0
- package/dist/collection/utils/utils.js +20 -17
- package/dist/collection/utils/utilsHandlers/animationHandler.js +58 -0
- package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +19 -60
- package/dist/collection/utils/utilsHandlers/slideHandler.js +7 -6
- package/dist/collection/utils/utilsHandlers/sortHandler.js +3 -5
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +23 -23
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/{p-39a2e638.js → p-0be6b5d5.js} +2 -2
- package/dist/components/{p-11bf64aa.js → p-2c518dbe.js} +1 -1
- package/dist/components/{p-c4abfd0f.js → p-2e023f67.js} +1 -1
- package/dist/components/{p-58c67252.js → p-36c2e21a.js} +110 -87
- package/dist/components/{p-52e77394.js → p-3fc01453.js} +1 -1
- package/dist/components/{p-06171259.js → p-43d79c61.js} +1 -1
- package/dist/components/{p-00777872.js → p-5078599e.js} +26 -4
- package/dist/components/{p-26df0769.js → p-590ce2c9.js} +1 -1
- package/dist/components/{p-5b5f59a8.js → p-67a24ad4.js} +2 -2
- package/dist/components/{p-68112f8c.js → p-72d6a594.js} +1 -1
- package/dist/components/{p-3ce3744c.js → p-73b2bd74.js} +6 -4
- package/dist/components/{p-0fbeb3a1.js → p-73e3f0f4.js} +12 -6
- package/dist/components/{p-0c2aebfb.js → p-9acf0fcc.js} +1 -1
- package/dist/components/{p-a2f96840.js → p-b095de27.js} +1 -1
- package/dist/components/{p-b2125fc9.js → p-b0dbee97.js} +48 -24
- package/dist/components/{p-a516a324.js → p-b847f269.js} +123 -48
- package/dist/components/{p-9d34d59d.js → p-bc5202db.js} +2 -2
- package/dist/components/{p-cb56a853.js → p-c296051d.js} +1 -1
- package/dist/components/{p-8a34b98b.js → p-c69ef266.js} +1 -1
- package/dist/components/{p-2d53e1a5.js → p-ca8aea4b.js} +1 -1
- package/dist/components/{p-3f4d4c0a.js → p-de2193c5.js} +1 -1
- package/dist/components/{p-09f1e2d2.js → p-e534ea52.js} +1 -1
- package/dist/components/{p-8f2ed62f.js → p-f8c00485.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +187 -59
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-107b15a7.js → utils-ae1eb036.js} +110 -87
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-d1251482.js → p-a632e2ce.js} +2 -2
- package/dist/lido-player/p-f1b879f6.entry.js +1 -0
- package/dist/types/components/container/lido-container.d.ts +1 -0
- package/dist/types/components/home/lido-home.d.ts +1 -0
- package/dist/types/components/trace/lido-trace.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/types/utils/utilsHandlers/animationHandler.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lido-player/p-606ea279.entry.js +0 -1
|
@@ -1418,6 +1418,7 @@ const speakUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/pub
|
|
|
1418
1418
|
const fingerUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg';
|
|
1419
1419
|
|
|
1420
1420
|
function dispatchCustomEvent(eventName, detail) {
|
|
1421
|
+
console.log("👍Event Name : ", eventName, "Detail : ", detail.toString());
|
|
1421
1422
|
const event = new CustomEvent(eventName, { detail });
|
|
1422
1423
|
window.dispatchEvent(event);
|
|
1423
1424
|
}
|
|
@@ -1665,6 +1666,63 @@ function balanceResult(container, objectiveString) {
|
|
|
1665
1666
|
return res;
|
|
1666
1667
|
}
|
|
1667
1668
|
|
|
1669
|
+
const tempVanishedValues = [];
|
|
1670
|
+
function dragDropAnimation(container, dragElement, dropElement) {
|
|
1671
|
+
container.style.pointerEvents = "none";
|
|
1672
|
+
setTimeout(() => {
|
|
1673
|
+
var _a, _b, _c;
|
|
1674
|
+
const div = document.createElement('div');
|
|
1675
|
+
container.append(div);
|
|
1676
|
+
div.classList.add('after-drop-popup-container');
|
|
1677
|
+
dragElement.style.scale = `1`;
|
|
1678
|
+
dropElement.style.scale = `1`;
|
|
1679
|
+
const allDragElements = container.querySelectorAll('[type="drag"]');
|
|
1680
|
+
const dragParents = Array.from(allDragElements).map(el => el.parentElement);
|
|
1681
|
+
const allSameParent = dragParents.every(parent => parent === dragElement.parentElement);
|
|
1682
|
+
JSON.parse((_a = container.getAttribute(SelectedValuesKey)) !== null && _a !== void 0 ? _a : '[]');
|
|
1683
|
+
const vanishedValue = (_b = dragElement.getAttribute('value')) !== null && _b !== void 0 ? _b : (_c = dragElement.textContent) === null || _c === void 0 ? void 0 : _c.trim();
|
|
1684
|
+
if (vanishedValue) {
|
|
1685
|
+
tempVanishedValues.push(vanishedValue);
|
|
1686
|
+
}
|
|
1687
|
+
// Remove from old parents
|
|
1688
|
+
if (allSameParent) {
|
|
1689
|
+
dragElement.remove();
|
|
1690
|
+
dropElement.remove();
|
|
1691
|
+
}
|
|
1692
|
+
else {
|
|
1693
|
+
dragElement.parentElement.parentElement.remove();
|
|
1694
|
+
dropElement.parentElement.parentElement.remove();
|
|
1695
|
+
}
|
|
1696
|
+
// Add animation and popup classes
|
|
1697
|
+
dragElement.classList.add('zoom-fade-in', 'after-drop-popup-drag-element');
|
|
1698
|
+
dropElement.classList.add('zoom-fade-in', 'after-drop-popup-drop-element');
|
|
1699
|
+
div.appendChild(dragElement);
|
|
1700
|
+
div.appendChild(dropElement);
|
|
1701
|
+
dropElement.classList.remove('empty');
|
|
1702
|
+
setTimeout(() => {
|
|
1703
|
+
dragElement.classList.remove('zoom-fade-in');
|
|
1704
|
+
dropElement.classList.remove('zoom-fade-in');
|
|
1705
|
+
dragElement.classList.add('zoom-fade-out');
|
|
1706
|
+
dropElement.classList.add('zoom-fade-out');
|
|
1707
|
+
setTimeout(() => {
|
|
1708
|
+
div.remove();
|
|
1709
|
+
container.style.pointerEvents = 'auto';
|
|
1710
|
+
const objective = container.getAttribute('objective');
|
|
1711
|
+
if (objective && tempVanishedValues.map(v => v.trim()).sort().join(',') === objective.split(',').map(v => v.trim()).sort().join(',')) {
|
|
1712
|
+
(async () => {
|
|
1713
|
+
// isCorrect=true;
|
|
1714
|
+
const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
|
|
1715
|
+
await executeActions(onCorrect, container);
|
|
1716
|
+
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
1717
|
+
calculateScore();
|
|
1718
|
+
tempVanishedValues.length = 0;
|
|
1719
|
+
})();
|
|
1720
|
+
}
|
|
1721
|
+
}, 800); // match animation duration
|
|
1722
|
+
}, 2000); // stay for 2 seconds
|
|
1723
|
+
}, 250);
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1668
1726
|
function buildDropHasDragFromDOM() {
|
|
1669
1727
|
const dropHasDrag = {};
|
|
1670
1728
|
const dropElements = document.querySelectorAll("[type='drop']");
|
|
@@ -1731,7 +1789,7 @@ function enableDraggingWithScaling(element) {
|
|
|
1731
1789
|
isDragging = false;
|
|
1732
1790
|
return;
|
|
1733
1791
|
}
|
|
1734
|
-
|
|
1792
|
+
AudioPlayer.getI().stop();
|
|
1735
1793
|
removeHighlight(element);
|
|
1736
1794
|
isDragging = true;
|
|
1737
1795
|
isClicked = true;
|
|
@@ -1835,6 +1893,7 @@ function enableDraggingWithScaling(element) {
|
|
|
1835
1893
|
// Start observing the element
|
|
1836
1894
|
observer.observe(container, observerConfig);
|
|
1837
1895
|
const onMove = (event) => {
|
|
1896
|
+
console.log('moved');
|
|
1838
1897
|
if (!isDragging)
|
|
1839
1898
|
return;
|
|
1840
1899
|
if (isDraggingDisabled) {
|
|
@@ -1843,7 +1902,7 @@ function enableDraggingWithScaling(element) {
|
|
|
1843
1902
|
}
|
|
1844
1903
|
isClicked = false;
|
|
1845
1904
|
element.style.transition = 'none';
|
|
1846
|
-
const containerScale =
|
|
1905
|
+
const containerScale = calculateScale();
|
|
1847
1906
|
let dx = 0;
|
|
1848
1907
|
let dy = 0;
|
|
1849
1908
|
if (event instanceof MouseEvent) {
|
|
@@ -2142,7 +2201,6 @@ function handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedV
|
|
|
2142
2201
|
});
|
|
2143
2202
|
handleShowCheck();
|
|
2144
2203
|
}
|
|
2145
|
-
const tempVanishedValues = [];
|
|
2146
2204
|
async function onElementDropComplete(dragElement, dropElement) {
|
|
2147
2205
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2148
2206
|
const container = document.getElementById(LidoContainer);
|
|
@@ -2169,7 +2227,6 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
2169
2227
|
handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedValueData, dragSelectedData);
|
|
2170
2228
|
return;
|
|
2171
2229
|
}
|
|
2172
|
-
// let isCorrect = dropElement.getAttribute('value').toLowerCase().includes(dragElement.getAttribute('value').toLowerCase());
|
|
2173
2230
|
let isCorrect;
|
|
2174
2231
|
const dragValue = ((_c = dragElement.getAttribute('value')) === null || _c === void 0 ? void 0 : _c.trim()) || "";
|
|
2175
2232
|
const dropValue = ((_d = dropElement.getAttribute('value')) === null || _d === void 0 ? void 0 : _d.trim()) || "";
|
|
@@ -2186,7 +2243,8 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
2186
2243
|
}
|
|
2187
2244
|
}
|
|
2188
2245
|
else {
|
|
2189
|
-
|
|
2246
|
+
//strings
|
|
2247
|
+
isCorrect = dropValue.toLowerCase().includes(dragValue.toLowerCase());
|
|
2190
2248
|
}
|
|
2191
2249
|
if (!isCorrect) {
|
|
2192
2250
|
dragElement.style.transition = 'transform 0.5s ease';
|
|
@@ -2196,6 +2254,7 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
2196
2254
|
await executeActions(onInCorrect, dropElement, dragElement);
|
|
2197
2255
|
setTimeout(() => {
|
|
2198
2256
|
dragElement.style.transform = 'translate(0, 0)';
|
|
2257
|
+
storingEachActivityScore(false);
|
|
2199
2258
|
// const oldDropIndex = dragToDropMap[dragElement.getAttribute('data-id')];
|
|
2200
2259
|
// if (oldDropIndex !== undefined && dropHasDrag[oldDropIndex]) {
|
|
2201
2260
|
// dropHasDrag[oldDropIndex].isFull = false;
|
|
@@ -2221,61 +2280,18 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
2221
2280
|
else {
|
|
2222
2281
|
const checkdropAttr = container.getAttribute('dropAttr');
|
|
2223
2282
|
if (checkdropAttr && checkdropAttr.toLowerCase() === DropMode.EnableAnimation.toLowerCase()) {
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
var _a, _b, _c;
|
|
2227
|
-
const div = document.createElement('div');
|
|
2228
|
-
container.append(div);
|
|
2229
|
-
div.classList.add('after-drop-popup-container');
|
|
2230
|
-
dragElement.style.scale = `1`;
|
|
2231
|
-
dropElement.style.scale = `1`;
|
|
2232
|
-
const allDragElements = container.querySelectorAll('[type="drag"]');
|
|
2233
|
-
const dragParents = Array.from(allDragElements).map(el => el.parentElement);
|
|
2234
|
-
const allSameParent = dragParents.every(parent => parent === dragElement.parentElement);
|
|
2235
|
-
JSON.parse((_a = container.getAttribute(SelectedValuesKey)) !== null && _a !== void 0 ? _a : '[]');
|
|
2236
|
-
const vanishedValue = (_b = dragElement.getAttribute('value')) !== null && _b !== void 0 ? _b : (_c = dragElement.textContent) === null || _c === void 0 ? void 0 : _c.trim();
|
|
2237
|
-
if (vanishedValue) {
|
|
2238
|
-
tempVanishedValues.push(vanishedValue);
|
|
2239
|
-
}
|
|
2240
|
-
// Remove from old parents
|
|
2241
|
-
if (allSameParent) {
|
|
2242
|
-
dragElement.remove();
|
|
2243
|
-
dropElement.remove();
|
|
2244
|
-
}
|
|
2245
|
-
else {
|
|
2246
|
-
dragElement.parentElement.parentElement.remove();
|
|
2247
|
-
dropElement.parentElement.parentElement.remove();
|
|
2248
|
-
}
|
|
2249
|
-
// Add animation and popup classes
|
|
2250
|
-
dragElement.classList.add('zoom-fade-in', 'after-drop-popup-drag-element');
|
|
2251
|
-
dropElement.classList.add('zoom-fade-in', 'after-drop-popup-drop-element');
|
|
2252
|
-
div.appendChild(dragElement);
|
|
2253
|
-
div.appendChild(dropElement);
|
|
2254
|
-
dropElement.classList.remove('empty');
|
|
2255
|
-
setTimeout(() => {
|
|
2256
|
-
dragElement.classList.remove('zoom-fade-in');
|
|
2257
|
-
dropElement.classList.remove('zoom-fade-in');
|
|
2258
|
-
dragElement.classList.add('zoom-fade-out');
|
|
2259
|
-
dropElement.classList.add('zoom-fade-out');
|
|
2260
|
-
setTimeout(() => {
|
|
2261
|
-
div.remove();
|
|
2262
|
-
container.style.pointerEvents = 'auto';
|
|
2263
|
-
const objective = container.getAttribute('objective');
|
|
2264
|
-
if (objective && tempVanishedValues.map(v => v.trim()).sort().join(',') === objective.split(',').map(v => v.trim()).sort().join(',')) {
|
|
2265
|
-
(async () => {
|
|
2266
|
-
isCorrect = true;
|
|
2267
|
-
const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
|
|
2268
|
-
await executeActions(onCorrect, container);
|
|
2269
|
-
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
2270
|
-
tempVanishedValues.length = 0;
|
|
2271
|
-
})();
|
|
2272
|
-
}
|
|
2273
|
-
}, 800); // match animation duration
|
|
2274
|
-
}, 2000); // stay for 2 seconds
|
|
2275
|
-
}, 250);
|
|
2283
|
+
//This function coming from animationhandler.ts
|
|
2284
|
+
dragDropAnimation(container, dragElement, dropElement);
|
|
2276
2285
|
}
|
|
2277
2286
|
}
|
|
2278
2287
|
}
|
|
2288
|
+
else {
|
|
2289
|
+
const checkdropAttr = container.getAttribute('dropAttr');
|
|
2290
|
+
if (checkdropAttr && checkdropAttr.toLowerCase() === DropMode.EnableAnimation.toLowerCase()) {
|
|
2291
|
+
//This function coming from animationhandler.ts
|
|
2292
|
+
dragDropAnimation(container, dragElement, dropElement);
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2279
2295
|
if (dropElement) {
|
|
2280
2296
|
let selectedValues = JSON.parse((_e = container.getAttribute(SelectedValuesKey)) !== null && _e !== void 0 ? _e : "[]");
|
|
2281
2297
|
const dragValue = dragElement.getAttribute('value');
|
|
@@ -2408,11 +2424,11 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
2408
2424
|
// Add pulse and highlight effect for a successful match
|
|
2409
2425
|
const isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
|
|
2410
2426
|
dispatchElementDropEvent(dragElement, dropElement, isCorrect);
|
|
2411
|
-
storingEachActivityScore(isCorrect);
|
|
2427
|
+
// storingEachActivityScore(isCorrect);
|
|
2412
2428
|
dragElement.style.opacity = '1';
|
|
2413
|
-
await onActivityComplete(dragElement, dropElement);
|
|
2414
2429
|
const allDropElements = document.querySelectorAll('.drop-element');
|
|
2415
2430
|
allDropElements.forEach(el => updateDropBorder(el));
|
|
2431
|
+
await onActivityComplete(dragElement, dropElement);
|
|
2416
2432
|
}
|
|
2417
2433
|
function updateDropBorder(element) {
|
|
2418
2434
|
if (!element || !element.classList.contains('drop-element'))
|
|
@@ -2804,7 +2820,7 @@ function enableReorderDrag(element) {
|
|
|
2804
2820
|
isClicked = false;
|
|
2805
2821
|
event.preventDefault();
|
|
2806
2822
|
const containerRect = container.getBoundingClientRect();
|
|
2807
|
-
const containerScale =
|
|
2823
|
+
const containerScale = calculateScale();
|
|
2808
2824
|
const newLeft = (point.clientX - containerRect.left - offsetXInElement) / containerScale;
|
|
2809
2825
|
const newTop = (point.clientY - containerRect.top - offsetYInElement) / containerScale;
|
|
2810
2826
|
element.style.left = `${newLeft}px`;
|
|
@@ -2871,9 +2887,7 @@ function enableReorderDrag(element) {
|
|
|
2871
2887
|
else {
|
|
2872
2888
|
if (element.parentElement['type'] !== 'category') {
|
|
2873
2889
|
executeActions('this.alignMatch=true', divEl, element);
|
|
2874
|
-
|
|
2875
|
-
divEl.replaceWith(element);
|
|
2876
|
-
}, 500);
|
|
2890
|
+
divEl.replaceWith(element);
|
|
2877
2891
|
}
|
|
2878
2892
|
else {
|
|
2879
2893
|
const categoryElement = element.parentElement;
|
|
@@ -3349,9 +3363,6 @@ function slidingWithScaling(element) {
|
|
|
3349
3363
|
element.style.transform = 'translate(0, 0)'; // Initialize transform for consistent dragging
|
|
3350
3364
|
element.addEventListener('mousedown', onStart);
|
|
3351
3365
|
element.addEventListener('touchstart', onStart);
|
|
3352
|
-
element.addEventListener('click', ev => {
|
|
3353
|
-
onClickDropOrDragElement(element, 'drag');
|
|
3354
|
-
});
|
|
3355
3366
|
}
|
|
3356
3367
|
const slideCompleted = (slideElement) => {
|
|
3357
3368
|
var _a;
|
|
@@ -3367,8 +3378,13 @@ const slideCompleted = (slideElement) => {
|
|
|
3367
3378
|
const objectiveArray = objectiveString.split(',');
|
|
3368
3379
|
const elementIndex = slideArr.indexOf(slideElement['value']);
|
|
3369
3380
|
const isCorrect = matchStringPattern(slideElement['value'], [objectiveArray[elementIndex].trim()]);
|
|
3370
|
-
|
|
3371
|
-
|
|
3381
|
+
if (container.getAttribute('is-continue-on-correct') === 'true') {
|
|
3382
|
+
storingEachActivityScore(true);
|
|
3383
|
+
handleShowCheck();
|
|
3384
|
+
}
|
|
3385
|
+
else {
|
|
3386
|
+
storingEachActivityScore(isCorrect);
|
|
3387
|
+
}
|
|
3372
3388
|
};
|
|
3373
3389
|
|
|
3374
3390
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -4653,7 +4669,10 @@ function addClickListenerForClickType(element) {
|
|
|
4653
4669
|
dispatchClickEvent(element, isCorrect);
|
|
4654
4670
|
if (isCorrect) {
|
|
4655
4671
|
const onCorrect = element.getAttribute('onCorrect');
|
|
4656
|
-
|
|
4672
|
+
if (!(element.id && element.id.startsWith('key-button'))) {
|
|
4673
|
+
element.style.pointerEvents = 'none';
|
|
4674
|
+
}
|
|
4675
|
+
document.body.style.pointerEvents = 'none';
|
|
4657
4676
|
await executeActions(onCorrect, element);
|
|
4658
4677
|
}
|
|
4659
4678
|
else {
|
|
@@ -4710,6 +4729,7 @@ function addClickListenerForClickType(element) {
|
|
|
4710
4729
|
container.setAttribute(SelectedValuesKey, JSON.stringify(sortedValues));
|
|
4711
4730
|
const isCorrect = objective.includes(element['value']);
|
|
4712
4731
|
dispatchClickEvent(element, isCorrect);
|
|
4732
|
+
AudioPlayer.getI().stop();
|
|
4713
4733
|
if (isCorrect) {
|
|
4714
4734
|
const onCorrect = element.getAttribute('onCorrect');
|
|
4715
4735
|
await executeActions(onCorrect, element);
|
|
@@ -70023,6 +70043,7 @@ const initEventsForElement = async (element, type) => {
|
|
|
70023
70043
|
const executeActions = async (actionsString, thisElement, element) => {
|
|
70024
70044
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
70025
70045
|
const actions = parseActions(actionsString);
|
|
70046
|
+
body.style.pointerEvents = 'none';
|
|
70026
70047
|
for (let i = 0; i < actions.length; i++) {
|
|
70027
70048
|
const action = actions[i];
|
|
70028
70049
|
const queriedElement = document.querySelector(action.actor);
|
|
@@ -70053,7 +70074,7 @@ const executeActions = async (actionsString, thisElement, element) => {
|
|
|
70053
70074
|
const container = document.getElementById(LidoContainer);
|
|
70054
70075
|
const containerScale = getElementScale$1(container);
|
|
70055
70076
|
dragElement.style.transform = 'translate(0,0)';
|
|
70056
|
-
console.log(
|
|
70077
|
+
console.log('logg alinmatch');
|
|
70057
70078
|
const dropRect = dropElement.getBoundingClientRect();
|
|
70058
70079
|
const dragRect = dragElement.getBoundingClientRect();
|
|
70059
70080
|
const dropCenterX = dropRect.left + dropRect.width / 2;
|
|
@@ -70107,7 +70128,7 @@ const executeActions = async (actionsString, thisElement, element) => {
|
|
|
70107
70128
|
if (container.getAttribute('is-continue-on-correct') !== 'true') {
|
|
70108
70129
|
targetElement.style.pointerEvents = 'none';
|
|
70109
70130
|
}
|
|
70110
|
-
validateObjectiveStatus();
|
|
70131
|
+
await validateObjectiveStatus();
|
|
70111
70132
|
break;
|
|
70112
70133
|
}
|
|
70113
70134
|
case 'prevBtn': {
|
|
@@ -70261,7 +70282,9 @@ const executeActions = async (actionsString, thisElement, element) => {
|
|
|
70261
70282
|
break;
|
|
70262
70283
|
}
|
|
70263
70284
|
case 'updateCalculatorAnswer': {
|
|
70264
|
-
|
|
70285
|
+
if (targetElement) {
|
|
70286
|
+
updateCalculatorAnswer(targetElement);
|
|
70287
|
+
}
|
|
70265
70288
|
break;
|
|
70266
70289
|
}
|
|
70267
70290
|
default: {
|
|
@@ -70271,6 +70294,7 @@ const executeActions = async (actionsString, thisElement, element) => {
|
|
|
70271
70294
|
}
|
|
70272
70295
|
}
|
|
70273
70296
|
}
|
|
70297
|
+
body.style.pointerEvents = 'auto';
|
|
70274
70298
|
};
|
|
70275
70299
|
const afterDropDragHandling = (dragElement, dropElement) => {
|
|
70276
70300
|
const container = document.getElementById(LidoContainer);
|
|
@@ -70489,6 +70513,8 @@ async function onActivityComplete(dragElement, dropElement) {
|
|
|
70489
70513
|
await executeActions("this.alignMatch='true'", dropElement, dragElement);
|
|
70490
70514
|
if (dragElement && dropElement) {
|
|
70491
70515
|
const isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
|
|
70516
|
+
// storing each activity score based on isCorrect for (all drag-drop events)
|
|
70517
|
+
storingEachActivityScore(isCorrect);
|
|
70492
70518
|
if (isCorrect) {
|
|
70493
70519
|
const onCorrect = dropElement.getAttribute('onCorrect');
|
|
70494
70520
|
if (onCorrect) {
|
|
@@ -70587,6 +70613,7 @@ const handleShowCheck = () => {
|
|
|
70587
70613
|
validateObjectiveStatus();
|
|
70588
70614
|
}
|
|
70589
70615
|
};
|
|
70616
|
+
const body = document.body;
|
|
70590
70617
|
let res;
|
|
70591
70618
|
const validateObjectiveStatus = async () => {
|
|
70592
70619
|
var _a, _b;
|
|
@@ -70651,6 +70678,7 @@ const validateObjectiveStatus = async () => {
|
|
|
70651
70678
|
if (!isContinueOnCorrect) {
|
|
70652
70679
|
triggerNextContainer();
|
|
70653
70680
|
await calculateScore();
|
|
70681
|
+
triggerNextContainer();
|
|
70654
70682
|
}
|
|
70655
70683
|
else {
|
|
70656
70684
|
const onInCorrect = container.getAttribute('onInCorrect');
|
|
@@ -70673,16 +70701,16 @@ const triggerPrevcontainer = () => {
|
|
|
70673
70701
|
function convertUrlToRelative(url) {
|
|
70674
70702
|
const container = document.getElementById(LidoContainer);
|
|
70675
70703
|
const baseUrl = container.getAttribute('baseUrl');
|
|
70676
|
-
if ((url === null || url === void 0 ? void 0 : url.startsWith('http')) || (url === null || url === void 0 ? void 0 : url.startsWith('blob'))) {
|
|
70704
|
+
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'))) {
|
|
70677
70705
|
return url;
|
|
70678
70706
|
}
|
|
70679
|
-
|
|
70680
|
-
const newUrl =
|
|
70681
|
-
|
|
70682
|
-
|
|
70683
|
-
|
|
70684
|
-
return getAssetPath(url);
|
|
70707
|
+
if (baseUrl) {
|
|
70708
|
+
const newUrl = url.startsWith('/') ? url.slice(1) : url;
|
|
70709
|
+
if (newUrl.startsWith(baseUrl.replace(/^\/+|\/+$/g, '')))
|
|
70710
|
+
return newUrl;
|
|
70711
|
+
return baseUrl.endsWith('/') ? baseUrl + newUrl : `${baseUrl}/${newUrl}`;
|
|
70685
70712
|
}
|
|
70713
|
+
return getAssetPath(url);
|
|
70686
70714
|
}
|
|
70687
70715
|
/**
|
|
70688
70716
|
* Asynchronously speaks the given text using the browser's text-to-speech API.
|
|
@@ -71154,9 +71182,6 @@ const SumTogetherAnimation = async (element, value) => {
|
|
|
71154
71182
|
return;
|
|
71155
71183
|
if (!value)
|
|
71156
71184
|
return;
|
|
71157
|
-
const container = document.getElementById(LidoContainer);
|
|
71158
|
-
if (!container)
|
|
71159
|
-
return;
|
|
71160
71185
|
// Expecting structure: [_, TopRow, questionRow, optionRow, ...]
|
|
71161
71186
|
const TopRow = Array.from(element.children)[1];
|
|
71162
71187
|
const questionRow = Array.from(element.children)[2];
|
|
@@ -71300,17 +71325,15 @@ function placeElementInDropZone(dropElement, dragElement, orientation, dropAttr)
|
|
|
71300
71325
|
dragElement.style.width = "auto";
|
|
71301
71326
|
dragElement.style.height = "auto";
|
|
71302
71327
|
}
|
|
71303
|
-
const updateCalculatorAnswer = () => {
|
|
71328
|
+
const updateCalculatorAnswer = (el) => {
|
|
71304
71329
|
const container = document.getElementById(LidoContainer);
|
|
71305
71330
|
if (!container)
|
|
71306
71331
|
return;
|
|
71307
71332
|
const calci = document.querySelector('#lidoCalculator');
|
|
71308
71333
|
if (!calci)
|
|
71309
71334
|
return;
|
|
71310
|
-
const answerText = container.querySelector('#answer');
|
|
71311
71335
|
const value = calci.getAttribute('value');
|
|
71312
|
-
|
|
71313
|
-
answerText.setAttribute('string', value);
|
|
71336
|
+
el.setAttribute('string', value);
|
|
71314
71337
|
};
|
|
71315
71338
|
|
|
71316
|
-
export { ActivityScoreKey as A,
|
|
71339
|
+
export { ActivityScoreKey as A, AudioPlayer as B, generateUUIDFallback as C, exitUrl as D, prevUrl as E, nextUrl as F, speakUrl as G, H, getCancelBtnPopup as I, matchStringPattern as J, triggerNextContainer as K, LidoContainer as L, triggerPrevcontainer as M, NextContainerKey as N, setCancelBtnPopup as O, PrevContainerKey as P, getDefaultExportFromCjs as Q, RiveService as R, SelectedValuesKey as S, tinyColor as T, DropAction as U, validateObjectiveStatus as V, fraction as W, TraceMode as X, speakIcon as Y, fingerUrl as Z, 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, calculateScale as u, handleFloatElementPosition as v, handleElementClick as w, dispatchActivityChangeEvent as x, dispatchGameCompletedEvent as y, dispatchGameExitEvent as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-36c2e21a.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,
|
|
1
|
+
import { p as proxyCustomElement, H, t as attachSpeakIcon, h, j as Host } from './p-36c2e21a.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,5 +1,5 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H,
|
|
2
|
-
import { i as instance } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, u as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-36c2e21a.js';
|
|
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}";
|
|
5
5
|
const LidoContainerStyle0 = lidoContainerCss;
|
|
@@ -96,13 +96,34 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
96
96
|
* @param container The container element to be scaled.
|
|
97
97
|
*/
|
|
98
98
|
scaleContainer(container) {
|
|
99
|
+
// Calculate the scale factor based on the closest parent element's width and height (1600x900 reference)
|
|
100
|
+
const parentElement = this.getClosestParentWithWidth();
|
|
101
|
+
let scaleFactor = 0;
|
|
102
|
+
if (parentElement) {
|
|
103
|
+
const parentWidth = parentElement.clientWidth;
|
|
104
|
+
const parentHeight = parentElement.clientHeight;
|
|
105
|
+
const scaleX = parentWidth / 1600;
|
|
106
|
+
const scaleY = parentHeight / 900;
|
|
107
|
+
scaleFactor = Math.min(scaleX, scaleY);
|
|
108
|
+
}
|
|
99
109
|
// Center the container and apply scaling
|
|
100
|
-
container.style.transform = `translate(-50%, -50%) scale(${calculateScale()})`;
|
|
110
|
+
container.style.transform = `translate(-50%, -50%) scale(${scaleFactor != 0 ? scaleFactor : calculateScale()})`;
|
|
101
111
|
container.style.left = '50%';
|
|
102
112
|
container.style.top = '50%';
|
|
103
113
|
container.style.position = 'absolute'; // Ensure proper positioning
|
|
104
114
|
this.screenOrientation();
|
|
105
115
|
}
|
|
116
|
+
// Find and return the nearest parent element that has a measurable (non-zero) width
|
|
117
|
+
getClosestParentWithWidth() {
|
|
118
|
+
let parent = this.el.parentElement;
|
|
119
|
+
while (parent) {
|
|
120
|
+
if (parent.offsetWidth > 0) {
|
|
121
|
+
return parent;
|
|
122
|
+
}
|
|
123
|
+
parent = parent.parentElement;
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
106
127
|
screenOrientation() {
|
|
107
128
|
if (window.innerHeight > window.innerWidth) {
|
|
108
129
|
this.el.style.height = '1600px';
|
|
@@ -131,6 +152,7 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
131
152
|
componentDidLoad() {
|
|
132
153
|
this.scaleContainer(this.el);
|
|
133
154
|
const backGroundImage = this.bgImage ? convertUrlToRelative(this.bgImage) : '';
|
|
155
|
+
document.body.style.pointerEvents = 'auto';
|
|
134
156
|
document.body.style.backgroundColor = this.bgColor;
|
|
135
157
|
document.body.style.backgroundImage = backGroundImage ? `url(${backGroundImage})` : 'none';
|
|
136
158
|
document.body.style.backgroundPosition = backGroundImage ? `bottom` : 'none';
|
|
@@ -164,7 +186,7 @@ const LidoContainer = /*@__PURE__*/ proxyCustomElement(class LidoContainer exten
|
|
|
164
186
|
userSelect: 'none', // Prevent any field selection
|
|
165
187
|
};
|
|
166
188
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
167
|
-
return (h(Host, { key: '
|
|
189
|
+
return (h(Host, { key: '338ef0be8cc9d052764785ce9314254be7c8a7f8', id: "lido-container", locale: this.locale, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak }, h("slot", { key: '59d66b47f4749a99ece4da48dbaebaf720cb0b2b' })));
|
|
168
190
|
}
|
|
169
191
|
get el() { return this; }
|
|
170
192
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-36c2e21a.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,5 +1,5 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-0be6b5d5.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, i as initEventsForElement,
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, e as convertUrlToRelative, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoColCss = ".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>*{}";
|
|
4
4
|
const LidoColStyle0 = lidoColCss;
|
|
@@ -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-
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
|
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-36c2e21a.js';
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-c296051d.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './p-0be6b5d5.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: '
|
|
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) }))))));
|
|
@@ -2631,7 +2631,8 @@ const en = {
|
|
|
2631
2631
|
"Do you want to exit?": "Do you want to exit?",
|
|
2632
2632
|
Exit: Exit$5,
|
|
2633
2633
|
"Continue playing": "Continue playing",
|
|
2634
|
-
"Drop the elements to match the given symbol order": "Drop the elements to match the given symbol order"
|
|
2634
|
+
"Drop the elements to match the given symbol order": "Drop the elements to match the given symbol order",
|
|
2635
|
+
"Fill in the blanks": "Fill in the blanks"
|
|
2635
2636
|
};
|
|
2636
2637
|
|
|
2637
2638
|
const Exit$4 = "Quitter";
|
|
@@ -2639,7 +2640,8 @@ const fr = {
|
|
|
2639
2640
|
"Do you want to exit?": "Voulez-vous quitter?",
|
|
2640
2641
|
Exit: Exit$4,
|
|
2641
2642
|
"Continue playing": "Continuer à jouer",
|
|
2642
|
-
"Drop the elements to match the given symbol order": "Déposez les éléments pour correspondre au symbole donné"
|
|
2643
|
+
"Drop the elements to match the given symbol order": "Déposez les éléments pour correspondre au symbole donné",
|
|
2644
|
+
"Fill in the blanks": "Remplissez les blancs"
|
|
2643
2645
|
};
|
|
2644
2646
|
|
|
2645
2647
|
const Exit$3 = "बाहर निकलें";
|
|
@@ -2647,7 +2649,8 @@ const hi = {
|
|
|
2647
2649
|
"Do you want to exit?": "क्या आप बाहर निकलना चाहते हैं?",
|
|
2648
2650
|
Exit: Exit$3,
|
|
2649
2651
|
"Continue playing": "खेलना जारी रखें",
|
|
2650
|
-
"Drop the elements to match the given symbol order": "दिए गए चिन्ह से मिलाने के लिए तत्वों को ड्रॉप करें"
|
|
2652
|
+
"Drop the elements to match the given symbol order": "दिए गए चिन्ह से मिलाने के लिए तत्वों को ड्रॉप करें",
|
|
2653
|
+
"Fill in the blanks": "रिक्त स्थान भरें"
|
|
2651
2654
|
};
|
|
2652
2655
|
|
|
2653
2656
|
const Exit$2 = "ನಿರ್ಗಮಿಸು";
|
|
@@ -2655,7 +2658,8 @@ const ka = {
|
|
|
2655
2658
|
"Do you want to exit?": "ನೀವು ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?",
|
|
2656
2659
|
Exit: Exit$2,
|
|
2657
2660
|
"Continue playing": "ಆಟವನ್ನು ಮುಂದುವರಿಸಿ",
|
|
2658
|
-
"Drop the elements to match the given symbol order": "ನೀಡಿರುವ ಸಂಕೇತಕ್ಕೆ ಹೊಂದುವಂತೆ ಅಂಶಗಳನ್ನು ಬಿಡಿ"
|
|
2661
|
+
"Drop the elements to match the given symbol order": "ನೀಡಿರುವ ಸಂಕೇತಕ್ಕೆ ಹೊಂದುವಂತೆ ಅಂಶಗಳನ್ನು ಬಿಡಿ",
|
|
2662
|
+
"Fill in the blanks": "ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ"
|
|
2659
2663
|
};
|
|
2660
2664
|
|
|
2661
2665
|
const Exit$1 = "బయటకు వెళ్ళు";
|
|
@@ -2663,7 +2667,8 @@ const te = {
|
|
|
2663
2667
|
"Do you want to exit?": "మీరు బయటకు వెళ్లాలనుకుంటున్నారా?",
|
|
2664
2668
|
Exit: Exit$1,
|
|
2665
2669
|
"Continue playing": "ఆటను కొనసాగించు",
|
|
2666
|
-
"Drop the elements to match the given symbol order": "ఇచ్చిన చిహ్నానికి సరిపడేలా అంశాలను డ్రాప్ చేయండి"
|
|
2670
|
+
"Drop the elements to match the given symbol order": "ఇచ్చిన చిహ్నానికి సరిపడేలా అంశాలను డ్రాప్ చేయండి",
|
|
2671
|
+
"Fill in the blanks": "ఖాళీలను నింపండి"
|
|
2667
2672
|
};
|
|
2668
2673
|
|
|
2669
2674
|
const Exit = "Sair";
|
|
@@ -2671,7 +2676,8 @@ const port = {
|
|
|
2671
2676
|
"Do you want to exit?": "Você deseja sair?",
|
|
2672
2677
|
Exit: Exit,
|
|
2673
2678
|
"Continue playing": "Continuar jogando",
|
|
2674
|
-
"Drop the elements to match the given symbol order": "Solte os elementos para corresponder à ordem dos símbolos fornecida"
|
|
2679
|
+
"Drop the elements to match the given symbol order": "Solte os elementos para corresponder à ordem dos símbolos fornecida",
|
|
2680
|
+
"Fill in the blanks": "Preencha os espaços em branco"
|
|
2675
2681
|
};
|
|
2676
2682
|
|
|
2677
2683
|
instance
|
|
@@ -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-
|
|
1
|
+
import { p as proxyCustomElement, H, k as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-36c2e21a.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, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp,
|
|
1
|
+
import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, W as fraction, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoSlideFillCss = ".svg-element,svg{width:100%;height:100%}";
|
|
4
4
|
const LidoSlideFillStyle0 = lidoSlideFillCss;
|