screenreader-speech-capture 0.3.0 → 0.4.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/cli.mjs +31 -3
- package/dist/ui/adapter-node.js +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/{0.CeDGT9MW.css → 0.B2ZWH0rX.css} +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/0.B2ZWH0rX.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.B2ZWH0rX.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.CtITS5jU.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.CtITS5jU.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.CtITS5jU.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/w6UAqFO5.js +37 -0
- package/dist/ui/client/ui/_app/immutable/chunks/w6UAqFO5.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/w6UAqFO5.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/{app.2mjWY9ga.js → app.COo3YJBG.js} +2 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.COo3YJBG.js.br +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.COo3YJBG.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{0.CQ_XophD.js → 0.BKE0tKKK.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/nodes/0.BKE0tKKK.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.BKE0tKKK.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.BCy3UgNz.js +227 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.BCy3UgNz.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.BCy3UgNz.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -1
- package/dist/ui/client/ui/_app/version.json.br +0 -0
- package/dist/ui/client/ui/_app/version.json.gz +0 -0
- package/dist/ui/server/.vite/manifest.json +33 -2
- package/dist/ui/server/_app/immutable/assets/{_layout.CeDGT9MW.css → _layout.B2ZWH0rX.css} +1 -1
- package/dist/ui/server/_app/immutable/assets/_page.CtITS5jU.css +1 -0
- package/dist/ui/server/chunks/bridge-api.js +29 -1
- package/dist/ui/server/chunks/bridge-api.js.map +1 -1
- package/dist/ui/server/chunks/composition.js +2863 -2
- package/dist/ui/server/chunks/composition.js.map +1 -1
- package/dist/ui/server/chunks/instance.js +3 -3
- package/dist/ui/server/chunks/internal.js +1 -1
- package/dist/ui/server/chunks/src.js +29 -2
- package/dist/ui/server/chunks/src.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js +14 -0
- package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js +1 -1
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +21 -0
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js +19 -0
- package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/pages/_layout.svelte.js +1 -3
- package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.svelte.js +2659 -39
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
- package/dist/ui/server/manifest-full.js +22 -1
- package/dist/ui/server/manifest.js +22 -1
- package/dist/ui/server/nodes/0.js +2 -2
- package/dist/ui/server/nodes/2.js +2 -2
- package/dist/ui/server/server.js +22 -1
- package/package.json +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/0.CeDGT9MW.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.CeDGT9MW.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.DJfIfRJB.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/2.DJfIfRJB.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.DJfIfRJB.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DSHrAZZ8.js +0 -37
- package/dist/ui/client/ui/_app/immutable/chunks/DSHrAZZ8.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DSHrAZZ8.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.2mjWY9ga.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.2mjWY9ga.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CQ_XophD.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CQ_XophD.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.BTJ1n3E7.js +0 -224
- package/dist/ui/client/ui/_app/immutable/nodes/2.BTJ1n3E7.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.BTJ1n3E7.js.gz +0 -0
- package/dist/ui/server/_app/immutable/assets/_page.DJfIfRJB.css +0 -1
|
@@ -1,6 +1,2639 @@
|
|
|
1
1
|
import { mt as resolve } from "./internal.js";
|
|
2
|
-
import { a as SessionListSchema, n as checkDto, r as StatusSchema,
|
|
2
|
+
import { a as SpeechEntrySchema, c as SessionListSchema, n as checkDto, o as SpeechListSchema, r as StatusSchema, u as StartSessionResponseSchema } from "./src.js";
|
|
3
3
|
import "./server2.js";
|
|
4
|
+
// ../../node_modules/.pnpm/tslib@2.9.1/node_modules/tslib/tslib.es6.mjs
|
|
5
|
+
function __decorate(decorators, target, key, desc) {
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
}
|
|
11
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/custom-element.js
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
var t$3 = (t) => (e, o) => {
|
|
18
|
+
void 0 !== o ? o.addInitializer(() => {
|
|
19
|
+
customElements.define(t, e);
|
|
20
|
+
}) : customElements.define(t, e);
|
|
21
|
+
};
|
|
22
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2023 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/
|
|
28
|
+
var ElementInternalsShim = class ElementInternals {
|
|
29
|
+
get shadowRoot() {
|
|
30
|
+
return this.__host.__shadowRoot;
|
|
31
|
+
}
|
|
32
|
+
constructor(_host) {
|
|
33
|
+
this.ariaActiveDescendantElement = null;
|
|
34
|
+
this.ariaAtomic = "";
|
|
35
|
+
this.ariaAutoComplete = "";
|
|
36
|
+
this.ariaBrailleLabel = "";
|
|
37
|
+
this.ariaBrailleRoleDescription = "";
|
|
38
|
+
this.ariaBusy = "";
|
|
39
|
+
this.ariaChecked = "";
|
|
40
|
+
this.ariaColCount = "";
|
|
41
|
+
this.ariaColIndex = "";
|
|
42
|
+
this.ariaColIndexText = "";
|
|
43
|
+
this.ariaColSpan = "";
|
|
44
|
+
this.ariaControlsElements = null;
|
|
45
|
+
this.ariaCurrent = "";
|
|
46
|
+
this.ariaDescribedByElements = null;
|
|
47
|
+
this.ariaDescription = "";
|
|
48
|
+
this.ariaDetailsElements = null;
|
|
49
|
+
this.ariaDisabled = "";
|
|
50
|
+
this.ariaErrorMessageElements = null;
|
|
51
|
+
this.ariaExpanded = "";
|
|
52
|
+
this.ariaFlowToElements = null;
|
|
53
|
+
this.ariaHasPopup = "";
|
|
54
|
+
this.ariaHidden = "";
|
|
55
|
+
this.ariaInvalid = "";
|
|
56
|
+
this.ariaKeyShortcuts = "";
|
|
57
|
+
this.ariaLabel = "";
|
|
58
|
+
this.ariaLabelledByElements = null;
|
|
59
|
+
this.ariaLevel = "";
|
|
60
|
+
this.ariaLive = "";
|
|
61
|
+
this.ariaModal = "";
|
|
62
|
+
this.ariaMultiLine = "";
|
|
63
|
+
this.ariaMultiSelectable = "";
|
|
64
|
+
this.ariaOrientation = "";
|
|
65
|
+
this.ariaOwnsElements = null;
|
|
66
|
+
this.ariaPlaceholder = "";
|
|
67
|
+
this.ariaPosInSet = "";
|
|
68
|
+
this.ariaPressed = "";
|
|
69
|
+
this.ariaReadOnly = "";
|
|
70
|
+
this.ariaRelevant = "";
|
|
71
|
+
this.ariaRequired = "";
|
|
72
|
+
this.ariaRoleDescription = "";
|
|
73
|
+
this.ariaRowCount = "";
|
|
74
|
+
this.ariaRowIndex = "";
|
|
75
|
+
this.ariaRowIndexText = "";
|
|
76
|
+
this.ariaRowSpan = "";
|
|
77
|
+
this.ariaSelected = "";
|
|
78
|
+
this.ariaSetSize = "";
|
|
79
|
+
this.ariaSort = "";
|
|
80
|
+
this.ariaValueMax = "";
|
|
81
|
+
this.ariaValueMin = "";
|
|
82
|
+
this.ariaValueNow = "";
|
|
83
|
+
this.ariaValueText = "";
|
|
84
|
+
this.role = "";
|
|
85
|
+
this.form = null;
|
|
86
|
+
this.labels = [];
|
|
87
|
+
this.states = /* @__PURE__ */ new Set();
|
|
88
|
+
this.validationMessage = "";
|
|
89
|
+
this.validity = {};
|
|
90
|
+
this.willValidate = true;
|
|
91
|
+
this.__host = _host;
|
|
92
|
+
}
|
|
93
|
+
checkValidity() {
|
|
94
|
+
console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true.");
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
reportValidity() {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
setFormValue() {}
|
|
101
|
+
setValidity() {}
|
|
102
|
+
};
|
|
103
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/events.js
|
|
104
|
+
/**
|
|
105
|
+
* @license
|
|
106
|
+
* Copyright 2023 Google LLC
|
|
107
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
108
|
+
*/
|
|
109
|
+
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
110
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
111
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
112
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
113
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
114
|
+
};
|
|
115
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
116
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
117
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
118
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
119
|
+
};
|
|
120
|
+
var _Event_cancelable;
|
|
121
|
+
var _Event_bubbles;
|
|
122
|
+
var _Event_composed;
|
|
123
|
+
var _Event_defaultPrevented;
|
|
124
|
+
var _Event_timestamp;
|
|
125
|
+
var _Event_propagationStopped;
|
|
126
|
+
var _Event_type;
|
|
127
|
+
var _Event_target;
|
|
128
|
+
var _Event_isBeingDispatched;
|
|
129
|
+
var _a$1;
|
|
130
|
+
var _CustomEvent_detail;
|
|
131
|
+
var _b;
|
|
132
|
+
var NONE = 0;
|
|
133
|
+
var CAPTURING_PHASE = 1;
|
|
134
|
+
var AT_TARGET = 2;
|
|
135
|
+
var BUBBLING_PHASE = 3;
|
|
136
|
+
var enumerableProperty$1 = { __proto__: null };
|
|
137
|
+
enumerableProperty$1.enumerable = true;
|
|
138
|
+
Object.freeze(enumerableProperty$1);
|
|
139
|
+
var EventShim = (_a$1 = class Event {
|
|
140
|
+
constructor(type, options = {}) {
|
|
141
|
+
_Event_cancelable.set(this, false);
|
|
142
|
+
_Event_bubbles.set(this, false);
|
|
143
|
+
_Event_composed.set(this, false);
|
|
144
|
+
_Event_defaultPrevented.set(this, false);
|
|
145
|
+
_Event_timestamp.set(this, Date.now());
|
|
146
|
+
_Event_propagationStopped.set(this, false);
|
|
147
|
+
_Event_type.set(this, void 0);
|
|
148
|
+
_Event_target.set(this, void 0);
|
|
149
|
+
_Event_isBeingDispatched.set(this, void 0);
|
|
150
|
+
this.NONE = NONE;
|
|
151
|
+
this.CAPTURING_PHASE = CAPTURING_PHASE;
|
|
152
|
+
this.AT_TARGET = AT_TARGET;
|
|
153
|
+
this.BUBBLING_PHASE = BUBBLING_PHASE;
|
|
154
|
+
if (arguments.length === 0) throw new Error(`The type argument must be specified`);
|
|
155
|
+
if (typeof options !== "object" || !options) throw new Error(`The "options" argument must be an object`);
|
|
156
|
+
const { bubbles, cancelable, composed } = options;
|
|
157
|
+
__classPrivateFieldSet(this, _Event_cancelable, !!cancelable, "f");
|
|
158
|
+
__classPrivateFieldSet(this, _Event_bubbles, !!bubbles, "f");
|
|
159
|
+
__classPrivateFieldSet(this, _Event_composed, !!composed, "f");
|
|
160
|
+
__classPrivateFieldSet(this, _Event_type, `${type}`, "f");
|
|
161
|
+
__classPrivateFieldSet(this, _Event_target, null, "f");
|
|
162
|
+
__classPrivateFieldSet(this, _Event_isBeingDispatched, false, "f");
|
|
163
|
+
}
|
|
164
|
+
initEvent(_type, _bubbles, _cancelable) {
|
|
165
|
+
throw new Error("Method not implemented.");
|
|
166
|
+
}
|
|
167
|
+
stopImmediatePropagation() {
|
|
168
|
+
this.stopPropagation();
|
|
169
|
+
}
|
|
170
|
+
preventDefault() {
|
|
171
|
+
__classPrivateFieldSet(this, _Event_defaultPrevented, true, "f");
|
|
172
|
+
}
|
|
173
|
+
get target() {
|
|
174
|
+
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
175
|
+
}
|
|
176
|
+
get currentTarget() {
|
|
177
|
+
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
178
|
+
}
|
|
179
|
+
get srcElement() {
|
|
180
|
+
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
181
|
+
}
|
|
182
|
+
get type() {
|
|
183
|
+
return __classPrivateFieldGet(this, _Event_type, "f");
|
|
184
|
+
}
|
|
185
|
+
get cancelable() {
|
|
186
|
+
return __classPrivateFieldGet(this, _Event_cancelable, "f");
|
|
187
|
+
}
|
|
188
|
+
get defaultPrevented() {
|
|
189
|
+
return __classPrivateFieldGet(this, _Event_cancelable, "f") && __classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
190
|
+
}
|
|
191
|
+
get timeStamp() {
|
|
192
|
+
return __classPrivateFieldGet(this, _Event_timestamp, "f");
|
|
193
|
+
}
|
|
194
|
+
composedPath() {
|
|
195
|
+
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? [__classPrivateFieldGet(this, _Event_target, "f")] : [];
|
|
196
|
+
}
|
|
197
|
+
get returnValue() {
|
|
198
|
+
return !__classPrivateFieldGet(this, _Event_cancelable, "f") || !__classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
199
|
+
}
|
|
200
|
+
get bubbles() {
|
|
201
|
+
return __classPrivateFieldGet(this, _Event_bubbles, "f");
|
|
202
|
+
}
|
|
203
|
+
get composed() {
|
|
204
|
+
return __classPrivateFieldGet(this, _Event_composed, "f");
|
|
205
|
+
}
|
|
206
|
+
get eventPhase() {
|
|
207
|
+
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? _a$1.AT_TARGET : _a$1.NONE;
|
|
208
|
+
}
|
|
209
|
+
get cancelBubble() {
|
|
210
|
+
return __classPrivateFieldGet(this, _Event_propagationStopped, "f");
|
|
211
|
+
}
|
|
212
|
+
set cancelBubble(value) {
|
|
213
|
+
if (value) __classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
214
|
+
}
|
|
215
|
+
stopPropagation() {
|
|
216
|
+
__classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
217
|
+
}
|
|
218
|
+
get isTrusted() {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
}, _Event_cancelable = /* @__PURE__ */ new WeakMap(), _Event_bubbles = /* @__PURE__ */ new WeakMap(), _Event_composed = /* @__PURE__ */ new WeakMap(), _Event_defaultPrevented = /* @__PURE__ */ new WeakMap(), _Event_timestamp = /* @__PURE__ */ new WeakMap(), _Event_propagationStopped = /* @__PURE__ */ new WeakMap(), _Event_type = /* @__PURE__ */ new WeakMap(), _Event_target = /* @__PURE__ */ new WeakMap(), _Event_isBeingDispatched = /* @__PURE__ */ new WeakMap(), _a$1.NONE = NONE, _a$1.CAPTURING_PHASE = CAPTURING_PHASE, _a$1.AT_TARGET = AT_TARGET, _a$1.BUBBLING_PHASE = BUBBLING_PHASE, _a$1);
|
|
222
|
+
Object.defineProperties(EventShim.prototype, {
|
|
223
|
+
initEvent: enumerableProperty$1,
|
|
224
|
+
stopImmediatePropagation: enumerableProperty$1,
|
|
225
|
+
preventDefault: enumerableProperty$1,
|
|
226
|
+
target: enumerableProperty$1,
|
|
227
|
+
currentTarget: enumerableProperty$1,
|
|
228
|
+
srcElement: enumerableProperty$1,
|
|
229
|
+
type: enumerableProperty$1,
|
|
230
|
+
cancelable: enumerableProperty$1,
|
|
231
|
+
defaultPrevented: enumerableProperty$1,
|
|
232
|
+
timeStamp: enumerableProperty$1,
|
|
233
|
+
composedPath: enumerableProperty$1,
|
|
234
|
+
returnValue: enumerableProperty$1,
|
|
235
|
+
bubbles: enumerableProperty$1,
|
|
236
|
+
composed: enumerableProperty$1,
|
|
237
|
+
eventPhase: enumerableProperty$1,
|
|
238
|
+
cancelBubble: enumerableProperty$1,
|
|
239
|
+
stopPropagation: enumerableProperty$1,
|
|
240
|
+
isTrusted: enumerableProperty$1
|
|
241
|
+
});
|
|
242
|
+
var CustomEventShim = (_b = class CustomEvent extends EventShim {
|
|
243
|
+
constructor(type, options = {}) {
|
|
244
|
+
super(type, options);
|
|
245
|
+
_CustomEvent_detail.set(this, void 0);
|
|
246
|
+
__classPrivateFieldSet(this, _CustomEvent_detail, options?.detail ?? null, "f");
|
|
247
|
+
}
|
|
248
|
+
initCustomEvent(_type, _bubbles, _cancelable, _detail) {
|
|
249
|
+
throw new Error("Method not implemented.");
|
|
250
|
+
}
|
|
251
|
+
get detail() {
|
|
252
|
+
return __classPrivateFieldGet(this, _CustomEvent_detail, "f");
|
|
253
|
+
}
|
|
254
|
+
}, _CustomEvent_detail = /* @__PURE__ */ new WeakMap(), _b);
|
|
255
|
+
Object.defineProperties(CustomEventShim.prototype, { detail: enumerableProperty$1 });
|
|
256
|
+
var EventShimWithRealType = EventShim;
|
|
257
|
+
var CustomEventShimWithRealType = CustomEventShim;
|
|
258
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/lib/css.js
|
|
259
|
+
/**
|
|
260
|
+
* @license
|
|
261
|
+
* Copyright 2024 Google LLC
|
|
262
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
263
|
+
*/
|
|
264
|
+
var _a = class CSSRule {
|
|
265
|
+
constructor() {
|
|
266
|
+
this.STYLE_RULE = 1;
|
|
267
|
+
this.CHARSET_RULE = 2;
|
|
268
|
+
this.IMPORT_RULE = 3;
|
|
269
|
+
this.MEDIA_RULE = 4;
|
|
270
|
+
this.FONT_FACE_RULE = 5;
|
|
271
|
+
this.PAGE_RULE = 6;
|
|
272
|
+
this.NAMESPACE_RULE = 10;
|
|
273
|
+
this.KEYFRAMES_RULE = 7;
|
|
274
|
+
this.KEYFRAME_RULE = 8;
|
|
275
|
+
this.SUPPORTS_RULE = 12;
|
|
276
|
+
this.COUNTER_STYLE_RULE = 11;
|
|
277
|
+
this.FONT_FEATURE_VALUES_RULE = 14;
|
|
278
|
+
this.MARGIN_RULE = 9;
|
|
279
|
+
this.__parentStyleSheet = null;
|
|
280
|
+
this.cssText = "";
|
|
281
|
+
}
|
|
282
|
+
get parentRule() {
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
get parentStyleSheet() {
|
|
286
|
+
return this.__parentStyleSheet;
|
|
287
|
+
}
|
|
288
|
+
get type() {
|
|
289
|
+
return 0;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
_a.STYLE_RULE = 1, _a.CHARSET_RULE = 2, _a.IMPORT_RULE = 3, _a.MEDIA_RULE = 4, _a.FONT_FACE_RULE = 5, _a.PAGE_RULE = 6, _a.NAMESPACE_RULE = 10, _a.KEYFRAMES_RULE = 7, _a.KEYFRAME_RULE = 8, _a.SUPPORTS_RULE = 12, _a.COUNTER_STYLE_RULE = 11, _a.FONT_FEATURE_VALUES_RULE = 14, _a.MARGIN_RULE = 9;
|
|
293
|
+
// ../../node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.6.0/node_modules/@lit-labs/ssr-dom-shim/index.js
|
|
294
|
+
/**
|
|
295
|
+
* @license
|
|
296
|
+
* Copyright 2019 Google LLC
|
|
297
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
298
|
+
*/
|
|
299
|
+
globalThis.Event ??= EventShimWithRealType;
|
|
300
|
+
globalThis.CustomEvent ??= CustomEventShimWithRealType;
|
|
301
|
+
var constructionToken = Symbol();
|
|
302
|
+
var isCaptureEventListener = (options) => typeof options === "boolean" ? options : options?.capture ?? false;
|
|
303
|
+
var enumerableProperty = { __proto__: null };
|
|
304
|
+
enumerableProperty.enumerable = true;
|
|
305
|
+
Object.freeze(enumerableProperty);
|
|
306
|
+
/**
|
|
307
|
+
* This is a basic implementation of an EventTarget.
|
|
308
|
+
*
|
|
309
|
+
* This is not fully spec compliant (e.g. validation),
|
|
310
|
+
* but should work well enough for our use cases.
|
|
311
|
+
*
|
|
312
|
+
* @see https://dom.spec.whatwg.org/#eventtarget
|
|
313
|
+
*
|
|
314
|
+
* Example Event Path
|
|
315
|
+
* ------------------
|
|
316
|
+
*
|
|
317
|
+
* Note that this depends on the logic in `packages/labs/ssr/src/lib/render-value.ts`.
|
|
318
|
+
* Any element that is not a custom element or a slot element is skipped in the chain.
|
|
319
|
+
*
|
|
320
|
+
* <main>
|
|
321
|
+
* <my-el1>
|
|
322
|
+
* #shadow-dom (open)
|
|
323
|
+
* <div>
|
|
324
|
+
* <slot></slot>
|
|
325
|
+
* <my-el2>
|
|
326
|
+
* #shadow-dom (closed)
|
|
327
|
+
* <slot></slot>
|
|
328
|
+
* <event-dispatcher3></event-dispatcher3>
|
|
329
|
+
* <slot name="nested"></slot>
|
|
330
|
+
* </my-el2>
|
|
331
|
+
* </div>
|
|
332
|
+
* <event-dispatcher1></event-dispatcher1>
|
|
333
|
+
* <event-dispatcher2 slot="nested"></event-dispatcher2>
|
|
334
|
+
* </my-el1>
|
|
335
|
+
* </main>
|
|
336
|
+
*
|
|
337
|
+
* Given the previous structure, the event path of this shim would be as follows,
|
|
338
|
+
* for the given dispatcher with an event that bubbles (document-fragment
|
|
339
|
+
* represents a ShadowRoot/#shadow-dom instance):
|
|
340
|
+
*
|
|
341
|
+
* <event-dispatcher1>:
|
|
342
|
+
* [event-dispatcher1, slot{my-el1}, document-fragment{my-el1}, my-el1, document]
|
|
343
|
+
*
|
|
344
|
+
* <event-dispatcher2>:
|
|
345
|
+
* [
|
|
346
|
+
* event-dispatcher2,
|
|
347
|
+
* slot[name="nested"]{my-el1},
|
|
348
|
+
* slot{my-el2},
|
|
349
|
+
* document-fragment{my-el2},
|
|
350
|
+
* my-el2,
|
|
351
|
+
* document-fragment{my-el1},
|
|
352
|
+
* my-el1,
|
|
353
|
+
* document
|
|
354
|
+
* ]
|
|
355
|
+
*
|
|
356
|
+
* <event-dispatcher3> (without composed):
|
|
357
|
+
* [event-dispatcher3, document-fragment{my-el2}]
|
|
358
|
+
*
|
|
359
|
+
* <event-dispatcher3> (composed):
|
|
360
|
+
* [
|
|
361
|
+
* event-dispatcher3,
|
|
362
|
+
* document-fragment{my-el2},
|
|
363
|
+
* my-el2,
|
|
364
|
+
* document-fragment{my-el1},
|
|
365
|
+
* my-el1,
|
|
366
|
+
* document
|
|
367
|
+
* ]
|
|
368
|
+
*/
|
|
369
|
+
var EventTarget$1 = class {
|
|
370
|
+
constructor() {
|
|
371
|
+
this.__eventListeners = /* @__PURE__ */ new Map();
|
|
372
|
+
this.__captureEventListeners = /* @__PURE__ */ new Map();
|
|
373
|
+
}
|
|
374
|
+
addEventListener(type, callback, options) {
|
|
375
|
+
if (callback === void 0 || callback === null) return;
|
|
376
|
+
const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
|
|
377
|
+
let eventListeners = eventListenersMap.get(type);
|
|
378
|
+
if (eventListeners === void 0) {
|
|
379
|
+
eventListeners = /* @__PURE__ */ new Map();
|
|
380
|
+
eventListenersMap.set(type, eventListeners);
|
|
381
|
+
} else if (eventListeners.has(callback)) return;
|
|
382
|
+
const normalizedOptions = typeof options === "object" && options ? options : {};
|
|
383
|
+
normalizedOptions.signal?.addEventListener("abort", () => this.removeEventListener(type, callback, options));
|
|
384
|
+
eventListeners.set(callback, normalizedOptions ?? {});
|
|
385
|
+
}
|
|
386
|
+
removeEventListener(type, callback, options) {
|
|
387
|
+
if (callback === void 0 || callback === null) return;
|
|
388
|
+
const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
|
|
389
|
+
const eventListeners = eventListenersMap.get(type);
|
|
390
|
+
if (eventListeners !== void 0) {
|
|
391
|
+
eventListeners.delete(callback);
|
|
392
|
+
if (!eventListeners.size) eventListenersMap.delete(type);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
dispatchEvent(event) {
|
|
396
|
+
let composedPath = this.__resolveFullEventPath();
|
|
397
|
+
if (!event.composed && this.__host) composedPath = composedPath.slice(0, composedPath.indexOf(this.__host));
|
|
398
|
+
let stopPropagation = false;
|
|
399
|
+
let stopImmediatePropagation = false;
|
|
400
|
+
let eventPhase = EventShimWithRealType.NONE;
|
|
401
|
+
let target = null;
|
|
402
|
+
let tmpTarget = null;
|
|
403
|
+
let currentTarget = null;
|
|
404
|
+
const originalStopPropagation = event.stopPropagation;
|
|
405
|
+
const originalStopImmediatePropagation = event.stopImmediatePropagation;
|
|
406
|
+
Object.defineProperties(event, {
|
|
407
|
+
target: {
|
|
408
|
+
get() {
|
|
409
|
+
return target ?? tmpTarget;
|
|
410
|
+
},
|
|
411
|
+
...enumerableProperty
|
|
412
|
+
},
|
|
413
|
+
srcElement: {
|
|
414
|
+
get() {
|
|
415
|
+
return event.target;
|
|
416
|
+
},
|
|
417
|
+
...enumerableProperty
|
|
418
|
+
},
|
|
419
|
+
currentTarget: {
|
|
420
|
+
get() {
|
|
421
|
+
return currentTarget;
|
|
422
|
+
},
|
|
423
|
+
...enumerableProperty
|
|
424
|
+
},
|
|
425
|
+
eventPhase: {
|
|
426
|
+
get() {
|
|
427
|
+
return eventPhase;
|
|
428
|
+
},
|
|
429
|
+
...enumerableProperty
|
|
430
|
+
},
|
|
431
|
+
composedPath: {
|
|
432
|
+
value: () => composedPath,
|
|
433
|
+
...enumerableProperty
|
|
434
|
+
},
|
|
435
|
+
stopPropagation: {
|
|
436
|
+
value: () => {
|
|
437
|
+
stopPropagation = true;
|
|
438
|
+
originalStopPropagation.call(event);
|
|
439
|
+
},
|
|
440
|
+
...enumerableProperty
|
|
441
|
+
},
|
|
442
|
+
stopImmediatePropagation: {
|
|
443
|
+
value: () => {
|
|
444
|
+
stopImmediatePropagation = true;
|
|
445
|
+
originalStopImmediatePropagation.call(event);
|
|
446
|
+
},
|
|
447
|
+
...enumerableProperty
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
const invokeEventListener = (listener, options, eventListenerMap) => {
|
|
451
|
+
if (typeof listener === "function") listener(event);
|
|
452
|
+
else if (typeof listener?.handleEvent === "function") listener.handleEvent(event);
|
|
453
|
+
if (options.once) eventListenerMap.delete(listener);
|
|
454
|
+
};
|
|
455
|
+
const finishDispatch = () => {
|
|
456
|
+
currentTarget = null;
|
|
457
|
+
eventPhase = EventShimWithRealType.NONE;
|
|
458
|
+
return !event.defaultPrevented;
|
|
459
|
+
};
|
|
460
|
+
const captureEventPath = composedPath.slice().reverse();
|
|
461
|
+
target = !this.__host || !event.composed ? this : null;
|
|
462
|
+
const retarget = (eventTargets) => {
|
|
463
|
+
tmpTarget = this;
|
|
464
|
+
while (tmpTarget.__host && eventTargets.includes(tmpTarget.__host)) tmpTarget = tmpTarget.__host;
|
|
465
|
+
};
|
|
466
|
+
for (const eventTarget of captureEventPath) {
|
|
467
|
+
if (!target && (!tmpTarget || tmpTarget === eventTarget.__host)) retarget(captureEventPath.slice(captureEventPath.indexOf(eventTarget)));
|
|
468
|
+
currentTarget = eventTarget;
|
|
469
|
+
eventPhase = eventTarget === event.target ? EventShimWithRealType.AT_TARGET : EventShimWithRealType.CAPTURING_PHASE;
|
|
470
|
+
const captureEventListeners = eventTarget.__captureEventListeners.get(event.type);
|
|
471
|
+
if (captureEventListeners) for (const [listener, options] of captureEventListeners) {
|
|
472
|
+
invokeEventListener(listener, options, captureEventListeners);
|
|
473
|
+
if (stopImmediatePropagation) return finishDispatch();
|
|
474
|
+
}
|
|
475
|
+
if (stopPropagation) return finishDispatch();
|
|
476
|
+
}
|
|
477
|
+
const bubbleEventPath = event.bubbles ? composedPath : [this];
|
|
478
|
+
tmpTarget = null;
|
|
479
|
+
for (const eventTarget of bubbleEventPath) {
|
|
480
|
+
if (!target && (!tmpTarget || eventTarget === tmpTarget.__host)) retarget(bubbleEventPath.slice(0, bubbleEventPath.indexOf(eventTarget) + 1));
|
|
481
|
+
currentTarget = eventTarget;
|
|
482
|
+
eventPhase = eventTarget === event.target ? EventShimWithRealType.AT_TARGET : EventShimWithRealType.BUBBLING_PHASE;
|
|
483
|
+
const eventListeners = eventTarget.__eventListeners.get(event.type);
|
|
484
|
+
if (eventListeners) for (const [listener, options] of eventListeners) {
|
|
485
|
+
invokeEventListener(listener, options, eventListeners);
|
|
486
|
+
if (stopImmediatePropagation) return finishDispatch();
|
|
487
|
+
}
|
|
488
|
+
if (stopPropagation) return finishDispatch();
|
|
489
|
+
}
|
|
490
|
+
return finishDispatch();
|
|
491
|
+
}
|
|
492
|
+
__resolveFullEventPath() {
|
|
493
|
+
if (this.__eventPathCache) return this.__eventPathCache;
|
|
494
|
+
else if (!this.__eventTargetParent) return this.__eventPathCache = [
|
|
495
|
+
this,
|
|
496
|
+
documentShim,
|
|
497
|
+
windowShim
|
|
498
|
+
];
|
|
499
|
+
else return this.__eventPathCache = [this, ...this.__eventTargetParent.__resolveFullEventPath()];
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
var attributes = /* @__PURE__ */ new WeakMap();
|
|
503
|
+
var attributesForElement = (element) => {
|
|
504
|
+
let attrs = attributes.get(element);
|
|
505
|
+
if (attrs === void 0) attributes.set(element, attrs = /* @__PURE__ */ new Map());
|
|
506
|
+
return attrs;
|
|
507
|
+
};
|
|
508
|
+
var NodeShim = class Node extends EventTarget$1 {
|
|
509
|
+
getRootNode(options) {
|
|
510
|
+
if (options?.composed) return document$1;
|
|
511
|
+
return this.__host?.__shadowRoot ?? document$1;
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
var DocumentShim = class Document extends NodeShim {
|
|
515
|
+
get adoptedStyleSheets() {
|
|
516
|
+
return [];
|
|
517
|
+
}
|
|
518
|
+
createTreeWalker() {
|
|
519
|
+
return {};
|
|
520
|
+
}
|
|
521
|
+
createTextNode() {
|
|
522
|
+
return {};
|
|
523
|
+
}
|
|
524
|
+
createElement() {
|
|
525
|
+
return {};
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
var documentShim = new DocumentShim();
|
|
529
|
+
var document$1 = documentShim;
|
|
530
|
+
var WindowShim = class Window extends NodeShim {
|
|
531
|
+
constructor(token) {
|
|
532
|
+
super();
|
|
533
|
+
if (token !== constructionToken) throw new TypeError("Illegal constructor");
|
|
534
|
+
Object.assign(this, globalThis, {
|
|
535
|
+
CustomElementRegistry,
|
|
536
|
+
customElements: customElements$1,
|
|
537
|
+
document: document$1,
|
|
538
|
+
Document: DocumentShim,
|
|
539
|
+
Element: ElementShim,
|
|
540
|
+
EventTarget: EventTarget$1,
|
|
541
|
+
HTMLElement: HTMLElementShim,
|
|
542
|
+
Node: NodeShim,
|
|
543
|
+
ShadowRoot: ShadowRootShim,
|
|
544
|
+
window: this,
|
|
545
|
+
Window: WindowShim
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
var ElementShim = class Element extends NodeShim {
|
|
550
|
+
constructor() {
|
|
551
|
+
super(...arguments);
|
|
552
|
+
this.__shadowRootMode = null;
|
|
553
|
+
this.__shadowRoot = null;
|
|
554
|
+
this.__internals = null;
|
|
555
|
+
}
|
|
556
|
+
get attributes() {
|
|
557
|
+
return Array.from(attributesForElement(this)).map(([name, value]) => ({
|
|
558
|
+
name,
|
|
559
|
+
value
|
|
560
|
+
}));
|
|
561
|
+
}
|
|
562
|
+
get shadowRoot() {
|
|
563
|
+
if (this.__shadowRootMode === "closed") return null;
|
|
564
|
+
return this.__shadowRoot;
|
|
565
|
+
}
|
|
566
|
+
get localName() {
|
|
567
|
+
return this.constructor.__localName;
|
|
568
|
+
}
|
|
569
|
+
get tagName() {
|
|
570
|
+
return this.localName?.toUpperCase();
|
|
571
|
+
}
|
|
572
|
+
setAttribute(name, value) {
|
|
573
|
+
attributesForElement(this).set(name, String(value));
|
|
574
|
+
}
|
|
575
|
+
removeAttribute(name) {
|
|
576
|
+
attributesForElement(this).delete(name);
|
|
577
|
+
}
|
|
578
|
+
toggleAttribute(name, force) {
|
|
579
|
+
if (this.hasAttribute(name)) {
|
|
580
|
+
if (force === void 0 || !force) {
|
|
581
|
+
this.removeAttribute(name);
|
|
582
|
+
return false;
|
|
583
|
+
}
|
|
584
|
+
} else if (force === void 0 || force) {
|
|
585
|
+
this.setAttribute(name, "");
|
|
586
|
+
return true;
|
|
587
|
+
} else return false;
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
hasAttribute(name) {
|
|
591
|
+
return attributesForElement(this).has(name);
|
|
592
|
+
}
|
|
593
|
+
attachShadow(init) {
|
|
594
|
+
this.__shadowRootMode = init.mode;
|
|
595
|
+
const shadowRoot = new ShadowRootShim(constructionToken, init);
|
|
596
|
+
shadowRoot.__eventTargetParent = this;
|
|
597
|
+
shadowRoot.__host = this;
|
|
598
|
+
return this.__shadowRoot = shadowRoot;
|
|
599
|
+
}
|
|
600
|
+
attachInternals() {
|
|
601
|
+
if (this.__internals !== null) throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
|
|
602
|
+
const internals = new ElementInternalsShim(this);
|
|
603
|
+
this.__internals = internals;
|
|
604
|
+
return internals;
|
|
605
|
+
}
|
|
606
|
+
getAttribute(name) {
|
|
607
|
+
return attributesForElement(this).get(name) ?? null;
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
var HTMLElementShim = class HTMLElement extends ElementShim {};
|
|
611
|
+
var HTMLElementShimWithRealType = HTMLElementShim;
|
|
612
|
+
var ShadowRootShim = class ShadowRoot extends NodeShim {
|
|
613
|
+
get host() {
|
|
614
|
+
return this.__host;
|
|
615
|
+
}
|
|
616
|
+
constructor(constructionToken, init) {
|
|
617
|
+
super();
|
|
618
|
+
if (constructionToken !== constructionToken) throw new TypeError("Illegal constructor");
|
|
619
|
+
this.mode = init.mode;
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
globalThis.litServerRoot ??= Object.defineProperty(new HTMLElementShimWithRealType(), "localName", { get() {
|
|
623
|
+
return "lit-server-root";
|
|
624
|
+
} });
|
|
625
|
+
function promiseWithResolvers() {
|
|
626
|
+
let resolve;
|
|
627
|
+
let reject;
|
|
628
|
+
return {
|
|
629
|
+
promise: new Promise((res, rej) => {
|
|
630
|
+
resolve = res;
|
|
631
|
+
reject = rej;
|
|
632
|
+
}),
|
|
633
|
+
resolve,
|
|
634
|
+
reject
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
var CustomElementRegistry = class {
|
|
638
|
+
constructor() {
|
|
639
|
+
this.__definitions = /* @__PURE__ */ new Map();
|
|
640
|
+
this.__reverseDefinitions = /* @__PURE__ */ new Map();
|
|
641
|
+
this.__pendingWhenDefineds = /* @__PURE__ */ new Map();
|
|
642
|
+
}
|
|
643
|
+
define(name, ctor) {
|
|
644
|
+
if (this.__definitions.has(name)) {
|
|
645
|
+
if (process.env.NODE_ENV === "development") console.warn(`'CustomElementRegistry' already has "${name}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`);
|
|
646
|
+
else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${name}" has already been used with this registry`);
|
|
647
|
+
}
|
|
648
|
+
if (this.__reverseDefinitions.has(ctor)) throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(ctor)}`);
|
|
649
|
+
ctor.__localName = name;
|
|
650
|
+
this.__definitions.set(name, {
|
|
651
|
+
ctor,
|
|
652
|
+
observedAttributes: ctor.observedAttributes ?? []
|
|
653
|
+
});
|
|
654
|
+
this.__reverseDefinitions.set(ctor, name);
|
|
655
|
+
this.__pendingWhenDefineds.get(name)?.resolve(ctor);
|
|
656
|
+
this.__pendingWhenDefineds.delete(name);
|
|
657
|
+
}
|
|
658
|
+
get(name) {
|
|
659
|
+
return this.__definitions.get(name)?.ctor;
|
|
660
|
+
}
|
|
661
|
+
getName(ctor) {
|
|
662
|
+
return this.__reverseDefinitions.get(ctor) ?? null;
|
|
663
|
+
}
|
|
664
|
+
initialize(_root) {
|
|
665
|
+
throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.");
|
|
666
|
+
}
|
|
667
|
+
upgrade(_element) {
|
|
668
|
+
throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.");
|
|
669
|
+
}
|
|
670
|
+
async whenDefined(name) {
|
|
671
|
+
const definition = this.__definitions.get(name);
|
|
672
|
+
if (definition) return definition.ctor;
|
|
673
|
+
let withResolvers = this.__pendingWhenDefineds.get(name);
|
|
674
|
+
if (!withResolvers) {
|
|
675
|
+
withResolvers = promiseWithResolvers();
|
|
676
|
+
this.__pendingWhenDefineds.set(name, withResolvers);
|
|
677
|
+
}
|
|
678
|
+
return withResolvers.promise;
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
var customElements$1 = new CustomElementRegistry();
|
|
682
|
+
var windowShim = new WindowShim(constructionToken);
|
|
683
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/css-tag.js
|
|
684
|
+
/**
|
|
685
|
+
* @license
|
|
686
|
+
* Copyright 2019 Google LLC
|
|
687
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
688
|
+
*/
|
|
689
|
+
var t$2 = globalThis;
|
|
690
|
+
var e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
691
|
+
var s$2 = Symbol();
|
|
692
|
+
var o$5 = /* @__PURE__ */ new WeakMap();
|
|
693
|
+
var n$4 = class {
|
|
694
|
+
constructor(t, e, o) {
|
|
695
|
+
if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
696
|
+
this.cssText = t, this.t = e;
|
|
697
|
+
}
|
|
698
|
+
get styleSheet() {
|
|
699
|
+
let t = this.o;
|
|
700
|
+
const s = this.t;
|
|
701
|
+
if (e$5 && void 0 === t) {
|
|
702
|
+
const e = void 0 !== s && 1 === s.length;
|
|
703
|
+
e && (t = o$5.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$5.set(s, t));
|
|
704
|
+
}
|
|
705
|
+
return t;
|
|
706
|
+
}
|
|
707
|
+
toString() {
|
|
708
|
+
return this.cssText;
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
var r$4 = (t) => new n$4("string" == typeof t ? t : t + "", void 0, s$2);
|
|
712
|
+
var i$4 = (t, ...e) => {
|
|
713
|
+
return new n$4(1 === t.length ? t[0] : e.reduce((e, s, o) => e + ((t) => {
|
|
714
|
+
if (!0 === t._$cssResult$) return t.cssText;
|
|
715
|
+
if ("number" == typeof t) return t;
|
|
716
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
717
|
+
})(s) + t[o + 1], t[0]), t, s$2);
|
|
718
|
+
};
|
|
719
|
+
var S$1 = (s, o) => {
|
|
720
|
+
if (e$5) s.adoptedStyleSheets = o.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
721
|
+
else for (const e of o) {
|
|
722
|
+
const o = document.createElement("style"), n = t$2.litNonce;
|
|
723
|
+
void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
var c$3 = e$5 || void 0 === t$2.CSSStyleSheet ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => {
|
|
727
|
+
let e = "";
|
|
728
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
729
|
+
return r$4(e);
|
|
730
|
+
})(t) : t;
|
|
731
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/reactive-element.js
|
|
732
|
+
var { is: h$1, defineProperty: r$3, getOwnPropertyDescriptor: o$4, getOwnPropertyNames: n$3, getOwnPropertySymbols: a$2, getPrototypeOf: c$2 } = Object, l$2 = globalThis;
|
|
733
|
+
l$2.customElements ??= customElements$1;
|
|
734
|
+
var p$1 = l$2.trustedTypes;
|
|
735
|
+
var d$1 = p$1 ? p$1.emptyScript : "";
|
|
736
|
+
var u$2 = l$2.reactiveElementPolyfillSupport;
|
|
737
|
+
var f$1 = (t, s) => t;
|
|
738
|
+
var b$1 = {
|
|
739
|
+
toAttribute(t, s) {
|
|
740
|
+
switch (s) {
|
|
741
|
+
case Boolean:
|
|
742
|
+
t = t ? d$1 : null;
|
|
743
|
+
break;
|
|
744
|
+
case Object:
|
|
745
|
+
case Array: t = null == t ? t : JSON.stringify(t);
|
|
746
|
+
}
|
|
747
|
+
return t;
|
|
748
|
+
},
|
|
749
|
+
fromAttribute(t, s) {
|
|
750
|
+
let i = t;
|
|
751
|
+
switch (s) {
|
|
752
|
+
case Boolean:
|
|
753
|
+
i = null !== t;
|
|
754
|
+
break;
|
|
755
|
+
case Number:
|
|
756
|
+
i = null === t ? null : Number(t);
|
|
757
|
+
break;
|
|
758
|
+
case Object:
|
|
759
|
+
case Array: try {
|
|
760
|
+
i = JSON.parse(t);
|
|
761
|
+
} catch (t) {
|
|
762
|
+
i = null;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return i;
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
var m$1 = (t, s) => !h$1(t, s);
|
|
769
|
+
var y$1 = {
|
|
770
|
+
attribute: !0,
|
|
771
|
+
type: String,
|
|
772
|
+
converter: b$1,
|
|
773
|
+
reflect: !1,
|
|
774
|
+
useDefault: !1,
|
|
775
|
+
hasChanged: m$1
|
|
776
|
+
};
|
|
777
|
+
Symbol.metadata ??= Symbol("metadata"), l$2.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
778
|
+
var g$1 = class extends (globalThis.HTMLElement ?? HTMLElementShimWithRealType) {
|
|
779
|
+
static addInitializer(t) {
|
|
780
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
781
|
+
}
|
|
782
|
+
static get observedAttributes() {
|
|
783
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
784
|
+
}
|
|
785
|
+
static createProperty(t, s = y$1) {
|
|
786
|
+
if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
787
|
+
const i = Symbol(), e = this.getPropertyDescriptor(t, i, s);
|
|
788
|
+
void 0 !== e && r$3(this.prototype, t, e);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
static getPropertyDescriptor(t, s, i) {
|
|
792
|
+
const { get: e, set: h } = o$4(this.prototype, t) ?? {
|
|
793
|
+
get() {
|
|
794
|
+
return this[s];
|
|
795
|
+
},
|
|
796
|
+
set(t) {
|
|
797
|
+
this[s] = t;
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
return {
|
|
801
|
+
get: e,
|
|
802
|
+
set(s) {
|
|
803
|
+
const r = e?.call(this);
|
|
804
|
+
h?.call(this, s), this.requestUpdate(t, r, i);
|
|
805
|
+
},
|
|
806
|
+
configurable: !0,
|
|
807
|
+
enumerable: !0
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
static getPropertyOptions(t) {
|
|
811
|
+
return this.elementProperties.get(t) ?? y$1;
|
|
812
|
+
}
|
|
813
|
+
static _$Ei() {
|
|
814
|
+
if (this.hasOwnProperty(f$1("elementProperties"))) return;
|
|
815
|
+
const t = c$2(this);
|
|
816
|
+
t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
817
|
+
}
|
|
818
|
+
static finalize() {
|
|
819
|
+
if (this.hasOwnProperty(f$1("finalized"))) return;
|
|
820
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(f$1("properties"))) {
|
|
821
|
+
const t = this.properties, s = [...n$3(t), ...a$2(t)];
|
|
822
|
+
for (const i of s) this.createProperty(i, t[i]);
|
|
823
|
+
}
|
|
824
|
+
const t = this[Symbol.metadata];
|
|
825
|
+
if (null !== t) {
|
|
826
|
+
const s = litPropertyMetadata.get(t);
|
|
827
|
+
if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
|
|
828
|
+
}
|
|
829
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
830
|
+
for (const [t, s] of this.elementProperties) {
|
|
831
|
+
const i = this._$Eu(t, s);
|
|
832
|
+
void 0 !== i && this._$Eh.set(i, t);
|
|
833
|
+
}
|
|
834
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
835
|
+
}
|
|
836
|
+
static finalizeStyles(t) {
|
|
837
|
+
const s = [];
|
|
838
|
+
if (Array.isArray(t)) {
|
|
839
|
+
const e = new Set(t.flat(1 / 0).reverse());
|
|
840
|
+
for (const t of e) s.unshift(c$3(t));
|
|
841
|
+
} else void 0 !== t && s.push(c$3(t));
|
|
842
|
+
return s;
|
|
843
|
+
}
|
|
844
|
+
static _$Eu(t, s) {
|
|
845
|
+
const i = s.attribute;
|
|
846
|
+
return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
847
|
+
}
|
|
848
|
+
constructor() {
|
|
849
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
850
|
+
}
|
|
851
|
+
_$Ev() {
|
|
852
|
+
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
|
|
853
|
+
}
|
|
854
|
+
addController(t) {
|
|
855
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
856
|
+
}
|
|
857
|
+
removeController(t) {
|
|
858
|
+
this._$EO?.delete(t);
|
|
859
|
+
}
|
|
860
|
+
_$E_() {
|
|
861
|
+
const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
|
|
862
|
+
for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
863
|
+
t.size > 0 && (this._$Ep = t);
|
|
864
|
+
}
|
|
865
|
+
createRenderRoot() {
|
|
866
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
867
|
+
return S$1(t, this.constructor.elementStyles), t;
|
|
868
|
+
}
|
|
869
|
+
connectedCallback() {
|
|
870
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
|
|
871
|
+
}
|
|
872
|
+
enableUpdating(t) {}
|
|
873
|
+
disconnectedCallback() {
|
|
874
|
+
this._$EO?.forEach((t) => t.hostDisconnected?.());
|
|
875
|
+
}
|
|
876
|
+
attributeChangedCallback(t, s, i) {
|
|
877
|
+
this._$AK(t, i);
|
|
878
|
+
}
|
|
879
|
+
_$ET(t, s) {
|
|
880
|
+
const i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
|
|
881
|
+
if (void 0 !== e && !0 === i.reflect) {
|
|
882
|
+
const h = (void 0 !== i.converter?.toAttribute ? i.converter : b$1).toAttribute(s, i.type);
|
|
883
|
+
this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
_$AK(t, s) {
|
|
887
|
+
const i = this.constructor, e = i._$Eh.get(t);
|
|
888
|
+
if (void 0 !== e && this._$Em !== e) {
|
|
889
|
+
const t = i.getPropertyOptions(e), h = "function" == typeof t.converter ? { fromAttribute: t.converter } : void 0 !== t.converter?.fromAttribute ? t.converter : b$1;
|
|
890
|
+
this._$Em = e;
|
|
891
|
+
const r = h.fromAttribute(s, t.type);
|
|
892
|
+
this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
requestUpdate(t, s, i, e = !1, h) {
|
|
896
|
+
if (void 0 !== t) {
|
|
897
|
+
const r = this.constructor;
|
|
898
|
+
if (!1 === e && (h = this[t]), i ??= r.getPropertyOptions(t), !((i.hasChanged ?? m$1)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
899
|
+
this.C(t, s, i);
|
|
900
|
+
}
|
|
901
|
+
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
902
|
+
}
|
|
903
|
+
C(t, s, { useDefault: i, reflect: e, wrapped: h }, r) {
|
|
904
|
+
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), !0 !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), !0 === e && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
905
|
+
}
|
|
906
|
+
async _$EP() {
|
|
907
|
+
this.isUpdatePending = !0;
|
|
908
|
+
try {
|
|
909
|
+
await this._$ES;
|
|
910
|
+
} catch (t) {
|
|
911
|
+
Promise.reject(t);
|
|
912
|
+
}
|
|
913
|
+
const t = this.scheduleUpdate();
|
|
914
|
+
return null != t && await t, !this.isUpdatePending;
|
|
915
|
+
}
|
|
916
|
+
scheduleUpdate() {
|
|
917
|
+
return this.performUpdate();
|
|
918
|
+
}
|
|
919
|
+
performUpdate() {
|
|
920
|
+
if (!this.isUpdatePending) return;
|
|
921
|
+
if (!this.hasUpdated) {
|
|
922
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
923
|
+
for (const [t, s] of this._$Ep) this[t] = s;
|
|
924
|
+
this._$Ep = void 0;
|
|
925
|
+
}
|
|
926
|
+
const t = this.constructor.elementProperties;
|
|
927
|
+
if (t.size > 0) for (const [s, i] of t) {
|
|
928
|
+
const { wrapped: t } = i, e = this[s];
|
|
929
|
+
!0 !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
let t = !1;
|
|
933
|
+
const s = this._$AL;
|
|
934
|
+
try {
|
|
935
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((t) => t.hostUpdate?.()), this.update(s)) : this._$EM();
|
|
936
|
+
} catch (s) {
|
|
937
|
+
throw t = !1, this._$EM(), s;
|
|
938
|
+
}
|
|
939
|
+
t && this._$AE(s);
|
|
940
|
+
}
|
|
941
|
+
willUpdate(t) {}
|
|
942
|
+
_$AE(t) {
|
|
943
|
+
this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
944
|
+
}
|
|
945
|
+
_$EM() {
|
|
946
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
947
|
+
}
|
|
948
|
+
get updateComplete() {
|
|
949
|
+
return this.getUpdateComplete();
|
|
950
|
+
}
|
|
951
|
+
getUpdateComplete() {
|
|
952
|
+
return this._$ES;
|
|
953
|
+
}
|
|
954
|
+
shouldUpdate(t) {
|
|
955
|
+
return !0;
|
|
956
|
+
}
|
|
957
|
+
update(t) {
|
|
958
|
+
this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
|
|
959
|
+
}
|
|
960
|
+
updated(t) {}
|
|
961
|
+
firstUpdated(t) {}
|
|
962
|
+
};
|
|
963
|
+
g$1.elementStyles = [], g$1.shadowRootOptions = { mode: "open" }, g$1[f$1("elementProperties")] = /* @__PURE__ */ new Map(), g$1[f$1("finalized")] = /* @__PURE__ */ new Map(), u$2?.({ ReactiveElement: g$1 }), (l$2.reactiveElementVersions ??= []).push("2.1.2");
|
|
964
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/property.js
|
|
965
|
+
/**
|
|
966
|
+
* @license
|
|
967
|
+
* Copyright 2017 Google LLC
|
|
968
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
969
|
+
*/ var o$3 = {
|
|
970
|
+
attribute: !0,
|
|
971
|
+
type: String,
|
|
972
|
+
converter: b$1,
|
|
973
|
+
reflect: !1,
|
|
974
|
+
hasChanged: m$1
|
|
975
|
+
};
|
|
976
|
+
var r$2 = (t = o$3, e, r) => {
|
|
977
|
+
const { kind: n, metadata: i } = r;
|
|
978
|
+
let s = globalThis.litPropertyMetadata.get(i);
|
|
979
|
+
if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), "setter" === n && ((t = Object.create(t)).wrapped = !0), s.set(r.name, t), "accessor" === n) {
|
|
980
|
+
const { name: o } = r;
|
|
981
|
+
return {
|
|
982
|
+
set(r) {
|
|
983
|
+
const n = e.get.call(this);
|
|
984
|
+
e.set.call(this, r), this.requestUpdate(o, n, t, !0, r);
|
|
985
|
+
},
|
|
986
|
+
init(e) {
|
|
987
|
+
return void 0 !== e && this.C(o, void 0, t, e), e;
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
if ("setter" === n) {
|
|
992
|
+
const { name: o } = r;
|
|
993
|
+
return function(r) {
|
|
994
|
+
const n = this[o];
|
|
995
|
+
e.call(this, r), this.requestUpdate(o, n, t, !0, r);
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
throw Error("Unsupported decorator location: " + n);
|
|
999
|
+
};
|
|
1000
|
+
function n$2(t) {
|
|
1001
|
+
return (e, o) => "object" == typeof o ? r$2(t, e, o) : ((t, e, o) => {
|
|
1002
|
+
const r = e.hasOwnProperty(o);
|
|
1003
|
+
return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
|
|
1004
|
+
})(t, e, o);
|
|
1005
|
+
}
|
|
1006
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/state.js
|
|
1007
|
+
/**
|
|
1008
|
+
* @license
|
|
1009
|
+
* Copyright 2017 Google LLC
|
|
1010
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1011
|
+
*/ function r$1(r) {
|
|
1012
|
+
return n$2({
|
|
1013
|
+
...r,
|
|
1014
|
+
state: !0,
|
|
1015
|
+
attribute: !1
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/base.js
|
|
1019
|
+
/**
|
|
1020
|
+
* @license
|
|
1021
|
+
* Copyright 2017 Google LLC
|
|
1022
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1023
|
+
*/
|
|
1024
|
+
var e$4 = (e, t, c) => (c.configurable = !0, c.enumerable = !0, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
|
|
1025
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/query.js
|
|
1026
|
+
/**
|
|
1027
|
+
* @license
|
|
1028
|
+
* Copyright 2017 Google LLC
|
|
1029
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1030
|
+
*/ function e$3(e, r) {
|
|
1031
|
+
return (n, s, i) => {
|
|
1032
|
+
const o = (t) => t.renderRoot?.querySelector(e) ?? null;
|
|
1033
|
+
if (r) {
|
|
1034
|
+
const { get: e, set: r } = "object" == typeof s ? n : i ?? (() => {
|
|
1035
|
+
const t = Symbol();
|
|
1036
|
+
return {
|
|
1037
|
+
get() {
|
|
1038
|
+
return this[t];
|
|
1039
|
+
},
|
|
1040
|
+
set(e) {
|
|
1041
|
+
this[t] = e;
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
})();
|
|
1045
|
+
return e$4(n, s, { get() {
|
|
1046
|
+
let t = e.call(this);
|
|
1047
|
+
return void 0 === t && (t = o(this), (null !== t || this.hasUpdated) && r.call(this, t)), t;
|
|
1048
|
+
} });
|
|
1049
|
+
}
|
|
1050
|
+
return e$4(n, s, { get() {
|
|
1051
|
+
return o(this);
|
|
1052
|
+
} });
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/lit-html.js
|
|
1056
|
+
/**
|
|
1057
|
+
* @license
|
|
1058
|
+
* Copyright 2017 Google LLC
|
|
1059
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1060
|
+
*/
|
|
1061
|
+
var t$1 = globalThis;
|
|
1062
|
+
var i$3 = (t) => t;
|
|
1063
|
+
var s$1 = t$1.trustedTypes;
|
|
1064
|
+
var e$2 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t) => t }) : void 0;
|
|
1065
|
+
var h = "$lit$";
|
|
1066
|
+
var o$2 = `lit$${Math.random().toFixed(9).slice(2)}$`;
|
|
1067
|
+
var n$1 = "?" + o$2;
|
|
1068
|
+
var r = `<${n$1}>`;
|
|
1069
|
+
var l$1 = void 0 === t$1.document ? { createTreeWalker: () => ({}) } : document;
|
|
1070
|
+
var c$1 = () => l$1.createComment("");
|
|
1071
|
+
var a$1 = (t) => null === t || "object" != typeof t && "function" != typeof t;
|
|
1072
|
+
var u$1 = Array.isArray;
|
|
1073
|
+
var d = (t) => u$1(t) || "function" == typeof t?.[Symbol.iterator];
|
|
1074
|
+
var f = "[ \n\f\r]";
|
|
1075
|
+
var v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
|
|
1076
|
+
var _ = /-->/g;
|
|
1077
|
+
var m = />/g;
|
|
1078
|
+
var p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g");
|
|
1079
|
+
var g = /'/g;
|
|
1080
|
+
var $$1 = /"/g;
|
|
1081
|
+
var y = /^(?:script|style|textarea|title)$/i;
|
|
1082
|
+
var x = (t) => (i, ...s) => ({
|
|
1083
|
+
_$litType$: t,
|
|
1084
|
+
strings: i,
|
|
1085
|
+
values: s
|
|
1086
|
+
});
|
|
1087
|
+
var T = x(1);
|
|
1088
|
+
var E = Symbol.for("lit-noChange");
|
|
1089
|
+
var A = Symbol.for("lit-nothing");
|
|
1090
|
+
var C = /* @__PURE__ */ new WeakMap();
|
|
1091
|
+
var P = l$1.createTreeWalker(l$1, 129);
|
|
1092
|
+
function V(t, i) {
|
|
1093
|
+
if (!u$1(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1094
|
+
return void 0 !== e$2 ? e$2.createHTML(i) : i;
|
|
1095
|
+
}
|
|
1096
|
+
var N = (t, i) => {
|
|
1097
|
+
const s = t.length - 1, e = [];
|
|
1098
|
+
let n, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = v;
|
|
1099
|
+
for (let i = 0; i < s; i++) {
|
|
1100
|
+
const s = t[i];
|
|
1101
|
+
let a, u, d = -1, f = 0;
|
|
1102
|
+
for (; f < s.length && (c.lastIndex = f, u = c.exec(s), null !== u);) f = c.lastIndex, c === v ? "!--" === u[1] ? c = _ : void 0 !== u[1] ? c = m : void 0 !== u[2] ? (y.test(u[2]) && (n = RegExp("</" + u[2], "g")), c = p) : void 0 !== u[3] && (c = p) : c === p ? ">" === u[0] ? (c = n ?? v, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p : "\"" === u[3] ? $$1 : g) : c === $$1 || c === g ? c = p : c === _ || c === m ? c = v : (c = p, n = void 0);
|
|
1103
|
+
const x = c === p && t[i + 1].startsWith("/>") ? " " : "";
|
|
1104
|
+
l += c === v ? s + r : d >= 0 ? (e.push(a), s.slice(0, d) + h + s.slice(d) + o$2 + x) : s + o$2 + (-2 === d ? i : x);
|
|
1105
|
+
}
|
|
1106
|
+
return [V(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), e];
|
|
1107
|
+
};
|
|
1108
|
+
var S = class S {
|
|
1109
|
+
constructor({ strings: t, _$litType$: i }, e) {
|
|
1110
|
+
let r;
|
|
1111
|
+
this.parts = [];
|
|
1112
|
+
let l = 0, a = 0;
|
|
1113
|
+
const u = t.length - 1, d = this.parts, [f, v] = N(t, i);
|
|
1114
|
+
if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) {
|
|
1115
|
+
const t = this.el.content.firstChild;
|
|
1116
|
+
t.replaceWith(...t.childNodes);
|
|
1117
|
+
}
|
|
1118
|
+
for (; null !== (r = P.nextNode()) && d.length < u;) {
|
|
1119
|
+
if (1 === r.nodeType) {
|
|
1120
|
+
if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(h)) {
|
|
1121
|
+
const i = v[a++], s = r.getAttribute(t).split(o$2), e = /([.?@])?(.*)/.exec(i);
|
|
1122
|
+
d.push({
|
|
1123
|
+
type: 1,
|
|
1124
|
+
index: l,
|
|
1125
|
+
name: e[2],
|
|
1126
|
+
strings: s,
|
|
1127
|
+
ctor: "." === e[1] ? I : "?" === e[1] ? L : "@" === e[1] ? z : H
|
|
1128
|
+
}), r.removeAttribute(t);
|
|
1129
|
+
} else t.startsWith(o$2) && (d.push({
|
|
1130
|
+
type: 6,
|
|
1131
|
+
index: l
|
|
1132
|
+
}), r.removeAttribute(t));
|
|
1133
|
+
if (y.test(r.tagName)) {
|
|
1134
|
+
const t = r.textContent.split(o$2), i = t.length - 1;
|
|
1135
|
+
if (i > 0) {
|
|
1136
|
+
r.textContent = s$1 ? s$1.emptyScript : "";
|
|
1137
|
+
for (let s = 0; s < i; s++) r.append(t[s], c$1()), P.nextNode(), d.push({
|
|
1138
|
+
type: 2,
|
|
1139
|
+
index: ++l
|
|
1140
|
+
});
|
|
1141
|
+
r.append(t[i], c$1());
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
} else if (8 === r.nodeType) if (r.data === n$1) d.push({
|
|
1145
|
+
type: 2,
|
|
1146
|
+
index: l
|
|
1147
|
+
});
|
|
1148
|
+
else {
|
|
1149
|
+
let t = -1;
|
|
1150
|
+
for (; -1 !== (t = r.data.indexOf(o$2, t + 1));) d.push({
|
|
1151
|
+
type: 7,
|
|
1152
|
+
index: l
|
|
1153
|
+
}), t += o$2.length - 1;
|
|
1154
|
+
}
|
|
1155
|
+
l++;
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
static createElement(t, i) {
|
|
1159
|
+
const s = l$1.createElement("template");
|
|
1160
|
+
return s.innerHTML = t, s;
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
function M(t, i, s = t, e) {
|
|
1164
|
+
if (i === E) return i;
|
|
1165
|
+
let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
|
|
1166
|
+
const o = a$1(i) ? void 0 : i._$litDirective$;
|
|
1167
|
+
return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
|
|
1168
|
+
}
|
|
1169
|
+
var k = class {
|
|
1170
|
+
constructor(t, i) {
|
|
1171
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
1172
|
+
}
|
|
1173
|
+
get parentNode() {
|
|
1174
|
+
return this._$AM.parentNode;
|
|
1175
|
+
}
|
|
1176
|
+
get _$AU() {
|
|
1177
|
+
return this._$AM._$AU;
|
|
1178
|
+
}
|
|
1179
|
+
u(t) {
|
|
1180
|
+
const { el: { content: i }, parts: s } = this._$AD, e = (t?.creationScope ?? l$1).importNode(i, !0);
|
|
1181
|
+
P.currentNode = e;
|
|
1182
|
+
let h = P.nextNode(), o = 0, n = 0, r = s[0];
|
|
1183
|
+
for (; void 0 !== r;) {
|
|
1184
|
+
if (o === r.index) {
|
|
1185
|
+
let i;
|
|
1186
|
+
2 === r.type ? i = new R(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new W(h, this, t)), this._$AV.push(i), r = s[++n];
|
|
1187
|
+
}
|
|
1188
|
+
o !== r?.index && (h = P.nextNode(), o++);
|
|
1189
|
+
}
|
|
1190
|
+
return P.currentNode = l$1, e;
|
|
1191
|
+
}
|
|
1192
|
+
p(t) {
|
|
1193
|
+
let i = 0;
|
|
1194
|
+
for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
var R = class R {
|
|
1198
|
+
get _$AU() {
|
|
1199
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
1200
|
+
}
|
|
1201
|
+
constructor(t, i, s, e) {
|
|
1202
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
|
|
1203
|
+
}
|
|
1204
|
+
get parentNode() {
|
|
1205
|
+
let t = this._$AA.parentNode;
|
|
1206
|
+
const i = this._$AM;
|
|
1207
|
+
return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
|
|
1208
|
+
}
|
|
1209
|
+
get startNode() {
|
|
1210
|
+
return this._$AA;
|
|
1211
|
+
}
|
|
1212
|
+
get endNode() {
|
|
1213
|
+
return this._$AB;
|
|
1214
|
+
}
|
|
1215
|
+
_$AI(t, i = this) {
|
|
1216
|
+
t = M(this, t, i), a$1(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d(t) ? this.k(t) : this._(t);
|
|
1217
|
+
}
|
|
1218
|
+
O(t) {
|
|
1219
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
1220
|
+
}
|
|
1221
|
+
T(t) {
|
|
1222
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
1223
|
+
}
|
|
1224
|
+
_(t) {
|
|
1225
|
+
this._$AH !== A && a$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l$1.createTextNode(t)), this._$AH = t;
|
|
1226
|
+
}
|
|
1227
|
+
$(t) {
|
|
1228
|
+
const { values: i, _$litType$: s } = t, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
|
|
1229
|
+
if (this._$AH?._$AD === e) this._$AH.p(i);
|
|
1230
|
+
else {
|
|
1231
|
+
const t = new k(e, this), s = t.u(this.options);
|
|
1232
|
+
t.p(i), this.T(s), this._$AH = t;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
_$AC(t) {
|
|
1236
|
+
let i = C.get(t.strings);
|
|
1237
|
+
return void 0 === i && C.set(t.strings, i = new S(t)), i;
|
|
1238
|
+
}
|
|
1239
|
+
k(t) {
|
|
1240
|
+
u$1(this._$AH) || (this._$AH = [], this._$AR());
|
|
1241
|
+
const i = this._$AH;
|
|
1242
|
+
let s, e = 0;
|
|
1243
|
+
for (const h of t) e === i.length ? i.push(s = new R(this.O(c$1()), this.O(c$1()), this, this.options)) : s = i[e], s._$AI(h), e++;
|
|
1244
|
+
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
1245
|
+
}
|
|
1246
|
+
_$AR(t = this._$AA.nextSibling, s) {
|
|
1247
|
+
for (this._$AP?.(!1, !0, s); t !== this._$AB;) {
|
|
1248
|
+
const s = i$3(t).nextSibling;
|
|
1249
|
+
i$3(t).remove(), t = s;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
setConnected(t) {
|
|
1253
|
+
void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
var H = class {
|
|
1257
|
+
get tagName() {
|
|
1258
|
+
return this.element.tagName;
|
|
1259
|
+
}
|
|
1260
|
+
get _$AU() {
|
|
1261
|
+
return this._$AM._$AU;
|
|
1262
|
+
}
|
|
1263
|
+
constructor(t, i, s, e, h) {
|
|
1264
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = A;
|
|
1265
|
+
}
|
|
1266
|
+
_$AI(t, i = this, s, e) {
|
|
1267
|
+
const h = this.strings;
|
|
1268
|
+
let o = !1;
|
|
1269
|
+
if (void 0 === h) t = M(this, t, i, 0), o = !a$1(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
1270
|
+
else {
|
|
1271
|
+
const e = t;
|
|
1272
|
+
let n, r;
|
|
1273
|
+
for (t = h[0], n = 0; n < h.length - 1; n++) r = M(this, e[s + n], i, n), r === E && (r = this._$AH[n]), o ||= !a$1(r) || r !== this._$AH[n], r === A ? t = A : t !== A && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
|
|
1274
|
+
}
|
|
1275
|
+
o && !e && this.j(t);
|
|
1276
|
+
}
|
|
1277
|
+
j(t) {
|
|
1278
|
+
t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
var I = class extends H {
|
|
1282
|
+
constructor() {
|
|
1283
|
+
super(...arguments), this.type = 3;
|
|
1284
|
+
}
|
|
1285
|
+
j(t) {
|
|
1286
|
+
this.element[this.name] = t === A ? void 0 : t;
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
var L = class extends H {
|
|
1290
|
+
constructor() {
|
|
1291
|
+
super(...arguments), this.type = 4;
|
|
1292
|
+
}
|
|
1293
|
+
j(t) {
|
|
1294
|
+
this.element.toggleAttribute(this.name, !!t && t !== A);
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
var z = class extends H {
|
|
1298
|
+
constructor(t, i, s, e, h) {
|
|
1299
|
+
super(t, i, s, e, h), this.type = 5;
|
|
1300
|
+
}
|
|
1301
|
+
_$AI(t, i = this) {
|
|
1302
|
+
if ((t = M(this, t, i, 0) ?? A) === E) return;
|
|
1303
|
+
const s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e);
|
|
1304
|
+
e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
1305
|
+
}
|
|
1306
|
+
handleEvent(t) {
|
|
1307
|
+
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
1308
|
+
}
|
|
1309
|
+
};
|
|
1310
|
+
var W = class {
|
|
1311
|
+
constructor(t, i, s) {
|
|
1312
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
1313
|
+
}
|
|
1314
|
+
get _$AU() {
|
|
1315
|
+
return this._$AM._$AU;
|
|
1316
|
+
}
|
|
1317
|
+
_$AI(t) {
|
|
1318
|
+
M(this, t);
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
var Z = {
|
|
1322
|
+
M: h,
|
|
1323
|
+
P: o$2,
|
|
1324
|
+
A: n$1,
|
|
1325
|
+
C: 1,
|
|
1326
|
+
L: N,
|
|
1327
|
+
R: k,
|
|
1328
|
+
D: d,
|
|
1329
|
+
V: M,
|
|
1330
|
+
I: R,
|
|
1331
|
+
H,
|
|
1332
|
+
N: L,
|
|
1333
|
+
U: z,
|
|
1334
|
+
B: I,
|
|
1335
|
+
F: W
|
|
1336
|
+
};
|
|
1337
|
+
var j = t$1.litHtmlPolyfillSupport;
|
|
1338
|
+
j?.(S, R), (t$1.litHtmlVersions ??= []).push("3.3.3");
|
|
1339
|
+
var B = (t, i, s) => {
|
|
1340
|
+
const e = s?.renderBefore ?? i;
|
|
1341
|
+
let h = e._$litPart$;
|
|
1342
|
+
if (void 0 === h) {
|
|
1343
|
+
const t = s?.renderBefore ?? null;
|
|
1344
|
+
e._$litPart$ = h = new R(i.insertBefore(c$1(), t), t, void 0, s ?? {});
|
|
1345
|
+
}
|
|
1346
|
+
return h._$AI(t), h;
|
|
1347
|
+
};
|
|
1348
|
+
// ../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js
|
|
1349
|
+
/**
|
|
1350
|
+
* @license
|
|
1351
|
+
* Copyright 2017 Google LLC
|
|
1352
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1353
|
+
*/ var s = globalThis;
|
|
1354
|
+
var i$2 = class extends g$1 {
|
|
1355
|
+
constructor() {
|
|
1356
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
1357
|
+
}
|
|
1358
|
+
createRenderRoot() {
|
|
1359
|
+
const t = super.createRenderRoot();
|
|
1360
|
+
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
1361
|
+
}
|
|
1362
|
+
update(t) {
|
|
1363
|
+
const r = this.render();
|
|
1364
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(r, this.renderRoot, this.renderOptions);
|
|
1365
|
+
}
|
|
1366
|
+
connectedCallback() {
|
|
1367
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
1368
|
+
}
|
|
1369
|
+
disconnectedCallback() {
|
|
1370
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
1371
|
+
}
|
|
1372
|
+
render() {
|
|
1373
|
+
return E;
|
|
1374
|
+
}
|
|
1375
|
+
};
|
|
1376
|
+
i$2._$litElement$ = !0, i$2["finalized"] = !0, s.litElementHydrateSupport?.({ LitElement: i$2 });
|
|
1377
|
+
var o$1 = s.litElementPolyfillSupport;
|
|
1378
|
+
o$1?.({ LitElement: i$2 });
|
|
1379
|
+
(s.litElementVersions ??= []).push("4.2.2");
|
|
1380
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/internal/icon.js
|
|
1381
|
+
/**
|
|
1382
|
+
* @license
|
|
1383
|
+
* Copyright 2022 Google LLC
|
|
1384
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1385
|
+
*/
|
|
1386
|
+
/**
|
|
1387
|
+
* An icon element.
|
|
1388
|
+
*/
|
|
1389
|
+
var Icon = class extends i$2 {
|
|
1390
|
+
render() {
|
|
1391
|
+
return T`<slot></slot>`;
|
|
1392
|
+
}
|
|
1393
|
+
connectedCallback() {
|
|
1394
|
+
super.connectedCallback();
|
|
1395
|
+
if (this.getAttribute("aria-hidden") === "false") {
|
|
1396
|
+
this.removeAttribute("aria-hidden");
|
|
1397
|
+
return;
|
|
1398
|
+
}
|
|
1399
|
+
this.setAttribute("aria-hidden", "true");
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/internal/icon-styles.cssresult.js
|
|
1403
|
+
/**
|
|
1404
|
+
* @license
|
|
1405
|
+
* Copyright 2026 Google LLC
|
|
1406
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1407
|
+
*/
|
|
1408
|
+
var styles$4 = i$4`:host{font-size:var(--md-icon-size, 24px);width:var(--md-icon-size, 24px);height:var(--md-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--md-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}
|
|
1409
|
+
`;
|
|
1410
|
+
styles$4.styleSheet;
|
|
1411
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/icon.js
|
|
1412
|
+
/**
|
|
1413
|
+
* @license
|
|
1414
|
+
* Copyright 2022 Google LLC
|
|
1415
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1416
|
+
*/
|
|
1417
|
+
/**
|
|
1418
|
+
* @final
|
|
1419
|
+
* @suppress {visibility}
|
|
1420
|
+
*/
|
|
1421
|
+
var MdIcon = class MdIcon extends Icon {};
|
|
1422
|
+
/** @nocollapse */
|
|
1423
|
+
MdIcon.styles = [styles$4];
|
|
1424
|
+
MdIcon = __decorate([t$3("md-icon")], MdIcon);
|
|
1425
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/controller/attachable-controller.js
|
|
1426
|
+
/**
|
|
1427
|
+
* @license
|
|
1428
|
+
* Copyright 2023 Google LLC
|
|
1429
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1430
|
+
*/
|
|
1431
|
+
/**
|
|
1432
|
+
* A key to retrieve an `Attachable` element's `AttachableController` from a
|
|
1433
|
+
* global `MutationObserver`.
|
|
1434
|
+
*/
|
|
1435
|
+
var ATTACHABLE_CONTROLLER = Symbol("attachableController");
|
|
1436
|
+
/**
|
|
1437
|
+
* A controller that provides an implementation for `Attachable` elements.
|
|
1438
|
+
*
|
|
1439
|
+
* @example
|
|
1440
|
+
* ```ts
|
|
1441
|
+
* class MyElement extends LitElement implements Attachable {
|
|
1442
|
+
* get control() { return this.attachableController.control; }
|
|
1443
|
+
*
|
|
1444
|
+
* private readonly attachableController = new AttachableController(
|
|
1445
|
+
* this,
|
|
1446
|
+
* (previousControl, newControl) => {
|
|
1447
|
+
* previousControl?.removeEventListener('click', this.handleClick);
|
|
1448
|
+
* newControl?.addEventListener('click', this.handleClick);
|
|
1449
|
+
* }
|
|
1450
|
+
* );
|
|
1451
|
+
*
|
|
1452
|
+
* // Implement remaining `Attachable` properties/methods that call the
|
|
1453
|
+
* // controller's properties/methods.
|
|
1454
|
+
* }
|
|
1455
|
+
* ```
|
|
1456
|
+
*/
|
|
1457
|
+
var AttachableController = class {
|
|
1458
|
+
get htmlFor() {
|
|
1459
|
+
return this.host.getAttribute("for");
|
|
1460
|
+
}
|
|
1461
|
+
set htmlFor(htmlFor) {
|
|
1462
|
+
if (htmlFor === null) this.host.removeAttribute("for");
|
|
1463
|
+
else this.host.setAttribute("for", htmlFor);
|
|
1464
|
+
}
|
|
1465
|
+
get control() {
|
|
1466
|
+
if (this.host.hasAttribute("for")) {
|
|
1467
|
+
if (!this.htmlFor || !this.host.isConnected) return null;
|
|
1468
|
+
return this.host.getRootNode().querySelector(`#${this.htmlFor}`);
|
|
1469
|
+
}
|
|
1470
|
+
return this.currentControl || this.host.parentElement;
|
|
1471
|
+
}
|
|
1472
|
+
set control(control) {
|
|
1473
|
+
if (control) this.attach(control);
|
|
1474
|
+
else this.detach();
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Creates a new controller for an `Attachable` element.
|
|
1478
|
+
*
|
|
1479
|
+
* @param host The `Attachable` element.
|
|
1480
|
+
* @param onControlChange A callback with two parameters for the previous and
|
|
1481
|
+
* next control. An `Attachable` element may perform setup or teardown
|
|
1482
|
+
* logic whenever the control changes.
|
|
1483
|
+
*/
|
|
1484
|
+
constructor(host, onControlChange) {
|
|
1485
|
+
this.host = host;
|
|
1486
|
+
this.onControlChange = onControlChange;
|
|
1487
|
+
this.currentControl = null;
|
|
1488
|
+
host.addController(this);
|
|
1489
|
+
host[ATTACHABLE_CONTROLLER] = this;
|
|
1490
|
+
}
|
|
1491
|
+
attach(control) {
|
|
1492
|
+
if (control === this.currentControl) return;
|
|
1493
|
+
this.setCurrentControl(control);
|
|
1494
|
+
this.host.removeAttribute("for");
|
|
1495
|
+
}
|
|
1496
|
+
detach() {
|
|
1497
|
+
this.setCurrentControl(null);
|
|
1498
|
+
this.host.setAttribute("for", "");
|
|
1499
|
+
}
|
|
1500
|
+
/** @private */
|
|
1501
|
+
hostConnected() {
|
|
1502
|
+
this.setCurrentControl(this.control);
|
|
1503
|
+
}
|
|
1504
|
+
/** @private */
|
|
1505
|
+
hostDisconnected() {
|
|
1506
|
+
this.setCurrentControl(null);
|
|
1507
|
+
}
|
|
1508
|
+
setCurrentControl(control) {
|
|
1509
|
+
this.onControlChange(this.currentControl, control);
|
|
1510
|
+
this.currentControl = control;
|
|
1511
|
+
}
|
|
1512
|
+
};
|
|
1513
|
+
/**
|
|
1514
|
+
* @license
|
|
1515
|
+
* Copyright 2021 Google LLC
|
|
1516
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1517
|
+
*/
|
|
1518
|
+
/**
|
|
1519
|
+
* A focus ring component.
|
|
1520
|
+
*
|
|
1521
|
+
* @fires visibility-changed {Event} Fired whenever `visible` changes.
|
|
1522
|
+
*/
|
|
1523
|
+
var FocusRing = class extends i$2 {
|
|
1524
|
+
constructor() {
|
|
1525
|
+
super(...arguments);
|
|
1526
|
+
/**
|
|
1527
|
+
* Makes the focus ring visible.
|
|
1528
|
+
*/
|
|
1529
|
+
this.visible = false;
|
|
1530
|
+
/**
|
|
1531
|
+
* Makes the focus ring animate inwards instead of outwards.
|
|
1532
|
+
*/
|
|
1533
|
+
this.inward = false;
|
|
1534
|
+
this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
|
|
1535
|
+
}
|
|
1536
|
+
get htmlFor() {
|
|
1537
|
+
return this.attachableController.htmlFor;
|
|
1538
|
+
}
|
|
1539
|
+
set htmlFor(htmlFor) {
|
|
1540
|
+
this.attachableController.htmlFor = htmlFor;
|
|
1541
|
+
}
|
|
1542
|
+
get control() {
|
|
1543
|
+
return this.attachableController.control;
|
|
1544
|
+
}
|
|
1545
|
+
set control(control) {
|
|
1546
|
+
this.attachableController.control = control;
|
|
1547
|
+
}
|
|
1548
|
+
attach(control) {
|
|
1549
|
+
this.attachableController.attach(control);
|
|
1550
|
+
}
|
|
1551
|
+
detach() {
|
|
1552
|
+
this.attachableController.detach();
|
|
1553
|
+
}
|
|
1554
|
+
connectedCallback() {
|
|
1555
|
+
super.connectedCallback();
|
|
1556
|
+
this.setAttribute("aria-hidden", "true");
|
|
1557
|
+
}
|
|
1558
|
+
/** @private */
|
|
1559
|
+
handleEvent(event) {
|
|
1560
|
+
if (event[HANDLED_BY_FOCUS_RING]) return;
|
|
1561
|
+
switch (event.type) {
|
|
1562
|
+
default: return;
|
|
1563
|
+
case "focusin":
|
|
1564
|
+
this.visible = this.control?.matches(":focus-visible") ?? false;
|
|
1565
|
+
break;
|
|
1566
|
+
case "focusout":
|
|
1567
|
+
case "pointerdown": this.visible = false;
|
|
1568
|
+
}
|
|
1569
|
+
event[HANDLED_BY_FOCUS_RING] = true;
|
|
1570
|
+
}
|
|
1571
|
+
onControlChange(prev, next) {}
|
|
1572
|
+
update(changed) {
|
|
1573
|
+
if (changed.has("visible")) this.dispatchEvent(new Event("visibility-changed"));
|
|
1574
|
+
super.update(changed);
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
__decorate([n$2({
|
|
1578
|
+
type: Boolean,
|
|
1579
|
+
reflect: true
|
|
1580
|
+
})], FocusRing.prototype, "visible", void 0);
|
|
1581
|
+
__decorate([n$2({
|
|
1582
|
+
type: Boolean,
|
|
1583
|
+
reflect: true
|
|
1584
|
+
})], FocusRing.prototype, "inward", void 0);
|
|
1585
|
+
var HANDLED_BY_FOCUS_RING = Symbol("handledByFocusRing");
|
|
1586
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/focus/internal/focus-ring-styles.cssresult.js
|
|
1587
|
+
/**
|
|
1588
|
+
* @license
|
|
1589
|
+
* Copyright 2026 Google LLC
|
|
1590
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1591
|
+
*/
|
|
1592
|
+
var styles$3 = i$4`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
1593
|
+
`;
|
|
1594
|
+
styles$3.styleSheet;
|
|
1595
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/focus/md-focus-ring.js
|
|
1596
|
+
/**
|
|
1597
|
+
* @license
|
|
1598
|
+
* Copyright 2021 Google LLC
|
|
1599
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1600
|
+
*/
|
|
1601
|
+
/**
|
|
1602
|
+
* TODO(b/267336424): add docs
|
|
1603
|
+
*
|
|
1604
|
+
* @final
|
|
1605
|
+
* @suppress {visibility}
|
|
1606
|
+
*/
|
|
1607
|
+
var MdFocusRing = class MdFocusRing extends FocusRing {};
|
|
1608
|
+
MdFocusRing.styles = [styles$3];
|
|
1609
|
+
MdFocusRing = __decorate([t$3("md-focus-ring")], MdFocusRing);
|
|
1610
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directive.js
|
|
1611
|
+
/**
|
|
1612
|
+
* @license
|
|
1613
|
+
* Copyright 2017 Google LLC
|
|
1614
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1615
|
+
*/
|
|
1616
|
+
var t = {
|
|
1617
|
+
ATTRIBUTE: 1,
|
|
1618
|
+
CHILD: 2,
|
|
1619
|
+
PROPERTY: 3,
|
|
1620
|
+
BOOLEAN_ATTRIBUTE: 4,
|
|
1621
|
+
EVENT: 5,
|
|
1622
|
+
ELEMENT: 6
|
|
1623
|
+
};
|
|
1624
|
+
var e$1 = (t) => (...e) => ({
|
|
1625
|
+
_$litDirective$: t,
|
|
1626
|
+
values: e
|
|
1627
|
+
});
|
|
1628
|
+
var i$1 = class {
|
|
1629
|
+
constructor(t) {}
|
|
1630
|
+
get _$AU() {
|
|
1631
|
+
return this._$AM._$AU;
|
|
1632
|
+
}
|
|
1633
|
+
_$AT(t, e, i) {
|
|
1634
|
+
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
|
1635
|
+
}
|
|
1636
|
+
_$AS(t, e) {
|
|
1637
|
+
return this.update(t, e);
|
|
1638
|
+
}
|
|
1639
|
+
update(t, e) {
|
|
1640
|
+
return this.render(...e);
|
|
1641
|
+
}
|
|
1642
|
+
};
|
|
1643
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/directives/class-map.js
|
|
1644
|
+
/**
|
|
1645
|
+
* @license
|
|
1646
|
+
* Copyright 2018 Google LLC
|
|
1647
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1648
|
+
*/ var e = e$1(class extends i$1 {
|
|
1649
|
+
constructor(t$4) {
|
|
1650
|
+
if (super(t$4), t$4.type !== t.ATTRIBUTE || "class" !== t$4.name || t$4.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
1651
|
+
}
|
|
1652
|
+
render(t) {
|
|
1653
|
+
return " " + Object.keys(t).filter((s) => t[s]).join(" ") + " ";
|
|
1654
|
+
}
|
|
1655
|
+
update(s, [i]) {
|
|
1656
|
+
if (void 0 === this.st) {
|
|
1657
|
+
this.st = /* @__PURE__ */ new Set(), void 0 !== s.strings && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((t) => "" !== t)));
|
|
1658
|
+
for (const t in i) i[t] && !this.nt?.has(t) && this.st.add(t);
|
|
1659
|
+
return this.render(i);
|
|
1660
|
+
}
|
|
1661
|
+
const r = s.element.classList;
|
|
1662
|
+
for (const t of this.st) t in i || (r.remove(t), this.st.delete(t));
|
|
1663
|
+
for (const t in i) {
|
|
1664
|
+
const s = !!i[t];
|
|
1665
|
+
s === this.st.has(t) || this.nt?.has(t) || (s ? (r.add(t), this.st.add(t)) : (r.remove(t), this.st.delete(t)));
|
|
1666
|
+
}
|
|
1667
|
+
return E;
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/motion/animation.js
|
|
1671
|
+
/**
|
|
1672
|
+
* @license
|
|
1673
|
+
* Copyright 2021 Google LLC
|
|
1674
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1675
|
+
*/
|
|
1676
|
+
/**
|
|
1677
|
+
* Easing functions to use for web animations.
|
|
1678
|
+
*
|
|
1679
|
+
* **NOTE:** `EASING.EMPHASIZED` is approximated with unknown accuracy.
|
|
1680
|
+
*
|
|
1681
|
+
* TODO(b/241113345): replace with tokens
|
|
1682
|
+
*/
|
|
1683
|
+
var EASING = {
|
|
1684
|
+
STANDARD: "cubic-bezier(0.2, 0, 0, 1)",
|
|
1685
|
+
STANDARD_ACCELERATE: "cubic-bezier(.3,0,1,1)",
|
|
1686
|
+
STANDARD_DECELERATE: "cubic-bezier(0,0,0,1)",
|
|
1687
|
+
EMPHASIZED: "cubic-bezier(.3,0,0,1)",
|
|
1688
|
+
EMPHASIZED_ACCELERATE: "cubic-bezier(.3,0,.8,.15)",
|
|
1689
|
+
EMPHASIZED_DECELERATE: "cubic-bezier(.05,.7,.1,1)"
|
|
1690
|
+
};
|
|
1691
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/internal/ripple.js
|
|
1692
|
+
/**
|
|
1693
|
+
* @license
|
|
1694
|
+
* Copyright 2022 Google LLC
|
|
1695
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1696
|
+
*/
|
|
1697
|
+
var PRESS_GROW_MS = 450;
|
|
1698
|
+
var MINIMUM_PRESS_MS = 225;
|
|
1699
|
+
var INITIAL_ORIGIN_SCALE = .2;
|
|
1700
|
+
var PADDING = 10;
|
|
1701
|
+
var SOFT_EDGE_MINIMUM_SIZE = 75;
|
|
1702
|
+
var SOFT_EDGE_CONTAINER_RATIO = .35;
|
|
1703
|
+
var PRESS_PSEUDO = "::after";
|
|
1704
|
+
var ANIMATION_FILL = "forwards";
|
|
1705
|
+
/**
|
|
1706
|
+
* Interaction states for the ripple.
|
|
1707
|
+
*
|
|
1708
|
+
* On Touch:
|
|
1709
|
+
* - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`
|
|
1710
|
+
* - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`
|
|
1711
|
+
*
|
|
1712
|
+
* On Mouse or Pen:
|
|
1713
|
+
* - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`
|
|
1714
|
+
*/
|
|
1715
|
+
var State;
|
|
1716
|
+
(function(State) {
|
|
1717
|
+
/**
|
|
1718
|
+
* Initial state of the control, no touch in progress.
|
|
1719
|
+
*
|
|
1720
|
+
* Transitions:
|
|
1721
|
+
* - on touch down: transition to `TOUCH_DELAY`.
|
|
1722
|
+
* - on mouse down: transition to `WAITING_FOR_CLICK`.
|
|
1723
|
+
*/
|
|
1724
|
+
State[State["INACTIVE"] = 0] = "INACTIVE";
|
|
1725
|
+
/**
|
|
1726
|
+
* Touch down has been received, waiting to determine if it's a swipe or
|
|
1727
|
+
* scroll.
|
|
1728
|
+
*
|
|
1729
|
+
* Transitions:
|
|
1730
|
+
* - on touch up: begin press; transition to `WAITING_FOR_CLICK`.
|
|
1731
|
+
* - on cancel: transition to `INACTIVE`.
|
|
1732
|
+
* - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.
|
|
1733
|
+
*/
|
|
1734
|
+
State[State["TOUCH_DELAY"] = 1] = "TOUCH_DELAY";
|
|
1735
|
+
/**
|
|
1736
|
+
* A touch has been deemed to be a press
|
|
1737
|
+
*
|
|
1738
|
+
* Transitions:
|
|
1739
|
+
* - on up: transition to `WAITING_FOR_CLICK`.
|
|
1740
|
+
*/
|
|
1741
|
+
State[State["HOLDING"] = 2] = "HOLDING";
|
|
1742
|
+
/**
|
|
1743
|
+
* The user touch has finished, transition into rest state.
|
|
1744
|
+
*
|
|
1745
|
+
* Transitions:
|
|
1746
|
+
* - on click end press; transition to `INACTIVE`.
|
|
1747
|
+
*/
|
|
1748
|
+
State[State["WAITING_FOR_CLICK"] = 3] = "WAITING_FOR_CLICK";
|
|
1749
|
+
})(State || (State = {}));
|
|
1750
|
+
/**
|
|
1751
|
+
* Delay reacting to touch so that we do not show the ripple for a swipe or
|
|
1752
|
+
* scroll interaction.
|
|
1753
|
+
*/
|
|
1754
|
+
var TOUCH_DELAY_MS = 150;
|
|
1755
|
+
/**
|
|
1756
|
+
* Used to detect if HCM is active. Events do not process during HCM when the
|
|
1757
|
+
* ripple is not displayed.
|
|
1758
|
+
*/
|
|
1759
|
+
var FORCED_COLORS = null;
|
|
1760
|
+
/**
|
|
1761
|
+
* A ripple component.
|
|
1762
|
+
*/
|
|
1763
|
+
var Ripple = class extends i$2 {
|
|
1764
|
+
constructor() {
|
|
1765
|
+
super(...arguments);
|
|
1766
|
+
/**
|
|
1767
|
+
* Disables the ripple.
|
|
1768
|
+
*/
|
|
1769
|
+
this.disabled = false;
|
|
1770
|
+
this.hovered = false;
|
|
1771
|
+
this.pressed = false;
|
|
1772
|
+
this.rippleSize = "";
|
|
1773
|
+
this.rippleScale = "";
|
|
1774
|
+
this.initialSize = 0;
|
|
1775
|
+
this.state = State.INACTIVE;
|
|
1776
|
+
this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
|
|
1777
|
+
}
|
|
1778
|
+
get htmlFor() {
|
|
1779
|
+
return this.attachableController.htmlFor;
|
|
1780
|
+
}
|
|
1781
|
+
set htmlFor(htmlFor) {
|
|
1782
|
+
this.attachableController.htmlFor = htmlFor;
|
|
1783
|
+
}
|
|
1784
|
+
get control() {
|
|
1785
|
+
return this.attachableController.control;
|
|
1786
|
+
}
|
|
1787
|
+
set control(control) {
|
|
1788
|
+
this.attachableController.control = control;
|
|
1789
|
+
}
|
|
1790
|
+
attach(control) {
|
|
1791
|
+
this.attachableController.attach(control);
|
|
1792
|
+
}
|
|
1793
|
+
detach() {
|
|
1794
|
+
this.attachableController.detach();
|
|
1795
|
+
}
|
|
1796
|
+
connectedCallback() {
|
|
1797
|
+
super.connectedCallback();
|
|
1798
|
+
this.setAttribute("aria-hidden", "true");
|
|
1799
|
+
}
|
|
1800
|
+
render() {
|
|
1801
|
+
return T`<div class="surface ${e({
|
|
1802
|
+
"hovered": this.hovered,
|
|
1803
|
+
"pressed": this.pressed
|
|
1804
|
+
})}"></div>`;
|
|
1805
|
+
}
|
|
1806
|
+
update(changedProps) {
|
|
1807
|
+
if (changedProps.has("disabled") && this.disabled) {
|
|
1808
|
+
this.hovered = false;
|
|
1809
|
+
this.pressed = false;
|
|
1810
|
+
}
|
|
1811
|
+
super.update(changedProps);
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* TODO(b/269799771): make private
|
|
1815
|
+
* @private only public for slider
|
|
1816
|
+
*/
|
|
1817
|
+
handlePointerenter(event) {
|
|
1818
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1819
|
+
this.hovered = true;
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1822
|
+
* TODO(b/269799771): make private
|
|
1823
|
+
* @private only public for slider
|
|
1824
|
+
*/
|
|
1825
|
+
handlePointerleave(event) {
|
|
1826
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1827
|
+
this.hovered = false;
|
|
1828
|
+
if (this.state !== State.INACTIVE) this.endPressAnimation();
|
|
1829
|
+
}
|
|
1830
|
+
handlePointerup(event) {
|
|
1831
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1832
|
+
if (this.state === State.HOLDING) {
|
|
1833
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1836
|
+
if (this.state === State.TOUCH_DELAY) {
|
|
1837
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
1838
|
+
this.startPressAnimation(this.rippleStartEvent);
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
async handlePointerdown(event) {
|
|
1843
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1844
|
+
this.rippleStartEvent = event;
|
|
1845
|
+
if (!this.isTouch(event)) {
|
|
1846
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
1847
|
+
this.startPressAnimation(event);
|
|
1848
|
+
return;
|
|
1849
|
+
}
|
|
1850
|
+
this.state = State.TOUCH_DELAY;
|
|
1851
|
+
await new Promise((resolve) => {
|
|
1852
|
+
setTimeout(resolve, TOUCH_DELAY_MS);
|
|
1853
|
+
});
|
|
1854
|
+
if (this.state !== State.TOUCH_DELAY) return;
|
|
1855
|
+
this.state = State.HOLDING;
|
|
1856
|
+
this.startPressAnimation(event);
|
|
1857
|
+
}
|
|
1858
|
+
handleClick() {
|
|
1859
|
+
if (this.disabled) return;
|
|
1860
|
+
if (this.state === State.WAITING_FOR_CLICK) {
|
|
1861
|
+
this.endPressAnimation();
|
|
1862
|
+
return;
|
|
1863
|
+
}
|
|
1864
|
+
if (this.state === State.INACTIVE) {
|
|
1865
|
+
this.startPressAnimation();
|
|
1866
|
+
this.endPressAnimation();
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
handlePointercancel(event) {
|
|
1870
|
+
if (!this.shouldReactToEvent(event)) return;
|
|
1871
|
+
this.endPressAnimation();
|
|
1872
|
+
}
|
|
1873
|
+
handleContextmenu() {
|
|
1874
|
+
if (this.disabled) return;
|
|
1875
|
+
this.endPressAnimation();
|
|
1876
|
+
}
|
|
1877
|
+
determineRippleSize() {
|
|
1878
|
+
const { height, width } = this.getBoundingClientRect();
|
|
1879
|
+
const maxDim = Math.max(height, width);
|
|
1880
|
+
const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);
|
|
1881
|
+
const zoom = this.currentCSSZoom ?? 1;
|
|
1882
|
+
const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE / zoom);
|
|
1883
|
+
const maxRadius = Math.sqrt(width ** 2 + height ** 2) + PADDING;
|
|
1884
|
+
this.initialSize = initialSize;
|
|
1885
|
+
const maybeZoomedScale = (maxRadius + softEdgeSize) / initialSize;
|
|
1886
|
+
this.rippleScale = `${maybeZoomedScale / zoom}`;
|
|
1887
|
+
this.rippleSize = `${initialSize}px`;
|
|
1888
|
+
}
|
|
1889
|
+
getNormalizedPointerEventCoords(pointerEvent) {
|
|
1890
|
+
const { scrollX, scrollY } = window;
|
|
1891
|
+
const { left, top } = this.getBoundingClientRect();
|
|
1892
|
+
const documentX = scrollX + left;
|
|
1893
|
+
const documentY = scrollY + top;
|
|
1894
|
+
const { pageX, pageY } = pointerEvent;
|
|
1895
|
+
const zoom = this.currentCSSZoom ?? 1;
|
|
1896
|
+
return {
|
|
1897
|
+
x: (pageX - documentX) / zoom,
|
|
1898
|
+
y: (pageY - documentY) / zoom
|
|
1899
|
+
};
|
|
1900
|
+
}
|
|
1901
|
+
getTranslationCoordinates(positionEvent) {
|
|
1902
|
+
const { height, width } = this.getBoundingClientRect();
|
|
1903
|
+
const zoom = this.currentCSSZoom ?? 1;
|
|
1904
|
+
const endPoint = {
|
|
1905
|
+
x: (width / zoom - this.initialSize) / 2,
|
|
1906
|
+
y: (height / zoom - this.initialSize) / 2
|
|
1907
|
+
};
|
|
1908
|
+
let startPoint;
|
|
1909
|
+
if (positionEvent instanceof PointerEvent) startPoint = this.getNormalizedPointerEventCoords(positionEvent);
|
|
1910
|
+
else startPoint = {
|
|
1911
|
+
x: width / zoom / 2,
|
|
1912
|
+
y: height / zoom / 2
|
|
1913
|
+
};
|
|
1914
|
+
startPoint = {
|
|
1915
|
+
x: startPoint.x - this.initialSize / 2,
|
|
1916
|
+
y: startPoint.y - this.initialSize / 2
|
|
1917
|
+
};
|
|
1918
|
+
return {
|
|
1919
|
+
startPoint,
|
|
1920
|
+
endPoint
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
startPressAnimation(positionEvent) {
|
|
1924
|
+
if (!this.mdRoot) return;
|
|
1925
|
+
this.pressed = true;
|
|
1926
|
+
this.growAnimation?.cancel();
|
|
1927
|
+
this.determineRippleSize();
|
|
1928
|
+
const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent);
|
|
1929
|
+
const translateStart = `${startPoint.x}px, ${startPoint.y}px`;
|
|
1930
|
+
const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;
|
|
1931
|
+
this.growAnimation = this.mdRoot.animate({
|
|
1932
|
+
top: [0, 0],
|
|
1933
|
+
left: [0, 0],
|
|
1934
|
+
height: [this.rippleSize, this.rippleSize],
|
|
1935
|
+
width: [this.rippleSize, this.rippleSize],
|
|
1936
|
+
transform: [`translate(${translateStart}) scale(1)`, `translate(${translateEnd}) scale(${this.rippleScale})`]
|
|
1937
|
+
}, {
|
|
1938
|
+
pseudoElement: PRESS_PSEUDO,
|
|
1939
|
+
duration: PRESS_GROW_MS,
|
|
1940
|
+
easing: EASING.STANDARD,
|
|
1941
|
+
fill: ANIMATION_FILL
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
async endPressAnimation() {
|
|
1945
|
+
this.rippleStartEvent = void 0;
|
|
1946
|
+
this.state = State.INACTIVE;
|
|
1947
|
+
const animation = this.growAnimation;
|
|
1948
|
+
let pressAnimationPlayState = Infinity;
|
|
1949
|
+
if (typeof animation?.currentTime === "number") pressAnimationPlayState = animation.currentTime;
|
|
1950
|
+
else if (animation?.currentTime) pressAnimationPlayState = animation.currentTime.to("ms").value;
|
|
1951
|
+
if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {
|
|
1952
|
+
this.pressed = false;
|
|
1953
|
+
return;
|
|
1954
|
+
}
|
|
1955
|
+
await new Promise((resolve) => {
|
|
1956
|
+
setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);
|
|
1957
|
+
});
|
|
1958
|
+
if (this.growAnimation !== animation) return;
|
|
1959
|
+
this.pressed = false;
|
|
1960
|
+
}
|
|
1961
|
+
/**
|
|
1962
|
+
* Returns `true` if
|
|
1963
|
+
* - the ripple element is enabled
|
|
1964
|
+
* - the pointer is primary for the input type
|
|
1965
|
+
* - the pointer is the pointer that started the interaction, or will start
|
|
1966
|
+
* the interaction
|
|
1967
|
+
* - the pointer is a touch, or the pointer state has the primary button
|
|
1968
|
+
* held, or the pointer is hovering
|
|
1969
|
+
*/
|
|
1970
|
+
shouldReactToEvent(event) {
|
|
1971
|
+
if (this.disabled || !event.isPrimary) return false;
|
|
1972
|
+
if (this.rippleStartEvent && this.rippleStartEvent.pointerId !== event.pointerId) return false;
|
|
1973
|
+
if (event.type === "pointerenter" || event.type === "pointerleave") return !this.isTouch(event);
|
|
1974
|
+
const isPrimaryButton = event.buttons === 1;
|
|
1975
|
+
return this.isTouch(event) || isPrimaryButton;
|
|
1976
|
+
}
|
|
1977
|
+
isTouch({ pointerType }) {
|
|
1978
|
+
return pointerType === "touch";
|
|
1979
|
+
}
|
|
1980
|
+
/** @private */
|
|
1981
|
+
async handleEvent(event) {
|
|
1982
|
+
if (FORCED_COLORS?.matches) return;
|
|
1983
|
+
switch (event.type) {
|
|
1984
|
+
case "click":
|
|
1985
|
+
this.handleClick();
|
|
1986
|
+
break;
|
|
1987
|
+
case "contextmenu":
|
|
1988
|
+
this.handleContextmenu();
|
|
1989
|
+
break;
|
|
1990
|
+
case "pointercancel":
|
|
1991
|
+
this.handlePointercancel(event);
|
|
1992
|
+
break;
|
|
1993
|
+
case "pointerdown":
|
|
1994
|
+
await this.handlePointerdown(event);
|
|
1995
|
+
break;
|
|
1996
|
+
case "pointerenter":
|
|
1997
|
+
this.handlePointerenter(event);
|
|
1998
|
+
break;
|
|
1999
|
+
case "pointerleave":
|
|
2000
|
+
this.handlePointerleave(event);
|
|
2001
|
+
break;
|
|
2002
|
+
case "pointerup": this.handlePointerup(event);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
onControlChange(prev, next) {}
|
|
2006
|
+
};
|
|
2007
|
+
__decorate([n$2({
|
|
2008
|
+
type: Boolean,
|
|
2009
|
+
reflect: true
|
|
2010
|
+
})], Ripple.prototype, "disabled", void 0);
|
|
2011
|
+
__decorate([r$1()], Ripple.prototype, "hovered", void 0);
|
|
2012
|
+
__decorate([r$1()], Ripple.prototype, "pressed", void 0);
|
|
2013
|
+
__decorate([e$3(".surface")], Ripple.prototype, "mdRoot", void 0);
|
|
2014
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/internal/ripple-styles.cssresult.js
|
|
2015
|
+
/**
|
|
2016
|
+
* @license
|
|
2017
|
+
* Copyright 2026 Google LLC
|
|
2018
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2019
|
+
*/
|
|
2020
|
+
var styles$2 = i$4`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
|
|
2021
|
+
`;
|
|
2022
|
+
styles$2.styleSheet;
|
|
2023
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/ripple/ripple.js
|
|
2024
|
+
/**
|
|
2025
|
+
* @license
|
|
2026
|
+
* Copyright 2022 Google LLC
|
|
2027
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2028
|
+
*/
|
|
2029
|
+
/**
|
|
2030
|
+
* @summary Ripples, also known as state layers, are visual indicators used to
|
|
2031
|
+
* communicate the status of a component or interactive element.
|
|
2032
|
+
*
|
|
2033
|
+
* @description A state layer is a semi-transparent covering on an element that
|
|
2034
|
+
* indicates its state. State layers provide a systematic approach to
|
|
2035
|
+
* visualizing states by using opacity. A layer can be applied to an entire
|
|
2036
|
+
* element or in a circular shape and only one state layer can be applied at a
|
|
2037
|
+
* given time.
|
|
2038
|
+
*
|
|
2039
|
+
* @final
|
|
2040
|
+
* @suppress {visibility}
|
|
2041
|
+
*/
|
|
2042
|
+
var MdRipple = class MdRipple extends Ripple {};
|
|
2043
|
+
MdRipple.styles = [styles$2];
|
|
2044
|
+
MdRipple = __decorate([t$3("md-ripple")], MdRipple);
|
|
2045
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/static.js
|
|
2046
|
+
/**
|
|
2047
|
+
* @license
|
|
2048
|
+
* Copyright 2020 Google LLC
|
|
2049
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2050
|
+
*/
|
|
2051
|
+
var a = Symbol.for("");
|
|
2052
|
+
var o = (t) => {
|
|
2053
|
+
if (t?.r === a) return t?._$litStatic$;
|
|
2054
|
+
};
|
|
2055
|
+
var i = (t, ...r) => ({
|
|
2056
|
+
_$litStatic$: r.reduce((r, e, a) => r + ((t) => {
|
|
2057
|
+
if (void 0 !== t._$litStatic$) return t._$litStatic$;
|
|
2058
|
+
throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`);
|
|
2059
|
+
})(e) + t[a + 1], t[0]),
|
|
2060
|
+
r: a
|
|
2061
|
+
});
|
|
2062
|
+
var l = /* @__PURE__ */ new Map();
|
|
2063
|
+
var n = (t) => (r, ...e) => {
|
|
2064
|
+
const a = e.length;
|
|
2065
|
+
let s, i;
|
|
2066
|
+
const n = [], u = [];
|
|
2067
|
+
let c, $ = 0, f = !1;
|
|
2068
|
+
for (; $ < a;) {
|
|
2069
|
+
for (c = r[$]; $ < a && void 0 !== (i = e[$], s = o(i));) c += s + r[++$], f = !0;
|
|
2070
|
+
$ !== a && u.push(i), n.push(c), $++;
|
|
2071
|
+
}
|
|
2072
|
+
if ($ === a && n.push(r[a]), f) {
|
|
2073
|
+
const t = n.join("$$lit$$");
|
|
2074
|
+
void 0 === (r = l.get(t)) && (n.raw = n, l.set(t, r = n)), e = u;
|
|
2075
|
+
}
|
|
2076
|
+
return t(r, ...e);
|
|
2077
|
+
};
|
|
2078
|
+
var u = n(T);
|
|
2079
|
+
/**
|
|
2080
|
+
* @license
|
|
2081
|
+
* Copyright 2023 Google LLC
|
|
2082
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2083
|
+
*/
|
|
2084
|
+
[
|
|
2085
|
+
"role",
|
|
2086
|
+
"ariaAtomic",
|
|
2087
|
+
"ariaAutoComplete",
|
|
2088
|
+
"ariaBusy",
|
|
2089
|
+
"ariaChecked",
|
|
2090
|
+
"ariaColCount",
|
|
2091
|
+
"ariaColIndex",
|
|
2092
|
+
"ariaColSpan",
|
|
2093
|
+
"ariaCurrent",
|
|
2094
|
+
"ariaDisabled",
|
|
2095
|
+
"ariaExpanded",
|
|
2096
|
+
"ariaHasPopup",
|
|
2097
|
+
"ariaHidden",
|
|
2098
|
+
"ariaInvalid",
|
|
2099
|
+
"ariaKeyShortcuts",
|
|
2100
|
+
"ariaLabel",
|
|
2101
|
+
"ariaLevel",
|
|
2102
|
+
"ariaLive",
|
|
2103
|
+
"ariaModal",
|
|
2104
|
+
"ariaMultiLine",
|
|
2105
|
+
"ariaMultiSelectable",
|
|
2106
|
+
"ariaOrientation",
|
|
2107
|
+
"ariaPlaceholder",
|
|
2108
|
+
"ariaPosInSet",
|
|
2109
|
+
"ariaPressed",
|
|
2110
|
+
"ariaReadOnly",
|
|
2111
|
+
"ariaRequired",
|
|
2112
|
+
"ariaRoleDescription",
|
|
2113
|
+
"ariaRowCount",
|
|
2114
|
+
"ariaRowIndex",
|
|
2115
|
+
"ariaRowSpan",
|
|
2116
|
+
"ariaSelected",
|
|
2117
|
+
"ariaSetSize",
|
|
2118
|
+
"ariaSort",
|
|
2119
|
+
"ariaValueMax",
|
|
2120
|
+
"ariaValueMin",
|
|
2121
|
+
"ariaValueNow",
|
|
2122
|
+
"ariaValueText"
|
|
2123
|
+
].map(ariaPropertyToAttribute);
|
|
2124
|
+
/**
|
|
2125
|
+
* Converts an AOM aria property into its corresponding attribute.
|
|
2126
|
+
*
|
|
2127
|
+
* @example
|
|
2128
|
+
* ariaPropertyToAttribute('ariaLabel'); // 'aria-label'
|
|
2129
|
+
*
|
|
2130
|
+
* @param property The aria property.
|
|
2131
|
+
* @return The aria attribute.
|
|
2132
|
+
*/
|
|
2133
|
+
function ariaPropertyToAttribute(property) {
|
|
2134
|
+
return property.replace("aria", "aria-").replace(/Elements?/g, "").toLowerCase();
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* @license
|
|
2138
|
+
* Copyright 2023 Google LLC
|
|
2139
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2140
|
+
*/
|
|
2141
|
+
/**
|
|
2142
|
+
* Mixes in aria delegation for elements that delegate focus and aria to inner
|
|
2143
|
+
* shadow root elements.
|
|
2144
|
+
*
|
|
2145
|
+
* This mixin fixes invalid aria announcements with shadow roots, caused by
|
|
2146
|
+
* duplicate aria attributes on both the host and the inner shadow root element.
|
|
2147
|
+
*
|
|
2148
|
+
* Note: this mixin **does not yet support** ID reference attributes, such as
|
|
2149
|
+
* `aria-labelledby` or `aria-controls`.
|
|
2150
|
+
*
|
|
2151
|
+
* @example
|
|
2152
|
+
* ```ts
|
|
2153
|
+
* class MyButton extends mixinDelegatesAria(LitElement) {
|
|
2154
|
+
* static shadowRootOptions = {mode: 'open', delegatesFocus: true};
|
|
2155
|
+
*
|
|
2156
|
+
* render() {
|
|
2157
|
+
* return html`
|
|
2158
|
+
* <button aria-label=${this.ariaLabel || nothing}>
|
|
2159
|
+
* <slot></slot>
|
|
2160
|
+
* </button>
|
|
2161
|
+
* `;
|
|
2162
|
+
* }
|
|
2163
|
+
* }
|
|
2164
|
+
* ```
|
|
2165
|
+
* ```html
|
|
2166
|
+
* <my-button aria-label="Plus one">+1</my-button>
|
|
2167
|
+
* ```
|
|
2168
|
+
*
|
|
2169
|
+
* Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role"
|
|
2170
|
+
* attribute.
|
|
2171
|
+
*
|
|
2172
|
+
* @example
|
|
2173
|
+
* ```ts
|
|
2174
|
+
* return html`
|
|
2175
|
+
* <button role=${(this as ARIAMixinStrict).role || nothing}>
|
|
2176
|
+
* <slot></slot>
|
|
2177
|
+
* </button>
|
|
2178
|
+
* `;
|
|
2179
|
+
* ```
|
|
2180
|
+
*
|
|
2181
|
+
* In the future, updates to the Accessibility Object Model (AOM) will provide
|
|
2182
|
+
* built-in aria delegation features that will replace this mixin.
|
|
2183
|
+
*
|
|
2184
|
+
* @param base The class to mix functionality into.
|
|
2185
|
+
* @return The provided class with aria delegation mixed in.
|
|
2186
|
+
*/
|
|
2187
|
+
function mixinDelegatesAria(base) {
|
|
2188
|
+
return base;
|
|
2189
|
+
}
|
|
2190
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/controller/is-rtl.js
|
|
2191
|
+
/**
|
|
2192
|
+
* @license
|
|
2193
|
+
* Copyright 2022 Google LLC
|
|
2194
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2195
|
+
*/
|
|
2196
|
+
/**
|
|
2197
|
+
* Returns `true` if the given element is in a right-to-left direction.
|
|
2198
|
+
*
|
|
2199
|
+
* @param el Element to determine direction from
|
|
2200
|
+
* @param shouldCheck Optional. If `false`, return `false` without checking
|
|
2201
|
+
* direction. Determining the direction of `el` is somewhat expensive, so
|
|
2202
|
+
* this parameter can be used as a conditional guard. Defaults to `true`.
|
|
2203
|
+
*/
|
|
2204
|
+
function isRtl(el, shouldCheck = true) {
|
|
2205
|
+
return shouldCheck && getComputedStyle(el).getPropertyValue("direction").trim() === "rtl";
|
|
2206
|
+
}
|
|
2207
|
+
/**
|
|
2208
|
+
* @license
|
|
2209
|
+
* Copyright 2023 Google LLC
|
|
2210
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2211
|
+
*/
|
|
2212
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/element-internals.js
|
|
2213
|
+
/**
|
|
2214
|
+
* @license
|
|
2215
|
+
* Copyright 2023 Google LLC
|
|
2216
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2217
|
+
*/
|
|
2218
|
+
/**
|
|
2219
|
+
* A unique symbol used for protected access to an instance's
|
|
2220
|
+
* `ElementInternals`.
|
|
2221
|
+
*
|
|
2222
|
+
* @example
|
|
2223
|
+
* ```ts
|
|
2224
|
+
* class MyElement extends mixinElementInternals(LitElement) {
|
|
2225
|
+
* constructor() {
|
|
2226
|
+
* super();
|
|
2227
|
+
* this[internals].role = 'button';
|
|
2228
|
+
* }
|
|
2229
|
+
* }
|
|
2230
|
+
* ```
|
|
2231
|
+
*/
|
|
2232
|
+
var internals = Symbol("internals");
|
|
2233
|
+
var privateInternals = Symbol("privateInternals");
|
|
2234
|
+
/**
|
|
2235
|
+
* Mixes in an attached `ElementInternals` instance.
|
|
2236
|
+
*
|
|
2237
|
+
* This mixin is only needed when other shared code needs access to a
|
|
2238
|
+
* component's `ElementInternals`, such as form-associated mixins.
|
|
2239
|
+
*
|
|
2240
|
+
* @param base The class to mix functionality into.
|
|
2241
|
+
* @return The provided class with `WithElementInternals` mixed in.
|
|
2242
|
+
*/
|
|
2243
|
+
function mixinElementInternals(base) {
|
|
2244
|
+
class WithElementInternalsElement extends base {
|
|
2245
|
+
get [internals]() {
|
|
2246
|
+
if (!this[privateInternals]) this[privateInternals] = this.attachInternals();
|
|
2247
|
+
return this[privateInternals];
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
return WithElementInternalsElement;
|
|
2251
|
+
}
|
|
2252
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/form-associated.js
|
|
2253
|
+
/**
|
|
2254
|
+
* @license
|
|
2255
|
+
* Copyright 2023 Google LLC
|
|
2256
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2257
|
+
*/
|
|
2258
|
+
/**
|
|
2259
|
+
* A symbol property to retrieve the form value for an element.
|
|
2260
|
+
*/
|
|
2261
|
+
var getFormValue = Symbol("getFormValue");
|
|
2262
|
+
/**
|
|
2263
|
+
* A symbol property to retrieve the form state for an element.
|
|
2264
|
+
*/
|
|
2265
|
+
var getFormState = Symbol("getFormState");
|
|
2266
|
+
/**
|
|
2267
|
+
* Mixes in form-associated behavior for a class. This allows an element to add
|
|
2268
|
+
* values to `<form>` elements.
|
|
2269
|
+
*
|
|
2270
|
+
* Implementing classes should provide a `[formValue]` to return the current
|
|
2271
|
+
* value of the element, as well as reset and restore callbacks.
|
|
2272
|
+
*
|
|
2273
|
+
* @example
|
|
2274
|
+
* ```ts
|
|
2275
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
2276
|
+
*
|
|
2277
|
+
* class MyControl extends base {
|
|
2278
|
+
* \@property()
|
|
2279
|
+
* value = '';
|
|
2280
|
+
*
|
|
2281
|
+
* override [getFormValue]() {
|
|
2282
|
+
* return this.value;
|
|
2283
|
+
* }
|
|
2284
|
+
*
|
|
2285
|
+
* override formResetCallback() {
|
|
2286
|
+
* const defaultValue = this.getAttribute('value');
|
|
2287
|
+
* this.value = defaultValue;
|
|
2288
|
+
* }
|
|
2289
|
+
*
|
|
2290
|
+
* override formStateRestoreCallback(state: string) {
|
|
2291
|
+
* this.value = state;
|
|
2292
|
+
* }
|
|
2293
|
+
* }
|
|
2294
|
+
* ```
|
|
2295
|
+
*
|
|
2296
|
+
* Elements may optionally provide a `[formState]` if their values do not
|
|
2297
|
+
* represent the state of the component.
|
|
2298
|
+
*
|
|
2299
|
+
* @example
|
|
2300
|
+
* ```ts
|
|
2301
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
2302
|
+
*
|
|
2303
|
+
* class MyCheckbox extends base {
|
|
2304
|
+
* \@property()
|
|
2305
|
+
* value = 'on';
|
|
2306
|
+
*
|
|
2307
|
+
* \@property({type: Boolean})
|
|
2308
|
+
* checked = false;
|
|
2309
|
+
*
|
|
2310
|
+
* override [getFormValue]() {
|
|
2311
|
+
* return this.checked ? this.value : null;
|
|
2312
|
+
* }
|
|
2313
|
+
*
|
|
2314
|
+
* override [getFormState]() {
|
|
2315
|
+
* return String(this.checked);
|
|
2316
|
+
* }
|
|
2317
|
+
*
|
|
2318
|
+
* override formResetCallback() {
|
|
2319
|
+
* const defaultValue = this.hasAttribute('checked');
|
|
2320
|
+
* this.checked = defaultValue;
|
|
2321
|
+
* }
|
|
2322
|
+
*
|
|
2323
|
+
* override formStateRestoreCallback(state: string) {
|
|
2324
|
+
* this.checked = Boolean(state);
|
|
2325
|
+
* }
|
|
2326
|
+
* }
|
|
2327
|
+
* ```
|
|
2328
|
+
*
|
|
2329
|
+
* @param base The class to mix functionality into. The base class must use
|
|
2330
|
+
* `mixinElementInternals()`.
|
|
2331
|
+
* @return The provided class with `FormAssociated` mixed in.
|
|
2332
|
+
*/
|
|
2333
|
+
function mixinFormAssociated(base) {
|
|
2334
|
+
class FormAssociatedElement extends base {
|
|
2335
|
+
get form() {
|
|
2336
|
+
return this[internals].form;
|
|
2337
|
+
}
|
|
2338
|
+
get labels() {
|
|
2339
|
+
return this[internals].labels;
|
|
2340
|
+
}
|
|
2341
|
+
get name() {
|
|
2342
|
+
return this.getAttribute("name") ?? "";
|
|
2343
|
+
}
|
|
2344
|
+
set name(name) {
|
|
2345
|
+
this.setAttribute("name", name);
|
|
2346
|
+
}
|
|
2347
|
+
get disabled() {
|
|
2348
|
+
return this.hasAttribute("disabled");
|
|
2349
|
+
}
|
|
2350
|
+
set disabled(disabled) {
|
|
2351
|
+
this.toggleAttribute("disabled", Boolean(disabled));
|
|
2352
|
+
}
|
|
2353
|
+
attributeChangedCallback(name, old, value) {
|
|
2354
|
+
if (name === "name" || name === "disabled") {
|
|
2355
|
+
const oldValue = name === "disabled" ? old !== null : old;
|
|
2356
|
+
this.requestUpdate(name, oldValue);
|
|
2357
|
+
return;
|
|
2358
|
+
}
|
|
2359
|
+
super.attributeChangedCallback(name, old, value);
|
|
2360
|
+
}
|
|
2361
|
+
requestUpdate(name, oldValue, options) {
|
|
2362
|
+
super.requestUpdate(name, oldValue, options);
|
|
2363
|
+
this[internals].setFormValue(this[getFormValue](), this[getFormState]());
|
|
2364
|
+
}
|
|
2365
|
+
[getFormValue]() {
|
|
2366
|
+
return this.getAttribute("value");
|
|
2367
|
+
}
|
|
2368
|
+
[getFormState]() {
|
|
2369
|
+
return this[getFormValue]();
|
|
2370
|
+
}
|
|
2371
|
+
formDisabledCallback(disabled) {
|
|
2372
|
+
this.disabled = disabled;
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
/** @nocollapse */
|
|
2376
|
+
FormAssociatedElement.formAssociated = true;
|
|
2377
|
+
__decorate([n$2({ noAccessor: true })], FormAssociatedElement.prototype, "name", null);
|
|
2378
|
+
__decorate([n$2({
|
|
2379
|
+
type: Boolean,
|
|
2380
|
+
noAccessor: true
|
|
2381
|
+
})], FormAssociatedElement.prototype, "disabled", null);
|
|
2382
|
+
return FormAssociatedElement;
|
|
2383
|
+
}
|
|
2384
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/labs/behaviors/form-submitter.js
|
|
2385
|
+
/**
|
|
2386
|
+
* @license
|
|
2387
|
+
* Copyright 2023 Google LLC
|
|
2388
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2389
|
+
*/
|
|
2390
|
+
/**
|
|
2391
|
+
* Mixes in form submitter behavior for a class.
|
|
2392
|
+
*
|
|
2393
|
+
* A click listener is added to each element instance. If the click is not
|
|
2394
|
+
* default prevented, it will submit the element's form, if any.
|
|
2395
|
+
*
|
|
2396
|
+
* @example
|
|
2397
|
+
* ```ts
|
|
2398
|
+
* const base = mixinFormSubmitter(mixinElementInternals(LitElement));
|
|
2399
|
+
* class MyButton extends base {
|
|
2400
|
+
* static formAssociated = true;
|
|
2401
|
+
* }
|
|
2402
|
+
* ```
|
|
2403
|
+
*
|
|
2404
|
+
* @param base The class to mix functionality into.
|
|
2405
|
+
* @return The provided class with `FormSubmitter` mixed in.
|
|
2406
|
+
*/
|
|
2407
|
+
function mixinFormSubmitter(base) {
|
|
2408
|
+
class FormSubmitterElement extends base {
|
|
2409
|
+
get name() {
|
|
2410
|
+
return this.getAttribute("name") ?? "";
|
|
2411
|
+
}
|
|
2412
|
+
set name(name) {
|
|
2413
|
+
this.setAttribute("name", name);
|
|
2414
|
+
}
|
|
2415
|
+
constructor(...args) {
|
|
2416
|
+
super(...args);
|
|
2417
|
+
this.type = "submit";
|
|
2418
|
+
this.value = "";
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
__decorate([n$2()], FormSubmitterElement.prototype, "type", void 0);
|
|
2422
|
+
__decorate([n$2({ reflect: true })], FormSubmitterElement.prototype, "value", void 0);
|
|
2423
|
+
return FormSubmitterElement;
|
|
2424
|
+
}
|
|
2425
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/iconbutton/internal/icon-button.js
|
|
2426
|
+
/**
|
|
2427
|
+
* @license
|
|
2428
|
+
* Copyright 2018 Google LLC
|
|
2429
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2430
|
+
*/
|
|
2431
|
+
var iconButtonBaseClass = mixinDelegatesAria(mixinFormSubmitter(mixinFormAssociated(mixinElementInternals(i$2))));
|
|
2432
|
+
/**
|
|
2433
|
+
* A button for rendering icons.
|
|
2434
|
+
*
|
|
2435
|
+
* @fires input {InputEvent} Dispatched when a toggle button toggles --bubbles
|
|
2436
|
+
* --composed
|
|
2437
|
+
* @fires change {Event} Dispatched when a toggle button toggles --bubbles
|
|
2438
|
+
*/
|
|
2439
|
+
var IconButton = class extends iconButtonBaseClass {
|
|
2440
|
+
constructor() {
|
|
2441
|
+
super();
|
|
2442
|
+
/**
|
|
2443
|
+
* "Soft-disables" the icon button (disabled but still focusable).
|
|
2444
|
+
*
|
|
2445
|
+
* Use this when an icon button needs increased visibility when disabled. See
|
|
2446
|
+
* https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls
|
|
2447
|
+
* for more guidance on when this is needed.
|
|
2448
|
+
*/
|
|
2449
|
+
this.softDisabled = false;
|
|
2450
|
+
/**
|
|
2451
|
+
* Flips the icon if it is in an RTL context at startup.
|
|
2452
|
+
*/
|
|
2453
|
+
this.flipIconInRtl = false;
|
|
2454
|
+
/**
|
|
2455
|
+
* Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.
|
|
2456
|
+
*/
|
|
2457
|
+
this.href = "";
|
|
2458
|
+
/**
|
|
2459
|
+
* The filename to use when downloading the linked resource.
|
|
2460
|
+
* If not specified, the browser will determine a filename.
|
|
2461
|
+
* This is only applicable when the icon button is used as a link (`href` is set).
|
|
2462
|
+
*/
|
|
2463
|
+
this.download = "";
|
|
2464
|
+
/**
|
|
2465
|
+
* Sets the underlying `HTMLAnchorElement`'s `target` attribute.
|
|
2466
|
+
*/
|
|
2467
|
+
this.target = "";
|
|
2468
|
+
/**
|
|
2469
|
+
* The `aria-label` of the button when the button is toggleable and selected.
|
|
2470
|
+
*/
|
|
2471
|
+
this.ariaLabelSelected = "";
|
|
2472
|
+
/**
|
|
2473
|
+
* When true, the button will toggle between selected and unselected
|
|
2474
|
+
* states
|
|
2475
|
+
*/
|
|
2476
|
+
this.toggle = false;
|
|
2477
|
+
/**
|
|
2478
|
+
* Sets the selected state. When false, displays the default icon. When true,
|
|
2479
|
+
* displays the selected icon, or the default icon If no `slot="selected"`
|
|
2480
|
+
* icon is provided.
|
|
2481
|
+
*/
|
|
2482
|
+
this.selected = false;
|
|
2483
|
+
this.flipIcon = isRtl(this, this.flipIconInRtl);
|
|
2484
|
+
}
|
|
2485
|
+
willUpdate() {
|
|
2486
|
+
if (this.href) {
|
|
2487
|
+
this.disabled = false;
|
|
2488
|
+
this.softDisabled = false;
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
render() {
|
|
2492
|
+
const tag = this.href ? i`div` : i`button`;
|
|
2493
|
+
const { ariaLabel, ariaHasPopup, ariaExpanded } = this;
|
|
2494
|
+
const hasToggledAriaLabel = ariaLabel && this.ariaLabelSelected;
|
|
2495
|
+
const ariaPressedValue = !this.toggle ? A : this.selected;
|
|
2496
|
+
let ariaLabelValue = A;
|
|
2497
|
+
if (!this.href) ariaLabelValue = hasToggledAriaLabel && this.selected ? this.ariaLabelSelected : ariaLabel;
|
|
2498
|
+
return u`<${tag}
|
|
2499
|
+
class="icon-button ${e(this.getRenderClasses())}"
|
|
2500
|
+
id="button"
|
|
2501
|
+
aria-label="${ariaLabelValue || A}"
|
|
2502
|
+
aria-haspopup="${!this.href && ariaHasPopup || A}"
|
|
2503
|
+
aria-expanded="${!this.href && ariaExpanded || A}"
|
|
2504
|
+
aria-pressed="${ariaPressedValue}"
|
|
2505
|
+
aria-disabled=${!this.href && this.softDisabled || A}
|
|
2506
|
+
?disabled="${!this.href && this.disabled}">
|
|
2507
|
+
${this.renderFocusRing()}
|
|
2508
|
+
${this.renderRipple()}
|
|
2509
|
+
${!this.selected ? this.renderIcon() : A}
|
|
2510
|
+
${this.selected ? this.renderSelectedIcon() : A}
|
|
2511
|
+
${this.href ? this.renderLink() : this.renderTouchTarget()}
|
|
2512
|
+
</${tag}>`;
|
|
2513
|
+
}
|
|
2514
|
+
renderLink() {
|
|
2515
|
+
const { ariaLabel } = this;
|
|
2516
|
+
return T`
|
|
2517
|
+
<a
|
|
2518
|
+
class="link"
|
|
2519
|
+
id="link"
|
|
2520
|
+
href="${this.href}"
|
|
2521
|
+
download="${this.download || A}"
|
|
2522
|
+
target="${this.target || A}"
|
|
2523
|
+
aria-label="${ariaLabel || A}">
|
|
2524
|
+
${this.renderTouchTarget()}
|
|
2525
|
+
</a>
|
|
2526
|
+
`;
|
|
2527
|
+
}
|
|
2528
|
+
getRenderClasses() {
|
|
2529
|
+
return {
|
|
2530
|
+
"flip-icon": this.flipIcon,
|
|
2531
|
+
"selected": this.toggle && this.selected
|
|
2532
|
+
};
|
|
2533
|
+
}
|
|
2534
|
+
renderIcon() {
|
|
2535
|
+
return T`<span class="icon"><slot></slot></span>`;
|
|
2536
|
+
}
|
|
2537
|
+
renderSelectedIcon() {
|
|
2538
|
+
return T`<span class="icon icon--selected"
|
|
2539
|
+
><slot name="selected"><slot></slot></slot
|
|
2540
|
+
></span>`;
|
|
2541
|
+
}
|
|
2542
|
+
renderTouchTarget() {
|
|
2543
|
+
return T`<span class="touch"></span>`;
|
|
2544
|
+
}
|
|
2545
|
+
renderFocusRing() {
|
|
2546
|
+
return T`<md-focus-ring
|
|
2547
|
+
part="focus-ring"
|
|
2548
|
+
for=${this.href ? "link" : "button"}></md-focus-ring>`;
|
|
2549
|
+
}
|
|
2550
|
+
renderRipple() {
|
|
2551
|
+
const isRippleDisabled = !this.href && (this.disabled || this.softDisabled);
|
|
2552
|
+
return T`<md-ripple
|
|
2553
|
+
for=${this.href ? "link" : A}
|
|
2554
|
+
?disabled="${isRippleDisabled}"></md-ripple>`;
|
|
2555
|
+
}
|
|
2556
|
+
connectedCallback() {
|
|
2557
|
+
this.flipIcon = isRtl(this, this.flipIconInRtl);
|
|
2558
|
+
super.connectedCallback();
|
|
2559
|
+
}
|
|
2560
|
+
};
|
|
2561
|
+
/** @nocollapse */
|
|
2562
|
+
IconButton.shadowRootOptions = {
|
|
2563
|
+
mode: "open",
|
|
2564
|
+
delegatesFocus: true
|
|
2565
|
+
};
|
|
2566
|
+
__decorate([n$2({
|
|
2567
|
+
type: Boolean,
|
|
2568
|
+
attribute: "soft-disabled",
|
|
2569
|
+
reflect: true
|
|
2570
|
+
})], IconButton.prototype, "softDisabled", void 0);
|
|
2571
|
+
__decorate([n$2({
|
|
2572
|
+
type: Boolean,
|
|
2573
|
+
attribute: "flip-icon-in-rtl"
|
|
2574
|
+
})], IconButton.prototype, "flipIconInRtl", void 0);
|
|
2575
|
+
__decorate([n$2()], IconButton.prototype, "href", void 0);
|
|
2576
|
+
__decorate([n$2()], IconButton.prototype, "download", void 0);
|
|
2577
|
+
__decorate([n$2()], IconButton.prototype, "target", void 0);
|
|
2578
|
+
__decorate([n$2({ attribute: "aria-label-selected" })], IconButton.prototype, "ariaLabelSelected", void 0);
|
|
2579
|
+
__decorate([n$2({ type: Boolean })], IconButton.prototype, "toggle", void 0);
|
|
2580
|
+
__decorate([n$2({
|
|
2581
|
+
type: Boolean,
|
|
2582
|
+
reflect: true
|
|
2583
|
+
})], IconButton.prototype, "selected", void 0);
|
|
2584
|
+
__decorate([r$1()], IconButton.prototype, "flipIcon", void 0);
|
|
2585
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/iconbutton/internal/shared-styles.cssresult.js
|
|
2586
|
+
/**
|
|
2587
|
+
* @license
|
|
2588
|
+
* Copyright 2026 Google LLC
|
|
2589
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2590
|
+
*/
|
|
2591
|
+
var styles$1 = i$4`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{display:grid;height:100%;outline:none;place-items:center;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1}}
|
|
2592
|
+
`;
|
|
2593
|
+
styles$1.styleSheet;
|
|
2594
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/iconbutton/internal/standard-styles.cssresult.js
|
|
2595
|
+
/**
|
|
2596
|
+
* @license
|
|
2597
|
+
* Copyright 2026 Google LLC
|
|
2598
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2599
|
+
*/
|
|
2600
|
+
var styles = i$4`:host{--_disabled-icon-color: var(--md-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-icon-button-disabled-icon-opacity, 0.38);--_icon-size: var(--md-icon-button-icon-size, 24px);--_selected-focus-icon-color: var(--md-icon-button-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-icon-button-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-color: var(--md-icon-button-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-icon-button-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-icon-button-selected-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-icon-button-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-color: var(--md-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-icon-button-selected-pressed-state-layer-opacity, 0.12);--_state-layer-height: var(--md-icon-button-state-layer-height, 40px);--_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));--_state-layer-width: var(--md-icon-button-state-layer-width, 40px);--_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: 0;--_container-shape-start-end: 0;--_container-shape-end-end: 0;--_container-shape-end-start: 0;--_container-height: 0;--_container-width: 0;height:var(--_state-layer-height);width:var(--_state-layer-width)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_state-layer-height))/2) max(0px,(48px - var(--_state-layer-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_state-layer-shape);--md-focus-ring-shape-start-end: var(--_state-layer-shape);--md-focus-ring-shape-end-end: var(--_state-layer-shape);--md-focus-ring-shape-end-start: var(--_state-layer-shape)}.standard{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.standard:hover{color:var(--_hover-icon-color)}.standard:focus{color:var(--_focus-icon-color)}.standard:active{color:var(--_pressed-icon-color)}.standard:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}md-ripple{border-radius:var(--_state-layer-shape)}.standard:is(:disabled,[aria-disabled=true]){opacity:var(--_disabled-icon-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}
|
|
2601
|
+
`;
|
|
2602
|
+
styles.styleSheet;
|
|
2603
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/iconbutton/icon-button.js
|
|
2604
|
+
/**
|
|
2605
|
+
* @license
|
|
2606
|
+
* Copyright 2021 Google LLC
|
|
2607
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2608
|
+
*/
|
|
2609
|
+
/**
|
|
2610
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
2611
|
+
* tap.
|
|
2612
|
+
*
|
|
2613
|
+
* @description
|
|
2614
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
2615
|
+
* least amount of prominence.
|
|
2616
|
+
*
|
|
2617
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
2618
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
2619
|
+
*
|
|
2620
|
+
* __Example usages:__
|
|
2621
|
+
* - Add to Favorites
|
|
2622
|
+
* - Print
|
|
2623
|
+
*
|
|
2624
|
+
* @final
|
|
2625
|
+
* @suppress {visibility}
|
|
2626
|
+
*/
|
|
2627
|
+
var MdIconButton = class MdIconButton extends IconButton {
|
|
2628
|
+
getRenderClasses() {
|
|
2629
|
+
return {
|
|
2630
|
+
...super.getRenderClasses(),
|
|
2631
|
+
"standard": true
|
|
2632
|
+
};
|
|
2633
|
+
}
|
|
2634
|
+
};
|
|
2635
|
+
MdIconButton.styles = [styles$1, styles];
|
|
2636
|
+
MdIconButton = __decorate([t$3("md-icon-button")], MdIconButton);
|
|
4
2637
|
// src/lib/core/theme.ts
|
|
5
2638
|
var DEFAULT_THEME = "light";
|
|
6
2639
|
function parseTheme(raw) {
|
|
@@ -27,6 +2660,34 @@ var BrowserThemeStorage = class {
|
|
|
27
2660
|
} catch {}
|
|
28
2661
|
}
|
|
29
2662
|
};
|
|
2663
|
+
// src/lib/adapters/http-speech-api.ts
|
|
2664
|
+
/** Changes the speech through the UI's own markers route (`url` includes the base path). */
|
|
2665
|
+
var HttpSpeechApi = class {
|
|
2666
|
+
url;
|
|
2667
|
+
constructor(url) {
|
|
2668
|
+
this.url = url;
|
|
2669
|
+
}
|
|
2670
|
+
async addMarker(label) {
|
|
2671
|
+
const response = await fetch(this.url, {
|
|
2672
|
+
method: "POST",
|
|
2673
|
+
headers: {
|
|
2674
|
+
accept: "application/json",
|
|
2675
|
+
"content-type": "application/json"
|
|
2676
|
+
},
|
|
2677
|
+
body: JSON.stringify({ label })
|
|
2678
|
+
});
|
|
2679
|
+
if (!response.ok) throw new Error(await errorMessage$1(response));
|
|
2680
|
+
}
|
|
2681
|
+
};
|
|
2682
|
+
/** SvelteKit's `error()` answers `{ message }`; fall back to the status. */
|
|
2683
|
+
async function errorMessage$1(response) {
|
|
2684
|
+
const body = await response.json().catch(() => void 0);
|
|
2685
|
+
if (typeof body === "object" && body !== null && "message" in body) {
|
|
2686
|
+
const { message } = body;
|
|
2687
|
+
if (typeof message === "string") return message;
|
|
2688
|
+
}
|
|
2689
|
+
return `The request answered ${response.status}`;
|
|
2690
|
+
}
|
|
30
2691
|
// src/lib/adapters/http-sessions-api.ts
|
|
31
2692
|
/** Reads and changes sessions through the UI's own sessions routes (`url` includes the base path). */
|
|
32
2693
|
var HttpSessionsApi = class {
|
|
@@ -71,6 +2732,74 @@ async function errorMessage(response) {
|
|
|
71
2732
|
}
|
|
72
2733
|
return `The request answered ${response.status}`;
|
|
73
2734
|
}
|
|
2735
|
+
// src/lib/adapters/sse-speech-feed.ts
|
|
2736
|
+
/** Entries read per request when an ended session is read page by page. */
|
|
2737
|
+
var PAGE_SIZE = 1e3;
|
|
2738
|
+
/**
|
|
2739
|
+
* Reads the speech of a scope through the UI's own routes (`urls` include the base path):
|
|
2740
|
+
* - A live scope is followed on the stream relay with `?since=0`, so the bridge replays the
|
|
2741
|
+
* buffer first. `EventSource` reconnects by itself and sends `Last-Event-ID`, so a drop only
|
|
2742
|
+
* shows as `reconnecting` and the missed entries are replayed.
|
|
2743
|
+
* - An ended session never gets new entries: it is read page by page, once, without a stream.
|
|
2744
|
+
*/
|
|
2745
|
+
var SseSpeechFeed = class {
|
|
2746
|
+
streamUrl;
|
|
2747
|
+
speechUrl;
|
|
2748
|
+
constructor(streamUrl, speechUrl) {
|
|
2749
|
+
this.streamUrl = streamUrl;
|
|
2750
|
+
this.speechUrl = speechUrl;
|
|
2751
|
+
}
|
|
2752
|
+
open(scope, live, handlers) {
|
|
2753
|
+
handlers.onState("connecting");
|
|
2754
|
+
return live ? this.follow(scope, handlers) : this.read(scope, handlers);
|
|
2755
|
+
}
|
|
2756
|
+
follow(scope, handlers) {
|
|
2757
|
+
const source = new EventSource(`${this.streamUrl}?session=${encodeURIComponent(String(scope))}&since=0`);
|
|
2758
|
+
source.onopen = () => handlers.onState("live");
|
|
2759
|
+
source.onerror = () => handlers.onState("reconnecting");
|
|
2760
|
+
source.addEventListener("entry", (event) => {
|
|
2761
|
+
let data;
|
|
2762
|
+
try {
|
|
2763
|
+
data = JSON.parse(event.data);
|
|
2764
|
+
} catch {
|
|
2765
|
+
return;
|
|
2766
|
+
}
|
|
2767
|
+
const checked = checkDto(SpeechEntrySchema, data);
|
|
2768
|
+
if (checked.ok) handlers.onEntry(checked.value);
|
|
2769
|
+
});
|
|
2770
|
+
source.addEventListener("clear", () => handlers.onClear());
|
|
2771
|
+
return () => source.close();
|
|
2772
|
+
}
|
|
2773
|
+
read(scope, handlers) {
|
|
2774
|
+
const abort = new AbortController();
|
|
2775
|
+
const load = async () => {
|
|
2776
|
+
let since = 0;
|
|
2777
|
+
for (;;) {
|
|
2778
|
+
const query = new URLSearchParams({
|
|
2779
|
+
session: String(scope),
|
|
2780
|
+
since: String(since),
|
|
2781
|
+
limit: String(PAGE_SIZE)
|
|
2782
|
+
});
|
|
2783
|
+
const response = await fetch(`${this.speechUrl}?${query}`, {
|
|
2784
|
+
headers: { accept: "application/json" },
|
|
2785
|
+
signal: abort.signal
|
|
2786
|
+
});
|
|
2787
|
+
if (!response.ok) throw new Error(`The request answered ${response.status}`);
|
|
2788
|
+
const checked = checkDto(SpeechListSchema, await response.json());
|
|
2789
|
+
if (!checked.ok) throw new Error(`Unexpected answer at ${checked.field}`);
|
|
2790
|
+
const { entries, hasMore } = checked.value;
|
|
2791
|
+
handlers.onEntries(entries);
|
|
2792
|
+
const last = entries.at(-1);
|
|
2793
|
+
if (!hasMore || last === void 0) return;
|
|
2794
|
+
since = last.seq;
|
|
2795
|
+
}
|
|
2796
|
+
};
|
|
2797
|
+
load().then(() => handlers.onState("ended"), () => {
|
|
2798
|
+
if (!abort.signal.aborted) handlers.onState("failed");
|
|
2799
|
+
});
|
|
2800
|
+
return () => abort.abort();
|
|
2801
|
+
}
|
|
2802
|
+
};
|
|
74
2803
|
// src/lib/adapters/http-status-api.ts
|
|
75
2804
|
/** Reads the bridge status through the UI's own status route (`url` includes the base path). */
|
|
76
2805
|
var HttpStatusApi = class {
|
|
@@ -86,11 +2815,56 @@ var HttpStatusApi = class {
|
|
|
86
2815
|
return checked.value;
|
|
87
2816
|
}
|
|
88
2817
|
};
|
|
2818
|
+
// src/lib/core/sessions-pane.ts
|
|
2819
|
+
/** Parses the stored text; anything but `'1'` / `'0'` counts as no choice. */
|
|
2820
|
+
function parseCollapsed(raw) {
|
|
2821
|
+
if (raw === "1") return true;
|
|
2822
|
+
if (raw === "0") return false;
|
|
2823
|
+
return null;
|
|
2824
|
+
}
|
|
2825
|
+
function serializeCollapsed(collapsed) {
|
|
2826
|
+
return collapsed ? "1" : "0";
|
|
2827
|
+
}
|
|
2828
|
+
// src/lib/adapters/browser-sessions-pane-storage.ts
|
|
2829
|
+
var SESSIONS_PANE_STORAGE_KEY = "sr-sessions-collapsed";
|
|
2830
|
+
/** Keeps the sessions pane's collapsed choice in `localStorage`. */
|
|
2831
|
+
var BrowserSessionsPaneStorage = class {
|
|
2832
|
+
read() {
|
|
2833
|
+
try {
|
|
2834
|
+
return parseCollapsed(localStorage.getItem(SESSIONS_PANE_STORAGE_KEY));
|
|
2835
|
+
} catch {
|
|
2836
|
+
return null;
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
write(collapsed) {
|
|
2840
|
+
try {
|
|
2841
|
+
localStorage.setItem(SESSIONS_PANE_STORAGE_KEY, serializeCollapsed(collapsed));
|
|
2842
|
+
} catch {}
|
|
2843
|
+
}
|
|
2844
|
+
};
|
|
2845
|
+
// src/lib/stores/sessions-pane.svelte.ts
|
|
2846
|
+
function createSessionsPaneStore(storage) {
|
|
2847
|
+
let collapsed = true;
|
|
2848
|
+
return {
|
|
2849
|
+
get collapsed() {
|
|
2850
|
+
return collapsed;
|
|
2851
|
+
},
|
|
2852
|
+
/** Pick up the saved choice. Call it in the browser only, after hydration. */
|
|
2853
|
+
init() {
|
|
2854
|
+
collapsed = storage.read() ?? false;
|
|
2855
|
+
},
|
|
2856
|
+
toggle() {
|
|
2857
|
+
collapsed = !collapsed;
|
|
2858
|
+
storage.write(collapsed);
|
|
2859
|
+
}
|
|
2860
|
+
};
|
|
2861
|
+
}
|
|
89
2862
|
// src/lib/stores/sessions.svelte.ts
|
|
90
2863
|
var REFRESH_MS = 3e3;
|
|
91
2864
|
function createSessionsStore(api) {
|
|
92
2865
|
let sessions = [];
|
|
93
2866
|
let currentId = null;
|
|
2867
|
+
let outsideEntries = 0;
|
|
94
2868
|
let reachable = true;
|
|
95
2869
|
let loaded = false;
|
|
96
2870
|
let now = Date.now();
|
|
@@ -98,6 +2872,7 @@ function createSessionsStore(api) {
|
|
|
98
2872
|
function apply(list) {
|
|
99
2873
|
sessions = list.sessions;
|
|
100
2874
|
currentId = list.currentId;
|
|
2875
|
+
outsideEntries = list.outsideEntries;
|
|
101
2876
|
now = Date.now();
|
|
102
2877
|
loaded = true;
|
|
103
2878
|
}
|
|
@@ -125,6 +2900,10 @@ function createSessionsStore(api) {
|
|
|
125
2900
|
get currentId() {
|
|
126
2901
|
return currentId;
|
|
127
2902
|
},
|
|
2903
|
+
/** Entries in the buffer recorded outside any session. */
|
|
2904
|
+
get outsideEntries() {
|
|
2905
|
+
return outsideEntries;
|
|
2906
|
+
},
|
|
128
2907
|
/** Whether a list has been applied yet; until then the page shows what the server rendered. */
|
|
129
2908
|
get loaded() {
|
|
130
2909
|
return loaded;
|
|
@@ -164,6 +2943,86 @@ function createSessionsStore(api) {
|
|
|
164
2943
|
}
|
|
165
2944
|
};
|
|
166
2945
|
}
|
|
2946
|
+
// src/lib/core/speech.ts
|
|
2947
|
+
/** The table keeps this many rows; the oldest go first (the bridge's own buffer is capped too). */
|
|
2948
|
+
var MAX_ROWS = 5e3;
|
|
2949
|
+
/**
|
|
2950
|
+
* Whether a marker added now shows up in `scope`. The bridge files a marker under the current
|
|
2951
|
+
* session, or outside any session when none is current: it has no way to name another scope.
|
|
2952
|
+
*/
|
|
2953
|
+
function canAddMarker(scope, currentId) {
|
|
2954
|
+
return currentId === null ? scope === "none" : scope === currentId;
|
|
2955
|
+
}
|
|
2956
|
+
/** `14:03:07.042` in the browser's time zone. */
|
|
2957
|
+
function formatReceivedTime(iso) {
|
|
2958
|
+
const date = new Date(iso);
|
|
2959
|
+
if (Number.isNaN(date.getTime())) return iso;
|
|
2960
|
+
const two = (value) => String(value).padStart(2, "0");
|
|
2961
|
+
const millis = String(date.getMilliseconds()).padStart(3, "0");
|
|
2962
|
+
return `${two(date.getHours())}:${two(date.getMinutes())}:${two(date.getSeconds())}.${millis}`;
|
|
2963
|
+
}
|
|
2964
|
+
/** `#3 Checkout flow`, or what the log shows when no session is selected. */
|
|
2965
|
+
function logHeading(scope, sessions) {
|
|
2966
|
+
if (scope === "none") return "Outside sessions";
|
|
2967
|
+
const session = sessions.find((candidate) => candidate.id === scope);
|
|
2968
|
+
return session === void 0 ? `#${scope}` : `#${session.id} ${session.name}`;
|
|
2969
|
+
}
|
|
2970
|
+
// src/lib/stores/speech.svelte.ts
|
|
2971
|
+
function createSpeechStore(feed, api) {
|
|
2972
|
+
let entries = [];
|
|
2973
|
+
let connection = "connecting";
|
|
2974
|
+
let close = null;
|
|
2975
|
+
function stop() {
|
|
2976
|
+
close?.();
|
|
2977
|
+
close = null;
|
|
2978
|
+
}
|
|
2979
|
+
/** Adds entries newer than the last one shown (a replay after a reconnect repeats some). */
|
|
2980
|
+
function append(added) {
|
|
2981
|
+
let lastSeq = entries.at(-1)?.seq ?? 0;
|
|
2982
|
+
const fresh = [];
|
|
2983
|
+
for (const entry of added) {
|
|
2984
|
+
if (entry.seq <= lastSeq) continue;
|
|
2985
|
+
fresh.push(entry);
|
|
2986
|
+
lastSeq = entry.seq;
|
|
2987
|
+
}
|
|
2988
|
+
if (fresh.length === 0) return;
|
|
2989
|
+
const next = [...entries, ...fresh];
|
|
2990
|
+
entries = next.length > 5e3 ? next.slice(next.length - MAX_ROWS) : next;
|
|
2991
|
+
}
|
|
2992
|
+
return {
|
|
2993
|
+
get entries() {
|
|
2994
|
+
return entries;
|
|
2995
|
+
},
|
|
2996
|
+
get connection() {
|
|
2997
|
+
return connection;
|
|
2998
|
+
},
|
|
2999
|
+
/**
|
|
3000
|
+
* Shows the speech of `scope`, replacing what was shown. A live scope replays the buffer and
|
|
3001
|
+
* follows; an ended session is read once. After a reconnect the stream resumes where it left
|
|
3002
|
+
* off, and an entry seen twice is dropped. Returns the function that stops the stream.
|
|
3003
|
+
*/
|
|
3004
|
+
open(scope, live) {
|
|
3005
|
+
stop();
|
|
3006
|
+
entries = [];
|
|
3007
|
+
connection = "connecting";
|
|
3008
|
+
close = feed.open(scope, live, {
|
|
3009
|
+
onEntry: (entry) => append([entry]),
|
|
3010
|
+
onEntries: append,
|
|
3011
|
+
onClear() {
|
|
3012
|
+
entries = [];
|
|
3013
|
+
},
|
|
3014
|
+
onState(state) {
|
|
3015
|
+
connection = state;
|
|
3016
|
+
}
|
|
3017
|
+
});
|
|
3018
|
+
return stop;
|
|
3019
|
+
},
|
|
3020
|
+
/** Rejects with the reason; the new entry arrives through the feed, so nothing is added here. */
|
|
3021
|
+
addMarker(label) {
|
|
3022
|
+
return api.addMarker(label);
|
|
3023
|
+
}
|
|
3024
|
+
};
|
|
3025
|
+
}
|
|
167
3026
|
// src/lib/stores/status.svelte.ts
|
|
168
3027
|
function createStatusStore(api) {
|
|
169
3028
|
let status = null;
|
|
@@ -227,6 +3086,8 @@ function createThemeStore(storage) {
|
|
|
227
3086
|
var themeStore = createThemeStore(new BrowserThemeStorage());
|
|
228
3087
|
var statusStore = createStatusStore(new HttpStatusApi(resolve("/api/status")));
|
|
229
3088
|
var sessionsStore = createSessionsStore(new HttpSessionsApi(resolve("/api/sessions")));
|
|
230
|
-
|
|
3089
|
+
var speechStore = createSpeechStore(new SseSpeechFeed(resolve("/api/speech/stream"), resolve("/api/speech")), new HttpSpeechApi(resolve("/api/markers")));
|
|
3090
|
+
var sessionsPaneStore = createSessionsPaneStore(new BrowserSessionsPaneStorage());
|
|
3091
|
+
export { r$1 as A, A as C, Z as D, T as E, i$4 as M, t$3 as N, e$3 as O, __decorate as P, i$2 as S, E as T, EASING as _, themeStore as a, i$1 as b, logHeading as c, mixinFormAssociated as d, internals as f, u as g, i as h, statusStore as i, n$2 as j, e$4 as k, mixinFormSubmitter as l, mixinDelegatesAria as m, sessionsStore as n, canAddMarker as o, mixinElementInternals as p, speechStore as r, formatReceivedTime as s, sessionsPaneStore as t, getFormValue as u, e as v, B as w, t as x, e$1 as y };
|
|
231
3092
|
|
|
232
3093
|
//# sourceMappingURL=composition.js.map
|