@stencil/core 4.40.1 → 4.41.0
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/cli/config-flags.d.ts +2 -2
- package/cli/index.cjs +9 -4
- package/cli/index.js +9 -4
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +268 -136
- package/dev-server/client/index.js +12 -12
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.js +2 -2
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +18 -11
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +105 -25
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +64 -25
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +196 -135
- package/internal/package.json +1 -1
- package/internal/stencil-core/jsx-dev-runtime.cjs +7 -0
- package/internal/stencil-core/jsx-dev-runtime.d.ts +23 -0
- package/internal/stencil-core/jsx-dev-runtime.js +2 -0
- package/internal/stencil-core/jsx-runtime.cjs +8 -0
- package/internal/stencil-core/jsx-runtime.d.ts +22 -0
- package/internal/stencil-core/jsx-runtime.js +2 -0
- package/internal/stencil-private.d.ts +20 -0
- package/internal/stencil-public-compiler.d.ts +6 -0
- package/internal/stencil-public-docs.d.ts +11 -0
- package/internal/stencil-public-runtime.d.ts +29 -0
- package/internal/testing/index.js +753 -638
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +192 -135
- package/mock-doc/index.js +193 -135
- package/mock-doc/package.json +1 -1
- package/package.json +11 -1
- package/screenshot/index.js +29 -8
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +29 -29
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +98 -70
- package/testing/package.json +1 -1
|
@@ -281,6 +281,9 @@ __export(index_exports, {
|
|
|
281
281
|
h: () => h,
|
|
282
282
|
insertVdomAnnotations: () => insertVdomAnnotations,
|
|
283
283
|
isMemberInElement: () => isMemberInElement,
|
|
284
|
+
jsx: () => jsx,
|
|
285
|
+
jsxDEV: () => jsxDEV,
|
|
286
|
+
jsxs: () => jsxs,
|
|
284
287
|
loadModule: () => loadModule,
|
|
285
288
|
modeResolutionChain: () => modeResolutionChain,
|
|
286
289
|
needsScopedSSR: () => needsScopedSSR,
|
|
@@ -340,422 +343,142 @@ var moduleLoaded = /* @__PURE__ */ new Map();
|
|
|
340
343
|
var queuedLoadModules = [];
|
|
341
344
|
var caughtErrors = [];
|
|
342
345
|
|
|
343
|
-
// src/
|
|
344
|
-
var
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
346
|
+
// src/runtime/event-emitter.ts
|
|
347
|
+
var import_app_data3 = require("@stencil/core/internal/app-data");
|
|
348
|
+
|
|
349
|
+
// src/utils/constants.ts
|
|
350
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
351
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
352
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
353
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
354
|
+
PrimitiveType2["Null"] = "null";
|
|
355
|
+
PrimitiveType2["String"] = "string";
|
|
356
|
+
PrimitiveType2["Number"] = "number";
|
|
357
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
358
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
359
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
360
|
+
return PrimitiveType2;
|
|
361
|
+
})(PrimitiveType || {});
|
|
362
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
363
|
+
NonPrimitiveType2["Array"] = "array";
|
|
364
|
+
NonPrimitiveType2["Date"] = "date";
|
|
365
|
+
NonPrimitiveType2["Map"] = "map";
|
|
366
|
+
NonPrimitiveType2["Object"] = "object";
|
|
367
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
368
|
+
NonPrimitiveType2["Set"] = "set";
|
|
369
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
370
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
371
|
+
return NonPrimitiveType2;
|
|
372
|
+
})(NonPrimitiveType || {});
|
|
373
|
+
var TYPE_CONSTANT = "type";
|
|
374
|
+
var VALUE_CONSTANT = "value";
|
|
375
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
376
|
+
|
|
377
|
+
// src/utils/helpers.ts
|
|
378
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
379
|
+
var isComplexType = (o) => {
|
|
380
|
+
o = typeof o;
|
|
381
|
+
return o === "object" || o === "function";
|
|
349
382
|
};
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
383
|
+
|
|
384
|
+
// node_modules/minimatch/dist/esm/index.js
|
|
385
|
+
var import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
|
386
|
+
|
|
387
|
+
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
388
|
+
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
389
|
+
var assertValidPattern = (pattern) => {
|
|
390
|
+
if (typeof pattern !== "string") {
|
|
391
|
+
throw new TypeError("invalid pattern");
|
|
353
392
|
}
|
|
354
|
-
if (
|
|
355
|
-
|
|
356
|
-
const tagName = Cstr.COMPILER_META && Cstr.COMPILER_META.tagName ? Cstr.COMPILER_META.tagName : "div";
|
|
357
|
-
const elm = document.createElement(tagName);
|
|
358
|
-
registerHost(elm, { $flags$: 0, $tagName$: tagName });
|
|
359
|
-
hostRef = getHostRef(elm);
|
|
393
|
+
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
394
|
+
throw new TypeError("pattern is too long");
|
|
360
395
|
}
|
|
361
|
-
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
362
|
-
hostRef.$lazyInstance$ = lazyInstance;
|
|
363
|
-
};
|
|
364
|
-
var registerHost = (elm, cmpMeta) => {
|
|
365
|
-
const hostRef = {
|
|
366
|
-
$flags$: 0,
|
|
367
|
-
$hostElement$: elm,
|
|
368
|
-
$cmpMeta$: cmpMeta,
|
|
369
|
-
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
370
|
-
$serializerValues$: /* @__PURE__ */ new Map(),
|
|
371
|
-
$renderCount$: 0
|
|
372
|
-
};
|
|
373
|
-
hostRef.$fetchedCbList$ = [];
|
|
374
|
-
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
375
|
-
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
376
|
-
elm["s-p"] = [];
|
|
377
|
-
elm["s-rc"] = [];
|
|
378
|
-
elm.__stencil__getHostRef = () => hostRef;
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
// src/testing/platform/testing-log.ts
|
|
382
|
-
var customError;
|
|
383
|
-
var defaultConsoleError = (e) => {
|
|
384
|
-
caughtErrors.push(e);
|
|
385
|
-
};
|
|
386
|
-
var consoleError = (e, el) => (customError || defaultConsoleError)(e, el);
|
|
387
|
-
var consoleDevError = (...e) => {
|
|
388
|
-
caughtErrors.push(new Error(e.join(", ")));
|
|
389
396
|
};
|
|
390
|
-
var consoleDevWarn = (...args) => {
|
|
391
|
-
const params = args.filter((a) => typeof a === "string" || typeof a === "number" || typeof a === "boolean");
|
|
392
|
-
console.warn(...params);
|
|
393
|
-
};
|
|
394
|
-
var consoleDevInfo = (..._) => {
|
|
395
|
-
};
|
|
396
|
-
var setErrorHandler = (handler) => customError = handler;
|
|
397
397
|
|
|
398
|
-
//
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
398
|
+
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
399
|
+
var posixClasses = {
|
|
400
|
+
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
401
|
+
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
402
|
+
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
403
|
+
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
404
|
+
"[:cntrl:]": ["\\p{Cc}", true],
|
|
405
|
+
"[:digit:]": ["\\p{Nd}", true],
|
|
406
|
+
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
407
|
+
"[:lower:]": ["\\p{Ll}", true],
|
|
408
|
+
"[:print:]": ["\\p{C}", true],
|
|
409
|
+
"[:punct:]": ["\\p{P}", true],
|
|
410
|
+
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
411
|
+
"[:upper:]": ["\\p{Lu}", true],
|
|
412
|
+
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
413
|
+
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
409
414
|
};
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
415
|
+
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
416
|
+
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
417
|
+
var rangesToString = (ranges) => ranges.join("");
|
|
418
|
+
var parseClass = (glob, position) => {
|
|
419
|
+
const pos = position;
|
|
420
|
+
if (glob.charAt(pos) !== "[") {
|
|
421
|
+
throw new Error("not in a brace expression");
|
|
422
|
+
}
|
|
423
|
+
const ranges = [];
|
|
424
|
+
const negs = [];
|
|
425
|
+
let i2 = pos + 1;
|
|
426
|
+
let sawStart = false;
|
|
427
|
+
let uflag = false;
|
|
428
|
+
let escaping = false;
|
|
429
|
+
let negate = false;
|
|
430
|
+
let endPos = pos;
|
|
431
|
+
let rangeStart = "";
|
|
432
|
+
WHILE: while (i2 < glob.length) {
|
|
433
|
+
const c = glob.charAt(i2);
|
|
434
|
+
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
435
|
+
negate = true;
|
|
436
|
+
i2++;
|
|
437
|
+
continue;
|
|
438
|
+
}
|
|
439
|
+
if (c === "]" && sawStart && !escaping) {
|
|
440
|
+
endPos = i2 + 1;
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
sawStart = true;
|
|
444
|
+
if (c === "\\") {
|
|
445
|
+
if (!escaping) {
|
|
446
|
+
escaping = true;
|
|
447
|
+
i2++;
|
|
448
|
+
continue;
|
|
429
449
|
}
|
|
430
450
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
function readTask(cb) {
|
|
438
|
-
queuedReadTasks.push(cb);
|
|
439
|
-
}
|
|
440
|
-
function flushQueue() {
|
|
441
|
-
return new Promise((resolve, reject) => {
|
|
442
|
-
async function drain() {
|
|
443
|
-
try {
|
|
444
|
-
if (queuedReadTasks.length > 0) {
|
|
445
|
-
const readTasks = queuedReadTasks.slice();
|
|
446
|
-
queuedReadTasks.length = 0;
|
|
447
|
-
let cb;
|
|
448
|
-
while (cb = readTasks.shift()) {
|
|
449
|
-
const result = cb(Date.now());
|
|
450
|
-
if (result != null && typeof result.then === "function") {
|
|
451
|
-
await result;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
if (queuedWriteTasks.length > 0) {
|
|
456
|
-
const writeTasks = queuedWriteTasks.slice();
|
|
457
|
-
queuedWriteTasks.length = 0;
|
|
458
|
-
let cb;
|
|
459
|
-
while (cb = writeTasks.shift()) {
|
|
460
|
-
const result = cb(Date.now());
|
|
461
|
-
if (result != null && typeof result.then === "function") {
|
|
462
|
-
await result;
|
|
463
|
-
}
|
|
451
|
+
if (c === "[" && !escaping) {
|
|
452
|
+
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
453
|
+
if (glob.startsWith(cls, i2)) {
|
|
454
|
+
if (rangeStart) {
|
|
455
|
+
return ["$.", false, glob.length - pos, true];
|
|
464
456
|
}
|
|
457
|
+
i2 += cls.length;
|
|
458
|
+
if (neg)
|
|
459
|
+
negs.push(unip);
|
|
460
|
+
else
|
|
461
|
+
ranges.push(unip);
|
|
462
|
+
uflag = uflag || u;
|
|
463
|
+
continue WHILE;
|
|
465
464
|
}
|
|
466
|
-
if (queuedReadTasks.length + queuedWriteTasks.length > 0) {
|
|
467
|
-
process.nextTick(drain);
|
|
468
|
-
} else {
|
|
469
|
-
resolve();
|
|
470
|
-
}
|
|
471
|
-
} catch (e) {
|
|
472
|
-
reject(`flushQueue: ${e}`);
|
|
473
465
|
}
|
|
474
466
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const err2 = caughtErrors[0];
|
|
486
|
-
if (err2 == null) {
|
|
487
|
-
throw new Error("Error!");
|
|
467
|
+
escaping = false;
|
|
468
|
+
if (rangeStart) {
|
|
469
|
+
if (c > rangeStart) {
|
|
470
|
+
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
471
|
+
} else if (c === rangeStart) {
|
|
472
|
+
ranges.push(braceEscape(c));
|
|
473
|
+
}
|
|
474
|
+
rangeStart = "";
|
|
475
|
+
i2++;
|
|
476
|
+
continue;
|
|
488
477
|
}
|
|
489
|
-
if (
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
return new Promise((resolve) => process.nextTick(resolve));
|
|
495
|
-
}
|
|
496
|
-
function loadModule(cmpMeta, _hostRef, _hmrVersionId) {
|
|
497
|
-
return new Promise((resolve) => {
|
|
498
|
-
queuedLoadModules.push({
|
|
499
|
-
bundleId: cmpMeta.$lazyBundleId$,
|
|
500
|
-
resolve: () => resolve(moduleLoaded.get(cmpMeta.$lazyBundleId$))
|
|
501
|
-
});
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
function flushLoadModule(bundleId) {
|
|
505
|
-
return new Promise((resolve, reject) => {
|
|
506
|
-
try {
|
|
507
|
-
process.nextTick(() => {
|
|
508
|
-
if (bundleId != null) {
|
|
509
|
-
for (let i2 = 0; i2 < queuedLoadModules.length; i2++) {
|
|
510
|
-
if (queuedLoadModules[i2].bundleId === bundleId) {
|
|
511
|
-
queuedLoadModules[i2].resolve();
|
|
512
|
-
queuedLoadModules.splice(i2, 1);
|
|
513
|
-
i2--;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
} else {
|
|
517
|
-
let queuedLoadModule;
|
|
518
|
-
while (queuedLoadModule = queuedLoadModules.shift()) {
|
|
519
|
-
queuedLoadModule.resolve();
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
resolve();
|
|
523
|
-
});
|
|
524
|
-
} catch (e) {
|
|
525
|
-
reject(`flushLoadModule: ${e}`);
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
// src/testing/platform/testing-window.ts
|
|
531
|
-
var import_mock_doc = require("../../mock-doc/index.cjs");
|
|
532
|
-
var win = (0, import_mock_doc.setupGlobal)(global);
|
|
533
|
-
|
|
534
|
-
// src/testing/platform/testing-platform.ts
|
|
535
|
-
var supportsShadow = true;
|
|
536
|
-
var plt = {
|
|
537
|
-
$flags$: 0,
|
|
538
|
-
$resourcesUrl$: "",
|
|
539
|
-
jmp: (h2) => h2(),
|
|
540
|
-
raf: (h2) => requestAnimationFrame(h2),
|
|
541
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
542
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
543
|
-
ce: (eventName, opts) => new win.CustomEvent(eventName, opts)
|
|
544
|
-
};
|
|
545
|
-
var setPlatformHelpers = (helpers) => {
|
|
546
|
-
Object.assign(plt, helpers);
|
|
547
|
-
};
|
|
548
|
-
var supportsListenerOptions = true;
|
|
549
|
-
var supportsConstructableStylesheets = false;
|
|
550
|
-
var supportsMutableAdoptedStyleSheets = false;
|
|
551
|
-
var setSupportsShadowDom = (supports) => {
|
|
552
|
-
supportsShadow = supports;
|
|
553
|
-
};
|
|
554
|
-
function resetPlatform(defaults2 = {}) {
|
|
555
|
-
if (win && typeof win.close === "function") {
|
|
556
|
-
win.close();
|
|
557
|
-
}
|
|
558
|
-
styles.clear();
|
|
559
|
-
plt.$flags$ = 0;
|
|
560
|
-
Object.assign(plt, defaults2);
|
|
561
|
-
if (plt.$orgLocNodes$ != null) {
|
|
562
|
-
plt.$orgLocNodes$.clear();
|
|
563
|
-
plt.$orgLocNodes$ = void 0;
|
|
564
|
-
}
|
|
565
|
-
win.location.href = plt.$resourcesUrl$ = `http://testing.stenciljs.com/`;
|
|
566
|
-
resetTaskQueue();
|
|
567
|
-
stopAutoApplyChanges();
|
|
568
|
-
cstrs.clear();
|
|
569
|
-
}
|
|
570
|
-
var isAutoApplyingChanges = false;
|
|
571
|
-
var autoApplyTimer = void 0;
|
|
572
|
-
function stopAutoApplyChanges() {
|
|
573
|
-
isAutoApplyingChanges = false;
|
|
574
|
-
if (autoApplyTimer) {
|
|
575
|
-
clearTimeout(autoApplyTimer);
|
|
576
|
-
autoApplyTimer = void 0;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
async function startAutoApplyChanges() {
|
|
580
|
-
isAutoApplyingChanges = true;
|
|
581
|
-
flushAll().then(() => {
|
|
582
|
-
if (isAutoApplyingChanges) {
|
|
583
|
-
autoApplyTimer = setTimeout(() => {
|
|
584
|
-
startAutoApplyChanges();
|
|
585
|
-
}, 100);
|
|
586
|
-
}
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
var registerComponents = (Cstrs) => {
|
|
590
|
-
Cstrs.filter((Cstr) => Cstr.COMPILER_META).forEach((Cstr) => {
|
|
591
|
-
cstrs.set(Cstr.COMPILER_META.tagName, Cstr);
|
|
592
|
-
});
|
|
593
|
-
};
|
|
594
|
-
function registerModule(bundleId, Cstr) {
|
|
595
|
-
moduleLoaded.set(bundleId, Cstr);
|
|
596
|
-
}
|
|
597
|
-
var isMemberInElement = (elm, memberName) => {
|
|
598
|
-
if (elm != null) {
|
|
599
|
-
if (memberName in elm) {
|
|
600
|
-
return true;
|
|
601
|
-
}
|
|
602
|
-
const nodeName = elm.nodeName;
|
|
603
|
-
if (nodeName) {
|
|
604
|
-
const cstr = cstrs.get(nodeName.toLowerCase());
|
|
605
|
-
if (cstr != null && cstr.COMPILER_META != null && cstr.COMPILER_META.properties != null) {
|
|
606
|
-
return cstr.COMPILER_META.properties.some((p) => p.name === memberName);
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
return false;
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
// src/testing/platform/index.ts
|
|
614
|
-
var import_app_data24 = require("@stencil/core/internal/app-data");
|
|
615
|
-
|
|
616
|
-
// src/runtime/asset-path.ts
|
|
617
|
-
var getAssetPath = (path2) => {
|
|
618
|
-
const assetUrl = new URL(path2, plt.$resourcesUrl$);
|
|
619
|
-
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
620
|
-
};
|
|
621
|
-
var setAssetPath = (path2) => plt.$resourcesUrl$ = path2;
|
|
622
|
-
|
|
623
|
-
// src/runtime/bootstrap-custom-element.ts
|
|
624
|
-
var import_app_data20 = require("@stencil/core/internal/app-data");
|
|
625
|
-
|
|
626
|
-
// src/utils/constants.ts
|
|
627
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
628
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
629
|
-
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
630
|
-
PrimitiveType2["Undefined"] = "undefined";
|
|
631
|
-
PrimitiveType2["Null"] = "null";
|
|
632
|
-
PrimitiveType2["String"] = "string";
|
|
633
|
-
PrimitiveType2["Number"] = "number";
|
|
634
|
-
PrimitiveType2["SpecialNumber"] = "number";
|
|
635
|
-
PrimitiveType2["Boolean"] = "boolean";
|
|
636
|
-
PrimitiveType2["BigInt"] = "bigint";
|
|
637
|
-
return PrimitiveType2;
|
|
638
|
-
})(PrimitiveType || {});
|
|
639
|
-
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
640
|
-
NonPrimitiveType2["Array"] = "array";
|
|
641
|
-
NonPrimitiveType2["Date"] = "date";
|
|
642
|
-
NonPrimitiveType2["Map"] = "map";
|
|
643
|
-
NonPrimitiveType2["Object"] = "object";
|
|
644
|
-
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
645
|
-
NonPrimitiveType2["Set"] = "set";
|
|
646
|
-
NonPrimitiveType2["Channel"] = "channel";
|
|
647
|
-
NonPrimitiveType2["Symbol"] = "symbol";
|
|
648
|
-
return NonPrimitiveType2;
|
|
649
|
-
})(NonPrimitiveType || {});
|
|
650
|
-
var TYPE_CONSTANT = "type";
|
|
651
|
-
var VALUE_CONSTANT = "value";
|
|
652
|
-
var SERIALIZED_PREFIX = "serialized:";
|
|
653
|
-
|
|
654
|
-
// src/utils/helpers.ts
|
|
655
|
-
var isDef = (v) => v != null && v !== void 0;
|
|
656
|
-
var isComplexType = (o) => {
|
|
657
|
-
o = typeof o;
|
|
658
|
-
return o === "object" || o === "function";
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
662
|
-
var import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
|
663
|
-
|
|
664
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
665
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
666
|
-
var assertValidPattern = (pattern) => {
|
|
667
|
-
if (typeof pattern !== "string") {
|
|
668
|
-
throw new TypeError("invalid pattern");
|
|
669
|
-
}
|
|
670
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
671
|
-
throw new TypeError("pattern is too long");
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
676
|
-
var posixClasses = {
|
|
677
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
678
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
679
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
680
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
681
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
682
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
683
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
684
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
685
|
-
"[:print:]": ["\\p{C}", true],
|
|
686
|
-
"[:punct:]": ["\\p{P}", true],
|
|
687
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
688
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
689
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
690
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
691
|
-
};
|
|
692
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
693
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
694
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
695
|
-
var parseClass = (glob, position) => {
|
|
696
|
-
const pos = position;
|
|
697
|
-
if (glob.charAt(pos) !== "[") {
|
|
698
|
-
throw new Error("not in a brace expression");
|
|
699
|
-
}
|
|
700
|
-
const ranges = [];
|
|
701
|
-
const negs = [];
|
|
702
|
-
let i2 = pos + 1;
|
|
703
|
-
let sawStart = false;
|
|
704
|
-
let uflag = false;
|
|
705
|
-
let escaping = false;
|
|
706
|
-
let negate = false;
|
|
707
|
-
let endPos = pos;
|
|
708
|
-
let rangeStart = "";
|
|
709
|
-
WHILE: while (i2 < glob.length) {
|
|
710
|
-
const c = glob.charAt(i2);
|
|
711
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
712
|
-
negate = true;
|
|
713
|
-
i2++;
|
|
714
|
-
continue;
|
|
715
|
-
}
|
|
716
|
-
if (c === "]" && sawStart && !escaping) {
|
|
717
|
-
endPos = i2 + 1;
|
|
718
|
-
break;
|
|
719
|
-
}
|
|
720
|
-
sawStart = true;
|
|
721
|
-
if (c === "\\") {
|
|
722
|
-
if (!escaping) {
|
|
723
|
-
escaping = true;
|
|
724
|
-
i2++;
|
|
725
|
-
continue;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
if (c === "[" && !escaping) {
|
|
729
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
730
|
-
if (glob.startsWith(cls, i2)) {
|
|
731
|
-
if (rangeStart) {
|
|
732
|
-
return ["$.", false, glob.length - pos, true];
|
|
733
|
-
}
|
|
734
|
-
i2 += cls.length;
|
|
735
|
-
if (neg)
|
|
736
|
-
negs.push(unip);
|
|
737
|
-
else
|
|
738
|
-
ranges.push(unip);
|
|
739
|
-
uflag = uflag || u;
|
|
740
|
-
continue WHILE;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
escaping = false;
|
|
745
|
-
if (rangeStart) {
|
|
746
|
-
if (c > rangeStart) {
|
|
747
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
748
|
-
} else if (c === rangeStart) {
|
|
749
|
-
ranges.push(braceEscape(c));
|
|
750
|
-
}
|
|
751
|
-
rangeStart = "";
|
|
752
|
-
i2++;
|
|
753
|
-
continue;
|
|
754
|
-
}
|
|
755
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
756
|
-
ranges.push(braceEscape(c + "-"));
|
|
757
|
-
i2 += 2;
|
|
758
|
-
continue;
|
|
478
|
+
if (glob.startsWith("-]", i2 + 1)) {
|
|
479
|
+
ranges.push(braceEscape(c + "-"));
|
|
480
|
+
i2 += 2;
|
|
481
|
+
continue;
|
|
759
482
|
}
|
|
760
483
|
if (glob.startsWith("-", i2 + 1)) {
|
|
761
484
|
rangeStart = c;
|
|
@@ -2110,170 +1833,515 @@ var RemoteValue = class _RemoteValue {
|
|
|
2110
1833
|
if (!hasTypeProperty) {
|
|
2111
1834
|
return false;
|
|
2112
1835
|
}
|
|
2113
|
-
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
2114
|
-
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
1836
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
1837
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
1838
|
+
}
|
|
1839
|
+
return true;
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1843
|
+
// src/utils/result.ts
|
|
1844
|
+
var result_exports = {};
|
|
1845
|
+
__export(result_exports, {
|
|
1846
|
+
err: () => err,
|
|
1847
|
+
map: () => map,
|
|
1848
|
+
ok: () => ok,
|
|
1849
|
+
unwrap: () => unwrap,
|
|
1850
|
+
unwrapErr: () => unwrapErr
|
|
1851
|
+
});
|
|
1852
|
+
var ok = (value) => ({
|
|
1853
|
+
isOk: true,
|
|
1854
|
+
isErr: false,
|
|
1855
|
+
value
|
|
1856
|
+
});
|
|
1857
|
+
var err = (value) => ({
|
|
1858
|
+
isOk: false,
|
|
1859
|
+
isErr: true,
|
|
1860
|
+
value
|
|
1861
|
+
});
|
|
1862
|
+
function map(result, fn) {
|
|
1863
|
+
if (result.isOk) {
|
|
1864
|
+
const val = fn(result.value);
|
|
1865
|
+
if (val instanceof Promise) {
|
|
1866
|
+
return val.then((newVal) => ok(newVal));
|
|
1867
|
+
} else {
|
|
1868
|
+
return ok(val);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
if (result.isErr) {
|
|
1872
|
+
const value = result.value;
|
|
1873
|
+
return err(value);
|
|
1874
|
+
}
|
|
1875
|
+
throw "should never get here";
|
|
1876
|
+
}
|
|
1877
|
+
var unwrap = (result) => {
|
|
1878
|
+
if (result.isOk) {
|
|
1879
|
+
return result.value;
|
|
1880
|
+
} else {
|
|
1881
|
+
throw result.value;
|
|
1882
|
+
}
|
|
1883
|
+
};
|
|
1884
|
+
var unwrapErr = (result) => {
|
|
1885
|
+
if (result.isErr) {
|
|
1886
|
+
return result.value;
|
|
1887
|
+
} else {
|
|
1888
|
+
throw result.value;
|
|
1889
|
+
}
|
|
1890
|
+
};
|
|
1891
|
+
|
|
1892
|
+
// src/utils/serialize.ts
|
|
1893
|
+
function deserializeProperty(value) {
|
|
1894
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
1895
|
+
return value;
|
|
1896
|
+
}
|
|
1897
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
// src/utils/shadow-root.ts
|
|
1901
|
+
var import_app_data = require("@stencil/core/internal/app-data");
|
|
1902
|
+
|
|
1903
|
+
// src/app-globals/index.ts
|
|
1904
|
+
var globalStyles = (
|
|
1905
|
+
/* default */
|
|
1906
|
+
""
|
|
1907
|
+
);
|
|
1908
|
+
|
|
1909
|
+
// src/runtime/runtime-constants.ts
|
|
1910
|
+
var CONTENT_REF_ID = "r";
|
|
1911
|
+
var ORG_LOCATION_ID = "o";
|
|
1912
|
+
var SLOT_NODE_ID = "s";
|
|
1913
|
+
var TEXT_NODE_ID = "t";
|
|
1914
|
+
var COMMENT_NODE_ID = "c";
|
|
1915
|
+
var HYDRATE_ID = "s-id";
|
|
1916
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
1917
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
1918
|
+
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
1919
|
+
var STENCIL_DOC_DATA = "_stencilDocData";
|
|
1920
|
+
var DEFAULT_DOC_DATA = {
|
|
1921
|
+
hostIds: 0,
|
|
1922
|
+
rootLevelIds: 0,
|
|
1923
|
+
staticComponents: /* @__PURE__ */ new Set()
|
|
1924
|
+
};
|
|
1925
|
+
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
1926
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
1927
|
+
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
1928
|
+
"formAssociatedCallback",
|
|
1929
|
+
"formResetCallback",
|
|
1930
|
+
"formDisabledCallback",
|
|
1931
|
+
"formStateRestoreCallback"
|
|
1932
|
+
];
|
|
1933
|
+
|
|
1934
|
+
// src/utils/style.ts
|
|
1935
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
1936
|
+
if (!styles2 || !supportsConstructableStylesheets) return void 0;
|
|
1937
|
+
const sheet = new CSSStyleSheet();
|
|
1938
|
+
sheet.replaceSync(styles2);
|
|
1939
|
+
return sheet;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
// src/utils/shadow-root.ts
|
|
1943
|
+
var globalStyleSheet;
|
|
1944
|
+
var GLOBAL_STYLE_ID = "sc-global";
|
|
1945
|
+
function createShadowRoot(cmpMeta) {
|
|
1946
|
+
var _a;
|
|
1947
|
+
const opts = { mode: "open" };
|
|
1948
|
+
if (import_app_data.BUILD.shadowDelegatesFocus) {
|
|
1949
|
+
opts.delegatesFocus = !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */);
|
|
1950
|
+
}
|
|
1951
|
+
if (import_app_data.BUILD.shadowSlotAssignmentManual) {
|
|
1952
|
+
const isManual = !!(cmpMeta.$flags$ & 1024 /* shadowSlotAssignmentManual */);
|
|
1953
|
+
if (isManual) {
|
|
1954
|
+
opts.slotAssignment = "manual";
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
const shadowRoot = this.attachShadow(opts);
|
|
1958
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
|
|
1959
|
+
if (globalStyleSheet) {
|
|
1960
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
1961
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
1962
|
+
} else {
|
|
1963
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
1964
|
+
}
|
|
1965
|
+
} else if (globalStyles && !supportsConstructableStylesheets) {
|
|
1966
|
+
const styleElm = document.createElement("style");
|
|
1967
|
+
styleElm.innerHTML = globalStyles;
|
|
1968
|
+
if (import_app_data.BUILD.hotModuleReplacement) {
|
|
1969
|
+
styleElm.setAttribute(HYDRATED_STYLE_ID, GLOBAL_STYLE_ID);
|
|
2115
1970
|
}
|
|
2116
|
-
|
|
1971
|
+
shadowRoot.prepend(styleElm);
|
|
2117
1972
|
}
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
// src/utils/util.ts
|
|
1976
|
+
var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
|
|
1977
|
+
var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
|
|
1978
|
+
var isTsFile = lowerPathParam(
|
|
1979
|
+
(p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
|
|
1980
|
+
);
|
|
1981
|
+
var isTsxFile = lowerPathParam(
|
|
1982
|
+
(p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
|
|
1983
|
+
);
|
|
1984
|
+
var isJsxFile = lowerPathParam(
|
|
1985
|
+
(p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
|
|
1986
|
+
);
|
|
1987
|
+
var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
|
|
1988
|
+
|
|
1989
|
+
// src/runtime/element.ts
|
|
1990
|
+
var import_app_data2 = require("@stencil/core/internal/app-data");
|
|
1991
|
+
var getElement = (ref) => {
|
|
1992
|
+
var _a;
|
|
1993
|
+
return import_app_data2.BUILD.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
|
|
2118
1994
|
};
|
|
2119
1995
|
|
|
2120
|
-
// src/
|
|
2121
|
-
var
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
});
|
|
2134
|
-
var err = (value) => ({
|
|
2135
|
-
isOk: false,
|
|
2136
|
-
isErr: true,
|
|
2137
|
-
value
|
|
2138
|
-
});
|
|
2139
|
-
function map(result, fn) {
|
|
2140
|
-
if (result.isOk) {
|
|
2141
|
-
const val = fn(result.value);
|
|
2142
|
-
if (val instanceof Promise) {
|
|
2143
|
-
return val.then((newVal) => ok(newVal));
|
|
2144
|
-
} else {
|
|
2145
|
-
return ok(val);
|
|
1996
|
+
// src/runtime/event-emitter.ts
|
|
1997
|
+
var createEvent = (ref, name, flags) => {
|
|
1998
|
+
const elm = getElement(ref);
|
|
1999
|
+
return {
|
|
2000
|
+
emit: (detail) => {
|
|
2001
|
+
if (import_app_data3.BUILD.isDev && !elm.isConnected) {
|
|
2002
|
+
consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
|
|
2003
|
+
}
|
|
2004
|
+
return emitEvent(elm, name, {
|
|
2005
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
2006
|
+
composed: !!(flags & 2 /* Composed */),
|
|
2007
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
2008
|
+
detail
|
|
2009
|
+
});
|
|
2146
2010
|
}
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
var emitEvent = (elm, name, opts) => {
|
|
2014
|
+
const ev = plt.ce(name, opts);
|
|
2015
|
+
elm.dispatchEvent(ev);
|
|
2016
|
+
return ev;
|
|
2017
|
+
};
|
|
2018
|
+
|
|
2019
|
+
// src/testing/platform/testing-host-ref.ts
|
|
2020
|
+
var getHostRef = (elm) => {
|
|
2021
|
+
if (elm.__stencil__getHostRef) {
|
|
2022
|
+
return elm.__stencil__getHostRef();
|
|
2147
2023
|
}
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2024
|
+
return void 0;
|
|
2025
|
+
};
|
|
2026
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
2027
|
+
if (lazyInstance == null || lazyInstance.constructor == null) {
|
|
2028
|
+
throw new Error(`Invalid component constructor`);
|
|
2151
2029
|
}
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
throw result.value;
|
|
2030
|
+
if (hostRef == null) {
|
|
2031
|
+
const Cstr2 = lazyInstance.constructor;
|
|
2032
|
+
const tagName = Cstr2.COMPILER_META && Cstr2.COMPILER_META.tagName ? Cstr2.COMPILER_META.tagName : "div";
|
|
2033
|
+
const elm = document.createElement(tagName);
|
|
2034
|
+
registerHost(elm, { $flags$: 0, $tagName$: tagName });
|
|
2035
|
+
hostRef = getHostRef(elm);
|
|
2159
2036
|
}
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2037
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
2038
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
2039
|
+
const Cstr = lazyInstance.constructor;
|
|
2040
|
+
const allEvents = [];
|
|
2041
|
+
const seenEventMethods = /* @__PURE__ */ new Set();
|
|
2042
|
+
if (Cstr.COMPILER_META && Cstr.COMPILER_META.events) {
|
|
2043
|
+
Cstr.COMPILER_META.events.forEach((event) => {
|
|
2044
|
+
if (!seenEventMethods.has(event.method)) {
|
|
2045
|
+
allEvents.push(event);
|
|
2046
|
+
seenEventMethods.add(event.method);
|
|
2047
|
+
}
|
|
2048
|
+
});
|
|
2049
|
+
}
|
|
2050
|
+
let currentProto = Object.getPrototypeOf(Cstr);
|
|
2051
|
+
while (currentProto && currentProto !== Function.prototype && currentProto.name) {
|
|
2052
|
+
if (typeof currentProto.events === "object" && Array.isArray(currentProto.events)) {
|
|
2053
|
+
currentProto.events.forEach((event) => {
|
|
2054
|
+
if (!seenEventMethods.has(event.method)) {
|
|
2055
|
+
allEvents.push(event);
|
|
2056
|
+
seenEventMethods.add(event.method);
|
|
2057
|
+
}
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
2060
|
+
currentProto = Object.getPrototypeOf(currentProto);
|
|
2166
2061
|
}
|
|
2062
|
+
allEvents.forEach((eventMeta) => {
|
|
2063
|
+
if (!lazyInstance[eventMeta.method]) {
|
|
2064
|
+
let flags = 0;
|
|
2065
|
+
if (eventMeta.bubbles) flags |= 4 /* Bubbles */;
|
|
2066
|
+
if (eventMeta.composed) flags |= 2 /* Composed */;
|
|
2067
|
+
if (eventMeta.cancelable) flags |= 1 /* Cancellable */;
|
|
2068
|
+
lazyInstance[eventMeta.method] = createEvent(lazyInstance, eventMeta.name, flags);
|
|
2069
|
+
}
|
|
2070
|
+
});
|
|
2071
|
+
};
|
|
2072
|
+
var registerHost = (elm, cmpMeta) => {
|
|
2073
|
+
const hostRef = {
|
|
2074
|
+
$flags$: 0,
|
|
2075
|
+
$hostElement$: elm,
|
|
2076
|
+
$cmpMeta$: cmpMeta,
|
|
2077
|
+
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
2078
|
+
$serializerValues$: /* @__PURE__ */ new Map(),
|
|
2079
|
+
$renderCount$: 0
|
|
2080
|
+
};
|
|
2081
|
+
hostRef.$fetchedCbList$ = [];
|
|
2082
|
+
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
2083
|
+
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
2084
|
+
elm["s-p"] = [];
|
|
2085
|
+
elm["s-rc"] = [];
|
|
2086
|
+
elm.__stencil__getHostRef = () => hostRef;
|
|
2167
2087
|
};
|
|
2168
2088
|
|
|
2169
|
-
// src/
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2089
|
+
// src/testing/platform/testing-log.ts
|
|
2090
|
+
var customError;
|
|
2091
|
+
var defaultConsoleError = (e) => {
|
|
2092
|
+
caughtErrors.push(e);
|
|
2093
|
+
};
|
|
2094
|
+
var consoleError = (e, el) => (customError || defaultConsoleError)(e, el);
|
|
2095
|
+
var consoleDevError = (...e) => {
|
|
2096
|
+
caughtErrors.push(new Error(e.join(", ")));
|
|
2097
|
+
};
|
|
2098
|
+
var consoleDevWarn = (...args) => {
|
|
2099
|
+
const params = args.filter((a) => typeof a === "string" || typeof a === "number" || typeof a === "boolean");
|
|
2100
|
+
console.warn(...params);
|
|
2101
|
+
};
|
|
2102
|
+
var consoleDevInfo = (..._) => {
|
|
2103
|
+
};
|
|
2104
|
+
var setErrorHandler = (handler) => customError = handler;
|
|
2105
|
+
|
|
2106
|
+
// src/testing/platform/testing-task-queue.ts
|
|
2107
|
+
function resetTaskQueue() {
|
|
2108
|
+
queuedTicks.length = 0;
|
|
2109
|
+
queuedWriteTasks.length = 0;
|
|
2110
|
+
queuedReadTasks.length = 0;
|
|
2111
|
+
moduleLoaded.clear();
|
|
2112
|
+
queuedLoadModules.length = 0;
|
|
2113
|
+
caughtErrors.length = 0;
|
|
2114
|
+
}
|
|
2115
|
+
var nextTick = (cb) => {
|
|
2116
|
+
queuedTicks.push(cb);
|
|
2117
|
+
};
|
|
2118
|
+
function flushTicks() {
|
|
2119
|
+
return new Promise((resolve, reject) => {
|
|
2120
|
+
function drain() {
|
|
2121
|
+
try {
|
|
2122
|
+
if (queuedTicks.length > 0) {
|
|
2123
|
+
const writeTasks = queuedTicks.slice();
|
|
2124
|
+
queuedTicks.length = 0;
|
|
2125
|
+
let cb;
|
|
2126
|
+
while (cb = writeTasks.shift()) {
|
|
2127
|
+
cb(Date.now());
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
if (queuedTicks.length > 0) {
|
|
2131
|
+
process.nextTick(drain);
|
|
2132
|
+
} else {
|
|
2133
|
+
resolve();
|
|
2134
|
+
}
|
|
2135
|
+
} catch (e) {
|
|
2136
|
+
reject(`flushTicks: ${e}`);
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
process.nextTick(drain);
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
function writeTask(cb) {
|
|
2143
|
+
queuedWriteTasks.push(cb);
|
|
2144
|
+
}
|
|
2145
|
+
function readTask(cb) {
|
|
2146
|
+
queuedReadTasks.push(cb);
|
|
2147
|
+
}
|
|
2148
|
+
function flushQueue() {
|
|
2149
|
+
return new Promise((resolve, reject) => {
|
|
2150
|
+
async function drain() {
|
|
2151
|
+
try {
|
|
2152
|
+
if (queuedReadTasks.length > 0) {
|
|
2153
|
+
const readTasks = queuedReadTasks.slice();
|
|
2154
|
+
queuedReadTasks.length = 0;
|
|
2155
|
+
let cb;
|
|
2156
|
+
while (cb = readTasks.shift()) {
|
|
2157
|
+
const result = cb(Date.now());
|
|
2158
|
+
if (result != null && typeof result.then === "function") {
|
|
2159
|
+
await result;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
if (queuedWriteTasks.length > 0) {
|
|
2164
|
+
const writeTasks = queuedWriteTasks.slice();
|
|
2165
|
+
queuedWriteTasks.length = 0;
|
|
2166
|
+
let cb;
|
|
2167
|
+
while (cb = writeTasks.shift()) {
|
|
2168
|
+
const result = cb(Date.now());
|
|
2169
|
+
if (result != null && typeof result.then === "function") {
|
|
2170
|
+
await result;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
if (queuedReadTasks.length + queuedWriteTasks.length > 0) {
|
|
2175
|
+
process.nextTick(drain);
|
|
2176
|
+
} else {
|
|
2177
|
+
resolve();
|
|
2178
|
+
}
|
|
2179
|
+
} catch (e) {
|
|
2180
|
+
reject(`flushQueue: ${e}`);
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
process.nextTick(drain);
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
async function flushAll() {
|
|
2187
|
+
while (queuedTicks.length + queuedLoadModules.length + queuedWriteTasks.length + queuedReadTasks.length > 0) {
|
|
2188
|
+
await flushTicks();
|
|
2189
|
+
await flushLoadModule();
|
|
2190
|
+
await flushQueue();
|
|
2173
2191
|
}
|
|
2174
|
-
|
|
2192
|
+
if (caughtErrors.length > 0) {
|
|
2193
|
+
const err2 = caughtErrors[0];
|
|
2194
|
+
if (err2 == null) {
|
|
2195
|
+
throw new Error("Error!");
|
|
2196
|
+
}
|
|
2197
|
+
if (typeof err2 === "string") {
|
|
2198
|
+
throw new Error(err2);
|
|
2199
|
+
}
|
|
2200
|
+
throw err2;
|
|
2201
|
+
}
|
|
2202
|
+
return new Promise((resolve) => process.nextTick(resolve));
|
|
2203
|
+
}
|
|
2204
|
+
function loadModule(cmpMeta, _hostRef, _hmrVersionId) {
|
|
2205
|
+
return new Promise((resolve) => {
|
|
2206
|
+
queuedLoadModules.push({
|
|
2207
|
+
bundleId: cmpMeta.$lazyBundleId$,
|
|
2208
|
+
resolve: () => resolve(moduleLoaded.get(cmpMeta.$lazyBundleId$))
|
|
2209
|
+
});
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
function flushLoadModule(bundleId) {
|
|
2213
|
+
return new Promise((resolve, reject) => {
|
|
2214
|
+
try {
|
|
2215
|
+
process.nextTick(() => {
|
|
2216
|
+
if (bundleId != null) {
|
|
2217
|
+
for (let i2 = 0; i2 < queuedLoadModules.length; i2++) {
|
|
2218
|
+
if (queuedLoadModules[i2].bundleId === bundleId) {
|
|
2219
|
+
queuedLoadModules[i2].resolve();
|
|
2220
|
+
queuedLoadModules.splice(i2, 1);
|
|
2221
|
+
i2--;
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
} else {
|
|
2225
|
+
let queuedLoadModule;
|
|
2226
|
+
while (queuedLoadModule = queuedLoadModules.shift()) {
|
|
2227
|
+
queuedLoadModule.resolve();
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
resolve();
|
|
2231
|
+
});
|
|
2232
|
+
} catch (e) {
|
|
2233
|
+
reject(`flushLoadModule: ${e}`);
|
|
2234
|
+
}
|
|
2235
|
+
});
|
|
2175
2236
|
}
|
|
2176
2237
|
|
|
2177
|
-
// src/
|
|
2178
|
-
var
|
|
2179
|
-
|
|
2180
|
-
// src/app-globals/index.ts
|
|
2181
|
-
var globalStyles = (
|
|
2182
|
-
/* default */
|
|
2183
|
-
""
|
|
2184
|
-
);
|
|
2238
|
+
// src/testing/platform/testing-window.ts
|
|
2239
|
+
var import_mock_doc = require("../../mock-doc/index.cjs");
|
|
2240
|
+
var win = (0, import_mock_doc.setupGlobal)(global);
|
|
2185
2241
|
|
|
2186
|
-
// src/
|
|
2187
|
-
var
|
|
2188
|
-
var
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
var STENCIL_DOC_DATA = "_stencilDocData";
|
|
2197
|
-
var DEFAULT_DOC_DATA = {
|
|
2198
|
-
hostIds: 0,
|
|
2199
|
-
rootLevelIds: 0,
|
|
2200
|
-
staticComponents: /* @__PURE__ */ new Set()
|
|
2242
|
+
// src/testing/platform/testing-platform.ts
|
|
2243
|
+
var supportsShadow = true;
|
|
2244
|
+
var plt = {
|
|
2245
|
+
$flags$: 0,
|
|
2246
|
+
$resourcesUrl$: "",
|
|
2247
|
+
jmp: (h2) => h2(),
|
|
2248
|
+
raf: (h2) => requestAnimationFrame(h2),
|
|
2249
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2250
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2251
|
+
ce: (eventName, opts) => new win.CustomEvent(eventName, opts)
|
|
2201
2252
|
};
|
|
2202
|
-
var
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2253
|
+
var setPlatformHelpers = (helpers) => {
|
|
2254
|
+
Object.assign(plt, helpers);
|
|
2255
|
+
};
|
|
2256
|
+
var supportsListenerOptions = true;
|
|
2257
|
+
var supportsConstructableStylesheets = false;
|
|
2258
|
+
var supportsMutableAdoptedStyleSheets = false;
|
|
2259
|
+
var setSupportsShadowDom = (supports) => {
|
|
2260
|
+
supportsShadow = supports;
|
|
2261
|
+
};
|
|
2262
|
+
function resetPlatform(defaults2 = {}) {
|
|
2263
|
+
if (win && typeof win.close === "function") {
|
|
2264
|
+
win.close();
|
|
2265
|
+
}
|
|
2266
|
+
styles.clear();
|
|
2267
|
+
plt.$flags$ = 0;
|
|
2268
|
+
Object.assign(plt, defaults2);
|
|
2269
|
+
if (plt.$orgLocNodes$ != null) {
|
|
2270
|
+
plt.$orgLocNodes$.clear();
|
|
2271
|
+
plt.$orgLocNodes$ = void 0;
|
|
2272
|
+
}
|
|
2273
|
+
win.location.href = plt.$resourcesUrl$ = `http://testing.stenciljs.com/`;
|
|
2274
|
+
resetTaskQueue();
|
|
2275
|
+
stopAutoApplyChanges();
|
|
2276
|
+
cstrs.clear();
|
|
2217
2277
|
}
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
if (import_app_data.BUILD.shadowDelegatesFocus) {
|
|
2226
|
-
opts.delegatesFocus = !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */);
|
|
2278
|
+
var isAutoApplyingChanges = false;
|
|
2279
|
+
var autoApplyTimer = void 0;
|
|
2280
|
+
function stopAutoApplyChanges() {
|
|
2281
|
+
isAutoApplyingChanges = false;
|
|
2282
|
+
if (autoApplyTimer) {
|
|
2283
|
+
clearTimeout(autoApplyTimer);
|
|
2284
|
+
autoApplyTimer = void 0;
|
|
2227
2285
|
}
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2286
|
+
}
|
|
2287
|
+
async function startAutoApplyChanges() {
|
|
2288
|
+
isAutoApplyingChanges = true;
|
|
2289
|
+
flushAll().then(() => {
|
|
2290
|
+
if (isAutoApplyingChanges) {
|
|
2291
|
+
autoApplyTimer = setTimeout(() => {
|
|
2292
|
+
startAutoApplyChanges();
|
|
2293
|
+
}, 100);
|
|
2232
2294
|
}
|
|
2233
|
-
}
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2295
|
+
});
|
|
2296
|
+
}
|
|
2297
|
+
var registerComponents = (Cstrs) => {
|
|
2298
|
+
Cstrs.filter((Cstr) => Cstr.COMPILER_META).forEach((Cstr) => {
|
|
2299
|
+
cstrs.set(Cstr.COMPILER_META.tagName, Cstr);
|
|
2300
|
+
});
|
|
2301
|
+
};
|
|
2302
|
+
function registerModule(bundleId, Cstr) {
|
|
2303
|
+
moduleLoaded.set(bundleId, Cstr);
|
|
2304
|
+
}
|
|
2305
|
+
var isMemberInElement = (elm, memberName) => {
|
|
2306
|
+
if (elm != null) {
|
|
2307
|
+
if (memberName in elm) {
|
|
2308
|
+
return true;
|
|
2241
2309
|
}
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2310
|
+
const nodeName = elm.nodeName;
|
|
2311
|
+
if (nodeName) {
|
|
2312
|
+
const cstr = cstrs.get(nodeName.toLowerCase());
|
|
2313
|
+
if (cstr != null && cstr.COMPILER_META != null && cstr.COMPILER_META.properties != null) {
|
|
2314
|
+
return cstr.COMPILER_META.properties.some((p) => p.name === memberName);
|
|
2315
|
+
}
|
|
2247
2316
|
}
|
|
2248
|
-
shadowRoot.prepend(styleElm);
|
|
2249
2317
|
}
|
|
2250
|
-
|
|
2318
|
+
return false;
|
|
2319
|
+
};
|
|
2251
2320
|
|
|
2252
|
-
// src/
|
|
2253
|
-
var
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
);
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
);
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
);
|
|
2264
|
-
var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
|
|
2321
|
+
// src/testing/platform/index.ts
|
|
2322
|
+
var import_app_data24 = require("@stencil/core/internal/app-data");
|
|
2323
|
+
|
|
2324
|
+
// src/runtime/asset-path.ts
|
|
2325
|
+
var getAssetPath = (path2) => {
|
|
2326
|
+
const assetUrl = new URL(path2, plt.$resourcesUrl$);
|
|
2327
|
+
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
2328
|
+
};
|
|
2329
|
+
var setAssetPath = (path2) => plt.$resourcesUrl$ = path2;
|
|
2330
|
+
|
|
2331
|
+
// src/runtime/bootstrap-custom-element.ts
|
|
2332
|
+
var import_app_data20 = require("@stencil/core/internal/app-data");
|
|
2265
2333
|
|
|
2266
2334
|
// src/runtime/connected-callback.ts
|
|
2267
2335
|
var import_app_data18 = require("@stencil/core/internal/app-data");
|
|
2268
2336
|
|
|
2269
2337
|
// src/runtime/client-hydrate.ts
|
|
2270
|
-
var
|
|
2338
|
+
var import_app_data9 = require("@stencil/core/internal/app-data");
|
|
2271
2339
|
|
|
2272
2340
|
// src/runtime/dom-extras.ts
|
|
2273
|
-
var
|
|
2341
|
+
var import_app_data5 = require("@stencil/core/internal/app-data");
|
|
2274
2342
|
|
|
2275
2343
|
// src/runtime/slot-polyfill-utils.ts
|
|
2276
|
-
var
|
|
2344
|
+
var import_app_data4 = require("@stencil/core/internal/app-data");
|
|
2277
2345
|
var updateFallbackSlotVisibility = (elm) => {
|
|
2278
2346
|
const childNodes = internalCall(elm, "childNodes");
|
|
2279
2347
|
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
@@ -2352,7 +2420,7 @@ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
|
2352
2420
|
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
2353
2421
|
const parent = slotNode["s-cr"].parentNode;
|
|
2354
2422
|
const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
|
|
2355
|
-
if (
|
|
2423
|
+
if (import_app_data4.BUILD.hydrateClientSide && typeof position !== "undefined") {
|
|
2356
2424
|
slottedNodeLocation["s-oo"] = position;
|
|
2357
2425
|
const childNodes = internalCall(parent, "childNodes");
|
|
2358
2426
|
const slotRelocateNodes = [slottedNodeLocation];
|
|
@@ -2427,12 +2495,13 @@ var patchPseudoShadowDom = (hostElementPrototype) => {
|
|
|
2427
2495
|
patchSlotRemoveChild(hostElementPrototype);
|
|
2428
2496
|
};
|
|
2429
2497
|
var patchCloneNode = (HostElementPrototype) => {
|
|
2430
|
-
|
|
2498
|
+
if (HostElementPrototype.__cloneNode) return;
|
|
2499
|
+
const orgCloneNode = HostElementPrototype.__cloneNode = HostElementPrototype.cloneNode;
|
|
2431
2500
|
HostElementPrototype.cloneNode = function(deep) {
|
|
2432
2501
|
const srcNode = this;
|
|
2433
|
-
const isShadowDom =
|
|
2502
|
+
const isShadowDom = import_app_data5.BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
|
|
2434
2503
|
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
2435
|
-
if (
|
|
2504
|
+
if (import_app_data5.BUILD.slot && !isShadowDom && deep) {
|
|
2436
2505
|
let i2 = 0;
|
|
2437
2506
|
let slotted, nonStencilNode;
|
|
2438
2507
|
const stencilPrivates = [
|
|
@@ -2457,7 +2526,7 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
2457
2526
|
slotted = childNodes[i2]["s-nr"];
|
|
2458
2527
|
nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
|
|
2459
2528
|
if (slotted) {
|
|
2460
|
-
if (
|
|
2529
|
+
if (import_app_data5.BUILD.appendChildSlotFix && clonedNode.__appendChild) {
|
|
2461
2530
|
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
2462
2531
|
} else {
|
|
2463
2532
|
clonedNode.appendChild(slotted.cloneNode(true));
|
|
@@ -2472,6 +2541,7 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
2472
2541
|
};
|
|
2473
2542
|
};
|
|
2474
2543
|
var patchSlotAppendChild = (HostElementPrototype) => {
|
|
2544
|
+
if (HostElementPrototype.__appendChild) return;
|
|
2475
2545
|
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
2476
2546
|
HostElementPrototype.appendChild = function(newChild) {
|
|
2477
2547
|
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
@@ -2489,6 +2559,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
|
|
|
2489
2559
|
};
|
|
2490
2560
|
};
|
|
2491
2561
|
var patchSlotRemoveChild = (ElementPrototype) => {
|
|
2562
|
+
if (ElementPrototype.__removeChild) return;
|
|
2492
2563
|
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
2493
2564
|
ElementPrototype.removeChild = function(toRemove) {
|
|
2494
2565
|
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
@@ -2504,6 +2575,7 @@ var patchSlotRemoveChild = (ElementPrototype) => {
|
|
|
2504
2575
|
};
|
|
2505
2576
|
};
|
|
2506
2577
|
var patchSlotPrepend = (HostElementPrototype) => {
|
|
2578
|
+
if (HostElementPrototype.__prepend) return;
|
|
2507
2579
|
HostElementPrototype.__prepend = HostElementPrototype.prepend;
|
|
2508
2580
|
HostElementPrototype.prepend = function(...newChildren) {
|
|
2509
2581
|
newChildren.forEach((newChild) => {
|
|
@@ -2530,6 +2602,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
|
|
|
2530
2602
|
};
|
|
2531
2603
|
};
|
|
2532
2604
|
var patchSlotAppend = (HostElementPrototype) => {
|
|
2605
|
+
if (HostElementPrototype.__append) return;
|
|
2533
2606
|
HostElementPrototype.__append = HostElementPrototype.append;
|
|
2534
2607
|
HostElementPrototype.append = function(...newChildren) {
|
|
2535
2608
|
newChildren.forEach((newChild) => {
|
|
@@ -2541,6 +2614,7 @@ var patchSlotAppend = (HostElementPrototype) => {
|
|
|
2541
2614
|
};
|
|
2542
2615
|
};
|
|
2543
2616
|
var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
|
|
2617
|
+
if (HostElementPrototype.__insertAdjacentHTML) return;
|
|
2544
2618
|
const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
|
|
2545
2619
|
HostElementPrototype.insertAdjacentHTML = function(position, text) {
|
|
2546
2620
|
if (position !== "afterbegin" && position !== "beforeend") {
|
|
@@ -2566,6 +2640,7 @@ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
|
|
|
2566
2640
|
};
|
|
2567
2641
|
};
|
|
2568
2642
|
var patchInsertBefore = (HostElementPrototype) => {
|
|
2643
|
+
if (HostElementPrototype.__insertBefore) return;
|
|
2569
2644
|
const eleProto = HostElementPrototype;
|
|
2570
2645
|
if (eleProto.__insertBefore) return;
|
|
2571
2646
|
eleProto.__insertBefore = HostElementPrototype.insertBefore;
|
|
@@ -2600,6 +2675,7 @@ var patchInsertBefore = (HostElementPrototype) => {
|
|
|
2600
2675
|
};
|
|
2601
2676
|
};
|
|
2602
2677
|
var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
2678
|
+
if (HostElementPrototype.__insertAdjacentElement) return;
|
|
2603
2679
|
const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
|
|
2604
2680
|
HostElementPrototype.insertAdjacentElement = function(position, element) {
|
|
2605
2681
|
if (position !== "afterbegin" && position !== "beforeend") {
|
|
@@ -2792,10 +2868,10 @@ function internalCall(node, method) {
|
|
|
2792
2868
|
}
|
|
2793
2869
|
|
|
2794
2870
|
// src/runtime/profile.ts
|
|
2795
|
-
var
|
|
2871
|
+
var import_app_data6 = require("@stencil/core/internal/app-data");
|
|
2796
2872
|
var i = 0;
|
|
2797
2873
|
var createTime = (fnName, tagName = "") => {
|
|
2798
|
-
if (
|
|
2874
|
+
if (import_app_data6.BUILD.profile && performance.mark) {
|
|
2799
2875
|
const key = `st:${fnName}:${tagName}:${i++}`;
|
|
2800
2876
|
performance.mark(key);
|
|
2801
2877
|
return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
|
|
@@ -2806,7 +2882,7 @@ var createTime = (fnName, tagName = "") => {
|
|
|
2806
2882
|
}
|
|
2807
2883
|
};
|
|
2808
2884
|
var uniqueTime = (key, measureText) => {
|
|
2809
|
-
if (
|
|
2885
|
+
if (import_app_data6.BUILD.profile && performance.mark) {
|
|
2810
2886
|
if (performance.getEntriesByName(key, "mark").length === 0) {
|
|
2811
2887
|
performance.mark(key);
|
|
2812
2888
|
}
|
|
@@ -2866,7 +2942,7 @@ var inspect = (ref) => {
|
|
|
2866
2942
|
};
|
|
2867
2943
|
};
|
|
2868
2944
|
var installDevTools = () => {
|
|
2869
|
-
if (
|
|
2945
|
+
if (import_app_data6.BUILD.devTools) {
|
|
2870
2946
|
const stencil = win.stencil = win.stencil || {};
|
|
2871
2947
|
const originalInspect = stencil.inspect;
|
|
2872
2948
|
stencil.inspect = (ref) => {
|
|
@@ -2880,7 +2956,7 @@ var installDevTools = () => {
|
|
|
2880
2956
|
};
|
|
2881
2957
|
|
|
2882
2958
|
// src/runtime/styles.ts
|
|
2883
|
-
var
|
|
2959
|
+
var import_app_data7 = require("@stencil/core/internal/app-data");
|
|
2884
2960
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2885
2961
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2886
2962
|
let style = styles.get(scopeId2);
|
|
@@ -2900,7 +2976,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2900
2976
|
var _a, _b, _c;
|
|
2901
2977
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
2902
2978
|
const style = styles.get(scopeId2);
|
|
2903
|
-
if (!
|
|
2979
|
+
if (!import_app_data7.BUILD.attachStyles || !win.document) {
|
|
2904
2980
|
return scopeId2;
|
|
2905
2981
|
}
|
|
2906
2982
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
@@ -2912,7 +2988,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2912
2988
|
if (!appliedStyles) {
|
|
2913
2989
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
2914
2990
|
}
|
|
2915
|
-
const existingStyleElm = (
|
|
2991
|
+
const existingStyleElm = (import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hotModuleReplacement) && styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
2916
2992
|
if (existingStyleElm) {
|
|
2917
2993
|
existingStyleElm.innerHTML = style;
|
|
2918
2994
|
} else if (!appliedStyles.has(scopeId2)) {
|
|
@@ -2922,7 +2998,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2922
2998
|
if (nonce != null) {
|
|
2923
2999
|
styleElm.setAttribute("nonce", nonce);
|
|
2924
3000
|
}
|
|
2925
|
-
if ((
|
|
3001
|
+
if ((import_app_data7.BUILD.hydrateServerSide || import_app_data7.BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */ || cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
2926
3002
|
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
2927
3003
|
}
|
|
2928
3004
|
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
@@ -2965,7 +3041,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2965
3041
|
appliedStyles.add(scopeId2);
|
|
2966
3042
|
}
|
|
2967
3043
|
}
|
|
2968
|
-
} else if (
|
|
3044
|
+
} else if (import_app_data7.BUILD.constructableCSS) {
|
|
2969
3045
|
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
2970
3046
|
if (!appliedStyles) {
|
|
2971
3047
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
@@ -2998,17 +3074,17 @@ var attachStyles = (hostRef) => {
|
|
|
2998
3074
|
const flags = cmpMeta.$flags$;
|
|
2999
3075
|
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
3000
3076
|
const scopeId2 = addStyle(
|
|
3001
|
-
|
|
3077
|
+
import_app_data7.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
3002
3078
|
cmpMeta,
|
|
3003
3079
|
hostRef.$modeName$
|
|
3004
3080
|
);
|
|
3005
|
-
if ((
|
|
3081
|
+
if ((import_app_data7.BUILD.shadowDom || import_app_data7.BUILD.scoped) && import_app_data7.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
3006
3082
|
elm["s-sc"] = scopeId2;
|
|
3007
3083
|
elm.classList.add(scopeId2 + "-h");
|
|
3008
3084
|
}
|
|
3009
3085
|
endAttachStyles();
|
|
3010
3086
|
};
|
|
3011
|
-
var getScopeId = (cmp, mode) => "sc-" + (
|
|
3087
|
+
var getScopeId = (cmp, mode) => "sc-" + (import_app_data7.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
3012
3088
|
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
3013
3089
|
var hydrateScopedToShadow = () => {
|
|
3014
3090
|
if (!win.document) {
|
|
@@ -3022,7 +3098,7 @@ var hydrateScopedToShadow = () => {
|
|
|
3022
3098
|
};
|
|
3023
3099
|
|
|
3024
3100
|
// src/runtime/vdom/h.ts
|
|
3025
|
-
var
|
|
3101
|
+
var import_app_data8 = require("@stencil/core/internal/app-data");
|
|
3026
3102
|
var h = (nodeName, vnodeData, ...children) => {
|
|
3027
3103
|
if (typeof nodeName === "string") {
|
|
3028
3104
|
nodeName = transformTag(nodeName);
|
|
@@ -3041,7 +3117,7 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
3041
3117
|
} else if (child != null && typeof child !== "boolean") {
|
|
3042
3118
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
3043
3119
|
child = String(child);
|
|
3044
|
-
} else if (
|
|
3120
|
+
} else if (import_app_data8.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
3045
3121
|
consoleDevError(`vNode passed as children has unexpected type.
|
|
3046
3122
|
Make sure it's using the correct h() function.
|
|
3047
3123
|
Empty objects can also be the cause, look for JSX comments that became objects.`);
|
|
@@ -3057,28 +3133,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
3057
3133
|
};
|
|
3058
3134
|
walk(children);
|
|
3059
3135
|
if (vnodeData) {
|
|
3060
|
-
if (
|
|
3136
|
+
if (import_app_data8.BUILD.isDev && nodeName === "input") {
|
|
3061
3137
|
validateInputProperties(vnodeData);
|
|
3062
3138
|
}
|
|
3063
|
-
if (
|
|
3139
|
+
if (import_app_data8.BUILD.vdomKey && vnodeData.key) {
|
|
3064
3140
|
key = vnodeData.key;
|
|
3065
3141
|
}
|
|
3066
|
-
if (
|
|
3142
|
+
if (import_app_data8.BUILD.slotRelocation && vnodeData.name) {
|
|
3067
3143
|
slotName = vnodeData.name;
|
|
3068
3144
|
}
|
|
3069
|
-
if (
|
|
3145
|
+
if (import_app_data8.BUILD.vdomClass) {
|
|
3070
3146
|
const classData = vnodeData.className || vnodeData.class;
|
|
3071
3147
|
if (classData) {
|
|
3072
3148
|
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
3073
3149
|
}
|
|
3074
3150
|
}
|
|
3075
3151
|
}
|
|
3076
|
-
if (
|
|
3152
|
+
if (import_app_data8.BUILD.isDev && vNodeChildren.some(isHost)) {
|
|
3077
3153
|
consoleDevError(`The <Host> must be the single root component. Make sure:
|
|
3078
3154
|
- You are NOT using hostData() and <Host> in the same component.
|
|
3079
3155
|
- <Host> is used once, and it's the single root component of the render() function.`);
|
|
3080
3156
|
}
|
|
3081
|
-
if (
|
|
3157
|
+
if (import_app_data8.BUILD.vdomFunctional && typeof nodeName === "function") {
|
|
3082
3158
|
return nodeName(
|
|
3083
3159
|
vnodeData === null ? {} : vnodeData,
|
|
3084
3160
|
vNodeChildren,
|
|
@@ -3090,10 +3166,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
3090
3166
|
if (vNodeChildren.length > 0) {
|
|
3091
3167
|
vnode.$children$ = vNodeChildren;
|
|
3092
3168
|
}
|
|
3093
|
-
if (
|
|
3169
|
+
if (import_app_data8.BUILD.vdomKey) {
|
|
3094
3170
|
vnode.$key$ = key;
|
|
3095
3171
|
}
|
|
3096
|
-
if (
|
|
3172
|
+
if (import_app_data8.BUILD.slotRelocation) {
|
|
3097
3173
|
vnode.$name$ = slotName;
|
|
3098
3174
|
}
|
|
3099
3175
|
return vnode;
|
|
@@ -3106,13 +3182,13 @@ var newVNode = (tag, text) => {
|
|
|
3106
3182
|
$elm$: null,
|
|
3107
3183
|
$children$: null
|
|
3108
3184
|
};
|
|
3109
|
-
if (
|
|
3185
|
+
if (import_app_data8.BUILD.vdomAttribute) {
|
|
3110
3186
|
vnode.$attrs$ = null;
|
|
3111
3187
|
}
|
|
3112
|
-
if (
|
|
3188
|
+
if (import_app_data8.BUILD.vdomKey) {
|
|
3113
3189
|
vnode.$key$ = null;
|
|
3114
3190
|
}
|
|
3115
|
-
if (
|
|
3191
|
+
if (import_app_data8.BUILD.slotRelocation) {
|
|
3116
3192
|
vnode.$name$ = null;
|
|
3117
3193
|
}
|
|
3118
3194
|
return vnode;
|
|
@@ -3172,11 +3248,11 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
3172
3248
|
const childRenderNodes = [];
|
|
3173
3249
|
const slotNodes = [];
|
|
3174
3250
|
const slottedNodes = [];
|
|
3175
|
-
const shadowRootNodes =
|
|
3251
|
+
const shadowRootNodes = import_app_data9.BUILD.shadowDom && shadowRoot ? [] : null;
|
|
3176
3252
|
const vnode = newVNode(tagName, null);
|
|
3177
3253
|
vnode.$elm$ = hostElm;
|
|
3178
3254
|
let scopeId2;
|
|
3179
|
-
if (
|
|
3255
|
+
if (import_app_data9.BUILD.scoped) {
|
|
3180
3256
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
3181
3257
|
if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
|
|
3182
3258
|
scopeId2 = hostElm["s-sc"];
|
|
@@ -3218,7 +3294,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
3218
3294
|
if (cmpMeta) {
|
|
3219
3295
|
const scopeId3 = getScopeId(
|
|
3220
3296
|
cmpMeta.$cmpMeta$,
|
|
3221
|
-
|
|
3297
|
+
import_app_data9.BUILD.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
|
|
3222
3298
|
);
|
|
3223
3299
|
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
3224
3300
|
if (styleSheet) {
|
|
@@ -3288,19 +3364,19 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
3288
3364
|
if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
3289
3365
|
slottedItem.node.removeAttribute("slot");
|
|
3290
3366
|
}
|
|
3291
|
-
if (
|
|
3367
|
+
if (import_app_data9.BUILD.experimentalSlotFixes) {
|
|
3292
3368
|
patchSlottedNode(slottedItem.node);
|
|
3293
3369
|
}
|
|
3294
3370
|
}
|
|
3295
3371
|
currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
|
|
3296
3372
|
}
|
|
3297
3373
|
}
|
|
3298
|
-
if (
|
|
3374
|
+
if (import_app_data9.BUILD.scoped && scopeId2 && slotNodes.length) {
|
|
3299
3375
|
slotNodes.forEach((slot) => {
|
|
3300
3376
|
slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
|
|
3301
3377
|
});
|
|
3302
3378
|
}
|
|
3303
|
-
if (
|
|
3379
|
+
if (import_app_data9.BUILD.shadowDom && shadowRoot) {
|
|
3304
3380
|
let rnIdex = 0;
|
|
3305
3381
|
const rnLen = shadowRootNodes.length;
|
|
3306
3382
|
if (rnLen) {
|
|
@@ -3352,7 +3428,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
3352
3428
|
if (!parentVNode.$children$) {
|
|
3353
3429
|
parentVNode.$children$ = [];
|
|
3354
3430
|
}
|
|
3355
|
-
if (
|
|
3431
|
+
if (import_app_data9.BUILD.scoped && scopeId2 && childIdSplt[0] === hostId) {
|
|
3356
3432
|
node["s-si"] = scopeId2;
|
|
3357
3433
|
childVNode.$attrs$.class += " " + scopeId2;
|
|
3358
3434
|
}
|
|
@@ -3370,7 +3446,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
3370
3446
|
shadowRootNodes,
|
|
3371
3447
|
slottedNodes
|
|
3372
3448
|
);
|
|
3373
|
-
if (
|
|
3449
|
+
if (import_app_data9.BUILD.scoped && scopeId2) {
|
|
3374
3450
|
node.classList.add(scopeId2);
|
|
3375
3451
|
}
|
|
3376
3452
|
}
|
|
@@ -3467,9 +3543,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
3467
3543
|
slottedNodes
|
|
3468
3544
|
);
|
|
3469
3545
|
} else if (childNodeType === CONTENT_REF_ID) {
|
|
3470
|
-
if (
|
|
3546
|
+
if (import_app_data9.BUILD.shadowDom && shadowRootNodes) {
|
|
3471
3547
|
node.remove();
|
|
3472
|
-
} else if (
|
|
3548
|
+
} else if (import_app_data9.BUILD.slotRelocation) {
|
|
3473
3549
|
hostElm["s-cr"] = node;
|
|
3474
3550
|
node["s-cn"] = true;
|
|
3475
3551
|
}
|
|
@@ -3531,7 +3607,7 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
3531
3607
|
childVNode.$name$ = slotName || null;
|
|
3532
3608
|
childVNode.$tag$ = "slot";
|
|
3533
3609
|
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
3534
|
-
if (
|
|
3610
|
+
if (import_app_data9.BUILD.shadowDom && shadowRootNodes && win.document) {
|
|
3535
3611
|
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
3536
3612
|
if (childVNode.$name$) {
|
|
3537
3613
|
childVNode.$elm$.setAttribute("name", slotName);
|
|
@@ -4007,24 +4083,24 @@ var import_app_data16 = require("@stencil/core/internal/app-data");
|
|
|
4007
4083
|
var import_app_data15 = require("@stencil/core/internal/app-data");
|
|
4008
4084
|
|
|
4009
4085
|
// src/runtime/parse-property-value.ts
|
|
4010
|
-
var
|
|
4086
|
+
var import_app_data10 = require("@stencil/core/internal/app-data");
|
|
4011
4087
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
4012
|
-
if ((
|
|
4088
|
+
if ((import_app_data10.BUILD.hydrateClientSide || import_app_data10.BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
4013
4089
|
propValue = deserializeProperty(propValue);
|
|
4014
4090
|
return propValue;
|
|
4015
4091
|
}
|
|
4016
4092
|
if (propValue != null && !isComplexType(propValue)) {
|
|
4017
|
-
if (
|
|
4018
|
-
if (
|
|
4093
|
+
if (import_app_data10.BUILD.propBoolean && propType & 4 /* Boolean */) {
|
|
4094
|
+
if (import_app_data10.BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
|
|
4019
4095
|
return propValue === "" || !!propValue;
|
|
4020
4096
|
} else {
|
|
4021
4097
|
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
4022
4098
|
}
|
|
4023
4099
|
}
|
|
4024
|
-
if (
|
|
4100
|
+
if (import_app_data10.BUILD.propNumber && propType & 2 /* Number */) {
|
|
4025
4101
|
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
4026
4102
|
}
|
|
4027
|
-
if (
|
|
4103
|
+
if (import_app_data10.BUILD.propString && propType & 1 /* String */) {
|
|
4028
4104
|
return String(propValue);
|
|
4029
4105
|
}
|
|
4030
4106
|
return propValue;
|
|
@@ -4035,39 +4111,6 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
|
4035
4111
|
// src/runtime/update-component.ts
|
|
4036
4112
|
var import_app_data14 = require("@stencil/core/internal/app-data");
|
|
4037
4113
|
|
|
4038
|
-
// src/runtime/event-emitter.ts
|
|
4039
|
-
var import_app_data10 = require("@stencil/core/internal/app-data");
|
|
4040
|
-
|
|
4041
|
-
// src/runtime/element.ts
|
|
4042
|
-
var import_app_data9 = require("@stencil/core/internal/app-data");
|
|
4043
|
-
var getElement = (ref) => {
|
|
4044
|
-
var _a;
|
|
4045
|
-
return import_app_data9.BUILD.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
|
|
4046
|
-
};
|
|
4047
|
-
|
|
4048
|
-
// src/runtime/event-emitter.ts
|
|
4049
|
-
var createEvent = (ref, name, flags) => {
|
|
4050
|
-
const elm = getElement(ref);
|
|
4051
|
-
return {
|
|
4052
|
-
emit: (detail) => {
|
|
4053
|
-
if (import_app_data10.BUILD.isDev && !elm.isConnected) {
|
|
4054
|
-
consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
|
|
4055
|
-
}
|
|
4056
|
-
return emitEvent(elm, name, {
|
|
4057
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
4058
|
-
composed: !!(flags & 2 /* Composed */),
|
|
4059
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
4060
|
-
detail
|
|
4061
|
-
});
|
|
4062
|
-
}
|
|
4063
|
-
};
|
|
4064
|
-
};
|
|
4065
|
-
var emitEvent = (elm, name, opts) => {
|
|
4066
|
-
const ev = plt.ce(name, opts);
|
|
4067
|
-
elm.dispatchEvent(ev);
|
|
4068
|
-
return ev;
|
|
4069
|
-
};
|
|
4070
|
-
|
|
4071
4114
|
// src/runtime/vdom/vdom-render.ts
|
|
4072
4115
|
var import_app_data13 = require("@stencil/core/internal/app-data");
|
|
4073
4116
|
|
|
@@ -4336,11 +4379,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
4336
4379
|
patchSlotNode(elm);
|
|
4337
4380
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
4338
4381
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
4339
|
-
|
|
4340
|
-
relocateToHostRoot(oldParentVNode.$elm$);
|
|
4341
|
-
} else {
|
|
4342
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
4343
|
-
}
|
|
4382
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
4344
4383
|
}
|
|
4345
4384
|
if (import_app_data13.BUILD.scoped || import_app_data13.BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) {
|
|
4346
4385
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -4372,7 +4411,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
4372
4411
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
4373
4412
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
4374
4413
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
4375
|
-
if (parentElm["s-sr"]
|
|
4414
|
+
if (parentElm["s-sr"]) {
|
|
4376
4415
|
let node = parentElm;
|
|
4377
4416
|
while (node = node.nextSibling) {
|
|
4378
4417
|
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
@@ -4560,7 +4599,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
4560
4599
|
}
|
|
4561
4600
|
if (import_app_data13.BUILD.vdomAttribute || import_app_data13.BUILD.reflect) {
|
|
4562
4601
|
if (import_app_data13.BUILD.slot && tag === "slot" && !useNativeShadowDom) {
|
|
4563
|
-
if (
|
|
4602
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
4564
4603
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
4565
4604
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
4566
4605
|
}
|
|
@@ -4603,7 +4642,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
4603
4642
|
const slotName = childNode["s-sn"];
|
|
4604
4643
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
4605
4644
|
node = hostContentNodes[j];
|
|
4606
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!
|
|
4645
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
4607
4646
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
4608
4647
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
4609
4648
|
checkSlotFallbackVisibility = true;
|
|
@@ -4647,19 +4686,19 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
4647
4686
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
4648
4687
|
}
|
|
4649
4688
|
};
|
|
4650
|
-
var insertBefore = (parent, newNode, reference) => {
|
|
4689
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
4651
4690
|
if (import_app_data13.BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
4652
4691
|
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
4653
|
-
} else if (
|
|
4654
|
-
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
4692
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
4693
|
+
if (import_app_data13.BUILD.experimentalSlotFixes && parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
4655
4694
|
patchParentNode(newNode);
|
|
4656
4695
|
}
|
|
4657
4696
|
parent.insertBefore(newNode, reference);
|
|
4658
4697
|
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
4659
|
-
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
4698
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
4660
4699
|
return newNode;
|
|
4661
4700
|
}
|
|
4662
|
-
if (
|
|
4701
|
+
if (parent.__insertBefore) {
|
|
4663
4702
|
return parent.__insertBefore(newNode, reference);
|
|
4664
4703
|
} else {
|
|
4665
4704
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -4747,7 +4786,12 @@ render() {
|
|
|
4747
4786
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
4748
4787
|
const orgLocationNode = import_app_data13.BUILD.isDebug || import_app_data13.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
4749
4788
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
4750
|
-
insertBefore(
|
|
4789
|
+
insertBefore(
|
|
4790
|
+
nodeToRelocate.parentNode,
|
|
4791
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
4792
|
+
nodeToRelocate,
|
|
4793
|
+
isInitialLoad
|
|
4794
|
+
);
|
|
4751
4795
|
}
|
|
4752
4796
|
}
|
|
4753
4797
|
for (const relocateData of relocateNodes) {
|
|
@@ -4759,7 +4803,7 @@ render() {
|
|
|
4759
4803
|
if (slotRefNode) {
|
|
4760
4804
|
const parentNodeRef = slotRefNode.parentNode;
|
|
4761
4805
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
4762
|
-
if (!import_app_data13.BUILD.hydrateServerSide &&
|
|
4806
|
+
if (!import_app_data13.BUILD.hydrateServerSide && insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
4763
4807
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
4764
4808
|
while (orgLocationNode) {
|
|
4765
4809
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -4780,10 +4824,18 @@ render() {
|
|
|
4780
4824
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
4781
4825
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
4782
4826
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
4783
|
-
|
|
4784
|
-
|
|
4827
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
4828
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
4829
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
4830
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
4831
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
4832
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
4833
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
4834
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
4835
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
4836
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
4837
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
4785
4838
|
}
|
|
4786
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
4787
4839
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
4788
4840
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
4789
4841
|
}
|
|
@@ -4801,14 +4853,21 @@ render() {
|
|
|
4801
4853
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
4802
4854
|
relocateNodes.length = 0;
|
|
4803
4855
|
}
|
|
4804
|
-
if (import_app_data13.BUILD.
|
|
4856
|
+
if (import_app_data13.BUILD.slotRelocation && !useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
4805
4857
|
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
4806
4858
|
for (const childNode of children) {
|
|
4807
|
-
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]
|
|
4859
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
4808
4860
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
4809
4861
|
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
4810
4862
|
}
|
|
4811
|
-
childNode.
|
|
4863
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
4864
|
+
childNode.hidden = true;
|
|
4865
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
4866
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
4867
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
4868
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
4869
|
+
childNode.parentNode.removeChild(childNode);
|
|
4870
|
+
}
|
|
4812
4871
|
}
|
|
4813
4872
|
}
|
|
4814
4873
|
}
|
|
@@ -4870,6 +4929,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
4870
4929
|
let maybePromise;
|
|
4871
4930
|
if (isInitialLoad) {
|
|
4872
4931
|
if (import_app_data14.BUILD.lazyLoad) {
|
|
4932
|
+
if (import_app_data14.BUILD.slotRelocation && hostRef.$deferredConnectedCallback$) {
|
|
4933
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
4934
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
4935
|
+
}
|
|
4873
4936
|
if (import_app_data14.BUILD.hostListener) {
|
|
4874
4937
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
4875
4938
|
if (hostRef.$queuedListeners$) {
|
|
@@ -5493,7 +5556,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
5493
5556
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
5494
5557
|
}
|
|
5495
5558
|
endNewInstance();
|
|
5496
|
-
|
|
5559
|
+
const needsDeferredCallback = import_app_data17.BUILD.slotRelocation && cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
5560
|
+
if (!needsDeferredCallback) {
|
|
5561
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
5562
|
+
} else {
|
|
5563
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
5564
|
+
}
|
|
5497
5565
|
} else {
|
|
5498
5566
|
Cstr = elm.constructor;
|
|
5499
5567
|
const cmpTag = elm.localName;
|
|
@@ -5698,6 +5766,8 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
5698
5766
|
patchTextContent(Cstr.prototype);
|
|
5699
5767
|
}
|
|
5700
5768
|
}
|
|
5769
|
+
} else if (import_app_data20.BUILD.cloneNodeFix) {
|
|
5770
|
+
patchCloneNode(Cstr.prototype);
|
|
5701
5771
|
}
|
|
5702
5772
|
if (import_app_data20.BUILD.hydrateClientSide && import_app_data20.BUILD.shadowDom) {
|
|
5703
5773
|
hydrateScopedToShadow();
|
|
@@ -5850,10 +5920,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
5850
5920
|
}
|
|
5851
5921
|
const tagName = import_app_data21.BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : transformTag(cmpMeta.$tagName$);
|
|
5852
5922
|
const HostElement = class extends HTMLElement {
|
|
5923
|
+
["s-p"];
|
|
5924
|
+
["s-rc"];
|
|
5925
|
+
hasRegisteredEventListeners = false;
|
|
5853
5926
|
// StencilLazyHost
|
|
5854
5927
|
constructor(self) {
|
|
5855
5928
|
super(self);
|
|
5856
|
-
this.hasRegisteredEventListeners = false;
|
|
5857
5929
|
self = this;
|
|
5858
5930
|
registerHost(self, cmpMeta);
|
|
5859
5931
|
if (import_app_data21.BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
@@ -5930,6 +6002,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
5930
6002
|
patchTextContent(HostElement.prototype);
|
|
5931
6003
|
}
|
|
5932
6004
|
}
|
|
6005
|
+
} else if (import_app_data21.BUILD.cloneNodeFix) {
|
|
6006
|
+
patchCloneNode(HostElement.prototype);
|
|
5933
6007
|
}
|
|
5934
6008
|
if (import_app_data21.BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
|
|
5935
6009
|
HostElement.formAssociated = true;
|
|
@@ -6082,6 +6156,44 @@ function setTagTransformer(transformer) {
|
|
|
6082
6156
|
tagTransformer = transformer;
|
|
6083
6157
|
}
|
|
6084
6158
|
|
|
6159
|
+
// src/runtime/vdom/jsx-dev-runtime.ts
|
|
6160
|
+
function jsxDEV(type, props, key, _isStaticChildren, _source, _self) {
|
|
6161
|
+
const { children, ...rest } = props;
|
|
6162
|
+
const vnodeData = key !== void 0 ? { ...rest, key } : rest;
|
|
6163
|
+
if (Array.isArray(children)) {
|
|
6164
|
+
return h(type, vnodeData, ...children);
|
|
6165
|
+
} else if (children !== void 0) {
|
|
6166
|
+
return h(type, vnodeData, children);
|
|
6167
|
+
}
|
|
6168
|
+
return h(type, vnodeData);
|
|
6169
|
+
}
|
|
6170
|
+
|
|
6171
|
+
// src/runtime/vdom/jsx-runtime.ts
|
|
6172
|
+
function jsx(type, props, key) {
|
|
6173
|
+
const propsObj = props || {};
|
|
6174
|
+
const { children, ...rest } = propsObj;
|
|
6175
|
+
let vnodeData = rest;
|
|
6176
|
+
if (key !== void 0) {
|
|
6177
|
+
vnodeData = { ...rest, key };
|
|
6178
|
+
}
|
|
6179
|
+
if (vnodeData && Object.keys(vnodeData).length === 0) {
|
|
6180
|
+
vnodeData = null;
|
|
6181
|
+
}
|
|
6182
|
+
if (children !== void 0) {
|
|
6183
|
+
if (Array.isArray(children)) {
|
|
6184
|
+
return h(type, vnodeData, ...children);
|
|
6185
|
+
}
|
|
6186
|
+
if (typeof children === "object" && children !== null && "$flags$" in children) {
|
|
6187
|
+
return h(type, vnodeData, children);
|
|
6188
|
+
}
|
|
6189
|
+
return h(type, vnodeData, children);
|
|
6190
|
+
}
|
|
6191
|
+
return h(type, vnodeData);
|
|
6192
|
+
}
|
|
6193
|
+
function jsxs(type, props, key) {
|
|
6194
|
+
return jsx(type, props, key);
|
|
6195
|
+
}
|
|
6196
|
+
|
|
6085
6197
|
// src/runtime/vdom/vdom-annotations.ts
|
|
6086
6198
|
var insertVdomAnnotations = (doc, staticComponents) => {
|
|
6087
6199
|
if (doc != null) {
|
|
@@ -6265,6 +6377,9 @@ var scopedSSR = false;
|
|
|
6265
6377
|
h,
|
|
6266
6378
|
insertVdomAnnotations,
|
|
6267
6379
|
isMemberInElement,
|
|
6380
|
+
jsx,
|
|
6381
|
+
jsxDEV,
|
|
6382
|
+
jsxs,
|
|
6268
6383
|
loadModule,
|
|
6269
6384
|
modeResolutionChain,
|
|
6270
6385
|
needsScopedSSR,
|