lido-player 0.0.2-beta-19-dev → 0.0.2-beta-21-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/{decode-Bny56MQ9.js → decode-Buln7Iaf.js} +1 -1
- package/dist/cjs/{index-BY9fvbr8.js → index-Bb_TFgTA.js} +1 -1
- package/dist/cjs/{index-DjsCseV8.js → index-DBCFoh1I.js} +19 -66
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/lido-avatar_22.cjs.entry.js +110 -21
- package/dist/cjs/lido-player.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/trace/lido-trace.js +107 -18
- package/dist/components/index.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-root.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/p-BAfFgI9q.js +1 -0
- package/dist/components/{p-CWwymnbk.js → p-wF7SBGpr.js} +2 -2
- package/dist/esm/{decode-Buyq-Iy5.js → decode-B_VrYFdJ.js} +1 -1
- package/dist/esm/{index-CQXciux9.js → index-B-VyHxJa.js} +1 -1
- package/dist/esm/{index-DQZfuGjI.js → index-mMpK8062.js} +19 -66
- package/dist/esm/index.js +2 -2
- package/dist/esm/lido-avatar_22.entry.js +110 -21
- package/dist/esm/lido-player.js +3 -3
- package/dist/esm/loader.js +2 -2
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-37736e11.entry.js → p-744dee1c.entry.js} +2 -2
- package/dist/lido-player/{p-3Ry570XH.js → p-BK926Rl3.js} +1 -1
- package/dist/lido-player/{p-CFtq4Thh.js → p-Cw84dpIR.js} +1 -1
- package/dist/lido-player/p-mMpK8062.js +2 -0
- package/dist/types/components/trace/lido-trace.d.ts +9 -1
- package/dist/types/stencil-public-runtime.d.ts +55 -73
- package/loader/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/components/p-DYFVwyRr.js +0 -1
- package/dist/lido-player/p-DQZfuGjI.js +0 -3
|
@@ -752,7 +752,7 @@ declare namespace LocalJSX {
|
|
|
752
752
|
}
|
|
753
753
|
export { LocalJSX as JSX };
|
|
754
754
|
export declare namespace JSXBase {
|
|
755
|
-
|
|
755
|
+
interface IntrinsicElements {
|
|
756
756
|
slot: JSXBase.SlotAttributes<HTMLSlotElement>;
|
|
757
757
|
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
758
758
|
abbr: JSXBase.HTMLAttributes;
|
|
@@ -923,12 +923,12 @@ export declare namespace JSXBase {
|
|
|
923
923
|
use: JSXBase.SVGAttributes;
|
|
924
924
|
view: JSXBase.SVGAttributes;
|
|
925
925
|
}
|
|
926
|
-
|
|
926
|
+
interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
|
|
927
927
|
name?: string;
|
|
928
928
|
slot?: string;
|
|
929
929
|
onSlotchange?: (event: Event) => void;
|
|
930
930
|
}
|
|
931
|
-
|
|
931
|
+
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
932
932
|
download?: any;
|
|
933
933
|
href?: string;
|
|
934
934
|
hrefLang?: string;
|
|
@@ -939,9 +939,9 @@ export declare namespace JSXBase {
|
|
|
939
939
|
target?: string;
|
|
940
940
|
referrerPolicy?: ReferrerPolicy;
|
|
941
941
|
}
|
|
942
|
-
|
|
942
|
+
interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
943
943
|
}
|
|
944
|
-
|
|
944
|
+
interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
945
945
|
alt?: string;
|
|
946
946
|
coords?: string;
|
|
947
947
|
download?: any;
|
|
@@ -953,14 +953,14 @@ export declare namespace JSXBase {
|
|
|
953
953
|
shape?: string;
|
|
954
954
|
target?: string;
|
|
955
955
|
}
|
|
956
|
-
|
|
956
|
+
interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
957
957
|
href?: string;
|
|
958
958
|
target?: string;
|
|
959
959
|
}
|
|
960
|
-
|
|
960
|
+
interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
961
961
|
cite?: string;
|
|
962
962
|
}
|
|
963
|
-
|
|
963
|
+
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
964
964
|
disabled?: boolean;
|
|
965
965
|
form?: string;
|
|
966
966
|
formAction?: string;
|
|
@@ -983,45 +983,44 @@ export declare namespace JSXBase {
|
|
|
983
983
|
commandFor?: string;
|
|
984
984
|
commandfor?: string;
|
|
985
985
|
}
|
|
986
|
-
|
|
986
|
+
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
987
987
|
height?: number | string;
|
|
988
988
|
width?: number | string;
|
|
989
989
|
}
|
|
990
|
-
|
|
990
|
+
interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
991
991
|
span?: number;
|
|
992
992
|
}
|
|
993
|
-
|
|
993
|
+
interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
994
994
|
span?: number;
|
|
995
995
|
}
|
|
996
|
-
|
|
996
|
+
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
997
997
|
open?: boolean;
|
|
998
998
|
name?: string;
|
|
999
999
|
onToggle?: (event: ToggleEvent) => void;
|
|
1000
1000
|
}
|
|
1001
|
-
|
|
1001
|
+
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1002
1002
|
cite?: string;
|
|
1003
1003
|
dateTime?: string;
|
|
1004
1004
|
datetime?: string;
|
|
1005
1005
|
}
|
|
1006
|
-
|
|
1006
|
+
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1007
1007
|
onCancel?: (event: Event) => void;
|
|
1008
1008
|
onClose?: (event: Event) => void;
|
|
1009
1009
|
open?: boolean;
|
|
1010
1010
|
returnValue?: string;
|
|
1011
|
-
closedby?: 'any' | 'closerequest' | 'none';
|
|
1012
1011
|
}
|
|
1013
|
-
|
|
1012
|
+
interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1014
1013
|
height?: number | string;
|
|
1015
1014
|
src?: string;
|
|
1016
1015
|
type?: string;
|
|
1017
1016
|
width?: number | string;
|
|
1018
1017
|
}
|
|
1019
|
-
|
|
1018
|
+
interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1020
1019
|
disabled?: boolean;
|
|
1021
1020
|
form?: string;
|
|
1022
1021
|
name?: string;
|
|
1023
1022
|
}
|
|
1024
|
-
|
|
1023
|
+
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1025
1024
|
acceptCharset?: string;
|
|
1026
1025
|
acceptcharset?: string;
|
|
1027
1026
|
action?: string;
|
|
@@ -1035,10 +1034,10 @@ export declare namespace JSXBase {
|
|
|
1035
1034
|
novalidate?: boolean | string;
|
|
1036
1035
|
target?: string;
|
|
1037
1036
|
}
|
|
1038
|
-
|
|
1037
|
+
interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1039
1038
|
manifest?: string;
|
|
1040
1039
|
}
|
|
1041
|
-
|
|
1040
|
+
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1042
1041
|
allow?: string;
|
|
1043
1042
|
allowFullScreen?: boolean;
|
|
1044
1043
|
allowfullScreen?: string | boolean;
|
|
@@ -1046,8 +1045,6 @@ export declare namespace JSXBase {
|
|
|
1046
1045
|
allowtransparency?: string | boolean;
|
|
1047
1046
|
frameBorder?: number | string;
|
|
1048
1047
|
frameborder?: number | string;
|
|
1049
|
-
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1050
|
-
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1051
1048
|
importance?: 'low' | 'auto' | 'high';
|
|
1052
1049
|
height?: number | string;
|
|
1053
1050
|
loading?: 'lazy' | 'auto' | 'eager';
|
|
@@ -1065,13 +1062,11 @@ export declare namespace JSXBase {
|
|
|
1065
1062
|
srcdoc?: string;
|
|
1066
1063
|
width?: number | string;
|
|
1067
1064
|
}
|
|
1068
|
-
|
|
1065
|
+
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1069
1066
|
alt?: string;
|
|
1070
1067
|
crossOrigin?: string;
|
|
1071
1068
|
crossorigin?: string;
|
|
1072
1069
|
decoding?: 'async' | 'auto' | 'sync';
|
|
1073
|
-
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1074
|
-
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1075
1070
|
importance?: 'low' | 'auto' | 'high';
|
|
1076
1071
|
height?: number | string;
|
|
1077
1072
|
loading?: 'lazy' | 'auto' | 'eager';
|
|
@@ -1084,12 +1079,12 @@ export declare namespace JSXBase {
|
|
|
1084
1079
|
usemap?: string;
|
|
1085
1080
|
width?: number | string;
|
|
1086
1081
|
}
|
|
1087
|
-
|
|
1082
|
+
interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1088
1083
|
cite?: string;
|
|
1089
1084
|
dateTime?: string;
|
|
1090
1085
|
datetime?: string;
|
|
1091
1086
|
}
|
|
1092
|
-
|
|
1087
|
+
interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1093
1088
|
accept?: string;
|
|
1094
1089
|
allowdirs?: boolean;
|
|
1095
1090
|
alt?: string;
|
|
@@ -1152,7 +1147,7 @@ export declare namespace JSXBase {
|
|
|
1152
1147
|
popoverTargetElement?: Element | null;
|
|
1153
1148
|
popoverTarget?: string;
|
|
1154
1149
|
}
|
|
1155
|
-
|
|
1150
|
+
interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1156
1151
|
challenge?: string;
|
|
1157
1152
|
disabled?: boolean;
|
|
1158
1153
|
form?: string;
|
|
@@ -1162,17 +1157,15 @@ export declare namespace JSXBase {
|
|
|
1162
1157
|
keyparams?: string;
|
|
1163
1158
|
name?: string;
|
|
1164
1159
|
}
|
|
1165
|
-
|
|
1160
|
+
interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1166
1161
|
form?: string;
|
|
1167
1162
|
htmlFor?: string;
|
|
1168
1163
|
}
|
|
1169
|
-
|
|
1164
|
+
interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1170
1165
|
value?: string | string[] | number;
|
|
1171
1166
|
}
|
|
1172
|
-
|
|
1167
|
+
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1173
1168
|
as?: string;
|
|
1174
|
-
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1175
|
-
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1176
1169
|
href?: string;
|
|
1177
1170
|
hrefLang?: string;
|
|
1178
1171
|
hreflang?: string;
|
|
@@ -1183,13 +1176,13 @@ export declare namespace JSXBase {
|
|
|
1183
1176
|
sizes?: string;
|
|
1184
1177
|
type?: string;
|
|
1185
1178
|
}
|
|
1186
|
-
|
|
1179
|
+
interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1187
1180
|
name?: string;
|
|
1188
1181
|
}
|
|
1189
|
-
|
|
1182
|
+
interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1190
1183
|
type?: string;
|
|
1191
1184
|
}
|
|
1192
|
-
|
|
1185
|
+
interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1193
1186
|
autoPlay?: boolean;
|
|
1194
1187
|
autoplay?: boolean | string;
|
|
1195
1188
|
controls?: boolean;
|
|
@@ -1229,7 +1222,7 @@ export declare namespace JSXBase {
|
|
|
1229
1222
|
onVolumeChange?: (event: Event) => void;
|
|
1230
1223
|
onWaiting?: (event: Event) => void;
|
|
1231
1224
|
}
|
|
1232
|
-
|
|
1225
|
+
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1233
1226
|
charSet?: string;
|
|
1234
1227
|
charset?: string;
|
|
1235
1228
|
content?: string;
|
|
@@ -1237,7 +1230,7 @@ export declare namespace JSXBase {
|
|
|
1237
1230
|
httpequiv?: string;
|
|
1238
1231
|
name?: string;
|
|
1239
1232
|
}
|
|
1240
|
-
|
|
1233
|
+
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1241
1234
|
form?: string;
|
|
1242
1235
|
high?: number;
|
|
1243
1236
|
low?: number;
|
|
@@ -1246,10 +1239,10 @@ export declare namespace JSXBase {
|
|
|
1246
1239
|
optimum?: number;
|
|
1247
1240
|
value?: string | string[] | number;
|
|
1248
1241
|
}
|
|
1249
|
-
|
|
1242
|
+
interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1250
1243
|
cite?: string;
|
|
1251
1244
|
}
|
|
1252
|
-
|
|
1245
|
+
interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1253
1246
|
classID?: string;
|
|
1254
1247
|
classid?: string;
|
|
1255
1248
|
data?: string;
|
|
@@ -1262,49 +1255,47 @@ export declare namespace JSXBase {
|
|
|
1262
1255
|
width?: number | string;
|
|
1263
1256
|
wmode?: string;
|
|
1264
1257
|
}
|
|
1265
|
-
|
|
1258
|
+
interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1266
1259
|
reversed?: boolean;
|
|
1267
1260
|
start?: number;
|
|
1268
1261
|
}
|
|
1269
|
-
|
|
1262
|
+
interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1270
1263
|
disabled?: boolean;
|
|
1271
1264
|
label?: string;
|
|
1272
1265
|
}
|
|
1273
|
-
|
|
1266
|
+
interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1274
1267
|
disabled?: boolean;
|
|
1275
1268
|
label?: string;
|
|
1276
1269
|
selected?: boolean;
|
|
1277
1270
|
value?: string | string[] | number;
|
|
1278
1271
|
}
|
|
1279
|
-
|
|
1272
|
+
interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1280
1273
|
form?: string;
|
|
1281
1274
|
htmlFor?: string;
|
|
1282
1275
|
name?: string;
|
|
1283
1276
|
}
|
|
1284
|
-
|
|
1277
|
+
interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1285
1278
|
name?: string;
|
|
1286
1279
|
value?: string | string[] | number;
|
|
1287
1280
|
}
|
|
1288
|
-
|
|
1281
|
+
interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1289
1282
|
max?: number | string;
|
|
1290
1283
|
value?: string | string[] | number;
|
|
1291
1284
|
}
|
|
1292
|
-
|
|
1285
|
+
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1293
1286
|
async?: boolean;
|
|
1294
1287
|
charSet?: string;
|
|
1295
1288
|
charset?: string;
|
|
1296
1289
|
crossOrigin?: string;
|
|
1297
1290
|
crossorigin?: string;
|
|
1298
1291
|
defer?: boolean;
|
|
1299
|
-
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1300
|
-
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1301
1292
|
importance?: 'low' | 'auto' | 'high';
|
|
1302
1293
|
integrity?: string;
|
|
1303
1294
|
nonce?: string;
|
|
1304
1295
|
src?: string;
|
|
1305
1296
|
type?: string;
|
|
1306
1297
|
}
|
|
1307
|
-
|
|
1298
|
+
interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1308
1299
|
disabled?: boolean;
|
|
1309
1300
|
form?: string;
|
|
1310
1301
|
multiple?: boolean;
|
|
@@ -1314,7 +1305,7 @@ export declare namespace JSXBase {
|
|
|
1314
1305
|
autoComplete?: string;
|
|
1315
1306
|
autocomplete?: string;
|
|
1316
1307
|
}
|
|
1317
|
-
|
|
1308
|
+
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1318
1309
|
height?: number;
|
|
1319
1310
|
media?: string;
|
|
1320
1311
|
sizes?: string;
|
|
@@ -1323,20 +1314,20 @@ export declare namespace JSXBase {
|
|
|
1323
1314
|
type?: string;
|
|
1324
1315
|
width?: number;
|
|
1325
1316
|
}
|
|
1326
|
-
|
|
1317
|
+
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1327
1318
|
media?: string;
|
|
1328
1319
|
nonce?: string;
|
|
1329
1320
|
scoped?: boolean;
|
|
1330
1321
|
type?: string;
|
|
1331
1322
|
}
|
|
1332
|
-
|
|
1323
|
+
interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1333
1324
|
cellPadding?: number | string;
|
|
1334
1325
|
cellpadding?: number | string;
|
|
1335
1326
|
cellSpacing?: number | string;
|
|
1336
1327
|
cellspacing?: number | string;
|
|
1337
1328
|
summary?: string;
|
|
1338
1329
|
}
|
|
1339
|
-
|
|
1330
|
+
interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1340
1331
|
autoComplete?: string;
|
|
1341
1332
|
autocomplete?: string;
|
|
1342
1333
|
cols?: number;
|
|
@@ -1357,12 +1348,12 @@ export declare namespace JSXBase {
|
|
|
1357
1348
|
value?: string | string[] | number;
|
|
1358
1349
|
wrap?: string;
|
|
1359
1350
|
}
|
|
1360
|
-
|
|
1351
|
+
interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1361
1352
|
colSpan?: number;
|
|
1362
1353
|
headers?: string;
|
|
1363
1354
|
rowSpan?: number;
|
|
1364
1355
|
}
|
|
1365
|
-
|
|
1356
|
+
interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1366
1357
|
abbr?: string;
|
|
1367
1358
|
colSpan?: number;
|
|
1368
1359
|
headers?: string;
|
|
@@ -1370,10 +1361,10 @@ export declare namespace JSXBase {
|
|
|
1370
1361
|
rowspan?: number | string;
|
|
1371
1362
|
scope?: string;
|
|
1372
1363
|
}
|
|
1373
|
-
|
|
1364
|
+
interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1374
1365
|
dateTime?: string;
|
|
1375
1366
|
}
|
|
1376
|
-
|
|
1367
|
+
interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1377
1368
|
default?: boolean;
|
|
1378
1369
|
kind?: string;
|
|
1379
1370
|
label?: string;
|
|
@@ -1381,14 +1372,14 @@ export declare namespace JSXBase {
|
|
|
1381
1372
|
srcLang?: string;
|
|
1382
1373
|
srclang?: string;
|
|
1383
1374
|
}
|
|
1384
|
-
|
|
1375
|
+
interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
1385
1376
|
height?: number | string;
|
|
1386
1377
|
playsInline?: boolean;
|
|
1387
1378
|
playsinline?: boolean | string;
|
|
1388
1379
|
poster?: string;
|
|
1389
1380
|
width?: number | string;
|
|
1390
1381
|
}
|
|
1391
|
-
|
|
1382
|
+
interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
|
|
1392
1383
|
innerHTML?: string;
|
|
1393
1384
|
accessKey?: string;
|
|
1394
1385
|
autoFocus?: boolean;
|
|
@@ -1413,10 +1404,7 @@ export declare namespace JSXBase {
|
|
|
1413
1404
|
tabIndex?: number;
|
|
1414
1405
|
tabindex?: number | string;
|
|
1415
1406
|
title?: string;
|
|
1416
|
-
translate?: 'yes' | 'no' | (string & {});
|
|
1417
1407
|
popover?: string | null;
|
|
1418
|
-
focusgroup?: string;
|
|
1419
|
-
focusgroupstart?: boolean;
|
|
1420
1408
|
inputMode?: string;
|
|
1421
1409
|
inputmode?: string;
|
|
1422
1410
|
enterKeyHint?: string;
|
|
@@ -1454,7 +1442,7 @@ export declare namespace JSXBase {
|
|
|
1454
1442
|
security?: string;
|
|
1455
1443
|
unselectable?: boolean;
|
|
1456
1444
|
}
|
|
1457
|
-
|
|
1445
|
+
interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
|
|
1458
1446
|
class?: string | {
|
|
1459
1447
|
[className: string]: boolean;
|
|
1460
1448
|
};
|
|
@@ -1716,19 +1704,13 @@ export declare namespace JSXBase {
|
|
|
1716
1704
|
zoomAndPan?: string;
|
|
1717
1705
|
}
|
|
1718
1706
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1719
|
-
|
|
1707
|
+
interface ToggleEvent extends Event {
|
|
1720
1708
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
1721
1709
|
readonly newState: string;
|
|
1722
1710
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
|
|
1723
1711
|
readonly oldState: string;
|
|
1724
1712
|
}
|
|
1725
|
-
|
|
1726
|
-
[K in keyof ARIAMixin]: ARIAMixin[K] extends string | null ? K : never;
|
|
1727
|
-
}[keyof ARIAMixin];
|
|
1728
|
-
type JSXAriaProperties = {
|
|
1729
|
-
[K in AriaIDLPropertyName]?: string | boolean | undefined;
|
|
1730
|
-
};
|
|
1731
|
-
export interface DOMAttributes<T> extends JSXAttributes<T>, JSXAriaProperties {
|
|
1713
|
+
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1732
1714
|
slot?: string;
|
|
1733
1715
|
part?: string;
|
|
1734
1716
|
exportparts?: string;
|
|
@@ -1858,8 +1840,8 @@ export declare namespace JSXBase {
|
|
|
1858
1840
|
onTransitionStart?: (event: TransitionEvent) => void;
|
|
1859
1841
|
onTransitionStartCapture?: (event: TransitionEvent) => void;
|
|
1860
1842
|
[key: `aria-${string}`]: string | boolean | undefined;
|
|
1843
|
+
[key: `aria${string}`]: string | boolean | undefined;
|
|
1861
1844
|
}
|
|
1862
|
-
export {};
|
|
1863
1845
|
}
|
|
1864
1846
|
export interface JSXAttributes<T = Element> {
|
|
1865
1847
|
key?: string | number;
|
package/loader/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface CustomElementsDefineOptions {
|
|
|
8
8
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
9
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions):
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated
|
|
14
14
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lido-player",
|
|
3
|
-
"version": "0.0.2-beta-
|
|
3
|
+
"version": "0.0.2-beta-21-dev",
|
|
4
4
|
"description": "Stencil Component For Lido Player",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@chromatic-com/storybook": "^3.2.6",
|
|
46
|
-
"@stencil/core": "
|
|
46
|
+
"@stencil/core": "4.43.5",
|
|
47
47
|
"@storybook/addon-essentials": "^8.6.12",
|
|
48
48
|
"@storybook/blocks": "^8.6.12",
|
|
49
49
|
"@storybook/experimental-addon-test": "^8.6.12",
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
"mathjs": "^14.4.0",
|
|
72
72
|
"tinycolor2": "^1.6.0"
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,p as i,H as e,B as s,getAssetPath as n,c as o,k as r,E as a,F as h,s as l,f as c,w as d,g as u,j as f,a as w,h as g,b as m}from"./index.js";const p=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.svgSource="",this.svgUrls=[],this.audioUrls=[],this.currentSvgIndex=0,this.moving=!1,this.value="",this.height="auto",this.width="auto",this.audio="",this.x="0px",this.y="0px",this.z="0",this.ariaLabel="",this.ariaHidden="",this.tabIndex=0,this.mode=s.ShowFlow,this.fingerHintUrl=n("assets/Tracing-hand.svg"),this.highlightTextId="",this.animationTrace=!1,this.delayVisible="",this.disableSpeak=!1,this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.fileIndex=-1,this.isDragging=!1,this.activePointerId=null,this.freeTraceUpdateCounter=0,this.idleTimer=null,this.fingerImg=null}async initializeSVG(){let t={fileIndex:-1,currentPathIndex:0,lastLength:0,totalPathLength:0,isDragging:!1,circle:null,paths:[],svg:null,proximityThreshold:60,freeTraceProximityThreshold:350,rafId:null,pointerMoveEvent:null,activePointerId:null,mode:this.mode,flowMarkers:[],freeTraceLines:[],currentFreePath:[],lastPointerPos:null,dragOffset:null,isCompletingPath:!1,touchProximityThreshold:null};const i=this.svgUrls[this.currentSvgIndex];i&&""!==i.trim()?(await this.fetchSVG(o(i)),await this.loadAnotherSVG(t,!0)):console.error("No SVG URL provided or index out of bounds.")}componentDidLoad(){r(this.el,this.delayVisible)}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad),this.svgUrls=this.svgSource.split(";").map((t=>t.trim())),this.currentSvgIndex=0,this.showSpeakIcon&&(a(this.el),this.el.append(a(this.el))),this.initializeSVG()}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}resetIdleTimer(t){null!==this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),this.idleTimer=window.setTimeout((()=>{this.showFingerHint(t)}),3e3)}showFingerHint(t){var i;if(this.fingerImg)return;const e=t.paths[t.currentPathIndex];if(!e)return;const s=document.createElementNS("http://www.w3.org/2000/svg","image"),n=new Image;n.onload=()=>{s.setAttributeNS("http://www.w3.org/1999/xlink","href",o(this.fingerHintUrl))},n.onerror=()=>{s.setAttributeNS("http://www.w3.org/1999/xlink","href",o(h))},n.src=o(this.fingerHintUrl||h),s.setAttribute("width","40"),s.setAttribute("height","40"),s.setAttribute("id","lido-finger-hint"),s.style.pointerEvents="none",s.style.opacity="0.8",s.setAttribute("x","0"),s.setAttribute("y","0");const r=document.createElementNS("http://www.w3.org/2000/svg","animateMotion");r.setAttribute("dur","2s"),r.setAttribute("repeatCount","indefinite");const a=document.createElementNS("http://www.w3.org/2000/svg","mpath");a.setAttributeNS("http://www.w3.org/1999/xlink","href",`#${e.id}`),r.appendChild(a),s.appendChild(r),null===(i=t.svg)||void 0===i||i.appendChild(s),this.fingerImg=s}hideFingerHint(){this.fingerImg&&this.fingerImg.parentNode&&this.fingerImg.parentNode.removeChild(this.fingerImg),this.fingerImg=null}async fetchSVG(t){const i=await fetch(t);if(!i.ok)throw new Error(`Failed to fetch SVG (${t}): ${i.statusText}`);return await i.text()}calculateBoundingBox(t,i=22){let e=1/0,s=1/0,n=-1/0,o=-1/0;return t.forEach((t=>{const i=t.getTotalLength();for(let r=0;r<=100;r++){const a=t.getPointAtLength(r/100*i);a.x<e&&(e=a.x),a.y<s&&(s=a.y),a.x>n&&(n=a.x),a.y>o&&(o=a.y)}})),e-=i,s-=i,n+=i,o+=i,{minX:e,minY:s,maxX:n,maxY:o}}insertSVG(t){const i=document.getElementById("lido-svgContainer");if(!i)return;i.innerHTML=t;const e=i.querySelector("svg");e.classList.add("lido-trace-svg"),e.removeAttribute("width"),e.removeAttribute("height");const s=e.querySelectorAll("path, line"),n=this.calculateBoundingBox(Array.from(s));e.setAttribute("viewBox",`${n.minX} ${n.minY} ${n.maxX-n.minX} ${n.maxY-n.minY}`)}getSVGElement(){return document.getElementById("lido-svgContainer").querySelector("svg")}getPaths(t){return Array.from(t.querySelectorAll("path, line"))}createFlowMarkersForPath(t){var i;if(!t)return;const e=t.ownerSVGElement;if(!e)return;const s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",t.getAttribute("d")||""),s.setAttribute("stroke","blue"),s.setAttribute("stroke-width","2"),s.setAttribute("stroke-dasharray","6,6"),s.setAttribute("fill","none"),s.setAttribute("class","lido-flow-indicator"),null===(i=t.parentNode)||void 0===i||i.appendChild(s);let n=e.querySelector("defs#lido-flow-defs");n||(n=document.createElementNS("http://www.w3.org/2000/svg","defs"),n.setAttribute("id","lido-flow-defs"),e.insertBefore(n,e.firstChild));const o=`arrow-${Math.random().toString(36)}`,r=document.createElementNS("http://www.w3.org/2000/svg","marker");r.setAttribute("id",o),r.setAttribute("markerWidth","10"),r.setAttribute("markerHeight","10"),r.setAttribute("refX","5"),r.setAttribute("refY","5"),r.setAttribute("orient","auto"),r.setAttribute("markerUnits","strokeWidth");const a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d","M0,0 L10,5 L0,10 L2,5 Z"),a.setAttribute("fill","blue"),r.appendChild(a),n.appendChild(r),s.setAttribute("marker-end",`url(#${o})`),s}updateFlowIndicators(t){t.svg.querySelectorAll(".lido-flow-indicator").forEach((i=>{t.mode===s.NoFlow?i.style.display="none":t.mode===s.ShowFlow&&(i.style.display="block")}))}setupDrawingPath(t){t.paths.forEach(((i,e)=>{const n=i.getTotalLength();i._lidoTraceLength=n,i._lidoTraceStart=i.getPointAtLength(0),i._lidoTraceEnd=i.getPointAtLength(n),i._lidoTraceIsClosed=this.getDistanceSquared(i._lidoTraceStart,i._lidoTraceEnd)<200,i.setAttribute("id","lido-path-"+e);const o=i.cloneNode();o.style.opacity="100",o.style["stroke-opacity"]="100";const r=i.style["stroke-width"]||i.getAttribute("stroke-width");o.setAttribute("stroke-width",r),o.setAttribute("stroke-dasharray",n.toString()),o.setAttribute("stroke-dashoffset",n.toString()),i.parentNode.appendChild(o,i),i.setAttribute("class","lido-trace-path"),o.setAttribute("class","lido-trace-path-green"),i.greenPath=o,i.classList.add(t.mode),t.mode===s.BlindTracing||t.mode===s.BlindFreeTrace?i.setAttribute("stroke","none"):(i.setAttribute("stroke","#000"),i.setAttribute("stroke-width",r),i.setAttribute("fill","none"),i.setAttribute("stroke-dasharray",n.toString()),i.setAttribute("stroke-dashoffset","0")),e===t.currentPathIndex&&t.mode===s.ShowFlow&&(t.flowMarkers=this.createFlowMarkersForPath(i))})),t.totalPathLength=t.paths[t.currentPathIndex].getTotalLength()}setupDraggableCircle(t){var i;const e=t.paths[0].getPointAtLength(0),s=document.createElementNS("http://www.w3.org/2000/svg","circle");t.paths[t.currentPathIndex].style["stroke-width"]||t.paths[t.currentPathIndex].getAttribute("stroke-width"),s.setAttribute("id","lido-draggableCircle"),s.setAttribute("cx",e.x.toString()),s.setAttribute("cy",e.y.toString()),s.setAttribute("r","20"),s.setAttribute("fill","#CF1565"),null===(i=t.svg)||void 0===i||i.appendChild(s),t.circle=s,this.resetIdleTimer(t)}addEventListeners(t){var i,e,s,n;if(!t.circle||!t.paths||0===t.paths.length)return;t.svg.style.touchAction="none",t.circle.style.touchAction="none",t.circle.addEventListener("pointerdown",(i=>{i.preventDefault();const e=this.getPointerPosition(i,t.svg),s={x:parseFloat(t.circle.getAttribute("cx")),y:parseFloat(t.circle.getAttribute("cy"))},n=this.getDistanceSquared(e,s),o=this.getProximityThresholdForEvent(t,i);if(n<=o*o||"touch"===i.pointerType){t.isDragging=!0,t.activePointerId=i.pointerId,t.dragOffset={x:e.x-s.x,y:e.y-s.y};try{t.circle.setPointerCapture(i.pointerId)}catch(t){}t.lastPointerPos=s}this.hideFingerHint(),this.resetIdleTimer(t)}),{passive:!1}),null===(i=t.svg)||void 0===i||i.addEventListener("pointermove",(i=>{t.isDragging&&i.pointerId===t.activePointerId&&(i.preventDefault(),t.pointerMoveEvent=i,t.rafId||(t.rafId=requestAnimationFrame((()=>{this.handlePointerMove(t),t.rafId=null}))))}));const o=i=>{i.pointerId===t.activePointerId&&(t.isDragging=!1,t.activePointerId=null,t.lastPointerPos=null,t.dragOffset=null,this.hideFingerHint(),this.resetIdleTimer(t))};null===(e=t.svg)||void 0===e||e.addEventListener("pointerup",o),null===(s=t.svg)||void 0===s||s.addEventListener("pointercancel",o),null===(n=t.svg)||void 0===n||n.addEventListener("contextmenu",(t=>{t.preventDefault()}))}async handlePointerMove(t){var i,e,n,o,r;if(!t.isDragging)return;if(!t.circle||!t.paths||0===t.paths.length)return;if(t.isCompletingPath)return;this.hideFingerHint();const a=t.pointerMoveEvent,h=this.getPointerPosition(a,t.svg),l=t.dragOffset?{x:h.x-t.dragOffset.x,y:h.y-t.dragOffset.y}:h,c={x:parseFloat(t.circle.getAttribute("cx")),y:parseFloat(t.circle.getAttribute("cy"))};let d=1/0;if(t.lastPointerPos){const i=l.x-t.lastPointerPos.x,e=l.y-t.lastPointerPos.y;if(d=i*i+e*e,d<1)return}const u=t.paths[t.currentPathIndex];if(!u)return void console.error("No valid path found at the current index");const f=this.getProximityThresholdForEvent(t,a),w=f*f;if(this.getDistanceSquared(l,c)>w)return;const g=t.mode===s.FreeTrace||t.mode===s.BlindFreeTrace,m=this.getClosestPointOnPath(u,l,g?void 0:t.lastLength);if(this.getDistanceSquared(l,m)>w)return;if(g){if(this.freeTraceUpdateCounter=(this.freeTraceUpdateCounter||0)+1,this.freeTraceUpdateCounter%2!=0)return;if(t.currentFreePath||(t.currentFreePath=[]),!t.currentFreePath[t.currentPathIndex]){const e=document.createElementNS("http://www.w3.org/2000/svg","polyline"),s=t.paths[t.currentPathIndex].style["stroke-width"]||t.paths[t.currentPathIndex].getAttribute("stroke-width");e.setAttribute("stroke-width",s),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke","lightgreen"),e.setAttribute("points",`${l.x},${l.y}`),null===(i=t.svg)||void 0===i||i.appendChild(e),t.currentFreePath[t.currentPathIndex]=e,t.currentFreePolylinePoints=t.currentFreePolylinePoints||[],t.currentFreePolylinePoints[t.currentPathIndex]=[{x:l.x,y:l.y}],t.lastPointerPos=l,t.freeTracePointsCount=1}const s=10;if(t.freeTracePointsCount=(t.freeTracePointsCount||1)+1,t.freeTracePointsCount>s)return;t.currentFreePolylinePoints=t.currentFreePolylinePoints||[];let n=t.currentFreePolylinePoints[t.currentPathIndex]||[];n.push({x:l.x,y:l.y}),t.currentFreePolylinePoints[t.currentPathIndex]=n;const o=n.map((t=>`${t.x},${t.y}`)).join(" ");return t.currentFreePath[t.currentPathIndex].setAttribute("points",o),t.circle.setAttribute("cx",l.x.toString()),t.circle.setAttribute("cy",l.y.toString()),t.circle.parentNode!==t.svg&&(null===(e=t.svg)||void 0===e||e.appendChild(t.circle)),t.lastPointerPos=l,void(n.length>=s&&(this.moveToNextPath(t),t.currentFreePath[t.currentPathIndex]=null,t.currentFreePolylinePoints[t.currentPathIndex]=[],t.freeTracePointsCount=0))}const p=Math.min(320,Math.max(160,.45*t.totalPathLength)),v=Math.min(60,Math.max(24,.12*t.totalPathLength));let x=m,y=x.length>=t.lastLength-20&&x.length-t.lastLength<=80;if(!y){const i=this.getClosestPointOnPath(u,l),e=this.getDistanceSquared(l,i);d>=64&&e<=w&&i.length>=t.lastLength-20&&i.length-t.lastLength<=p&&i.length<t.totalPathLength-v&&(x=i,y=!0)}if(t.isDragging&&y)if(t.lastLength=Math.max(t.lastLength,x.length),t.lastPointerPos=l,(Math.abs(x.x-c.x)>1||Math.abs(x.y-c.y)>1)&&(t.circle.setAttribute("cx",x.x.toString()),t.circle.setAttribute("cy",x.y.toString())),t.circle.parentNode!==t.svg&&(null===(n=t.svg)||void 0===n||n.appendChild(t.circle)),null===(o=u.greenPath)||void 0===o||o.setAttribute("stroke-dashoffset",(t.totalPathLength-t.lastLength).toString()),null!==(r=u._lidoTraceIsClosed)&&void 0!==r&&r&&t.totalPathLength>50){if(t.lastLength/t.totalPathLength>=.95){if(t.isCompletingPath)return;t.isCompletingPath=!0,await this.animatePathToEnd(t,u),t.currentPathIndex<t.paths.length-1?this.moveToNextPath(t):t.currentPathIndex===t.paths.length-1&&this.moveToNextContainer()}}else if(t.totalPathLength-1-t.lastLength<5&&t.currentPathIndex<t.paths.length-1){if(t.isCompletingPath)return;t.isCompletingPath=!0,this.moveToNextPath(t)}else if(t.totalPathLength-1-t.lastLength<5&&t.currentPathIndex===t.paths.length-1){if(t.isCompletingPath)return;t.isCompletingPath=!0,this.moveToNextContainer()}}animatePathToEnd(t,i,e=300){if(!i||!t.svg)return Promise.resolve();if(t._animatingToEnd)return Promise.resolve();t._animatingToEnd=!0;const s=t.lastLength||0,n=i.getTotalLength(),o=performance.now(),r=i.greenPath||i.parentNode&&i.parentNode.querySelector(".lido-trace-path-green");return new Promise((a=>{const h=l=>{const c=Math.min(1,(l-o)/e),d=s+(n-s)*c;t.lastLength=d;const u=i.getPointAtLength(d);if(t.circle&&(t.circle.setAttribute("cx",u.x.toString()),t.circle.setAttribute("cy",u.y.toString())),r&&r.setAttribute("stroke-dashoffset",(t.totalPathLength-d).toString()),c<1)requestAnimationFrame(h);else{if(t.lastLength=n,t.circle){const e=i.getPointAtLength(n);t.circle.setAttribute("cx",e.x.toString()),t.circle.setAttribute("cy",e.y.toString())}r&&r.setAttribute("stroke-dashoffset","0"),t._animatingToEnd=!1,a()}};requestAnimationFrame(h)}))}async moveToNextContainer(){if(this.isDragging=!1,this.moving)return;if(this.moving=!0,this.highlightTextId&&this.highlightLetter(this.currentSvgIndex),this.animationTrace&&await this.playTraceAnimation(),l(!0),this.currentSvgIndex<this.svgUrls.length-1)return await new Promise((t=>setTimeout(t,1e3))),this.currentSvgIndex++,await this.initializeSVG(),document.getElementById("lido-svgContainer").style.visibility="visible",this.moving=!1,void(this.el&&this.onCorrect&&await c(this.onCorrect,this.el));const t=document.querySelector(d),i=t.getAttribute("onCorrect");t&&i&&(await new Promise((t=>setTimeout(t,1e3))),await c(i,this.el)),u(),f()}getPointerPosition(t,i){var e;const s=this.getPointerPositionFromViewBox(t,i);if(s)return s;const n=i.createSVGPoint();n.x=t.clientX,n.y=t.clientY;const o=null===(e=i.getScreenCTM())||void 0===e?void 0:e.inverse();return o?n.matrixTransform(o):{x:t.clientX,y:t.clientY}}getPointerPositionFromViewBox(t,i){const e=i.getBoundingClientRect(),s=i.viewBox.baseVal;if(!(e.width&&e.height&&s.width&&s.height))return null;const{offsetX:n,offsetY:o,scaleX:r,scaleY:a}=this.getSvgViewBoxTransform(i,e);return{x:s.x+(t.clientX-e.left-n)/r,y:s.y+(t.clientY-e.top-o)/a}}getSvgViewBoxTransform(t,i=t.getBoundingClientRect()){const e=t.viewBox.baseVal,s=t.preserveAspectRatio.baseVal,n=i.width/e.width,o=i.height/e.height;if(1===s.align)return{offsetX:0,offsetY:0,scaleX:n,scaleY:o};const r=2===s.meetOrSlice?Math.max(n,o):Math.min(n,o),a=e.width*r,h=e.height*r;let l=0,c=0;const d=s.align;return 3===d||6===d||9===d?l=(i.width-a)/2:4!==d&&7!==d&&10!==d||(l=i.width-a),5===d||6===d||7===d?c=(i.height-h)/2:8!==d&&9!==d&&10!==d||(c=i.height-h),{offsetX:l,offsetY:c,scaleX:r,scaleY:r}}getProximityThresholdForEvent(t,i){const e=t.mode===s.FreeTrace||t.mode===s.BlindFreeTrace?t.freeTraceProximityThreshold:t.proximityThreshold;if("touch"!==(null==i?void 0:i.pointerType)||!t.svg)return e;const n=t.svg.getBoundingClientRect(),o=t.svg.viewBox.baseVal;if(!(n.width&&n.height&&o.width&&o.height))return e;const{scaleX:r,scaleY:a}=this.getSvgViewBoxTransform(t.svg,n),h=44*Math.max(1/r,1/a);return Math.max(e,h)}getDistanceSquared(t,i){const e=t.x-i.x,s=t.y-i.y;return e*e+s*s}getClosestPointOnPath(t,i,e){var s;const n=null!==(s=t._lidoTraceLength)&&void 0!==s?s:t.getTotalLength();let o={x:0,y:0,length:0},r=1/0,a=0,h=n;void 0!==e&&(a=Math.max(0,e-150),h=Math.min(n,e+150));let l={length:a};for(let e=a;e<=h;e+=40){const s=t.getPointAtLength(e),n=this.getDistanceSquared(i,s);n<r&&(r=n,l={x:s.x,y:s.y,length:e})}const c=Math.max(0,l.length-40),d=Math.min(n,l.length+40);r=1/0;for(let e=c;e<=d;e+=6){const s=t.getPointAtLength(e),n=this.getDistanceSquared(i,s);n<r&&(r=n,o={x:s.x,y:s.y,length:e})}return o}async loadAnotherSVG(t,i){t.isDragging=!1;try{t.svg&&this.cleanupPreviousSVG(t);const i=await this.fetchSVG(o(this.svgSource.split(";").map((t=>t.trim()))[this.currentSvgIndex]));this.insertSVG(i),t.svg=this.getSVGElement(),this.mode!==s.BlindTracing&&this.mode!==s.BlindFreeTrace||t.svg.querySelectorAll("image").forEach((t=>{t.style.display="none"})),t.paths=this.getPaths(t.svg),this.setupDrawingPath(t),this.setupDraggableCircle(t),this.addEventListeners(t)}catch(t){console.error(`Error loading SVG (${this.svgSource}):`,t)}}cleanupPreviousSVG(t){var i,e;t.circle&&(null===(i=t.svg)||void 0===i||i.removeChild(t.circle),t.circle=null),(null===(e=t.svg)||void 0===e?void 0:e.querySelectorAll(".lido-flow-indicator")).forEach((t=>{t.remove()})),t.currentPathIndex=0,t.lastLength=0,t.totalPathLength=t.paths[0].getTotalLength(),this.hideFingerHint(),this.resetIdleTimer(t)}async moveToNextPath(t){var i,e;if(t.isDragging=!1,t.currentPathIndex++,t.lastLength=0,t.isCompletingPath=!1,this.hideFingerHint(),t.currentPathIndex>=t.paths.length)return void this.moveToNextContainer();const n=t.paths[t.currentPathIndex];if(!n)return void console.error("No valid path found at the next index");t.totalPathLength=n.getTotalLength();const o=n.getPointAtLength(0);null===(i=t.circle)||void 0===i||i.setAttribute("cx",o.x.toString()),null===(e=t.circle)||void 0===e||e.setAttribute("cy",o.y.toString()),t.mode===s.ShowFlow&&(t.flowMarkers=this.createFlowMarkersForPath(n)),this.resetIdleTimer(t)}async playTraceAnimation(){const t=document.getElementById(this.id);t&&(t.classList.add("trace-animate"),await new Promise((t=>setTimeout(t,500))),t.classList.remove("trace-animate"))}async highlightLetter(t){if(!document.getElementById(d))return;const i=this.el;if(!i)return;const e=this.highlightTextId;if(!e)return;const s=document.getElementById(e);if(!s)return;const n=this.audio;if(!n)return;this.audioUrls=n.split(";").map((t=>t.trim()));const r=s.getAttribute("span-type");if(!r)return;const a=s.querySelector(".lido-text-content");if(a){if("letters"===r){const e=a.querySelectorAll(".text-letters");if(t<0||t>=e.length)return;const n=e[t];if(n){const t=i.querySelector("#lido-svgContainer");if(await c("this.alignMatch='true';",s,t),t.style.animation="trace-animation 0.4s forwards",t.style.setProperty("--trace-width",n.offsetWidth-5+"px"),t.style.setProperty("--trace-height",n.offsetHeight-5+"px"),await c("this.alignMatch='true';",n,t),setTimeout((()=>{n.classList.add("letter-highlight"),t.style.transform="",t.style.animation="",t.style.visibility="hidden"}),500),this.audioUrls[this.currentSvgIndex]){const t=new Audio(o(this.audioUrls[this.currentSvgIndex]));await t.play()}}}if("words"===r){const i=a.querySelectorAll(".text-words");if(t<0||t>=i.length)return;const e=i[t];if(e&&(e.classList.add("word-highlight"),this.audioUrls[this.currentSvgIndex])){const t=new Audio(o(this.audioUrls[this.currentSvgIndex]));await t.play()}}}}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:w(this.height,t),width:w(this.width,t),top:w(this.y,t),left:w(this.x,t),zIndex:this.z}}render(){return g(m,{key:"2f62ab117a595ba9af7f926ad7240902caf7fd99",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},g("div",{key:"5a14b9bc1ff4d71ffc740c8afaa1d07754044a9d",style:this.style,id:"lido-svgContainer"}))}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{svgSource:[{initializeSVG:0}],mode:[{initializeSVG:0}]}}static get style(){return":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}.lido-trace-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)}}"}},[0,"lido-trace",{showSpeakIcon:[4,"show-speak-icon"],id:[1],svgSource:[1,"svg-source"],value:[1],height:[1],width:[1],audio:[1],x:[1],y:[1],z:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],tabIndex:[2,"tab-index"],mode:[1],fingerHintUrl:[1,"finger-hint-url"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],highlightTextId:[1,"highlight-text-id"],animationTrace:[4,"animation-trace"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],svgUrls:[32],audioUrls:[32],currentSvgIndex:[32],moving:[32],style:[32],fileIndex:[32],isDragging:[32],activePointerId:[32],idleTimer:[32],fingerImg:[32]},void 0,{svgSource:[{initializeSVG:0}],mode:[{initializeSVG:0}]}]);function v(){"undefined"!=typeof customElements&&["lido-trace"].forEach((i=>{"lido-trace"===i&&(customElements.get(t(i))||customElements.define(t(i),p))}))}v();export{p as L,v as d}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const t=()=>{},e="@font-face{font-family:'Baloo Bhai 2';font-style:normal;font-weight:400 800;font-display:swap;src:url('../assets/offline-assets/fonts/Baloo-Bhai-2/Baloo-Bhai-2-Variable.woff2') format('woff2')}body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}*{user-select:none}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}.diagonal-target,.diagonal-drop *{transform:scale(0.8) !important;opacity:1 !important}.cloned-element{display:flex !important;position:absolute !important;filter:grayscale(100%);pointer-events:none}.removeShadow{box-shadow:0px 0px 0px 0px #ff8900 !important}.highlight-element{border:2px solid white;box-shadow:rgb(243, 77, 8) 0px 0px 40px !important}.drop-element.empty{border:4px dashed #f34d08 !important}.drop-element.filled{border:'none' !important}.drag-element{box-shadow:0px 15px 11px rgba(43, 0, 0, 0.3) !important}.drag-element.dropped{box-shadow:none !important}.click-element{background-color:var(--btn-bg-color, rgba(255, 172, 76, 1)) !important;box-shadow:var(--btn-shadow-px) var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;cursor:pointer;transition:box-shadow 0.1s ease-out, transform 0.2s ease-out;}.click-element:active{box-shadow:0px 0px 0px var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;transform:translateY(var(--btn-active));}.click-element:focus{outline:2px solid dodgerblue;outline-offset:3px}.after-drop-popup-container{width:200%;height:200%;background-color:rgba(0, 0, 0, 0.8);position:absolute;display:flex;flex-direction:row-reverse;align-items:center;justify-content:center !important;gap:80px}.after-drop-popup-drag-element{scale:1.5;border-radius:8px;transform:none !important;position:unset !important}.after-drop-popup-drop-element{scale:1.5;border:unset;border-radius:8px;transform:none !important;position:unset !important}@keyframes zoomFadeIn{0%{transform:scale(0.6);opacity:0}100%{transform:scale(1);opacity:1}}.zoom-fade-in{animation:zoomFadeIn 0.8s ease-out forwards}@keyframes zoomFadeOut{0%{transform:scale(1);opacity:1}100%{transform:scale(0.6);opacity:0}}.zoom-fade-out{animation:zoomFadeOut 0.8s ease-in forwards}.slide-numbers{width:70px;height:70px;border:1px solid #f57139;background-color:white;font-weight:500;color:#f57139;font-size:44px;border-radius:40px;display:flex;align-items:center;justify-content:center;font-family:'Baloo Bhai 2', serif}.slide-numbers-bottom{position:absolute;display:flex;justify-content:space-around;align-items:center;bottom:-25px;width:100%;height:50px}.slide-numbers-left{position:absolute;display:flex;flex-direction:column;justify-content:space-around;height:100%;width:50px;left:-25px;bottom:0px}.lido-speak-icon{width:56px;height:56px;position:absolute;top:-25px;right:-25px;z-index:10;background-color:white;border:4px solid #F34D08;border-radius:16px;box-shadow:0px 4px 0px 0px #F34D08;background-size:contain;background-repeat:no-repeat;cursor:pointer}.lido-speak-icon:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px !important}.lido-strong-shake{animation:strongShake 0.3s ease}.lido-scaled-shake{animation:scaledShake 0.6s ease-in-out}.lido-horizontal-shake{animation:horizontalShake 0.6s ease-in-out;border-radius:20px}.lido-vertical-shake{animation:verticalShake 0.6s ease-in-out;border-radius:20px}.lido-diagonal-shake{animation:diagonalShake 0.5s ease-in-out;border-radius:20px;will-change:transform}.lido-glow{animation:glowPulse 1s infinite alternate;transition:opacity 0.5s ease-in-out}.lido-box-highlight{animation:topToPlace 0.3s linear}.lido-display-hiddenvalue{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:80px;font-weight:1000;color:brown;-webkit-text-stroke:2px white;font-family:'Baloo Bhai 2', sans-serif;pointer-events:none}.lido-image-colorize{position:relative;display:inline-block}.lido-image-colorize::after{content:'';position:absolute;inset:0;background:var(--tint-color);mix-blend-mode:multiply;opacity:0.8;pointer-events:none;mask-image:var(--mask-url);mask-size:cover;mask-repeat:no-repeat;mask-position:center}.lido-tts-highlight-overlay{position:fixed;left:0;top:0;pointer-events:none;z-index:9999;background:linear-gradient(\n 180deg,\n rgba(255, 235, 59, 0.95),\n rgba(255, 214, 0, 0.95)\n );border-radius:6px;box-shadow:0 2px 6px rgba(0, 0, 0, 0.18),\n inset 0 -1px 0 rgba(255, 255, 255, 0.25);transition:width 25ms ease-out,\n height 25ms ease-out,\n opacity 80ms ease-out;opacity:0.95;will-change:transform, width, height;contain:layout paint style}.category-dropped-onCorrect{box-shadow:rgba(129, 193, 39, 1) 0px 8px 8px 0px !important}.category-dropped-onInCorrect{box-shadow:rgba(255, 4, 16, 1) 0px 8px 8px 0px !important}";function o(t,e,o){const n="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==n;){const n=Object.getOwnPropertyDescriptor(t,e);if(n&&(!o||n.get))return n;t=Object.getPrototypeOf(t)}}var n,i=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[i]])=>{if(31&i||32&i){const i=t[n],l=o(Object.getPrototypeOf(t),n,!0)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),e.i.has(n)?t[n]=e.i.get(n):void 0!==i&&(t[n]=i)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},r=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.o.u&&i(t,e))},s=(t,e)=>e in t,a=(t,e)=>(0,console.error)(t,e),c=new Map,u=new Map,f=new Map,d="slot-fb{display:contents}slot-fb[hidden]{display:none}",p="http://www.w3.org/1999/xlink",h="undefined"!=typeof window?window:{},m={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,o,n)=>t.addEventListener(e,o,n),rel:(t,e,o,n)=>t.removeEventListener(e,o,n),ce:(t,e)=>new CustomEvent(t,e)},b=t=>Promise.resolve(t),v=(()=>{try{return!!h.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),g=!!v&&(()=>!!h.document&&Object.getOwnPropertyDescriptor(h.document.adoptedStyleSheets,"length").writable)(),y=!1,x=[],w=[],k=()=>{var t;return(null==(t=h.document)?void 0:t.hidden)?O(j):m.raf(j)},$=(t,e)=>o=>{t.push(o),y||(y=!0,e&&4&m.u?O(j):k())},S=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){a(t)}t.length=0},j=()=>{S(x),S(w),(y=x.length>0)&&k()},O=t=>b().then(t),z=$(w,!0),N=t=>{const e=new URL(t,m.p);return e.origin!==h.location.origin?e.href:e.pathname};function C(){var t;const o=this.attachShadow({mode:"open"});if(void 0===n&&(n=null!=(t=function(t){if(!v)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?t:null),n)g?o.adoptedStyleSheets.push(n):o.adoptedStyleSheets=[...o.adoptedStyleSheets,n];else if(!v){const t=document.createElement("style");t.innerHTML=e,o.prepend(t)}}var E=t=>{const e=L(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&M(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!B(t,T(t),!1).length)}));let o=0;for(o=0;o<e.length;o++){const t=e[o];1===t.nodeType&&L(t,"childNodes").length&&E(t)}};function M(t,e,o){let n,i=0,l=[];for(;i<t.length;i++){if(n=t[i],n["s-sr"]&&(!e||n["s-hn"]===e)&&(void 0===o||T(n)===o)&&(l.push(n),void 0!==o))return l;l=[...l,...M(L(n,"childNodes"),e,o)]}return l}var B=(t,e,o=!0)=>{const n=[];(o&&t["s-sr"]||!t["s-sr"])&&n.push(t);let i=t;for(;i=i.nextSibling;)T(i)!==e||!o&&i["s-sr"]||n.push(i);return n},F=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,T=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function L(t,e){if("__"+e in t){const o=t["__"+e];return"function"!=typeof o?o:o.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}function R(t){var e,o,n;return null!=(n=null==(o=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:o.getAttribute("content"))?n:void 0}var P,A,D=new WeakMap,H=t=>"sc-"+t.h,U=t=>"object"==(t=typeof t)||"function"===t,I=(t,e,...o)=>{let n=null,i=null,l=null,r=!1,s=!1;const c=[],u=e=>{for(let o=0;o<e.length;o++)if(n=e[o],Array.isArray(n))u(n);else if(null!=n&&"boolean"!=typeof n){if(r="function"!=typeof t&&!U(n))n+="";else if("function"!=typeof t&&void 0===n.u){a("Invalid vNode child");continue}r&&s?c[c.length-1].m+=n:c.push(r?_(null,n):n),s=r}};if(u(o),e){e.key&&(i=e.key),e.name&&(l=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=_(t,null);return f.v=e,c.length>0&&(f.k=c),f.$=i,f.S=l,f},_=(t,e)=>({u:0,j:t,m:null!=e?e:null,O:null,k:null,v:null,$:null,S:null}),V={},W=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let o=!1;for(const n of e){if(o)break;for(const e of t[n])if("string"==typeof e){o=!0;break}}if(!o)return t;const n={};for(const o of e)n[o]=t[o].map((t=>"string"==typeof t?{[t]:0}:t));return n},Y=(t,e)=>null==t||U(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,q=t=>{var e;return null==(e=l(t))?void 0:e.$hostElement$},G=(t,e)=>{const o=q(t);return{emit:t=>Z(o,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Z=(t,e,o)=>{const n=m.ce(e,o);return t.dispatchEvent(n),n},J=(t,e,o,n,i,r)=>{if(o===n)return;let a=s(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=tt(o);let l=tt(n);e.remove(...i.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!i.includes(t))))}else if("style"===e){for(const e in o)n&&null!=n[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in n)o&&n[e]===o[e]||(e.includes("-")?t.style.setProperty(e,n[e]):t.style[e]=n[e])}else if("key"===e);else if("ref"===e)n&&kt(n,t);else if(a||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const o=e.slice(5);let i;{const e=l(t);if(e&&e.o&&e.o.t){const t=e.o.t[o];t&&t[1]&&(i=t[1])}}return i||(i=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==n||!1===n?!1===n&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===n?"":n))}if("p"===e[0]&&e.startsWith("prop:")){const o=e.slice(5);try{t[o]=n}catch(t){}return}{const l=U(n);if((a||l&&null!==n)&&!i)try{if(t.tagName.includes("-"))t[e]!==n&&(t[e]=n);else{const i=null==n?"":n;"list"===e?a=!1:null!=o&&t[e]===i||("function"==typeof t.__lookupSetter__(e)?t[e]=i:t.setAttribute(e,i))}}catch(t){}let s=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,s=!0),null==n||!1===n?(!1!==n||""===t.getAttribute(e)||4&r&&!Q(e))&&(s?t.removeAttributeNS(p,e):t.removeAttribute(e)):(!a||4&r||i)&&!l&&1===t.nodeType&&(n=!0===n?"":n,s?t.setAttributeNS(p,e,n):t.setAttribute(e,n))}}else if(e="-"===e[2]?e.slice(3):s(h,c)?c.slice(2):c[2]+e.slice(3),o||n){const i=e.endsWith(et);e=e.replace(ot,""),o&&m.rel(t,e,o,i),n&&m.ael(t,e,n,i)}},K=new Set(["draggable","contenteditable","spellcheck"]),Q=t=>K.has(t)||t.startsWith("aria-"),X=/\s/,tt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(X):[]),et="Capture",ot=RegExp(et+"$"),nt=(t,e,o)=>{const n=11===e.O.nodeType&&e.O.host?e.O.host:e.O,i=t&&t.v||{},l=e.v||{};for(const t of it(Object.keys(i)))t in l||J(n,t,i[t],void 0,o,e.u);for(const t of it(Object.keys(l)))J(n,t,i[t],l[t],o,e.u)};function it(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var lt=!1,rt=!1,st=!1,at=!1,ct=[],ut=[],ft=(t,e,o)=>{var n;const i=e.k[o];let l,r,s,a=0;if(lt||(st=!0,"slot"===i.j&&(i.u|=i.k?2:1)),null!=i.m)l=i.O=h.document.createTextNode(i.m);else if(1&i.u)l=i.O=h.document.createTextNode(""),nt(null,i,at);else{if(!h.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=i.O=h.document.createElement(!lt&&2&i.u?"slot-fb":i.j),nt(null,i,at),i.k){const e="template"===i.j?l.content:l;for(a=0;a<i.k.length;++a)r=ft(t,i,a),r&&e.appendChild(r)}}return l["s-hn"]=A,3&i.u&&(l["s-sr"]=!0,l["s-cr"]=P,l["s-sn"]=i.S||"",l["s-rf"]=null==(n=i.v)?void 0:n.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const o=[],n=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const i=this["s-cr"].parentElement;return(i.__childNodes?i.childNodes:(t=>{const e=[];for(let o=0;o<t.length;o++){const n=t[o]["s-nr"]||void 0;n&&n.isConnected&&e.push(n)}return e})(i.childNodes)).forEach((t=>{n===T(t)&&o.push(t)})),e?o.filter((t=>1===t.nodeType)):o}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(l),s=t&&t.k&&t.k[o],s&&s.j===i.j&&t.O&&dt(t.O)),l},dt=t=>{m.u|=1;const e=t.closest(A.toLowerCase());if(null!=e){const o=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),n=Array.from(t.__childNodes||t.childNodes);for(const t of o?n.reverse():n)null!=t["s-sh"]&&($t(e,t,null!=o?o:null),t["s-sh"]=void 0,st=!0)}m.u&=-2},pt=(t,e)=>{m.u|=1;const o=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===A&&o.push(e)}for(let t=o.length-1;t>=0;t--){const n=o[t];n["s-hn"]!==A&&n["s-ol"]&&($t(vt(n).parentNode,n,vt(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,st=!0),e&&pt(n,e)}m.u&=-2},ht=(t,e,o,n,i,l)=>{let r,s=t["s-cr"]&&t["s-cr"].parentNode||t;for(s.shadowRoot&&s.tagName===A&&(s=s.shadowRoot),"template"===o.j&&(s=s.content);i<=l;++i)n[i]&&(r=ft(null,o,i),r&&(n[i].O=r,$t(s,r,vt(e))))},mt=(t,e,o)=>{for(let n=e;n<=o;++n){const e=t[n];if(e){const t=e.O;wt(e),t&&(rt=!0,t["s-ol"]?t["s-ol"].remove():pt(t,!0),t.remove())}}},bt=(t,e,o=!1)=>t.j===e.j&&("slot"===t.j?t.S===e.S:o?(o&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),vt=t=>t&&t["s-ol"]||t,gt=(t,e,o=!1)=>{const n=e.O=t.O,i=t.k,l=e.k,r=e.m;let s;null==r?("slot"!==e.j||lt||t.S!==e.S&&(e.O["s-sn"]=e.S||"",dt(e.O.parentElement)),nt(t,e,at),null!==i&&null!==l?((t,e,o,n,i=!1)=>{let l,r,s=0,a=0,c=0,u=0,f=e.length-1,d=e[0],p=e[f],h=n.length-1,m=n[0],b=n[h];const v="template"===o.j?t.content:t;for(;s<=f&&a<=h;)if(null==d)d=e[++s];else if(null==p)p=e[--f];else if(null==m)m=n[++a];else if(null==b)b=n[--h];else if(bt(d,m,i))gt(d,m,i),d=e[++s],m=n[++a];else if(bt(p,b,i))gt(p,b,i),p=e[--f],b=n[--h];else if(bt(d,b,i))"slot"!==d.j&&"slot"!==b.j||pt(d.O.parentNode,!1),gt(d,b,i),$t(v,d.O,p.O.nextSibling),d=e[++s],b=n[--h];else if(bt(p,m,i))"slot"!==d.j&&"slot"!==b.j||pt(p.O.parentNode,!1),gt(p,m,i),$t(v,p.O,d.O),p=e[--f],m=n[++a];else{for(c=-1,u=s;u<=f;++u)if(e[u]&&null!==e[u].$&&e[u].$===m.$){c=u;break}c>=0?(r=e[c],r.j!==m.j?l=ft(e&&e[a],o,a):(gt(r,m,i),e[c]=void 0,l=r.O),m=n[++a]):(l=ft(e&&e[a],o,a),m=n[++a]),l&&$t(vt(d.O).parentNode,l,vt(d.O))}s>f?ht(t,null==n[h+1]?null:n[h+1].O,o,n,a,h):a>h&&mt(e,s,f)})(n,i,e,l,o):null!==l?(null!==t.m&&(n.textContent=""),ht(n,null,e,l,0,l.length-1)):!o&&null!==i&&mt(i,0,i.length-1)):(s=n["s-cr"])?s.parentNode.textContent=r:t.m!==r&&(n.data=r)},yt=[],xt=t=>{let e,o,n;const i=t.__childNodes||t.childNodes;for(const t of i){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){o=e.parentNode.__childNodes||e.parentNode.childNodes;const i=t["s-sn"];for(n=o.length-1;n>=0;n--)if(e=o[n],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(!e["s-sh"]||e["s-sh"]!==t["s-hn"]||""!==i&&T(e)===i))if(F(e,i)){let o=yt.find((t=>t.N===e));rt=!0,e["s-sn"]=e["s-sn"]||i,o?(o.N["s-sh"]=t["s-hn"],o.C=t):(e["s-sh"]=t["s-hn"],yt.push({C:t,N:e})),e["s-sr"]&&yt.map((t=>{F(t.N,e["s-sn"])&&(o=yt.find((t=>t.N===e)),o&&!t.C&&(t.C=o.C))}))}else yt.some((t=>t.N===e))||yt.push({N:e})}1===t.nodeType&&xt(t)}},wt=t=>{t.v&&t.v.ref&&ct.push((()=>t.v.ref(null))),t.k&&t.k.map(wt)},kt=(t,e)=>{ut.push((()=>t(e)))},$t=(t,e,o,n)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,o);const{slotNode:i}=function(t,e){var o;if(!(e=e||(null==(o=t["s-ol"])?void 0:o.parentElement)))return{slotNode:null,slotName:""};const n=t["s-sn"]=T(t)||"";return{slotNode:M(L(e,"childNodes"),e.tagName,n)[0],slotName:n}}(e);return i&&!n&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(i),e}return(null==t?void 0:t.__insertBefore)?t.__insertBefore(e,o):null==t?void 0:t.insertBefore(e,o)},St=(t,e)=>{if(e&&!t.M&&e["s-p"]){const o=e["s-p"].push(new Promise((n=>t.M=()=>{e["s-p"].splice(o-1,1),n()})))}},jt=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);St(t,t.B);const o=()=>Ot(t,e);if(!e)return z(o);queueMicrotask((()=>{o()}))},Ot=(t,e)=>{const o=t.$hostElement$,n=t.l;if(!n)throw Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return e?(t.F&&(t.F=!1,Ft(n,"connectedCallback",void 0,o)),t.T.length&&t.T.forEach((t=>t(o))),i=Ft(n,"componentWillLoad",void 0,o)):i=Ft(n,"componentWillUpdate",void 0,o),i=zt(i,(()=>Ft(n,"componentWillRender",void 0,o))),zt(i,(()=>Ct(t,n,e)))},zt=(t,e)=>Nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ct=async(t,e,o)=>{var n;const i=t.$hostElement$,l=i["s-rc"];o&&(t=>{const e=t.o,o=t.$hostElement$,n=e.u,i=((t,e)=>{var o,n,i;const l=H(e),r=f.get(l);if(!h.document)return l;if(t=11===t.nodeType?t:h.document,r)if("string"==typeof r){let i,s=D.get(t=t.head||t);if(s||D.set(t,s=new Set),!s.has(l)){i=h.document.createElement("style"),i.textContent=r;const a=null!=(o=m.L)?o:R(h.document);if(null!=a&&i.setAttribute("nonce",a),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),o=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==o?void 0:o.parentNode)===t?o:null)}else if("host"in t)if(v){const e=new(null!=(n=t.defaultView)?n:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),g?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=r+e.textContent:t.prepend(i)}else t.append(i);1&e.u&&t.insertBefore(i,null),4&e.u&&(i.textContent+=d),s&&s.add(l)}}else{let e=D.get(t);if(e||D.set(t,e=new Set),!e.has(l)){const o=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let n;if(r.constructor===o.CSSStyleSheet)n=r;else{n=new o.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)n.insertRule(r.cssRules[t].cssText,t)}g?t.adoptedStyleSheets.push(n):t.adoptedStyleSheets=[...t.adoptedStyleSheets,n],e.add(l)}}return l})(o.shadowRoot?o.shadowRoot:o.getRootNode(),e);10&n&&(o["s-sc"]=i,o.classList.add(i+"-h"))})(t);Et(t,e,i,o),l&&(l.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(n=i["s-p"])?n:[],o=()=>Mt(t);0===e.length?o():(Promise.all(e).then(o).catch(o),t.u|=4,e.length=0)}},Et=(t,e,o,n)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,o=!1)=>{var n,i,l,r,s;const a=t.$hostElement$,c=t.o,u=t.R||_(null,null),f=(t=>t&&t.j===V)(e)?e:I(null,null,e);if(A=a.tagName,c.P&&(f.v=f.v||{},c.P.forEach((([t,e])=>{f.v[e]=a[t]}))),o&&f.v)for(const t of Object.keys(f.v))a.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(f.v[t]=a[t]);if(f.j=null,f.u|=4,t.R=f,f.O=u.O=a.shadowRoot||a,lt=!(!(1&c.u)||128&c.u),P=a["s-cr"],rt=!1,gt(u,f,o),m.u|=1,st){xt(f.O);for(const t of yt){const e=t.N;if(!e["s-ol"]&&h.document){const t=h.document.createTextNode("");t["s-nr"]=e,$t(e.parentNode,e["s-ol"]=t,e,o)}}for(const t of yt){const e=t.N,s=t.C;if(1===e.nodeType&&o&&(e["s-ih"]=null!=(n=e.hidden)&&n),s){const t=s.parentNode;let n=s.nextSibling;if(n&&1===n.nodeType){let o=null==(i=e["s-ol"])?void 0:i.previousSibling;for(;o;){let i=null!=(l=o["s-nr"])?l:null;if(i&&i["s-sn"]===e["s-sn"]&&t===(i.__parentNode||i.parentNode)){for(i=i.nextSibling;i===e||(null==i?void 0:i["s-sr"]);)i=null==i?void 0:i.nextSibling;if(!i||!i["s-nr"]){n=i;break}}o=o.previousSibling}}if((!n&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==n)&&e!==n){if($t(t,e,n,o),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=h.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,$t(e.parentNode,t,e,o),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(r=e["s-ih"])&&r)}e&&"function"==typeof s["s-rf"]&&s["s-rf"](s)}else 1===e.nodeType&&(e.hidden=!0)}}if(rt&&E(f.O),m.u&=-2,yt.length=0,!lt&&!(1&c.u)&&a["s-cr"]){const t=f.O.__childNodes||f.O.childNodes;for(const e of t)if(e["s-hn"]!==A&&!e["s-sh"])if(o&&null==e["s-ih"]&&(e["s-ih"]=null!=(s=e.hidden)&&s),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=h.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],$t(e.parentNode,t,e,o),e.parentNode.removeChild(e)}}P=void 0,ct.forEach((t=>t())),ct.length=0,ut.forEach((t=>t())),ut.length=0})(t,e,n)}catch(e){a(e,t.$hostElement$)}return null},Mt=t=>{const e=t.$hostElement$,o=t.l,n=t.B;Ft(o,"componentDidRender",void 0,e),64&t.u?Ft(o,"componentDidUpdate",void 0,e):(t.u|=64,Tt(e),Ft(o,"componentDidLoad",void 0,e),t.A(e),n||Bt()),t.D(e),t.M&&(t.M(),t.M=void 0),512&t.u&&O((()=>jt(t,!1))),t.u&=-517},Bt=()=>{O((()=>Z(h,"appload",{detail:{namespace:"lido-player"}})))},Ft=(t,e,o,n)=>{if(t&&t[e])try{return t[e](o)}catch(t){a(t,n)}},Tt=t=>t.classList.add("hydrated"),Lt=(t,e,o,n)=>{const i=l(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${n.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,s=i.i.get(e),c=i.u,u=i.l;if(o=Y(o,n.t[e][0]),!(8&c&&void 0!==s||o===s||Number.isNaN(s)&&Number.isNaN(o))){if(i.i.set(e,o),n.H){const t=n.H[e];t&&t.map((t=>{try{const[[n,l]]=Object.entries(t);(128&c||1&l)&&(u?u[n](o,s,e):i.T.push((()=>{i.l[n](o,s,e)})))}catch(t){a(t,r)}}))}if(2&c){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(o,s,e)&&!(16&c))return;16&c||jt(i,!1)}}},Rt=(t,e,n)=>{var i,r;const s=t.prototype;{t.watchers&&!e.H&&(e.H=W(t.watchers)),t.deserializers&&!e.U&&(e.U=t.deserializers),t.serializers&&!e.I&&(e.I=t.serializers);const a=Object.entries(null!=(i=e.t)?i:{});if(a.map((([t,[i]])=>{if(31&i||2&n&&32&i){const{get:r,set:a}=o(s,t)||{};r&&(e.t[t][0]|=2048),a&&(e.t[t][0]|=4096),(1&n||!r)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>l(this).i.get(e))(0,t);const o=l(this),n=o?o.l:s;if(!n)return;return n[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(o){const r=l(this);if(r){if(a)return void 0===(32&i?this[t]:r.$hostElement$[t])&&r.i.get(t)&&(o=r.i.get(t)),a.call(this,Y(o,i)),void Lt(this,t,o=32&i?this[t]:r.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return Lt(this,t,o,e),void(1&n&&!r.l&&r.T.push((()=>{4096&e.t[t][0]&&r.l[t]!==r.i.get(t)&&(r.l[t]=o)})));const l=Y(o,i),s=o=>{const n=r.l[t];!r.i.get(t)&&n&&r.i.set(t,n),r.l[t]=o,Lt(this,t,r.l[t],e)};r.l?s(l):(r.i.set(t,l),r.T.push((()=>{const e=r.i.get(t);r.l[t]!==e&&s(e)})))}}}})}else 1&n&&64&i&&Object.defineProperty(s,t,{value(...e){var o;const n=l(this);return null==(o=null==n?void 0:n._)?void 0:o.then((()=>{var o;return null==(o=n.l)?void 0:o[t](...e)}))}})})),1&n){const o=new Map;s.attributeChangedCallback=function(t,n,i){m.jmp((()=>{var r;const c=o.get(t),u=l(this);if(this.hasOwnProperty(c)&&(i=this[c],delete this[c]),s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const o=null==u?void 0:u.u;if(u&&o&&!(8&o)&&i!==n){const l=u.l,s=null==(r=e.H)?void 0:r[t];null==s||s.forEach((e=>{const[[r,s]]=Object.entries(e);null!=l[r]&&(128&o||1&s)&&l[r].call(l,i,n,t)}))}return}const f=a.find((([t])=>t===c)),d=f?f[1][0]:0,p=4&d;if(512&d&&8&d&&!U(this[c])&&(t=>null==t||!1===t?null:!0===t?"":t+"")(this[c])===i)return;const h=p&&null===i&&void 0===this[c];p&&(i=null!==i&&"false"!==i);const m=4096&d?u.i.get(c):this[c],b=Object.getOwnPropertyDescriptor(s,c);h||i==m||b.get&&!b.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=e.H)?r:{}),...a.filter((([t,e])=>31&e[0])).map((([t,n])=>{var i;const l=n[1]||t;return o.set(l,t),512&n[0]&&(null==(i=e.P)||i.push([t,l])),l}))]))}}return t},Pt=async(t,e,o)=>{var n;let i;try{if(!(32&e.u)){if(e.u|=32,e.u&=-1025,o.V){const l=((t,e)=>{var o;const n=t.h.replace(/-/g,"_"),i=t.V;if(!i)return;const l=c.get(i);if(l)return l[n];const r=null!=(o=u.get(i))?o:0,s=[r>0?"s-retry="+r:"",""].filter(Boolean).join("&");
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
3
|
-
return import(`./${i}.entry.js${s?"?"+s:""}`).then((t=>(u.delete(i),c.set(i,t),t[n])),(t=>{u.set(i,r+1),a(t,e.$hostElement$)}))})(o,e);if(l&&"then"in l){const t=()=>{};i=await l,t()}else i=l;if(!i)throw e.u&=-33,e.W=(null!=(n=e.W)?n:0)+1,e.W<3&&(e.u|=1024),Error(`Constructor for "${o.h}#${e.Y}" was not found`);i.isProxied||(o.H=W(i.watchers),o.I=i.serializers,o.U=i.deserializers,Rt(i,o,2),i.isProxied=!0);const r=()=>{};e.u|=8;try{new i(e)}catch(e){a(e,t)}e.u&=-9,e.u|=128,r(),4&o.u?e.F=!0:At(e.l,t)}else i=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(i&&i.style){let t;"string"==typeof i.style&&(t=i.style);const e=H(o);if(!f.has(e)){const n=()=>{};((t,e,o)=>{let n=f.get(t);v&&o?(n=n||new CSSStyleSheet,"string"==typeof n?n=e:n.replaceSync(e)):n=e,f.set(t,n)})(e,t,!!(1&o.u)),n()}}}const l=e.B,r=()=>jt(e,!0);l&&l["s-rc"]?l["s-rc"].push(r):r()}catch(o){a(o,t),e.M&&(e.M(),e.M=void 0),!e.A||1024&e.u||e.A(t)}},At=(t,e)=>{Ft(t,"connectedCallback",void 0,e)},Dt=(t,e)=>{Ft(t,"disconnectedCallback",void 0,e||t)},Ht=(t,e={})=>{var o;if(!h.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const n=[],i=e.exclude||[],r=h.customElements,s=h.document.head,a=s.querySelector("meta[charset]"),c=h.document.createElement("style"),u=[];let f,p=!0;Object.assign(m,e),m.p=new URL(e.resourcesUrl||"./",h.document.baseURI).href;let b=!1;if(t.map((t=>{t[1].map((e=>{var o,s;const a={u:e[0],h:e[1],t:e[2],q:e[3]};4&a.u&&(b=!0),a.t=e[2],a.P=[],a.H=W(e[4]),a.I=null!=(o=e[5])?o:{},a.U=null!=(s=e[6])?s:{};const c=a.h,d=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const o={u:0,$hostElement$:t,o:e,i:new Map,G:new Map};o._=new Promise((t=>o.D=t)),o.Z=new Promise((t=>o.A=t)),t["s-p"]=[],t["s-rc"]=[],o.T=[];const n=o;t.__stencil__getHostRef=()=>n})(t=this,a),1&a.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${a.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else C.call(t,a)}connectedCallback(){l(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),f&&(clearTimeout(f),f=null),p?u.push(this):m.jmp((()=>(t=>{if(!(1&m.u)){const e=l(t);if(!e)return;const o=e.o,n=()=>{};if(1&e.u)(null==e?void 0:e.l)?At(e.l,t):1024&e.u?setTimeout((()=>Pt(t,e,o)),1e3):(null==e?void 0:e.Z)&&e.Z.then((()=>At(e.l,t)));else{e.u|=1,12&o.u&&(t=>{if(!h.document)return;const e=t["s-cr"]=h.document.createComment("");e["s-cn"]=!0,$t(t,e,t.firstChild)})(t);{let o=t;for(;o=o.parentNode||o.host;)if(o["s-p"]){St(e,e.B=o);break}}o.t&&Object.entries(o.t).map((([e,[o]])=>{if(31&o&&Object.prototype.hasOwnProperty.call(t,e)){const o=t[e];delete t[e],t[e]=o}})),Pt(t,e,o)}n()}})(this))))}disconnectedCallback(){m.jmp((()=>(async t=>{if(!(1&m.u)){const e=l(t);(null==e?void 0:e.l)?Dt(e.l,t):(null==e?void 0:e.Z)&&e.Z.then((()=>Dt(e.l,t)))}D.has(t)&&D.delete(t),t.shadowRoot&&D.has(t.shadowRoot)&&D.delete(t.shadowRoot)})(this))),O((()=>{var t;const e=l(this);if(!e)return;const o=u.findIndex((t=>t===this));o>-1&&u.splice(o,1),(null==(t=null==e?void 0:e.R)?void 0:t.O)instanceof Node&&!e.R.O.isConnected&&delete e.R.O}))}componentOnReady(){var t;return null==(t=l(this))?void 0:t.Z}};a.V=t[0],i.includes(c)||r.get(c)||(n.push(c),r.define(c,Rt(d,a,1)))}))})),n.length>0&&(b&&(c.textContent+=d),c.textContent+=n.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const t=null!=(o=m.L)?o:R(h.document);null!=t&&c.setAttribute("nonce",t),s.insertBefore(c,a?a.nextSibling:s.firstChild)}p=!1,u.length?u.map((t=>t.connectedCallback())):m.jmp((()=>f=setTimeout(Bt,30)))},Ut=t=>m.L=t;export{V as H,q as a,Ht as b,N as c,G as d,t as g,I as h,b as p,r,Ut as s}
|