@kya-os/consent 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/index.d.ts +44 -0
- package/dist/bundle/index.d.ts.map +1 -0
- package/dist/bundle/index.js +45 -0
- package/dist/bundle/index.js.map +1 -0
- package/dist/bundle/inline.d.ts +18 -0
- package/dist/bundle/inline.d.ts.map +1 -0
- package/dist/bundle/inline.js +18 -0
- package/dist/bundle/inline.js.map +1 -0
- package/dist/bundle/shell.d.ts +91 -0
- package/dist/bundle/shell.d.ts.map +1 -0
- package/dist/bundle/shell.js +282 -0
- package/dist/bundle/shell.js.map +1 -0
- package/dist/components/consent-button.d.ts +61 -0
- package/dist/components/consent-button.d.ts.map +1 -0
- package/dist/components/consent-button.js +177 -0
- package/dist/components/consent-button.js.map +1 -0
- package/dist/components/consent-checkbox.d.ts +61 -0
- package/dist/components/consent-checkbox.d.ts.map +1 -0
- package/dist/components/consent-checkbox.js +220 -0
- package/dist/components/consent-checkbox.js.map +1 -0
- package/dist/components/consent-input.d.ts +91 -0
- package/dist/components/consent-input.d.ts.map +1 -0
- package/dist/components/consent-input.js +332 -0
- package/dist/components/consent-input.js.map +1 -0
- package/dist/components/consent-oauth-button.d.ts +87 -0
- package/dist/components/consent-oauth-button.d.ts.map +1 -0
- package/dist/components/consent-oauth-button.js +389 -0
- package/dist/components/consent-oauth-button.js.map +1 -0
- package/dist/components/consent-otp-input.d.ts +92 -0
- package/dist/components/consent-otp-input.d.ts.map +1 -0
- package/dist/components/consent-otp-input.js +378 -0
- package/dist/components/consent-otp-input.js.map +1 -0
- package/dist/components/consent-permissions.d.ts +104 -0
- package/dist/components/consent-permissions.d.ts.map +1 -0
- package/dist/components/consent-permissions.js +430 -0
- package/dist/components/consent-permissions.js.map +1 -0
- package/dist/components/consent-shell.d.ts +72 -0
- package/dist/components/consent-shell.d.ts.map +1 -0
- package/dist/components/consent-shell.js +231 -0
- package/dist/components/consent-shell.js.map +1 -0
- package/dist/components/consent-terms.d.ts +89 -0
- package/dist/components/consent-terms.d.ts.map +1 -0
- package/dist/components/consent-terms.js +284 -0
- package/dist/components/consent-terms.js.map +1 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +23 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/mcp-consent.d.ts +152 -0
- package/dist/components/mcp-consent.d.ts.map +1 -0
- package/dist/components/mcp-consent.js +874 -0
- package/dist/components/mcp-consent.js.map +1 -0
- package/dist/consent.js +3737 -0
- package/dist/consent.min.js +1564 -0
- package/dist/constants/auth-modes.d.ts +7 -2
- package/dist/constants/auth-modes.d.ts.map +1 -1
- package/dist/constants/auth-modes.js +28 -36
- package/dist/constants/auth-modes.js.map +1 -1
- package/dist/constants/colors.js +1 -4
- package/dist/constants/colors.js.map +1 -1
- package/dist/constants/defaults.d.ts +1 -1
- package/dist/constants/defaults.d.ts.map +1 -1
- package/dist/constants/defaults.js +16 -19
- package/dist/constants/defaults.js.map +1 -1
- package/dist/constants/index.d.ts +3 -3
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +3 -26
- package/dist/constants/index.js.map +1 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -23
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +123 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +154 -0
- package/dist/react/index.js.map +1 -0
- package/dist/resolution/index.d.ts +3 -3
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/resolution/index.js +3 -19
- package/dist/resolution/index.js.map +1 -1
- package/dist/resolution/resolve-branding.d.ts +1 -1
- package/dist/resolution/resolve-branding.d.ts.map +1 -1
- package/dist/resolution/resolve-branding.js +14 -24
- package/dist/resolution/resolve-branding.js.map +1 -1
- package/dist/resolution/resolve-config.d.ts +2 -2
- package/dist/resolution/resolve-config.d.ts.map +1 -1
- package/dist/resolution/resolve-config.js +57 -53
- package/dist/resolution/resolve-config.js.map +1 -1
- package/dist/resolution/resolve-copy.d.ts +2 -2
- package/dist/resolution/resolve-copy.d.ts.map +1 -1
- package/dist/resolution/resolve-copy.js +35 -43
- package/dist/resolution/resolve-copy.js.map +1 -1
- package/dist/schemas/api.schemas.d.ts +7 -4
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/api.schemas.js +70 -74
- package/dist/schemas/api.schemas.js.map +1 -1
- package/dist/schemas/branding.schemas.js +17 -20
- package/dist/schemas/branding.schemas.js.map +1 -1
- package/dist/schemas/config.schemas.d.ts +1 -1
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/schemas/config.schemas.js +64 -70
- package/dist/schemas/config.schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +4 -4
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +4 -20
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/modes.schemas.js +60 -63
- package/dist/schemas/modes.schemas.js.map +1 -1
- package/dist/security/escape.d.ts.map +1 -1
- package/dist/security/escape.js +12 -17
- package/dist/security/escape.js.map +1 -1
- package/dist/security/index.d.ts +2 -2
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +2 -18
- package/dist/security/index.js.map +1 -1
- package/dist/security/validators.js +9 -20
- package/dist/security/validators.js.map +1 -1
- package/dist/styles/css-variables.d.ts +1 -1
- package/dist/styles/css-variables.d.ts.map +1 -1
- package/dist/styles/css-variables.js +18 -27
- package/dist/styles/css-variables.js.map +1 -1
- package/dist/styles/index.d.ts +3 -3
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +3 -19
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/stylesheet.d.ts +1 -1
- package/dist/styles/stylesheet.d.ts.map +1 -1
- package/dist/styles/stylesheet.js +20 -27
- package/dist/styles/stylesheet.js.map +1 -1
- package/dist/styles/tokens.js +1 -4
- package/dist/styles/tokens.js.map +1 -1
- package/dist/templates/base/base-template.d.ts +3 -3
- package/dist/templates/base/base-template.d.ts.map +1 -1
- package/dist/templates/base/base-template.js +31 -35
- package/dist/templates/base/base-template.js.map +1 -1
- package/dist/templates/base/components.js +49 -65
- package/dist/templates/base/components.js.map +1 -1
- package/dist/templates/base/index.d.ts +2 -2
- package/dist/templates/base/index.d.ts.map +1 -1
- package/dist/templates/base/index.js +2 -20
- package/dist/templates/base/index.js.map +1 -1
- package/dist/templates/index.d.ts +9 -9
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +9 -25
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/modes/consent-only.template.d.ts +2 -2
- package/dist/templates/modes/consent-only.template.d.ts.map +1 -1
- package/dist/templates/modes/consent-only.template.js +11 -15
- package/dist/templates/modes/consent-only.template.js.map +1 -1
- package/dist/templates/modes/credentials.template.d.ts +4 -4
- package/dist/templates/modes/credentials.template.d.ts.map +1 -1
- package/dist/templates/modes/credentials.template.js +20 -24
- package/dist/templates/modes/credentials.template.js.map +1 -1
- package/dist/templates/modes/index.d.ts +6 -6
- package/dist/templates/modes/index.d.ts.map +1 -1
- package/dist/templates/modes/index.js +6 -16
- package/dist/templates/modes/index.js.map +1 -1
- package/dist/templates/modes/magic-link.template.d.ts +2 -2
- package/dist/templates/modes/magic-link.template.d.ts.map +1 -1
- package/dist/templates/modes/magic-link.template.js +14 -18
- package/dist/templates/modes/magic-link.template.js.map +1 -1
- package/dist/templates/modes/oauth.template.d.ts +2 -2
- package/dist/templates/modes/oauth.template.d.ts.map +1 -1
- package/dist/templates/modes/oauth.template.js +21 -25
- package/dist/templates/modes/oauth.template.js.map +1 -1
- package/dist/templates/modes/otp.template.d.ts +2 -2
- package/dist/templates/modes/otp.template.d.ts.map +1 -1
- package/dist/templates/modes/otp.template.js +17 -21
- package/dist/templates/modes/otp.template.js.map +1 -1
- package/dist/templates/modes/success.template.d.ts +2 -2
- package/dist/templates/modes/success.template.d.ts.map +1 -1
- package/dist/templates/modes/success.template.js +24 -29
- package/dist/templates/modes/success.template.js.map +1 -1
- package/dist/templates/registry.d.ts +4 -4
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +30 -38
- package/dist/templates/registry.js.map +1 -1
- package/dist/types/api.types.d.ts +6 -5
- package/dist/types/api.types.d.ts.map +1 -1
- package/dist/types/api.types.js +1 -2
- package/dist/types/api.types.js.map +1 -1
- package/dist/types/branding.types.js +1 -2
- package/dist/types/branding.types.js.map +1 -1
- package/dist/types/config.types.d.ts +5 -5
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/types/config.types.js +1 -2
- package/dist/types/config.types.js.map +1 -1
- package/dist/types/copy.types.js +1 -2
- package/dist/types/copy.types.js.map +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -22
- package/dist/types/index.js.map +1 -1
- package/dist/types/modes.types.js +1 -4
- package/dist/types/modes.types.js.map +1 -1
- package/dist/types/page.types.d.ts +6 -6
- package/dist/types/page.types.d.ts.map +1 -1
- package/dist/types/page.types.js +1 -2
- package/dist/types/page.types.js.map +1 -1
- package/package.json +41 -4
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Shell Web Component
|
|
3
|
+
*
|
|
4
|
+
* The main container for consent pages. Provides:
|
|
5
|
+
* - Card-like container with shadow and rounded corners
|
|
6
|
+
* - Header section with logo and title
|
|
7
|
+
* - Content area for auth-specific content
|
|
8
|
+
* - Footer for action buttons
|
|
9
|
+
*
|
|
10
|
+
* @module components/consent-shell
|
|
11
|
+
*/
|
|
12
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
import { LitElement, html, css } from 'lit';
|
|
19
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
20
|
+
/**
|
|
21
|
+
* ConsentShell - Container component for consent pages
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```html
|
|
25
|
+
* <consent-shell
|
|
26
|
+
* page-title="Permission Request"
|
|
27
|
+
* logo-url="https://example.com/logo.png"
|
|
28
|
+
* company-name="Acme Corp"
|
|
29
|
+
* primary-color="#2563EB"
|
|
30
|
+
* >
|
|
31
|
+
* <div slot="content">
|
|
32
|
+
* <!-- Auth-specific content -->
|
|
33
|
+
* </div>
|
|
34
|
+
* <div slot="footer">
|
|
35
|
+
* <consent-button variant="secondary">Cancel</consent-button>
|
|
36
|
+
* <consent-button variant="primary">Allow</consent-button>
|
|
37
|
+
* </div>
|
|
38
|
+
* </consent-shell>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @slot content - Main content area
|
|
42
|
+
* @slot footer - Action buttons area
|
|
43
|
+
* @csspart container - The outer card container
|
|
44
|
+
* @csspart header - The header section
|
|
45
|
+
* @csspart content - The content section
|
|
46
|
+
* @csspart footer - The footer section
|
|
47
|
+
*/
|
|
48
|
+
let ConsentShell = class ConsentShell extends LitElement {
|
|
49
|
+
constructor() {
|
|
50
|
+
super(...arguments);
|
|
51
|
+
/**
|
|
52
|
+
* Page title (renamed from 'title' to avoid conflict with HTMLElement.title)
|
|
53
|
+
*/
|
|
54
|
+
this.pageTitle = 'Permission Request';
|
|
55
|
+
/**
|
|
56
|
+
* Primary brand color
|
|
57
|
+
*/
|
|
58
|
+
this.primaryColor = '#2563EB';
|
|
59
|
+
/**
|
|
60
|
+
* Secondary brand color
|
|
61
|
+
*/
|
|
62
|
+
this.secondaryColor = '#DBEAFE';
|
|
63
|
+
}
|
|
64
|
+
renderLogo() {
|
|
65
|
+
if (this.logoUrl) {
|
|
66
|
+
return html `
|
|
67
|
+
<img
|
|
68
|
+
class="logo"
|
|
69
|
+
src=${this.logoUrl}
|
|
70
|
+
alt=${this.companyName || 'Company logo'}
|
|
71
|
+
/>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
// Default shield icon
|
|
75
|
+
return html `
|
|
76
|
+
<div class="default-icon">
|
|
77
|
+
<svg
|
|
78
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
79
|
+
viewBox="0 0 24 24"
|
|
80
|
+
fill="none"
|
|
81
|
+
stroke="currentColor"
|
|
82
|
+
stroke-width="2"
|
|
83
|
+
stroke-linecap="round"
|
|
84
|
+
stroke-linejoin="round"
|
|
85
|
+
>
|
|
86
|
+
<path
|
|
87
|
+
d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"
|
|
88
|
+
fill="currentColor"
|
|
89
|
+
opacity="0.2"
|
|
90
|
+
/>
|
|
91
|
+
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
|
|
92
|
+
</svg>
|
|
93
|
+
</div>
|
|
94
|
+
`;
|
|
95
|
+
}
|
|
96
|
+
updated(changedProperties) {
|
|
97
|
+
// Update CSS variables when colors change
|
|
98
|
+
if (changedProperties.has('primaryColor') ||
|
|
99
|
+
changedProperties.has('secondaryColor')) {
|
|
100
|
+
this.style.setProperty('--consent-primary', this.primaryColor);
|
|
101
|
+
this.style.setProperty('--consent-secondary', this.secondaryColor);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
return html `
|
|
106
|
+
<div class="container" part="container">
|
|
107
|
+
<header class="header" part="header">
|
|
108
|
+
${this.renderLogo()}
|
|
109
|
+
${this.companyName
|
|
110
|
+
? html `<div class="company-name">${this.companyName}</div>`
|
|
111
|
+
: null}
|
|
112
|
+
<h1 class="title">${this.pageTitle}</h1>
|
|
113
|
+
</header>
|
|
114
|
+
|
|
115
|
+
<div class="content" part="content">
|
|
116
|
+
<slot name="content"></slot>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<footer class="footer" part="footer">
|
|
120
|
+
<slot name="footer"></slot>
|
|
121
|
+
</footer>
|
|
122
|
+
</div>
|
|
123
|
+
`;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
ConsentShell.styles = css `
|
|
127
|
+
:host {
|
|
128
|
+
display: block;
|
|
129
|
+
/* System font stack with font smoothing for crisp text */
|
|
130
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
131
|
+
'Helvetica Neue', Arial, sans-serif;
|
|
132
|
+
-webkit-font-smoothing: antialiased;
|
|
133
|
+
-moz-osx-font-smoothing: grayscale;
|
|
134
|
+
/* Allow customization via CSS variables */
|
|
135
|
+
--_primary: var(--consent-primary, #2563eb);
|
|
136
|
+
--_secondary: var(--consent-secondary, #dbeafe);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Container - matches AgentShield PreviewShell exactly */
|
|
140
|
+
.container {
|
|
141
|
+
background: white;
|
|
142
|
+
border-radius: 20px;
|
|
143
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
144
|
+
box-shadow:
|
|
145
|
+
0 20px 25px -5px rgba(0, 0, 0, 0.1),
|
|
146
|
+
0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
max-width: 512px;
|
|
149
|
+
width: 100%;
|
|
150
|
+
margin: 0 auto;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Header */
|
|
154
|
+
.header {
|
|
155
|
+
padding: 1.25rem 2rem 0;
|
|
156
|
+
text-align: center;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.logo {
|
|
160
|
+
max-height: 48px;
|
|
161
|
+
max-width: 200px;
|
|
162
|
+
margin-bottom: 0.5rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.company-name {
|
|
166
|
+
font-size: 0.875rem;
|
|
167
|
+
color: #6b7280;
|
|
168
|
+
margin-bottom: 0.5rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.title {
|
|
172
|
+
font-size: 1.5rem;
|
|
173
|
+
font-weight: 700;
|
|
174
|
+
color: #333333;
|
|
175
|
+
margin: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Content */
|
|
179
|
+
.content {
|
|
180
|
+
padding: 1rem 2rem 2rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Footer */
|
|
184
|
+
.footer {
|
|
185
|
+
padding: 0 2rem 2rem;
|
|
186
|
+
display: flex;
|
|
187
|
+
gap: 0.75rem;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.footer ::slotted(*) {
|
|
191
|
+
flex: 1;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Default icon when no logo */
|
|
195
|
+
.default-icon {
|
|
196
|
+
width: 48px;
|
|
197
|
+
height: 48px;
|
|
198
|
+
margin: 0 auto 0.5rem;
|
|
199
|
+
background: var(--_secondary);
|
|
200
|
+
border-radius: 12px;
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.default-icon svg {
|
|
207
|
+
width: 24px;
|
|
208
|
+
height: 24px;
|
|
209
|
+
color: var(--_primary);
|
|
210
|
+
}
|
|
211
|
+
`;
|
|
212
|
+
__decorate([
|
|
213
|
+
property({ type: String, attribute: 'page-title' })
|
|
214
|
+
], ConsentShell.prototype, "pageTitle", void 0);
|
|
215
|
+
__decorate([
|
|
216
|
+
property({ type: String, attribute: 'logo-url' })
|
|
217
|
+
], ConsentShell.prototype, "logoUrl", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
property({ type: String, attribute: 'company-name' })
|
|
220
|
+
], ConsentShell.prototype, "companyName", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
property({ type: String, attribute: 'primary-color' })
|
|
223
|
+
], ConsentShell.prototype, "primaryColor", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
property({ type: String, attribute: 'secondary-color' })
|
|
226
|
+
], ConsentShell.prototype, "secondaryColor", void 0);
|
|
227
|
+
ConsentShell = __decorate([
|
|
228
|
+
customElement('consent-shell')
|
|
229
|
+
], ConsentShell);
|
|
230
|
+
export { ConsentShell };
|
|
231
|
+
//# sourceMappingURL=consent-shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-shell.js","sourceRoot":"","sources":["../../src/components/consent-shell.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QACL;;WAEG;QAEH,cAAS,GAAG,oBAAoB,CAAC;QAcjC;;WAEG;QAEH,iBAAY,GAAG,SAAS,CAAC;QAEzB;;WAEG;QAEH,mBAAc,GAAG,SAAS,CAAC;IA2J7B,CAAC;IAlES,UAAU;QAChB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,IAAI,CAAA;;;gBAGD,IAAI,CAAC,OAAO;gBACZ,IAAI,CAAC,WAAW,IAAI,cAAc;;OAE3C,CAAC;QACJ,CAAC;QAED,sBAAsB;QACtB,OAAO,IAAI,CAAA;;;;;;;;;;;;;;;;;;;KAmBV,CAAC;IACJ,CAAC;IAEkB,OAAO,CAAC,iBAAuC;QAChE,0CAA0C;QAC1C,IACE,iBAAiB,CAAC,GAAG,CAAC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|
|
1
|
+
/**
|
|
2
|
+
* Consent Terms Web Component
|
|
3
|
+
*
|
|
4
|
+
* A specialized checkbox for terms acceptance with link support.
|
|
5
|
+
* Implements Form Associated Custom Elements for proper form participation.
|
|
6
|
+
*
|
|
7
|
+
* @module components/consent-terms
|
|
8
|
+
*/
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
/**
|
|
11
|
+
* ConsentTerms - Terms acceptance checkbox with link
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <consent-terms
|
|
16
|
+
* name="termsAccepted"
|
|
17
|
+
* text="Terms and Conditions"
|
|
18
|
+
* url="https://example.com/terms"
|
|
19
|
+
* required
|
|
20
|
+
* ></consent-terms>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @fires change - Fired when checkbox state changes
|
|
24
|
+
* @csspart checkbox - The checkbox input element
|
|
25
|
+
* @csspart label - The label wrapper
|
|
26
|
+
* @csspart link - The terms link
|
|
27
|
+
* @cssprop --consent-primary - Primary brand color for checked state
|
|
28
|
+
*/
|
|
29
|
+
export declare class ConsentTerms extends LitElement {
|
|
30
|
+
static formAssociated: boolean;
|
|
31
|
+
private internals;
|
|
32
|
+
constructor();
|
|
33
|
+
/**
|
|
34
|
+
* Form field name
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* Terms text to display
|
|
39
|
+
*/
|
|
40
|
+
text: string;
|
|
41
|
+
/**
|
|
42
|
+
* URL for terms page
|
|
43
|
+
*/
|
|
44
|
+
url?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Privacy policy text (optional second link)
|
|
47
|
+
*/
|
|
48
|
+
privacyText?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Privacy policy URL
|
|
51
|
+
*/
|
|
52
|
+
privacyUrl?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Prefix text before the links
|
|
55
|
+
*/
|
|
56
|
+
labelPrefix: string;
|
|
57
|
+
/**
|
|
58
|
+
* Conjunction between terms and privacy links
|
|
59
|
+
*/
|
|
60
|
+
conjunction: string;
|
|
61
|
+
/**
|
|
62
|
+
* Checked state
|
|
63
|
+
*/
|
|
64
|
+
checked: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Required for form validation
|
|
67
|
+
*/
|
|
68
|
+
required: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Disabled state
|
|
71
|
+
*/
|
|
72
|
+
disabled: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Value when checked
|
|
75
|
+
*/
|
|
76
|
+
value: string;
|
|
77
|
+
static styles: import("lit").CSSResult;
|
|
78
|
+
protected updated(changedProperties: Map<string, unknown>): void;
|
|
79
|
+
private updateFormValue;
|
|
80
|
+
private handleChange;
|
|
81
|
+
private renderLink;
|
|
82
|
+
render(): import("lit").TemplateResult<1>;
|
|
83
|
+
}
|
|
84
|
+
declare global {
|
|
85
|
+
interface HTMLElementTagNameMap {
|
|
86
|
+
'consent-terms': ConsentTerms;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=consent-terms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-terms.d.ts","sourceRoot":"","sources":["../../src/components/consent-terms.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAGrD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,YAAa,SAAQ,UAAU;IAE1C,MAAM,CAAC,cAAc,UAAQ;IAE7B,OAAO,CAAC,SAAS,CAAmB;;IAOpC;;OAEG;IAEH,IAAI,SAAmB;IAEvB;;OAEG;IAEH,IAAI,SAA0B;IAE9B;;OAEG;IAEH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IAEH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IAEH,WAAW,SAAoB;IAE/B;;OAEG;IAEH,WAAW,SAAS;IAEpB;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IAEH,QAAQ,UAAQ;IAEhB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,KAAK,SAAc;IAEnB,OAAgB,MAAM,0BA2GpB;cAEiB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAMlE,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,UAAU;IAcT,MAAM;CA4BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Terms Web Component
|
|
3
|
+
*
|
|
4
|
+
* A specialized checkbox for terms acceptance with link support.
|
|
5
|
+
* Implements Form Associated Custom Elements for proper form participation.
|
|
6
|
+
*
|
|
7
|
+
* @module components/consent-terms
|
|
8
|
+
*/
|
|
9
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
10
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
+
};
|
|
15
|
+
import { LitElement, html, css, nothing } from 'lit';
|
|
16
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
17
|
+
/**
|
|
18
|
+
* ConsentTerms - Terms acceptance checkbox with link
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <consent-terms
|
|
23
|
+
* name="termsAccepted"
|
|
24
|
+
* text="Terms and Conditions"
|
|
25
|
+
* url="https://example.com/terms"
|
|
26
|
+
* required
|
|
27
|
+
* ></consent-terms>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @fires change - Fired when checkbox state changes
|
|
31
|
+
* @csspart checkbox - The checkbox input element
|
|
32
|
+
* @csspart label - The label wrapper
|
|
33
|
+
* @csspart link - The terms link
|
|
34
|
+
* @cssprop --consent-primary - Primary brand color for checked state
|
|
35
|
+
*/
|
|
36
|
+
let ConsentTerms = class ConsentTerms extends LitElement {
|
|
37
|
+
constructor() {
|
|
38
|
+
super();
|
|
39
|
+
/**
|
|
40
|
+
* Form field name
|
|
41
|
+
*/
|
|
42
|
+
this.name = 'termsAccepted';
|
|
43
|
+
/**
|
|
44
|
+
* Terms text to display
|
|
45
|
+
*/
|
|
46
|
+
this.text = 'Terms and Conditions';
|
|
47
|
+
/**
|
|
48
|
+
* Prefix text before the links
|
|
49
|
+
*/
|
|
50
|
+
this.labelPrefix = 'I agree to the';
|
|
51
|
+
/**
|
|
52
|
+
* Conjunction between terms and privacy links
|
|
53
|
+
*/
|
|
54
|
+
this.conjunction = 'and';
|
|
55
|
+
/**
|
|
56
|
+
* Checked state
|
|
57
|
+
*/
|
|
58
|
+
this.checked = false;
|
|
59
|
+
/**
|
|
60
|
+
* Required for form validation
|
|
61
|
+
*/
|
|
62
|
+
this.required = true;
|
|
63
|
+
/**
|
|
64
|
+
* Disabled state
|
|
65
|
+
*/
|
|
66
|
+
this.disabled = false;
|
|
67
|
+
/**
|
|
68
|
+
* Value when checked
|
|
69
|
+
*/
|
|
70
|
+
this.value = 'accepted';
|
|
71
|
+
this.internals = this.attachInternals();
|
|
72
|
+
}
|
|
73
|
+
updated(changedProperties) {
|
|
74
|
+
if (changedProperties.has('checked') || changedProperties.has('value')) {
|
|
75
|
+
this.updateFormValue();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
updateFormValue() {
|
|
79
|
+
if (this.checked) {
|
|
80
|
+
this.internals.setFormValue(this.value);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
this.internals.setFormValue(null);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
handleChange(e) {
|
|
87
|
+
const input = e.target;
|
|
88
|
+
this.checked = input.checked;
|
|
89
|
+
this.updateFormValue();
|
|
90
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
91
|
+
detail: { checked: this.checked, value: this.value },
|
|
92
|
+
bubbles: true,
|
|
93
|
+
composed: true,
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
renderLink(text, url) {
|
|
97
|
+
if (url) {
|
|
98
|
+
return html `<a
|
|
99
|
+
href=${url}
|
|
100
|
+
target="_blank"
|
|
101
|
+
rel="noopener noreferrer"
|
|
102
|
+
part="link"
|
|
103
|
+
@click=${(e) => e.stopPropagation()}
|
|
104
|
+
>${text}</a
|
|
105
|
+
>`;
|
|
106
|
+
}
|
|
107
|
+
return html `<span>${text}</span>`;
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
const hasPrivacy = this.privacyText && this.privacyUrl;
|
|
111
|
+
return html `
|
|
112
|
+
<label part="label">
|
|
113
|
+
<input
|
|
114
|
+
part="checkbox"
|
|
115
|
+
type="checkbox"
|
|
116
|
+
name=${this.name}
|
|
117
|
+
.value=${this.value}
|
|
118
|
+
.checked=${this.checked}
|
|
119
|
+
?required=${this.required}
|
|
120
|
+
?disabled=${this.disabled}
|
|
121
|
+
@change=${this.handleChange}
|
|
122
|
+
/>
|
|
123
|
+
<span class="text">
|
|
124
|
+
${this.labelPrefix} ${this.renderLink(this.text, this.url)}
|
|
125
|
+
${hasPrivacy
|
|
126
|
+
? html `
|
|
127
|
+
${this.conjunction}
|
|
128
|
+
${this.renderLink(this.privacyText, this.privacyUrl)}
|
|
129
|
+
`
|
|
130
|
+
: nothing}
|
|
131
|
+
${this.required ? html `<span class="required">*</span>` : nothing}
|
|
132
|
+
</span>
|
|
133
|
+
</label>
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
// Enable form association
|
|
138
|
+
ConsentTerms.formAssociated = true;
|
|
139
|
+
ConsentTerms.styles = css `
|
|
140
|
+
:host {
|
|
141
|
+
display: block;
|
|
142
|
+
--_primary: var(--consent-primary, #2563eb);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
label {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: flex-start;
|
|
148
|
+
gap: 0.75rem;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
font-size: 0.875rem;
|
|
151
|
+
color: #374151;
|
|
152
|
+
line-height: 1.5;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host([disabled]) label {
|
|
156
|
+
cursor: not-allowed;
|
|
157
|
+
opacity: 0.6;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Custom checkbox styling - matches AgentShield exactly */
|
|
161
|
+
input[type='checkbox'] {
|
|
162
|
+
appearance: none;
|
|
163
|
+
-webkit-appearance: none;
|
|
164
|
+
margin: 0;
|
|
165
|
+
|
|
166
|
+
/* Size - matches AgentShield w-4 h-4 */
|
|
167
|
+
width: 1rem;
|
|
168
|
+
height: 1rem;
|
|
169
|
+
min-width: 1rem;
|
|
170
|
+
margin-top: 0.125rem;
|
|
171
|
+
|
|
172
|
+
/* Border */
|
|
173
|
+
border: 1px solid #d1d5db;
|
|
174
|
+
border-radius: 0.25rem;
|
|
175
|
+
|
|
176
|
+
/* Background */
|
|
177
|
+
background-color: white;
|
|
178
|
+
|
|
179
|
+
/* Interaction */
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
position: relative;
|
|
182
|
+
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
input[type='checkbox']:hover:not(:disabled) {
|
|
186
|
+
border-color: var(--_primary);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
input[type='checkbox']:focus-visible {
|
|
190
|
+
outline: 2px solid var(--_primary);
|
|
191
|
+
outline-offset: 2px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Checked state */
|
|
195
|
+
input[type='checkbox']:checked {
|
|
196
|
+
background-color: var(--_primary);
|
|
197
|
+
border-color: var(--_primary);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Checkmark */
|
|
201
|
+
input[type='checkbox']:checked::after {
|
|
202
|
+
content: '';
|
|
203
|
+
position: absolute;
|
|
204
|
+
left: 4px;
|
|
205
|
+
top: 1px;
|
|
206
|
+
width: 5px;
|
|
207
|
+
height: 9px;
|
|
208
|
+
border: solid white;
|
|
209
|
+
border-width: 0 2px 2px 0;
|
|
210
|
+
transform: rotate(45deg);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Disabled */
|
|
214
|
+
input[type='checkbox']:disabled {
|
|
215
|
+
cursor: not-allowed;
|
|
216
|
+
opacity: 0.5;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Text wrapper */
|
|
220
|
+
.text {
|
|
221
|
+
flex: 1;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Links */
|
|
225
|
+
a {
|
|
226
|
+
color: var(--_primary);
|
|
227
|
+
text-decoration: underline;
|
|
228
|
+
text-underline-offset: 2px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
a:hover {
|
|
232
|
+
text-decoration: none;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
a:focus-visible {
|
|
236
|
+
outline: 2px solid var(--_primary);
|
|
237
|
+
outline-offset: 2px;
|
|
238
|
+
border-radius: 2px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* Required indicator */
|
|
242
|
+
.required {
|
|
243
|
+
color: #ef4444;
|
|
244
|
+
margin-left: 0.125rem;
|
|
245
|
+
}
|
|
246
|
+
`;
|
|
247
|
+
__decorate([
|
|
248
|
+
property({ type: String })
|
|
249
|
+
], ConsentTerms.prototype, "name", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
property({ type: String })
|
|
252
|
+
], ConsentTerms.prototype, "text", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
property({ type: String })
|
|
255
|
+
], ConsentTerms.prototype, "url", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
property({ type: String, attribute: 'privacy-text' })
|
|
258
|
+
], ConsentTerms.prototype, "privacyText", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: String, attribute: 'privacy-url' })
|
|
261
|
+
], ConsentTerms.prototype, "privacyUrl", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
property({ type: String, attribute: 'label-prefix' })
|
|
264
|
+
], ConsentTerms.prototype, "labelPrefix", void 0);
|
|
265
|
+
__decorate([
|
|
266
|
+
property({ type: String })
|
|
267
|
+
], ConsentTerms.prototype, "conjunction", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
property({ type: Boolean, reflect: true })
|
|
270
|
+
], ConsentTerms.prototype, "checked", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
property({ type: Boolean })
|
|
273
|
+
], ConsentTerms.prototype, "required", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
property({ type: Boolean, reflect: true })
|
|
276
|
+
], ConsentTerms.prototype, "disabled", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
property({ type: String })
|
|
279
|
+
], ConsentTerms.prototype, "value", void 0);
|
|
280
|
+
ConsentTerms = __decorate([
|
|
281
|
+
customElement('consent-terms')
|
|
282
|
+
], ConsentTerms);
|
|
283
|
+
export { ConsentTerms };
|
|
284
|
+
//# sourceMappingURL=consent-terms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-terms.js","sourceRoot":"","sources":["../../src/components/consent-terms.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;;;;;;AAEH,O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|
3
|
+
*
|
|
4
|
+
* Lit-based web components for consent pages.
|
|
5
|
+
* Works in browser, React (via @lit/react), and SSR.
|
|
6
|
+
*
|
|
7
|
+
* @module components
|
|
8
|
+
*/
|
|
9
|
+
export { ConsentButton, type ButtonVariant } from './consent-button.js';
|
|
10
|
+
export { ConsentCheckbox } from './consent-checkbox.js';
|
|
11
|
+
export { ConsentInput, type InputType } from './consent-input.js';
|
|
12
|
+
export { ConsentShell } from './consent-shell.js';
|
|
13
|
+
export { ConsentPermissions, type PermissionItem, } from './consent-permissions.js';
|
|
14
|
+
export { ConsentTerms } from './consent-terms.js';
|
|
15
|
+
export { ConsentOAuthButton, type OAuthProvider, } from './consent-oauth-button.js';
|
|
16
|
+
export { ConsentOTPInput } from './consent-otp-input.js';
|
|
17
|
+
export { McpConsent, type OAuthIdentity, type ConsentApproveDetail, type ConsentErrorDetail, } from './mcp-consent.js';
|
|
18
|
+
export { html, css } from 'lit';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EACL,kBAAkB,EAClB,KAAK,cAAc,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consent Web Components
|
|
3
|
+
*
|
|
4
|
+
* Lit-based web components for consent pages.
|
|
5
|
+
* Works in browser, React (via @lit/react), and SSR.
|
|
6
|
+
*
|
|
7
|
+
* @module components
|
|
8
|
+
*/
|
|
9
|
+
// Core Components (use .js extension for ESM browser compatibility)
|
|
10
|
+
export { ConsentButton } from './consent-button.js';
|
|
11
|
+
export { ConsentCheckbox } from './consent-checkbox.js';
|
|
12
|
+
export { ConsentInput } from './consent-input.js';
|
|
13
|
+
export { ConsentShell } from './consent-shell.js';
|
|
14
|
+
// Extended Components
|
|
15
|
+
export { ConsentPermissions, } from './consent-permissions.js';
|
|
16
|
+
export { ConsentTerms } from './consent-terms.js';
|
|
17
|
+
export { ConsentOAuthButton, } from './consent-oauth-button.js';
|
|
18
|
+
export { ConsentOTPInput } from './consent-otp-input.js';
|
|
19
|
+
// Composite Component (Full Consent Flow)
|
|
20
|
+
export { McpConsent, } from './mcp-consent.js';
|
|
21
|
+
// Re-export Lit utilities that consumers might need
|
|
22
|
+
export { html, css } from 'lit';
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oEAAoE;AACpE,OAAO,EAAE,aAAa,EAAsB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAkB,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,sBAAsB;AACtB,OAAO,EACL,kBAAkB,GAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,kBAAkB,GAEnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,0CAA0C;AAC1C,OAAO,EACL,UAAU,GAIX,MAAM,kBAAkB,CAAC;AAE1B,oDAAoD;AACpD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC"}
|