@mborecki/sliding-puzzle 0.1.0 → 0.2.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/dist/cjs/{index-C425pVBv.js → index-C8QmqTMd.js} +62 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mb-sliding-puzzle.cjs.entry.js +38 -10
- package/dist/cjs/sliding-puzzle.cjs.js +2 -2
- package/dist/collection/components/sliding-puzzle/sliding-puzzle.css +2 -3
- package/dist/collection/components/sliding-puzzle/sliding-puzzle.js +44 -8
- package/dist/components/index.js +1 -1
- package/dist/components/mb-sliding-puzzle.js +1 -1
- package/dist/esm/{index-CoGw-MK9.js → index-D-FhYfR4.js} +62 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mb-sliding-puzzle.entry.js +38 -10
- package/dist/esm/sliding-puzzle.js +3 -3
- package/dist/sliding-puzzle/index-D-wV4B5a.js.map +1 -0
- package/dist/sliding-puzzle/index.esm.js.map +1 -0
- package/dist/sliding-puzzle/{p-CoGw-MK9.js → p-D-FhYfR4.js} +2 -2
- package/dist/sliding-puzzle/p-ee89c4f7.entry.js +1 -0
- package/dist/sliding-puzzle/sliding-puzzle.esm.js +1 -1
- package/dist/sliding-puzzle/sliding-puzzle.esm.js.map +1 -0
- package/dist/types/components/sliding-puzzle/sliding-puzzle.d.ts +2 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/roboczy/mb-puzzle/apps/sliding-puzzle/.stencil/shared/grid/src/grid.d.ts +4 -0
- package/dist/types/roboczy/mb-puzzle/apps/sliding-puzzle/.stencil/shared/grid/src/grid.test.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sliding-puzzle/p-a6576773.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const NAMESPACE = 'sliding-puzzle';
|
|
4
|
-
const BUILD = /* sliding-puzzle */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", propChangeCallback: false, state: true, updatable: true};
|
|
4
|
+
const BUILD = /* sliding-puzzle */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: false, state: true, updatable: true};
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
Stencil Client Platform v4.41.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -2110,6 +2110,11 @@ createSupportsRuleRe(":host");
|
|
|
2110
2110
|
createSupportsRuleRe(":host-context");
|
|
2111
2111
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2112
2112
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2113
|
+
if (propType & 4 /* Boolean */) {
|
|
2114
|
+
{
|
|
2115
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2113
2118
|
return propValue;
|
|
2114
2119
|
}
|
|
2115
2120
|
return propValue;
|
|
@@ -2660,7 +2665,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
2660
2665
|
const flags = hostRef.$flags$;
|
|
2661
2666
|
const instance = hostRef.$lazyInstance$ ;
|
|
2662
2667
|
newVal = parsePropertyValue(
|
|
2663
|
-
newVal
|
|
2668
|
+
newVal,
|
|
2669
|
+
cmpMeta.$members$[propName][0]);
|
|
2664
2670
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
2665
2671
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
2666
2672
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -2678,7 +2684,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
2678
2684
|
|
|
2679
2685
|
// src/runtime/proxy-component.ts
|
|
2680
2686
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
2681
|
-
var _a;
|
|
2687
|
+
var _a, _b;
|
|
2682
2688
|
const prototype = Cstr.prototype;
|
|
2683
2689
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
2684
2690
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
@@ -2717,7 +2723,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2717
2723
|
}
|
|
2718
2724
|
origSetter.apply(this, [
|
|
2719
2725
|
parsePropertyValue(
|
|
2720
|
-
newValue
|
|
2726
|
+
newValue,
|
|
2727
|
+
memberFlags)
|
|
2721
2728
|
]);
|
|
2722
2729
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2723
2730
|
setValue(this, memberName, newValue, cmpMeta);
|
|
@@ -2741,7 +2748,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2741
2748
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
2742
2749
|
}
|
|
2743
2750
|
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
2744
|
-
newValue
|
|
2751
|
+
newValue,
|
|
2752
|
+
memberFlags);
|
|
2745
2753
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2746
2754
|
};
|
|
2747
2755
|
if (ref.$lazyInstance$) {
|
|
@@ -2767,6 +2775,55 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2767
2775
|
});
|
|
2768
2776
|
}
|
|
2769
2777
|
});
|
|
2778
|
+
if ((flags & 1 /* isElementConstructor */)) {
|
|
2779
|
+
const attrNameToPropName = /* @__PURE__ */ new Map();
|
|
2780
|
+
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
|
2781
|
+
plt.jmp(() => {
|
|
2782
|
+
var _a2;
|
|
2783
|
+
const propName = attrNameToPropName.get(attrName);
|
|
2784
|
+
const hostRef = getHostRef(this);
|
|
2785
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
2786
|
+
newValue = this[propName];
|
|
2787
|
+
delete this[propName];
|
|
2788
|
+
}
|
|
2789
|
+
if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
2790
|
+
this[propName] == newValue) {
|
|
2791
|
+
return;
|
|
2792
|
+
} else if (propName == null) {
|
|
2793
|
+
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
2794
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
|
|
2795
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
2796
|
+
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
2797
|
+
entry == null ? void 0 : entry.forEach((watcher) => {
|
|
2798
|
+
const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
|
|
2799
|
+
if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
|
|
2800
|
+
instance[watchMethodName].call(instance, newValue, oldValue, attrName);
|
|
2801
|
+
}
|
|
2802
|
+
});
|
|
2803
|
+
}
|
|
2804
|
+
return;
|
|
2805
|
+
}
|
|
2806
|
+
const propFlags = members.find(([m]) => m === propName);
|
|
2807
|
+
if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
|
|
2808
|
+
newValue = newValue === null || newValue === "false" ? false : true;
|
|
2809
|
+
}
|
|
2810
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2811
|
+
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2812
|
+
this[propName] = newValue;
|
|
2813
|
+
}
|
|
2814
|
+
});
|
|
2815
|
+
};
|
|
2816
|
+
Cstr.observedAttributes = Array.from(
|
|
2817
|
+
/* @__PURE__ */ new Set([
|
|
2818
|
+
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
2819
|
+
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
2820
|
+
const attrName = m[1] || propName;
|
|
2821
|
+
attrNameToPropName.set(attrName, propName);
|
|
2822
|
+
return attrName;
|
|
2823
|
+
})
|
|
2824
|
+
])
|
|
2825
|
+
);
|
|
2826
|
+
}
|
|
2770
2827
|
}
|
|
2771
2828
|
return Cstr;
|
|
2772
2829
|
};
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-C8QmqTMd.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["mb-sliding-puzzle.cjs",[[513,"mb-sliding-puzzle",{"tiles":[1040],"size":[32],"checkAnswer":[64]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["mb-sliding-puzzle.cjs",[[513,"mb-sliding-puzzle",{"tiles":[1040],"freeMove":[4,"free-move"],"size":[32],"checkAnswer":[64]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-C8QmqTMd.js');
|
|
4
4
|
|
|
5
5
|
class Vec2 {
|
|
6
6
|
x;
|
|
@@ -77,6 +77,12 @@ class Grid {
|
|
|
77
77
|
getVecFromIndex(index) {
|
|
78
78
|
return Grid.getVecFromIndex(index, this.size.width);
|
|
79
79
|
}
|
|
80
|
+
getAllIndexes() {
|
|
81
|
+
return Grid.getAllIndexes(this.size);
|
|
82
|
+
}
|
|
83
|
+
getAllCells() {
|
|
84
|
+
return Grid.getAllCells(this.size);
|
|
85
|
+
}
|
|
80
86
|
isBlack(v) {
|
|
81
87
|
return Boolean((v.x + v.y) % 2);
|
|
82
88
|
}
|
|
@@ -86,6 +92,12 @@ class Grid {
|
|
|
86
92
|
isInGrid(v) {
|
|
87
93
|
return Grid.isInGrid(v, this.size);
|
|
88
94
|
}
|
|
95
|
+
static getAllIndexes(v) {
|
|
96
|
+
return Array(v.width * v.height).fill(true).map((_, i) => i);
|
|
97
|
+
}
|
|
98
|
+
static getAllCells(v) {
|
|
99
|
+
return Array(v.width * v.height).fill(true).map((_, i) => Grid.getVecFromIndex(i, v.width));
|
|
100
|
+
}
|
|
89
101
|
static getVecFromIndex(index, width) {
|
|
90
102
|
const _w = width instanceof Vec2 ? width.width : width;
|
|
91
103
|
const x = index % _w;
|
|
@@ -111,7 +123,7 @@ class Grid {
|
|
|
111
123
|
}
|
|
112
124
|
}
|
|
113
125
|
|
|
114
|
-
const slidingPuzzleCss = () => `.board{width:100%;height:100%;display:inline-block;aspect-ratio:calc(var(--width, 1) / var(--height, 1));border:1px solid black;position:relative
|
|
126
|
+
const slidingPuzzleCss = () => `.board{width:100%;height:100%;display:inline-block;aspect-ratio:calc(var(--width, 1) / var(--height, 1));border:1px solid black;position:relative}.tile{position:absolute;width:calc(100% / var(--width, 1));height:calc(100% / var(--height, 1));padding:0;border:none;transform:translate(calc(100% * var(--x)), calc(100% * var(--y)));transition:transform 0.5s}.tile img{display:block;width:100%;height:100%;pointer-events:none}`;
|
|
115
127
|
|
|
116
128
|
const MbSlidingPuzzle = class {
|
|
117
129
|
constructor(hostRef) {
|
|
@@ -119,6 +131,7 @@ const MbSlidingPuzzle = class {
|
|
|
119
131
|
}
|
|
120
132
|
size = new Vec2(3, 3);
|
|
121
133
|
tiles = [];
|
|
134
|
+
freeMove = false;
|
|
122
135
|
async checkAnswer() {
|
|
123
136
|
return this.tiles.every(t => t.position === t.correctPosition);
|
|
124
137
|
}
|
|
@@ -132,13 +145,28 @@ const MbSlidingPuzzle = class {
|
|
|
132
145
|
onTileClicked(id) {
|
|
133
146
|
const tile = this.getTileById(id);
|
|
134
147
|
const v = Grid.getVecFromIndex(tile.position, this.size.width);
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
const target = this.getMoveTarget(v);
|
|
149
|
+
if (target) {
|
|
150
|
+
this.setTilePosition(tile, Grid.getIndexFromVec(target, this.size));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
getMoveTarget(source) {
|
|
154
|
+
if (this.freeMove) {
|
|
155
|
+
const cells = Grid.getAllCells(this.size);
|
|
156
|
+
const emptyCell = cells.find(c => {
|
|
157
|
+
const index = Grid.getIndexFromVec(c, this.size.width);
|
|
158
|
+
console.log(index);
|
|
159
|
+
return this.tiles.every(t => t.position !== index);
|
|
160
|
+
});
|
|
161
|
+
return emptyCell ?? null;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
const siblings = Grid.getOrtoSiblings(source, this.size);
|
|
165
|
+
const emptySibling = siblings.find(v => {
|
|
166
|
+
const index = Grid.getIndexFromVec(v, this.size.width);
|
|
167
|
+
return this.tiles.every(t => t.position !== index);
|
|
168
|
+
});
|
|
169
|
+
return emptySibling ?? null;
|
|
142
170
|
}
|
|
143
171
|
}
|
|
144
172
|
setTilePosition(tile, position) {
|
|
@@ -153,7 +181,7 @@ const MbSlidingPuzzle = class {
|
|
|
153
181
|
});
|
|
154
182
|
}
|
|
155
183
|
render() {
|
|
156
|
-
return index.h("div", { key: '
|
|
184
|
+
return index.h("div", { key: '52a3da12a2b29974e6c2683d8cfb46eb282d3424', class: "board", style: {
|
|
157
185
|
'--width': `${this.size.width}`,
|
|
158
186
|
'--height': `${this.size.height}`,
|
|
159
187
|
} }, this.tiles.map(tile => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-C8QmqTMd.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["mb-sliding-puzzle.cjs",[[513,"mb-sliding-puzzle",{"tiles":[1040],"size":[32],"checkAnswer":[64]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["mb-sliding-puzzle.cjs",[[513,"mb-sliding-puzzle",{"tiles":[1040],"freeMove":[4,"free-move"],"size":[32],"checkAnswer":[64]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
aspect-ratio: calc(var(--width, 1) / var(--height, 1));
|
|
6
6
|
border: 1px solid black;
|
|
7
7
|
position: relative;
|
|
8
|
-
container-type: size;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
.tile {
|
|
12
11
|
position: absolute;
|
|
13
|
-
width: calc(
|
|
14
|
-
height: calc(
|
|
12
|
+
width: calc(100% / var(--width, 1));
|
|
13
|
+
height: calc(100% / var(--height, 1));
|
|
15
14
|
padding: 0;
|
|
16
15
|
border: none;
|
|
17
16
|
transform: translate(calc(100% * var(--x)), calc(100% * var(--y)));
|
|
@@ -4,6 +4,7 @@ import { Grid } from "@mb-puzzle/grid";
|
|
|
4
4
|
export class MbSlidingPuzzle {
|
|
5
5
|
size = new Vec2(3, 3);
|
|
6
6
|
tiles = [];
|
|
7
|
+
freeMove = false;
|
|
7
8
|
async checkAnswer() {
|
|
8
9
|
return this.tiles.every(t => t.position === t.correctPosition);
|
|
9
10
|
}
|
|
@@ -17,13 +18,28 @@ export class MbSlidingPuzzle {
|
|
|
17
18
|
onTileClicked(id) {
|
|
18
19
|
const tile = this.getTileById(id);
|
|
19
20
|
const v = Grid.getVecFromIndex(tile.position, this.size.width);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
const target = this.getMoveTarget(v);
|
|
22
|
+
if (target) {
|
|
23
|
+
this.setTilePosition(tile, Grid.getIndexFromVec(target, this.size));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
getMoveTarget(source) {
|
|
27
|
+
if (this.freeMove) {
|
|
28
|
+
const cells = Grid.getAllCells(this.size);
|
|
29
|
+
const emptyCell = cells.find(c => {
|
|
30
|
+
const index = Grid.getIndexFromVec(c, this.size.width);
|
|
31
|
+
console.log(index);
|
|
32
|
+
return this.tiles.every(t => t.position !== index);
|
|
33
|
+
});
|
|
34
|
+
return emptyCell ?? null;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const siblings = Grid.getOrtoSiblings(source, this.size);
|
|
38
|
+
const emptySibling = siblings.find(v => {
|
|
39
|
+
const index = Grid.getIndexFromVec(v, this.size.width);
|
|
40
|
+
return this.tiles.every(t => t.position !== index);
|
|
41
|
+
});
|
|
42
|
+
return emptySibling ?? null;
|
|
27
43
|
}
|
|
28
44
|
}
|
|
29
45
|
setTilePosition(tile, position) {
|
|
@@ -38,7 +54,7 @@ export class MbSlidingPuzzle {
|
|
|
38
54
|
});
|
|
39
55
|
}
|
|
40
56
|
render() {
|
|
41
|
-
return h("div", { key: '
|
|
57
|
+
return h("div", { key: '52a3da12a2b29974e6c2683d8cfb46eb282d3424', class: "board", style: {
|
|
42
58
|
'--width': `${this.size.width}`,
|
|
43
59
|
'--height': `${this.size.height}`,
|
|
44
60
|
} }, this.tiles.map(tile => {
|
|
@@ -87,6 +103,26 @@ export class MbSlidingPuzzle {
|
|
|
87
103
|
"getter": false,
|
|
88
104
|
"setter": false,
|
|
89
105
|
"defaultValue": "[]"
|
|
106
|
+
},
|
|
107
|
+
"freeMove": {
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "boolean",
|
|
112
|
+
"resolved": "boolean",
|
|
113
|
+
"references": {}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": ""
|
|
120
|
+
},
|
|
121
|
+
"getter": false,
|
|
122
|
+
"setter": false,
|
|
123
|
+
"reflect": false,
|
|
124
|
+
"attribute": "free-move",
|
|
125
|
+
"defaultValue": "false"
|
|
90
126
|
}
|
|
91
127
|
};
|
|
92
128
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,e,i,n,s,r,o,l,h,f,c,u,a,p,d,v,m,w=Object.create,b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,y=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,j=t=>{throw TypeError(t)},S=(t,e)=>function(){return e||(0,t[$(t)[0]])((e={exports:{}}).exports,e),e.exports},E=(t,e,i)=>e.has(t)||j("Cannot "+i),M=(t,e,i)=>(E(t,e,"read from private field"),i?i.call(t):e.get(t)),k=(t,e,i)=>e.has(t)?j("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),x=(t,e,i)=>(E(t,e,"write to private field"),e.set(t,i),i),N=(t,e,i)=>(E(t,e,"access private method"),i),P=S({"node_modules/balanced-match/index.js"(t,e){function i(t,e,i){t instanceof RegExp&&(t=n(t,i)),e instanceof RegExp&&(e=n(e,i));var r=s(t,e,i);return r&&{start:r[0],end:r[1],pre:i.slice(0,r[0]),body:i.slice(r[0]+t.length,r[1]),post:i.slice(r[1]+e.length)}}function n(t,e){var i=e.match(t);return i?i[0]:null}function s(t,e,i){var n,s,r,o,l,h=i.indexOf(t),f=i.indexOf(e,h+1),c=h;if(h>=0&&f>0){if(t===e)return[h,f];for(n=[],r=i.length;c>=0&&!l;)c==h?(n.push(c),h=i.indexOf(t,c+1)):1==n.length?l=[n.pop(),f]:((s=n.pop())<r&&(r=s,o=f),f=i.indexOf(e,c+1)),c=h<f&&h>=0?h:f;n.length&&(l=[r,o])}return l}e.exports=i,i.range=s}}),W=S({"node_modules/brace-expansion/index.js"(t,e){var i=P();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),v(function(t){return t.split("\\\\").join(n).split("\\{").join(s).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(f)):[]};var n="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function h(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(n).join("\\").split(s).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function c(t){if(!t)return[""];var e=[],n=i("{","}",t);if(!n)return t.split(",");var s=n.body,r=n.post,o=n.pre.split(",");o[o.length-1]+="{"+s+"}";var l=c(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function u(t){return"{"+t+"}"}function a(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function v(t,e){var n=[],s=i("{","}",t);if(!s)return[t];var o=s.pre,l=s.post.length?v(s.post,!1):[""];if(/\$$/.test(s.pre))for(var f=0;f<l.length;f++)n.push(z=o+"{"+s.body+"}"+l[f]);else{var m,w,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),$=b||g,y=s.body.indexOf(",")>=0;if(!$&&!y)return s.post.match(/,(?!,).*\}/)?v(t=s.pre+"{"+s.body+r+s.post):[t];if($)m=s.body.split(/\.\./);else if(1===(m=c(s.body)).length&&1===(m=v(m[0],!1).map(u)).length)return l.map((function(t){return s.pre+m[0]+t}));if($){var O=h(m[0]),j=h(m[1]),S=Math.max(m[0].length,m[1].length),E=3==m.length?Math.abs(h(m[2])):1,M=p;j<O&&(E*=-1,M=d);var k=m.some(a);w=[];for(var x=O;M(x,j);x+=E){var N;if(g)"\\"===(N=String.fromCharCode(x))&&(N="");else if(N=x+"",k){var P=S-N.length;if(P>0){var W=Array(P+1).join("0");N=x<0?"-"+W+N.slice(1):W+N}}w.push(N)}}else{w=[];for(var R=0;R<m.length;R++)w.push.apply(w,v(m[R],!1))}for(R=0;R<w.length;R++)for(f=0;f<l.length;f++){var z=o+w[R]+l[f];(!e||$||z)&&n.push(z)}}return n}}}),R=(t,e)=>{var i;Object.entries(null!=(i=e.i.t)?i:{}).map((([i,[n]])=>{if(31&n||32&n){const n=t[i],s=function(t,e){for(;t;){const i=Object.getOwnPropertyDescriptor(t,e);if(null==i?void 0:i.get)return i;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),i)||Object.getOwnPropertyDescriptor(t,i);s&&Object.defineProperty(t,i,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[i]=e.o.has(i)?e.o.get(i):n}}))},z=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},A=(t,e)=>e in t,C=(t,e)=>(0,console.error)(t,e),L=new Map,_="undefined"!=typeof window?window:{},T=_.HTMLElement||class{},D={l:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,i,n)=>t.addEventListener(e,i,n),rel:(t,e,i,n)=>t.removeEventListener(e,i,n),ce:(t,e)=>new CustomEvent(t,e)},U=(()=>{try{return!!_.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),G=!!U&&(()=>!!_.document&&Object.getOwnPropertyDescriptor(_.document.adoptedStyleSheets,"length").writable)(),I=!1,Z=[],F=[],H=(t,e)=>i=>{t.push(i),I||(I=!0,e&&4&D.l?B(q):D.raf(q))},V=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){C(t)}t.length=0},q=()=>{V(Z),V(F),(I=Z.length>0)&&D.raf(q)},B=t=>Promise.resolve(void 0).then(t),J=H(F,!0),Y=t=>{const e=new URL(t,D.h);return e.origin!==_.location.origin?e.href:e.pathname},K=t=>D.h=t,Q=t=>"object"==(t=typeof t)||"function"===t,X=((t,e,i)=>(i=null!=t?w(y(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of $(e))O.call(t,i)||undefined===i||b(t,i,{get:()=>e[i],enumerable:!(n=g(e,i))||n.enumerable});return t})(b(i,"default",{value:t,enumerable:!0}),t)))(W()),tt=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},et={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},it=t=>t.replace(/[[\]\\-]/g,"\\$&"),nt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),st=t=>t.join(""),rt=(t,e)=>{const i=e;if("["!==t.charAt(i))throw Error("not in a brace expression");const n=[],s=[];let r=i+1,o=!1,l=!1,h=!1,f=!1,c=i,u="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==i+1){if("]"===e&&o&&!h){c=r+1;break}if(o=!0,"\\"!==e||h){if("["===e&&!h)for(const[e,[o,h,f]]of Object.entries(et))if(t.startsWith(e,r)){if(u)return["$.",!1,t.length-i,!0];r+=e.length,f?s.push(o):n.push(o),l=l||h;continue t}h=!1,u?(e>u?n.push(it(u)+"-"+it(e)):e===u&&n.push(it(e)),u="",r++):t.startsWith("-]",r+1)?(n.push(it(e+"-")),r+=2):t.startsWith("-",r+1)?(u=e,r+=2):(n.push(it(e)),r++)}else h=!0,r++}else f=!0,r++}if(c<r)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,t.length-i,!0];if(0===s.length&&1===n.length&&/^\\?.$/.test(n[0])&&!f){const t=2===n[0].length?n[0].slice(-1):n[0];return[nt(t),!1,c-i,!1]}const a="["+(f?"^":"")+st(n)+"]",p="["+(f?"":"^")+st(s)+"]";return[n.length&&s.length?"("+a+"|"+p+")":n.length?a:p,l,c-i,!0]},ot=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),lt=new Set(["!","?","+","*","@"]),ht=t=>lt.has(t),ft="(?!\\.)",ct=new Set(["[","."]),ut=new Set(["..","."]),at=new Set("().*{}+?[]^$\\!"),pt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),dt="[^/]",vt=dt+"*?",mt=dt+"+?",wt=class w{constructor(a,p,d={}){k(this,u),((t,e,i)=>{((t,e,i)=>{e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,e+"",i)})(this,"type"),k(this,t),k(this,e),k(this,i,!1),k(this,n,[]),k(this,s),k(this,r),k(this,o),k(this,l,!1),k(this,h),k(this,f),k(this,c,!1),this.type=a,a&&x(this,e,!0),x(this,s,p),x(this,t,M(this,s)?M(M(this,s),t):this),x(this,h,M(this,t)===this?d:M(M(this,t),h)),x(this,o,M(this,t)===this?[]:M(M(this,t),o)),"!"!==a||M(M(this,t),l)||M(this,o).push(this),x(this,r,M(this,s)?M(M(this,s),n).length:0)}get hasMagic(){if(void 0!==M(this,e))return M(this,e);for(const t of M(this,n))if("string"!=typeof t&&(t.type||t.hasMagic))return x(this,e,!0);return M(this,e)}toString(){return void 0!==M(this,f)?M(this,f):x(this,f,this.type?this.type+"("+M(this,n).map((t=>t+"")).join("|")+")":M(this,n).map((t=>t+"")).join(""))}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof w&&M(e,s)===this))throw Error("invalid part: "+e);M(this,n).push(e)}}toJSON(){var e;const i=null===this.type?M(this,n).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...M(this,n).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&i.unshift([]),this.isEnd()&&(this===M(this,t)||M(M(this,t),l)&&"!"===(null==(e=M(this,s))?void 0:e.type))&&i.push({}),i}isStart(){var e;if(M(this,t)===this)return!0;if(!(null==(e=M(this,s))?void 0:e.isStart()))return!1;if(0===M(this,r))return!0;const i=M(this,s);for(let t=0;t<M(this,r);t++){const e=M(i,n)[t];if(!(e instanceof w&&"!"===e.type))return!1}return!0}isEnd(){var e,i,o;if(M(this,t)===this)return!0;if("!"===(null==(e=M(this,s))?void 0:e.type))return!0;if(!(null==(i=M(this,s))?void 0:i.isEnd()))return!1;if(!this.type)return null==(o=M(this,s))?void 0:o.isEnd();const l=M(this,s)?M(M(this,s),n).length:0;return M(this,r)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(t){const e=new w(this.type,t);for(const t of M(this,n))e.copyIn(t);return e}static fromGlob(t,e={}){var i;const n=new w(null,void 0,e);return N(i=w,p,d).call(i,t,n,0,e),n}toMMPattern(){if(this!==M(this,t))return M(this,t).toMMPattern();const i=""+this,[n,s,r,o]=this.toRegExpSource();if(!(r||M(this,e)||M(this,h).nocase&&!M(this,h).nocaseMagicOnly&&i.toUpperCase()!==i.toLowerCase()))return s;const l=(M(this,h).nocase?"i":"")+(o?"u":"");return Object.assign(RegExp(`^${n}$`,l),{_src:n,_glob:i})}get options(){return M(this,h)}toRegExpSource(r){var o;const f=null!=r?r:!!M(this,h).dot;if(M(this,t)===this&&N(this,u,a).call(this),!this.type){const h=this.isStart()&&this.isEnd(),c=M(this,n).map((t=>{var n;const[s,o,l,f]="string"==typeof t?N(n=w,p,m).call(n,t,M(this,e),h):t.toRegExpSource(r);return x(this,e,M(this,e)||l),x(this,i,M(this,i)||f),s})).join("");let u="";if(this.isStart()&&"string"==typeof M(this,n)[0]&&(1!==M(this,n).length||!ut.has(M(this,n)[0]))){const t=ct,e=f&&t.has(c.charAt(0))||c.startsWith("\\.")&&t.has(c.charAt(2))||c.startsWith("\\.\\.")&&t.has(c.charAt(4)),i=!f&&!r&&t.has(c.charAt(0));u=e?"(?!(?:^|/)\\.\\.?(?:$|/))":i?ft:""}let a="";return this.isEnd()&&M(M(this,t),l)&&"!"===(null==(o=M(this,s))?void 0:o.type)&&(a="(?:$|\\/)"),[u+c+a,ot(c),x(this,e,!!M(this,e)),M(this,i)]}const d="*"===this.type||"+"===this.type,b="!"===this.type?"(?:(?!(?:":"(?:";let g=N(this,u,v).call(this,f);if(this.isStart()&&this.isEnd()&&!g&&"!"!==this.type){const t=""+this;return x(this,n,[t]),this.type=null,x(this,e,void 0),[t,ot(""+this),!1,!1]}let $=!d||r||f?"":N(this,u,v).call(this,!0);$===g&&($=""),$&&(g=`(?:${g})(?:${$})*?`);let y="";return y="!"===this.type&&M(this,c)?(this.isStart()&&!f?ft:"")+mt:b+g+("!"===this.type?"))"+(!this.isStart()||f||r?"":ft)+vt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&$?")":"*"===this.type&&$?")?":")"+this.type),[y,ot(g),x(this,e,!!M(this,e)),M(this,i)]}};t=new WeakMap,e=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,h=new WeakMap,f=new WeakMap,c=new WeakMap,u=new WeakSet,a=function(){if(this!==M(this,t))throw Error("should only call on root");if(M(this,l))return this;let e;for(x(this,l,!0);e=M(this,o).pop();){if("!"!==e.type)continue;let t=e,i=M(t,s);for(;i;){for(let s=M(t,r)+1;!i.type&&s<M(i,n).length;s++)for(const t of M(e,n)){if("string"==typeof t)throw Error("string part in extglob AST??");t.copyIn(M(i,n)[s])}t=i,i=M(t,s)}}return this},p=new WeakSet,d=function(t,i,s,r){var o,l;let h=!1,f=!1,u=-1,a=!1;if(null===i.type){let e=s,n="";for(;e<t.length;){const s=t.charAt(e++);if(h||"\\"===s)h=!h,n+=s;else if(f)e===u+1?"^"!==s&&"!"!==s||(a=!0):"]"!==s||e===u+2&&a||(f=!1),n+=s;else if("["!==s)if(r.noext||!ht(s)||"("!==t.charAt(e))n+=s;else{i.push(n),n="";const l=new wt(s,i);e=N(o=wt,p,d).call(o,t,l,e,r),i.push(l)}else f=!0,u=e,a=!1,n+=s}return i.push(n),e}let v=s+1,m=new wt(null,i);const w=[];let b="";for(;v<t.length;){const e=t.charAt(v++);if(h||"\\"===e)h=!h,b+=e;else if(f)v===u+1?"^"!==e&&"!"!==e||(a=!0):"]"!==e||v===u+2&&a||(f=!1),b+=e;else if("["!==e)if(ht(e)&&"("===t.charAt(v)){m.push(b),b="";const i=new wt(e,m);m.push(i),v=N(l=wt,p,d).call(l,t,i,v,r)}else if("|"!==e){if(")"===e)return""===b&&0===M(i,n).length&&x(i,c,!0),m.push(b),b="",i.push(...w,m),v;b+=e}else m.push(b),b="",w.push(m),m=new wt(null,i);else f=!0,u=v,a=!1,b+=e}return i.type=null,x(i,e,void 0),x(i,n,[t.substring(s-1)]),v},v=function(t){return M(this,n).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,s,r,o]=e.toRegExpSource(t);return x(this,i,M(this,i)||o),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},m=function(t,e,i=!1){let n=!1,s="",r=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(n)n=!1,s+=(at.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[i,n,l,h]=rt(t,o);if(l){s+=i,r=r||n,o+=l-1,e=e||h;continue}}"*"!==l?"?"!==l?s+=pt(l):(s+=dt,e=!0):(s+=i&&"*"===t?mt:vt,e=!0)}else o===t.length-1?s+="\\\\":n=!0}return[s,ot(t),!!e,r]},k(wt,p);var bt=wt,gt=(t,e,i={})=>(tt(e),!(!i.nocomment&&"#"===e.charAt(0))&&new Ht(e,i).match(t)),$t=/^\*+([^+@!?\*\[\(]*)$/,yt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Ot=t=>e=>e.endsWith(t),jt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),St=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Et=/^\*+\.\*+$/,Mt=t=>!t.startsWith(".")&&t.includes("."),kt=t=>"."!==t&&".."!==t&&t.includes("."),xt=/^\.\*+$/,Nt=t=>"."!==t&&".."!==t&&t.startsWith("."),Pt=/^\*+$/,Wt=t=>0!==t.length&&!t.startsWith("."),Rt=t=>0!==t.length&&"."!==t&&".."!==t,zt=/^\?+([^+@!?\*\[\(]*)?$/,At=([t,e=""])=>{const i=Tt([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i},Ct=([t,e=""])=>{const i=Dt([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i},Lt=([t,e=""])=>{const i=Dt([t]);return e?t=>i(t)&&t.endsWith(e):i},_t=([t,e=""])=>{const i=Tt([t]);return e?t=>i(t)&&t.endsWith(e):i},Tt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Dt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Ut="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";gt.sep="win32"===Ut?"\\":"/";var Gt=Symbol("globstar **");gt.GLOBSTAR=Gt,gt.filter=(t,e={})=>i=>gt(i,t,e);var It=(t,e={})=>Object.assign({},t,e);gt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return gt;const e=gt;return Object.assign(((i,n,s={})=>e(i,n,It(t,s))),{Minimatch:class extends e.Minimatch{constructor(e,i={}){super(e,It(t,i))}static defaults(i){return e.defaults(It(t,i)).Minimatch}},AST:class extends e.AST{constructor(e,i,n={}){super(e,i,It(t,n))}static fromGlob(i,n={}){return e.AST.fromGlob(i,It(t,n))}},unescape:(i,n={})=>e.unescape(i,It(t,n)),escape:(i,n={})=>e.escape(i,It(t,n)),filter:(i,n={})=>e.filter(i,It(t,n)),defaults:i=>e.defaults(It(t,i)),makeRe:(i,n={})=>e.makeRe(i,It(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,It(t,n)),match:(i,n,s={})=>e.match(i,n,It(t,s)),sep:e.sep,GLOBSTAR:Gt})};var Zt=(t,e={})=>(tt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,X.default)(t));gt.braceExpand=Zt,gt.makeRe=(t,e={})=>new Ht(t,e).makeRe(),gt.match=(t,e,i={})=>{const n=new Ht(e,i);return t=t.filter((t=>n.match(t))),n.options.nonull&&!t.length&&t.push(e),t};var Ft=/[?*]|[+@!]\(.*?\)|\[|\]/,Ht=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){tt(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Ut,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const i=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Ft.test(t[2])||Ft.test(t[3])),i=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(i)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,n),this.set=n.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let i=0;i<t[e].length;i++)"**"===t[e][i]&&(t[e][i]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let i=e;for(;"**"===t[i+1];)i++;i!==e&&t.splice(e,i-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const i=t[t.length-1];return"**"===e&&"**"===i?t:".."===e&&i&&".."!==i&&"."!==i&&"**"!==i?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const n=t[i];1===i&&""===n&&""===t[0]||"."!==n&&""!==n||(e=!0,t.splice(i,1),i--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let i=0;for(;-1!==(i=t.indexOf("..",i+1));){const n=t[i-1];n&&"."!==n&&".."!==n&&"**"!==n&&(e=!0,t.splice(i-1,2),i-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let i of t){let n=-1;for(;-1!==(n=i.indexOf("**",n+1));){let s=n;for(;"**"===i[s+1];)s++;s>n&&i.splice(n+1,s-n);const r=i[n+2],o=i[n+3];if(".."!==i[n+1])continue;if(!r||"."===r||".."===r||!o||"."===o||".."===o)continue;e=!0,i.splice(n,1);const l=i.slice(0);l[n]="**",t.push(l),n--}if(!this.preserveMultipleSlashes){for(let t=1;t<i.length-1;t++){const n=i[t];1===t&&""===n&&""===i[0]||"."!==n&&""!==n||(e=!0,i.splice(t,1),t--)}"."!==i[0]||2!==i.length||"."!==i[1]&&""!==i[1]||(e=!0,i.pop())}let s=0;for(;-1!==(s=i.indexOf("..",s+1));){const t=i[s-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,i.splice(s-1,2,...1===s&&"**"===i[s+1]?["."]:[]),0===i.length&&i.push(""),s-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){const n=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);n&&(t[e]=n,t[i]=[])}return t.filter((t=>t.length))}partsMatch(t,e,i=!1){let n=0,s=0,r=[],o="";for(;n<t.length&&s<e.length;)if(t[n]===e[s])r.push("b"===o?e[s]:t[n]),n++,s++;else if(i&&"**"===t[n]&&e[s]===t[n+1])r.push(t[n]),n++;else if(i&&"**"===e[s]&&t[n]===e[s+1])r.push(e[s]),s++;else if("*"!==t[n]||!e[s]||!this.options.dot&&e[s].startsWith(".")||"**"===e[s]){if("*"!==e[s]||!t[n]||!this.options.dot&&t[n].startsWith(".")||"**"===t[n])return!1;if("a"===o)return!1;o="b",r.push(e[s]),n++,s++}else{if("b"===o)return!1;o="a",r.push(t[n]),n++,s++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,i=0;for(let n=0;n<t.length&&"!"===t.charAt(n);n++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){const n=this.options;if(this.isWindows){const i="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),n=!i&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),s="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=n?3:i?0:void 0,o=!s&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:s?0:void 0;if("number"==typeof r&&"number"==typeof o){const[i,n]=[t[r],e[o]];i.toLowerCase()===n.toLowerCase()&&(e[o]=i,o>r?e=e.slice(o):r>o&&(t=t.slice(r)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,o=0,l=t.length,h=e.length;r<l&&o<h;r++,o++){this.debug("matchOne loop");var f=e[o],c=t[r];if(this.debug(e,f,c),!1===f)return!1;if(f===Gt){this.debug("GLOBSTAR",[e,f,c]);var u=r,a=o+1;if(a===h){for(this.debug("** at the end");r<l;r++)if("."===t[r]||".."===t[r]||!n.dot&&"."===t[r].charAt(0))return!1;return!0}for(;u<l;){var p=t[u];if(this.debug("\nglobstar while",t,u,e,a,p),this.matchOne(t.slice(u),e.slice(a),i))return this.debug("globstar found match!",u,l,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,u,e,a);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!i||(this.debug("\n>>> no match, partial?",t,u,e,a),u!==l))}let s;if("string"==typeof f?(s=c===f,this.debug("string match",f,c,s)):(s=f.test(c),this.debug("pattern match",f,c,s)),!s)return!1}if(r===l&&o===h)return!0;if(r===l)return i;if(o===h)return r===l-1&&""===t[r];throw Error("wtf?")}braceExpand(){return Zt(this.pattern,this.options)}parse(t){tt(t);const e=this.options;if("**"===t)return Gt;if(""===t)return"";let i,n=null;(i=t.match(Pt))?n=e.dot?Rt:Wt:(i=t.match($t))?n=(e.nocase?e.dot?St:jt:e.dot?Ot:yt)(i[1]):(i=t.match(zt))?n=(e.nocase?e.dot?Ct:At:e.dot?Lt:_t)(i):(i=t.match(Et))?n=e.dot?kt:Mt:(i=t.match(xt))&&(n=Nt);const s=bt.fromGlob(t,this.options).toMMPattern();return n&&"object"==typeof s&&Reflect.defineProperty(s,"test",{value:n}),s}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,i=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=new Set(e.nocase?["i"]:[]);let s=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))n.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Gt?Gt:t._src}));return e.forEach(((t,n)=>{const s=e[n+1],r=e[n-1];t===Gt&&r!==Gt&&(void 0===r?void 0!==s&&s!==Gt?e[n+1]="(?:\\/|"+i+"\\/)?"+s:e[n]=i:void 0===s?e[n-1]=r+"(?:\\/|"+i+")?":s!==Gt&&(e[n-1]=r+"(?:\\/|\\/"+i+"\\/)"+s,e[n+1]=Gt))})),e.filter((t=>t!==Gt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];s="^"+r+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=RegExp(s,[...n].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const n=this.slashSplit(t);this.debug(this.pattern,"split",n);const s=this.set;this.debug(this.pattern,"set",s);let r=n[n.length-1];if(!r)for(let t=n.length-2;!r&&t>=0;t--)r=n[t];for(let t=0;t<s.length;t++){const o=s[t];let l=n;if(i.matchBase&&1===o.length&&(l=[r]),this.matchOne(l,o,e))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(t){return gt.defaults(t).Minimatch}};gt.AST=bt,gt.Minimatch=Ht,gt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),gt.unescape=ot,((t,e)=>{for(var i in e)b(t,i,{get:e[i],enumerable:!0})})({},{err:()=>qt,map:()=>Bt,ok:()=>Vt,unwrap:()=>Yt,unwrapErr:()=>Kt});var Vt=t=>({isOk:!0,isErr:!1,value:t}),qt=t=>({isOk:!1,isErr:!0,value:t});function Bt(t,e){if(t.isOk){const i=e(t.value);return i instanceof Promise?i.then((t=>Vt(t))):Vt(i)}if(t.isErr)return qt(t.value);throw"should never get here"}var Jt,Yt=t=>{if(t.isOk)return t.value;throw t.value},Kt=t=>{if(t.isErr)return t.value;throw t.value};function Qt(){const t=this.attachShadow({mode:"open"});void 0===Jt&&(Jt=null),Jt&&(G?t.adoptedStyleSheets.push(Jt):t.adoptedStyleSheets=[...t.adoptedStyleSheets,Jt])}function Xt(t,e,i){let n,s=0,r=[];for(;s<t.length;s++){if(n=t[s],n["s-sr"]&&(!e||n["s-hn"]===e)&&(void 0===i||te(n)===i)&&(r.push(n),void 0!==i))return r;r=[...r,...Xt(n.childNodes,e,i)]}return r}var te=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;var ee=new WeakMap,ie=t=>"sc-"+t.u,ne=(t,e,...i)=>{let n=null,s=null,r=!1,o=!1;const l=[],h=e=>{for(let i=0;i<e.length;i++)n=e[i],Array.isArray(n)?h(n):null!=n&&"boolean"!=typeof n&&((r="function"!=typeof t&&!Q(n))&&(n+=""),r&&o?l[l.length-1].p+=n:l.push(r?se(null,n):n),o=r)};if(h(i),e){e.key&&(s=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=se(t,null);return f.v=e,l.length>0&&(f.m=l),f.$=s,f},se=(t,e)=>({l:0,O:t,p:e,j:null,m:null,v:null,$:null}),re={},oe=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};oe("::slotted"),oe(":host"),oe(":host-context");var le,he=t=>(null==t||Q(t),t),fe=(t,e,i,n,s,r)=>{if(i===n)return;let o=A(t,e),l=e.toLowerCase();if("class"===e){const e=t.classList,s=ue(i);let r=ue(n);e.remove(...s.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in i)n&&null!=n[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in n)i&&n[e]===i[e]||(e.includes("-")?t.style.setProperty(e,n[e]):t.style[e]=n[e])}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const l=Q(n);if(o||l&&null!==n)try{if(t.tagName.includes("-"))t[e]!==n&&(t[e]=n);else{const s=null==n?"":n;"list"===e?o=!1:null!=i&&t[e]==s||("function"==typeof t.__lookupSetter__(e)?t[e]=s:t.setAttribute(e,s))}}catch(t){}null==n||!1===n?!1===n&&""!==t.getAttribute(e)||t.removeAttribute(e):(!o||4&r||s)&&!l&&1===t.nodeType&&t.setAttribute(e,n=!0===n?"":n)}else if(e="-"===e[2]?e.slice(3):A(_,l)?l.slice(2):l[2]+e.slice(3),i||n){const s=e.endsWith(ae);e=e.replace(pe,""),i&&D.rel(t,e,i,s),n&&D.ael(t,e,n,s)}},ce=/\s/,ue=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ce):[]),ae="Capture",pe=RegExp(ae+"$"),de=(t,e,i)=>{const n=11===e.j.nodeType&&e.j.host?e.j.host:e.j,s=t&&t.v||{},r=e.v||{};for(const t of ve(Object.keys(s)))t in r||fe(n,t,s[t],void 0,i,e.l);for(const t of ve(Object.keys(r)))fe(n,t,s[t],r[t],i,e.l)};function ve(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var me=!1,we=(t,e,i)=>{const n=e.m[i];let s,r,o=0;if(null!==n.p)s=n.j=_.document.createTextNode(n.p);else{if(!_.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(s=n.j=_.document.createElement(n.O),de(null,n,me),n.m){const e="template"===n.O?s.content:s;for(o=0;o<n.m.length;++o)r=we(t,n,o),r&&e.appendChild(r)}}return s["s-hn"]=le,s},be=(t,e,i,n,s,r)=>{let o,l=t;for(l.shadowRoot&&l.tagName===le&&(l=l.shadowRoot),"template"===i.O&&(l=l.content);s<=r;++s)n[s]&&(o=we(null,i,s),o&&(n[s].j=o,Oe(l,o,e)))},ge=(t,e,i)=>{for(let n=e;n<=i;++n){const e=t[n];if(e){const t=e.j;t&&t.remove()}}},$e=(t,e,i=!1)=>t.O===e.O&&(i?(i&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),ye=(t,e,i=!1)=>{const n=e.j=t.j,s=t.m,r=e.m,o=e.p;null===o?(de(t,e,me),null!==s&&null!==r?((t,e,i,n,s=!1)=>{let r,o,l=0,h=0,f=0,c=0,u=e.length-1,a=e[0],p=e[u],d=n.length-1,v=n[0],m=n[d];const w="template"===i.O?t.content:t;for(;l<=u&&h<=d;)if(null==a)a=e[++l];else if(null==p)p=e[--u];else if(null==v)v=n[++h];else if(null==m)m=n[--d];else if($e(a,v,s))ye(a,v,s),a=e[++l],v=n[++h];else if($e(p,m,s))ye(p,m,s),p=e[--u],m=n[--d];else if($e(a,m,s))ye(a,m,s),Oe(w,a.j,p.j.nextSibling),a=e[++l],m=n[--d];else if($e(p,v,s))ye(p,v,s),Oe(w,p.j,a.j),p=e[--u],v=n[++h];else{for(f=-1,c=l;c<=u;++c)if(e[c]&&null!==e[c].$&&e[c].$===v.$){f=c;break}f>=0?(o=e[f],o.O!==v.O?r=we(e&&e[h],i,f):(ye(o,v,s),e[f]=void 0,r=o.j),v=n[++h]):(r=we(e&&e[h],i,h),v=n[++h]),r&&Oe(a.j.parentNode,r,a.j)}l>u?be(t,null==n[d+1]?null:n[d+1].j,i,n,h,d):h>d&&ge(e,l,u)})(n,s,e,r,i):null!==r?(null!==t.p&&(n.textContent=""),be(n,null,e,r,0,r.length-1)):!i&&null!==s&&ge(s,0,s.length-1)):t.p!==o&&(n.data=o)},Oe=(t,e,i)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,i);const{slotNode:n}=function(t,e){var i;if(!(e=e||(null==(i=t["s-ol"])?void 0:i.parentElement)))return{slotNode:null,slotName:""};const n=t["s-sn"]=te(t)||"";return{slotNode:Xt(function(t,e){if("__"+e in t){const i=t["__"+e];return"function"!=typeof i?i:i.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}(e,"childNodes"),e.tagName,n)[0],slotName:n}}(e);return n&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(n),e}return t.__insertBefore?t.__insertBefore(e,i):null==t?void 0:t.insertBefore(e,i)},je=(t,e,i=!1)=>{const n=t.$hostElement$,s=t.S||se(null,null),r=(t=>t&&t.O===re)(e)?e:ne(null,null,e);if(le=n.tagName,i&&r.v)for(const t of Object.keys(r.v))n.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.v[t]=n[t]);r.O=null,r.l|=4,t.S=r,r.j=s.j=n.shadowRoot||n,ye(s,r,i)},Se=(t,e)=>{if(e&&!t.M&&e["s-p"]){const i=e["s-p"].push(new Promise((n=>t.M=()=>{e["s-p"].splice(i-1,1),n()})))}},Ee=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);Se(t,t.k);const i=()=>Me(t,e);if(!e)return J(i);queueMicrotask((()=>{i()}))},Me=(t,e)=>{const i=t.$hostElement$,n=i;if(!n)throw Error(`Can't render component <${i.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 s;return s=ze(n,e?"componentWillLoad":"componentWillUpdate",void 0,i),s=ke(s,(()=>ze(n,"componentWillRender",void 0,i))),ke(s,(()=>Ne(t,n,e)))},ke=(t,e)=>xe(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),xe=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ne=async(t,e,i)=>{var n;const s=t.$hostElement$,r=s["s-rc"];i&&(t=>{const e=t.i,i=t.$hostElement$,n=e.l,s=((t,e)=>{var i,n,s;const r=ie(e),o=L.get(r);if(!_.document)return r;if(t=11===t.nodeType?t:_.document,o)if("string"==typeof o){let s,l=ee.get(t=t.head||t);if(l||ee.set(t,l=new Set),!l.has(r)){s=_.document.createElement("style"),s.innerHTML=o;const h=null!=(i=D.N)?i:function(){var t,e,i;return null!=(i=null==(e=null==(t=_.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?i:void 0}();if(null!=h&&s.setAttribute("nonce",h),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),i=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==i?void 0:i.parentNode)===t?i:null)}else if("host"in t)if(U){const e=new(null!=(n=t.defaultView)?n:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),G?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=o+e.innerHTML:t.prepend(s)}else t.append(s);1&e.l&&t.insertBefore(s,null),4&e.l&&(s.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(r)}}else{let e=ee.get(t);if(e||ee.set(t,e=new Set),!e.has(r)){const i=null!=(s=t.defaultView)?s:t.ownerDocument.defaultView;let n;if(o.constructor===i.CSSStyleSheet)n=o;else{n=new i.CSSStyleSheet;for(let t=0;t<o.cssRules.length;t++)n.insertRule(o.cssRules[t].cssText,t)}G?t.adoptedStyleSheets.push(n):t.adoptedStyleSheets=[...t.adoptedStyleSheets,n],e.add(r)}}return r})(i.shadowRoot?i.shadowRoot:i.getRootNode(),e);10&n&&(i["s-sc"]=s,i.classList.add(s+"-h"))})(t);Pe(t,e,s,i),r&&(r.map((t=>t())),s["s-rc"]=void 0);{const e=null!=(n=s["s-p"])?n:[],i=()=>We(t);0===e.length?i():(Promise.all(e).then(i),t.l|=4,e.length=0)}},Pe=(t,e,i,n)=>{try{e=e.render(),t.l&=-17,t.l|=2,je(t,e,n)}catch(e){C(e,t.$hostElement$)}return null},We=t=>{const e=t.$hostElement$,i=e,n=t.k;ze(i,"componentDidRender",void 0,e),64&t.l?ze(i,"componentDidUpdate",void 0,e):(t.l|=64,Ae(e),ze(i,"componentDidLoad",void 0,e),t.P(e),n||Re()),t.M&&(t.M(),t.M=void 0),512&t.l&&B((()=>Ee(t,!1))),t.l&=-517},Re=()=>{B((()=>(t=>{const e=D.ce("appload",{detail:{namespace:"sliding-puzzle"}});return t.dispatchEvent(e),e})(_)))},ze=(t,e,i,n)=>{if(t&&t[e])try{return t[e](i)}catch(t){C(t,n)}},Ae=t=>t.classList.add("hydrated"),Ce=(t,e,i)=>{const n=z(t);if(!n)return;const s=t,r=n.o.get(e),o=n.l,l=s;if(!((i=he(i))===r||Number.isNaN(r)&&Number.isNaN(i)||(n.o.set(e,i),2!=(18&o)))){if(l.componentShouldUpdate&&!1===l.componentShouldUpdate(i,r,e))return;Ee(n,!1)}},Le=(t,e)=>{var i;const n=t.prototype;return e.t&&Object.entries(null!=(i=e.t)?i:{}).map((([t,[i]])=>{if(31&i||32&i){const{get:s,set:r}=Object.getOwnPropertyDescriptor(n,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),Object.defineProperty(n,t,{get(){return s?s.apply(this):((t,e)=>z(this).o.get(e))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(n,t,{set(e){const n=z(this);if(n){if(r)return void 0===(32&i?this[t]:n.$hostElement$[t])&&n.o.get(t)&&(e=n.o.get(t)),r.call(this,he(e)),void Ce(this,t,e=32&i?this[t]:n.$hostElement$[t]);Ce(this,t,e)}}})}})),t},_e=(t,e)=>{const i={l:e[0],u:e[1]};i.t=e[2];const n=t.prototype.connectedCallback,s=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const i={l:0,$hostElement$:t,i:e,o:new Map,W:new Map};i.R=new Promise((t=>i.P=t)),t["s-p"]=[],t["s-rc"]=[];const n=i;t.__stencil__getHostRef=()=>n,512&e.l&&R(t,i)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!z(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&D.l)){const e=z(t);if(!e)return;const i=e.i,n=()=>{};if(1&e.l)(null==e?void 0:e.A)||(null==e?void 0:e.R)&&e.R.then((()=>{}));else{e.l|=1;{let i=t;for(;i=i.parentNode||i.host;)if(i["s-p"]){Se(e,e.k=i);break}}i.t&&Object.entries(i.t).map((([e,[i]])=>{if(31&i&&e in t&&t[e]!==Object.prototype[e]){const i=t[e];delete t[e],t[e]=i}})),(async(t,e,i)=>{let n;if(!(32&e.l)&&(e.l|=32,n=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),n&&n.style)){let t;"string"==typeof n.style&&(t=n.style);const e=ie(i);if(!L.has(e)){const n=()=>{};((t,e,i)=>{let n=L.get(t);U&&i?(n=n||new CSSStyleSheet,"string"==typeof n?n=e:n.replaceSync(e)):n=e,L.set(t,n)})(e,t,!!(1&i.l)),n()}}const s=e.k,r=()=>Ee(e,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(t,e,i)}n()}})(this),n&&n.call(this)},disconnectedCallback(){(async t=>{ee.has(t)&&ee.delete(t),t.shadowRoot&&ee.has(t.shadowRoot)&&ee.delete(t.shadowRoot)})(this),s&&s.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${i.u}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Qt.call(this,i)}}),t.is=i.u,Le(t,i)},Te=t=>D.N=t,De=t=>Object.assign(D,t);function Ue(t,e){je({$hostElement$:e},t)}function Ge(t){return t}export{T as H,Y as getAssetPath,ne as h,_e as p,Ue as render,K as setAssetPath,Te as setNonce,De as setPlatformOptions,Ge as t}
|
|
1
|
+
var t,e,i,n,s,r,o,l,h,f,c,u,a,p,d,v,b,m=Object.create,w=Object.defineProperty,g=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,y=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,j=t=>{throw TypeError(t)},S=(t,e)=>function(){return e||(0,t[$(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e,i)=>e.has(t)||j("Cannot "+i),E=(t,e,i)=>(M(t,e,"read from private field"),i?i.call(t):e.get(t)),k=(t,e,i)=>e.has(t)?j("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),x=(t,e,i)=>(M(t,e,"write to private field"),e.set(t,i),i),N=(t,e,i)=>(M(t,e,"access private method"),i),P=S({"node_modules/balanced-match/index.js"(t,e){function i(t,e,i){t instanceof RegExp&&(t=n(t,i)),e instanceof RegExp&&(e=n(e,i));var r=s(t,e,i);return r&&{start:r[0],end:r[1],pre:i.slice(0,r[0]),body:i.slice(r[0]+t.length,r[1]),post:i.slice(r[1]+e.length)}}function n(t,e){var i=e.match(t);return i?i[0]:null}function s(t,e,i){var n,s,r,o,l,h=i.indexOf(t),f=i.indexOf(e,h+1),c=h;if(h>=0&&f>0){if(t===e)return[h,f];for(n=[],r=i.length;c>=0&&!l;)c==h?(n.push(c),h=i.indexOf(t,c+1)):1==n.length?l=[n.pop(),f]:((s=n.pop())<r&&(r=s,o=f),f=i.indexOf(e,c+1)),c=h<f&&h>=0?h:f;n.length&&(l=[r,o])}return l}e.exports=i,i.range=s}}),W=S({"node_modules/brace-expansion/index.js"(t,e){var i=P();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),v(function(t){return t.split("\\\\").join(n).split("\\{").join(s).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(f)):[]};var n="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function h(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(n).join("\\").split(s).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function c(t){if(!t)return[""];var e=[],n=i("{","}",t);if(!n)return t.split(",");var s=n.body,r=n.post,o=n.pre.split(",");o[o.length-1]+="{"+s+"}";var l=c(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function u(t){return"{"+t+"}"}function a(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function v(t,e){var n=[],s=i("{","}",t);if(!s)return[t];var o=s.pre,l=s.post.length?v(s.post,!1):[""];if(/\$$/.test(s.pre))for(var f=0;f<l.length;f++)n.push(z=o+"{"+s.body+"}"+l[f]);else{var b,m,w=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),$=w||g,y=s.body.indexOf(",")>=0;if(!$&&!y)return s.post.match(/,(?!,).*\}/)?v(t=s.pre+"{"+s.body+r+s.post):[t];if($)b=s.body.split(/\.\./);else if(1===(b=c(s.body)).length&&1===(b=v(b[0],!1).map(u)).length)return l.map((function(t){return s.pre+b[0]+t}));if($){var O=h(b[0]),j=h(b[1]),S=Math.max(b[0].length,b[1].length),M=3==b.length?Math.abs(h(b[2])):1,E=p;j<O&&(M*=-1,E=d);var k=b.some(a);m=[];for(var x=O;E(x,j);x+=M){var N;if(g)"\\"===(N=String.fromCharCode(x))&&(N="");else if(N=x+"",k){var P=S-N.length;if(P>0){var W=Array(P+1).join("0");N=x<0?"-"+W+N.slice(1):W+N}}m.push(N)}}else{m=[];for(var R=0;R<b.length;R++)m.push.apply(m,v(b[R],!1))}for(R=0;R<m.length;R++)for(f=0;f<l.length;f++){var z=o+m[R]+l[f];(!e||$||z)&&n.push(z)}}return n}}}),R=(t,e)=>{var i;Object.entries(null!=(i=e.i.t)?i:{}).map((([i,[n]])=>{if(31&n||32&n){const n=t[i],s=function(t,e){for(;t;){const i=Object.getOwnPropertyDescriptor(t,e);if(null==i?void 0:i.get)return i;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),i)||Object.getOwnPropertyDescriptor(t,i);s&&Object.defineProperty(t,i,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[i]=e.o.has(i)?e.o.get(i):n}}))},z=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},A=(t,e)=>e in t,C=(t,e)=>(0,console.error)(t,e),L=new Map,_="undefined"!=typeof window?window:{},T=_.HTMLElement||class{},D={l:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,i,n)=>t.addEventListener(e,i,n),rel:(t,e,i,n)=>t.removeEventListener(e,i,n),ce:(t,e)=>new CustomEvent(t,e)},U=(()=>{try{return!!_.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),G=!!U&&(()=>!!_.document&&Object.getOwnPropertyDescriptor(_.document.adoptedStyleSheets,"length").writable)(),I=!1,Z=[],F=[],H=(t,e)=>i=>{t.push(i),I||(I=!0,e&&4&D.l?B(q):D.raf(q))},V=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){C(t)}t.length=0},q=()=>{V(Z),V(F),(I=Z.length>0)&&D.raf(q)},B=t=>Promise.resolve(void 0).then(t),J=H(F,!0),Y=t=>{const e=new URL(t,D.h);return e.origin!==_.location.origin?e.href:e.pathname},K=t=>D.h=t,Q=t=>"object"==(t=typeof t)||"function"===t,X=((t,e,i)=>(i=null!=t?m(y(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of $(e))O.call(t,i)||undefined===i||w(t,i,{get:()=>e[i],enumerable:!(n=g(e,i))||n.enumerable});return t})(w(i,"default",{value:t,enumerable:!0}),t)))(W()),tt=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},et={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},it=t=>t.replace(/[[\]\\-]/g,"\\$&"),nt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),st=t=>t.join(""),rt=(t,e)=>{const i=e;if("["!==t.charAt(i))throw Error("not in a brace expression");const n=[],s=[];let r=i+1,o=!1,l=!1,h=!1,f=!1,c=i,u="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==i+1){if("]"===e&&o&&!h){c=r+1;break}if(o=!0,"\\"!==e||h){if("["===e&&!h)for(const[e,[o,h,f]]of Object.entries(et))if(t.startsWith(e,r)){if(u)return["$.",!1,t.length-i,!0];r+=e.length,f?s.push(o):n.push(o),l=l||h;continue t}h=!1,u?(e>u?n.push(it(u)+"-"+it(e)):e===u&&n.push(it(e)),u="",r++):t.startsWith("-]",r+1)?(n.push(it(e+"-")),r+=2):t.startsWith("-",r+1)?(u=e,r+=2):(n.push(it(e)),r++)}else h=!0,r++}else f=!0,r++}if(c<r)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,t.length-i,!0];if(0===s.length&&1===n.length&&/^\\?.$/.test(n[0])&&!f){const t=2===n[0].length?n[0].slice(-1):n[0];return[nt(t),!1,c-i,!1]}const a="["+(f?"^":"")+st(n)+"]",p="["+(f?"":"^")+st(s)+"]";return[n.length&&s.length?"("+a+"|"+p+")":n.length?a:p,l,c-i,!0]},ot=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),lt=new Set(["!","?","+","*","@"]),ht=t=>lt.has(t),ft="(?!\\.)",ct=new Set(["[","."]),ut=new Set(["..","."]),at=new Set("().*{}+?[]^$\\!"),pt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),dt="[^/]",vt=dt+"*?",bt=dt+"+?",mt=class m{constructor(a,p,d={}){k(this,u),((t,e,i)=>{((t,e,i)=>{e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,e+"",i)})(this,"type"),k(this,t),k(this,e),k(this,i,!1),k(this,n,[]),k(this,s),k(this,r),k(this,o),k(this,l,!1),k(this,h),k(this,f),k(this,c,!1),this.type=a,a&&x(this,e,!0),x(this,s,p),x(this,t,E(this,s)?E(E(this,s),t):this),x(this,h,E(this,t)===this?d:E(E(this,t),h)),x(this,o,E(this,t)===this?[]:E(E(this,t),o)),"!"!==a||E(E(this,t),l)||E(this,o).push(this),x(this,r,E(this,s)?E(E(this,s),n).length:0)}get hasMagic(){if(void 0!==E(this,e))return E(this,e);for(const t of E(this,n))if("string"!=typeof t&&(t.type||t.hasMagic))return x(this,e,!0);return E(this,e)}toString(){return void 0!==E(this,f)?E(this,f):x(this,f,this.type?this.type+"("+E(this,n).map((t=>t+"")).join("|")+")":E(this,n).map((t=>t+"")).join(""))}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof m&&E(e,s)===this))throw Error("invalid part: "+e);E(this,n).push(e)}}toJSON(){var e;const i=null===this.type?E(this,n).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...E(this,n).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&i.unshift([]),this.isEnd()&&(this===E(this,t)||E(E(this,t),l)&&"!"===(null==(e=E(this,s))?void 0:e.type))&&i.push({}),i}isStart(){var e;if(E(this,t)===this)return!0;if(!(null==(e=E(this,s))?void 0:e.isStart()))return!1;if(0===E(this,r))return!0;const i=E(this,s);for(let t=0;t<E(this,r);t++){const e=E(i,n)[t];if(!(e instanceof m&&"!"===e.type))return!1}return!0}isEnd(){var e,i,o;if(E(this,t)===this)return!0;if("!"===(null==(e=E(this,s))?void 0:e.type))return!0;if(!(null==(i=E(this,s))?void 0:i.isEnd()))return!1;if(!this.type)return null==(o=E(this,s))?void 0:o.isEnd();const l=E(this,s)?E(E(this,s),n).length:0;return E(this,r)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(t){const e=new m(this.type,t);for(const t of E(this,n))e.copyIn(t);return e}static fromGlob(t,e={}){var i;const n=new m(null,void 0,e);return N(i=m,p,d).call(i,t,n,0,e),n}toMMPattern(){if(this!==E(this,t))return E(this,t).toMMPattern();const i=""+this,[n,s,r,o]=this.toRegExpSource();if(!(r||E(this,e)||E(this,h).nocase&&!E(this,h).nocaseMagicOnly&&i.toUpperCase()!==i.toLowerCase()))return s;const l=(E(this,h).nocase?"i":"")+(o?"u":"");return Object.assign(RegExp(`^${n}$`,l),{_src:n,_glob:i})}get options(){return E(this,h)}toRegExpSource(r){var o;const f=null!=r?r:!!E(this,h).dot;if(E(this,t)===this&&N(this,u,a).call(this),!this.type){const h=this.isStart()&&this.isEnd(),c=E(this,n).map((t=>{var n;const[s,o,l,f]="string"==typeof t?N(n=m,p,b).call(n,t,E(this,e),h):t.toRegExpSource(r);return x(this,e,E(this,e)||l),x(this,i,E(this,i)||f),s})).join("");let u="";if(this.isStart()&&"string"==typeof E(this,n)[0]&&(1!==E(this,n).length||!ut.has(E(this,n)[0]))){const t=ct,e=f&&t.has(c.charAt(0))||c.startsWith("\\.")&&t.has(c.charAt(2))||c.startsWith("\\.\\.")&&t.has(c.charAt(4)),i=!f&&!r&&t.has(c.charAt(0));u=e?"(?!(?:^|/)\\.\\.?(?:$|/))":i?ft:""}let a="";return this.isEnd()&&E(E(this,t),l)&&"!"===(null==(o=E(this,s))?void 0:o.type)&&(a="(?:$|\\/)"),[u+c+a,ot(c),x(this,e,!!E(this,e)),E(this,i)]}const d="*"===this.type||"+"===this.type,w="!"===this.type?"(?:(?!(?:":"(?:";let g=N(this,u,v).call(this,f);if(this.isStart()&&this.isEnd()&&!g&&"!"!==this.type){const t=""+this;return x(this,n,[t]),this.type=null,x(this,e,void 0),[t,ot(""+this),!1,!1]}let $=!d||r||f?"":N(this,u,v).call(this,!0);$===g&&($=""),$&&(g=`(?:${g})(?:${$})*?`);let y="";return y="!"===this.type&&E(this,c)?(this.isStart()&&!f?ft:"")+bt:w+g+("!"===this.type?"))"+(!this.isStart()||f||r?"":ft)+vt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&$?")":"*"===this.type&&$?")?":")"+this.type),[y,ot(g),x(this,e,!!E(this,e)),E(this,i)]}};t=new WeakMap,e=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,h=new WeakMap,f=new WeakMap,c=new WeakMap,u=new WeakSet,a=function(){if(this!==E(this,t))throw Error("should only call on root");if(E(this,l))return this;let e;for(x(this,l,!0);e=E(this,o).pop();){if("!"!==e.type)continue;let t=e,i=E(t,s);for(;i;){for(let s=E(t,r)+1;!i.type&&s<E(i,n).length;s++)for(const t of E(e,n)){if("string"==typeof t)throw Error("string part in extglob AST??");t.copyIn(E(i,n)[s])}t=i,i=E(t,s)}}return this},p=new WeakSet,d=function(t,i,s,r){var o,l;let h=!1,f=!1,u=-1,a=!1;if(null===i.type){let e=s,n="";for(;e<t.length;){const s=t.charAt(e++);if(h||"\\"===s)h=!h,n+=s;else if(f)e===u+1?"^"!==s&&"!"!==s||(a=!0):"]"!==s||e===u+2&&a||(f=!1),n+=s;else if("["!==s)if(r.noext||!ht(s)||"("!==t.charAt(e))n+=s;else{i.push(n),n="";const l=new mt(s,i);e=N(o=mt,p,d).call(o,t,l,e,r),i.push(l)}else f=!0,u=e,a=!1,n+=s}return i.push(n),e}let v=s+1,b=new mt(null,i);const m=[];let w="";for(;v<t.length;){const e=t.charAt(v++);if(h||"\\"===e)h=!h,w+=e;else if(f)v===u+1?"^"!==e&&"!"!==e||(a=!0):"]"!==e||v===u+2&&a||(f=!1),w+=e;else if("["!==e)if(ht(e)&&"("===t.charAt(v)){b.push(w),w="";const i=new mt(e,b);b.push(i),v=N(l=mt,p,d).call(l,t,i,v,r)}else if("|"!==e){if(")"===e)return""===w&&0===E(i,n).length&&x(i,c,!0),b.push(w),w="",i.push(...m,b),v;w+=e}else b.push(w),w="",m.push(b),b=new mt(null,i);else f=!0,u=v,a=!1,w+=e}return i.type=null,x(i,e,void 0),x(i,n,[t.substring(s-1)]),v},v=function(t){return E(this,n).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,s,r,o]=e.toRegExpSource(t);return x(this,i,E(this,i)||o),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},b=function(t,e,i=!1){let n=!1,s="",r=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(n)n=!1,s+=(at.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[i,n,l,h]=rt(t,o);if(l){s+=i,r=r||n,o+=l-1,e=e||h;continue}}"*"!==l?"?"!==l?s+=pt(l):(s+=dt,e=!0):(s+=i&&"*"===t?bt:vt,e=!0)}else o===t.length-1?s+="\\\\":n=!0}return[s,ot(t),!!e,r]},k(mt,p);var wt=mt,gt=(t,e,i={})=>(tt(e),!(!i.nocomment&&"#"===e.charAt(0))&&new Ht(e,i).match(t)),$t=/^\*+([^+@!?\*\[\(]*)$/,yt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Ot=t=>e=>e.endsWith(t),jt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),St=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Mt=/^\*+\.\*+$/,Et=t=>!t.startsWith(".")&&t.includes("."),kt=t=>"."!==t&&".."!==t&&t.includes("."),xt=/^\.\*+$/,Nt=t=>"."!==t&&".."!==t&&t.startsWith("."),Pt=/^\*+$/,Wt=t=>0!==t.length&&!t.startsWith("."),Rt=t=>0!==t.length&&"."!==t&&".."!==t,zt=/^\?+([^+@!?\*\[\(]*)?$/,At=([t,e=""])=>{const i=Tt([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i},Ct=([t,e=""])=>{const i=Dt([t]);return e?(e=e.toLowerCase(),t=>i(t)&&t.toLowerCase().endsWith(e)):i},Lt=([t,e=""])=>{const i=Dt([t]);return e?t=>i(t)&&t.endsWith(e):i},_t=([t,e=""])=>{const i=Tt([t]);return e?t=>i(t)&&t.endsWith(e):i},Tt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Dt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Ut="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";gt.sep="win32"===Ut?"\\":"/";var Gt=Symbol("globstar **");gt.GLOBSTAR=Gt,gt.filter=(t,e={})=>i=>gt(i,t,e);var It=(t,e={})=>Object.assign({},t,e);gt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return gt;const e=gt;return Object.assign(((i,n,s={})=>e(i,n,It(t,s))),{Minimatch:class extends e.Minimatch{constructor(e,i={}){super(e,It(t,i))}static defaults(i){return e.defaults(It(t,i)).Minimatch}},AST:class extends e.AST{constructor(e,i,n={}){super(e,i,It(t,n))}static fromGlob(i,n={}){return e.AST.fromGlob(i,It(t,n))}},unescape:(i,n={})=>e.unescape(i,It(t,n)),escape:(i,n={})=>e.escape(i,It(t,n)),filter:(i,n={})=>e.filter(i,It(t,n)),defaults:i=>e.defaults(It(t,i)),makeRe:(i,n={})=>e.makeRe(i,It(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,It(t,n)),match:(i,n,s={})=>e.match(i,n,It(t,s)),sep:e.sep,GLOBSTAR:Gt})};var Zt=(t,e={})=>(tt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,X.default)(t));gt.braceExpand=Zt,gt.makeRe=(t,e={})=>new Ht(t,e).makeRe(),gt.match=(t,e,i={})=>{const n=new Ht(e,i);return t=t.filter((t=>n.match(t))),n.options.nonull&&!t.length&&t.push(e),t};var Ft=/[?*]|[+@!]\(.*?\)|\[|\]/,Ht=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){tt(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Ut,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const i=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Ft.test(t[2])||Ft.test(t[3])),i=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(i)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,n),this.set=n.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let i=0;i<t[e].length;i++)"**"===t[e][i]&&(t[e][i]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let i=e;for(;"**"===t[i+1];)i++;i!==e&&t.splice(e,i-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const i=t[t.length-1];return"**"===e&&"**"===i?t:".."===e&&i&&".."!==i&&"."!==i&&"**"!==i?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const n=t[i];1===i&&""===n&&""===t[0]||"."!==n&&""!==n||(e=!0,t.splice(i,1),i--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let i=0;for(;-1!==(i=t.indexOf("..",i+1));){const n=t[i-1];n&&"."!==n&&".."!==n&&"**"!==n&&(e=!0,t.splice(i-1,2),i-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let i of t){let n=-1;for(;-1!==(n=i.indexOf("**",n+1));){let s=n;for(;"**"===i[s+1];)s++;s>n&&i.splice(n+1,s-n);const r=i[n+2],o=i[n+3];if(".."!==i[n+1])continue;if(!r||"."===r||".."===r||!o||"."===o||".."===o)continue;e=!0,i.splice(n,1);const l=i.slice(0);l[n]="**",t.push(l),n--}if(!this.preserveMultipleSlashes){for(let t=1;t<i.length-1;t++){const n=i[t];1===t&&""===n&&""===i[0]||"."!==n&&""!==n||(e=!0,i.splice(t,1),t--)}"."!==i[0]||2!==i.length||"."!==i[1]&&""!==i[1]||(e=!0,i.pop())}let s=0;for(;-1!==(s=i.indexOf("..",s+1));){const t=i[s-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,i.splice(s-1,2,...1===s&&"**"===i[s+1]?["."]:[]),0===i.length&&i.push(""),s-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){const n=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);n&&(t[e]=n,t[i]=[])}return t.filter((t=>t.length))}partsMatch(t,e,i=!1){let n=0,s=0,r=[],o="";for(;n<t.length&&s<e.length;)if(t[n]===e[s])r.push("b"===o?e[s]:t[n]),n++,s++;else if(i&&"**"===t[n]&&e[s]===t[n+1])r.push(t[n]),n++;else if(i&&"**"===e[s]&&t[n]===e[s+1])r.push(e[s]),s++;else if("*"!==t[n]||!e[s]||!this.options.dot&&e[s].startsWith(".")||"**"===e[s]){if("*"!==e[s]||!t[n]||!this.options.dot&&t[n].startsWith(".")||"**"===t[n])return!1;if("a"===o)return!1;o="b",r.push(e[s]),n++,s++}else{if("b"===o)return!1;o="a",r.push(t[n]),n++,s++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,i=0;for(let n=0;n<t.length&&"!"===t.charAt(n);n++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){const n=this.options;if(this.isWindows){const i="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),n=!i&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),s="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=n?3:i?0:void 0,o=!s&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:s?0:void 0;if("number"==typeof r&&"number"==typeof o){const[i,n]=[t[r],e[o]];i.toLowerCase()===n.toLowerCase()&&(e[o]=i,o>r?e=e.slice(o):r>o&&(t=t.slice(r)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,o=0,l=t.length,h=e.length;r<l&&o<h;r++,o++){this.debug("matchOne loop");var f=e[o],c=t[r];if(this.debug(e,f,c),!1===f)return!1;if(f===Gt){this.debug("GLOBSTAR",[e,f,c]);var u=r,a=o+1;if(a===h){for(this.debug("** at the end");r<l;r++)if("."===t[r]||".."===t[r]||!n.dot&&"."===t[r].charAt(0))return!1;return!0}for(;u<l;){var p=t[u];if(this.debug("\nglobstar while",t,u,e,a,p),this.matchOne(t.slice(u),e.slice(a),i))return this.debug("globstar found match!",u,l,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,u,e,a);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!i||(this.debug("\n>>> no match, partial?",t,u,e,a),u!==l))}let s;if("string"==typeof f?(s=c===f,this.debug("string match",f,c,s)):(s=f.test(c),this.debug("pattern match",f,c,s)),!s)return!1}if(r===l&&o===h)return!0;if(r===l)return i;if(o===h)return r===l-1&&""===t[r];throw Error("wtf?")}braceExpand(){return Zt(this.pattern,this.options)}parse(t){tt(t);const e=this.options;if("**"===t)return Gt;if(""===t)return"";let i,n=null;(i=t.match(Pt))?n=e.dot?Rt:Wt:(i=t.match($t))?n=(e.nocase?e.dot?St:jt:e.dot?Ot:yt)(i[1]):(i=t.match(zt))?n=(e.nocase?e.dot?Ct:At:e.dot?Lt:_t)(i):(i=t.match(Mt))?n=e.dot?kt:Et:(i=t.match(xt))&&(n=Nt);const s=wt.fromGlob(t,this.options).toMMPattern();return n&&"object"==typeof s&&Reflect.defineProperty(s,"test",{value:n}),s}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,i=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=new Set(e.nocase?["i"]:[]);let s=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))n.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Gt?Gt:t._src}));return e.forEach(((t,n)=>{const s=e[n+1],r=e[n-1];t===Gt&&r!==Gt&&(void 0===r?void 0!==s&&s!==Gt?e[n+1]="(?:\\/|"+i+"\\/)?"+s:e[n]=i:void 0===s?e[n-1]=r+"(?:\\/|"+i+")?":s!==Gt&&(e[n-1]=r+"(?:\\/|\\/"+i+"\\/)"+s,e[n+1]=Gt))})),e.filter((t=>t!==Gt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];s="^"+r+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=RegExp(s,[...n].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const n=this.slashSplit(t);this.debug(this.pattern,"split",n);const s=this.set;this.debug(this.pattern,"set",s);let r=n[n.length-1];if(!r)for(let t=n.length-2;!r&&t>=0;t--)r=n[t];for(let t=0;t<s.length;t++){const o=s[t];let l=n;if(i.matchBase&&1===o.length&&(l=[r]),this.matchOne(l,o,e))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(t){return gt.defaults(t).Minimatch}};gt.AST=wt,gt.Minimatch=Ht,gt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),gt.unescape=ot,((t,e)=>{for(var i in e)w(t,i,{get:e[i],enumerable:!0})})({},{err:()=>qt,map:()=>Bt,ok:()=>Vt,unwrap:()=>Yt,unwrapErr:()=>Kt});var Vt=t=>({isOk:!0,isErr:!1,value:t}),qt=t=>({isOk:!1,isErr:!0,value:t});function Bt(t,e){if(t.isOk){const i=e(t.value);return i instanceof Promise?i.then((t=>Vt(t))):Vt(i)}if(t.isErr)return qt(t.value);throw"should never get here"}var Jt,Yt=t=>{if(t.isOk)return t.value;throw t.value},Kt=t=>{if(t.isErr)return t.value;throw t.value};function Qt(){const t=this.attachShadow({mode:"open"});void 0===Jt&&(Jt=null),Jt&&(G?t.adoptedStyleSheets.push(Jt):t.adoptedStyleSheets=[...t.adoptedStyleSheets,Jt])}function Xt(t,e,i){let n,s=0,r=[];for(;s<t.length;s++){if(n=t[s],n["s-sr"]&&(!e||n["s-hn"]===e)&&(void 0===i||te(n)===i)&&(r.push(n),void 0!==i))return r;r=[...r,...Xt(n.childNodes,e,i)]}return r}var te=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;var ee=new WeakMap,ie=t=>"sc-"+t.u,ne=(t,e,...i)=>{let n=null,s=null,r=!1,o=!1;const l=[],h=e=>{for(let i=0;i<e.length;i++)n=e[i],Array.isArray(n)?h(n):null!=n&&"boolean"!=typeof n&&((r="function"!=typeof t&&!Q(n))&&(n+=""),r&&o?l[l.length-1].p+=n:l.push(r?se(null,n):n),o=r)};if(h(i),e){e.key&&(s=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=se(t,null);return f.v=e,l.length>0&&(f.m=l),f.$=s,f},se=(t,e)=>({l:0,O:t,p:e,j:null,m:null,v:null,$:null}),re={},oe=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};oe("::slotted"),oe(":host"),oe(":host-context");var le,he=(t,e)=>null==t||Q(t)?t:4&e?"false"!==t&&(""===t||!!t):t,fe=(t,e,i,n,s,r)=>{if(i===n)return;let o=A(t,e),l=e.toLowerCase();if("class"===e){const e=t.classList,s=ue(i);let r=ue(n);e.remove(...s.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in i)n&&null!=n[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in n)i&&n[e]===i[e]||(e.includes("-")?t.style.setProperty(e,n[e]):t.style[e]=n[e])}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const l=Q(n);if(o||l&&null!==n)try{if(t.tagName.includes("-"))t[e]!==n&&(t[e]=n);else{const s=null==n?"":n;"list"===e?o=!1:null!=i&&t[e]==s||("function"==typeof t.__lookupSetter__(e)?t[e]=s:t.setAttribute(e,s))}}catch(t){}null==n||!1===n?!1===n&&""!==t.getAttribute(e)||t.removeAttribute(e):(!o||4&r||s)&&!l&&1===t.nodeType&&t.setAttribute(e,n=!0===n?"":n)}else if(e="-"===e[2]?e.slice(3):A(_,l)?l.slice(2):l[2]+e.slice(3),i||n){const s=e.endsWith(ae);e=e.replace(pe,""),i&&D.rel(t,e,i,s),n&&D.ael(t,e,n,s)}},ce=/\s/,ue=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ce):[]),ae="Capture",pe=RegExp(ae+"$"),de=(t,e,i)=>{const n=11===e.j.nodeType&&e.j.host?e.j.host:e.j,s=t&&t.v||{},r=e.v||{};for(const t of ve(Object.keys(s)))t in r||fe(n,t,s[t],void 0,i,e.l);for(const t of ve(Object.keys(r)))fe(n,t,s[t],r[t],i,e.l)};function ve(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var be=!1,me=(t,e,i)=>{const n=e.m[i];let s,r,o=0;if(null!==n.p)s=n.j=_.document.createTextNode(n.p);else{if(!_.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(s=n.j=_.document.createElement(n.O),de(null,n,be),n.m){const e="template"===n.O?s.content:s;for(o=0;o<n.m.length;++o)r=me(t,n,o),r&&e.appendChild(r)}}return s["s-hn"]=le,s},we=(t,e,i,n,s,r)=>{let o,l=t;for(l.shadowRoot&&l.tagName===le&&(l=l.shadowRoot),"template"===i.O&&(l=l.content);s<=r;++s)n[s]&&(o=me(null,i,s),o&&(n[s].j=o,Oe(l,o,e)))},ge=(t,e,i)=>{for(let n=e;n<=i;++n){const e=t[n];if(e){const t=e.j;t&&t.remove()}}},$e=(t,e,i=!1)=>t.O===e.O&&(i?(i&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),ye=(t,e,i=!1)=>{const n=e.j=t.j,s=t.m,r=e.m,o=e.p;null===o?(de(t,e,be),null!==s&&null!==r?((t,e,i,n,s=!1)=>{let r,o,l=0,h=0,f=0,c=0,u=e.length-1,a=e[0],p=e[u],d=n.length-1,v=n[0],b=n[d];const m="template"===i.O?t.content:t;for(;l<=u&&h<=d;)if(null==a)a=e[++l];else if(null==p)p=e[--u];else if(null==v)v=n[++h];else if(null==b)b=n[--d];else if($e(a,v,s))ye(a,v,s),a=e[++l],v=n[++h];else if($e(p,b,s))ye(p,b,s),p=e[--u],b=n[--d];else if($e(a,b,s))ye(a,b,s),Oe(m,a.j,p.j.nextSibling),a=e[++l],b=n[--d];else if($e(p,v,s))ye(p,v,s),Oe(m,p.j,a.j),p=e[--u],v=n[++h];else{for(f=-1,c=l;c<=u;++c)if(e[c]&&null!==e[c].$&&e[c].$===v.$){f=c;break}f>=0?(o=e[f],o.O!==v.O?r=me(e&&e[h],i,f):(ye(o,v,s),e[f]=void 0,r=o.j),v=n[++h]):(r=me(e&&e[h],i,h),v=n[++h]),r&&Oe(a.j.parentNode,r,a.j)}l>u?we(t,null==n[d+1]?null:n[d+1].j,i,n,h,d):h>d&&ge(e,l,u)})(n,s,e,r,i):null!==r?(null!==t.p&&(n.textContent=""),we(n,null,e,r,0,r.length-1)):!i&&null!==s&&ge(s,0,s.length-1)):t.p!==o&&(n.data=o)},Oe=(t,e,i)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,i);const{slotNode:n}=function(t,e){var i;if(!(e=e||(null==(i=t["s-ol"])?void 0:i.parentElement)))return{slotNode:null,slotName:""};const n=t["s-sn"]=te(t)||"";return{slotNode:Xt(function(t,e){if("__"+e in t){const i=t["__"+e];return"function"!=typeof i?i:i.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}(e,"childNodes"),e.tagName,n)[0],slotName:n}}(e);return n&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(n),e}return t.__insertBefore?t.__insertBefore(e,i):null==t?void 0:t.insertBefore(e,i)},je=(t,e,i=!1)=>{const n=t.$hostElement$,s=t.S||se(null,null),r=(t=>t&&t.O===re)(e)?e:ne(null,null,e);if(le=n.tagName,i&&r.v)for(const t of Object.keys(r.v))n.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.v[t]=n[t]);r.O=null,r.l|=4,t.S=r,r.j=s.j=n.shadowRoot||n,ye(s,r,i)},Se=(t,e)=>{if(e&&!t.M&&e["s-p"]){const i=e["s-p"].push(new Promise((n=>t.M=()=>{e["s-p"].splice(i-1,1),n()})))}},Me=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);Se(t,t.k);const i=()=>Ee(t,e);if(!e)return J(i);queueMicrotask((()=>{i()}))},Ee=(t,e)=>{const i=t.$hostElement$,n=i;if(!n)throw Error(`Can't render component <${i.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 s;return s=ze(n,e?"componentWillLoad":"componentWillUpdate",void 0,i),s=ke(s,(()=>ze(n,"componentWillRender",void 0,i))),ke(s,(()=>Ne(t,n,e)))},ke=(t,e)=>xe(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),xe=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ne=async(t,e,i)=>{var n;const s=t.$hostElement$,r=s["s-rc"];i&&(t=>{const e=t.i,i=t.$hostElement$,n=e.l,s=((t,e)=>{var i,n,s;const r=ie(e),o=L.get(r);if(!_.document)return r;if(t=11===t.nodeType?t:_.document,o)if("string"==typeof o){let s,l=ee.get(t=t.head||t);if(l||ee.set(t,l=new Set),!l.has(r)){s=_.document.createElement("style"),s.innerHTML=o;const h=null!=(i=D.N)?i:function(){var t,e,i;return null!=(i=null==(e=null==(t=_.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?i:void 0}();if(null!=h&&s.setAttribute("nonce",h),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),i=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==i?void 0:i.parentNode)===t?i:null)}else if("host"in t)if(U){const e=new(null!=(n=t.defaultView)?n:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),G?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=o+e.innerHTML:t.prepend(s)}else t.append(s);1&e.l&&t.insertBefore(s,null),4&e.l&&(s.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(r)}}else{let e=ee.get(t);if(e||ee.set(t,e=new Set),!e.has(r)){const i=null!=(s=t.defaultView)?s:t.ownerDocument.defaultView;let n;if(o.constructor===i.CSSStyleSheet)n=o;else{n=new i.CSSStyleSheet;for(let t=0;t<o.cssRules.length;t++)n.insertRule(o.cssRules[t].cssText,t)}G?t.adoptedStyleSheets.push(n):t.adoptedStyleSheets=[...t.adoptedStyleSheets,n],e.add(r)}}return r})(i.shadowRoot?i.shadowRoot:i.getRootNode(),e);10&n&&(i["s-sc"]=s,i.classList.add(s+"-h"))})(t);Pe(t,e,s,i),r&&(r.map((t=>t())),s["s-rc"]=void 0);{const e=null!=(n=s["s-p"])?n:[],i=()=>We(t);0===e.length?i():(Promise.all(e).then(i),t.l|=4,e.length=0)}},Pe=(t,e,i,n)=>{try{e=e.render(),t.l&=-17,t.l|=2,je(t,e,n)}catch(e){C(e,t.$hostElement$)}return null},We=t=>{const e=t.$hostElement$,i=e,n=t.k;ze(i,"componentDidRender",void 0,e),64&t.l?ze(i,"componentDidUpdate",void 0,e):(t.l|=64,Ae(e),ze(i,"componentDidLoad",void 0,e),t.P(e),n||Re()),t.M&&(t.M(),t.M=void 0),512&t.l&&B((()=>Me(t,!1))),t.l&=-517},Re=()=>{B((()=>(t=>{const e=D.ce("appload",{detail:{namespace:"sliding-puzzle"}});return t.dispatchEvent(e),e})(_)))},ze=(t,e,i,n)=>{if(t&&t[e])try{return t[e](i)}catch(t){C(t,n)}},Ae=t=>t.classList.add("hydrated"),Ce=(t,e,i,n)=>{const s=z(t);if(!s)return;const r=t,o=s.o.get(e),l=s.l,h=r;if(!((i=he(i,n.t[e][0]))===o||Number.isNaN(o)&&Number.isNaN(i)||(s.o.set(e,i),2!=(18&l)))){if(h.componentShouldUpdate&&!1===h.componentShouldUpdate(i,o,e))return;Me(s,!1)}},Le=(t,e)=>{var i,n;const s=t.prototype;if(e.t){const r=Object.entries(null!=(i=e.t)?i:{});r.map((([t,[i]])=>{if(31&i||32&i){const{get:n,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};n&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return n?n.apply(this):((t,e)=>z(this).o.get(e))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(n){const s=z(this);if(s){if(r)return void 0===(32&i?this[t]:s.$hostElement$[t])&&s.o.get(t)&&(n=s.o.get(t)),r.call(this,he(n,i)),void Ce(this,t,n=32&i?this[t]:s.$hostElement$[t],e);Ce(this,t,n,e)}}})}}));{const i=new Map;s.attributeChangedCallback=function(t,n,o){D.jmp((()=>{var l;const h=i.get(t),f=z(this);if(this.hasOwnProperty(h),s.hasOwnProperty(h)&&"number"==typeof this[h]&&this[h]==o)return;if(null==h){const i=null==f?void 0:f.l;if(f&&i&&!(8&i)&&o!==n){const s=this,r=null==(l=e.W)?void 0:l[t];null==r||r.forEach((e=>{const[[r,l]]=Object.entries(e);null!=s[r]&&(128&i||1&l)&&s[r].call(s,o,n,t)}))}return}const c=r.find((([t])=>t===h));c&&4&c[1][0]&&(o=null!==o&&"false"!==o);const u=Object.getOwnPropertyDescriptor(s,h);o==this[h]||u.get&&!u.set||(this[h]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(n=e.W)?n:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return i.set(n,t),n}))]))}}return t},_e=(t,e)=>{const i={l:e[0],u:e[1]};i.t=e[2];const n=t.prototype.connectedCallback,s=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const i={l:0,$hostElement$:t,i:e,o:new Map,R:new Map};i.A=new Promise((t=>i.P=t)),t["s-p"]=[],t["s-rc"]=[];const n=i;t.__stencil__getHostRef=()=>n,512&e.l&&R(t,i)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!z(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&D.l)){const e=z(t);if(!e)return;const i=e.i,n=()=>{};if(1&e.l)(null==e?void 0:e.C)||(null==e?void 0:e.A)&&e.A.then((()=>{}));else{e.l|=1;{let i=t;for(;i=i.parentNode||i.host;)if(i["s-p"]){Se(e,e.k=i);break}}i.t&&Object.entries(i.t).map((([e,[i]])=>{if(31&i&&e in t&&t[e]!==Object.prototype[e]){const i=t[e];delete t[e],t[e]=i}})),(async(t,e,i)=>{let n;if(!(32&e.l)&&(e.l|=32,n=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),n&&n.style)){let t;"string"==typeof n.style&&(t=n.style);const e=ie(i);if(!L.has(e)){const n=()=>{};((t,e,i)=>{let n=L.get(t);U&&i?(n=n||new CSSStyleSheet,"string"==typeof n?n=e:n.replaceSync(e)):n=e,L.set(t,n)})(e,t,!!(1&i.l)),n()}}const s=e.k,r=()=>Me(e,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(t,e,i)}n()}})(this),n&&n.call(this)},disconnectedCallback(){(async t=>{ee.has(t)&&ee.delete(t),t.shadowRoot&&ee.has(t.shadowRoot)&&ee.delete(t.shadowRoot)})(this),s&&s.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${i.u}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Qt.call(this,i)}}),t.is=i.u,Le(t,i)},Te=t=>D.N=t,De=t=>Object.assign(D,t);function Ue(t,e){je({$hostElement$:e},t)}function Ge(t){return t}export{T as H,Y as getAssetPath,ne as h,_e as p,Ue as render,K as setAssetPath,Te as setNonce,De as setPlatformOptions,Ge as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as i,h as s}from"./index.js";class r{x;y;get 0(){return this.x}set 0(t){this.x=t}get 1(){return this.y}set 1(t){this.y=t}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}get xy(){return[this.x,this.y]}*[Symbol.iterator](){yield this.x,yield this.y}constructor(t,e){this.x=t,this.y=e}add(t){return new r(this.x+t.x,this.y+t.y)}eq(t){return this.x===t.x&&this.y===t.y}clone(){return new r(this.x,this.y)}static from(t){if("number"==typeof t)return new r(t,t);if(Array.isArray(t))return new r(t[0]??0,t[1]??0);if("object"==typeof t&&"number"==typeof t.x&&"number"==typeof t.y)return new r(t.x,t.y);throw Error("Wrong Vec2 source")}}class n{size;constructor(t){if(t.x<=0||t.y<=0)throw Error(`Invalid grid size: width and height must be positive (got ${t.x}x${t.y})`);this.size=t}getIndexFromVec(t){return n.getIndexFromVec(t,this.size.width)}getVecFromIndex(t){return n.getVecFromIndex(t,this.size.width)}isBlack(t){return!!((t.x+t.y)%2)}isWhite(t){return!((t.x+t.y)%2)}isInGrid(t){return n.isInGrid(t,this.size)}static getVecFromIndex(t,e){const i=e instanceof r?e.width:e;return new r(t%i,Math.floor(t/i))}static getIndexFromVec(t,e){return t.y*(e instanceof r?e.width:e)+t.x}static isInGrid(t,e){return t.x>=0&&e.x>t.x&&t.y>=0&&e.y>t.y}static getOrtoSiblings(t,e){return[new r(-1,0),new r(1,0),new r(0,-1),new r(0,1)].map((e=>e.add(t))).filter((t=>n.isInGrid(t,e)))}}const h=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}size=new r(3,3);tiles=[];async checkAnswer(){return this.tiles.every((t=>t.position===t.correctPosition))}getTileById(t){const e=this.tiles.find((e=>e.id===t));if(!e)throw Error("Tile not found");return e}onTileClicked(t){const e=this.getTileById(t),i=n.getVecFromIndex(e.position,this.size.width),s=
|
|
1
|
+
import{t,p as e,H as i,h as s}from"./index.js";class r{x;y;get 0(){return this.x}set 0(t){this.x=t}get 1(){return this.y}set 1(t){this.y=t}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}get xy(){return[this.x,this.y]}*[Symbol.iterator](){yield this.x,yield this.y}constructor(t,e){this.x=t,this.y=e}add(t){return new r(this.x+t.x,this.y+t.y)}eq(t){return this.x===t.x&&this.y===t.y}clone(){return new r(this.x,this.y)}static from(t){if("number"==typeof t)return new r(t,t);if(Array.isArray(t))return new r(t[0]??0,t[1]??0);if("object"==typeof t&&"number"==typeof t.x&&"number"==typeof t.y)return new r(t.x,t.y);throw Error("Wrong Vec2 source")}}class n{size;constructor(t){if(t.x<=0||t.y<=0)throw Error(`Invalid grid size: width and height must be positive (got ${t.x}x${t.y})`);this.size=t}getIndexFromVec(t){return n.getIndexFromVec(t,this.size.width)}getVecFromIndex(t){return n.getVecFromIndex(t,this.size.width)}getAllIndexes(){return n.getAllIndexes(this.size)}getAllCells(){return n.getAllCells(this.size)}isBlack(t){return!!((t.x+t.y)%2)}isWhite(t){return!((t.x+t.y)%2)}isInGrid(t){return n.isInGrid(t,this.size)}static getAllIndexes(t){return Array(t.width*t.height).fill(!0).map(((t,e)=>e))}static getAllCells(t){return Array(t.width*t.height).fill(!0).map(((e,i)=>n.getVecFromIndex(i,t.width)))}static getVecFromIndex(t,e){const i=e instanceof r?e.width:e;return new r(t%i,Math.floor(t/i))}static getIndexFromVec(t,e){return t.y*(e instanceof r?e.width:e)+t.x}static isInGrid(t,e){return t.x>=0&&e.x>t.x&&t.y>=0&&e.y>t.y}static getOrtoSiblings(t,e){return[new r(-1,0),new r(1,0),new r(0,-1),new r(0,1)].map((e=>e.add(t))).filter((t=>n.isInGrid(t,e)))}}const h=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}size=new r(3,3);tiles=[];freeMove=!1;async checkAnswer(){return this.tiles.every((t=>t.position===t.correctPosition))}getTileById(t){const e=this.tiles.find((e=>e.id===t));if(!e)throw Error("Tile not found");return e}onTileClicked(t){const e=this.getTileById(t),i=n.getVecFromIndex(e.position,this.size.width),s=this.getMoveTarget(i);s&&this.setTilePosition(e,n.getIndexFromVec(s,this.size))}getMoveTarget(t){return this.freeMove?n.getAllCells(this.size).find((t=>{const e=n.getIndexFromVec(t,this.size.width);return console.log(e),this.tiles.every((t=>t.position!==e))}))??null:n.getOrtoSiblings(t,this.size).find((t=>{const e=n.getIndexFromVec(t,this.size.width);return this.tiles.every((t=>t.position!==e))}))??null}setTilePosition(t,e){const i="string"==typeof t?t:t.id;this.tiles=this.tiles.map((t=>t.id!==i?t:{...t,position:e}))}render(){return s("div",{key:"52a3da12a2b29974e6c2683d8cfb46eb282d3424",class:"board",style:{"--width":""+this.size.width,"--height":""+this.size.height}},this.tiles.map((t=>{const e=n.getVecFromIndex(t.position,this.size.width);return s("button",{key:t.id,class:"tile",style:{"--x":""+e.x,"--y":""+e.y},onClick:this.onTileClicked.bind(this,t.id)},s("img",{src:t.imageSrc,alt:""}))})))}static get style(){return".board{width:100%;height:100%;display:inline-block;aspect-ratio:calc(var(--width, 1) / var(--height, 1));border:1px solid black;position:relative}.tile{position:absolute;width:calc(100% / var(--width, 1));height:calc(100% / var(--height, 1));padding:0;border:none;transform:translate(calc(100% * var(--x)), calc(100% * var(--y)));transition:transform 0.5s}.tile img{display:block;width:100%;height:100%;pointer-events:none}"}},[513,"mb-sliding-puzzle",{tiles:[1040],freeMove:[4,"free-move"],size:[32],checkAnswer:[64]}]);function o(){"undefined"!=typeof customElements&&["mb-sliding-puzzle"].forEach((e=>{"mb-sliding-puzzle"===e&&(customElements.get(t(e))||customElements.define(t(e),h))}))}o();const c=h,l=o;export{c as MbSlidingPuzzle,l as defineCustomElement}
|