@supersoniks/concorde 1.0.5 → 1.0.8
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/README.md +16 -8
- package/cli.js +69 -0
- package/core/components/functional/date/date.d.ts +34 -0
- package/core/components/functional/date/date.js +187 -0
- package/core/components/functional/example/example.d.ts +7 -0
- package/core/components/functional/example/example.js +25 -0
- package/core/components/functional/fetch/fetch.d.ts +49 -0
- package/core/components/functional/fetch/fetch.js +38 -0
- package/core/components/functional/functional.d.ts +11 -0
- package/core/components/functional/functional.js +11 -0
- package/core/components/functional/if/if.d.ts +12 -0
- package/core/components/functional/if/if.js +43 -0
- package/core/components/functional/list/list.d.ts +67 -0
- package/core/components/functional/list/list.js +132 -0
- package/core/components/functional/queue/queue.d.ts +42 -0
- package/core/components/functional/queue/queue.js +184 -0
- package/core/components/functional/router/redirect.d.ts +18 -0
- package/core/components/functional/router/redirect.js +57 -0
- package/core/components/functional/router/router.d.ts +26 -0
- package/core/components/functional/router/router.js +104 -0
- package/core/components/functional/states/states.d.ts +28 -0
- package/core/components/functional/states/states.js +139 -0
- package/core/components/functional/submit/submit.d.ts +24 -0
- package/core/components/functional/submit/submit.js +108 -0
- package/{types/core/components → core/components/functional/subscriber}/subscriber.d.ts +5 -1
- package/core/components/functional/subscriber/subscriber.js +30 -0
- package/core/components/ui/alert/alert.d.ts +20 -0
- package/core/components/ui/alert/alert.js +150 -0
- package/core/components/ui/badge/badge.d.ts +24 -0
- package/core/components/ui/badge/badge.js +177 -0
- package/core/components/ui/button/button.d.ts +125 -0
- package/core/components/ui/button/button.js +558 -0
- package/core/components/ui/divider/divider.d.ts +11 -0
- package/core/components/ui/divider/divider.js +144 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +120 -0
- package/core/components/ui/form/checkbox/checkbox.js +203 -0
- package/core/components/ui/form/css/form-control.d.ts +1 -0
- package/core/components/ui/form/css/form-control.js +219 -0
- package/core/components/ui/form/fieldset/fieldset.d.ts +15 -0
- package/core/components/ui/form/fieldset/fieldset.js +70 -0
- package/core/components/ui/form/fieldset/legend.d.ts +11 -0
- package/core/components/ui/form/fieldset/legend.js +92 -0
- package/core/components/ui/form/form-layout/form-actions.d.ts +6 -0
- package/core/components/ui/form/form-layout/form-actions.js +23 -0
- package/core/components/ui/form/form-layout/form-layout.d.ts +9 -0
- package/core/components/ui/form/form-layout/form-layout.js +58 -0
- package/core/components/ui/form/input/input.d.ts +84 -0
- package/core/components/ui/form/input/input.js +180 -0
- package/core/components/ui/form/radio/radio.d.ts +12 -0
- package/core/components/ui/form/radio/radio.js +55 -0
- package/core/components/ui/form/select/select.d.ts +39 -0
- package/core/components/ui/form/select/select.js +220 -0
- package/core/components/ui/form/textarea/textarea.d.ts +69 -0
- package/core/components/ui/form/textarea/textarea.js +150 -0
- package/core/components/ui/group/group.d.ts +6 -0
- package/core/components/ui/group/group.js +57 -0
- package/core/components/ui/icon/icon.d.ts +17 -0
- package/core/components/ui/icon/icon.js +93 -0
- package/core/components/ui/icon/icons.d.ts +13 -0
- package/core/components/ui/icon/icons.js +25 -0
- package/core/components/ui/icon/icons.json +1 -0
- package/core/components/ui/image/image.d.ts +14 -0
- package/core/components/ui/image/image.js +152 -0
- package/core/components/ui/link/link.d.ts +16 -0
- package/core/components/ui/link/link.js +70 -0
- package/core/components/ui/loader/loader.d.ts +20 -0
- package/core/components/ui/loader/loader.js +94 -0
- package/{types → core}/components/ui/loader/styles/fixed.d.ts +0 -0
- package/core/components/ui/loader/styles/fixed.js +57 -0
- package/{types → core}/components/ui/loader/styles/inline.d.ts +0 -0
- package/core/components/ui/loader/styles/inline.js +71 -0
- package/core/components/ui/menu/menu-item.d.ts +5 -0
- package/core/components/ui/menu/menu-item.js +37 -0
- package/core/components/ui/menu/menu.d.ts +26 -0
- package/core/components/ui/menu/menu.js +125 -0
- package/core/components/ui/modal/modal-actions.d.ts +7 -0
- package/core/components/ui/modal/modal-actions.js +46 -0
- package/core/components/ui/modal/modal-close.d.ts +6 -0
- package/core/components/ui/modal/modal-close.js +38 -0
- package/core/components/ui/modal/modal-content.d.ts +5 -0
- package/core/components/ui/modal/modal-content.js +29 -0
- package/core/components/ui/modal/modal-subtitle.d.ts +5 -0
- package/core/components/ui/modal/modal-subtitle.js +33 -0
- package/core/components/ui/modal/modal-title.d.ts +5 -0
- package/core/components/ui/modal/modal-title.js +33 -0
- package/core/components/ui/modal/modal.d.ts +36 -0
- package/core/components/ui/modal/modal.js +325 -0
- package/core/components/ui/pop/pop.d.ts +28 -0
- package/core/components/ui/pop/pop.js +223 -0
- package/core/components/ui/tabs/tab.d.ts +6 -0
- package/core/components/ui/tabs/tab.js +46 -0
- package/core/components/ui/tabs/tabs.d.ts +14 -0
- package/core/components/ui/tabs/tabs.js +127 -0
- package/core/components/ui/taxonomy/taxonomy.d.ts +41 -0
- package/core/components/ui/taxonomy/taxonomy.js +113 -0
- package/core/components/ui/theme/css/tailwind.css +3 -0
- package/core/components/ui/theme/css/tailwind.d.ts +2 -0
- package/core/components/ui/theme/theme-collection/core-variables.d.ts +1 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +50 -0
- package/{types/components → core/components/ui}/theme/theme-collection/dark.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/dark.js +41 -0
- package/{types/components → core/components/ui}/theme/theme-collection/light.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/light.js +35 -0
- package/core/components/ui/theme/theme.d.ts +11 -0
- package/core/components/ui/theme/theme.js +105 -0
- package/core/components/ui/toast/message-subscriber.d.ts +17 -0
- package/core/components/ui/toast/message-subscriber.js +85 -0
- package/{types → core}/components/ui/toast/toast.d.ts +10 -8
- package/core/components/ui/toast/toast.js +260 -0
- package/core/components/ui/tooltip/tooltip.d.ts +7 -0
- package/core/components/ui/tooltip/tooltip.js +68 -0
- package/core/components/ui/ui.d.ts +27 -0
- package/core/components/ui/ui.js +34 -0
- package/core/core.d.ts +3 -0
- package/core/core.js +7 -0
- package/core/mixins/Fetcher.d.ts +69 -0
- package/core/mixins/Fetcher.js +147 -0
- package/core/mixins/FormCheckable.d.ts +72 -0
- package/core/mixins/FormCheckable.js +144 -0
- package/core/mixins/FormElement.d.ts +21 -0
- package/core/mixins/FormElement.js +229 -0
- package/core/mixins/FormInput.d.ts +49 -0
- package/core/mixins/FormInput.js +33 -0
- package/core/mixins/Subscriber.d.ts +30 -0
- package/core/mixins/Subscriber.js +379 -0
- package/core/mixins/TemplatesContainer.d.ts +12 -0
- package/core/mixins/TemplatesContainer.js +60 -0
- package/core/mixins/mixins.d.ts +6 -0
- package/core/mixins/mixins.js +6 -0
- package/core/utils/Arrays.d.ts +97 -0
- package/core/utils/Arrays.js +136 -0
- package/core/utils/DataBindObserver.d.ts +74 -0
- package/core/utils/DataBindObserver.js +252 -0
- package/core/utils/Format.d.ts +11 -0
- package/core/utils/Format.js +22 -0
- package/core/utils/HTML.d.ts +13 -0
- package/core/utils/HTML.js +26 -0
- package/core/utils/LocationHandler.d.ts +44 -0
- package/core/utils/LocationHandler.js +96 -0
- package/core/utils/Objects.d.ts +23 -0
- package/core/utils/Objects.js +63 -0
- package/core/utils/PublisherProxy.d.mts +110 -0
- package/core/utils/PublisherProxy.mjs +365 -0
- package/core/utils/api.d.ts +66 -0
- package/core/utils/api.js +145 -0
- package/package.json +179 -21
- package/LICENSE +0 -43
- package/dist/concorde.bundle.js +0 -3620
- package/types/components/event/event-card/event-card.d.ts +0 -10
- package/types/components/event/event-title/event-title.d.ts +0 -7
- package/types/components/event/event.d.ts +0 -8
- package/types/components/giftcards/giftcard/giftcard.d.ts +0 -15
- package/types/components/illustration/illustration.d.ts +0 -16
- package/types/components/product/prices-form/price-button/price-button.d.ts +0 -25
- package/types/components/product/prices-form/prices-form.d.ts +0 -23
- package/types/components/theme/theme-collection/bootstrap5.d.ts +0 -1
- package/types/components/theme/theme-collection/dracula.d.ts +0 -1
- package/types/components/theme/theme.d.ts +0 -8
- package/types/components/ui/button/button.d.ts +0 -13
- package/types/components/ui/loader/loader.d.ts +0 -15
- package/types/components/ui/modal/modal.d.ts +0 -17
- package/types/components/ui/tooltip/tooltip.d.ts +0 -9
- package/types/core/components/fetch.d.ts +0 -6
- package/types/core/components/list.d.ts +0 -9
- package/types/core/components/queue.d.ts +0 -15
- package/types/core/components/taxonomy.d.ts +0 -13
- package/types/core/components/text-formatted.d.ts +0 -15
- package/types/core/components/text.d.ts +0 -9
- package/types/core/core.d.ts +0 -7
- package/types/core/mixins/Fetcher.d.ts +0 -9
- package/types/core/mixins/Subscriber.d.ts +0 -13
- package/types/core/utils/api.d.ts +0 -16
- package/types/index.d.ts +0 -12
- package/types/styles/button/button.d.ts +0 -1
- package/types/styles/prose/prose.d.ts +0 -2
package/dist/concorde.bundle.js
DELETED
|
@@ -1,3620 +0,0 @@
|
|
|
1
|
-
var __defProp2 = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
|
-
/**
|
|
21
|
-
* @license
|
|
22
|
-
* Copyright 2019 Google LLC
|
|
23
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
|
-
*/
|
|
25
|
-
const t$3 = window.ShadowRoot && (window.ShadyCSS === void 0 || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, e$7 = Symbol(), n$6 = new Map();
|
|
26
|
-
class s$4 {
|
|
27
|
-
constructor(t2, n2) {
|
|
28
|
-
if (this._$cssResult$ = true, n2 !== e$7)
|
|
29
|
-
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
30
|
-
this.cssText = t2;
|
|
31
|
-
}
|
|
32
|
-
get styleSheet() {
|
|
33
|
-
let e2 = n$6.get(this.cssText);
|
|
34
|
-
return t$3 && e2 === void 0 && (n$6.set(this.cssText, e2 = new CSSStyleSheet()), e2.replaceSync(this.cssText)), e2;
|
|
35
|
-
}
|
|
36
|
-
toString() {
|
|
37
|
-
return this.cssText;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const o$6 = (t2) => new s$4(typeof t2 == "string" ? t2 : t2 + "", e$7), r$5 = (t2, ...n2) => {
|
|
41
|
-
const o2 = t2.length === 1 ? t2[0] : n2.reduce((e2, n3, s2) => e2 + ((t3) => {
|
|
42
|
-
if (t3._$cssResult$ === true)
|
|
43
|
-
return t3.cssText;
|
|
44
|
-
if (typeof t3 == "number")
|
|
45
|
-
return t3;
|
|
46
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
47
|
-
})(n3) + t2[s2 + 1], t2[0]);
|
|
48
|
-
return new s$4(o2, e$7);
|
|
49
|
-
}, i$5 = (e2, n2) => {
|
|
50
|
-
t$3 ? e2.adoptedStyleSheets = n2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet) : n2.forEach((t2) => {
|
|
51
|
-
const n3 = document.createElement("style"), s2 = window.litNonce;
|
|
52
|
-
s2 !== void 0 && n3.setAttribute("nonce", s2), n3.textContent = t2.cssText, e2.appendChild(n3);
|
|
53
|
-
});
|
|
54
|
-
}, S$2 = t$3 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
|
|
55
|
-
let e2 = "";
|
|
56
|
-
for (const n2 of t3.cssRules)
|
|
57
|
-
e2 += n2.cssText;
|
|
58
|
-
return o$6(e2);
|
|
59
|
-
})(t2) : t2;
|
|
60
|
-
/**
|
|
61
|
-
* @license
|
|
62
|
-
* Copyright 2017 Google LLC
|
|
63
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
|
-
*/
|
|
65
|
-
var s$3;
|
|
66
|
-
const e$6 = window.trustedTypes, r$4 = e$6 ? e$6.emptyScript : "", h$3 = window.reactiveElementPolyfillSupport, o$5 = { toAttribute(t2, i2) {
|
|
67
|
-
switch (i2) {
|
|
68
|
-
case Boolean:
|
|
69
|
-
t2 = t2 ? r$4 : null;
|
|
70
|
-
break;
|
|
71
|
-
case Object:
|
|
72
|
-
case Array:
|
|
73
|
-
t2 = t2 == null ? t2 : JSON.stringify(t2);
|
|
74
|
-
}
|
|
75
|
-
return t2;
|
|
76
|
-
}, fromAttribute(t2, i2) {
|
|
77
|
-
let s2 = t2;
|
|
78
|
-
switch (i2) {
|
|
79
|
-
case Boolean:
|
|
80
|
-
s2 = t2 !== null;
|
|
81
|
-
break;
|
|
82
|
-
case Number:
|
|
83
|
-
s2 = t2 === null ? null : Number(t2);
|
|
84
|
-
break;
|
|
85
|
-
case Object:
|
|
86
|
-
case Array:
|
|
87
|
-
try {
|
|
88
|
-
s2 = JSON.parse(t2);
|
|
89
|
-
} catch (t3) {
|
|
90
|
-
s2 = null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return s2;
|
|
94
|
-
} }, n$5 = (t2, i2) => i2 !== t2 && (i2 == i2 || t2 == t2), l$3 = { attribute: true, type: String, converter: o$5, reflect: false, hasChanged: n$5 };
|
|
95
|
-
class a$3 extends HTMLElement {
|
|
96
|
-
constructor() {
|
|
97
|
-
super(), this._$Et = new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$Ei = null, this.o();
|
|
98
|
-
}
|
|
99
|
-
static addInitializer(t2) {
|
|
100
|
-
var i2;
|
|
101
|
-
(i2 = this.l) !== null && i2 !== void 0 || (this.l = []), this.l.push(t2);
|
|
102
|
-
}
|
|
103
|
-
static get observedAttributes() {
|
|
104
|
-
this.finalize();
|
|
105
|
-
const t2 = [];
|
|
106
|
-
return this.elementProperties.forEach((i2, s2) => {
|
|
107
|
-
const e2 = this._$Eh(s2, i2);
|
|
108
|
-
e2 !== void 0 && (this._$Eu.set(e2, s2), t2.push(e2));
|
|
109
|
-
}), t2;
|
|
110
|
-
}
|
|
111
|
-
static createProperty(t2, i2 = l$3) {
|
|
112
|
-
if (i2.state && (i2.attribute = false), this.finalize(), this.elementProperties.set(t2, i2), !i2.noAccessor && !this.prototype.hasOwnProperty(t2)) {
|
|
113
|
-
const s2 = typeof t2 == "symbol" ? Symbol() : "__" + t2, e2 = this.getPropertyDescriptor(t2, s2, i2);
|
|
114
|
-
e2 !== void 0 && Object.defineProperty(this.prototype, t2, e2);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
static getPropertyDescriptor(t2, i2, s2) {
|
|
118
|
-
return { get() {
|
|
119
|
-
return this[i2];
|
|
120
|
-
}, set(e2) {
|
|
121
|
-
const r2 = this[t2];
|
|
122
|
-
this[i2] = e2, this.requestUpdate(t2, r2, s2);
|
|
123
|
-
}, configurable: true, enumerable: true };
|
|
124
|
-
}
|
|
125
|
-
static getPropertyOptions(t2) {
|
|
126
|
-
return this.elementProperties.get(t2) || l$3;
|
|
127
|
-
}
|
|
128
|
-
static finalize() {
|
|
129
|
-
if (this.hasOwnProperty("finalized"))
|
|
130
|
-
return false;
|
|
131
|
-
this.finalized = true;
|
|
132
|
-
const t2 = Object.getPrototypeOf(this);
|
|
133
|
-
if (t2.finalize(), this.elementProperties = new Map(t2.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
|
|
134
|
-
const t3 = this.properties, i2 = [...Object.getOwnPropertyNames(t3), ...Object.getOwnPropertySymbols(t3)];
|
|
135
|
-
for (const s2 of i2)
|
|
136
|
-
this.createProperty(s2, t3[s2]);
|
|
137
|
-
}
|
|
138
|
-
return this.elementStyles = this.finalizeStyles(this.styles), true;
|
|
139
|
-
}
|
|
140
|
-
static finalizeStyles(i2) {
|
|
141
|
-
const s2 = [];
|
|
142
|
-
if (Array.isArray(i2)) {
|
|
143
|
-
const e2 = new Set(i2.flat(1 / 0).reverse());
|
|
144
|
-
for (const i3 of e2)
|
|
145
|
-
s2.unshift(S$2(i3));
|
|
146
|
-
} else
|
|
147
|
-
i2 !== void 0 && s2.push(S$2(i2));
|
|
148
|
-
return s2;
|
|
149
|
-
}
|
|
150
|
-
static _$Eh(t2, i2) {
|
|
151
|
-
const s2 = i2.attribute;
|
|
152
|
-
return s2 === false ? void 0 : typeof s2 == "string" ? s2 : typeof t2 == "string" ? t2.toLowerCase() : void 0;
|
|
153
|
-
}
|
|
154
|
-
o() {
|
|
155
|
-
var t2;
|
|
156
|
-
this._$Ep = new Promise((t3) => this.enableUpdating = t3), this._$AL = new Map(), this._$Em(), this.requestUpdate(), (t2 = this.constructor.l) === null || t2 === void 0 || t2.forEach((t3) => t3(this));
|
|
157
|
-
}
|
|
158
|
-
addController(t2) {
|
|
159
|
-
var i2, s2;
|
|
160
|
-
((i2 = this._$Eg) !== null && i2 !== void 0 ? i2 : this._$Eg = []).push(t2), this.renderRoot !== void 0 && this.isConnected && ((s2 = t2.hostConnected) === null || s2 === void 0 || s2.call(t2));
|
|
161
|
-
}
|
|
162
|
-
removeController(t2) {
|
|
163
|
-
var i2;
|
|
164
|
-
(i2 = this._$Eg) === null || i2 === void 0 || i2.splice(this._$Eg.indexOf(t2) >>> 0, 1);
|
|
165
|
-
}
|
|
166
|
-
_$Em() {
|
|
167
|
-
this.constructor.elementProperties.forEach((t2, i2) => {
|
|
168
|
-
this.hasOwnProperty(i2) && (this._$Et.set(i2, this[i2]), delete this[i2]);
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
createRenderRoot() {
|
|
172
|
-
var t2;
|
|
173
|
-
const s2 = (t2 = this.shadowRoot) !== null && t2 !== void 0 ? t2 : this.attachShadow(this.constructor.shadowRootOptions);
|
|
174
|
-
return i$5(s2, this.constructor.elementStyles), s2;
|
|
175
|
-
}
|
|
176
|
-
connectedCallback() {
|
|
177
|
-
var t2;
|
|
178
|
-
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => {
|
|
179
|
-
var i2;
|
|
180
|
-
return (i2 = t3.hostConnected) === null || i2 === void 0 ? void 0 : i2.call(t3);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
enableUpdating(t2) {
|
|
184
|
-
}
|
|
185
|
-
disconnectedCallback() {
|
|
186
|
-
var t2;
|
|
187
|
-
(t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => {
|
|
188
|
-
var i2;
|
|
189
|
-
return (i2 = t3.hostDisconnected) === null || i2 === void 0 ? void 0 : i2.call(t3);
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
attributeChangedCallback(t2, i2, s2) {
|
|
193
|
-
this._$AK(t2, s2);
|
|
194
|
-
}
|
|
195
|
-
_$ES(t2, i2, s2 = l$3) {
|
|
196
|
-
var e2, r2;
|
|
197
|
-
const h2 = this.constructor._$Eh(t2, s2);
|
|
198
|
-
if (h2 !== void 0 && s2.reflect === true) {
|
|
199
|
-
const n2 = ((r2 = (e2 = s2.converter) === null || e2 === void 0 ? void 0 : e2.toAttribute) !== null && r2 !== void 0 ? r2 : o$5.toAttribute)(i2, s2.type);
|
|
200
|
-
this._$Ei = t2, n2 == null ? this.removeAttribute(h2) : this.setAttribute(h2, n2), this._$Ei = null;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
_$AK(t2, i2) {
|
|
204
|
-
var s2, e2, r2;
|
|
205
|
-
const h2 = this.constructor, n2 = h2._$Eu.get(t2);
|
|
206
|
-
if (n2 !== void 0 && this._$Ei !== n2) {
|
|
207
|
-
const t3 = h2.getPropertyOptions(n2), l2 = t3.converter, a2 = (r2 = (e2 = (s2 = l2) === null || s2 === void 0 ? void 0 : s2.fromAttribute) !== null && e2 !== void 0 ? e2 : typeof l2 == "function" ? l2 : null) !== null && r2 !== void 0 ? r2 : o$5.fromAttribute;
|
|
208
|
-
this._$Ei = n2, this[n2] = a2(i2, t3.type), this._$Ei = null;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
requestUpdate(t2, i2, s2) {
|
|
212
|
-
let e2 = true;
|
|
213
|
-
t2 !== void 0 && (((s2 = s2 || this.constructor.getPropertyOptions(t2)).hasChanged || n$5)(this[t2], i2) ? (this._$AL.has(t2) || this._$AL.set(t2, i2), s2.reflect === true && this._$Ei !== t2 && (this._$E_ === void 0 && (this._$E_ = new Map()), this._$E_.set(t2, s2))) : e2 = false), !this.isUpdatePending && e2 && (this._$Ep = this._$EC());
|
|
214
|
-
}
|
|
215
|
-
async _$EC() {
|
|
216
|
-
this.isUpdatePending = true;
|
|
217
|
-
try {
|
|
218
|
-
await this._$Ep;
|
|
219
|
-
} catch (t3) {
|
|
220
|
-
Promise.reject(t3);
|
|
221
|
-
}
|
|
222
|
-
const t2 = this.scheduleUpdate();
|
|
223
|
-
return t2 != null && await t2, !this.isUpdatePending;
|
|
224
|
-
}
|
|
225
|
-
scheduleUpdate() {
|
|
226
|
-
return this.performUpdate();
|
|
227
|
-
}
|
|
228
|
-
performUpdate() {
|
|
229
|
-
var t2;
|
|
230
|
-
if (!this.isUpdatePending)
|
|
231
|
-
return;
|
|
232
|
-
this.hasUpdated, this._$Et && (this._$Et.forEach((t3, i3) => this[i3] = t3), this._$Et = void 0);
|
|
233
|
-
let i2 = false;
|
|
234
|
-
const s2 = this._$AL;
|
|
235
|
-
try {
|
|
236
|
-
i2 = this.shouldUpdate(s2), i2 ? (this.willUpdate(s2), (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => {
|
|
237
|
-
var i3;
|
|
238
|
-
return (i3 = t3.hostUpdate) === null || i3 === void 0 ? void 0 : i3.call(t3);
|
|
239
|
-
}), this.update(s2)) : this._$EU();
|
|
240
|
-
} catch (t3) {
|
|
241
|
-
throw i2 = false, this._$EU(), t3;
|
|
242
|
-
}
|
|
243
|
-
i2 && this._$AE(s2);
|
|
244
|
-
}
|
|
245
|
-
willUpdate(t2) {
|
|
246
|
-
}
|
|
247
|
-
_$AE(t2) {
|
|
248
|
-
var i2;
|
|
249
|
-
(i2 = this._$Eg) === null || i2 === void 0 || i2.forEach((t3) => {
|
|
250
|
-
var i3;
|
|
251
|
-
return (i3 = t3.hostUpdated) === null || i3 === void 0 ? void 0 : i3.call(t3);
|
|
252
|
-
}), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
|
|
253
|
-
}
|
|
254
|
-
_$EU() {
|
|
255
|
-
this._$AL = new Map(), this.isUpdatePending = false;
|
|
256
|
-
}
|
|
257
|
-
get updateComplete() {
|
|
258
|
-
return this.getUpdateComplete();
|
|
259
|
-
}
|
|
260
|
-
getUpdateComplete() {
|
|
261
|
-
return this._$Ep;
|
|
262
|
-
}
|
|
263
|
-
shouldUpdate(t2) {
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
update(t2) {
|
|
267
|
-
this._$E_ !== void 0 && (this._$E_.forEach((t3, i2) => this._$ES(i2, this[i2], t3)), this._$E_ = void 0), this._$EU();
|
|
268
|
-
}
|
|
269
|
-
updated(t2) {
|
|
270
|
-
}
|
|
271
|
-
firstUpdated(t2) {
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
a$3.finalized = true, a$3.elementProperties = new Map(), a$3.elementStyles = [], a$3.shadowRootOptions = { mode: "open" }, h$3 == null || h$3({ ReactiveElement: a$3 }), ((s$3 = globalThis.reactiveElementVersions) !== null && s$3 !== void 0 ? s$3 : globalThis.reactiveElementVersions = []).push("1.0.2");
|
|
275
|
-
/**
|
|
276
|
-
* @license
|
|
277
|
-
* Copyright 2017 Google LLC
|
|
278
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
279
|
-
*/
|
|
280
|
-
var t$2;
|
|
281
|
-
const i$4 = globalThis.trustedTypes, s$2 = i$4 ? i$4.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$5 = `lit$${(Math.random() + "").slice(9)}$`, o$4 = "?" + e$5, n$4 = `<${o$4}>`, l$2 = document, h$2 = (t2 = "") => l$2.createComment(t2), r$3 = (t2) => t2 === null || typeof t2 != "object" && typeof t2 != "function", d$1 = Array.isArray, u$2 = (t2) => {
|
|
282
|
-
var i2;
|
|
283
|
-
return d$1(t2) || typeof ((i2 = t2) === null || i2 === void 0 ? void 0 : i2[Symbol.iterator]) == "function";
|
|
284
|
-
}, c$2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, a$2 = />/g, f$2 = />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g, _ = /'/g, m$1 = /"/g, g$1 = /^(?:script|style|textarea)$/i, $$1 = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), p$1 = $$1(1), b$1 = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), x$1 = new WeakMap(), w$1 = (t2, i2, s2) => {
|
|
285
|
-
var e2, o2;
|
|
286
|
-
const n2 = (e2 = s2 == null ? void 0 : s2.renderBefore) !== null && e2 !== void 0 ? e2 : i2;
|
|
287
|
-
let l2 = n2._$litPart$;
|
|
288
|
-
if (l2 === void 0) {
|
|
289
|
-
const t3 = (o2 = s2 == null ? void 0 : s2.renderBefore) !== null && o2 !== void 0 ? o2 : null;
|
|
290
|
-
n2._$litPart$ = l2 = new N(i2.insertBefore(h$2(), t3), t3, void 0, s2 != null ? s2 : {});
|
|
291
|
-
}
|
|
292
|
-
return l2._$AI(t2), l2;
|
|
293
|
-
}, A$1 = l$2.createTreeWalker(l$2, 129, null, false), C = (t2, i2) => {
|
|
294
|
-
const o2 = t2.length - 1, l2 = [];
|
|
295
|
-
let h2, r2 = i2 === 2 ? "<svg>" : "", d2 = c$2;
|
|
296
|
-
for (let i3 = 0; i3 < o2; i3++) {
|
|
297
|
-
const s2 = t2[i3];
|
|
298
|
-
let o3, u3, $2 = -1, p2 = 0;
|
|
299
|
-
for (; p2 < s2.length && (d2.lastIndex = p2, u3 = d2.exec(s2), u3 !== null); )
|
|
300
|
-
p2 = d2.lastIndex, d2 === c$2 ? u3[1] === "!--" ? d2 = v : u3[1] !== void 0 ? d2 = a$2 : u3[2] !== void 0 ? (g$1.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = f$2) : u3[3] !== void 0 && (d2 = f$2) : d2 === f$2 ? u3[0] === ">" ? (d2 = h2 != null ? h2 : c$2, $2 = -1) : u3[1] === void 0 ? $2 = -2 : ($2 = d2.lastIndex - u3[2].length, o3 = u3[1], d2 = u3[3] === void 0 ? f$2 : u3[3] === '"' ? m$1 : _) : d2 === m$1 || d2 === _ ? d2 = f$2 : d2 === v || d2 === a$2 ? d2 = c$2 : (d2 = f$2, h2 = void 0);
|
|
301
|
-
const y = d2 === f$2 && t2[i3 + 1].startsWith("/>") ? " " : "";
|
|
302
|
-
r2 += d2 === c$2 ? s2 + n$4 : $2 >= 0 ? (l2.push(o3), s2.slice(0, $2) + "$lit$" + s2.slice($2) + e$5 + y) : s2 + e$5 + ($2 === -2 ? (l2.push(void 0), i3) : y);
|
|
303
|
-
}
|
|
304
|
-
const u2 = r2 + (t2[o2] || "<?>") + (i2 === 2 ? "</svg>" : "");
|
|
305
|
-
return [s$2 !== void 0 ? s$2.createHTML(u2) : u2, l2];
|
|
306
|
-
};
|
|
307
|
-
class P {
|
|
308
|
-
constructor({ strings: t2, _$litType$: s2 }, n2) {
|
|
309
|
-
let l2;
|
|
310
|
-
this.parts = [];
|
|
311
|
-
let r2 = 0, d2 = 0;
|
|
312
|
-
const u2 = t2.length - 1, c2 = this.parts, [v2, a2] = C(t2, s2);
|
|
313
|
-
if (this.el = P.createElement(v2, n2), A$1.currentNode = this.el.content, s2 === 2) {
|
|
314
|
-
const t3 = this.el.content, i2 = t3.firstChild;
|
|
315
|
-
i2.remove(), t3.append(...i2.childNodes);
|
|
316
|
-
}
|
|
317
|
-
for (; (l2 = A$1.nextNode()) !== null && c2.length < u2; ) {
|
|
318
|
-
if (l2.nodeType === 1) {
|
|
319
|
-
if (l2.hasAttributes()) {
|
|
320
|
-
const t3 = [];
|
|
321
|
-
for (const i2 of l2.getAttributeNames())
|
|
322
|
-
if (i2.endsWith("$lit$") || i2.startsWith(e$5)) {
|
|
323
|
-
const s3 = a2[d2++];
|
|
324
|
-
if (t3.push(i2), s3 !== void 0) {
|
|
325
|
-
const t4 = l2.getAttribute(s3.toLowerCase() + "$lit$").split(e$5), i3 = /([.?@])?(.*)/.exec(s3);
|
|
326
|
-
c2.push({ type: 1, index: r2, name: i3[2], strings: t4, ctor: i3[1] === "." ? M : i3[1] === "?" ? H : i3[1] === "@" ? I : S$1 });
|
|
327
|
-
} else
|
|
328
|
-
c2.push({ type: 6, index: r2 });
|
|
329
|
-
}
|
|
330
|
-
for (const i2 of t3)
|
|
331
|
-
l2.removeAttribute(i2);
|
|
332
|
-
}
|
|
333
|
-
if (g$1.test(l2.tagName)) {
|
|
334
|
-
const t3 = l2.textContent.split(e$5), s3 = t3.length - 1;
|
|
335
|
-
if (s3 > 0) {
|
|
336
|
-
l2.textContent = i$4 ? i$4.emptyScript : "";
|
|
337
|
-
for (let i2 = 0; i2 < s3; i2++)
|
|
338
|
-
l2.append(t3[i2], h$2()), A$1.nextNode(), c2.push({ type: 2, index: ++r2 });
|
|
339
|
-
l2.append(t3[s3], h$2());
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
} else if (l2.nodeType === 8)
|
|
343
|
-
if (l2.data === o$4)
|
|
344
|
-
c2.push({ type: 2, index: r2 });
|
|
345
|
-
else {
|
|
346
|
-
let t3 = -1;
|
|
347
|
-
for (; (t3 = l2.data.indexOf(e$5, t3 + 1)) !== -1; )
|
|
348
|
-
c2.push({ type: 7, index: r2 }), t3 += e$5.length - 1;
|
|
349
|
-
}
|
|
350
|
-
r2++;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
static createElement(t2, i2) {
|
|
354
|
-
const s2 = l$2.createElement("template");
|
|
355
|
-
return s2.innerHTML = t2, s2;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
function V(t2, i2, s2 = t2, e2) {
|
|
359
|
-
var o2, n2, l2, h2;
|
|
360
|
-
if (i2 === b$1)
|
|
361
|
-
return i2;
|
|
362
|
-
let d2 = e2 !== void 0 ? (o2 = s2._$Cl) === null || o2 === void 0 ? void 0 : o2[e2] : s2._$Cu;
|
|
363
|
-
const u2 = r$3(i2) ? void 0 : i2._$litDirective$;
|
|
364
|
-
return (d2 == null ? void 0 : d2.constructor) !== u2 && ((n2 = d2 == null ? void 0 : d2._$AO) === null || n2 === void 0 || n2.call(d2, false), u2 === void 0 ? d2 = void 0 : (d2 = new u2(t2), d2._$AT(t2, s2, e2)), e2 !== void 0 ? ((l2 = (h2 = s2)._$Cl) !== null && l2 !== void 0 ? l2 : h2._$Cl = [])[e2] = d2 : s2._$Cu = d2), d2 !== void 0 && (i2 = V(t2, d2._$AS(t2, i2.values), d2, e2)), i2;
|
|
365
|
-
}
|
|
366
|
-
class E {
|
|
367
|
-
constructor(t2, i2) {
|
|
368
|
-
this.v = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
|
|
369
|
-
}
|
|
370
|
-
get parentNode() {
|
|
371
|
-
return this._$AM.parentNode;
|
|
372
|
-
}
|
|
373
|
-
get _$AU() {
|
|
374
|
-
return this._$AM._$AU;
|
|
375
|
-
}
|
|
376
|
-
p(t2) {
|
|
377
|
-
var i2;
|
|
378
|
-
const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = ((i2 = t2 == null ? void 0 : t2.creationScope) !== null && i2 !== void 0 ? i2 : l$2).importNode(s2, true);
|
|
379
|
-
A$1.currentNode = o2;
|
|
380
|
-
let n2 = A$1.nextNode(), h2 = 0, r2 = 0, d2 = e2[0];
|
|
381
|
-
for (; d2 !== void 0; ) {
|
|
382
|
-
if (h2 === d2.index) {
|
|
383
|
-
let i3;
|
|
384
|
-
d2.type === 2 ? i3 = new N(n2, n2.nextSibling, this, t2) : d2.type === 1 ? i3 = new d2.ctor(n2, d2.name, d2.strings, this, t2) : d2.type === 6 && (i3 = new L(n2, this, t2)), this.v.push(i3), d2 = e2[++r2];
|
|
385
|
-
}
|
|
386
|
-
h2 !== (d2 == null ? void 0 : d2.index) && (n2 = A$1.nextNode(), h2++);
|
|
387
|
-
}
|
|
388
|
-
return o2;
|
|
389
|
-
}
|
|
390
|
-
m(t2) {
|
|
391
|
-
let i2 = 0;
|
|
392
|
-
for (const s2 of this.v)
|
|
393
|
-
s2 !== void 0 && (s2.strings !== void 0 ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
class N {
|
|
397
|
-
constructor(t2, i2, s2, e2) {
|
|
398
|
-
var o2;
|
|
399
|
-
this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cg = (o2 = e2 == null ? void 0 : e2.isConnected) === null || o2 === void 0 || o2;
|
|
400
|
-
}
|
|
401
|
-
get _$AU() {
|
|
402
|
-
var t2, i2;
|
|
403
|
-
return (i2 = (t2 = this._$AM) === null || t2 === void 0 ? void 0 : t2._$AU) !== null && i2 !== void 0 ? i2 : this._$Cg;
|
|
404
|
-
}
|
|
405
|
-
get parentNode() {
|
|
406
|
-
let t2 = this._$AA.parentNode;
|
|
407
|
-
const i2 = this._$AM;
|
|
408
|
-
return i2 !== void 0 && t2.nodeType === 11 && (t2 = i2.parentNode), t2;
|
|
409
|
-
}
|
|
410
|
-
get startNode() {
|
|
411
|
-
return this._$AA;
|
|
412
|
-
}
|
|
413
|
-
get endNode() {
|
|
414
|
-
return this._$AB;
|
|
415
|
-
}
|
|
416
|
-
_$AI(t2, i2 = this) {
|
|
417
|
-
t2 = V(this, t2, i2), r$3(t2) ? t2 === T || t2 == null || t2 === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : t2 !== this._$AH && t2 !== b$1 && this.$(t2) : t2._$litType$ !== void 0 ? this.T(t2) : t2.nodeType !== void 0 ? this.S(t2) : u$2(t2) ? this.M(t2) : this.$(t2);
|
|
418
|
-
}
|
|
419
|
-
A(t2, i2 = this._$AB) {
|
|
420
|
-
return this._$AA.parentNode.insertBefore(t2, i2);
|
|
421
|
-
}
|
|
422
|
-
S(t2) {
|
|
423
|
-
this._$AH !== t2 && (this._$AR(), this._$AH = this.A(t2));
|
|
424
|
-
}
|
|
425
|
-
$(t2) {
|
|
426
|
-
this._$AH !== T && r$3(this._$AH) ? this._$AA.nextSibling.data = t2 : this.S(l$2.createTextNode(t2)), this._$AH = t2;
|
|
427
|
-
}
|
|
428
|
-
T(t2) {
|
|
429
|
-
var i2;
|
|
430
|
-
const { values: s2, _$litType$: e2 } = t2, o2 = typeof e2 == "number" ? this._$AC(t2) : (e2.el === void 0 && (e2.el = P.createElement(e2.h, this.options)), e2);
|
|
431
|
-
if (((i2 = this._$AH) === null || i2 === void 0 ? void 0 : i2._$AD) === o2)
|
|
432
|
-
this._$AH.m(s2);
|
|
433
|
-
else {
|
|
434
|
-
const t3 = new E(o2, this), i3 = t3.p(this.options);
|
|
435
|
-
t3.m(s2), this.S(i3), this._$AH = t3;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
_$AC(t2) {
|
|
439
|
-
let i2 = x$1.get(t2.strings);
|
|
440
|
-
return i2 === void 0 && x$1.set(t2.strings, i2 = new P(t2)), i2;
|
|
441
|
-
}
|
|
442
|
-
M(t2) {
|
|
443
|
-
d$1(this._$AH) || (this._$AH = [], this._$AR());
|
|
444
|
-
const i2 = this._$AH;
|
|
445
|
-
let s2, e2 = 0;
|
|
446
|
-
for (const o2 of t2)
|
|
447
|
-
e2 === i2.length ? i2.push(s2 = new N(this.A(h$2()), this.A(h$2()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++;
|
|
448
|
-
e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
|
|
449
|
-
}
|
|
450
|
-
_$AR(t2 = this._$AA.nextSibling, i2) {
|
|
451
|
-
var s2;
|
|
452
|
-
for ((s2 = this._$AP) === null || s2 === void 0 || s2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) {
|
|
453
|
-
const i3 = t2.nextSibling;
|
|
454
|
-
t2.remove(), t2 = i3;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
setConnected(t2) {
|
|
458
|
-
var i2;
|
|
459
|
-
this._$AM === void 0 && (this._$Cg = t2, (i2 = this._$AP) === null || i2 === void 0 || i2.call(this, t2));
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
class S$1 {
|
|
463
|
-
constructor(t2, i2, s2, e2, o2) {
|
|
464
|
-
this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = o2, s2.length > 2 || s2[0] !== "" || s2[1] !== "" ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = T;
|
|
465
|
-
}
|
|
466
|
-
get tagName() {
|
|
467
|
-
return this.element.tagName;
|
|
468
|
-
}
|
|
469
|
-
get _$AU() {
|
|
470
|
-
return this._$AM._$AU;
|
|
471
|
-
}
|
|
472
|
-
_$AI(t2, i2 = this, s2, e2) {
|
|
473
|
-
const o2 = this.strings;
|
|
474
|
-
let n2 = false;
|
|
475
|
-
if (o2 === void 0)
|
|
476
|
-
t2 = V(this, t2, i2, 0), n2 = !r$3(t2) || t2 !== this._$AH && t2 !== b$1, n2 && (this._$AH = t2);
|
|
477
|
-
else {
|
|
478
|
-
const e3 = t2;
|
|
479
|
-
let l2, h2;
|
|
480
|
-
for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++)
|
|
481
|
-
h2 = V(this, e3[s2 + l2], i2, l2), h2 === b$1 && (h2 = this._$AH[l2]), n2 || (n2 = !r$3(h2) || h2 !== this._$AH[l2]), h2 === T ? t2 = T : t2 !== T && (t2 += (h2 != null ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
|
|
482
|
-
}
|
|
483
|
-
n2 && !e2 && this.k(t2);
|
|
484
|
-
}
|
|
485
|
-
k(t2) {
|
|
486
|
-
t2 === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 != null ? t2 : "");
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
class M extends S$1 {
|
|
490
|
-
constructor() {
|
|
491
|
-
super(...arguments), this.type = 3;
|
|
492
|
-
}
|
|
493
|
-
k(t2) {
|
|
494
|
-
this.element[this.name] = t2 === T ? void 0 : t2;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
const k = i$4 ? i$4.emptyScript : "";
|
|
498
|
-
class H extends S$1 {
|
|
499
|
-
constructor() {
|
|
500
|
-
super(...arguments), this.type = 4;
|
|
501
|
-
}
|
|
502
|
-
k(t2) {
|
|
503
|
-
t2 && t2 !== T ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
class I extends S$1 {
|
|
507
|
-
constructor(t2, i2, s2, e2, o2) {
|
|
508
|
-
super(t2, i2, s2, e2, o2), this.type = 5;
|
|
509
|
-
}
|
|
510
|
-
_$AI(t2, i2 = this) {
|
|
511
|
-
var s2;
|
|
512
|
-
if ((t2 = (s2 = V(this, t2, i2, 0)) !== null && s2 !== void 0 ? s2 : T) === b$1)
|
|
513
|
-
return;
|
|
514
|
-
const e2 = this._$AH, o2 = t2 === T && e2 !== T || t2.capture !== e2.capture || t2.once !== e2.once || t2.passive !== e2.passive, n2 = t2 !== T && (e2 === T || o2);
|
|
515
|
-
o2 && this.element.removeEventListener(this.name, this, e2), n2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
|
|
516
|
-
}
|
|
517
|
-
handleEvent(t2) {
|
|
518
|
-
var i2, s2;
|
|
519
|
-
typeof this._$AH == "function" ? this._$AH.call((s2 = (i2 = this.options) === null || i2 === void 0 ? void 0 : i2.host) !== null && s2 !== void 0 ? s2 : this.element, t2) : this._$AH.handleEvent(t2);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
class L {
|
|
523
|
-
constructor(t2, i2, s2) {
|
|
524
|
-
this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
|
|
525
|
-
}
|
|
526
|
-
get _$AU() {
|
|
527
|
-
return this._$AM._$AU;
|
|
528
|
-
}
|
|
529
|
-
_$AI(t2) {
|
|
530
|
-
V(this, t2);
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
const R = { P: "$lit$", V: e$5, L: o$4, I: 1, N: C, R: E, D: u$2, j: V, H: N, O: S$1, F: H, B: I, W: M, Z: L }, z = window.litHtmlPolyfillSupport;
|
|
534
|
-
z == null || z(P, N), ((t$2 = globalThis.litHtmlVersions) !== null && t$2 !== void 0 ? t$2 : globalThis.litHtmlVersions = []).push("2.0.2");
|
|
535
|
-
/**
|
|
536
|
-
* @license
|
|
537
|
-
* Copyright 2017 Google LLC
|
|
538
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
539
|
-
*/
|
|
540
|
-
var l$1, o$3;
|
|
541
|
-
class s$1 extends a$3 {
|
|
542
|
-
constructor() {
|
|
543
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Dt = void 0;
|
|
544
|
-
}
|
|
545
|
-
createRenderRoot() {
|
|
546
|
-
var t2, e2;
|
|
547
|
-
const i2 = super.createRenderRoot();
|
|
548
|
-
return (t2 = (e2 = this.renderOptions).renderBefore) !== null && t2 !== void 0 || (e2.renderBefore = i2.firstChild), i2;
|
|
549
|
-
}
|
|
550
|
-
update(t2) {
|
|
551
|
-
const i2 = this.render();
|
|
552
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Dt = w$1(i2, this.renderRoot, this.renderOptions);
|
|
553
|
-
}
|
|
554
|
-
connectedCallback() {
|
|
555
|
-
var t2;
|
|
556
|
-
super.connectedCallback(), (t2 = this._$Dt) === null || t2 === void 0 || t2.setConnected(true);
|
|
557
|
-
}
|
|
558
|
-
disconnectedCallback() {
|
|
559
|
-
var t2;
|
|
560
|
-
super.disconnectedCallback(), (t2 = this._$Dt) === null || t2 === void 0 || t2.setConnected(false);
|
|
561
|
-
}
|
|
562
|
-
render() {
|
|
563
|
-
return b$1;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
s$1.finalized = true, s$1._$litElement$ = true, (l$1 = globalThis.litElementHydrateSupport) === null || l$1 === void 0 || l$1.call(globalThis, { LitElement: s$1 });
|
|
567
|
-
const n$3 = globalThis.litElementPolyfillSupport;
|
|
568
|
-
n$3 == null || n$3({ LitElement: s$1 });
|
|
569
|
-
((o$3 = globalThis.litElementVersions) !== null && o$3 !== void 0 ? o$3 : globalThis.litElementVersions = []).push("3.0.2");
|
|
570
|
-
/**
|
|
571
|
-
* @license
|
|
572
|
-
* Copyright 2017 Google LLC
|
|
573
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
574
|
-
*/
|
|
575
|
-
const n$2 = (n2) => (e2) => typeof e2 == "function" ? ((n3, e3) => (window.customElements.define(n3, e3), e3))(n2, e2) : ((n3, e3) => {
|
|
576
|
-
const { kind: t2, elements: i2 } = e3;
|
|
577
|
-
return { kind: t2, elements: i2, finisher(e4) {
|
|
578
|
-
window.customElements.define(n3, e4);
|
|
579
|
-
} };
|
|
580
|
-
})(n2, e2);
|
|
581
|
-
/**
|
|
582
|
-
* @license
|
|
583
|
-
* Copyright 2017 Google LLC
|
|
584
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
585
|
-
*/
|
|
586
|
-
const i$3 = (i2, e2) => e2.kind === "method" && e2.descriptor && !("value" in e2.descriptor) ? __spreadProps(__spreadValues({}, e2), { finisher(n2) {
|
|
587
|
-
n2.createProperty(e2.key, i2);
|
|
588
|
-
} }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e2.key, initializer() {
|
|
589
|
-
typeof e2.initializer == "function" && (this[e2.key] = e2.initializer.call(this));
|
|
590
|
-
}, finisher(n2) {
|
|
591
|
-
n2.createProperty(e2.key, i2);
|
|
592
|
-
} };
|
|
593
|
-
function e$4(e2) {
|
|
594
|
-
return (n2, t2) => t2 !== void 0 ? ((i2, e3, n3) => {
|
|
595
|
-
e3.constructor.createProperty(n3, i2);
|
|
596
|
-
})(e2, n2, t2) : i$3(e2, n2);
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* @license
|
|
600
|
-
* Copyright 2017 Google LLC
|
|
601
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
602
|
-
*/
|
|
603
|
-
function t$1(t2) {
|
|
604
|
-
return e$4(__spreadProps(__spreadValues({}, t2), { state: true }));
|
|
605
|
-
}
|
|
606
|
-
var publisherProxy = { exports: {} };
|
|
607
|
-
(function(module) {
|
|
608
|
-
(() => {
|
|
609
|
-
var __webpack_require__ = {};
|
|
610
|
-
(() => {
|
|
611
|
-
__webpack_require__.d = (exports, definition) => {
|
|
612
|
-
for (var key in definition) {
|
|
613
|
-
if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
614
|
-
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
};
|
|
618
|
-
})();
|
|
619
|
-
(() => {
|
|
620
|
-
__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
|
|
621
|
-
})();
|
|
622
|
-
(() => {
|
|
623
|
-
__webpack_require__.r = (exports) => {
|
|
624
|
-
if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
625
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
626
|
-
}
|
|
627
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
628
|
-
};
|
|
629
|
-
})();
|
|
630
|
-
var __webpack_exports__ = {};
|
|
631
|
-
/*!*******************!*\
|
|
632
|
-
!*** ./index.mjs ***!
|
|
633
|
-
\*******************/
|
|
634
|
-
__webpack_require__.r(__webpack_exports__);
|
|
635
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
636
|
-
"PublisherManager": () => PublisherManager,
|
|
637
|
-
"default": () => Publisher
|
|
638
|
-
});
|
|
639
|
-
function _inherits(subClass, superClass) {
|
|
640
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
641
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
642
|
-
}
|
|
643
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
644
|
-
if (superClass)
|
|
645
|
-
_setPrototypeOf(subClass, superClass);
|
|
646
|
-
}
|
|
647
|
-
function _setPrototypeOf(o2, p2) {
|
|
648
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o3, p3) {
|
|
649
|
-
o3.__proto__ = p3;
|
|
650
|
-
return o3;
|
|
651
|
-
};
|
|
652
|
-
return _setPrototypeOf(o2, p2);
|
|
653
|
-
}
|
|
654
|
-
function _createSuper(Derived) {
|
|
655
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
656
|
-
return function _createSuperInternal() {
|
|
657
|
-
var Super = _getPrototypeOf(Derived), result;
|
|
658
|
-
if (hasNativeReflectConstruct) {
|
|
659
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
660
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
661
|
-
} else {
|
|
662
|
-
result = Super.apply(this, arguments);
|
|
663
|
-
}
|
|
664
|
-
return _possibleConstructorReturn(this, result);
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
function _possibleConstructorReturn(self, call) {
|
|
668
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
669
|
-
return call;
|
|
670
|
-
} else if (call !== void 0) {
|
|
671
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
672
|
-
}
|
|
673
|
-
return _assertThisInitialized(self);
|
|
674
|
-
}
|
|
675
|
-
function _assertThisInitialized(self) {
|
|
676
|
-
if (self === void 0) {
|
|
677
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
678
|
-
}
|
|
679
|
-
return self;
|
|
680
|
-
}
|
|
681
|
-
function _isNativeReflectConstruct() {
|
|
682
|
-
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
683
|
-
return false;
|
|
684
|
-
if (Reflect.construct.sham)
|
|
685
|
-
return false;
|
|
686
|
-
if (typeof Proxy === "function")
|
|
687
|
-
return true;
|
|
688
|
-
try {
|
|
689
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
690
|
-
}));
|
|
691
|
-
return true;
|
|
692
|
-
} catch (e2) {
|
|
693
|
-
return false;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
function _getPrototypeOf(o2) {
|
|
697
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o3) {
|
|
698
|
-
return o3.__proto__ || Object.getPrototypeOf(o3);
|
|
699
|
-
};
|
|
700
|
-
return _getPrototypeOf(o2);
|
|
701
|
-
}
|
|
702
|
-
function _defineProperty(obj, key, value) {
|
|
703
|
-
if (key in obj) {
|
|
704
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
705
|
-
} else {
|
|
706
|
-
obj[key] = value;
|
|
707
|
-
}
|
|
708
|
-
return obj;
|
|
709
|
-
}
|
|
710
|
-
function _classCallCheck(instance, Constructor) {
|
|
711
|
-
if (!(instance instanceof Constructor)) {
|
|
712
|
-
throw new TypeError("Cannot call a class as a function");
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
function _defineProperties(target, props) {
|
|
716
|
-
for (var i2 = 0; i2 < props.length; i2++) {
|
|
717
|
-
var descriptor = props[i2];
|
|
718
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
719
|
-
descriptor.configurable = true;
|
|
720
|
-
if ("value" in descriptor)
|
|
721
|
-
descriptor.writable = true;
|
|
722
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
726
|
-
if (protoProps)
|
|
727
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
728
|
-
if (staticProps)
|
|
729
|
-
_defineProperties(Constructor, staticProps);
|
|
730
|
-
return Constructor;
|
|
731
|
-
}
|
|
732
|
-
function _typeof(obj) {
|
|
733
|
-
"@babel/helpers - typeof";
|
|
734
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
735
|
-
_typeof = function _typeof2(obj2) {
|
|
736
|
-
return typeof obj2;
|
|
737
|
-
};
|
|
738
|
-
} else {
|
|
739
|
-
_typeof = function _typeof2(obj2) {
|
|
740
|
-
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
741
|
-
};
|
|
742
|
-
}
|
|
743
|
-
return _typeof(obj);
|
|
744
|
-
}
|
|
745
|
-
function isComplex(value) {
|
|
746
|
-
return _typeof(value) === "object" && value != null;
|
|
747
|
-
}
|
|
748
|
-
var CustomProxy = /* @__PURE__ */ function() {
|
|
749
|
-
function CustomProxy2(target) {
|
|
750
|
-
var parentProxPub = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
751
|
-
_classCallCheck(this, CustomProxy2);
|
|
752
|
-
this._proxies_ = new Map();
|
|
753
|
-
this._value_ = target;
|
|
754
|
-
this._assignListeners_ = new Set();
|
|
755
|
-
this._mutationListeners_ = new Set();
|
|
756
|
-
this._fillListeners_ = new Set();
|
|
757
|
-
this._templateFillListeners_ = new Set();
|
|
758
|
-
this._lockInternalMutationPublishing_ = false;
|
|
759
|
-
this.parent = parentProxPub;
|
|
760
|
-
this.root = this;
|
|
761
|
-
while (this.root.parent) {
|
|
762
|
-
this.root = this.root.parent;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
_createClass(CustomProxy2, [{
|
|
766
|
-
key: "_publishInternalMutation_",
|
|
767
|
-
value: function _publishInternalMutation_() {
|
|
768
|
-
if (this._lockInternalMutationPublishing_)
|
|
769
|
-
return;
|
|
770
|
-
this._mutationListeners_.forEach(function(handler) {
|
|
771
|
-
return handler();
|
|
772
|
-
});
|
|
773
|
-
if (this.parent) {
|
|
774
|
-
this.parent._publishInternalMutation_();
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
}, {
|
|
778
|
-
key: "_publishAssignement_",
|
|
779
|
-
value: function _publishAssignement_() {
|
|
780
|
-
var _this = this;
|
|
781
|
-
this._assignListeners_.forEach(function(handler) {
|
|
782
|
-
return handler(_this._value_.__value ? _this._value_.__value : _this._value_);
|
|
783
|
-
});
|
|
784
|
-
this._publishInternalMutation_();
|
|
785
|
-
}
|
|
786
|
-
}, {
|
|
787
|
-
key: "_publishDynamicFilling_",
|
|
788
|
-
value: function _publishDynamicFilling_(key, value) {
|
|
789
|
-
this._fillListeners_.forEach(function(handler) {
|
|
790
|
-
return handler[key] = value;
|
|
791
|
-
});
|
|
792
|
-
this._publishTemplateFilling_(key, value);
|
|
793
|
-
}
|
|
794
|
-
}, {
|
|
795
|
-
key: "_publishTemplateFilling_",
|
|
796
|
-
value: function _publishTemplateFilling_(key, value) {
|
|
797
|
-
this._templateFillListeners_.forEach(function(handler) {
|
|
798
|
-
if (typeof handler[key] != "undefined") {
|
|
799
|
-
handler[key] = value;
|
|
800
|
-
}
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
}, {
|
|
804
|
-
key: "onAssign",
|
|
805
|
-
value: function onAssign(handler) {
|
|
806
|
-
if (typeof handler != "function")
|
|
807
|
-
return;
|
|
808
|
-
this._assignListeners_.add(handler);
|
|
809
|
-
this._publishAssignement_();
|
|
810
|
-
}
|
|
811
|
-
}, {
|
|
812
|
-
key: "offAssign",
|
|
813
|
-
value: function offAssign(handler) {
|
|
814
|
-
this._assignListeners_["delete"](handler);
|
|
815
|
-
}
|
|
816
|
-
}, {
|
|
817
|
-
key: "onInternalMutation",
|
|
818
|
-
value: function onInternalMutation(handler) {
|
|
819
|
-
if (typeof handler != "function")
|
|
820
|
-
return;
|
|
821
|
-
this._mutationListeners_.add(handler);
|
|
822
|
-
this._publishInternalMutation_();
|
|
823
|
-
}
|
|
824
|
-
}, {
|
|
825
|
-
key: "offInternalMutation",
|
|
826
|
-
value: function offInternalMutation(handler) {
|
|
827
|
-
this._mutationListeners_["delete"](handler);
|
|
828
|
-
}
|
|
829
|
-
}, {
|
|
830
|
-
key: "startTemplateFilling",
|
|
831
|
-
value: function startTemplateFilling(handler) {
|
|
832
|
-
this._templateFillListeners_.add(handler);
|
|
833
|
-
for (var z2 in this._value_) {
|
|
834
|
-
this._publishTemplateFilling_(z2, this._value_[z2]);
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
}, {
|
|
838
|
-
key: "stopTemplateFilling",
|
|
839
|
-
value: function stopTemplateFilling(handler) {
|
|
840
|
-
this._templateFillListeners_["delete"](handler);
|
|
841
|
-
}
|
|
842
|
-
}, {
|
|
843
|
-
key: "startDynamicFilling",
|
|
844
|
-
value: function startDynamicFilling(handler) {
|
|
845
|
-
this._fillListeners_.add(handler);
|
|
846
|
-
for (var z2 in this._value_) {
|
|
847
|
-
this._publishDynamicFilling_(z2, this._value_[z2]);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}, {
|
|
851
|
-
key: "stopDynamicFilling",
|
|
852
|
-
value: function stopDynamicFilling(handler) {
|
|
853
|
-
this._fillListeners_["delete"](handler);
|
|
854
|
-
}
|
|
855
|
-
}, {
|
|
856
|
-
key: "set",
|
|
857
|
-
value: function set(newValue) {
|
|
858
|
-
var _this2 = this;
|
|
859
|
-
this._value_ = newValue;
|
|
860
|
-
if (this._value_.hasOwnProperty("__value")) {
|
|
861
|
-
this._publishAssignement_();
|
|
862
|
-
return true;
|
|
863
|
-
}
|
|
864
|
-
this._lockInternalMutationPublishing_ = true;
|
|
865
|
-
Array.from(this._proxies_.keys()).forEach(function(key2) {
|
|
866
|
-
if (!_this2._value_[key2]) {
|
|
867
|
-
_this2._proxies_["delete"](key2);
|
|
868
|
-
}
|
|
869
|
-
});
|
|
870
|
-
for (var key in this._value_) {
|
|
871
|
-
var v2 = this._value_[key];
|
|
872
|
-
if (!this._proxies_.has(key)) {
|
|
873
|
-
this._proxies_.set(key, new Publisher(isComplex(v2) ? v2 : {
|
|
874
|
-
__value: v2
|
|
875
|
-
}, this));
|
|
876
|
-
}
|
|
877
|
-
this._proxies_.get(key).set(isComplex(v2) ? v2 : {
|
|
878
|
-
__value: v2
|
|
879
|
-
});
|
|
880
|
-
this._publishDynamicFilling_(key, this._value_[key]);
|
|
881
|
-
}
|
|
882
|
-
this._lockInternalMutationPublishing_ = false;
|
|
883
|
-
this._publishAssignement_();
|
|
884
|
-
return true;
|
|
885
|
-
}
|
|
886
|
-
}, {
|
|
887
|
-
key: "get",
|
|
888
|
-
value: function get() {
|
|
889
|
-
if (this._value_.__value)
|
|
890
|
-
return this._value_.__value;
|
|
891
|
-
return this._value_;
|
|
892
|
-
}
|
|
893
|
-
}]);
|
|
894
|
-
return CustomProxy2;
|
|
895
|
-
}();
|
|
896
|
-
var PublisherManager = /* @__PURE__ */ function() {
|
|
897
|
-
function PublisherManager2() {
|
|
898
|
-
_classCallCheck(this, PublisherManager2);
|
|
899
|
-
if (PublisherManager2.instance != null)
|
|
900
|
-
throw "Singleton / use getInstance";
|
|
901
|
-
PublisherManager2.instance = this;
|
|
902
|
-
this.publishers = new Map();
|
|
903
|
-
}
|
|
904
|
-
_createClass(PublisherManager2, [{
|
|
905
|
-
key: "get",
|
|
906
|
-
value: function get(id) {
|
|
907
|
-
if (!this.publishers.has(id))
|
|
908
|
-
this.publishers.set(id, new Publisher({}));
|
|
909
|
-
return this.publishers.get(id);
|
|
910
|
-
}
|
|
911
|
-
}], [{
|
|
912
|
-
key: "getInstance",
|
|
913
|
-
value: function getInstance(channel) {
|
|
914
|
-
if (PublisherManager2.instance == null)
|
|
915
|
-
return new PublisherManager2();
|
|
916
|
-
return PublisherManager2.instance;
|
|
917
|
-
}
|
|
918
|
-
}]);
|
|
919
|
-
return PublisherManager2;
|
|
920
|
-
}();
|
|
921
|
-
_defineProperty(PublisherManager, "instance", null);
|
|
922
|
-
var Publisher = /* @__PURE__ */ function(_CustomProxy) {
|
|
923
|
-
_inherits(Publisher2, _CustomProxy);
|
|
924
|
-
var _super = _createSuper(Publisher2);
|
|
925
|
-
function Publisher2(target) {
|
|
926
|
-
var _this3;
|
|
927
|
-
var parentProxPub = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
928
|
-
_classCallCheck(this, Publisher2);
|
|
929
|
-
_this3 = _super.call(this, target, parentProxPub);
|
|
930
|
-
var that = _assertThisInitialized(_this3);
|
|
931
|
-
return _possibleConstructorReturn(_this3, new Proxy(_assertThisInitialized(_this3), {
|
|
932
|
-
"get": function get(oTarget, sKey) {
|
|
933
|
-
if (["onAssign", "offAssign", "startDynamicFilling", "stopDynamicFilling", "startTemplateFilling", "stopTemplateFilling", "onInternalMutation", "set", "get", "_templateFillListeners_", "_fillListeners_", "_assignListeners_", "_publishInternalMutation_", "_mutationListeners_", "_publishDynamicFilling_", "_publishTemplateFilling_", "_publishAssignement_", "_proxies_", "parent", "_value_", "_lockInternalMutationPublishing_"].includes(sKey))
|
|
934
|
-
return that[sKey];
|
|
935
|
-
if (!that._proxies_.has(sKey)) {
|
|
936
|
-
var vValue = target[sKey];
|
|
937
|
-
that._proxies_.set(sKey, new Publisher2(isComplex(vValue) ? vValue : {
|
|
938
|
-
__value: vValue
|
|
939
|
-
}, that));
|
|
940
|
-
}
|
|
941
|
-
return that._proxies_.get(sKey);
|
|
942
|
-
},
|
|
943
|
-
"set": function set(oTarget, sKey, vValue) {
|
|
944
|
-
if (sKey == "_value_") {
|
|
945
|
-
oTarget._value_ = vValue;
|
|
946
|
-
return oTarget._value_;
|
|
947
|
-
}
|
|
948
|
-
var isValueComplex = isComplex(vValue);
|
|
949
|
-
if (!that._proxies_.has(sKey)) {
|
|
950
|
-
that._proxies_.set(sKey, new Publisher2(isValueComplex ? vValue : {
|
|
951
|
-
__value: vValue
|
|
952
|
-
}, that));
|
|
953
|
-
}
|
|
954
|
-
if (target[sKey] == vValue && isValueComplex)
|
|
955
|
-
return;
|
|
956
|
-
target[sKey] = vValue;
|
|
957
|
-
that._publishDynamicFilling_(sKey, vValue);
|
|
958
|
-
that._proxies_.get(sKey).set(isComplex(vValue) ? vValue : {
|
|
959
|
-
__value: vValue
|
|
960
|
-
});
|
|
961
|
-
return that._proxies_.get(sKey);
|
|
962
|
-
},
|
|
963
|
-
"deleteProperty": function deleteProperty(oTarget, sKey) {
|
|
964
|
-
that._proxies_.get(sKey).set(null);
|
|
965
|
-
that._publishDynamicFilling_(sKey, null);
|
|
966
|
-
that._proxies_["delete"](sKey);
|
|
967
|
-
return delete target[sKey];
|
|
968
|
-
},
|
|
969
|
-
"enumerate": function enumerate(oTarget, sKey) {
|
|
970
|
-
return target.keys();
|
|
971
|
-
},
|
|
972
|
-
"has": function has(oTarget, sKey) {
|
|
973
|
-
return sKey in target;
|
|
974
|
-
},
|
|
975
|
-
"defineProperty": function defineProperty(oTarget, sKey, oDesc) {
|
|
976
|
-
if (oDesc && "value" in oDesc) {
|
|
977
|
-
target[sKey] = oDesc.value;
|
|
978
|
-
}
|
|
979
|
-
return target;
|
|
980
|
-
},
|
|
981
|
-
"getOwnPropertyDescriptor": function getOwnPropertyDescriptor(oTarget, sKey) {
|
|
982
|
-
target[sKey];
|
|
983
|
-
return {
|
|
984
|
-
enumerable: true,
|
|
985
|
-
configurable: true
|
|
986
|
-
};
|
|
987
|
-
},
|
|
988
|
-
"ownKeys": function ownKeys(target2) {
|
|
989
|
-
if (that._value_.__value)
|
|
990
|
-
return Object.keys(this._value_.__value);
|
|
991
|
-
return Object.keys(that._value_);
|
|
992
|
-
}
|
|
993
|
-
}));
|
|
994
|
-
}
|
|
995
|
-
return Publisher2;
|
|
996
|
-
}(CustomProxy);
|
|
997
|
-
module.exports = {
|
|
998
|
-
Publisher,
|
|
999
|
-
PublisherManager
|
|
1000
|
-
};
|
|
1001
|
-
})();
|
|
1002
|
-
})(publisherProxy);
|
|
1003
|
-
var __defProp$k = Object.defineProperty;
|
|
1004
|
-
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
1005
|
-
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
1006
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
1007
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
1008
|
-
if (decorator = decorators[i2])
|
|
1009
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1010
|
-
if (kind && result)
|
|
1011
|
-
__defProp$k(target, key, result);
|
|
1012
|
-
return result;
|
|
1013
|
-
};
|
|
1014
|
-
const Subscriber = (superClass) => {
|
|
1015
|
-
const _SubscriberElement = class extends superClass {
|
|
1016
|
-
constructor(...args) {
|
|
1017
|
-
super();
|
|
1018
|
-
this.title = "";
|
|
1019
|
-
this.dataProvider = null;
|
|
1020
|
-
this._props = null;
|
|
1021
|
-
this.args = args;
|
|
1022
|
-
}
|
|
1023
|
-
makeShadow(props, value) {
|
|
1024
|
-
if (typeof value == "object" && value !== null) {
|
|
1025
|
-
let newValue = Array.isArray(value) ? [] : {};
|
|
1026
|
-
Object.assign(newValue, value);
|
|
1027
|
-
value = newValue;
|
|
1028
|
-
for (let key in props) {
|
|
1029
|
-
if (!value[key])
|
|
1030
|
-
value[key] = props[key];
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
return value;
|
|
1034
|
-
}
|
|
1035
|
-
getAncestorAttributeValue(attributeName) {
|
|
1036
|
-
let node = this;
|
|
1037
|
-
while (!(node.hasAttribute && node.hasAttribute(attributeName)) && node.parentNode) {
|
|
1038
|
-
if (node.parentNode)
|
|
1039
|
-
node = node.parentNode;
|
|
1040
|
-
if (node.host)
|
|
1041
|
-
node = node.host;
|
|
1042
|
-
}
|
|
1043
|
-
if (!node.hasAttribute) {
|
|
1044
|
-
return null;
|
|
1045
|
-
}
|
|
1046
|
-
return node.getAttribute(attributeName);
|
|
1047
|
-
}
|
|
1048
|
-
get props() {
|
|
1049
|
-
return this.publisher.get();
|
|
1050
|
-
}
|
|
1051
|
-
set props(value) {
|
|
1052
|
-
if (!this.publisher)
|
|
1053
|
-
this.initPublisher();
|
|
1054
|
-
this._props = value;
|
|
1055
|
-
if (this.publisher) {
|
|
1056
|
-
this.publisher.set(value);
|
|
1057
|
-
}
|
|
1058
|
-
this.requestUpdate();
|
|
1059
|
-
}
|
|
1060
|
-
connectedCallback() {
|
|
1061
|
-
super.connectedCallback();
|
|
1062
|
-
_SubscriberElement.instanceCounter++;
|
|
1063
|
-
this.style.display = "contents";
|
|
1064
|
-
this.initPublisher();
|
|
1065
|
-
}
|
|
1066
|
-
createRenderRoot() {
|
|
1067
|
-
if (this.getAncestorAttributeValue("styled") != void 0) {
|
|
1068
|
-
return super.createRenderRoot();
|
|
1069
|
-
}
|
|
1070
|
-
return this;
|
|
1071
|
-
}
|
|
1072
|
-
initPublisher() {
|
|
1073
|
-
if (!document)
|
|
1074
|
-
return;
|
|
1075
|
-
if (this.publisher)
|
|
1076
|
-
this.publisher.stopTemplateFilling(this);
|
|
1077
|
-
const mng = publisherProxy.exports.PublisherManager.getInstance();
|
|
1078
|
-
let publisherId = this.dataProvider;
|
|
1079
|
-
if (!publisherId)
|
|
1080
|
-
publisherId = this.getAncestorAttributeValue("dataProvider");
|
|
1081
|
-
if (!publisherId && this._props) {
|
|
1082
|
-
this.dataProvider = publisherId = "__subscriber__" + _SubscriberElement.instanceCounter;
|
|
1083
|
-
}
|
|
1084
|
-
if (publisherId) {
|
|
1085
|
-
let pub = mng.get(publisherId);
|
|
1086
|
-
this.dataProvider = publisherId;
|
|
1087
|
-
if (this.hasAttribute("dataPath")) {
|
|
1088
|
-
let dataPath = this.getAttribute("dataPath");
|
|
1089
|
-
this.dataProvider = publisherId + "/" + dataPath;
|
|
1090
|
-
let array = dataPath.split(".");
|
|
1091
|
-
for (let key of array)
|
|
1092
|
-
pub = pub[key];
|
|
1093
|
-
pub.onAssign((v2) => {
|
|
1094
|
-
this._props = v2;
|
|
1095
|
-
this.requestUpdate();
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
this.publisher = pub;
|
|
1099
|
-
this.publisher.startTemplateFilling(this);
|
|
1100
|
-
if (this._props)
|
|
1101
|
-
this.publisher.set(this._props);
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
disconnectedCallback() {
|
|
1105
|
-
if (this.publisher)
|
|
1106
|
-
this.publisher.stopTemplateFilling(this);
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
|
-
let SubscriberElement = _SubscriberElement;
|
|
1110
|
-
SubscriberElement.instanceCounter = 0;
|
|
1111
|
-
__decorateClass$k([
|
|
1112
|
-
e$4({ type: String, attribute: "data-title" })
|
|
1113
|
-
], SubscriberElement.prototype, "title", 2);
|
|
1114
|
-
__decorateClass$k([
|
|
1115
|
-
e$4({ type: String, reflect: true })
|
|
1116
|
-
], SubscriberElement.prototype, "dataProvider", 2);
|
|
1117
|
-
__decorateClass$k([
|
|
1118
|
-
e$4()
|
|
1119
|
-
], SubscriberElement.prototype, "props", 1);
|
|
1120
|
-
return SubscriberElement;
|
|
1121
|
-
};
|
|
1122
|
-
/**
|
|
1123
|
-
* @license
|
|
1124
|
-
* Copyright 2017 Google LLC
|
|
1125
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1126
|
-
*/
|
|
1127
|
-
const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$3 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
|
|
1128
|
-
class i$2 {
|
|
1129
|
-
constructor(t2) {
|
|
1130
|
-
}
|
|
1131
|
-
get _$AU() {
|
|
1132
|
-
return this._$AM._$AU;
|
|
1133
|
-
}
|
|
1134
|
-
_$AT(t2, e2, i2) {
|
|
1135
|
-
this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
|
|
1136
|
-
}
|
|
1137
|
-
_$AS(t2, e2) {
|
|
1138
|
-
return this.update(t2, e2);
|
|
1139
|
-
}
|
|
1140
|
-
update(t2, e2) {
|
|
1141
|
-
return this.render(...e2);
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
/**
|
|
1145
|
-
* @license
|
|
1146
|
-
* Copyright 2020 Google LLC
|
|
1147
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1148
|
-
*/
|
|
1149
|
-
const { H: i$1 } = R, r$2 = (o2) => o2.strings === void 0, e$2 = () => document.createComment(""), u$1 = (o2, t2, n2) => {
|
|
1150
|
-
var v2;
|
|
1151
|
-
const l2 = o2._$AA.parentNode, d2 = t2 === void 0 ? o2._$AB : t2._$AA;
|
|
1152
|
-
if (n2 === void 0) {
|
|
1153
|
-
const t3 = l2.insertBefore(e$2(), d2), v3 = l2.insertBefore(e$2(), d2);
|
|
1154
|
-
n2 = new i$1(t3, v3, o2, o2.options);
|
|
1155
|
-
} else {
|
|
1156
|
-
const i2 = n2._$AB.nextSibling, t3 = n2._$AM, r2 = t3 !== o2;
|
|
1157
|
-
if (r2) {
|
|
1158
|
-
let i3;
|
|
1159
|
-
(v2 = n2._$AQ) === null || v2 === void 0 || v2.call(n2, o2), n2._$AM = o2, n2._$AP !== void 0 && (i3 = o2._$AU) !== t3._$AU && n2._$AP(i3);
|
|
1160
|
-
}
|
|
1161
|
-
if (i2 !== d2 || r2) {
|
|
1162
|
-
let o3 = n2._$AA;
|
|
1163
|
-
for (; o3 !== i2; ) {
|
|
1164
|
-
const i3 = o3.nextSibling;
|
|
1165
|
-
l2.insertBefore(o3, d2), o3 = i3;
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
return n2;
|
|
1170
|
-
}, c$1 = (o2, i2, t2 = o2) => (o2._$AI(i2, t2), o2), f$1 = {}, s = (o2, i2 = f$1) => o2._$AH = i2, a$1 = (o2) => o2._$AH, m = (o2) => {
|
|
1171
|
-
var i2;
|
|
1172
|
-
(i2 = o2._$AP) === null || i2 === void 0 || i2.call(o2, false, true);
|
|
1173
|
-
let t2 = o2._$AA;
|
|
1174
|
-
const n2 = o2._$AB.nextSibling;
|
|
1175
|
-
for (; t2 !== n2; ) {
|
|
1176
|
-
const o3 = t2.nextSibling;
|
|
1177
|
-
t2.remove(), t2 = o3;
|
|
1178
|
-
}
|
|
1179
|
-
};
|
|
1180
|
-
/**
|
|
1181
|
-
* @license
|
|
1182
|
-
* Copyright 2017 Google LLC
|
|
1183
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1184
|
-
*/
|
|
1185
|
-
const u = (e2, s2, t2) => {
|
|
1186
|
-
const r2 = new Map();
|
|
1187
|
-
for (let l2 = s2; l2 <= t2; l2++)
|
|
1188
|
-
r2.set(e2[l2], l2);
|
|
1189
|
-
return r2;
|
|
1190
|
-
}, c = e$3(class extends i$2 {
|
|
1191
|
-
constructor(e2) {
|
|
1192
|
-
if (super(e2), e2.type !== t.CHILD)
|
|
1193
|
-
throw Error("repeat() can only be used in text expressions");
|
|
1194
|
-
}
|
|
1195
|
-
dt(e2, s2, t2) {
|
|
1196
|
-
let r2;
|
|
1197
|
-
t2 === void 0 ? t2 = s2 : s2 !== void 0 && (r2 = s2);
|
|
1198
|
-
const l2 = [], o2 = [];
|
|
1199
|
-
let i2 = 0;
|
|
1200
|
-
for (const s3 of e2)
|
|
1201
|
-
l2[i2] = r2 ? r2(s3, i2) : i2, o2[i2] = t2(s3, i2), i2++;
|
|
1202
|
-
return { values: o2, keys: l2 };
|
|
1203
|
-
}
|
|
1204
|
-
render(e2, s2, t2) {
|
|
1205
|
-
return this.dt(e2, s2, t2).values;
|
|
1206
|
-
}
|
|
1207
|
-
update(s$12, [t2, r2, c2]) {
|
|
1208
|
-
var d2;
|
|
1209
|
-
const a2 = a$1(s$12), { values: p2, keys: v2 } = this.dt(t2, r2, c2);
|
|
1210
|
-
if (!Array.isArray(a2))
|
|
1211
|
-
return this.ct = v2, p2;
|
|
1212
|
-
const h2 = (d2 = this.ct) !== null && d2 !== void 0 ? d2 : this.ct = [], m$12 = [];
|
|
1213
|
-
let y, x2, j2 = 0, k2 = a2.length - 1, w2 = 0, A2 = p2.length - 1;
|
|
1214
|
-
for (; j2 <= k2 && w2 <= A2; )
|
|
1215
|
-
if (a2[j2] === null)
|
|
1216
|
-
j2++;
|
|
1217
|
-
else if (a2[k2] === null)
|
|
1218
|
-
k2--;
|
|
1219
|
-
else if (h2[j2] === v2[w2])
|
|
1220
|
-
m$12[w2] = c$1(a2[j2], p2[w2]), j2++, w2++;
|
|
1221
|
-
else if (h2[k2] === v2[A2])
|
|
1222
|
-
m$12[A2] = c$1(a2[k2], p2[A2]), k2--, A2--;
|
|
1223
|
-
else if (h2[j2] === v2[A2])
|
|
1224
|
-
m$12[A2] = c$1(a2[j2], p2[A2]), u$1(s$12, m$12[A2 + 1], a2[j2]), j2++, A2--;
|
|
1225
|
-
else if (h2[k2] === v2[w2])
|
|
1226
|
-
m$12[w2] = c$1(a2[k2], p2[w2]), u$1(s$12, a2[j2], a2[k2]), k2--, w2++;
|
|
1227
|
-
else if (y === void 0 && (y = u(v2, w2, A2), x2 = u(h2, j2, k2)), y.has(h2[j2]))
|
|
1228
|
-
if (y.has(h2[k2])) {
|
|
1229
|
-
const e2 = x2.get(v2[w2]), t3 = e2 !== void 0 ? a2[e2] : null;
|
|
1230
|
-
if (t3 === null) {
|
|
1231
|
-
const e3 = u$1(s$12, a2[j2]);
|
|
1232
|
-
c$1(e3, p2[w2]), m$12[w2] = e3;
|
|
1233
|
-
} else
|
|
1234
|
-
m$12[w2] = c$1(t3, p2[w2]), u$1(s$12, a2[j2], t3), a2[e2] = null;
|
|
1235
|
-
w2++;
|
|
1236
|
-
} else
|
|
1237
|
-
m(a2[k2]), k2--;
|
|
1238
|
-
else
|
|
1239
|
-
m(a2[j2]), j2++;
|
|
1240
|
-
for (; w2 <= A2; ) {
|
|
1241
|
-
const e2 = u$1(s$12, m$12[A2 + 1]);
|
|
1242
|
-
c$1(e2, p2[w2]), m$12[w2++] = e2;
|
|
1243
|
-
}
|
|
1244
|
-
for (; j2 <= k2; ) {
|
|
1245
|
-
const e2 = a2[j2++];
|
|
1246
|
-
e2 !== null && m(e2);
|
|
1247
|
-
}
|
|
1248
|
-
return this.ct = v2, s(s$12, m$12), b$1;
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1251
|
-
/**
|
|
1252
|
-
* @license
|
|
1253
|
-
* Copyright 2020 Google LLC
|
|
1254
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1255
|
-
*/
|
|
1256
|
-
const o$2 = e$3(class extends i$2 {
|
|
1257
|
-
constructor(t$12) {
|
|
1258
|
-
if (super(t$12), t$12.type !== t.CHILD)
|
|
1259
|
-
throw Error("templateContent can only be used in child bindings");
|
|
1260
|
-
}
|
|
1261
|
-
render(r2) {
|
|
1262
|
-
return this.at === r2 ? b$1 : (this.at = r2, document.importNode(r2.content, true));
|
|
1263
|
-
}
|
|
1264
|
-
});
|
|
1265
|
-
var __defProp$j = Object.defineProperty;
|
|
1266
|
-
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
1267
|
-
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
1268
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
1269
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
1270
|
-
if (decorator = decorators[i2])
|
|
1271
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1272
|
-
if (kind && result)
|
|
1273
|
-
__defProp$j(target, key, result);
|
|
1274
|
-
return result;
|
|
1275
|
-
};
|
|
1276
|
-
let SonicQueue = class extends Subscriber(s$1) {
|
|
1277
|
-
constructor() {
|
|
1278
|
-
super(...arguments);
|
|
1279
|
-
this.template = null;
|
|
1280
|
-
this.lastRequestTime = 0;
|
|
1281
|
-
this.targetRequestDuration = 500;
|
|
1282
|
-
this.limit = 5;
|
|
1283
|
-
this.dataProviderExpression = "";
|
|
1284
|
-
}
|
|
1285
|
-
connectedCallback() {
|
|
1286
|
-
if (!this.dataProvider)
|
|
1287
|
-
this.dataProvider = "sonic-queue-" + SonicQueue.instanceCounter++;
|
|
1288
|
-
super.connectedCallback();
|
|
1289
|
-
this.template = this.getElementsByTagName("template")[0];
|
|
1290
|
-
this.lastRequestTime = new Date().getTime();
|
|
1291
|
-
this.next();
|
|
1292
|
-
}
|
|
1293
|
-
next(e2) {
|
|
1294
|
-
let offset = 0;
|
|
1295
|
-
if (e2) {
|
|
1296
|
-
if (!e2.detail.isFirstLoad || e2.detail.props.length == 0) {
|
|
1297
|
-
return;
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
if (!Array.isArray(this.props))
|
|
1301
|
-
this.props = [];
|
|
1302
|
-
else {
|
|
1303
|
-
const props = Object.values(this.props);
|
|
1304
|
-
const item = props[props.length - 1];
|
|
1305
|
-
offset = parseInt(item.offset.toString()) + parseInt(item.limit.toString());
|
|
1306
|
-
}
|
|
1307
|
-
const newTime = new Date().getTime();
|
|
1308
|
-
const requestDuration = newTime - this.lastRequestTime;
|
|
1309
|
-
this.lastRequestTime = newTime;
|
|
1310
|
-
if (requestDuration > 0)
|
|
1311
|
-
this.limit = Math.round(this.limit / requestDuration * this.targetRequestDuration);
|
|
1312
|
-
if (this.limit < 1)
|
|
1313
|
-
this.limit = 1;
|
|
1314
|
-
if (this.limit > 15)
|
|
1315
|
-
this.limit = 15;
|
|
1316
|
-
const dataProvider = this.dataProviderExpression.replace("$offset", offset + "").replace("$limit", this.limit + "");
|
|
1317
|
-
this.props = [...Object.values(this.props), { id: this.props.length, dataProvider, offset, limit: this.limit }];
|
|
1318
|
-
}
|
|
1319
|
-
render() {
|
|
1320
|
-
if (!Array.isArray(this.props))
|
|
1321
|
-
return p$1``;
|
|
1322
|
-
return p$1`
|
|
1323
|
-
${c(this.props, (item) => item.id, (item) => p$1`
|
|
1324
|
-
<sonic-list @load=${this.next} dataProvider="${item.dataProvider}"> ${o$2(this.template)} </sonic-list>
|
|
1325
|
-
`)}
|
|
1326
|
-
`;
|
|
1327
|
-
}
|
|
1328
|
-
};
|
|
1329
|
-
SonicQueue.instanceCounter = 0;
|
|
1330
|
-
__decorateClass$j([
|
|
1331
|
-
e$4()
|
|
1332
|
-
], SonicQueue.prototype, "targetRequestDuration", 2);
|
|
1333
|
-
__decorateClass$j([
|
|
1334
|
-
e$4()
|
|
1335
|
-
], SonicQueue.prototype, "limit", 2);
|
|
1336
|
-
__decorateClass$j([
|
|
1337
|
-
e$4({ type: String })
|
|
1338
|
-
], SonicQueue.prototype, "dataProviderExpression", 2);
|
|
1339
|
-
SonicQueue = __decorateClass$j([
|
|
1340
|
-
n$2("sonic-queue")
|
|
1341
|
-
], SonicQueue);
|
|
1342
|
-
const inline = r$5`
|
|
1343
|
-
.sonic-loader--inline {
|
|
1344
|
-
display:block;
|
|
1345
|
-
position: relative;
|
|
1346
|
-
width: 80px;
|
|
1347
|
-
height: 80px;
|
|
1348
|
-
margin:auto;
|
|
1349
|
-
z-index:20;
|
|
1350
|
-
}
|
|
1351
|
-
.sonic-loader--inline div {
|
|
1352
|
-
position: absolute;
|
|
1353
|
-
top: 33px;
|
|
1354
|
-
width: 13px;
|
|
1355
|
-
height: 13px;
|
|
1356
|
-
border-radius: 50%;
|
|
1357
|
-
background:var(--sc-loader-bg);
|
|
1358
|
-
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
1359
|
-
}
|
|
1360
|
-
.sonic-loader--inline div:nth-child(1) {
|
|
1361
|
-
left: 8px;
|
|
1362
|
-
animation: lds-ellipsis1 0.6s infinite;
|
|
1363
|
-
}
|
|
1364
|
-
.sonic-loader--inline div:nth-child(2) {
|
|
1365
|
-
left: 8px;
|
|
1366
|
-
animation: lds-ellipsis2 0.6s infinite;
|
|
1367
|
-
}
|
|
1368
|
-
.sonic-loader--inline div:nth-child(3) {
|
|
1369
|
-
left: 32px;
|
|
1370
|
-
animation: lds-ellipsis2 0.6s infinite;
|
|
1371
|
-
}
|
|
1372
|
-
.sonic-loader--inline div:nth-child(4) {
|
|
1373
|
-
left: 56px;
|
|
1374
|
-
animation: lds-ellipsis3 0.6s infinite;
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
@keyframes lds-ellipsis1 {
|
|
1378
|
-
0% {
|
|
1379
|
-
transform: scale(0);
|
|
1380
|
-
}
|
|
1381
|
-
100% {
|
|
1382
|
-
transform: scale(1);
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
@keyframes lds-ellipsis3 {
|
|
1386
|
-
0% {
|
|
1387
|
-
transform: scale(1);
|
|
1388
|
-
}
|
|
1389
|
-
100% {
|
|
1390
|
-
transform: scale(0);
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
@keyframes lds-ellipsis2 {
|
|
1394
|
-
0% {
|
|
1395
|
-
transform: translate(0, 0);
|
|
1396
|
-
}
|
|
1397
|
-
100% {
|
|
1398
|
-
transform: translate(24px, 0);
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
`;
|
|
1403
|
-
const fixed = r$5`
|
|
1404
|
-
|
|
1405
|
-
@keyframes sonic-loader--fixed {
|
|
1406
|
-
0% {
|
|
1407
|
-
transform: scale(0);
|
|
1408
|
-
opacity: 0;
|
|
1409
|
-
}
|
|
1410
|
-
5% {
|
|
1411
|
-
opacity: 1;
|
|
1412
|
-
}
|
|
1413
|
-
70% {
|
|
1414
|
-
opacity:90%;
|
|
1415
|
-
}
|
|
1416
|
-
100% {
|
|
1417
|
-
transform: scale(1);
|
|
1418
|
-
opacity: 0;
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
.sonic-loader--fixed {
|
|
1423
|
-
position: fixed;
|
|
1424
|
-
top:50%;
|
|
1425
|
-
left:50%;
|
|
1426
|
-
transform:transateY(-50%) translateX(-50%);
|
|
1427
|
-
z-index:999;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
.sonic-loader--fixed > div:nth-child(2) {
|
|
1431
|
-
animation-delay: -0.5s;
|
|
1432
|
-
}
|
|
1433
|
-
.sonic-loader--fixed > div:nth-child(3) {
|
|
1434
|
-
animation-delay: -0.2s;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
.sonic-loader--fixed > div:nth-child(4) {
|
|
1438
|
-
display:none !important;
|
|
1439
|
-
}
|
|
1440
|
-
.sonic-loader--fixed > div {
|
|
1441
|
-
background-color: var(--sc-loader-bg);
|
|
1442
|
-
width: 5rem;
|
|
1443
|
-
height: 5rem;
|
|
1444
|
-
border-radius: 100%;
|
|
1445
|
-
margin: 2px;
|
|
1446
|
-
animation-fill-mode: both;
|
|
1447
|
-
position: absolute;
|
|
1448
|
-
top: 0px;
|
|
1449
|
-
opacity: 0;
|
|
1450
|
-
margin: 0;
|
|
1451
|
-
top: -2.5rem;
|
|
1452
|
-
left: -2.5rem;
|
|
1453
|
-
width: 5rem;
|
|
1454
|
-
height: 5rem;
|
|
1455
|
-
animation: sonic-loader--fixed 1s 0s linear infinite;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
`;
|
|
1459
|
-
var __defProp$i = Object.defineProperty;
|
|
1460
|
-
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
1461
|
-
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
1462
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
1463
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
1464
|
-
if (decorator = decorators[i2])
|
|
1465
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1466
|
-
if (kind && result)
|
|
1467
|
-
__defProp$i(target, key, result);
|
|
1468
|
-
return result;
|
|
1469
|
-
};
|
|
1470
|
-
let SonicLoader = class extends Subscriber(s$1) {
|
|
1471
|
-
constructor() {
|
|
1472
|
-
super(...arguments);
|
|
1473
|
-
this.mode = "fixed";
|
|
1474
|
-
}
|
|
1475
|
-
static show(conf) {
|
|
1476
|
-
if (!SonicLoader.loader)
|
|
1477
|
-
SonicLoader.loader = document.createElement("sonic-loader");
|
|
1478
|
-
let loader = SonicLoader.loader;
|
|
1479
|
-
if (!conf)
|
|
1480
|
-
conf = {};
|
|
1481
|
-
let v2 = conf;
|
|
1482
|
-
for (let z2 in v2)
|
|
1483
|
-
loader.setAttribute(z2, v2[z2]);
|
|
1484
|
-
if (!conf.container) {
|
|
1485
|
-
conf.container = document.querySelector("sonic-theme") || document.body;
|
|
1486
|
-
conf.mode = "fixed";
|
|
1487
|
-
}
|
|
1488
|
-
conf.container.appendChild(loader);
|
|
1489
|
-
SonicLoader.callCounter++;
|
|
1490
|
-
}
|
|
1491
|
-
static hide() {
|
|
1492
|
-
SonicLoader.callCounter--;
|
|
1493
|
-
if (SonicLoader.callCounter > 0)
|
|
1494
|
-
return;
|
|
1495
|
-
if (SonicLoader.loader)
|
|
1496
|
-
SonicLoader.loader.remove();
|
|
1497
|
-
}
|
|
1498
|
-
render() {
|
|
1499
|
-
return p$1`<div class="sonic-loader--${this.mode} ">
|
|
1500
|
-
<div></div>
|
|
1501
|
-
<div></div>
|
|
1502
|
-
<div></div>
|
|
1503
|
-
<div></div>
|
|
1504
|
-
</div>`;
|
|
1505
|
-
}
|
|
1506
|
-
};
|
|
1507
|
-
SonicLoader.styles = [
|
|
1508
|
-
inline,
|
|
1509
|
-
fixed,
|
|
1510
|
-
r$5`
|
|
1511
|
-
:host {
|
|
1512
|
-
--sc-loader-bg:var(--sc-primary, currentColor);
|
|
1513
|
-
}`
|
|
1514
|
-
];
|
|
1515
|
-
SonicLoader.callCounter = 0;
|
|
1516
|
-
__decorateClass$i([
|
|
1517
|
-
e$4({ type: String })
|
|
1518
|
-
], SonicLoader.prototype, "mode", 2);
|
|
1519
|
-
SonicLoader = __decorateClass$i([
|
|
1520
|
-
n$2("sonic-loader")
|
|
1521
|
-
], SonicLoader);
|
|
1522
|
-
/**
|
|
1523
|
-
* @license
|
|
1524
|
-
* Copyright 2017 Google LLC
|
|
1525
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1526
|
-
*/
|
|
1527
|
-
class e$1 extends i$2 {
|
|
1528
|
-
constructor(i2) {
|
|
1529
|
-
if (super(i2), this.it = T, i2.type !== t.CHILD)
|
|
1530
|
-
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
1531
|
-
}
|
|
1532
|
-
render(r2) {
|
|
1533
|
-
if (r2 === T || r2 == null)
|
|
1534
|
-
return this.vt = void 0, this.it = r2;
|
|
1535
|
-
if (r2 === b$1)
|
|
1536
|
-
return r2;
|
|
1537
|
-
if (typeof r2 != "string")
|
|
1538
|
-
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
1539
|
-
if (r2 === this.it)
|
|
1540
|
-
return this.vt;
|
|
1541
|
-
this.it = r2;
|
|
1542
|
-
const s2 = [r2];
|
|
1543
|
-
return s2.raw = s2, this.vt = { _$litType$: this.constructor.resultType, strings: s2, values: [] };
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
e$1.directiveName = "unsafeHTML", e$1.resultType = 1;
|
|
1547
|
-
const o$1 = e$3(e$1);
|
|
1548
|
-
/**
|
|
1549
|
-
* @license
|
|
1550
|
-
* Copyright 2017 Google LLC
|
|
1551
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1552
|
-
*/
|
|
1553
|
-
const e = (i2, t2) => {
|
|
1554
|
-
var s2, o2;
|
|
1555
|
-
const n2 = i2._$AN;
|
|
1556
|
-
if (n2 === void 0)
|
|
1557
|
-
return false;
|
|
1558
|
-
for (const i3 of n2)
|
|
1559
|
-
(o2 = (s2 = i3)._$AO) === null || o2 === void 0 || o2.call(s2, t2, false), e(i3, t2);
|
|
1560
|
-
return true;
|
|
1561
|
-
}, o = (i2) => {
|
|
1562
|
-
let t2, s2;
|
|
1563
|
-
do {
|
|
1564
|
-
if ((t2 = i2._$AM) === void 0)
|
|
1565
|
-
break;
|
|
1566
|
-
s2 = t2._$AN, s2.delete(i2), i2 = t2;
|
|
1567
|
-
} while ((s2 == null ? void 0 : s2.size) === 0);
|
|
1568
|
-
}, n$1 = (i2) => {
|
|
1569
|
-
for (let t2; t2 = i2._$AM; i2 = t2) {
|
|
1570
|
-
let s2 = t2._$AN;
|
|
1571
|
-
if (s2 === void 0)
|
|
1572
|
-
t2._$AN = s2 = new Set();
|
|
1573
|
-
else if (s2.has(i2))
|
|
1574
|
-
break;
|
|
1575
|
-
s2.add(i2), l(t2);
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
function r$1(i2) {
|
|
1579
|
-
this._$AN !== void 0 ? (o(this), this._$AM = i2, n$1(this)) : this._$AM = i2;
|
|
1580
|
-
}
|
|
1581
|
-
function h$1(i2, t2 = false, s2 = 0) {
|
|
1582
|
-
const n2 = this._$AH, r2 = this._$AN;
|
|
1583
|
-
if (r2 !== void 0 && r2.size !== 0)
|
|
1584
|
-
if (t2)
|
|
1585
|
-
if (Array.isArray(n2))
|
|
1586
|
-
for (let i3 = s2; i3 < n2.length; i3++)
|
|
1587
|
-
e(n2[i3], false), o(n2[i3]);
|
|
1588
|
-
else
|
|
1589
|
-
n2 != null && (e(n2, false), o(n2));
|
|
1590
|
-
else
|
|
1591
|
-
e(this, i2);
|
|
1592
|
-
}
|
|
1593
|
-
const l = (i2) => {
|
|
1594
|
-
var t$12, e2, o2, n2;
|
|
1595
|
-
i2.type == t.CHILD && ((t$12 = (o2 = i2)._$AP) !== null && t$12 !== void 0 || (o2._$AP = h$1), (e2 = (n2 = i2)._$AQ) !== null && e2 !== void 0 || (n2._$AQ = r$1));
|
|
1596
|
-
};
|
|
1597
|
-
class d extends i$2 {
|
|
1598
|
-
constructor() {
|
|
1599
|
-
super(...arguments), this._$AN = void 0;
|
|
1600
|
-
}
|
|
1601
|
-
_$AT(i2, t2, s2) {
|
|
1602
|
-
super._$AT(i2, t2, s2), n$1(this), this.isConnected = i2._$AU;
|
|
1603
|
-
}
|
|
1604
|
-
_$AO(i2, t2 = true) {
|
|
1605
|
-
var s2, n2;
|
|
1606
|
-
i2 !== this.isConnected && (this.isConnected = i2, i2 ? (s2 = this.reconnected) === null || s2 === void 0 || s2.call(this) : (n2 = this.disconnected) === null || n2 === void 0 || n2.call(this)), t2 && (e(this, i2), o(this));
|
|
1607
|
-
}
|
|
1608
|
-
setValue(t2) {
|
|
1609
|
-
if (r$2(this._$Ct))
|
|
1610
|
-
this._$Ct._$AI(t2, this);
|
|
1611
|
-
else {
|
|
1612
|
-
const i2 = [...this._$Ct._$AH];
|
|
1613
|
-
i2[this._$Ci] = t2, this._$Ct._$AI(i2, this, 0);
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
disconnected() {
|
|
1617
|
-
}
|
|
1618
|
-
reconnected() {
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
const i = new WeakMap();
|
|
1622
|
-
let h = 0;
|
|
1623
|
-
const r = new Map(), n = new WeakSet(), a = () => new Promise((t2) => requestAnimationFrame(t2)), f = [{ opacity: 0 }], p = [{ opacity: 0 }, { opacity: 1 }], g = (t2, i2) => {
|
|
1624
|
-
const s2 = t2 - i2;
|
|
1625
|
-
return s2 === 0 ? void 0 : s2;
|
|
1626
|
-
}, w = (t2, i2) => {
|
|
1627
|
-
const s2 = t2 / i2;
|
|
1628
|
-
return s2 === 1 ? void 0 : s2;
|
|
1629
|
-
}, A = { left: (t2, i2) => {
|
|
1630
|
-
const s2 = g(t2, i2);
|
|
1631
|
-
return { value: s2, transform: s2 && `translateX(${s2}px)` };
|
|
1632
|
-
}, top: (t2, i2) => {
|
|
1633
|
-
const s2 = g(t2, i2);
|
|
1634
|
-
return { value: s2, transform: s2 && `translateY(${s2}px)` };
|
|
1635
|
-
}, width: (t2, i2) => {
|
|
1636
|
-
const s2 = w(t2, i2);
|
|
1637
|
-
return { value: s2, transform: s2 && `scaleX(${s2})` };
|
|
1638
|
-
}, height: (t2, i2) => {
|
|
1639
|
-
const s2 = w(t2, i2);
|
|
1640
|
-
return { value: s2, transform: s2 && `scaleY(${s2})` };
|
|
1641
|
-
} }, b = { duration: 333, easing: "ease-in-out" }, j = ["left", "top", "width", "height", "opacity", "color", "background"], x = new WeakMap();
|
|
1642
|
-
class S extends d {
|
|
1643
|
-
constructor(t$12) {
|
|
1644
|
-
if (super(t$12), this.t = null, this.i = null, this.o = true, this.shouldLog = false, t$12.type === t.CHILD)
|
|
1645
|
-
throw Error("The `animate` directive must be used in attribute position.");
|
|
1646
|
-
this.createFinished();
|
|
1647
|
-
}
|
|
1648
|
-
createFinished() {
|
|
1649
|
-
var t2;
|
|
1650
|
-
(t2 = this.resolveFinished) === null || t2 === void 0 || t2.call(this), this.finished = new Promise((t3) => {
|
|
1651
|
-
this.h = t3;
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
async resolveFinished() {
|
|
1655
|
-
var t2;
|
|
1656
|
-
(t2 = this.h) === null || t2 === void 0 || t2.call(this), this.h = void 0;
|
|
1657
|
-
}
|
|
1658
|
-
render(i2) {
|
|
1659
|
-
return T;
|
|
1660
|
-
}
|
|
1661
|
-
getController() {
|
|
1662
|
-
return i.get(this.l);
|
|
1663
|
-
}
|
|
1664
|
-
isDisabled() {
|
|
1665
|
-
var t2;
|
|
1666
|
-
return this.options.disabled || ((t2 = this.getController()) === null || t2 === void 0 ? void 0 : t2.disabled);
|
|
1667
|
-
}
|
|
1668
|
-
update(t2, [i2]) {
|
|
1669
|
-
var s2;
|
|
1670
|
-
const e2 = this.l === void 0;
|
|
1671
|
-
return e2 && (this.l = (s2 = t2.options) === null || s2 === void 0 ? void 0 : s2.host, this.l.addController(this), this.element = t2.element, x.set(this.element, this)), this.optionsOrCallback = i2, (e2 || typeof i2 != "function") && this.u(i2), this.render(i2);
|
|
1672
|
-
}
|
|
1673
|
-
u(t2) {
|
|
1674
|
-
var i2, s2;
|
|
1675
|
-
t2 = t2 != null ? t2 : {};
|
|
1676
|
-
const e2 = this.getController();
|
|
1677
|
-
e2 !== void 0 && ((t2 = __spreadValues(__spreadValues({}, e2.defaultOptions), t2)).keyframeOptions = __spreadValues(__spreadValues({}, e2.defaultOptions.keyframeOptions), t2.keyframeOptions)), (i2 = (s2 = t2).properties) !== null && i2 !== void 0 || (s2.properties = j), this.options = t2;
|
|
1678
|
-
}
|
|
1679
|
-
v() {
|
|
1680
|
-
const t2 = {}, i2 = this.element.getBoundingClientRect(), s2 = getComputedStyle(this.element);
|
|
1681
|
-
return this.options.properties.forEach((e2) => {
|
|
1682
|
-
var o2;
|
|
1683
|
-
const h2 = (o2 = i2[e2]) !== null && o2 !== void 0 ? o2 : A[e2] ? void 0 : s2[e2], r2 = Number(h2);
|
|
1684
|
-
t2[e2] = isNaN(r2) ? h2 + "" : r2;
|
|
1685
|
-
}), t2;
|
|
1686
|
-
}
|
|
1687
|
-
p() {
|
|
1688
|
-
let t2, i2 = true;
|
|
1689
|
-
return this.options.guard && (t2 = this.options.guard(), i2 = ((t3, i3) => {
|
|
1690
|
-
if (Array.isArray(t3)) {
|
|
1691
|
-
if (Array.isArray(i3) && i3.length === t3.length && t3.every((t4, s2) => t4 === i3[s2]))
|
|
1692
|
-
return false;
|
|
1693
|
-
} else if (i3 === t3)
|
|
1694
|
-
return false;
|
|
1695
|
-
return true;
|
|
1696
|
-
})(t2, this.m)), this.o = this.l.hasUpdated && !this.isDisabled() && !this.isAnimating() && i2 && this.element.isConnected, this.o && (this.m = Array.isArray(t2) ? Array.from(t2) : t2), this.o;
|
|
1697
|
-
}
|
|
1698
|
-
hostUpdate() {
|
|
1699
|
-
var t2;
|
|
1700
|
-
typeof this.optionsOrCallback == "function" && this.u(this.optionsOrCallback()), this.p() && (this.g = this.v(), this.t = (t2 = this.t) !== null && t2 !== void 0 ? t2 : this.element.parentNode, this.i = this.element.nextSibling);
|
|
1701
|
-
}
|
|
1702
|
-
async hostUpdated() {
|
|
1703
|
-
if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
|
|
1704
|
-
return;
|
|
1705
|
-
let t2;
|
|
1706
|
-
this.prepare(), await a;
|
|
1707
|
-
const i2 = this.A(), s2 = this._(this.options.keyframeOptions, i2), e2 = this.v();
|
|
1708
|
-
if (this.g !== void 0) {
|
|
1709
|
-
const { from: s3, to: o2 } = this.j(this.g, e2, i2);
|
|
1710
|
-
this.log("measured", [this.g, e2, s3, o2]), t2 = this.calculateKeyframes(s3, o2);
|
|
1711
|
-
} else {
|
|
1712
|
-
const s3 = r.get(this.options.inId);
|
|
1713
|
-
if (s3) {
|
|
1714
|
-
r.delete(this.options.inId);
|
|
1715
|
-
const { from: o2, to: n2 } = this.j(s3, e2, i2);
|
|
1716
|
-
t2 = this.calculateKeyframes(o2, n2), t2 = this.options.in ? [__spreadValues(__spreadValues({}, this.options.in[0]), t2[0]), ...this.options.in.slice(1), t2[1]] : t2, h++, t2.forEach((t3) => t3.zIndex = h);
|
|
1717
|
-
} else
|
|
1718
|
-
this.options.in && (t2 = [...this.options.in, {}]);
|
|
1719
|
-
}
|
|
1720
|
-
this.animate(t2, s2);
|
|
1721
|
-
}
|
|
1722
|
-
resetStyles() {
|
|
1723
|
-
var t2;
|
|
1724
|
-
this.S !== void 0 && (this.element.setAttribute("style", (t2 = this.S) !== null && t2 !== void 0 ? t2 : ""), this.S = void 0);
|
|
1725
|
-
}
|
|
1726
|
-
commitStyles() {
|
|
1727
|
-
var t2, i2;
|
|
1728
|
-
this.S = this.element.getAttribute("style"), (t2 = this.webAnimation) === null || t2 === void 0 || t2.commitStyles(), (i2 = this.webAnimation) === null || i2 === void 0 || i2.cancel();
|
|
1729
|
-
}
|
|
1730
|
-
reconnected() {
|
|
1731
|
-
}
|
|
1732
|
-
async disconnected() {
|
|
1733
|
-
var t2;
|
|
1734
|
-
if (!this.o)
|
|
1735
|
-
return;
|
|
1736
|
-
if (this.options.id !== void 0 && r.set(this.options.id, this.g), this.options.out === void 0)
|
|
1737
|
-
return;
|
|
1738
|
-
if (this.prepare(), await a(), (t2 = this.t) === null || t2 === void 0 ? void 0 : t2.isConnected) {
|
|
1739
|
-
const t3 = this.i && this.i.parentNode === this.t ? this.i : null;
|
|
1740
|
-
if (this.t.insertBefore(this.element, t3), this.options.stabilizeOut) {
|
|
1741
|
-
const t4 = this.v();
|
|
1742
|
-
this.log("stabilizing out");
|
|
1743
|
-
const i3 = this.g.left - t4.left, s2 = this.g.top - t4.top;
|
|
1744
|
-
!(getComputedStyle(this.element).position === "static") || i3 === 0 && s2 === 0 || (this.element.style.position = "relative"), i3 !== 0 && (this.element.style.left = i3 + "px"), s2 !== 0 && (this.element.style.top = s2 + "px");
|
|
1745
|
-
}
|
|
1746
|
-
}
|
|
1747
|
-
const i2 = this._(this.options.keyframeOptions);
|
|
1748
|
-
await this.animate(this.options.out, i2), this.element.remove();
|
|
1749
|
-
}
|
|
1750
|
-
prepare() {
|
|
1751
|
-
this.createFinished();
|
|
1752
|
-
}
|
|
1753
|
-
start() {
|
|
1754
|
-
var t2, i2;
|
|
1755
|
-
(i2 = (t2 = this.options).onStart) === null || i2 === void 0 || i2.call(t2, this);
|
|
1756
|
-
}
|
|
1757
|
-
didFinish(t2) {
|
|
1758
|
-
var i2, s2;
|
|
1759
|
-
t2 && ((s2 = (i2 = this.options).onComplete) === null || s2 === void 0 || s2.call(i2, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
|
|
1760
|
-
}
|
|
1761
|
-
A() {
|
|
1762
|
-
const t2 = [];
|
|
1763
|
-
for (let i2 = this.element.parentNode; i2; i2 = i2 == null ? void 0 : i2.parentNode) {
|
|
1764
|
-
const s2 = x.get(i2);
|
|
1765
|
-
s2 && !s2.isDisabled() && s2 && t2.push(s2);
|
|
1766
|
-
}
|
|
1767
|
-
return t2;
|
|
1768
|
-
}
|
|
1769
|
-
get isHostRendered() {
|
|
1770
|
-
const t2 = n.has(this.l);
|
|
1771
|
-
return t2 || this.l.updateComplete.then(() => {
|
|
1772
|
-
n.add(this.l);
|
|
1773
|
-
}), t2;
|
|
1774
|
-
}
|
|
1775
|
-
_(t2, i2 = this.A()) {
|
|
1776
|
-
const s2 = __spreadValues({}, b);
|
|
1777
|
-
return i2.forEach((t3) => Object.assign(s2, t3.options.keyframeOptions)), Object.assign(s2, t2), s2;
|
|
1778
|
-
}
|
|
1779
|
-
j(t2, i2, s2) {
|
|
1780
|
-
t2 = __spreadValues({}, t2), i2 = __spreadValues({}, i2);
|
|
1781
|
-
const e2 = s2.map((t3) => t3.animatingProperties).filter((t3) => t3 !== void 0);
|
|
1782
|
-
let o2 = 1, h2 = 1;
|
|
1783
|
-
return e2 !== void 0 && (e2.forEach((t3) => {
|
|
1784
|
-
t3.width && (o2 /= t3.width), t3.height && (h2 /= t3.height);
|
|
1785
|
-
}), t2.left !== void 0 && i2.left !== void 0 && (t2.left = o2 * t2.left, i2.left = o2 * i2.left), t2.top !== void 0 && i2.top !== void 0 && (t2.top = h2 * t2.top, i2.top = h2 * i2.top)), { from: t2, to: i2 };
|
|
1786
|
-
}
|
|
1787
|
-
calculateKeyframes(t2, i2, s2 = false) {
|
|
1788
|
-
var e2;
|
|
1789
|
-
const o2 = {}, h2 = {};
|
|
1790
|
-
let r2 = false;
|
|
1791
|
-
const n2 = {};
|
|
1792
|
-
for (const s3 in i2) {
|
|
1793
|
-
const a2 = t2[s3], l2 = i2[s3];
|
|
1794
|
-
if (s3 in A) {
|
|
1795
|
-
const t3 = A[s3];
|
|
1796
|
-
if (a2 === void 0 || l2 === void 0)
|
|
1797
|
-
continue;
|
|
1798
|
-
const i3 = t3(a2, l2);
|
|
1799
|
-
i3.transform !== void 0 && (n2[s3] = i3.value, r2 = true, o2.transform = `${(e2 = o2.transform) !== null && e2 !== void 0 ? e2 : ""} ${i3.transform}`);
|
|
1800
|
-
} else
|
|
1801
|
-
a2 !== l2 && a2 !== void 0 && l2 !== void 0 && (r2 = true, o2[s3] = a2, h2[s3] = l2);
|
|
1802
|
-
}
|
|
1803
|
-
return o2.transformOrigin = h2.transformOrigin = s2 ? "center center" : "top left", this.animatingProperties = n2, r2 ? [o2, h2] : void 0;
|
|
1804
|
-
}
|
|
1805
|
-
async animate(t2, i2 = this.options.keyframeOptions) {
|
|
1806
|
-
this.start(), this.frames = t2;
|
|
1807
|
-
let s2 = false;
|
|
1808
|
-
if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t2 = this.options.onFrames(this), this.log("modified frames", t2)), t2 !== void 0)) {
|
|
1809
|
-
this.log("animate", [t2, i2]), s2 = true, this.webAnimation = this.element.animate(t2, i2);
|
|
1810
|
-
const e2 = this.getController();
|
|
1811
|
-
e2 == null || e2.add(this);
|
|
1812
|
-
try {
|
|
1813
|
-
await this.webAnimation.finished;
|
|
1814
|
-
} catch (t3) {
|
|
1815
|
-
}
|
|
1816
|
-
e2 == null || e2.remove(this);
|
|
1817
|
-
}
|
|
1818
|
-
return this.didFinish(s2), s2;
|
|
1819
|
-
}
|
|
1820
|
-
isAnimating() {
|
|
1821
|
-
var t2, i2;
|
|
1822
|
-
return ((t2 = this.webAnimation) === null || t2 === void 0 ? void 0 : t2.playState) === "running" || ((i2 = this.webAnimation) === null || i2 === void 0 ? void 0 : i2.pending);
|
|
1823
|
-
}
|
|
1824
|
-
log(t2, i2) {
|
|
1825
|
-
this.shouldLog && !this.isDisabled() && console.log(t2, this.options.id, i2);
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
const $ = e$3(S);
|
|
1829
|
-
var __defProp$h = Object.defineProperty;
|
|
1830
|
-
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
1831
|
-
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
1832
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
1833
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
1834
|
-
if (decorator = decorators[i2])
|
|
1835
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1836
|
-
if (kind && result)
|
|
1837
|
-
__defProp$h(target, key, result);
|
|
1838
|
-
return result;
|
|
1839
|
-
};
|
|
1840
|
-
const removeIcon = `<svg aria-hidden="true" focusable="false" data-icon="xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
|
|
1841
|
-
<path fill="currentColor" d="M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z">
|
|
1842
|
-
</path>
|
|
1843
|
-
</svg>`;
|
|
1844
|
-
const successIcon = `
|
|
1845
|
-
<svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="circle-check" class="svg-inline--fa fa-circle-check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
1846
|
-
<path fill="currentColor" d="M340.7 180.7L224 297.4L171.3 244.7c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62l64 64C215.8 334.4 219.9 336 224 336s8.188-1.562 11.31-4.688l128-128c6.25-6.25 6.25-16.38 0-22.62S346.9 174.4 340.7 180.7zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480z">
|
|
1847
|
-
</path>
|
|
1848
|
-
</svg>`;
|
|
1849
|
-
const infoIcon = `
|
|
1850
|
-
<svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="circle-info" class="svg-inline--fa fa-circle-info" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
1851
|
-
<path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480zM256 184c13.25 0 24-10.74 24-24c0-13.25-10.75-24-24-24S232 146.7 232 160C232 173.3 242.7 184 256 184zM304 352h-32V240C272 231.2 264.8 224 256 224H224C215.2 224 208 231.2 208 240S215.2 256 224 256h16v96h-32C199.2 352 192 359.2 192 368C192 376.8 199.2 384 208 384h96c8.836 0 16-7.164 16-16C320 359.2 312.8 352 304 352z">
|
|
1852
|
-
</path>
|
|
1853
|
-
</svg>
|
|
1854
|
-
`;
|
|
1855
|
-
const errorIcon = `
|
|
1856
|
-
<svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="circle-xmark" class="svg-inline--fa fa-circle-xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
1857
|
-
<path fill="currentColor" d="M331.3 180.7c-6.25-6.25-16.38-6.25-22.62 0L256 233.4L203.3 180.7c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62L233.4 256L180.7 308.7c-6.25 6.25-6.25 16.38 0 22.62c6.246 6.246 16.37 6.254 22.62 0L256 278.6l52.69 52.69c6.246 6.246 16.37 6.254 22.62 0c6.25-6.25 6.25-16.38 0-22.62L278.6 256l52.69-52.69C337.6 197.1 337.6 186.9 331.3 180.7zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256S512 397.4 512 256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480z">
|
|
1858
|
-
</path>
|
|
1859
|
-
</svg>
|
|
1860
|
-
`;
|
|
1861
|
-
const icon = {
|
|
1862
|
-
"success": successIcon,
|
|
1863
|
-
"error": errorIcon,
|
|
1864
|
-
"info": infoIcon
|
|
1865
|
-
};
|
|
1866
|
-
let SonicToast = class extends Subscriber(s$1) {
|
|
1867
|
-
constructor() {
|
|
1868
|
-
super(...arguments);
|
|
1869
|
-
this.toasts = [];
|
|
1870
|
-
this.className = "";
|
|
1871
|
-
this.styled = false;
|
|
1872
|
-
}
|
|
1873
|
-
render() {
|
|
1874
|
-
return p$1`<div class="sonic-toast-area">
|
|
1875
|
-
|
|
1876
|
-
${c(this.toasts, (item) => item.id, (item) => p$1`
|
|
1877
|
-
<div
|
|
1878
|
-
class="${this.className} sonic-toast ${item.status}"
|
|
1879
|
-
${$({
|
|
1880
|
-
keyframeOptions: {
|
|
1881
|
-
duration: 250,
|
|
1882
|
-
easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`
|
|
1883
|
-
},
|
|
1884
|
-
in: [{ transform: "translateY(0) scale(1.25)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }],
|
|
1885
|
-
out: [
|
|
1886
|
-
{
|
|
1887
|
-
transform: "scale(.90) ",
|
|
1888
|
-
opacity: 0,
|
|
1889
|
-
duration: 3e3,
|
|
1890
|
-
easing: `ease-in-out`
|
|
1891
|
-
}
|
|
1892
|
-
],
|
|
1893
|
-
stabilizeOut: true
|
|
1894
|
-
})}
|
|
1895
|
-
>
|
|
1896
|
-
${item.status && p$1`<div class="sonic-toast-icon">${o$1(icon[item.status])}</div>`}
|
|
1897
|
-
|
|
1898
|
-
<div class="sonic-toast-text">
|
|
1899
|
-
${item.title ? p$1`<div class="sonic-toast-title">${item.title}</div>` : ""}
|
|
1900
|
-
${item.text ? o$1(item.text) : ""}
|
|
1901
|
-
<slot></slot>
|
|
1902
|
-
</div>
|
|
1903
|
-
|
|
1904
|
-
<button class="sonic-toast-close" @click=${() => this.removeItem(item)}>
|
|
1905
|
-
${o$1(removeIcon)}
|
|
1906
|
-
</button>
|
|
1907
|
-
${!item.preserve ? this.autoRemoveItem(item) : ""}
|
|
1908
|
-
|
|
1909
|
-
</div>
|
|
1910
|
-
`)}
|
|
1911
|
-
</div>`;
|
|
1912
|
-
}
|
|
1913
|
-
static add(conf) {
|
|
1914
|
-
if (!document.querySelector("sonic-toast")) {
|
|
1915
|
-
let toastComponent2 = document.createElement("sonic-toast");
|
|
1916
|
-
toastComponent2.setAttribute("styled", new Boolean(conf.styled).toString() || "true");
|
|
1917
|
-
let container = document.querySelector("sonic-theme") || document.body;
|
|
1918
|
-
container.appendChild(toastComponent2);
|
|
1919
|
-
}
|
|
1920
|
-
let toastComponent = document.querySelector("sonic-toast");
|
|
1921
|
-
const nextId = new Date().valueOf();
|
|
1922
|
-
const currentToast = {
|
|
1923
|
-
id: nextId,
|
|
1924
|
-
text: conf.text,
|
|
1925
|
-
title: conf.title,
|
|
1926
|
-
status: conf.status,
|
|
1927
|
-
preserve: conf.preserve
|
|
1928
|
-
};
|
|
1929
|
-
toastComponent.toasts = [
|
|
1930
|
-
...toastComponent.toasts,
|
|
1931
|
-
currentToast
|
|
1932
|
-
];
|
|
1933
|
-
return currentToast;
|
|
1934
|
-
}
|
|
1935
|
-
removeItem(item) {
|
|
1936
|
-
this.toasts = this.toasts.filter((i2) => i2 != item);
|
|
1937
|
-
}
|
|
1938
|
-
autoRemoveItem(item) {
|
|
1939
|
-
setTimeout(() => {
|
|
1940
|
-
this.removeItem(item);
|
|
1941
|
-
}, 3200);
|
|
1942
|
-
}
|
|
1943
|
-
};
|
|
1944
|
-
SonicToast.styles = [
|
|
1945
|
-
r$5`
|
|
1946
|
-
* {
|
|
1947
|
-
box-sizing:border-box;
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
.sonic-toast-area{
|
|
1951
|
-
position: fixed;
|
|
1952
|
-
top: 1.25rem;
|
|
1953
|
-
right: 1.25rem;
|
|
1954
|
-
pointer-events: none;
|
|
1955
|
-
width: calc(100% - 2.5rem);
|
|
1956
|
-
max-width: 40ch;
|
|
1957
|
-
z-index: 999;
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
.sonic-toast {
|
|
1961
|
-
--sc-toast-status-color:transparent;
|
|
1962
|
-
position:relative;
|
|
1963
|
-
pointer-events: auto;
|
|
1964
|
-
background: var(--sc-base, #fff);
|
|
1965
|
-
color: var(--sc-base-content);
|
|
1966
|
-
box-shadow: var(--sc-shadow);
|
|
1967
|
-
border-radius: var(--sc-rounded);
|
|
1968
|
-
padding: 1em 2rem 1em 1em;
|
|
1969
|
-
font-size: 0.85em;
|
|
1970
|
-
line-height: 1.25;
|
|
1971
|
-
display: flex;
|
|
1972
|
-
gap: 0.5rem;
|
|
1973
|
-
max-height:10rem;
|
|
1974
|
-
overflow: auto;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
.sonic-toast + .sonic-toast{
|
|
1978
|
-
margin-top:1rem;
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
.sonic-toast-icon {
|
|
1982
|
-
flex-shrink: 0;
|
|
1983
|
-
width: 2em;
|
|
1984
|
-
}
|
|
1985
|
-
.sonic-toast-text {
|
|
1986
|
-
align-self:center;
|
|
1987
|
-
margin-block: auto;
|
|
1988
|
-
}
|
|
1989
|
-
/*BUTTON CLOSE*/
|
|
1990
|
-
.sonic-toast-close {
|
|
1991
|
-
all: unset;
|
|
1992
|
-
position: absolute;
|
|
1993
|
-
right: 0.5em;
|
|
1994
|
-
top: 0.5em;
|
|
1995
|
-
width: 1.5rem;
|
|
1996
|
-
height: 1.5rem;
|
|
1997
|
-
cursor: pointer;
|
|
1998
|
-
display: inline-flex;
|
|
1999
|
-
align-items: center;
|
|
2000
|
-
justify-content: center;
|
|
2001
|
-
border-radius: 50%;
|
|
2002
|
-
text-align: center;
|
|
2003
|
-
opacity: 0.5;
|
|
2004
|
-
background: rgba(0, 0, 0, 0);
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
.sonic-toast-close:focus,
|
|
2008
|
-
.sonic-toast-close:hover {
|
|
2009
|
-
opacity: 1;
|
|
2010
|
-
background: rgba(0, 0, 0, 0.075);
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
.sonic-toast-close svg {
|
|
2014
|
-
width: 1rem;
|
|
2015
|
-
height: 1rem;
|
|
2016
|
-
object-fit: contain;
|
|
2017
|
-
object-position: center center;
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
/*Title*/
|
|
2021
|
-
.sonic-toast-title {
|
|
2022
|
-
font-weight: bold;
|
|
2023
|
-
margin-bottom: 0.25em;
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
/*STATUS*/
|
|
2027
|
-
.success {
|
|
2028
|
-
--sc-toast-status-color: var(--sc-success);
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
.error {
|
|
2032
|
-
--sc-toast-status-color: var(--sc-danger);
|
|
2033
|
-
}
|
|
2034
|
-
|
|
2035
|
-
.warning {
|
|
2036
|
-
--sc-toast-status-color: var(--sc-warning);
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
.info {
|
|
2040
|
-
--sc-toast-status-color: var(--sc-info);
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
.success,
|
|
2044
|
-
.error,
|
|
2045
|
-
.info,
|
|
2046
|
-
.warning {
|
|
2047
|
-
border-top:2px solid var(--sc-toast-status-color, curentColor);
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
.info .sonic-toast-icon ,
|
|
2051
|
-
.error .sonic-toast-icon ,
|
|
2052
|
-
.success .sonic-toast-icon ,
|
|
2053
|
-
.warning .sonic-toast-icon {
|
|
2054
|
-
color: var(--sc-toast-status-color, curentColor);
|
|
2055
|
-
}
|
|
2056
|
-
`
|
|
2057
|
-
];
|
|
2058
|
-
__decorateClass$h([
|
|
2059
|
-
t$1()
|
|
2060
|
-
], SonicToast.prototype, "toasts", 2);
|
|
2061
|
-
__decorateClass$h([
|
|
2062
|
-
e$4({ type: String })
|
|
2063
|
-
], SonicToast.prototype, "className", 2);
|
|
2064
|
-
__decorateClass$h([
|
|
2065
|
-
e$4({ type: Boolean })
|
|
2066
|
-
], SonicToast.prototype, "styled", 2);
|
|
2067
|
-
SonicToast = __decorateClass$h([
|
|
2068
|
-
n$2("sonic-toast")
|
|
2069
|
-
], SonicToast);
|
|
2070
|
-
if (typeof window !== "undefined") {
|
|
2071
|
-
let win = window;
|
|
2072
|
-
win.SonicToast = SonicToast;
|
|
2073
|
-
}
|
|
2074
|
-
const _API = class {
|
|
2075
|
-
constructor(config) {
|
|
2076
|
-
this.nologin = false;
|
|
2077
|
-
this.serviceURL = config.serviceURL;
|
|
2078
|
-
if (!this.serviceURL)
|
|
2079
|
-
this.serviceURL = document.location.origin;
|
|
2080
|
-
this.userName = config.userName;
|
|
2081
|
-
this.password = config.password;
|
|
2082
|
-
this.token = config.token;
|
|
2083
|
-
this.tokenProvider = config.tokenProvider;
|
|
2084
|
-
}
|
|
2085
|
-
async auth() {
|
|
2086
|
-
if (this.token)
|
|
2087
|
-
return;
|
|
2088
|
-
if (_API.tokens.has(this.serviceURL)) {
|
|
2089
|
-
this.token = _API.tokens.get(this.serviceURL);
|
|
2090
|
-
return;
|
|
2091
|
-
}
|
|
2092
|
-
if (!this.userName || !this.password || !this.tokenProvider)
|
|
2093
|
-
return;
|
|
2094
|
-
let headers = { Authorization: "Basic " + window.btoa(unescape(encodeURIComponent(this.userName + ":" + this.password))) };
|
|
2095
|
-
let result = await fetch(this.computeURL(this.tokenProvider), { headers });
|
|
2096
|
-
let json = await result.json();
|
|
2097
|
-
this.token = json.token;
|
|
2098
|
-
_API.tokens.set(this.serviceURL, this.token);
|
|
2099
|
-
}
|
|
2100
|
-
async get(path) {
|
|
2101
|
-
let headers = await this.createHeaders();
|
|
2102
|
-
let result = await fetch(this.computeURL(path), { headers });
|
|
2103
|
-
try {
|
|
2104
|
-
let json = await result.json();
|
|
2105
|
-
return json;
|
|
2106
|
-
} catch (e2) {
|
|
2107
|
-
return null;
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
async createHeaders() {
|
|
2111
|
-
await this.auth();
|
|
2112
|
-
let headers = {};
|
|
2113
|
-
if (this.token)
|
|
2114
|
-
headers.Authorization = "Bearer " + this.token;
|
|
2115
|
-
headers.credentials = "include";
|
|
2116
|
-
return headers;
|
|
2117
|
-
}
|
|
2118
|
-
computeURL(path) {
|
|
2119
|
-
return this.serviceURL + "/" + path;
|
|
2120
|
-
}
|
|
2121
|
-
async put(path, data) {
|
|
2122
|
-
await this.auth();
|
|
2123
|
-
let headers = await this.createHeaders();
|
|
2124
|
-
headers["Accept"] = "application/json";
|
|
2125
|
-
headers["Content-Type"] = "application/json";
|
|
2126
|
-
let result = await fetch(this.computeURL(path), {
|
|
2127
|
-
headers,
|
|
2128
|
-
method: "PUT",
|
|
2129
|
-
body: JSON.stringify(data)
|
|
2130
|
-
});
|
|
2131
|
-
try {
|
|
2132
|
-
let json = await result.json();
|
|
2133
|
-
return json;
|
|
2134
|
-
} catch (e2) {
|
|
2135
|
-
return null;
|
|
2136
|
-
}
|
|
2137
|
-
}
|
|
2138
|
-
};
|
|
2139
|
-
let API = _API;
|
|
2140
|
-
API.tokens = new Map();
|
|
2141
|
-
const Fetcher = (superClass) => {
|
|
2142
|
-
class FetcherElement extends superClass {
|
|
2143
|
-
constructor(...args) {
|
|
2144
|
-
super();
|
|
2145
|
-
this.api = null;
|
|
2146
|
-
this.tokenProvider = "";
|
|
2147
|
-
this.serviceURL = "";
|
|
2148
|
-
this.userName = "";
|
|
2149
|
-
this.key = "";
|
|
2150
|
-
this.password = "";
|
|
2151
|
-
this.isFirstLoad = true;
|
|
2152
|
-
this.dataProvider = "";
|
|
2153
|
-
}
|
|
2154
|
-
async _fetchEventData() {
|
|
2155
|
-
if (!this.api)
|
|
2156
|
-
return;
|
|
2157
|
-
if (!this.dataProvider)
|
|
2158
|
-
return;
|
|
2159
|
-
if (this.dataProvider.indexOf("__subscriber__") != -1)
|
|
2160
|
-
return;
|
|
2161
|
-
let data;
|
|
2162
|
-
SonicLoader.show();
|
|
2163
|
-
data = await this.api.get(this.dataProvider);
|
|
2164
|
-
if (!data)
|
|
2165
|
-
SonicToast.add({ text: "Network Error", status: "error", styled: true });
|
|
2166
|
-
SonicLoader.hide();
|
|
2167
|
-
if (this.key) {
|
|
2168
|
-
data = data[this.key];
|
|
2169
|
-
}
|
|
2170
|
-
this.props = data;
|
|
2171
|
-
this.dispatchEvent(new CustomEvent("load", { detail: this }));
|
|
2172
|
-
this.isFirstLoad = false;
|
|
2173
|
-
}
|
|
2174
|
-
connectedCallback() {
|
|
2175
|
-
super.connectedCallback();
|
|
2176
|
-
this.tokenProvider = this.getAncestorAttributeValue("tokenProvider");
|
|
2177
|
-
this.serviceURL = this.getAncestorAttributeValue("serviceURL");
|
|
2178
|
-
this.userName = this.getAncestorAttributeValue("user");
|
|
2179
|
-
this.password = this.getAncestorAttributeValue("password");
|
|
2180
|
-
this.key = this.getAncestorAttributeValue("key");
|
|
2181
|
-
if (!this.serviceURL)
|
|
2182
|
-
this.serviceURL = document.location.origin;
|
|
2183
|
-
this.api = new API({
|
|
2184
|
-
serviceURL: this.serviceURL,
|
|
2185
|
-
userName: this.userName,
|
|
2186
|
-
password: this.password,
|
|
2187
|
-
tokenProvider: this.tokenProvider,
|
|
2188
|
-
dataProvider: this.dataProvider
|
|
2189
|
-
});
|
|
2190
|
-
if (this.props) {
|
|
2191
|
-
this.publisher.set(this.props);
|
|
2192
|
-
}
|
|
2193
|
-
this._fetchEventData();
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
return FetcherElement;
|
|
2197
|
-
};
|
|
2198
|
-
var __defProp$g = Object.defineProperty;
|
|
2199
|
-
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
2200
|
-
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
2201
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
2202
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2203
|
-
if (decorator = decorators[i2])
|
|
2204
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2205
|
-
if (kind && result)
|
|
2206
|
-
__defProp$g(target, key, result);
|
|
2207
|
-
return result;
|
|
2208
|
-
};
|
|
2209
|
-
let SonicFetch = class extends Fetcher(Subscriber(s$1)) {
|
|
2210
|
-
render() {
|
|
2211
|
-
return p$1`<slot></slot>`;
|
|
2212
|
-
}
|
|
2213
|
-
};
|
|
2214
|
-
SonicFetch = __decorateClass$g([
|
|
2215
|
-
n$2("sonic-fetch")
|
|
2216
|
-
], SonicFetch);
|
|
2217
|
-
const cssProse = r$5`
|
|
2218
|
-
ul,
|
|
2219
|
-
ol,
|
|
2220
|
-
p {
|
|
2221
|
-
margin:0 0 1em;
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
li {
|
|
2225
|
-
margin-bottom:.5em;
|
|
2226
|
-
}
|
|
2227
|
-
`;
|
|
2228
|
-
r$5`
|
|
2229
|
-
:host {
|
|
2230
|
-
line-height:1.25;
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
ul,
|
|
2234
|
-
ol,
|
|
2235
|
-
p {
|
|
2236
|
-
margin:0 0 .5em;
|
|
2237
|
-
}
|
|
2238
|
-
|
|
2239
|
-
li {
|
|
2240
|
-
margin-bottom:.5em;
|
|
2241
|
-
}
|
|
2242
|
-
`;
|
|
2243
|
-
var __defProp$f = Object.defineProperty;
|
|
2244
|
-
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
2245
|
-
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
2246
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
2247
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2248
|
-
if (decorator = decorators[i2])
|
|
2249
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2250
|
-
if (kind && result)
|
|
2251
|
-
__defProp$f(target, key, result);
|
|
2252
|
-
return result;
|
|
2253
|
-
};
|
|
2254
|
-
let SonicTextFormatted = class extends Subscriber(s$1) {
|
|
2255
|
-
constructor() {
|
|
2256
|
-
super(...arguments);
|
|
2257
|
-
this.html = "";
|
|
2258
|
-
this.leading = "normal";
|
|
2259
|
-
this.className = "";
|
|
2260
|
-
}
|
|
2261
|
-
render() {
|
|
2262
|
-
return p$1`
|
|
2263
|
-
<div class="${this.className} text-formatted">
|
|
2264
|
-
${o$1(this.html)}
|
|
2265
|
-
</div>
|
|
2266
|
-
`;
|
|
2267
|
-
}
|
|
2268
|
-
};
|
|
2269
|
-
SonicTextFormatted.styles = [
|
|
2270
|
-
cssProse
|
|
2271
|
-
];
|
|
2272
|
-
__decorateClass$f([
|
|
2273
|
-
e$4({ type: String })
|
|
2274
|
-
], SonicTextFormatted.prototype, "html", 2);
|
|
2275
|
-
__decorateClass$f([
|
|
2276
|
-
e$4({ type: String })
|
|
2277
|
-
], SonicTextFormatted.prototype, "leading", 2);
|
|
2278
|
-
__decorateClass$f([
|
|
2279
|
-
e$4()
|
|
2280
|
-
], SonicTextFormatted.prototype, "className", 2);
|
|
2281
|
-
SonicTextFormatted = __decorateClass$f([
|
|
2282
|
-
n$2("sonic-text-formatted")
|
|
2283
|
-
], SonicTextFormatted);
|
|
2284
|
-
var __defProp$e = Object.defineProperty;
|
|
2285
|
-
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
2286
|
-
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
2287
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
2288
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2289
|
-
if (decorator = decorators[i2])
|
|
2290
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2291
|
-
if (kind && result)
|
|
2292
|
-
__defProp$e(target, key, result);
|
|
2293
|
-
return result;
|
|
2294
|
-
};
|
|
2295
|
-
let SonicText = class extends Subscriber(s$1) {
|
|
2296
|
-
constructor() {
|
|
2297
|
-
super(...arguments);
|
|
2298
|
-
this.key = "";
|
|
2299
|
-
this.text = "";
|
|
2300
|
-
this.className = "";
|
|
2301
|
-
}
|
|
2302
|
-
render() {
|
|
2303
|
-
let text = this.text;
|
|
2304
|
-
if (this.props && typeof this.props === "string")
|
|
2305
|
-
text = this.props;
|
|
2306
|
-
return text || this.children.length ? p$1`<div class="${this.className}">
|
|
2307
|
-
<slot name="prefix"></slot>
|
|
2308
|
-
${text && o$1(text)}
|
|
2309
|
-
<slot></slot>
|
|
2310
|
-
<slot name="suffix"></slot>
|
|
2311
|
-
</div>` : p$1`<slot></slot>`;
|
|
2312
|
-
}
|
|
2313
|
-
};
|
|
2314
|
-
__decorateClass$e([
|
|
2315
|
-
e$4()
|
|
2316
|
-
], SonicText.prototype, "key", 2);
|
|
2317
|
-
__decorateClass$e([
|
|
2318
|
-
e$4()
|
|
2319
|
-
], SonicText.prototype, "text", 2);
|
|
2320
|
-
__decorateClass$e([
|
|
2321
|
-
e$4()
|
|
2322
|
-
], SonicText.prototype, "className", 2);
|
|
2323
|
-
SonicText = __decorateClass$e([
|
|
2324
|
-
n$2("sonic-text")
|
|
2325
|
-
], SonicText);
|
|
2326
|
-
var __defProp$d = Object.defineProperty;
|
|
2327
|
-
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
2328
|
-
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
2329
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
2330
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2331
|
-
if (decorator = decorators[i2])
|
|
2332
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2333
|
-
if (kind && result)
|
|
2334
|
-
__defProp$d(target, key, result);
|
|
2335
|
-
return result;
|
|
2336
|
-
};
|
|
2337
|
-
let SonicList = class extends Fetcher(Subscriber(s$1)) {
|
|
2338
|
-
constructor() {
|
|
2339
|
-
super(...arguments);
|
|
2340
|
-
this.template = null;
|
|
2341
|
-
}
|
|
2342
|
-
connectedCallback() {
|
|
2343
|
-
super.connectedCallback();
|
|
2344
|
-
this.template = this.getElementsByTagName("template")[0];
|
|
2345
|
-
}
|
|
2346
|
-
render() {
|
|
2347
|
-
if (typeof this.props == "string") {
|
|
2348
|
-
const icon2 = `<svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="face-thinking" class="svg-inline--fa fa-face-thinking" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M40.05 315.7C42.4 324.3 37.4 333.1 28.88 335.4C20.37 337.8 11.56 332.8 9.204 324.3C3.202 302.5 0 279.6 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 379.9 424 483.2 307.2 506.9C298.5 508.6 290.1 503 288.3 494.4C286.6 485.7 292.2 477.3 300.8 475.5C403.1 454.8 480 364.4 480 256C480 132.3 379.7 32 256 32C132.3 32 32 132.3 32 256C32 276.7 34.81 296.7 40.05 315.7H40.05zM318.3 297.2C336.5 303.3 349.4 319.3 351.6 338C354.3 359.3 342.4 380.5 321.5 388.7L274.5 407.1L250.6 466.7C239.7 494.1 213.2 512 183.8 512H136C96.24 512 64 479.8 64 440V320C64 293.5 85.49 272 112 272C138.5 272 160 293.5 160 320V348.8L257.4 310.7L186.9 287.2C178.6 284.4 174 275.3 176.8 266.9C179.6 258.6 188.7 254 197.1 256.8L318.3 297.2zM318.9 338.2C315.7 329.9 306.4 325.9 298.2 329.1L149.8 387.1C144.9 389.1 139.3 388.4 134.1 385.5C130.6 382.5 128 377.5 128 372.2V320C128 311.2 120.8 304 112 304C103.2 304 96 311.2 96 320V440C96 462.1 113.9 480 136 480H183.8C200.1 480 214.8 470 220.9 454.9L246.9 389.9C246.9 389.7 247 389.6 247.1 389.4C248.6 385 252 381.5 256.3 379.8L309.8 358.9C316.1 356.4 320 350.4 320 344C320 343.6 319.1 343.1 319.1 342.7C319.8 341.2 319.5 339.7 318.9 338.2H318.9zM200.4 192C200.4 205.3 189.6 216 176.4 216C163.1 216 152.4 205.3 152.4 192C152.4 178.7 163.1 168 176.4 168C189.6 168 200.4 178.7 200.4 192zM312.4 208C312.4 194.7 323.1 184 336.4 184C349.6 184 360.4 194.7 360.4 208C360.4 221.3 349.6 232 336.4 232C323.1 232 312.4 221.3 312.4 208zM216.4 144.8C195.9 127.2 166.5 124.4 142.1 137.9L135.9 141.9C128.3 146.3 118.5 143.6 114.1 135.9C109.7 128.3 112.4 118.5 120.1 114.1L127.1 110.1C162.3 89.95 206.4 94.14 237.2 120.5L250.4 131.9C257.1 137.6 257.9 147.7 252.1 154.4C246.4 161.1 236.3 161.9 229.6 156.1L216.4 144.8z"></path></svg>`;
|
|
2349
|
-
return p$1`<div class="sonic-no-result-container">
|
|
2350
|
-
${o$1(icon2)} <span class="sonic-no-result-text">${this.props}
|
|
2351
|
-
</span></div>`;
|
|
2352
|
-
}
|
|
2353
|
-
if (!Array.isArray(this.props))
|
|
2354
|
-
return p$1``;
|
|
2355
|
-
return p$1`
|
|
2356
|
-
${c(this.props, (item) => item.id, (item, index) => item && p$1`
|
|
2357
|
-
<sonic-subscriber .props=${item} dataProvider="${this.dataProvider}/${index}">
|
|
2358
|
-
${o$2(this.template)}
|
|
2359
|
-
</sonic-subscriber>
|
|
2360
|
-
`)}
|
|
2361
|
-
`;
|
|
2362
|
-
}
|
|
2363
|
-
};
|
|
2364
|
-
SonicList.styles = [
|
|
2365
|
-
r$5`
|
|
2366
|
-
.sonic-no-result-container {
|
|
2367
|
-
color:var(--sc-base-300);
|
|
2368
|
-
font-size:1.65rem;
|
|
2369
|
-
|
|
2370
|
-
}
|
|
2371
|
-
.sonic-no-result-container svg{
|
|
2372
|
-
width:1.2em;
|
|
2373
|
-
height:1.2em;
|
|
2374
|
-
margin-right:.25em;
|
|
2375
|
-
object-fit:contain;
|
|
2376
|
-
vertical-align:middle;
|
|
2377
|
-
}
|
|
2378
|
-
span {
|
|
2379
|
-
vertical-align:middle;
|
|
2380
|
-
}
|
|
2381
|
-
`
|
|
2382
|
-
];
|
|
2383
|
-
SonicList = __decorateClass$d([
|
|
2384
|
-
n$2("sonic-list")
|
|
2385
|
-
], SonicList);
|
|
2386
|
-
var __defProp$c = Object.defineProperty;
|
|
2387
|
-
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
2388
|
-
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
2389
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
2390
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2391
|
-
if (decorator = decorators[i2])
|
|
2392
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2393
|
-
if (kind && result)
|
|
2394
|
-
__defProp$c(target, key, result);
|
|
2395
|
-
return result;
|
|
2396
|
-
};
|
|
2397
|
-
let SonicSubscriber = class extends Subscriber(s$1) {
|
|
2398
|
-
render() {
|
|
2399
|
-
return p$1`
|
|
2400
|
-
<slot></slot>
|
|
2401
|
-
`;
|
|
2402
|
-
}
|
|
2403
|
-
};
|
|
2404
|
-
SonicSubscriber = __decorateClass$c([
|
|
2405
|
-
n$2("sonic-subscriber")
|
|
2406
|
-
], SonicSubscriber);
|
|
2407
|
-
var __defProp$b = Object.defineProperty;
|
|
2408
|
-
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
2409
|
-
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
2410
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
2411
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2412
|
-
if (decorator = decorators[i2])
|
|
2413
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2414
|
-
if (kind && result)
|
|
2415
|
-
__defProp$b(target, key, result);
|
|
2416
|
-
return result;
|
|
2417
|
-
};
|
|
2418
|
-
let SonicTaxonomy = class extends Subscriber(s$1) {
|
|
2419
|
-
constructor() {
|
|
2420
|
-
super(...arguments);
|
|
2421
|
-
this.taxonomy = [];
|
|
2422
|
-
this.separator = "";
|
|
2423
|
-
}
|
|
2424
|
-
render() {
|
|
2425
|
-
if (this.taxonomy.length === 0)
|
|
2426
|
-
return;
|
|
2427
|
-
const idKey = "category_id";
|
|
2428
|
-
const nameKey = "category_name";
|
|
2429
|
-
return p$1`
|
|
2430
|
-
<div class="sonic-taxonomy">
|
|
2431
|
-
<i class=" fas fa-circle"></i>
|
|
2432
|
-
<div>
|
|
2433
|
-
${c(this.taxonomy, (item) => item[idKey], (item) => p$1`<span>
|
|
2434
|
-
${item[nameKey]}
|
|
2435
|
-
</span>
|
|
2436
|
-
<span class="sonic-taxonomy-separator"></span>
|
|
2437
|
-
`)}
|
|
2438
|
-
</div>
|
|
2439
|
-
|
|
2440
|
-
</div>
|
|
2441
|
-
`;
|
|
2442
|
-
}
|
|
2443
|
-
};
|
|
2444
|
-
__decorateClass$b([
|
|
2445
|
-
e$4({ type: Array })
|
|
2446
|
-
], SonicTaxonomy.prototype, "taxonomy", 2);
|
|
2447
|
-
__decorateClass$b([
|
|
2448
|
-
e$4({ type: String })
|
|
2449
|
-
], SonicTaxonomy.prototype, "separator", 2);
|
|
2450
|
-
SonicTaxonomy = __decorateClass$b([
|
|
2451
|
-
n$2("sonic-taxonomy")
|
|
2452
|
-
], SonicTaxonomy);
|
|
2453
|
-
var __defProp$a = Object.defineProperty;
|
|
2454
|
-
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
2455
|
-
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
2456
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
2457
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2458
|
-
if (decorator = decorators[i2])
|
|
2459
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2460
|
-
if (kind && result)
|
|
2461
|
-
__defProp$a(target, key, result);
|
|
2462
|
-
return result;
|
|
2463
|
-
};
|
|
2464
|
-
let SonicEventCard = class extends Subscriber(s$1) {
|
|
2465
|
-
constructor() {
|
|
2466
|
-
super(...arguments);
|
|
2467
|
-
this.start_date = "";
|
|
2468
|
-
this.illustration = "";
|
|
2469
|
-
this.categories = [];
|
|
2470
|
-
}
|
|
2471
|
-
render() {
|
|
2472
|
-
return p$1`
|
|
2473
|
-
<div class="sonic-event-card">
|
|
2474
|
-
<div class="sonic-event-card-illustration">
|
|
2475
|
-
<sonic-illustration
|
|
2476
|
-
illustration=${this.illustration}
|
|
2477
|
-
></sonic-illustration>
|
|
2478
|
-
</div>
|
|
2479
|
-
<div class="sonic-event-card-text">
|
|
2480
|
-
${this.start_date}
|
|
2481
|
-
<div class="sonic-event-card-title">${this.title}</div>
|
|
2482
|
-
<div class="sonic-event-card-infos">
|
|
2483
|
-
<sonic-taxonomy .taxonomy=${this.categories} ></sonic-taxonomy>
|
|
2484
|
-
</diV>
|
|
2485
|
-
|
|
2486
|
-
<sonic-prices-form></sonic-prices-form>
|
|
2487
|
-
</div>
|
|
2488
|
-
</div>
|
|
2489
|
-
`;
|
|
2490
|
-
}
|
|
2491
|
-
};
|
|
2492
|
-
SonicEventCard.styles = [
|
|
2493
|
-
r$5`
|
|
2494
|
-
a {
|
|
2495
|
-
text-decoration: none;
|
|
2496
|
-
display: block;
|
|
2497
|
-
color: inherit;
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
|
-
.sonic-event-card {
|
|
2501
|
-
max-width: 30em;
|
|
2502
|
-
font-size: var(--sc-fs-root);
|
|
2503
|
-
margin-bottom: 4em;
|
|
2504
|
-
display: grid;
|
|
2505
|
-
flex-wrap: wrap;
|
|
2506
|
-
grid-template-columns: minmax(0, 1fr);
|
|
2507
|
-
}
|
|
2508
|
-
|
|
2509
|
-
.sonic-event-card-title {
|
|
2510
|
-
font-size: var(--sc-card-title-font-size, 1.75em);
|
|
2511
|
-
line-height: var(--sc-card-title-leading, var(--sc-headings-line-height) );
|
|
2512
|
-
font-weight: var(--sc-card-title-fw, var(--sc-headings-font-weight) );
|
|
2513
|
-
margin-bottom: 0.25em;
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
.sonic-event-card-prices {
|
|
2517
|
-
margin-top: 0.8em;
|
|
2518
|
-
}
|
|
2519
|
-
.sonic-event-card-illustration {
|
|
2520
|
-
display:flex; margin-bottom:.8em;
|
|
2521
|
-
}
|
|
2522
|
-
|
|
2523
|
-
.sonic-event-card-body {
|
|
2524
|
-
max-width: 70ch;
|
|
2525
|
-
margin-bottom: 1.25em;
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
.sonic-event-card-text {
|
|
2529
|
-
align-self: center;
|
|
2530
|
-
}
|
|
2531
|
-
|
|
2532
|
-
.sonic-event-card-infos {
|
|
2533
|
-
margin-bottom:1em;
|
|
2534
|
-
}
|
|
2535
|
-
`
|
|
2536
|
-
];
|
|
2537
|
-
__decorateClass$a([
|
|
2538
|
-
e$4({ type: String })
|
|
2539
|
-
], SonicEventCard.prototype, "start_date", 2);
|
|
2540
|
-
__decorateClass$a([
|
|
2541
|
-
e$4({ type: String })
|
|
2542
|
-
], SonicEventCard.prototype, "illustration", 2);
|
|
2543
|
-
__decorateClass$a([
|
|
2544
|
-
e$4({ type: Array })
|
|
2545
|
-
], SonicEventCard.prototype, "categories", 2);
|
|
2546
|
-
SonicEventCard = __decorateClass$a([
|
|
2547
|
-
n$2("sonic-event-card")
|
|
2548
|
-
], SonicEventCard);
|
|
2549
|
-
var __defProp$9 = Object.defineProperty;
|
|
2550
|
-
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
2551
|
-
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
2552
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
2553
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2554
|
-
if (decorator = decorators[i2])
|
|
2555
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2556
|
-
if (kind && result)
|
|
2557
|
-
__defProp$9(target, key, result);
|
|
2558
|
-
return result;
|
|
2559
|
-
};
|
|
2560
|
-
let SonicEventTitle = class extends Subscriber(s$1) {
|
|
2561
|
-
constructor() {
|
|
2562
|
-
super(...arguments);
|
|
2563
|
-
this.title = "";
|
|
2564
|
-
}
|
|
2565
|
-
render() {
|
|
2566
|
-
return p$1`
|
|
2567
|
-
${this.title}
|
|
2568
|
-
`;
|
|
2569
|
-
}
|
|
2570
|
-
};
|
|
2571
|
-
__decorateClass$9([
|
|
2572
|
-
e$4({ type: String })
|
|
2573
|
-
], SonicEventTitle.prototype, "title", 2);
|
|
2574
|
-
SonicEventTitle = __decorateClass$9([
|
|
2575
|
-
n$2("sonic-event-title")
|
|
2576
|
-
], SonicEventTitle);
|
|
2577
|
-
var __defProp$8 = Object.defineProperty;
|
|
2578
|
-
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
2579
|
-
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
2580
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
2581
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2582
|
-
if (decorator = decorators[i2])
|
|
2583
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2584
|
-
if (kind && result)
|
|
2585
|
-
__defProp$8(target, key, result);
|
|
2586
|
-
return result;
|
|
2587
|
-
};
|
|
2588
|
-
let SonicEvent = class extends Subscriber(s$1) {
|
|
2589
|
-
render() {
|
|
2590
|
-
return p$1`
|
|
2591
|
-
<slot></slot>
|
|
2592
|
-
`;
|
|
2593
|
-
}
|
|
2594
|
-
};
|
|
2595
|
-
SonicEvent = __decorateClass$8([
|
|
2596
|
-
n$2("super-event")
|
|
2597
|
-
], SonicEvent);
|
|
2598
|
-
var __defProp$7 = Object.defineProperty;
|
|
2599
|
-
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
2600
|
-
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
2601
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
2602
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2603
|
-
if (decorator = decorators[i2])
|
|
2604
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2605
|
-
if (kind && result)
|
|
2606
|
-
__defProp$7(target, key, result);
|
|
2607
|
-
return result;
|
|
2608
|
-
};
|
|
2609
|
-
let SonicIllustration = class extends Subscriber(s$1) {
|
|
2610
|
-
constructor() {
|
|
2611
|
-
super(...arguments);
|
|
2612
|
-
this.illustration = "";
|
|
2613
|
-
this.loadingMode = "lazy";
|
|
2614
|
-
this.ratio = "1x1";
|
|
2615
|
-
this.className = "";
|
|
2616
|
-
}
|
|
2617
|
-
render() {
|
|
2618
|
-
return p$1` <div class="${this.className} sonic-img-container">
|
|
2619
|
-
<picture
|
|
2620
|
-
><img src="${this.illustration}" loading="${this.loadingMode}" alt=""
|
|
2621
|
-
/></picture>
|
|
2622
|
-
</div>`;
|
|
2623
|
-
}
|
|
2624
|
-
};
|
|
2625
|
-
SonicIllustration.styles = r$5`
|
|
2626
|
-
img {
|
|
2627
|
-
aspect-ratio: 1 / 1;
|
|
2628
|
-
width: 100%;
|
|
2629
|
-
vertical-align: middle;
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
img[src=""] {
|
|
2633
|
-
visibility: hidden;
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
.sonic-img-container {
|
|
2637
|
-
border-radius: var(--sc-img-radius, var(--sc-rounded-lg) );
|
|
2638
|
-
overflow:hidden;
|
|
2639
|
-
background: var(--sc-placeholder-bg);
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
`;
|
|
2643
|
-
__decorateClass$7([
|
|
2644
|
-
e$4({ type: String })
|
|
2645
|
-
], SonicIllustration.prototype, "illustration", 2);
|
|
2646
|
-
__decorateClass$7([
|
|
2647
|
-
e$4({ type: String })
|
|
2648
|
-
], SonicIllustration.prototype, "loadingMode", 2);
|
|
2649
|
-
__decorateClass$7([
|
|
2650
|
-
e$4({ type: String })
|
|
2651
|
-
], SonicIllustration.prototype, "ratio", 2);
|
|
2652
|
-
__decorateClass$7([
|
|
2653
|
-
e$4({ type: String })
|
|
2654
|
-
], SonicIllustration.prototype, "className", 2);
|
|
2655
|
-
SonicIllustration = __decorateClass$7([
|
|
2656
|
-
n$2("sonic-illustration")
|
|
2657
|
-
], SonicIllustration);
|
|
2658
|
-
var __defProp$6 = Object.defineProperty;
|
|
2659
|
-
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
2660
|
-
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
2661
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
2662
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2663
|
-
if (decorator = decorators[i2])
|
|
2664
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2665
|
-
if (kind && result)
|
|
2666
|
-
__defProp$6(target, key, result);
|
|
2667
|
-
return result;
|
|
2668
|
-
};
|
|
2669
|
-
let SonicGiftcard = class extends Subscriber(s$1) {
|
|
2670
|
-
constructor() {
|
|
2671
|
-
super(...arguments);
|
|
2672
|
-
this.title = "";
|
|
2673
|
-
this.body = "";
|
|
2674
|
-
this.status = "";
|
|
2675
|
-
}
|
|
2676
|
-
render() {
|
|
2677
|
-
return p$1`
|
|
2678
|
-
<div class="sonic-giftcard-item">
|
|
2679
|
-
<div class="sonic-giftcard-illustration">
|
|
2680
|
-
<sonic-illustration></sonic-illustration>
|
|
2681
|
-
</div>
|
|
2682
|
-
<div class="sonic-giftcard-text">
|
|
2683
|
-
<div class="sonic-giftcard-title">${this.title}</div>
|
|
2684
|
-
<div class="sonic-giftcard-body">
|
|
2685
|
-
<sonic-text-formatted .html=${this.body} leading="tight"></sonic-text-formatted>
|
|
2686
|
-
</div>
|
|
2687
|
-
${this.status == "on_sale" ? p$1`<sonic-prices-form></sonic-prices-form>` : ""}
|
|
2688
|
-
${this.status == "only_visible" ? p$1`<div class="sonic-indispo"> Non disponible en ligne</div>` : ""}
|
|
2689
|
-
</div>
|
|
2690
|
-
</div>
|
|
2691
|
-
`;
|
|
2692
|
-
}
|
|
2693
|
-
};
|
|
2694
|
-
SonicGiftcard.styles = [
|
|
2695
|
-
r$5`
|
|
2696
|
-
.sonic-giftcard-item {
|
|
2697
|
-
font-size: var(--sc-fs-root);
|
|
2698
|
-
margin-bottom: 4em;
|
|
2699
|
-
display: grid;
|
|
2700
|
-
flex-wrap: wrap;
|
|
2701
|
-
gap: 1.5em;
|
|
2702
|
-
grid-template-columns: minmax(0, 1fr);
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
@media (min-width: 992px) {
|
|
2706
|
-
.sonic-giftcard-item {
|
|
2707
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
|
|
2711
|
-
.sonic-giftcard-title {
|
|
2712
|
-
font-size: var(--sc-card-title-font-size, 1.75em);
|
|
2713
|
-
line-height: var(--sc-card-title-leading, var(--sc-headings-line-height) );
|
|
2714
|
-
font-weight: var(--sc-card-title-fw, var(--sc-headings-font-weight) );
|
|
2715
|
-
margin-bottom: 0.25em;
|
|
2716
|
-
}
|
|
2717
|
-
|
|
2718
|
-
.sonic-giftcard-prices {
|
|
2719
|
-
margin-top: 0.8em;
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
.sonic-giftcard-body {
|
|
2723
|
-
max-width: 70ch;
|
|
2724
|
-
margin-bottom: 1.25em;
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
.sonic-giftcard-illustration {
|
|
2728
|
-
position: relative;
|
|
2729
|
-
}
|
|
2730
|
-
|
|
2731
|
-
.sonic-giftcard-text {
|
|
2732
|
-
align-self: center;
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
.sonic-indispo {
|
|
2736
|
-
display:inline-block;
|
|
2737
|
-
padding:.25em 1em;
|
|
2738
|
-
font-size:.85rem;
|
|
2739
|
-
font-weight:bold;
|
|
2740
|
-
border-radius:5rem;
|
|
2741
|
-
background:var(--sc-warning);
|
|
2742
|
-
color:var(--sc-warning-content);
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
`
|
|
2746
|
-
];
|
|
2747
|
-
__decorateClass$6([
|
|
2748
|
-
e$4({ type: String })
|
|
2749
|
-
], SonicGiftcard.prototype, "title", 2);
|
|
2750
|
-
__decorateClass$6([
|
|
2751
|
-
e$4({ type: String })
|
|
2752
|
-
], SonicGiftcard.prototype, "body", 2);
|
|
2753
|
-
__decorateClass$6([
|
|
2754
|
-
e$4({ type: String })
|
|
2755
|
-
], SonicGiftcard.prototype, "status", 2);
|
|
2756
|
-
SonicGiftcard = __decorateClass$6([
|
|
2757
|
-
n$2("sonic-giftcard")
|
|
2758
|
-
], SonicGiftcard);
|
|
2759
|
-
const cssButton = r$5`
|
|
2760
|
-
.btn {
|
|
2761
|
-
all: unset;
|
|
2762
|
-
cursor: pointer;
|
|
2763
|
-
text-align: center;
|
|
2764
|
-
line-height: 1.2;
|
|
2765
|
-
border-radius: var(--sc-btn-rounded);
|
|
2766
|
-
background: var(--sc-btn-bg, var(--sc-success, #1F2937));
|
|
2767
|
-
color: var(--sc-btn-content, var(--sc-base, #fff));
|
|
2768
|
-
|
|
2769
|
-
font-family: var(--sc-btn-ff, inherit);
|
|
2770
|
-
font-size: var(--sc-btn-fs-lg, 1.5em);
|
|
2771
|
-
padding-block: var(--sc-btn-py, 0.6em);
|
|
2772
|
-
padding-inline: var(--sc-btn-px, 0.8em);
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
.btn:hover,
|
|
2776
|
-
.btn:focus {
|
|
2777
|
-
filter:brightness(.99)
|
|
2778
|
-
}
|
|
2779
|
-
|
|
2780
|
-
.btn:active{
|
|
2781
|
-
transform:scale(.98)
|
|
2782
|
-
}
|
|
2783
|
-
`;
|
|
2784
|
-
var __defProp$5 = Object.defineProperty;
|
|
2785
|
-
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
2786
|
-
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
2787
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
2788
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2789
|
-
if (decorator = decorators[i2])
|
|
2790
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2791
|
-
if (kind && result)
|
|
2792
|
-
__defProp$5(target, key, result);
|
|
2793
|
-
return result;
|
|
2794
|
-
};
|
|
2795
|
-
let SonicPricesButton = class extends Subscriber(s$1) {
|
|
2796
|
-
constructor() {
|
|
2797
|
-
super(...arguments);
|
|
2798
|
-
this.price_amount = "";
|
|
2799
|
-
this.giftcard_id = "";
|
|
2800
|
-
this.price_name = "";
|
|
2801
|
-
this.price_id = "";
|
|
2802
|
-
this.btnClass = "";
|
|
2803
|
-
this.displayBtnIcon = true;
|
|
2804
|
-
this.displayPriceName = true;
|
|
2805
|
-
this.priceNameClass = "";
|
|
2806
|
-
this.price_help_text = "";
|
|
2807
|
-
this.btnIconClass = "fal fa-shopping-basket";
|
|
2808
|
-
this.loading = false;
|
|
2809
|
-
}
|
|
2810
|
-
_cleanPrice(price) {
|
|
2811
|
-
return price == null ? void 0 : price.replace(".00", "");
|
|
2812
|
-
}
|
|
2813
|
-
async _handleClick() {
|
|
2814
|
-
let api = new API({});
|
|
2815
|
-
this.loading = true;
|
|
2816
|
-
const timeoutId = setTimeout(SonicLoader.show, 250);
|
|
2817
|
-
let result = await api.put("/api-billetterie/webcomponents/cart", {
|
|
2818
|
-
events: [
|
|
2819
|
-
{
|
|
2820
|
-
"giftcard_id": this.giftcard_id,
|
|
2821
|
-
"quantity": 1,
|
|
2822
|
-
"price_id": this.price_id
|
|
2823
|
-
}
|
|
2824
|
-
]
|
|
2825
|
-
});
|
|
2826
|
-
this.loading = false;
|
|
2827
|
-
clearTimeout(timeoutId);
|
|
2828
|
-
SonicLoader.hide();
|
|
2829
|
-
if (!result) {
|
|
2830
|
-
SonicToast.add({ text: "Network Error", status: "error", styled: true });
|
|
2831
|
-
return;
|
|
2832
|
-
}
|
|
2833
|
-
if (result.status) {
|
|
2834
|
-
document.querySelectorAll(".btn-panier-statut").forEach((elt) => {
|
|
2835
|
-
elt.innerHTML = result.nb;
|
|
2836
|
-
elt.classList.remove("hidden");
|
|
2837
|
-
});
|
|
2838
|
-
SonicToast.add({ text: "Votre produit a bien \xE9t\xE9 ajout\xE9", status: "success", styled: true });
|
|
2839
|
-
} else {
|
|
2840
|
-
SonicToast.add({ text: result.data, status: "error", styled: true });
|
|
2841
|
-
}
|
|
2842
|
-
}
|
|
2843
|
-
render() {
|
|
2844
|
-
if (!this.props)
|
|
2845
|
-
return;
|
|
2846
|
-
const icon2 = this.displayBtnIcon ? p$1`<i class="${this.btnIconClass}"></i>` : "";
|
|
2847
|
-
const infoTooltip = this.price_help_text ? p$1`<div class="sonic-price-btn-help"><sonic-tooltip tooltipText="${this.price_help_text}">
|
|
2848
|
-
<span>?</span>
|
|
2849
|
-
</sonic-tooltip></div>` : "";
|
|
2850
|
-
return p$1`
|
|
2851
|
-
|
|
2852
|
-
<button class="btn sonic-price-btn ${this.btnClass} ${!this.props.price_available || this.loading ? "sonic-price-disabled" : ""}" @click="${this._handleClick}">
|
|
2853
|
-
${this.displayPriceName && p$1`<span class="${this.priceNameClass} sonic-price-btn-name">
|
|
2854
|
-
${this.price_name}
|
|
2855
|
-
</span>`}
|
|
2856
|
-
<span> ${icon2} ${this._cleanPrice(this.price_amount)}€ </span>
|
|
2857
|
-
${infoTooltip}
|
|
2858
|
-
</button>
|
|
2859
|
-
`;
|
|
2860
|
-
}
|
|
2861
|
-
};
|
|
2862
|
-
SonicPricesButton.styles = [
|
|
2863
|
-
cssButton,
|
|
2864
|
-
r$5`
|
|
2865
|
-
.sonic-price-btn {
|
|
2866
|
-
position:relative;
|
|
2867
|
-
}
|
|
2868
|
-
|
|
2869
|
-
.sonic-price-btn-name {
|
|
2870
|
-
font-size: 0.75em;
|
|
2871
|
-
display: block;
|
|
2872
|
-
}
|
|
2873
|
-
|
|
2874
|
-
.sonic-price-btn-help {
|
|
2875
|
-
border: 1px;
|
|
2876
|
-
position:absolute;
|
|
2877
|
-
right:.15rem;
|
|
2878
|
-
top:.15rem;
|
|
2879
|
-
width:1.2em;
|
|
2880
|
-
font-size:.65em;
|
|
2881
|
-
line-height:1;
|
|
2882
|
-
display:inline-flex;
|
|
2883
|
-
justify-content:center;
|
|
2884
|
-
align-items: center;
|
|
2885
|
-
height:1.2em;
|
|
2886
|
-
background:var(--sc-base-content);
|
|
2887
|
-
color:var(--sc-base);
|
|
2888
|
-
border-radius:50%;
|
|
2889
|
-
z-index:10;
|
|
2890
|
-
}
|
|
2891
|
-
|
|
2892
|
-
.sonic-price-disabled {
|
|
2893
|
-
opacity:.3;
|
|
2894
|
-
pointer-events:none;
|
|
2895
|
-
user-select:none;
|
|
2896
|
-
}
|
|
2897
|
-
|
|
2898
|
-
`
|
|
2899
|
-
];
|
|
2900
|
-
__decorateClass$5([
|
|
2901
|
-
e$4({ type: String })
|
|
2902
|
-
], SonicPricesButton.prototype, "price_amount", 2);
|
|
2903
|
-
__decorateClass$5([
|
|
2904
|
-
e$4({ type: String })
|
|
2905
|
-
], SonicPricesButton.prototype, "giftcard_id", 2);
|
|
2906
|
-
__decorateClass$5([
|
|
2907
|
-
e$4({ type: String })
|
|
2908
|
-
], SonicPricesButton.prototype, "price_name", 2);
|
|
2909
|
-
__decorateClass$5([
|
|
2910
|
-
e$4({ type: String })
|
|
2911
|
-
], SonicPricesButton.prototype, "price_id", 2);
|
|
2912
|
-
__decorateClass$5([
|
|
2913
|
-
e$4({ type: String })
|
|
2914
|
-
], SonicPricesButton.prototype, "btnClass", 2);
|
|
2915
|
-
__decorateClass$5([
|
|
2916
|
-
e$4({ type: Boolean })
|
|
2917
|
-
], SonicPricesButton.prototype, "displayBtnIcon", 2);
|
|
2918
|
-
__decorateClass$5([
|
|
2919
|
-
e$4({ type: Boolean })
|
|
2920
|
-
], SonicPricesButton.prototype, "displayPriceName", 2);
|
|
2921
|
-
__decorateClass$5([
|
|
2922
|
-
e$4({ type: String })
|
|
2923
|
-
], SonicPricesButton.prototype, "priceNameClass", 2);
|
|
2924
|
-
__decorateClass$5([
|
|
2925
|
-
e$4({ type: String })
|
|
2926
|
-
], SonicPricesButton.prototype, "price_help_text", 2);
|
|
2927
|
-
__decorateClass$5([
|
|
2928
|
-
e$4({ type: String })
|
|
2929
|
-
], SonicPricesButton.prototype, "btnIconClass", 2);
|
|
2930
|
-
__decorateClass$5([
|
|
2931
|
-
e$4()
|
|
2932
|
-
], SonicPricesButton.prototype, "loading", 2);
|
|
2933
|
-
SonicPricesButton = __decorateClass$5([
|
|
2934
|
-
n$2("sonic-price-button")
|
|
2935
|
-
], SonicPricesButton);
|
|
2936
|
-
var __defProp$4 = Object.defineProperty;
|
|
2937
|
-
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
2938
|
-
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
2939
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
2940
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
2941
|
-
if (decorator = decorators[i2])
|
|
2942
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
2943
|
-
if (kind && result)
|
|
2944
|
-
__defProp$4(target, key, result);
|
|
2945
|
-
return result;
|
|
2946
|
-
};
|
|
2947
|
-
let SonicPricesForm = class extends Subscriber(s$1) {
|
|
2948
|
-
constructor() {
|
|
2949
|
-
super(...arguments);
|
|
2950
|
-
this.giftcard_id = "";
|
|
2951
|
-
this.prices = [];
|
|
2952
|
-
this.wrapper = true;
|
|
2953
|
-
this.displayBtnIcon = false;
|
|
2954
|
-
this.displayPriceName = true;
|
|
2955
|
-
this.className = "";
|
|
2956
|
-
this.itemClass = "";
|
|
2957
|
-
this.btnClass = "";
|
|
2958
|
-
this.iconClass = "";
|
|
2959
|
-
this.priceNameClass = "";
|
|
2960
|
-
}
|
|
2961
|
-
render() {
|
|
2962
|
-
if (this.prices.length === 0)
|
|
2963
|
-
return;
|
|
2964
|
-
return p$1`
|
|
2965
|
-
<div class="${this.className} sonic-prices-list">
|
|
2966
|
-
${c(this.prices, (price) => price.price_id, (price, index) => price && p$1`<div class="${this.itemClass} sonic-prices-list-item" ><sonic-price-button
|
|
2967
|
-
dataPath="prices.${index}"
|
|
2968
|
-
giftcard_id="${this.giftcard_id}"
|
|
2969
|
-
.btnClass=${this.btnClass}
|
|
2970
|
-
.displayBtnIcon=${this.displayBtnIcon}
|
|
2971
|
-
.priceNameClass=${this.priceNameClass}
|
|
2972
|
-
.displayPriceName=${this.displayPriceName}
|
|
2973
|
-
></sonic-price-button></div>`)}
|
|
2974
|
-
|
|
2975
|
-
</div>
|
|
2976
|
-
`;
|
|
2977
|
-
}
|
|
2978
|
-
};
|
|
2979
|
-
SonicPricesForm.styles = [
|
|
2980
|
-
r$5`
|
|
2981
|
-
.sonic-prices-list {
|
|
2982
|
-
display:grid;
|
|
2983
|
-
grid-gap:.25em;
|
|
2984
|
-
grid-template-columns:repeat(auto-fill, minmax( min( 8.5em, 100%), 1fr))
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
sonic-price-button,
|
|
2988
|
-
.sonic-prices-list-item {
|
|
2989
|
-
display:contents;
|
|
2990
|
-
background:red;
|
|
2991
|
-
}
|
|
2992
|
-
`
|
|
2993
|
-
];
|
|
2994
|
-
__decorateClass$4([
|
|
2995
|
-
e$4({ type: String })
|
|
2996
|
-
], SonicPricesForm.prototype, "giftcard_id", 2);
|
|
2997
|
-
__decorateClass$4([
|
|
2998
|
-
e$4({ type: Array })
|
|
2999
|
-
], SonicPricesForm.prototype, "prices", 2);
|
|
3000
|
-
__decorateClass$4([
|
|
3001
|
-
e$4({ type: Boolean })
|
|
3002
|
-
], SonicPricesForm.prototype, "wrapper", 2);
|
|
3003
|
-
__decorateClass$4([
|
|
3004
|
-
e$4({ type: Boolean })
|
|
3005
|
-
], SonicPricesForm.prototype, "displayBtnIcon", 2);
|
|
3006
|
-
__decorateClass$4([
|
|
3007
|
-
e$4({ type: Boolean })
|
|
3008
|
-
], SonicPricesForm.prototype, "displayPriceName", 2);
|
|
3009
|
-
__decorateClass$4([
|
|
3010
|
-
e$4({ type: String })
|
|
3011
|
-
], SonicPricesForm.prototype, "className", 2);
|
|
3012
|
-
__decorateClass$4([
|
|
3013
|
-
e$4({ type: String })
|
|
3014
|
-
], SonicPricesForm.prototype, "itemClass", 2);
|
|
3015
|
-
__decorateClass$4([
|
|
3016
|
-
e$4({ type: String })
|
|
3017
|
-
], SonicPricesForm.prototype, "btnClass", 2);
|
|
3018
|
-
__decorateClass$4([
|
|
3019
|
-
e$4({ type: String })
|
|
3020
|
-
], SonicPricesForm.prototype, "iconClass", 2);
|
|
3021
|
-
__decorateClass$4([
|
|
3022
|
-
e$4({ type: String })
|
|
3023
|
-
], SonicPricesForm.prototype, "priceNameClass", 2);
|
|
3024
|
-
SonicPricesForm = __decorateClass$4([
|
|
3025
|
-
n$2("sonic-prices-form")
|
|
3026
|
-
], SonicPricesForm);
|
|
3027
|
-
var __defProp$3 = Object.defineProperty;
|
|
3028
|
-
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
3029
|
-
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
3030
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
3031
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
3032
|
-
if (decorator = decorators[i2])
|
|
3033
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3034
|
-
if (kind && result)
|
|
3035
|
-
__defProp$3(target, key, result);
|
|
3036
|
-
return result;
|
|
3037
|
-
};
|
|
3038
|
-
let SonicButton = class extends Subscriber(s$1) {
|
|
3039
|
-
constructor() {
|
|
3040
|
-
super(...arguments);
|
|
3041
|
-
this.type = "";
|
|
3042
|
-
this.variant = "";
|
|
3043
|
-
this.size = "";
|
|
3044
|
-
this.shape = "";
|
|
3045
|
-
this.className = "";
|
|
3046
|
-
this.href = "";
|
|
3047
|
-
}
|
|
3048
|
-
render() {
|
|
3049
|
-
const btn = p$1`<button
|
|
3050
|
-
class="${this.className}
|
|
3051
|
-
sonic-btn
|
|
3052
|
-
sonic-btn-xs
|
|
3053
|
-
${this.variant}
|
|
3054
|
-
"
|
|
3055
|
-
>
|
|
3056
|
-
<span>
|
|
3057
|
-
<slot name="prefix"></slot>
|
|
3058
|
-
<slot></slot>
|
|
3059
|
-
<slot name="suffix"></slot>
|
|
3060
|
-
</span>
|
|
3061
|
-
</button>`;
|
|
3062
|
-
return this.href ? p$1`<a href="${this.href}" class="sonic-btn-link"> ${btn}</a>` : p$1`${btn}`;
|
|
3063
|
-
}
|
|
3064
|
-
};
|
|
3065
|
-
SonicButton.styles = [
|
|
3066
|
-
r$5`
|
|
3067
|
-
|
|
3068
|
-
button {
|
|
3069
|
-
all: unset;
|
|
3070
|
-
box-sizing: border-box;
|
|
3071
|
-
|
|
3072
|
-
--btn-height: 2.5em;
|
|
3073
|
-
--btn-border-color:transparent;
|
|
3074
|
-
--sc-btn-bg:var(--sc-base-200, #e5e7eb);
|
|
3075
|
-
--sc-btn-color: var(--sc-content, #1f2937)
|
|
3076
|
-
--sc-btn-ff:inherit;
|
|
3077
|
-
--sc-btn-fs:1rem;
|
|
3078
|
-
--sc-btn-py:.6em;
|
|
3079
|
-
--sc-btn-px:1.1em;
|
|
3080
|
-
|
|
3081
|
-
cursor: pointer;
|
|
3082
|
-
text-align: center;
|
|
3083
|
-
line-height: 1.2;
|
|
3084
|
-
border-radius: var(--sc-btn-rounded);
|
|
3085
|
-
|
|
3086
|
-
background:var(--sc-btn-bg) ;
|
|
3087
|
-
color: var(--sc-btn-color);
|
|
3088
|
-
|
|
3089
|
-
font-family: var(--sc-btn-ff);
|
|
3090
|
-
font-size: var(--sc-btn-fs);
|
|
3091
|
-
|
|
3092
|
-
padding-block: var(--sc-btn-py);
|
|
3093
|
-
padding-inline: var(--sc-btn-px);
|
|
3094
|
-
|
|
3095
|
-
border-width:var(--btn-)
|
|
3096
|
-
height:var(--btn-height);
|
|
3097
|
-
}
|
|
3098
|
-
|
|
3099
|
-
button:hover,
|
|
3100
|
-
button:focus {
|
|
3101
|
-
filter: brightness(0.98);
|
|
3102
|
-
}
|
|
3103
|
-
|
|
3104
|
-
button:active {
|
|
3105
|
-
filter: brightness(0.92);
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
|
-
/*TYPES*/
|
|
3109
|
-
:host([type="primary"]) button {
|
|
3110
|
-
--sc-btn-color: var(--sc-primary-content);
|
|
3111
|
-
--sc-btn-bg: var(--sc-primary);
|
|
3112
|
-
}
|
|
3113
|
-
:host([type="warning"]) button {
|
|
3114
|
-
--sc-btn-color: var(--sc-warning-content);
|
|
3115
|
-
--sc-btn-bg: var(--sc-warning);
|
|
3116
|
-
}
|
|
3117
|
-
:host([type="danger"]) button {
|
|
3118
|
-
--sc-btn-color: var(--sc-danger-content);
|
|
3119
|
-
--sc-btn-bg: var(--sc-danger);
|
|
3120
|
-
}
|
|
3121
|
-
:host([type="info"]) button {
|
|
3122
|
-
--sc-btn-color: var(--sc-info-content);
|
|
3123
|
-
--sc-btn-bg: var(--sc-info);
|
|
3124
|
-
}
|
|
3125
|
-
:host([type="success"]) button {
|
|
3126
|
-
--sc-btn-color: var(--sc-success-content);
|
|
3127
|
-
--sc-btn-bg: var(--sc-success);
|
|
3128
|
-
}
|
|
3129
|
-
:host([type="dark"]) button {
|
|
3130
|
-
--sc-btn-color: var(--sc-base);
|
|
3131
|
-
--sc-btn-bg: var(--sc-base-content);
|
|
3132
|
-
}
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
/*Variant*/
|
|
3136
|
-
:host([size="xs"]) button {
|
|
3137
|
-
font-size:.75rem;
|
|
3138
|
-
}
|
|
3139
|
-
:host([size="sm"]) button {
|
|
3140
|
-
font-size:.85rem;
|
|
3141
|
-
}
|
|
3142
|
-
:host([size="lg"]) button {
|
|
3143
|
-
font-size:1.2rem;
|
|
3144
|
-
}
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
/*Variant*/
|
|
3149
|
-
:host([variant="ghost"]:not([type])) button {
|
|
3150
|
-
color: var(--sc-btn-color);
|
|
3151
|
-
background: transparent;
|
|
3152
|
-
}
|
|
3153
|
-
|
|
3154
|
-
:host([variant="ghost"][type]) button {
|
|
3155
|
-
color: var(--sc-btn-bg);
|
|
3156
|
-
background: transparent;
|
|
3157
|
-
}
|
|
3158
|
-
|
|
3159
|
-
:host([variant="ghost"]) button:focus,
|
|
3160
|
-
:host([variant="ghost"]) button:hover {
|
|
3161
|
-
background: var(--sc-base-200);
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3164
|
-
/*Shape*/
|
|
3165
|
-
:host([shape="circle"]) button {
|
|
3166
|
-
border-radius: 50%;
|
|
3167
|
-
}
|
|
3168
|
-
|
|
3169
|
-
:host([shape="circle"]) button,
|
|
3170
|
-
:host([shape="square"]) button {
|
|
3171
|
-
width: var(--btn-height);
|
|
3172
|
-
height: var(--btn-height);
|
|
3173
|
-
overflow: hidden;
|
|
3174
|
-
padding: 0;
|
|
3175
|
-
align-items: center;
|
|
3176
|
-
justify-content: 0;
|
|
3177
|
-
}
|
|
3178
|
-
|
|
3179
|
-
.sonic-btn-link {
|
|
3180
|
-
color: unset;
|
|
3181
|
-
display:contents;
|
|
3182
|
-
}
|
|
3183
|
-
`
|
|
3184
|
-
];
|
|
3185
|
-
__decorateClass$3([
|
|
3186
|
-
e$4({ type: String })
|
|
3187
|
-
], SonicButton.prototype, "type", 2);
|
|
3188
|
-
__decorateClass$3([
|
|
3189
|
-
e$4({ type: String })
|
|
3190
|
-
], SonicButton.prototype, "variant", 2);
|
|
3191
|
-
__decorateClass$3([
|
|
3192
|
-
e$4({ type: String })
|
|
3193
|
-
], SonicButton.prototype, "size", 2);
|
|
3194
|
-
__decorateClass$3([
|
|
3195
|
-
e$4({ type: String })
|
|
3196
|
-
], SonicButton.prototype, "shape", 2);
|
|
3197
|
-
__decorateClass$3([
|
|
3198
|
-
e$4({ type: String })
|
|
3199
|
-
], SonicButton.prototype, "className", 2);
|
|
3200
|
-
__decorateClass$3([
|
|
3201
|
-
e$4({ type: String })
|
|
3202
|
-
], SonicButton.prototype, "href", 2);
|
|
3203
|
-
SonicButton = __decorateClass$3([
|
|
3204
|
-
n$2("sonic-button")
|
|
3205
|
-
], SonicButton);
|
|
3206
|
-
var __defProp$2 = Object.defineProperty;
|
|
3207
|
-
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
3208
|
-
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
3209
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
3210
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
3211
|
-
if (decorator = decorators[i2])
|
|
3212
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3213
|
-
if (kind && result)
|
|
3214
|
-
__defProp$2(target, key, result);
|
|
3215
|
-
return result;
|
|
3216
|
-
};
|
|
3217
|
-
let SonicTooltip = class extends Subscriber(s$1) {
|
|
3218
|
-
constructor() {
|
|
3219
|
-
super(...arguments);
|
|
3220
|
-
this.tooltipText = "";
|
|
3221
|
-
this.className = "";
|
|
3222
|
-
}
|
|
3223
|
-
render() {
|
|
3224
|
-
return p$1`<div
|
|
3225
|
-
data-tooltip-text="${this.tooltipText}"
|
|
3226
|
-
class="${this.className} sonic-tooltip"
|
|
3227
|
-
>
|
|
3228
|
-
<slot></slot>
|
|
3229
|
-
</div>`;
|
|
3230
|
-
}
|
|
3231
|
-
};
|
|
3232
|
-
SonicTooltip.styles = [
|
|
3233
|
-
r$5`
|
|
3234
|
-
.sonic-tooltip {
|
|
3235
|
-
position: relative;
|
|
3236
|
-
display:flex;
|
|
3237
|
-
align-items-center;
|
|
3238
|
-
}
|
|
3239
|
-
.sonic-tooltip:before {
|
|
3240
|
-
position: absolute;
|
|
3241
|
-
content: attr(data-tooltip-text);
|
|
3242
|
-
font-size: 0.85rem;
|
|
3243
|
-
display: block;
|
|
3244
|
-
opacity: 0;
|
|
3245
|
-
pointer-events: none;
|
|
3246
|
-
bottom: calc(100% + 0.25rem);
|
|
3247
|
-
left: 50%;
|
|
3248
|
-
transform: translateX(-50%);
|
|
3249
|
-
background: var(--sc-base-content, #111827);
|
|
3250
|
-
padding: 0.25rem;
|
|
3251
|
-
min-width: 20ch;
|
|
3252
|
-
border-radius: 0.25rem;
|
|
3253
|
-
color:var(--sc-base, #fff);
|
|
3254
|
-
z-index:999;
|
|
3255
|
-
display:none;
|
|
3256
|
-
}
|
|
3257
|
-
.sonic-tooltip:hover:before {
|
|
3258
|
-
opacity: 1;
|
|
3259
|
-
display:block;
|
|
3260
|
-
}
|
|
3261
|
-
`
|
|
3262
|
-
];
|
|
3263
|
-
__decorateClass$2([
|
|
3264
|
-
e$4({ type: String })
|
|
3265
|
-
], SonicTooltip.prototype, "tooltipText", 2);
|
|
3266
|
-
__decorateClass$2([
|
|
3267
|
-
e$4({ type: String })
|
|
3268
|
-
], SonicTooltip.prototype, "className", 2);
|
|
3269
|
-
SonicTooltip = __decorateClass$2([
|
|
3270
|
-
n$2("sonic-tooltip")
|
|
3271
|
-
], SonicTooltip);
|
|
3272
|
-
var __defProp$1 = Object.defineProperty;
|
|
3273
|
-
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
3274
|
-
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
3275
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
3276
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
3277
|
-
if (decorator = decorators[i2])
|
|
3278
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3279
|
-
if (kind && result)
|
|
3280
|
-
__defProp$1(target, key, result);
|
|
3281
|
-
return result;
|
|
3282
|
-
};
|
|
3283
|
-
let SonicModal = class extends Subscriber(s$1) {
|
|
3284
|
-
constructor() {
|
|
3285
|
-
super(...arguments);
|
|
3286
|
-
this.className = "";
|
|
3287
|
-
this.title = "";
|
|
3288
|
-
this.text = "";
|
|
3289
|
-
this.visibility = "visible";
|
|
3290
|
-
}
|
|
3291
|
-
render() {
|
|
3292
|
-
if (this.visibility == "hidden")
|
|
3293
|
-
return p$1``;
|
|
3294
|
-
return p$1`<div
|
|
3295
|
-
class="sonic-modal-wrapper"
|
|
3296
|
-
${$({
|
|
3297
|
-
out: f
|
|
3298
|
-
})}
|
|
3299
|
-
>
|
|
3300
|
-
<div
|
|
3301
|
-
class="${this.className} sonic-modal"
|
|
3302
|
-
${$({
|
|
3303
|
-
in: [{ transform: "translateY(100%) scale(1)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }],
|
|
3304
|
-
out: [{ transform: "translateY(20%) scale(1)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }]
|
|
3305
|
-
})}
|
|
3306
|
-
>
|
|
3307
|
-
<div class="sonic-modal-text-container">
|
|
3308
|
-
<div class="sonic-modal-title">${this.title}</div>
|
|
3309
|
-
<div class="sonic-modal-text">${this.text}</div>
|
|
3310
|
-
<slot name="text"></slot>
|
|
3311
|
-
</div>
|
|
3312
|
-
|
|
3313
|
-
<div class="sonic-modal-actions">
|
|
3314
|
-
<sonic-button type="success">Mon action</sonic-button>
|
|
3315
|
-
<slot name="actions"></slot>
|
|
3316
|
-
</div>
|
|
3317
|
-
</div>
|
|
3318
|
-
</div>
|
|
3319
|
-
|
|
3320
|
-
<div
|
|
3321
|
-
class="sonic-modal-overlay"
|
|
3322
|
-
@click="${() => this.hide()}"
|
|
3323
|
-
${$({
|
|
3324
|
-
in: p,
|
|
3325
|
-
out: f
|
|
3326
|
-
})}
|
|
3327
|
-
></div> `;
|
|
3328
|
-
}
|
|
3329
|
-
hide() {
|
|
3330
|
-
this.visibility = "hidden";
|
|
3331
|
-
}
|
|
3332
|
-
static show(conf) {
|
|
3333
|
-
if (!document.querySelector("sonic-modal")) {
|
|
3334
|
-
let ModalComponent2 = document.createElement("sonic-modal");
|
|
3335
|
-
ModalComponent2.setAttribute("styled", new Boolean(conf.styled).toString() || "true");
|
|
3336
|
-
let container = document.querySelector("sonic-theme") || document.body;
|
|
3337
|
-
container.appendChild(ModalComponent2);
|
|
3338
|
-
}
|
|
3339
|
-
let ModalComponent = document.querySelector("sonic-modal");
|
|
3340
|
-
conf.title ? ModalComponent.title = conf.title : "";
|
|
3341
|
-
conf.text ? ModalComponent.text = conf.text : "";
|
|
3342
|
-
ModalComponent.visibility = "visible";
|
|
3343
|
-
}
|
|
3344
|
-
};
|
|
3345
|
-
SonicModal.styles = [
|
|
3346
|
-
r$5`
|
|
3347
|
-
* {
|
|
3348
|
-
box-sizing: border-box;
|
|
3349
|
-
}
|
|
3350
|
-
|
|
3351
|
-
.sonic-modal-wrapper {
|
|
3352
|
-
position: fixed;
|
|
3353
|
-
bottom: 0;
|
|
3354
|
-
left: 0;
|
|
3355
|
-
width: 100%;
|
|
3356
|
-
min-height: 20rem;
|
|
3357
|
-
z-index: 990;
|
|
3358
|
-
text-align: center;
|
|
3359
|
-
align-items: center;
|
|
3360
|
-
display: flex;
|
|
3361
|
-
flex-direction: column;
|
|
3362
|
-
}
|
|
3363
|
-
|
|
3364
|
-
.sonic-modal {
|
|
3365
|
-
width: 100%;
|
|
3366
|
-
background: var(--sc-base);
|
|
3367
|
-
min-height: 20rem;
|
|
3368
|
-
display: flex;
|
|
3369
|
-
flex-direction: column;
|
|
3370
|
-
text-align: center;
|
|
3371
|
-
align-items: center;
|
|
3372
|
-
padding: 1.25rem;
|
|
3373
|
-
box-shadow: var(--sc-shadow-lg);
|
|
3374
|
-
border-radius: var(--sc-rounded-lg) var(--sc-rounded-lg) 0 0;
|
|
3375
|
-
}
|
|
3376
|
-
|
|
3377
|
-
.sonic-modal-text-container {
|
|
3378
|
-
max-height: 20rem;
|
|
3379
|
-
margin-block: auto;
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
|
-
.sonic-modal-title {
|
|
3383
|
-
font-size: 2rem;
|
|
3384
|
-
font-weight: bold;
|
|
3385
|
-
line-height: 1.15;
|
|
3386
|
-
margin-bottom: 0.25em;
|
|
3387
|
-
}
|
|
3388
|
-
.sonic-modal-overlay {
|
|
3389
|
-
background: var(--sc-base-200);
|
|
3390
|
-
inset: 0;
|
|
3391
|
-
z-index: 900;
|
|
3392
|
-
opacity: 0.8;
|
|
3393
|
-
position: fixed;
|
|
3394
|
-
}
|
|
3395
|
-
|
|
3396
|
-
@media (min-width: 768px) {
|
|
3397
|
-
.sonic-modal-wrapper {
|
|
3398
|
-
max-width: 60ch;
|
|
3399
|
-
top: 50%;
|
|
3400
|
-
left: 50%;
|
|
3401
|
-
bottom: auto;
|
|
3402
|
-
right: auto;
|
|
3403
|
-
transform: translateX(-50%) translateY(-50%);
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
.sonic-modal {
|
|
3407
|
-
max-width: 60ch;
|
|
3408
|
-
top: 50%;
|
|
3409
|
-
left: 50%;
|
|
3410
|
-
bottom: auto;
|
|
3411
|
-
right: auto;
|
|
3412
|
-
border-radius: var(--sc-rounded-lg);
|
|
3413
|
-
}
|
|
3414
|
-
}
|
|
3415
|
-
`
|
|
3416
|
-
];
|
|
3417
|
-
__decorateClass$1([
|
|
3418
|
-
e$4({ type: String })
|
|
3419
|
-
], SonicModal.prototype, "className", 2);
|
|
3420
|
-
__decorateClass$1([
|
|
3421
|
-
e$4({ type: String, reflect: false })
|
|
3422
|
-
], SonicModal.prototype, "title", 2);
|
|
3423
|
-
__decorateClass$1([
|
|
3424
|
-
e$4({ type: String })
|
|
3425
|
-
], SonicModal.prototype, "text", 2);
|
|
3426
|
-
__decorateClass$1([
|
|
3427
|
-
t$1()
|
|
3428
|
-
], SonicModal.prototype, "visibility", 2);
|
|
3429
|
-
SonicModal = __decorateClass$1([
|
|
3430
|
-
n$2("sonic-modal")
|
|
3431
|
-
], SonicModal);
|
|
3432
|
-
if (typeof window !== "undefined") {
|
|
3433
|
-
let win = window;
|
|
3434
|
-
win.SonicModal = SonicModal;
|
|
3435
|
-
}
|
|
3436
|
-
const light = r$5`
|
|
3437
|
-
:host([theme="light"]) {
|
|
3438
|
-
--sc-primary: #6366f1;
|
|
3439
|
-
--sc-info: #3b82f6;
|
|
3440
|
-
--sc-danger: #ef4444;
|
|
3441
|
-
--sc-warning: #fb923c;
|
|
3442
|
-
--sc-success: #10b981;
|
|
3443
|
-
|
|
3444
|
-
--sc-primary-content: #fff;
|
|
3445
|
-
--sc-info-content: #fff;
|
|
3446
|
-
--sc-danger-content: #fff;
|
|
3447
|
-
--sc-warning-content: #fff;
|
|
3448
|
-
--sc-success-content: #fff;
|
|
3449
|
-
|
|
3450
|
-
--sc-base: #fff;
|
|
3451
|
-
--sc-base-200: #e5e7eb;
|
|
3452
|
-
--sc-base-300: #4b5563;
|
|
3453
|
-
--sc-base-content: #1f2937;
|
|
3454
|
-
|
|
3455
|
-
--sc-font-family-base: inherit;
|
|
3456
|
-
--sc-headings-font-family: var(--sc-font-family-base);
|
|
3457
|
-
--sc-headings-line-height: 1.25;
|
|
3458
|
-
--sc-headings-font-weight: bold;
|
|
3459
|
-
--sc-headings-text-transform: none;
|
|
3460
|
-
|
|
3461
|
-
--sc-btn-rounded: 0.25em;
|
|
3462
|
-
--sc-rounded: 0.35rem;
|
|
3463
|
-
--sc-rounded-lg: 0.8rem;
|
|
3464
|
-
--sc-placeholder-bg: rgba(17, 24, 39, 0.05);
|
|
3465
|
-
|
|
3466
|
-
--sc-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
|
|
3467
|
-
--sc-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
|
|
3468
|
-
--sc-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.08);
|
|
3469
|
-
}
|
|
3470
|
-
`;
|
|
3471
|
-
const dracula = r$5`
|
|
3472
|
-
:host([theme="dracula"]){
|
|
3473
|
-
|
|
3474
|
-
--sc-primary: #ffb3d9;
|
|
3475
|
-
--sc-info: #8be9fd;
|
|
3476
|
-
--sc-danger: #ef4444;
|
|
3477
|
-
--sc-warning: #ffb86c;
|
|
3478
|
-
--sc-success: #50fa7b;
|
|
3479
|
-
|
|
3480
|
-
--sc-primary-content: #fff;
|
|
3481
|
-
--sc-info-content: #fff;
|
|
3482
|
-
--sc-danger-content: #fff;
|
|
3483
|
-
--sc-warning-content: #fff;
|
|
3484
|
-
--sc-success-content: #fff;
|
|
3485
|
-
|
|
3486
|
-
--sc-base: #302f3d;
|
|
3487
|
-
--sc-base-200: #22212c;
|
|
3488
|
-
--sc-base-300: #1d1e25;
|
|
3489
|
-
--sc-base-content: #d5ccff;
|
|
3490
|
-
|
|
3491
|
-
--sc-font-family-base: inherit;
|
|
3492
|
-
--sc-headings-font-family: var(--sc-font-family-base);
|
|
3493
|
-
--sc-headings-line-height: 1.25;
|
|
3494
|
-
--sc-headings-font-weight: bold;
|
|
3495
|
-
--sc-headings-text-transform: none;
|
|
3496
|
-
|
|
3497
|
-
--sc-btn-rounded: 0.25em;
|
|
3498
|
-
--sc-rounded: 0.35rem;
|
|
3499
|
-
--sc-rounded-lg: 0.8rem;
|
|
3500
|
-
--sc-placeholder-bg: rgba(17, 24, 39, 0.1);
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
--sc-shadow-sm: 0 .125rem .25rem rgba(0,0,0,.05);
|
|
3504
|
-
--sc-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
|
|
3505
|
-
--sc-shadow-lg: 0 1rem 3rem rgba(0,0,0,.08);
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3508
|
-
`;
|
|
3509
|
-
const dark = r$5`
|
|
3510
|
-
:host([theme="dark"]) {
|
|
3511
|
-
--sc-primary: #c395fc;
|
|
3512
|
-
--sc-info: #00b4d8;
|
|
3513
|
-
--sc-danger: #993955;
|
|
3514
|
-
--sc-warning: #E57A44;
|
|
3515
|
-
--sc-success: #1cdecb;
|
|
3516
|
-
|
|
3517
|
-
--sc-primary-content: #212121;
|
|
3518
|
-
--sc-info-content: #212121;
|
|
3519
|
-
--sc-danger-content: #212121;
|
|
3520
|
-
--sc-warning-content: #212121;
|
|
3521
|
-
--sc-success-content: #212121;
|
|
3522
|
-
|
|
3523
|
-
--sc-base: #212121;
|
|
3524
|
-
--sc-base-200: #2e2e2e;
|
|
3525
|
-
--sc-base-300: #373737;
|
|
3526
|
-
--sc-base-content: #e8e8e8;
|
|
3527
|
-
|
|
3528
|
-
--sc-font-family-base: inherit;
|
|
3529
|
-
--sc-headings-font-family: var(--sc-font-family-base);
|
|
3530
|
-
--sc-headings-line-height: 1.25;
|
|
3531
|
-
--sc-headings-font-weight: bold;
|
|
3532
|
-
--sc-headings-text-transform: none;
|
|
3533
|
-
|
|
3534
|
-
--sc-btn-rounded: 5rem;
|
|
3535
|
-
--sc-rounded: 0.35rem;
|
|
3536
|
-
--sc-rounded-lg: 0.8rem;
|
|
3537
|
-
--sc-placeholder-bg: rgba(0, 0, 0, 0.1);
|
|
3538
|
-
|
|
3539
|
-
--sc-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
|
|
3540
|
-
--sc-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
|
|
3541
|
-
--sc-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.08);
|
|
3542
|
-
}
|
|
3543
|
-
`;
|
|
3544
|
-
const bootstrap5 = r$5`
|
|
3545
|
-
:host([theme="bootstrap5"]) {
|
|
3546
|
-
--sc-primary: var(--bs-primary, #6366f1);
|
|
3547
|
-
--sc-info: var(--bs-info, #fb923c);
|
|
3548
|
-
--sc-danger: var(--bs-danger, #fb923c);
|
|
3549
|
-
--sc-warning: var(--bs-warning, #fb923c);
|
|
3550
|
-
--sc-success: var(--bs-success, #6366f1);
|
|
3551
|
-
|
|
3552
|
-
--sc-primary-content: var(--bs-white, #fff);
|
|
3553
|
-
--sc-info-content: var(--bs-white, #fff);
|
|
3554
|
-
--sc-danger-content: var(--bs-white, #fff);
|
|
3555
|
-
--sc-warning-content: var(--bs-white, #fff);
|
|
3556
|
-
--sc-success-content: var(--bs-white, #fff);
|
|
3557
|
-
|
|
3558
|
-
--sc-base: var(--bs-white, #fff);
|
|
3559
|
-
--sc-base-200: var(--bs-light, #e5e7eb);
|
|
3560
|
-
--sc-base-300: #a9adb3;
|
|
3561
|
-
--sc-base-content: var(--bs-dark, #1f2937);
|
|
3562
|
-
|
|
3563
|
-
--sc-font-family-base: inherit;
|
|
3564
|
-
--sc-headings-font-family: var(--sc-font-family-base);
|
|
3565
|
-
--sc-headings-line-height: 1.25;
|
|
3566
|
-
--sc-headings-font-weight: bold;
|
|
3567
|
-
--sc-headings-text-transform: none;
|
|
3568
|
-
|
|
3569
|
-
--sc-btn-rounded: 0.25em;
|
|
3570
|
-
--sc-rounded: 0.35rem;
|
|
3571
|
-
--sc-rounded-lg: 0.8rem;
|
|
3572
|
-
--sc-placeholder-bg: rgba(17, 24, 39, 0.05);
|
|
3573
|
-
|
|
3574
|
-
--sc-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
|
|
3575
|
-
--sc-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
|
|
3576
|
-
--sc-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.08);
|
|
3577
|
-
}
|
|
3578
|
-
`;
|
|
3579
|
-
var __defProp = Object.defineProperty;
|
|
3580
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3581
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
3582
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
3583
|
-
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
3584
|
-
if (decorator = decorators[i2])
|
|
3585
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3586
|
-
if (kind && result)
|
|
3587
|
-
__defProp(target, key, result);
|
|
3588
|
-
return result;
|
|
3589
|
-
};
|
|
3590
|
-
let SonicTheme = class extends Subscriber(s$1) {
|
|
3591
|
-
constructor() {
|
|
3592
|
-
super(...arguments);
|
|
3593
|
-
this.theme = "light";
|
|
3594
|
-
}
|
|
3595
|
-
render() {
|
|
3596
|
-
return p$1`<slot></slot>`;
|
|
3597
|
-
}
|
|
3598
|
-
};
|
|
3599
|
-
SonicTheme.styles = [
|
|
3600
|
-
light,
|
|
3601
|
-
dark,
|
|
3602
|
-
bootstrap5,
|
|
3603
|
-
dracula,
|
|
3604
|
-
r$5`
|
|
3605
|
-
:host {
|
|
3606
|
-
--sc-font-size-root: 1rem;
|
|
3607
|
-
}
|
|
3608
|
-
:host([background]){
|
|
3609
|
-
display:block !important;
|
|
3610
|
-
background:var(--sc-base) !important;
|
|
3611
|
-
}
|
|
3612
|
-
|
|
3613
|
-
`
|
|
3614
|
-
];
|
|
3615
|
-
__decorateClass([
|
|
3616
|
-
e$4({ type: String, reflect: true })
|
|
3617
|
-
], SonicTheme.prototype, "theme", 2);
|
|
3618
|
-
SonicTheme = __decorateClass([
|
|
3619
|
-
n$2("sonic-theme")
|
|
3620
|
-
], SonicTheme);
|