lido-player 0.0.2-alpha-45 → 0.0.2-alpha-47
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_19.cjs.entry.js +23 -1
- package/dist/cjs/{utils-5163b0ea.js → utils-5eb1c564.js} +8 -6
- package/dist/collection/components/home/lido-home.js +24 -2
- package/dist/collection/utils/utilsHandlers/clickHandler.js +4 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +1 -1
- 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-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 +19 -19
- 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-c88691c0.js → p-37b858ea.js} +1 -1
- package/dist/components/{p-59b453c0.js → p-3c61fbbf.js} +1 -1
- package/dist/components/{p-2674c807.js → p-3f870259.js} +1 -1
- package/dist/components/{p-1ed40a32.js → p-411211a1.js} +8 -7
- package/dist/components/{p-2652df87.js → p-431ba5f4.js} +1 -1
- package/dist/components/{p-89b75740.js → p-45facd95.js} +1 -1
- package/dist/components/{p-60ac87d6.js → p-4aed6173.js} +1 -1
- package/dist/components/{p-8dc32540.js → p-4eb470d6.js} +1 -1
- package/dist/components/{p-7c08f4b0.js → p-5ecdd4d6.js} +1 -1
- package/dist/components/{p-321f6fa4.js → p-5fe75d33.js} +40 -18
- package/dist/components/{p-06be7863.js → p-845c86f1.js} +1 -1
- package/dist/components/{p-1cb5cdd1.js → p-84be7c39.js} +1 -1
- package/dist/components/{p-04f31279.js → p-8679133b.js} +2 -2
- package/dist/components/{p-f0eccd33.js → p-9232f089.js} +1 -1
- package/dist/components/{p-00ed3e98.js → p-ab6100de.js} +1 -1
- package/dist/components/{p-8973becd.js → p-ce3cd4fa.js} +1 -1
- package/dist/components/{p-a9ab64eb.js → p-cebc6dde.js} +1 -1
- package/dist/components/{p-10f1bf20.js → p-db43b49d.js} +1 -1
- package/dist/components/{p-69254a4c.js → p-e755a718.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_19.entry.js +23 -1
- package/dist/esm/{utils-2ef9d35f.js → utils-776feb17.js} +8 -7
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-52730826.entry.js +1 -0
- package/dist/lido-player/p-abeb7435.js +9 -0
- package/dist/types/components/home/lido-home.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lido-player/p-2bd8c2b0.js +0 -9
- package/dist/lido-player/p-470ede3a.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-fe562525.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-5eb1c564.js');
|
|
7
7
|
|
|
8
8
|
var rive = {exports: {}};
|
|
9
9
|
|
|
@@ -7414,6 +7414,16 @@ const LidoHome = class {
|
|
|
7414
7414
|
});
|
|
7415
7415
|
this.containers = containers;
|
|
7416
7416
|
}
|
|
7417
|
+
areAllDropsFilled() {
|
|
7418
|
+
const drops = Array.from(document.querySelectorAll('[type="drop"]'));
|
|
7419
|
+
const drags = Array.from(document.querySelectorAll('[type="drag"]')).filter(drag => drag.getAttribute('drop-to'));
|
|
7420
|
+
console.log('drops', drops);
|
|
7421
|
+
console.log('drags', drags);
|
|
7422
|
+
return drops.every(drop => {
|
|
7423
|
+
const dropId = drop.id;
|
|
7424
|
+
return drags.some(drag => drag.getAttribute('drop-to') === dropId);
|
|
7425
|
+
});
|
|
7426
|
+
}
|
|
7417
7427
|
async btnpopup() {
|
|
7418
7428
|
utils.setCancelBtnPopup(false);
|
|
7419
7429
|
await utils.AudioPlayer.getI().stop();
|
|
@@ -7433,6 +7443,18 @@ const LidoHome = class {
|
|
|
7433
7443
|
await new Promise(resolve => setTimeout(resolve, 300));
|
|
7434
7444
|
}
|
|
7435
7445
|
}
|
|
7446
|
+
if (this.areAllDropsFilled()) {
|
|
7447
|
+
const objectiveString = container['objective'];
|
|
7448
|
+
const objectiveArray = JSON.parse(localStorage.getItem(utils.SelectedValuesKey) || '[]');
|
|
7449
|
+
const res = utils.matchStringPattern(objectiveString, objectiveArray);
|
|
7450
|
+
console.log('Resultt', res);
|
|
7451
|
+
if (res) {
|
|
7452
|
+
utils.triggerNextContainer();
|
|
7453
|
+
}
|
|
7454
|
+
}
|
|
7455
|
+
else {
|
|
7456
|
+
console.log('Not yet filled ');
|
|
7457
|
+
}
|
|
7436
7458
|
}
|
|
7437
7459
|
scaleNavbarContainer() {
|
|
7438
7460
|
setTimeout(() => {
|
|
@@ -324,7 +324,7 @@ function enableDraggingWithScaling(element) {
|
|
|
324
324
|
}
|
|
325
325
|
isClicked = false;
|
|
326
326
|
element.style.transition = 'none';
|
|
327
|
-
const containerScale =
|
|
327
|
+
const containerScale = calculateScale();
|
|
328
328
|
let dx = 0;
|
|
329
329
|
let dy = 0;
|
|
330
330
|
if (event instanceof MouseEvent) {
|
|
@@ -1203,7 +1203,7 @@ function enableReorderDrag(element) {
|
|
|
1203
1203
|
isClicked = false;
|
|
1204
1204
|
event.preventDefault();
|
|
1205
1205
|
const containerRect = container.getBoundingClientRect();
|
|
1206
|
-
const containerScale =
|
|
1206
|
+
const containerScale = calculateScale();
|
|
1207
1207
|
const newLeft = (point.clientX - containerRect.left - offsetXInElement) / containerScale;
|
|
1208
1208
|
const newTop = (point.clientY - containerRect.top - offsetYInElement) / containerScale;
|
|
1209
1209
|
element.style.left = `${newLeft}px`;
|
|
@@ -1270,9 +1270,7 @@ function enableReorderDrag(element) {
|
|
|
1270
1270
|
else {
|
|
1271
1271
|
if (element.parentElement['type'] !== 'category') {
|
|
1272
1272
|
executeActions('this.alignMatch=true', divEl, element);
|
|
1273
|
-
|
|
1274
|
-
divEl.replaceWith(element);
|
|
1275
|
-
}, 500);
|
|
1273
|
+
divEl.replaceWith(element);
|
|
1276
1274
|
}
|
|
1277
1275
|
else {
|
|
1278
1276
|
const categoryElement = element.parentElement;
|
|
@@ -3045,7 +3043,9 @@ function addClickListenerForClickType(element) {
|
|
|
3045
3043
|
dispatchClickEvent(element, isCorrect);
|
|
3046
3044
|
if (isCorrect) {
|
|
3047
3045
|
const onCorrect = element.getAttribute('onCorrect');
|
|
3048
|
-
|
|
3046
|
+
if (!(element.id && element.id.startsWith('key-button'))) {
|
|
3047
|
+
element.style.pointerEvents = 'none';
|
|
3048
|
+
}
|
|
3049
3049
|
await executeActions(onCorrect, element);
|
|
3050
3050
|
}
|
|
3051
3051
|
else {
|
|
@@ -3100,6 +3100,7 @@ function addClickListenerForClickType(element) {
|
|
|
3100
3100
|
localStorage.setItem(SelectedValuesKey, JSON.stringify(sortedValues));
|
|
3101
3101
|
const isCorrect = objective.includes(element['value']);
|
|
3102
3102
|
dispatchClickEvent(element, isCorrect);
|
|
3103
|
+
AudioPlayer.getI().stop();
|
|
3103
3104
|
if (isCorrect) {
|
|
3104
3105
|
const onCorrect = element.getAttribute('onCorrect');
|
|
3105
3106
|
await executeActions(onCorrect, element);
|
|
@@ -68847,6 +68848,7 @@ exports.handleElementClick = handleElementClick;
|
|
|
68847
68848
|
exports.handleFloatElementPosition = handleFloatElementPosition;
|
|
68848
68849
|
exports.handlingChildElements = handlingChildElements;
|
|
68849
68850
|
exports.initEventsForElement = initEventsForElement;
|
|
68851
|
+
exports.matchStringPattern = matchStringPattern;
|
|
68850
68852
|
exports.nextUrl = nextUrl;
|
|
68851
68853
|
exports.parseProp = parseProp;
|
|
68852
68854
|
exports.prevUrl = prevUrl;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { NextContainerKey, PrevContainerKey, LidoContainer, exitUrl, prevUrl, nextUrl, speakUrl, ActivityScoreKey, } from "../../utils/constants";
|
|
2
|
+
import { SelectedValuesKey, NextContainerKey, PrevContainerKey, LidoContainer, exitUrl, prevUrl, nextUrl, speakUrl, ActivityScoreKey, } from "../../utils/constants";
|
|
3
3
|
import { dispatchActivityChangeEvent, dispatchGameCompletedEvent, dispatchGameExitEvent } from "../../utils/customEvents";
|
|
4
|
-
import { clearLocalStorage, calculateScale, getCancelBtnPopup, setCancelBtnPopup, executeActions, triggerPrevcontainer, convertUrlToRelative } from "../../utils/utils";
|
|
4
|
+
import { clearLocalStorage, calculateScale, getCancelBtnPopup, setCancelBtnPopup, executeActions, triggerPrevcontainer, convertUrlToRelative, triggerNextContainer, matchStringPattern } from "../../utils/utils";
|
|
5
5
|
import { AudioPlayer } from "../../utils/audioPlayer";
|
|
6
6
|
import { generateUUIDFallback } from "../../utils/utils";
|
|
7
7
|
/**
|
|
@@ -321,6 +321,16 @@ export class LidoHome {
|
|
|
321
321
|
});
|
|
322
322
|
this.containers = containers;
|
|
323
323
|
}
|
|
324
|
+
areAllDropsFilled() {
|
|
325
|
+
const drops = Array.from(document.querySelectorAll('[type="drop"]'));
|
|
326
|
+
const drags = Array.from(document.querySelectorAll('[type="drag"]')).filter(drag => drag.getAttribute('drop-to'));
|
|
327
|
+
console.log('drops', drops);
|
|
328
|
+
console.log('drags', drags);
|
|
329
|
+
return drops.every(drop => {
|
|
330
|
+
const dropId = drop.id;
|
|
331
|
+
return drags.some(drag => drag.getAttribute('drop-to') === dropId);
|
|
332
|
+
});
|
|
333
|
+
}
|
|
324
334
|
async btnpopup() {
|
|
325
335
|
setCancelBtnPopup(false);
|
|
326
336
|
await AudioPlayer.getI().stop();
|
|
@@ -340,6 +350,18 @@ export class LidoHome {
|
|
|
340
350
|
await new Promise(resolve => setTimeout(resolve, 300));
|
|
341
351
|
}
|
|
342
352
|
}
|
|
353
|
+
if (this.areAllDropsFilled()) {
|
|
354
|
+
const objectiveString = container['objective'];
|
|
355
|
+
const objectiveArray = JSON.parse(localStorage.getItem(SelectedValuesKey) || '[]');
|
|
356
|
+
const res = matchStringPattern(objectiveString, objectiveArray);
|
|
357
|
+
console.log('Resultt', res);
|
|
358
|
+
if (res) {
|
|
359
|
+
triggerNextContainer();
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
console.log('Not yet filled ');
|
|
364
|
+
}
|
|
343
365
|
}
|
|
344
366
|
scaleNavbarContainer() {
|
|
345
367
|
setTimeout(() => {
|
|
@@ -90,7 +90,9 @@ export function addClickListenerForClickType(element) {
|
|
|
90
90
|
dispatchClickEvent(element, isCorrect);
|
|
91
91
|
if (isCorrect) {
|
|
92
92
|
const onCorrect = element.getAttribute('onCorrect');
|
|
93
|
-
|
|
93
|
+
if (!(element.id && element.id.startsWith('key-button'))) {
|
|
94
|
+
element.style.pointerEvents = 'none';
|
|
95
|
+
}
|
|
94
96
|
await executeActions(onCorrect, element);
|
|
95
97
|
}
|
|
96
98
|
else {
|
|
@@ -145,6 +147,7 @@ export function addClickListenerForClickType(element) {
|
|
|
145
147
|
localStorage.setItem(SelectedValuesKey, JSON.stringify(sortedValues));
|
|
146
148
|
const isCorrect = objective.includes(element['value']);
|
|
147
149
|
dispatchClickEvent(element, isCorrect);
|
|
150
|
+
AudioPlayer.getI().stop();
|
|
148
151
|
if (isCorrect) {
|
|
149
152
|
const onCorrect = element.getAttribute('onCorrect');
|
|
150
153
|
await executeActions(onCorrect, element);
|
|
@@ -173,7 +173,7 @@ export function enableDraggingWithScaling(element) {
|
|
|
173
173
|
}
|
|
174
174
|
isClicked = false;
|
|
175
175
|
element.style.transition = 'none';
|
|
176
|
-
const containerScale =
|
|
176
|
+
const containerScale = calculateScale();
|
|
177
177
|
let dx = 0;
|
|
178
178
|
let dy = 0;
|
|
179
179
|
if (event instanceof MouseEvent) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DragSelectedMapKey, LidoContainer, SelectedValuesKey } from "../constants";
|
|
2
|
-
import { executeActions, handleShowCheck, matchStringPattern, onActivityComplete, storingEachActivityScore } from "../utils";
|
|
2
|
+
import { calculateScale, executeActions, handleShowCheck, matchStringPattern, onActivityComplete, storingEachActivityScore } from "../utils";
|
|
3
3
|
let preOverlap;
|
|
4
4
|
function getElementScale(element) {
|
|
5
5
|
const transform = window.getComputedStyle(element).transform;
|
|
@@ -106,7 +106,7 @@ export function enableReorderDrag(element) {
|
|
|
106
106
|
isClicked = false;
|
|
107
107
|
event.preventDefault();
|
|
108
108
|
const containerRect = container.getBoundingClientRect();
|
|
109
|
-
const containerScale =
|
|
109
|
+
const containerScale = calculateScale();
|
|
110
110
|
const newLeft = (point.clientX - containerRect.left - offsetXInElement) / containerScale;
|
|
111
111
|
const newTop = (point.clientY - containerRect.top - offsetYInElement) / containerScale;
|
|
112
112
|
element.style.left = `${newLeft}px`;
|
|
@@ -173,9 +173,7 @@ export function enableReorderDrag(element) {
|
|
|
173
173
|
else {
|
|
174
174
|
if (element.parentElement['type'] !== 'category') {
|
|
175
175
|
executeActions('this.alignMatch=true', divEl, element);
|
|
176
|
-
|
|
177
|
-
divEl.replaceWith(element);
|
|
178
|
-
}, 500);
|
|
176
|
+
divEl.replaceWith(element);
|
|
179
177
|
}
|
|
180
178
|
else {
|
|
181
179
|
const categoryElement = element.parentElement;
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-
|
|
1
|
+
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-411211a1.js';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-
|
|
2
|
-
import { d as defineCustomElement$j } from './p-
|
|
3
|
-
import { d as defineCustomElement$i } from './p-
|
|
4
|
-
import { d as defineCustomElement$h } from './p-
|
|
5
|
-
import { d as defineCustomElement$g } from './p-
|
|
6
|
-
import { d as defineCustomElement$f } from './p-
|
|
7
|
-
import { d as defineCustomElement$e } from './p-
|
|
8
|
-
import { d as defineCustomElement$d } from './p-
|
|
9
|
-
import { d as defineCustomElement$c } from './p-
|
|
10
|
-
import { d as defineCustomElement$b } from './p-
|
|
11
|
-
import { d as defineCustomElement$a } from './p-
|
|
12
|
-
import { d as defineCustomElement$9 } from './p-
|
|
13
|
-
import { d as defineCustomElement$8 } from './p-
|
|
14
|
-
import { d as defineCustomElement$7 } from './p-
|
|
15
|
-
import { d as defineCustomElement$6 } from './p-
|
|
16
|
-
import { d as defineCustomElement$5 } from './p-
|
|
17
|
-
import { d as defineCustomElement$4 } from './p-
|
|
18
|
-
import { d as defineCustomElement$3 } from './p-
|
|
19
|
-
import { d as defineCustomElement$2 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-411211a1.js';
|
|
2
|
+
import { d as defineCustomElement$j } from './p-3f870259.js';
|
|
3
|
+
import { d as defineCustomElement$i } from './p-ce3cd4fa.js';
|
|
4
|
+
import { d as defineCustomElement$h } from './p-5ecdd4d6.js';
|
|
5
|
+
import { d as defineCustomElement$g } from './p-3c61fbbf.js';
|
|
6
|
+
import { d as defineCustomElement$f } from './p-4eb470d6.js';
|
|
7
|
+
import { d as defineCustomElement$e } from './p-9232f089.js';
|
|
8
|
+
import { d as defineCustomElement$d } from './p-5fe75d33.js';
|
|
9
|
+
import { d as defineCustomElement$c } from './p-db43b49d.js';
|
|
10
|
+
import { d as defineCustomElement$b } from './p-8679133b.js';
|
|
11
|
+
import { d as defineCustomElement$a } from './p-84be7c39.js';
|
|
12
|
+
import { d as defineCustomElement$9 } from './p-431ba5f4.js';
|
|
13
|
+
import { d as defineCustomElement$8 } from './p-cebc6dde.js';
|
|
14
|
+
import { d as defineCustomElement$7 } from './p-845c86f1.js';
|
|
15
|
+
import { d as defineCustomElement$6 } from './p-ab6100de.js';
|
|
16
|
+
import { d as defineCustomElement$5 } from './p-4aed6173.js';
|
|
17
|
+
import { d as defineCustomElement$4 } from './p-37b858ea.js';
|
|
18
|
+
import { d as defineCustomElement$3 } from './p-e755a718.js';
|
|
19
|
+
import { d as defineCustomElement$2 } from './p-45facd95.js';
|
|
20
20
|
|
|
21
21
|
const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
22
22
|
constructor() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, l as attachSpeakIcon, e as convertUrlToRelative, m as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, l as attachSpeakIcon, e as convertUrlToRelative, m as parseProp, h, j as Host } from './p-411211a1.js';
|
|
2
2
|
|
|
3
3
|
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)}}";
|
|
4
4
|
const LidoTextStyle0 = lidoTextCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, n as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, n as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-411211a1.js';
|
|
2
2
|
|
|
3
3
|
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}";
|
|
4
4
|
const LidoContainerStyle0 = lidoContainerCss;
|
|
@@ -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-
|
|
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-411211a1.js';
|
|
2
2
|
|
|
3
3
|
var rive = {exports: {}};
|
|
4
4
|
|
|
@@ -1720,7 +1720,7 @@ function enableDraggingWithScaling(element) {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
isClicked = false;
|
|
1722
1722
|
element.style.transition = 'none';
|
|
1723
|
-
const containerScale =
|
|
1723
|
+
const containerScale = calculateScale();
|
|
1724
1724
|
let dx = 0;
|
|
1725
1725
|
let dy = 0;
|
|
1726
1726
|
if (event instanceof MouseEvent) {
|
|
@@ -2599,7 +2599,7 @@ function enableReorderDrag(element) {
|
|
|
2599
2599
|
isClicked = false;
|
|
2600
2600
|
event.preventDefault();
|
|
2601
2601
|
const containerRect = container.getBoundingClientRect();
|
|
2602
|
-
const containerScale =
|
|
2602
|
+
const containerScale = calculateScale();
|
|
2603
2603
|
const newLeft = (point.clientX - containerRect.left - offsetXInElement) / containerScale;
|
|
2604
2604
|
const newTop = (point.clientY - containerRect.top - offsetYInElement) / containerScale;
|
|
2605
2605
|
element.style.left = `${newLeft}px`;
|
|
@@ -2666,9 +2666,7 @@ function enableReorderDrag(element) {
|
|
|
2666
2666
|
else {
|
|
2667
2667
|
if (element.parentElement['type'] !== 'category') {
|
|
2668
2668
|
executeActions('this.alignMatch=true', divEl, element);
|
|
2669
|
-
|
|
2670
|
-
divEl.replaceWith(element);
|
|
2671
|
-
}, 500);
|
|
2669
|
+
divEl.replaceWith(element);
|
|
2672
2670
|
}
|
|
2673
2671
|
else {
|
|
2674
2672
|
const categoryElement = element.parentElement;
|
|
@@ -4441,7 +4439,9 @@ function addClickListenerForClickType(element) {
|
|
|
4441
4439
|
dispatchClickEvent(element, isCorrect);
|
|
4442
4440
|
if (isCorrect) {
|
|
4443
4441
|
const onCorrect = element.getAttribute('onCorrect');
|
|
4444
|
-
|
|
4442
|
+
if (!(element.id && element.id.startsWith('key-button'))) {
|
|
4443
|
+
element.style.pointerEvents = 'none';
|
|
4444
|
+
}
|
|
4445
4445
|
await executeActions(onCorrect, element);
|
|
4446
4446
|
}
|
|
4447
4447
|
else {
|
|
@@ -4496,6 +4496,7 @@ function addClickListenerForClickType(element) {
|
|
|
4496
4496
|
localStorage.setItem(SelectedValuesKey, JSON.stringify(sortedValues));
|
|
4497
4497
|
const isCorrect = objective.includes(element['value']);
|
|
4498
4498
|
dispatchClickEvent(element, isCorrect);
|
|
4499
|
+
AudioPlayer.getI().stop();
|
|
4499
4500
|
if (isCorrect) {
|
|
4500
4501
|
const onCorrect = element.getAttribute('onCorrect');
|
|
4501
4502
|
await executeActions(onCorrect, element);
|
|
@@ -70216,4 +70217,4 @@ function generateUUIDFallback() {
|
|
|
70216
70217
|
});
|
|
70217
70218
|
}
|
|
70218
70219
|
|
|
70219
|
-
export { ActivityScoreKey as A, nextUrl as B, speakUrl as C, getCancelBtnPopup as D,
|
|
70220
|
+
export { ActivityScoreKey as A, nextUrl as B, speakUrl as C, getCancelBtnPopup as D, matchStringPattern as E, triggerNextContainer as F, triggerPrevcontainer as G, H, executeActions as I, setCancelBtnPopup as J, getDefaultExportFromCjs as K, LidoContainer as L, tinyColor as M, NextContainerKey as N, storingEachActivityScore as O, PrevContainerKey as P, DropAction as Q, RiveService as R, SelectedValuesKey as S, fraction as T, TraceMode as U, speakIcon as V, fingerUrl as W, 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, handlingChildElements as k, attachSpeakIcon as l, parseProp as m, calculateScale as n, handleFloatElementPosition as o, proxyCustomElement as p, handleElementClick as q, clearLocalStorage as r, setAssetPath as s, dispatchActivityChangeEvent as t, dispatchGameCompletedEvent as u, dispatchGameExitEvent as v, AudioPlayer as w, generateUUIDFallback as x, exitUrl as y, prevUrl as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, m as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, m as parseProp, h, j as Host } from './p-411211a1.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, k as handlingChildElements, l as attachSpeakIcon, m as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, k as handlingChildElements, l as attachSpeakIcon, m as parseProp, h, j as Host } from './p-411211a1.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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, m as parseProp,
|
|
1
|
+
import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, m as parseProp, T as fraction, h, j as Host } from './p-411211a1.js';
|
|
2
2
|
|
|
3
3
|
const lidoSlideFillCss = ".svg-element,svg{width:100%;height:100%}";
|
|
4
4
|
const LidoSlideFillStyle0 = lidoSlideFillCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, m as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, m as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-411211a1.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 handlingChildElements, l as attachSpeakIcon, e as convertUrlToRelative, m as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, k as handlingChildElements, l as attachSpeakIcon, e as convertUrlToRelative, m as parseProp, h, j as Host } from './p-411211a1.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,21 +1,21 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, r as clearLocalStorage, t as dispatchActivityChangeEvent, A as ActivityScoreKey, u as dispatchGameCompletedEvent, v as dispatchGameExitEvent, w as AudioPlayer, x as generateUUIDFallback, y as exitUrl, z as prevUrl, B as nextUrl, C as speakUrl, N as NextContainerKey, P as PrevContainerKey, L as LidoContainer, h, D as getCancelBtnPopup, n as calculateScale,
|
|
2
|
-
import { d as defineCustomElement$h } from './p-
|
|
3
|
-
import { d as defineCustomElement$g } from './p-
|
|
4
|
-
import { d as defineCustomElement$f } from './p-
|
|
5
|
-
import { d as defineCustomElement$e } from './p-
|
|
6
|
-
import { d as defineCustomElement$d } from './p-
|
|
7
|
-
import { d as defineCustomElement$c } from './p-
|
|
8
|
-
import { d as defineCustomElement$b } from './p-
|
|
9
|
-
import { d as defineCustomElement$a } from './p-
|
|
10
|
-
import { d as defineCustomElement$9 } from './p-
|
|
11
|
-
import { d as defineCustomElement$8 } from './p-
|
|
12
|
-
import { d as defineCustomElement$7 } from './p-
|
|
13
|
-
import { d as defineCustomElement$6 } from './p-
|
|
14
|
-
import { d as defineCustomElement$5 } from './p-
|
|
15
|
-
import { d as defineCustomElement$4 } from './p-
|
|
16
|
-
import { d as defineCustomElement$3 } from './p-
|
|
17
|
-
import { d as defineCustomElement$2 } from './p-
|
|
18
|
-
import { d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, r as clearLocalStorage, t as dispatchActivityChangeEvent, A as ActivityScoreKey, u as dispatchGameCompletedEvent, v as dispatchGameExitEvent, w as AudioPlayer, x as generateUUIDFallback, y as exitUrl, z as prevUrl, B as nextUrl, C as speakUrl, N as NextContainerKey, P as PrevContainerKey, L as LidoContainer, h, D as getCancelBtnPopup, S as SelectedValuesKey, E as matchStringPattern, F as triggerNextContainer, n as calculateScale, G as triggerPrevcontainer, I as executeActions, j as Host, e as convertUrlToRelative, J as setCancelBtnPopup } from './p-411211a1.js';
|
|
2
|
+
import { d as defineCustomElement$h } from './p-3f870259.js';
|
|
3
|
+
import { d as defineCustomElement$g } from './p-ce3cd4fa.js';
|
|
4
|
+
import { d as defineCustomElement$f } from './p-5ecdd4d6.js';
|
|
5
|
+
import { d as defineCustomElement$e } from './p-3c61fbbf.js';
|
|
6
|
+
import { d as defineCustomElement$d } from './p-4eb470d6.js';
|
|
7
|
+
import { d as defineCustomElement$c } from './p-9232f089.js';
|
|
8
|
+
import { d as defineCustomElement$b } from './p-db43b49d.js';
|
|
9
|
+
import { d as defineCustomElement$a } from './p-8679133b.js';
|
|
10
|
+
import { d as defineCustomElement$9 } from './p-84be7c39.js';
|
|
11
|
+
import { d as defineCustomElement$8 } from './p-431ba5f4.js';
|
|
12
|
+
import { d as defineCustomElement$7 } from './p-cebc6dde.js';
|
|
13
|
+
import { d as defineCustomElement$6 } from './p-845c86f1.js';
|
|
14
|
+
import { d as defineCustomElement$5 } from './p-ab6100de.js';
|
|
15
|
+
import { d as defineCustomElement$4 } from './p-4aed6173.js';
|
|
16
|
+
import { d as defineCustomElement$3 } from './p-37b858ea.js';
|
|
17
|
+
import { d as defineCustomElement$2 } from './p-e755a718.js';
|
|
18
|
+
import { d as defineCustomElement$1 } from './p-45facd95.js';
|
|
19
19
|
|
|
20
20
|
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+Bhai+2:wght@400..800&display=swap'); body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}*{user-select:none}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}.diagonal-target,.diagonal-drop *{transform:scale(0.8) !important;opacity:1 !important}.cloned-element{display:flex !important;position:absolute !important;filter:grayscale(100%);pointer-events:none}.removeShadow{box-shadow:0px 0px 0px 0px #ff8900 !important}.highlight-element{border:2px solid white;box-shadow:0 2px 4px rgba(151, 150, 150, 0.1) !important}.drop-element.empty{border:4px dashed #f34d08 !important}.drop-element.filled{border:'none' !important}.drag-element{box-shadow:0px 15px 11px rgba(43, 0, 0, 0.3) !important}.drag-element.dropped{box-shadow:none !important}.click-element{background-color:var(--btn-bg-color, rgba(255, 172, 76, 1)) !important;box-shadow:var(--btn-shadow-px) var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;cursor:pointer;transition:box-shadow 0.1s ease-out, transform 0.2s ease-out;}.click-element:active{box-shadow:0px 0px 0px var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;transform:translateY(var(--btn-active));}.click-element:focus{outline:2px solid dodgerblue;outline-offset:3px}.after-drop-popup-container{width:200%;height:200%;background-color:rgba(0, 0, 0, 0.8);position:absolute;display:flex;flex-direction:row-reverse;align-items:center;justify-content:center !important;gap:80px}.after-drop-popup-drag-element{scale:1.5;border-radius:8px;transform:none !important;position:unset !important}.after-drop-popup-drop-element{scale:1.5;border:unset;border-radius:8px;transform:none !important;position:unset !important}@keyframes zoomFadeIn{0%{transform:scale(0.6);opacity:0}100%{transform:scale(1);opacity:1}}.zoom-fade-in{animation:zoomFadeIn 0.8s ease-out forwards}@keyframes zoomFadeOut{0%{transform:scale(1);opacity:1}100%{transform:scale(0.6);opacity:0}}.zoom-fade-out{animation:zoomFadeOut 0.8s ease-in forwards}.slide-numbers{width:70px;height:70px;border:1px solid #f57139;background-color:white;font-weight:500;color:#f57139;font-size:44px;border-radius:40px;display:flex;align-items:center;justify-content:center;font-family:'Baloo Bhai 2', serif}.slide-numbers-bottom{position:absolute;display:flex;justify-content:space-around;align-items:center;bottom:-25px;width:100%;height:50px}.slide-numbers-left{position:absolute;display:flex;flex-direction:column;justify-content:space-around;height:100%;width:50px;left:-25px;bottom:0px}.lido-speak-icon{width:56px;height:56px;position:absolute;top:-25px;right:-25px;z-index:10;background-image:url(\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/template/audioIcon.png\");background-color:white;border:4px solid #F34D08;border-radius:16px;box-shadow:0px 4px 0px 0px #F34D08;background-size:contain;background-repeat:no-repeat;cursor:pointer}.lido-speak-icon:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px !important}.lido-strong-shake{animation:strongShake 0.3s ease}.lido-scaled-shake{animation:scaledShake 0.6s ease-in-out}.lido-horizontal-shake{animation:horizontalShake 0.6s ease-in-out;border-radius:20px}.lido-vertical-shake{animation:verticalShake 0.6s ease-in-out;border-radius:20px}.lido-diagonal-shake{animation:diagonalShake 0.5s ease-in-out;border-radius:20px;will-change:transform}";
|
|
21
21
|
const LidoHomeStyle0 = indexCss;
|
|
@@ -338,6 +338,16 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
|
|
|
338
338
|
});
|
|
339
339
|
this.containers = containers;
|
|
340
340
|
}
|
|
341
|
+
areAllDropsFilled() {
|
|
342
|
+
const drops = Array.from(document.querySelectorAll('[type="drop"]'));
|
|
343
|
+
const drags = Array.from(document.querySelectorAll('[type="drag"]')).filter(drag => drag.getAttribute('drop-to'));
|
|
344
|
+
console.log('drops', drops);
|
|
345
|
+
console.log('drags', drags);
|
|
346
|
+
return drops.every(drop => {
|
|
347
|
+
const dropId = drop.id;
|
|
348
|
+
return drags.some(drag => drag.getAttribute('drop-to') === dropId);
|
|
349
|
+
});
|
|
350
|
+
}
|
|
341
351
|
async btnpopup() {
|
|
342
352
|
setCancelBtnPopup(false);
|
|
343
353
|
await AudioPlayer.getI().stop();
|
|
@@ -357,6 +367,18 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
|
|
|
357
367
|
await new Promise(resolve => setTimeout(resolve, 300));
|
|
358
368
|
}
|
|
359
369
|
}
|
|
370
|
+
if (this.areAllDropsFilled()) {
|
|
371
|
+
const objectiveString = container['objective'];
|
|
372
|
+
const objectiveArray = JSON.parse(localStorage.getItem(SelectedValuesKey) || '[]');
|
|
373
|
+
const res = matchStringPattern(objectiveString, objectiveArray);
|
|
374
|
+
console.log('Resultt', res);
|
|
375
|
+
if (res) {
|
|
376
|
+
triggerNextContainer();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
console.log('Not yet filled ');
|
|
381
|
+
}
|
|
360
382
|
}
|
|
361
383
|
scaleNavbarContainer() {
|
|
362
384
|
setTimeout(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, k as handlingChildElements, l as attachSpeakIcon, m as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, k as handlingChildElements, l as attachSpeakIcon, m as parseProp, h, j as Host } from './p-411211a1.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,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, e as convertUrlToRelative, m as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, e as convertUrlToRelative, m as parseProp, h, j as Host } from './p-411211a1.js';
|
|
2
2
|
|
|
3
3
|
const lidoMathMatrixCss = ".math-matrix{width:100%;height:100%;display:flex;justify-content:center}.slot{width:100%;height:100%}.slot:hover{opacity:0.7}.slot-parent{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.slot-active{background-color:var(--active-bg-color);background-image:var(--bg-image);background-size:cover;background-position:center;background-repeat:no-repeat}.slot-inactive{background-color:var(--inactive-bg-color);background-size:cover;background-position:center;background-repeat:no-repeat}.topIndex,.leftIndex,.bottomIndex{height:100%;width:100%;text-align:center;align-content:center;font-size:30px}";
|
|
4
4
|
const LidoMathMatrixStyle0 = lidoMathMatrixCss;
|