underpost 2.6.3 → 2.7.2
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/.dockerignore +13 -13
- package/.env.development +7 -7
- package/.env.production +7 -7
- package/.env.test +7 -7
- package/.github/workflows/publish.yml +26 -0
- package/.nycrc +9 -9
- package/.prettierignore +12 -12
- package/.prettierrc +9 -9
- package/.vscode/extensions.json +72 -72
- package/.vscode/settings.json +100 -99
- package/AUTHORS.md +10 -0
- package/CHANGELOG.md +91 -0
- package/Dockerfile +89 -89
- package/LICENSE +21 -21
- package/README.md +96 -96
- package/bin/db.js +172 -119
- package/bin/deploy.js +582 -626
- package/bin/dns.js +1 -1
- package/bin/file.js +92 -92
- package/bin/index.js +53 -34
- package/bin/install.js +398 -357
- package/bin/shortcut.js +44 -44
- package/bin/ssl.js +65 -61
- package/bin/util.js +182 -182
- package/bin/vs.js +35 -35
- package/conf.js +251 -249
- package/docker-compose.yml +67 -67
- package/jsconfig.json +7 -7
- package/jsdoc.json +32 -32
- package/nodemon.json +6 -6
- package/package.json +137 -128
- package/prometheus.yml +36 -36
- package/setup.sh +24 -24
- package/src/api/core/core.controller.js +69 -69
- package/src/api/core/core.model.js +11 -11
- package/src/api/core/core.router.js +23 -23
- package/src/api/core/core.service.js +29 -29
- package/src/api/crypto/crypto.controller.js +51 -51
- package/src/api/crypto/crypto.model.js +23 -23
- package/src/api/crypto/crypto.router.js +20 -20
- package/src/api/crypto/crypto.service.js +64 -64
- package/src/api/default/default.controller.js +69 -69
- package/src/api/default/default.model.js +20 -20
- package/src/api/default/default.router.js +23 -23
- package/src/api/default/default.service.js +31 -31
- package/src/api/file/file.controller.js +53 -51
- package/src/api/file/file.model.js +19 -19
- package/src/api/file/file.router.js +21 -20
- package/src/api/file/file.service.js +76 -70
- package/src/api/instance/instance.controller.js +69 -69
- package/src/api/instance/instance.model.js +36 -36
- package/src/api/instance/instance.router.js +33 -33
- package/src/api/instance/instance.service.js +48 -48
- package/src/api/test/test.controller.js +59 -59
- package/src/api/test/test.model.js +14 -14
- package/src/api/test/test.router.js +21 -21
- package/src/api/test/test.service.js +35 -35
- package/src/api/user/user.build.js +16 -0
- package/src/api/user/user.controller.js +70 -70
- package/src/api/user/user.model.js +65 -65
- package/src/api/user/user.router.js +345 -345
- package/src/api/user/user.service.js +479 -479
- package/src/api.js +23 -23
- package/src/client/Default.index.js +40 -40
- package/src/client/components/core/Account.js +290 -290
- package/src/client/components/core/AgGrid.js +160 -160
- package/src/client/components/core/Auth.js +19 -19
- package/src/client/components/core/Badge.js +32 -32
- package/src/client/components/core/BlockChain.js +41 -41
- package/src/client/components/core/Blog.js +9 -9
- package/src/client/components/core/BtnIcon.js +101 -94
- package/src/client/components/core/CalendarCore.js +458 -319
- package/src/client/components/core/Chat.js +64 -64
- package/src/client/components/core/ColorPalette.js +5267 -5267
- package/src/client/components/core/CommonJs.js +735 -732
- package/src/client/components/core/Content.js +193 -49
- package/src/client/components/core/Css.js +1064 -1027
- package/src/client/components/core/CssCore.js +817 -796
- package/src/client/components/core/D3Chart.js +44 -44
- package/src/client/components/core/Docs.js +229 -229
- package/src/client/components/core/DropDown.js +164 -164
- package/src/client/components/core/EventsUI.js +46 -54
- package/src/client/components/core/FileExplorer.js +699 -624
- package/src/client/components/core/FullScreen.js +45 -45
- package/src/client/components/core/Input.js +346 -259
- package/src/client/components/core/JoyStick.js +77 -77
- package/src/client/components/core/Keyboard.js +73 -73
- package/src/client/components/core/LoadingAnimation.js +179 -157
- package/src/client/components/core/LogIn.js +187 -181
- package/src/client/components/core/LogOut.js +58 -52
- package/src/client/components/core/Logger.js +26 -26
- package/src/client/components/core/Modal.js +1612 -1596
- package/src/client/components/core/NotificationManager.js +84 -84
- package/src/client/components/core/Panel.js +613 -413
- package/src/client/components/core/PanelForm.js +468 -0
- package/src/client/components/core/Polyhedron.js +162 -162
- package/src/client/components/core/Recover.js +204 -204
- package/src/client/components/core/Responsive.js +53 -53
- package/src/client/components/core/RichText.js +51 -27
- package/src/client/components/core/Router.js +76 -77
- package/src/client/components/core/Scroll.js +34 -0
- package/src/client/components/core/SignUp.js +125 -125
- package/src/client/components/core/SocketIo.js +72 -72
- package/src/client/components/core/Stream.js +113 -113
- package/src/client/components/core/ToggleSwitch.js +87 -87
- package/src/client/components/core/ToolTip.js +26 -26
- package/src/client/components/core/Translate.js +437 -408
- package/src/client/components/core/Validator.js +100 -100
- package/src/client/components/core/VanillaJs.js +460 -457
- package/src/client/components/core/Wallet.js +106 -106
- package/src/client/components/core/Webhook.js +25 -25
- package/src/client/components/core/Worker.js +272 -272
- package/src/client/components/default/CommonDefault.js +29 -29
- package/src/client/components/default/CssDefault.js +13 -13
- package/src/client/components/default/ElementsDefault.js +38 -38
- package/src/client/components/default/LogInDefault.js +41 -41
- package/src/client/components/default/LogOutDefault.js +28 -28
- package/src/client/components/default/MenuDefault.js +389 -389
- package/src/client/components/default/RoutesDefault.js +48 -48
- package/src/client/components/default/SettingsDefault.js +16 -16
- package/src/client/components/default/SignUpDefault.js +9 -9
- package/src/client/components/default/SocketIoDefault.js +54 -54
- package/src/client/components/default/TranslateDefault.js +7 -7
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/browserconfig.xml +11 -11
- package/src/client/public/default/manifest.webmanifest +68 -68
- package/src/client/public/default/plantuml/client-conf.svg +1 -0
- package/src/client/public/default/plantuml/client-schema.svg +1 -0
- package/src/client/public/default/plantuml/cron-conf.svg +1 -0
- package/src/client/public/default/plantuml/cron-schema.svg +1 -0
- package/src/client/public/default/plantuml/server-conf.svg +1 -0
- package/src/client/public/default/plantuml/server-schema.svg +1 -0
- package/src/client/public/default/plantuml/ssr-conf.svg +1 -0
- package/src/client/public/default/plantuml/ssr-schema.svg +1 -0
- package/src/client/public/default/sitemap +147 -147
- package/src/client/public/default/yandex-browser-manifest.json +8 -8
- package/src/client/public/doc/sitemap +147 -147
- package/src/client/public/test/sitemap +147 -147
- package/src/client/services/core/core.service.js +170 -152
- package/src/client/services/crypto/crypto.service.js +70 -70
- package/src/client/services/default/default.management.js +345 -345
- package/src/client/services/default/default.service.js +89 -89
- package/src/client/services/file/file.service.js +70 -70
- package/src/client/services/instance/instance.management.js +74 -74
- package/src/client/services/instance/instance.service.js +89 -89
- package/src/client/services/test/test.service.js +70 -70
- package/src/client/services/user/user.management.js +50 -50
- package/src/client/services/user/user.service.js +89 -89
- package/src/client/ssr/Render.js +16 -16
- package/src/client/ssr/body-components/CacheControl.js +114 -113
- package/src/client/ssr/body-components/DefaultSplashScreen.js +79 -79
- package/src/client/ssr/email-components/DefaultRecoverEmail.js +21 -21
- package/src/client/ssr/email-components/DefaultVerifyEmail.js +17 -17
- package/src/client/ssr/head-components/Css.js +241 -241
- package/src/client/ssr/head-components/DefaultScripts.js +3 -3
- package/src/client/ssr/head-components/Microdata.js +11 -11
- package/src/client/ssr/head-components/Production.js +1 -1
- package/src/client/ssr/head-components/PwaDefault.js +59 -59
- package/src/client/ssr/head-components/Seo.js +14 -14
- package/src/client/sw/default.sw.js +201 -201
- package/src/client/sw/template.sw.js +84 -84
- package/src/client.build.js +22 -22
- package/src/client.dev.js +21 -21
- package/src/cron.js +25 -25
- package/src/db/DataBaseProvider.js +34 -34
- package/src/db/mariadb/MariaDB.js +33 -33
- package/src/db/mongo/MongooseDB.js +46 -46
- package/src/dns.js +22 -22
- package/src/index.js +42 -0
- package/src/mailer/EmailRender.js +69 -69
- package/src/mailer/MailerProvider.js +96 -96
- package/src/proxy.js +22 -22
- package/src/runtime/lampp/Lampp.js +69 -44
- package/src/runtime/nginx/Nginx.js +3 -3
- package/src/runtime/xampp/Xampp.js +49 -49
- package/src/server/auth.js +235 -204
- package/src/server/backup.js +101 -84
- package/src/server/client-build-live.js +72 -72
- package/src/server/client-build.js +705 -699
- package/src/server/client-dev-server.js +60 -58
- package/src/server/client-formatted.js +48 -48
- package/src/server/client-icons.js +149 -150
- package/src/server/conf.js +860 -611
- package/src/server/dns.js +98 -87
- package/src/server/downloader.js +42 -42
- package/src/server/logger.js +180 -135
- package/src/server/network.js +122 -122
- package/src/server/peer.js +33 -33
- package/src/server/process.js +66 -66
- package/src/server/prompt-optimizer.js +28 -0
- package/src/server/proxy.js +118 -118
- package/src/server/runtime.js +444 -393
- package/src/server/ssl.js +109 -107
- package/src/server.js +25 -25
- package/src/ws/IoInterface.js +45 -45
- package/src/ws/IoServer.js +39 -39
- package/src/ws/core/channels/core.ws.chat.js +23 -23
- package/src/ws/core/channels/core.ws.mailer.js +35 -35
- package/src/ws/core/channels/core.ws.stream.js +31 -31
- package/src/ws/core/core.ws.connection.js +28 -28
- package/src/ws/core/core.ws.emit.js +14 -14
- package/src/ws/core/core.ws.server.js +24 -24
- package/src/ws/core/management/core.ws.chat.js +8 -8
- package/src/ws/core/management/core.ws.mailer.js +16 -16
- package/src/ws/core/management/core.ws.stream.js +8 -8
- package/src/ws/default/channels/default.ws.main.js +16 -16
- package/src/ws/default/default.ws.connection.js +22 -22
- package/src/ws/default/default.ws.emit.js +14 -14
- package/src/ws/default/default.ws.server.js +20 -20
- package/src/ws/default/management/default.ws.main.js +8 -8
- package/startup.js +11 -11
- package/supervisord-openssh-server.conf +4 -4
- package/test/api.test.js +60 -60
- package/bin/help.js +0 -110
|
@@ -1,1027 +1,1064 @@
|
|
|
1
|
-
import { getId, newInstance, range, s4, splitEveryXChar } from './CommonJs.js';
|
|
2
|
-
import { CssCoreDark, CssCoreLight } from './CssCore.js';
|
|
3
|
-
import { DropDown } from './DropDown.js';
|
|
4
|
-
import { Modal } from './Modal.js';
|
|
5
|
-
import { Translate } from './Translate.js';
|
|
6
|
-
import { append, getProxyPath, htmls, s } from './VanillaJs.js';
|
|
7
|
-
|
|
8
|
-
let ThemesScope = [];
|
|
9
|
-
|
|
10
|
-
// https://css.github.io/csso/csso.html
|
|
11
|
-
// https://www.fontspace.com/
|
|
12
|
-
// https://www.1001fonts.com/
|
|
13
|
-
|
|
14
|
-
const Css = {
|
|
15
|
-
loadThemes: async function (themes = []) {
|
|
16
|
-
ThemesScope = [];
|
|
17
|
-
for (const themeOptions of themes) addTheme(themeOptions);
|
|
18
|
-
// if (!ThemesScope.find((t) => t.dark)) addTheme(CssCoreDark);
|
|
19
|
-
// if (!ThemesScope.find((t) => !t.dark)) addTheme(CssCoreLight);
|
|
20
|
-
if (ThemesScope.length === 0) {
|
|
21
|
-
addTheme(CssCoreDark);
|
|
22
|
-
addTheme(CssCoreLight);
|
|
23
|
-
}
|
|
24
|
-
const localStorageTheme = localStorage.getItem('_theme');
|
|
25
|
-
if (localStorageTheme && Themes[localStorageTheme]) {
|
|
26
|
-
const themeOption = ThemesScope.find((t) => t.theme === localStorageTheme);
|
|
27
|
-
if (themeOption) return await this.Init(themeOption);
|
|
28
|
-
}
|
|
29
|
-
await this.Init();
|
|
30
|
-
},
|
|
31
|
-
Init: async function (options) {
|
|
32
|
-
if (!options) options = ThemesScope[0];
|
|
33
|
-
const { theme } = options;
|
|
34
|
-
append(
|
|
35
|
-
'body',
|
|
36
|
-
html`
|
|
37
|
-
<style>
|
|
38
|
-
html {
|
|
39
|
-
scroll-behavior: smooth;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
body {
|
|
43
|
-
/* overscroll-behavior: contain; */
|
|
44
|
-
/* box-sizing: border-box; */
|
|
45
|
-
padding: 0px;
|
|
46
|
-
margin: 0px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.fl {
|
|
50
|
-
position: relative;
|
|
51
|
-
display: flow-root;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.abs,
|
|
55
|
-
.in {
|
|
56
|
-
display: block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.fll {
|
|
60
|
-
float: left;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.flr {
|
|
64
|
-
float: right;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.abs {
|
|
68
|
-
position: absolute;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.in,
|
|
72
|
-
.inl {
|
|
73
|
-
position: relative;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.inl {
|
|
77
|
-
display: inline-table;
|
|
78
|
-
display: -webkit-inline-table;
|
|
79
|
-
display: -moz-inline-table;
|
|
80
|
-
display: -ms-inline-table;
|
|
81
|
-
display: -o-inline-table;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.fix {
|
|
85
|
-
position: fixed;
|
|
86
|
-
display: block;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.stq {
|
|
90
|
-
position: sticky;
|
|
91
|
-
/* require defined at least top, bottom, left o right */
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.wfa {
|
|
95
|
-
width:
|
|
96
|
-
width: -webkit-
|
|
97
|
-
width: -moz-
|
|
98
|
-
width: -ms-
|
|
99
|
-
width: -o-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
width:
|
|
104
|
-
width: -
|
|
105
|
-
width: -
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
width:
|
|
112
|
-
width: -
|
|
113
|
-
width: -
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
input
|
|
154
|
-
outline: none !important;
|
|
155
|
-
border: none;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
background: none;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
/*
|
|
182
|
-
color: black;
|
|
183
|
-
background: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
.
|
|
210
|
-
text-transform:
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
.session-in-log-
|
|
234
|
-
display:
|
|
235
|
-
}
|
|
236
|
-
.session-inl-log-
|
|
237
|
-
display:
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
class="inl bar-default-modal-icon ${options.iconClass ? options.iconClass : ''}"
|
|
281
|
-
src="${getProxyPath()}assets/icons/
|
|
282
|
-
/>`,
|
|
283
|
-
|
|
284
|
-
class="inl bar-default-modal-icon ${options.iconClass ? options.iconClass : ''}"
|
|
285
|
-
src="${getProxyPath()}assets/icons/
|
|
286
|
-
/>`,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
disabled: false,
|
|
323
|
-
label: barLabels(options)[barButtonsIconTheme].
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
disabled:
|
|
327
|
-
label: barLabels(options)[barButtonsIconTheme].
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
return
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
`;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
${
|
|
418
|
-
.
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
return html
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
.${id}-col-b {
|
|
480
|
-
width:
|
|
481
|
-
}
|
|
482
|
-
`,
|
|
483
|
-
);
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
.${id}-col-
|
|
492
|
-
width:
|
|
493
|
-
}
|
|
494
|
-
`,
|
|
495
|
-
);
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
.${id}-col-b {
|
|
504
|
-
width:
|
|
505
|
-
}
|
|
506
|
-
`,
|
|
507
|
-
);
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
.wave-${id}
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
top:
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
transform: translateX(
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
transform: translateX(
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1
|
+
import { getId, newInstance, range, s4, splitEveryXChar } from './CommonJs.js';
|
|
2
|
+
import { CssCoreDark, CssCoreLight } from './CssCore.js';
|
|
3
|
+
import { DropDown } from './DropDown.js';
|
|
4
|
+
import { Modal } from './Modal.js';
|
|
5
|
+
import { Translate } from './Translate.js';
|
|
6
|
+
import { append, getProxyPath, htmls, s } from './VanillaJs.js';
|
|
7
|
+
|
|
8
|
+
let ThemesScope = [];
|
|
9
|
+
|
|
10
|
+
// https://css.github.io/csso/csso.html
|
|
11
|
+
// https://www.fontspace.com/
|
|
12
|
+
// https://www.1001fonts.com/
|
|
13
|
+
|
|
14
|
+
const Css = {
|
|
15
|
+
loadThemes: async function (themes = []) {
|
|
16
|
+
ThemesScope = [];
|
|
17
|
+
for (const themeOptions of themes) addTheme(themeOptions);
|
|
18
|
+
// if (!ThemesScope.find((t) => t.dark)) addTheme(CssCoreDark);
|
|
19
|
+
// if (!ThemesScope.find((t) => !t.dark)) addTheme(CssCoreLight);
|
|
20
|
+
if (ThemesScope.length === 0) {
|
|
21
|
+
addTheme(CssCoreDark);
|
|
22
|
+
addTheme(CssCoreLight);
|
|
23
|
+
}
|
|
24
|
+
const localStorageTheme = localStorage.getItem('_theme');
|
|
25
|
+
if (localStorageTheme && Themes[localStorageTheme]) {
|
|
26
|
+
const themeOption = ThemesScope.find((t) => t.theme === localStorageTheme);
|
|
27
|
+
if (themeOption) return await this.Init(themeOption);
|
|
28
|
+
}
|
|
29
|
+
await this.Init();
|
|
30
|
+
},
|
|
31
|
+
Init: async function (options) {
|
|
32
|
+
if (!options) options = ThemesScope[0];
|
|
33
|
+
const { theme } = options;
|
|
34
|
+
append(
|
|
35
|
+
'body',
|
|
36
|
+
html`
|
|
37
|
+
<style>
|
|
38
|
+
html {
|
|
39
|
+
scroll-behavior: smooth;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body {
|
|
43
|
+
/* overscroll-behavior: contain; */
|
|
44
|
+
/* box-sizing: border-box; */
|
|
45
|
+
padding: 0px;
|
|
46
|
+
margin: 0px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.fl {
|
|
50
|
+
position: relative;
|
|
51
|
+
display: flow-root;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.abs,
|
|
55
|
+
.in {
|
|
56
|
+
display: block;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.fll {
|
|
60
|
+
float: left;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.flr {
|
|
64
|
+
float: right;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.abs {
|
|
68
|
+
position: absolute;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.in,
|
|
72
|
+
.inl {
|
|
73
|
+
position: relative;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.inl {
|
|
77
|
+
display: inline-table;
|
|
78
|
+
display: -webkit-inline-table;
|
|
79
|
+
display: -moz-inline-table;
|
|
80
|
+
display: -ms-inline-table;
|
|
81
|
+
display: -o-inline-table;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.fix {
|
|
85
|
+
position: fixed;
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.stq {
|
|
90
|
+
position: sticky;
|
|
91
|
+
/* require defined at least top, bottom, left o right */
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.wfa {
|
|
95
|
+
width: available;
|
|
96
|
+
width: -webkit-available;
|
|
97
|
+
width: -moz-available;
|
|
98
|
+
width: -ms-available;
|
|
99
|
+
width: -o-available;
|
|
100
|
+
|
|
101
|
+
width: fill-available;
|
|
102
|
+
width: -webkit-fill-available;
|
|
103
|
+
width: -moz-fill-available;
|
|
104
|
+
width: -ms-fill-available;
|
|
105
|
+
width: -o-fill-available;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.wft {
|
|
109
|
+
width: fit-content;
|
|
110
|
+
width: -webkit-fit-content;
|
|
111
|
+
width: -moz-fit-content;
|
|
112
|
+
width: -ms-fit-content;
|
|
113
|
+
width: -o-fit-content;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.wfm {
|
|
117
|
+
width: max-content;
|
|
118
|
+
width: -webkit-max-content;
|
|
119
|
+
width: -moz-max-content;
|
|
120
|
+
width: -ms-max-content;
|
|
121
|
+
width: -o-max-content;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.negative-color {
|
|
125
|
+
filter: invert(1);
|
|
126
|
+
-webkit-filter: invert(1);
|
|
127
|
+
-moz-filter: invert(1);
|
|
128
|
+
-ms-filter: invert(1);
|
|
129
|
+
-o-filter: invert(1);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.no-drag {
|
|
133
|
+
user-drag: none;
|
|
134
|
+
-webkit-user-drag: none;
|
|
135
|
+
-moz-user-drag: none;
|
|
136
|
+
-ms-user-drag: none;
|
|
137
|
+
-o-user-drag: none;
|
|
138
|
+
user-select: none;
|
|
139
|
+
-webkit-user-select: none;
|
|
140
|
+
-moz-user-select: none;
|
|
141
|
+
-ms-user-select: none;
|
|
142
|
+
-o-user-select: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.center {
|
|
146
|
+
transform: translate(-50%, -50%);
|
|
147
|
+
top: 50%;
|
|
148
|
+
left: 50%;
|
|
149
|
+
width: 100%;
|
|
150
|
+
text-align: center;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
input {
|
|
154
|
+
outline: none !important;
|
|
155
|
+
border: none;
|
|
156
|
+
padding-block: 0;
|
|
157
|
+
padding-inline: 0;
|
|
158
|
+
}
|
|
159
|
+
input::file-selector-button {
|
|
160
|
+
outline: none !important;
|
|
161
|
+
border: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.hide {
|
|
165
|
+
display: none !important;
|
|
166
|
+
}
|
|
167
|
+
/*
|
|
168
|
+
|
|
169
|
+
placeholder
|
|
170
|
+
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
::placeholder {
|
|
174
|
+
color: black;
|
|
175
|
+
opacity: 1;
|
|
176
|
+
/* Firefox */
|
|
177
|
+
background: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:-ms-input-placeholder {
|
|
181
|
+
/* Internet Explorer 10-11 */
|
|
182
|
+
color: black;
|
|
183
|
+
background: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
::-ms-input-placeholder {
|
|
187
|
+
/* Microsoft Edge */
|
|
188
|
+
color: black;
|
|
189
|
+
background: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/*
|
|
193
|
+
|
|
194
|
+
selection
|
|
195
|
+
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
::-moz-selection {
|
|
199
|
+
/* Code for Firefox */
|
|
200
|
+
color: black;
|
|
201
|
+
background: rgb(208, 208, 208);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
::selection {
|
|
205
|
+
color: black;
|
|
206
|
+
background: rgb(208, 208, 208);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.lowercase {
|
|
210
|
+
text-transform: lowercase;
|
|
211
|
+
}
|
|
212
|
+
.uppercase {
|
|
213
|
+
text-transform: uppercase;
|
|
214
|
+
}
|
|
215
|
+
.capitalize {
|
|
216
|
+
text-transform: capitalize;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.bold {
|
|
220
|
+
font-weight: bold;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.m {
|
|
224
|
+
font-family: monospace;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.gray {
|
|
228
|
+
filter: grayscale(1);
|
|
229
|
+
}
|
|
230
|
+
</style>
|
|
231
|
+
<div class="session">
|
|
232
|
+
<style>
|
|
233
|
+
.session-in-log-out {
|
|
234
|
+
display: block;
|
|
235
|
+
}
|
|
236
|
+
.session-inl-log-out {
|
|
237
|
+
display: inline-table;
|
|
238
|
+
}
|
|
239
|
+
.session-fl-log-out {
|
|
240
|
+
display: flow-root;
|
|
241
|
+
}
|
|
242
|
+
.session-in-log-in {
|
|
243
|
+
display: none;
|
|
244
|
+
}
|
|
245
|
+
.session-inl-log-in {
|
|
246
|
+
display: none;
|
|
247
|
+
}
|
|
248
|
+
.session-fl-log-in {
|
|
249
|
+
display: none;
|
|
250
|
+
}
|
|
251
|
+
</style>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="theme"></div>
|
|
254
|
+
`,
|
|
255
|
+
);
|
|
256
|
+
return await Themes[theme](options);
|
|
257
|
+
},
|
|
258
|
+
RenderSetting: async function () {
|
|
259
|
+
return html` <div class="in section-mp">
|
|
260
|
+
${await DropDown.Render({
|
|
261
|
+
id: 'settings-theme',
|
|
262
|
+
value: Css.currentTheme,
|
|
263
|
+
label: html`${Translate.Render('theme')}`,
|
|
264
|
+
data: ThemesScope.map((themeOption) => {
|
|
265
|
+
return {
|
|
266
|
+
display: html`<i class="fa-solid fa-brush"></i> ${themeOption.theme}`,
|
|
267
|
+
value: themeOption.theme,
|
|
268
|
+
onClick: async () => await Themes[themeOption.theme](),
|
|
269
|
+
};
|
|
270
|
+
}),
|
|
271
|
+
})}
|
|
272
|
+
</div>`;
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
const barLabels = (options) => {
|
|
277
|
+
return {
|
|
278
|
+
img: {
|
|
279
|
+
close: html`<img
|
|
280
|
+
class="inl bar-default-modal-icon ${options.iconClass ? options.iconClass : ''}"
|
|
281
|
+
src="${getProxyPath()}assets/icons/close.png"
|
|
282
|
+
/>`,
|
|
283
|
+
maximize: html`<img
|
|
284
|
+
class="inl bar-default-modal-icon ${options.iconClass ? options.iconClass : ''}"
|
|
285
|
+
src="${getProxyPath()}assets/icons/maximize.png"
|
|
286
|
+
/>`,
|
|
287
|
+
minimize: html`<img
|
|
288
|
+
class="inl bar-default-modal-icon ${options.iconClass ? options.iconClass : ''}"
|
|
289
|
+
src="${getProxyPath()}assets/icons/minimize.png"
|
|
290
|
+
/>`,
|
|
291
|
+
restore: html`<img
|
|
292
|
+
class="inl bar-default-modal-icon ${options.iconClass ? options.iconClass : ''}"
|
|
293
|
+
src="${getProxyPath()}assets/icons/restore.png"
|
|
294
|
+
/>`,
|
|
295
|
+
menu: html`<img
|
|
296
|
+
class="inl bar-default-modal-icon ${options.iconClass ? options.iconClass : ''}"
|
|
297
|
+
src="${getProxyPath()}assets/icons/menu.png"
|
|
298
|
+
/>`,
|
|
299
|
+
},
|
|
300
|
+
fontawesome: {
|
|
301
|
+
close: html`<i class="fa-solid fa-xmark ${options.iconClass ? options.iconClass : ''}"></i>`,
|
|
302
|
+
maximize: html`<i class="fa-regular fa-square ${options.iconClass ? options.iconClass : ''}"></i>`,
|
|
303
|
+
minimize: html`<i class="fa-solid fa-window-minimize ${options.iconClass ? options.iconClass : ''}"></i>`,
|
|
304
|
+
restore: html`<i class="fa-regular fa-window-restore ${options.iconClass ? options.iconClass : ''}"></i>`,
|
|
305
|
+
menu: html`<i class="fa-solid fa-bars ${options.iconClass ? options.iconClass : ''}"></i>`,
|
|
306
|
+
},
|
|
307
|
+
default: {
|
|
308
|
+
close: html`X`,
|
|
309
|
+
maximize: html`▢`,
|
|
310
|
+
minimize: html`_`,
|
|
311
|
+
restore: html`□`,
|
|
312
|
+
menu: html`≡`,
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
const barConfig = (options) => {
|
|
318
|
+
const { barButtonsIconTheme } = options;
|
|
319
|
+
return {
|
|
320
|
+
buttons: {
|
|
321
|
+
close: {
|
|
322
|
+
disabled: false,
|
|
323
|
+
label: barLabels(options)[barButtonsIconTheme].close,
|
|
324
|
+
},
|
|
325
|
+
maximize: {
|
|
326
|
+
disabled: false,
|
|
327
|
+
label: barLabels(options)[barButtonsIconTheme].maximize,
|
|
328
|
+
},
|
|
329
|
+
minimize: {
|
|
330
|
+
disabled: false,
|
|
331
|
+
label: barLabels(options)[barButtonsIconTheme].minimize,
|
|
332
|
+
},
|
|
333
|
+
restore: {
|
|
334
|
+
disabled: false,
|
|
335
|
+
label: barLabels(options)[barButtonsIconTheme].restore,
|
|
336
|
+
},
|
|
337
|
+
menu: {
|
|
338
|
+
disabled: true,
|
|
339
|
+
label: barLabels(options)[barButtonsIconTheme].menu,
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
const renderDefaultWindowsModalButtonContent = (options) => {
|
|
346
|
+
const { barButtonsIconTheme, htmlRender } = options;
|
|
347
|
+
const barConfigInstance = barConfig(options);
|
|
348
|
+
if (htmlRender)
|
|
349
|
+
Object.keys(Modal.Data).map((idModal) => {
|
|
350
|
+
if (s(`.btn-minimize-${idModal}`)) htmls(`.btn-minimize-${idModal}`, barConfigInstance.buttons.minimize.label);
|
|
351
|
+
if (s(`.btn-restore-${idModal}`)) htmls(`.btn-restore-${idModal}`, barConfigInstance.buttons.restore.label);
|
|
352
|
+
if (s(`.btn-maximize-${idModal}`)) htmls(`.btn-maximize-${idModal}`, barConfigInstance.buttons.maximize.label);
|
|
353
|
+
if (s(`.btn-close-${idModal}`)) htmls(`.btn-close-${idModal}`, barConfigInstance.buttons.close.label);
|
|
354
|
+
if (s(`.btn-menu-${idModal}`)) htmls(`.btn-menu-${idModal}`, barConfigInstance.buttons.menu.label);
|
|
355
|
+
});
|
|
356
|
+
return { barConfig: barConfigInstance };
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
let darkTheme = true;
|
|
360
|
+
const ThemeEvents = {};
|
|
361
|
+
const TriggerThemeEvents = () => {
|
|
362
|
+
localStorage.setItem('_theme', Css.currentTheme);
|
|
363
|
+
Object.keys(ThemeEvents).map((keyEvent) => ThemeEvents[keyEvent]());
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
const Themes = {};
|
|
367
|
+
|
|
368
|
+
const addTheme = (options) => {
|
|
369
|
+
ThemesScope.push(options);
|
|
370
|
+
Themes[options.theme] = async (barOptions) => {
|
|
371
|
+
if (!options.dark) options.dark = false;
|
|
372
|
+
if (!options.barButtonsIconTheme) options.barButtonsIconTheme = 'fontawesome';
|
|
373
|
+
const htmlRender = Css.currentTheme !== options.theme;
|
|
374
|
+
if (htmlRender) {
|
|
375
|
+
Css.currentTheme = options.theme;
|
|
376
|
+
darkTheme = options.dark;
|
|
377
|
+
let render = '';
|
|
378
|
+
if (!['core', 'css-core'].includes(options.theme))
|
|
379
|
+
render += darkTheme ? await CssCoreDark.render() : await CssCoreLight.render();
|
|
380
|
+
render += await options.render();
|
|
381
|
+
htmls('.theme', render);
|
|
382
|
+
TriggerThemeEvents();
|
|
383
|
+
}
|
|
384
|
+
return {
|
|
385
|
+
...renderDefaultWindowsModalButtonContent({
|
|
386
|
+
barButtonsIconTheme: options.barButtonsIconTheme,
|
|
387
|
+
htmlRender,
|
|
388
|
+
...barOptions,
|
|
389
|
+
}),
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
const borderChar = (px, color, selectors) => {
|
|
395
|
+
if (selectors) {
|
|
396
|
+
return selectors
|
|
397
|
+
.map(
|
|
398
|
+
(selector) => html`
|
|
399
|
+
<style>
|
|
400
|
+
${selector} {
|
|
401
|
+
text-shadow: ${px}px -${px}px ${px}px ${color}, -${px}px ${px}px ${px}px ${color},
|
|
402
|
+
-${px}px -${px}px ${px}px ${color}, ${px}px ${px}px ${px}px ${color};
|
|
403
|
+
}
|
|
404
|
+
</style>
|
|
405
|
+
`,
|
|
406
|
+
)
|
|
407
|
+
.join('');
|
|
408
|
+
}
|
|
409
|
+
return html`
|
|
410
|
+
text-shadow: ${px}px -${px}px ${px}px ${color}, -${px}px ${px}px ${px}px ${color}, -${px}px -${px}px ${px}px
|
|
411
|
+
${color}, ${px}px ${px}px ${px}px ${color};
|
|
412
|
+
`;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
const boxShadow = ({ selector }) => html`
|
|
416
|
+
<style>
|
|
417
|
+
${selector} {
|
|
418
|
+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
419
|
+
}
|
|
420
|
+
${selector}:hover {
|
|
421
|
+
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 10px 30px 0 rgba(0, 0, 0, 0.3);
|
|
422
|
+
}
|
|
423
|
+
</style>
|
|
424
|
+
`;
|
|
425
|
+
|
|
426
|
+
const renderMediaQuery = (mediaData) => {
|
|
427
|
+
// first limit should be '0'
|
|
428
|
+
return html`
|
|
429
|
+
${mediaData
|
|
430
|
+
.map(
|
|
431
|
+
(mediaState) => html`
|
|
432
|
+
<style>
|
|
433
|
+
@media only screen and (min-width: ${mediaState.limit}px) {
|
|
434
|
+
${mediaState.css}
|
|
435
|
+
}
|
|
436
|
+
</style>
|
|
437
|
+
`,
|
|
438
|
+
)
|
|
439
|
+
.join('')}
|
|
440
|
+
`;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
const renderStatus = (status, options) => {
|
|
444
|
+
switch (status) {
|
|
445
|
+
case 'success':
|
|
446
|
+
return html`<div class="${options?.class ? options.class : 'abs center'}">
|
|
447
|
+
<i style="color: green" class="fa-solid fa-check"></i>
|
|
448
|
+
</div>`;
|
|
449
|
+
case 'error':
|
|
450
|
+
return html`<div class="${options?.class ? options.class : 'abs center'}">
|
|
451
|
+
<i style="color: red" class="fa-solid fa-xmark"></i>
|
|
452
|
+
</div>`;
|
|
453
|
+
case 'warning':
|
|
454
|
+
return html`<div class="${options?.class ? options.class : 'abs center'}">
|
|
455
|
+
<i style="color: yellow" class="fa-solid fa-triangle-exclamation"></i>
|
|
456
|
+
</div>`;
|
|
457
|
+
default:
|
|
458
|
+
return html``;
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
const dynamicColTokens = {};
|
|
463
|
+
|
|
464
|
+
const dynamicCol = (options = { containerSelector: '', id: '', type: '', limit: 900 }) => {
|
|
465
|
+
const { containerSelector, id } = options;
|
|
466
|
+
const limitCol = options?.limit ? options.limit : 900;
|
|
467
|
+
if (!(id in dynamicColTokens)) dynamicColTokens[id] = {};
|
|
468
|
+
dynamicColTokens[id].options = options;
|
|
469
|
+
if (dynamicColTokens[id].observer) dynamicColTokens[id].observer.disconnect();
|
|
470
|
+
setTimeout(() => {
|
|
471
|
+
dynamicColTokens[id].observer = new ResizeObserver(() => {
|
|
472
|
+
if (s(`.${containerSelector}`)) {
|
|
473
|
+
switch (options.type) {
|
|
474
|
+
case 'a-50-b-50':
|
|
475
|
+
if (s(`.${containerSelector}`).offsetWidth < limitCol)
|
|
476
|
+
htmls(
|
|
477
|
+
`.style-${id}-col`,
|
|
478
|
+
css`
|
|
479
|
+
.${id}-col-a, .${id}-col-b {
|
|
480
|
+
width: 100%;
|
|
481
|
+
}
|
|
482
|
+
`,
|
|
483
|
+
);
|
|
484
|
+
else
|
|
485
|
+
htmls(
|
|
486
|
+
`.style-${id}-col`,
|
|
487
|
+
css`
|
|
488
|
+
.${id}-col-a {
|
|
489
|
+
width: 50%;
|
|
490
|
+
}
|
|
491
|
+
.${id}-col-b {
|
|
492
|
+
width: 50%;
|
|
493
|
+
}
|
|
494
|
+
`,
|
|
495
|
+
);
|
|
496
|
+
break;
|
|
497
|
+
|
|
498
|
+
default:
|
|
499
|
+
if (s(`.${containerSelector}`).offsetWidth < 900)
|
|
500
|
+
htmls(
|
|
501
|
+
`.style-${id}-col`,
|
|
502
|
+
css`
|
|
503
|
+
.${id}-col-a, .${id}-col-b {
|
|
504
|
+
width: 100%;
|
|
505
|
+
}
|
|
506
|
+
`,
|
|
507
|
+
);
|
|
508
|
+
else
|
|
509
|
+
htmls(
|
|
510
|
+
`.style-${id}-col`,
|
|
511
|
+
css`
|
|
512
|
+
.${id}-col-a {
|
|
513
|
+
width: 30%;
|
|
514
|
+
}
|
|
515
|
+
.${id}-col-b {
|
|
516
|
+
width: 70%;
|
|
517
|
+
}
|
|
518
|
+
`,
|
|
519
|
+
);
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
} else {
|
|
523
|
+
dynamicColTokens[id].observer.disconnect();
|
|
524
|
+
delete dynamicColTokens[id];
|
|
525
|
+
if (s(`.style-${id}-col`)) s(`.style-${id}-col`).remove();
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
dynamicColTokens[id].observer.observe(s(`.${containerSelector}`));
|
|
529
|
+
});
|
|
530
|
+
return html` <style class="style-${id}-col"></style>`;
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
const renderBubbleDialog = async function (
|
|
534
|
+
options = {
|
|
535
|
+
id: '',
|
|
536
|
+
html: async () => '',
|
|
537
|
+
classSelectors,
|
|
538
|
+
triangleType: 'down',
|
|
539
|
+
trianglePositionCss: '',
|
|
540
|
+
triangleCss: '',
|
|
541
|
+
triangleDim: 0,
|
|
542
|
+
bubbleCss: '',
|
|
543
|
+
},
|
|
544
|
+
) {
|
|
545
|
+
const { id, html } = options;
|
|
546
|
+
let cssTrianglePosition = `
|
|
547
|
+
bottom: -45px;
|
|
548
|
+
left: 5px;
|
|
549
|
+
`;
|
|
550
|
+
let whiteTriangleStyle = `top: 43%`;
|
|
551
|
+
let blackTriangleStyle = ``;
|
|
552
|
+
switch (options.triangleType) {
|
|
553
|
+
case 'right':
|
|
554
|
+
cssTrianglePosition = `
|
|
555
|
+
right: -40px;
|
|
556
|
+
top: 5px;
|
|
557
|
+
`;
|
|
558
|
+
blackTriangleStyle = `
|
|
559
|
+
top: 43%;
|
|
560
|
+
left: 57%;
|
|
561
|
+
`;
|
|
562
|
+
break;
|
|
563
|
+
|
|
564
|
+
default:
|
|
565
|
+
break;
|
|
566
|
+
}
|
|
567
|
+
if (options.trianglePositionCss) cssTrianglePosition = options.trianglePositionCss;
|
|
568
|
+
return html` <div
|
|
569
|
+
class="${options?.classSelectors ? options.classSelectors : 'inl'} bubble-dialog bubble-dialog-${id}"
|
|
570
|
+
${options.bubbleCss ? `style='${options.bubbleCss}'` : ''}
|
|
571
|
+
>
|
|
572
|
+
<style class="style-bubble-dialog-triangle-${id}">
|
|
573
|
+
.bubble-dialog-triangle-${id} {
|
|
574
|
+
width: ${options.triangleDim ? options.triangleDim : 60}px;
|
|
575
|
+
height: ${options.triangleDim ? options.triangleDim : 60}px;
|
|
576
|
+
/* border: 2px solid red; */
|
|
577
|
+
box-sizing: border-box;
|
|
578
|
+
${cssTrianglePosition}
|
|
579
|
+
}
|
|
580
|
+
</style>
|
|
581
|
+
<div class="abs bubble-dialog-triangle bubble-dialog-triangle-${id}">
|
|
582
|
+
<div class="abs center" style="${blackTriangleStyle}">
|
|
583
|
+
${triangle[options?.triangleType ? options.triangleType : 'down']({
|
|
584
|
+
dim: 25,
|
|
585
|
+
id: id + '-triangle-black',
|
|
586
|
+
color: 'black',
|
|
587
|
+
classList: 'inl',
|
|
588
|
+
customStyle: options.triangleCss,
|
|
589
|
+
})}
|
|
590
|
+
</div>
|
|
591
|
+
<div class="abs center" style="${whiteTriangleStyle}">
|
|
592
|
+
${triangle[options?.triangleType ? options.triangleType : 'down']({
|
|
593
|
+
dim: 24,
|
|
594
|
+
id: id + '-triangle-white',
|
|
595
|
+
color: 'white',
|
|
596
|
+
classList: 'inl',
|
|
597
|
+
customStyle: options.triangleCss,
|
|
598
|
+
})}
|
|
599
|
+
</div>
|
|
600
|
+
</div>
|
|
601
|
+
${await html()}
|
|
602
|
+
</div>`;
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
const typeWriter = async function ({ id, html, seconds, endHideBlink, container }) {
|
|
606
|
+
if (!seconds) seconds = 2;
|
|
607
|
+
return new Promise((resolve) => {
|
|
608
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function
|
|
609
|
+
// https://www.w3schools.com/cssref/css3_pr_animation-fill-mode.php
|
|
610
|
+
const typingAnimationTransitionStyle = [`1s linear`, `${seconds}s steps(30, end)`, `1s forwards`];
|
|
611
|
+
const render = html`
|
|
612
|
+
<style class="style-${id}">
|
|
613
|
+
.tw-${id}-typed-out {
|
|
614
|
+
overflow: hidden;
|
|
615
|
+
border-right: 0.15em solid orange;
|
|
616
|
+
white-space: nowrap;
|
|
617
|
+
animation: typing-${id} ${typingAnimationTransitionStyle[1]}, blink-caret-${id} 0.5s step-end infinite;
|
|
618
|
+
animation-fill-mode: forwards;
|
|
619
|
+
width: 0;
|
|
620
|
+
}
|
|
621
|
+
</style>
|
|
622
|
+
<style>
|
|
623
|
+
.tw-${id}-container {
|
|
624
|
+
}
|
|
625
|
+
@keyframes typing-${id} {
|
|
626
|
+
from {
|
|
627
|
+
width: 0;
|
|
628
|
+
}
|
|
629
|
+
to {
|
|
630
|
+
width: 100%;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
@keyframes blink-caret-${id} {
|
|
635
|
+
from,
|
|
636
|
+
to {
|
|
637
|
+
border-color: transparent;
|
|
638
|
+
}
|
|
639
|
+
50% {
|
|
640
|
+
border-color: orange;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
</style>
|
|
644
|
+
<div class="inl tw-${id}-container">
|
|
645
|
+
<div class="tw-${id}-typed-out">${html}</div>
|
|
646
|
+
</div>
|
|
647
|
+
`;
|
|
648
|
+
htmls(`.${container}`, render);
|
|
649
|
+
setTimeout(() => {
|
|
650
|
+
if (endHideBlink && s(`.style-${id}`)) s(`.style-${id}`).remove();
|
|
651
|
+
resolve(render);
|
|
652
|
+
}, seconds * 1000);
|
|
653
|
+
});
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
const renderCssAttr = (options) =>
|
|
657
|
+
`${
|
|
658
|
+
options && options.style
|
|
659
|
+
? Object.keys(options.style)
|
|
660
|
+
.map((keyStyle) => `${keyStyle}: ${options.style[keyStyle]};`)
|
|
661
|
+
.join(`\n`)
|
|
662
|
+
: ''
|
|
663
|
+
}`;
|
|
664
|
+
|
|
665
|
+
const renderStyleTag = (styleSelector = 'style-abc', selector, options) =>
|
|
666
|
+
html`<style class="${styleSelector}">
|
|
667
|
+
${selector} { ${renderCssAttr(options)} }
|
|
668
|
+
</style>`;
|
|
669
|
+
|
|
670
|
+
function getTranslate3d(el) {
|
|
671
|
+
const values = el.style.transform.split(/\w+\(|\);?/);
|
|
672
|
+
if (!values[1] || !values[1].length) {
|
|
673
|
+
return [];
|
|
674
|
+
}
|
|
675
|
+
return values[1].split(/,\s?/g);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
const dashRange = ({ selector, color }) => {
|
|
679
|
+
return html`
|
|
680
|
+
<style>
|
|
681
|
+
.${selector} {
|
|
682
|
+
background: linear-gradient(90deg, ${color} 50%, transparent 50%),
|
|
683
|
+
linear-gradient(90deg, ${color} 50%, transparent 50%), linear-gradient(0deg, ${color} 50%, transparent 50%),
|
|
684
|
+
linear-gradient(0deg, ${color} 50%, transparent 50%);
|
|
685
|
+
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
|
|
686
|
+
background-size: 16px 4px, 16px 4px, 4px 16px, 4px 16px;
|
|
687
|
+
background-position: 0% 0%, 100% 100%, 0% 100%, 100% 0px;
|
|
688
|
+
border-radius: 5px;
|
|
689
|
+
padding: 10px;
|
|
690
|
+
animation: ${selector}_dash_range 5s linear infinite;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
@keyframes ${selector}_dash_range {
|
|
694
|
+
to {
|
|
695
|
+
background-position: 100% 0%, 0% 100%, 0% 0%, 100% 100%;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
</style>
|
|
699
|
+
`;
|
|
700
|
+
};
|
|
701
|
+
const triangle = {
|
|
702
|
+
up: ({ id, dim, color, classList, customStyle }) => {
|
|
703
|
+
return html`<style class="style-${id}">
|
|
704
|
+
.arrow-up-${id} {
|
|
705
|
+
width: 0;
|
|
706
|
+
height: 0;
|
|
707
|
+
border-left: ${dim}px solid transparent;
|
|
708
|
+
border-right: ${dim}px solid transparent;
|
|
709
|
+
border-bottom: ${dim}px solid ${color};
|
|
710
|
+
}
|
|
711
|
+
</style>
|
|
712
|
+
<div
|
|
713
|
+
class="arrow-up-${id} ${classList}"
|
|
714
|
+
${customStyle ? `style="${customStyle ? customStyle : ''}"` : ''}
|
|
715
|
+
></div>`;
|
|
716
|
+
},
|
|
717
|
+
down: ({ id, dim, color, classList, customStyle }) => {
|
|
718
|
+
return html`<style class="style-${id}">
|
|
719
|
+
.arrow-down-${id} {
|
|
720
|
+
width: 0;
|
|
721
|
+
height: 0;
|
|
722
|
+
border-left: ${dim}px solid transparent;
|
|
723
|
+
border-right: ${dim}px solid transparent;
|
|
724
|
+
border-top: ${dim}px solid ${color};
|
|
725
|
+
}
|
|
726
|
+
</style>
|
|
727
|
+
<div
|
|
728
|
+
class="arrow-down-${id} ${classList}"
|
|
729
|
+
${customStyle ? `style="${customStyle ? customStyle : ''}"` : ''}
|
|
730
|
+
></div>`;
|
|
731
|
+
},
|
|
732
|
+
right: ({ id, dim, color, classList, customStyle }) => {
|
|
733
|
+
return html` <style class="style-${id}">
|
|
734
|
+
.arrow-right-${id} {
|
|
735
|
+
width: 0;
|
|
736
|
+
height: 0;
|
|
737
|
+
border-top: ${dim}px solid transparent;
|
|
738
|
+
border-bottom: ${dim}px solid transparent;
|
|
739
|
+
border-left: ${dim}px solid ${color};
|
|
740
|
+
}
|
|
741
|
+
</style>
|
|
742
|
+
<div
|
|
743
|
+
class="arrow-right-${id} ${classList}"
|
|
744
|
+
${customStyle ? `style="${customStyle ? customStyle : ''}"` : ''}
|
|
745
|
+
></div>`;
|
|
746
|
+
},
|
|
747
|
+
left: ({ id, dim, color, classList, customStyle }) => {
|
|
748
|
+
return html`<style class="style-${id}">
|
|
749
|
+
.arrow-left-${id} {
|
|
750
|
+
width: 0;
|
|
751
|
+
height: 0;
|
|
752
|
+
border-top: ${dim}px solid transparent;
|
|
753
|
+
border-bottom: ${dim}px solid transparent;
|
|
754
|
+
border-right: ${dim}px solid ${color};
|
|
755
|
+
}
|
|
756
|
+
</style>
|
|
757
|
+
<div
|
|
758
|
+
class="arrow-left-${id} ${classList}"
|
|
759
|
+
${customStyle ? `style="${customStyle ? customStyle : ''}"` : ''}
|
|
760
|
+
></div>`;
|
|
761
|
+
},
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
const getSectionsStringData = (offsetWidth, text) => {
|
|
765
|
+
const sectionsIndex = [];
|
|
766
|
+
const everyXChar = parseInt(offsetWidth / 4);
|
|
767
|
+
const phraseArray = text
|
|
768
|
+
.split('.')
|
|
769
|
+
.map((t) => splitEveryXChar(t + '.', everyXChar, ['.', ' ']))
|
|
770
|
+
.flat()
|
|
771
|
+
.filter((p) => p !== '.' && p.trim());
|
|
772
|
+
|
|
773
|
+
let currentIndex = [0];
|
|
774
|
+
let pi = -1;
|
|
775
|
+
for (const p of phraseArray) {
|
|
776
|
+
pi++;
|
|
777
|
+
if (p.indexOf('.') !== -1) {
|
|
778
|
+
currentIndex.push(newInstance(pi));
|
|
779
|
+
sectionsIndex.push(newInstance(currentIndex));
|
|
780
|
+
if (phraseArray[pi + 1]) currentIndex = [newInstance(pi + 1)];
|
|
781
|
+
else currentIndex = [];
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
if (currentIndex[0] && !currentIndex[1]) {
|
|
785
|
+
currentIndex[1] = phraseArray.length - 1;
|
|
786
|
+
sectionsIndex.push(newInstance(currentIndex));
|
|
787
|
+
}
|
|
788
|
+
return { phraseArray, sectionsIndex };
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
const typeWriteSectionsString = ({ container, phraseArray, rangeArraySectionIndex }) =>
|
|
792
|
+
new Promise((resolve) => {
|
|
793
|
+
let cumulativeSeconds = 0;
|
|
794
|
+
for (const index of range(...rangeArraySectionIndex)) {
|
|
795
|
+
const subIdSalt = s4() + s4() + s4();
|
|
796
|
+
const seconds = phraseArray[index].trim().length * 0.05;
|
|
797
|
+
append(`.${container}`, html` <div class="${container}-${subIdSalt}"></div> `);
|
|
798
|
+
setTimeout(async () => {
|
|
799
|
+
if (s(`.${container}-${subIdSalt}`)) {
|
|
800
|
+
append(`.${container}-${subIdSalt}`, html` <div class="render-typeWriter-${container}-${subIdSalt}"></div> `);
|
|
801
|
+
await typeWriter({
|
|
802
|
+
id: `typeWriter-${index}-${container}`,
|
|
803
|
+
html: phraseArray[index].trim(),
|
|
804
|
+
endHideBlink: index < rangeArraySectionIndex[1],
|
|
805
|
+
seconds,
|
|
806
|
+
container: `render-typeWriter-${container}-${subIdSalt}`,
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
if (index === rangeArraySectionIndex[1]) resolve();
|
|
810
|
+
}, cumulativeSeconds * 1000);
|
|
811
|
+
cumulativeSeconds += seconds;
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
|
|
815
|
+
const cssBrowserCodes = ['webkit', 'moz', 'ms', 'o'];
|
|
816
|
+
|
|
817
|
+
const scrollBarLightRender = () => {
|
|
818
|
+
return cssBrowserCodes
|
|
819
|
+
.map(
|
|
820
|
+
(b) =>
|
|
821
|
+
html`<style>
|
|
822
|
+
::-` +
|
|
823
|
+
b +
|
|
824
|
+
`-scrollbar {
|
|
825
|
+
width: 5px;
|
|
826
|
+
height: 5px;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/* Track */
|
|
830
|
+
::-` +
|
|
831
|
+
b +
|
|
832
|
+
`-scrollbar-track {
|
|
833
|
+
background: none !important;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/* Handle */
|
|
837
|
+
::-` +
|
|
838
|
+
b +
|
|
839
|
+
`-scrollbar-thumb {
|
|
840
|
+
background: #15151557;
|
|
841
|
+
border-radius: 3px;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/* Handle on hover */
|
|
845
|
+
::-` +
|
|
846
|
+
b +
|
|
847
|
+
`-scrollbar-thumb:hover {
|
|
848
|
+
background: #4d4d4dbb;
|
|
849
|
+
}
|
|
850
|
+
</style>`,
|
|
851
|
+
)
|
|
852
|
+
.join('');
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
const scrollBarDarkRender = () => {
|
|
856
|
+
return cssBrowserCodes
|
|
857
|
+
.map(
|
|
858
|
+
(b) =>
|
|
859
|
+
html`<style>
|
|
860
|
+
::-` +
|
|
861
|
+
b +
|
|
862
|
+
`-scrollbar {
|
|
863
|
+
width: 5px;
|
|
864
|
+
height: 5px;
|
|
865
|
+
/* line-height: 1em; */
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/* Track */
|
|
869
|
+
::-` +
|
|
870
|
+
b +
|
|
871
|
+
`-scrollbar-track {
|
|
872
|
+
background: none !important;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
/* Handle */
|
|
876
|
+
::-` +
|
|
877
|
+
b +
|
|
878
|
+
`-scrollbar-thumb {
|
|
879
|
+
background: #74747457;
|
|
880
|
+
border-radius: 3px;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/* Handle on hover */
|
|
884
|
+
::-` +
|
|
885
|
+
b +
|
|
886
|
+
`-scrollbar-thumb:hover {
|
|
887
|
+
background: #98989857;
|
|
888
|
+
}
|
|
889
|
+
</style>`,
|
|
890
|
+
)
|
|
891
|
+
.join('');
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
const renderWave = ({ id }) => {
|
|
895
|
+
return html`
|
|
896
|
+
<style>
|
|
897
|
+
.wave-animation-container-${id} {
|
|
898
|
+
height: 200px;
|
|
899
|
+
}
|
|
900
|
+
.wave-animation-container-${id} {
|
|
901
|
+
background: linear-gradient(
|
|
902
|
+
315deg,
|
|
903
|
+
rgba(101, 0, 94, 1) 3%,
|
|
904
|
+
rgba(60, 132, 206, 1) 38%,
|
|
905
|
+
rgba(48, 238, 226, 1) 68%,
|
|
906
|
+
rgba(255, 25, 25, 1) 98%
|
|
907
|
+
);
|
|
908
|
+
animation: gradient-${id} 15s ease infinite;
|
|
909
|
+
background-size: 400% 400%;
|
|
910
|
+
overflow: hidden;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
@keyframes gradient-${id} {
|
|
914
|
+
0% {
|
|
915
|
+
background-position: 0% 0%;
|
|
916
|
+
}
|
|
917
|
+
50% {
|
|
918
|
+
background-position: 100% 100%;
|
|
919
|
+
}
|
|
920
|
+
100% {
|
|
921
|
+
background-position: 0% 0%;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.wave-${id} {
|
|
926
|
+
background: rgb(255 255 255 / 25%);
|
|
927
|
+
border-radius: 1000% 1000% 0 0;
|
|
928
|
+
width: 200%;
|
|
929
|
+
height: 12em;
|
|
930
|
+
animation: wave-${id} 10s -3s linear infinite;
|
|
931
|
+
opacity: 0.8;
|
|
932
|
+
bottom: 0;
|
|
933
|
+
left: 0;
|
|
934
|
+
top: 30%;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.wave-${id}:nth-of-type(2) {
|
|
938
|
+
animation: wave-${id} 18s linear reverse infinite;
|
|
939
|
+
opacity: 0.8;
|
|
940
|
+
top: 50%;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.wave-${id}:nth-of-type(3) {
|
|
944
|
+
animation: wave-${id} 20s -1s reverse infinite;
|
|
945
|
+
opacity: 0.9;
|
|
946
|
+
top: 70%;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
@keyframes wave-${id} {
|
|
950
|
+
2% {
|
|
951
|
+
transform: translateX(1);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
25% {
|
|
955
|
+
transform: translateX(-25%);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
50% {
|
|
959
|
+
transform: translateX(-50%);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
75% {
|
|
963
|
+
transform: translateX(-25%);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
100% {
|
|
967
|
+
transform: translateX(1);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
</style>
|
|
971
|
+
<div class="in wave-animation-container-${id} ${id}">
|
|
972
|
+
<div class="in wave-${id}"></div>
|
|
973
|
+
<div class="abs wave-${id}"></div>
|
|
974
|
+
<div class="abs wave-${id}"></div>
|
|
975
|
+
</div>
|
|
976
|
+
`;
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
const cssTokensEffect = {};
|
|
980
|
+
const cssTokensContainer = {};
|
|
981
|
+
const cssEffect = async (containerSelector, event) => {
|
|
982
|
+
// Array.from(event.target.classList)
|
|
983
|
+
let offsetX, offsetY;
|
|
984
|
+
if (Array.from(event.srcElement.classList).includes('ripple') && cssTokensContainer[containerSelector]) {
|
|
985
|
+
offsetX = cssTokensContainer[containerSelector].lastOffsetX;
|
|
986
|
+
offsetY = cssTokensContainer[containerSelector].lastOffsetY;
|
|
987
|
+
} else {
|
|
988
|
+
cssTokensContainer[containerSelector] = { lastOffsetX: event.offsetX, lastOffsetY: event.offsetY };
|
|
989
|
+
offsetX = event.offsetX;
|
|
990
|
+
offsetY = event.offsetY;
|
|
991
|
+
}
|
|
992
|
+
const element = s(containerSelector);
|
|
993
|
+
// element.style.overflow = 'hidden';
|
|
994
|
+
const id = getId(cssTokensEffect, 'btn-effect-');
|
|
995
|
+
cssTokensEffect[id] = { containerSelector, event };
|
|
996
|
+
append(containerSelector, html`<span class="abs ${id} ripple" style="display: none"></span>`);
|
|
997
|
+
const circle = s(`.${id}`);
|
|
998
|
+
circle.style.width = circle.style.height = `40px`;
|
|
999
|
+
circle.style.left = `${offsetX}px`;
|
|
1000
|
+
circle.style.top = `${offsetY}px`;
|
|
1001
|
+
circle.style.display = null;
|
|
1002
|
+
setTimeout(() => {
|
|
1003
|
+
circle.remove();
|
|
1004
|
+
delete cssTokensEffect[id];
|
|
1005
|
+
}, 600);
|
|
1006
|
+
};
|
|
1007
|
+
|
|
1008
|
+
const imageShimmer = () => html`<div
|
|
1009
|
+
class="abs center ssr-shimmer-search-box"
|
|
1010
|
+
style="${renderCssAttr({
|
|
1011
|
+
style: {
|
|
1012
|
+
width: '95%',
|
|
1013
|
+
height: '95%',
|
|
1014
|
+
'border-radius': '10px',
|
|
1015
|
+
overflow: 'hidden',
|
|
1016
|
+
},
|
|
1017
|
+
})}"
|
|
1018
|
+
>
|
|
1019
|
+
<div
|
|
1020
|
+
class="abs center"
|
|
1021
|
+
style="${renderCssAttr({
|
|
1022
|
+
style: {
|
|
1023
|
+
'font-size': '70px',
|
|
1024
|
+
color: `#bababa`,
|
|
1025
|
+
},
|
|
1026
|
+
})}"
|
|
1027
|
+
>
|
|
1028
|
+
<i class="fa-solid fa-photo-film"></i>
|
|
1029
|
+
</div>
|
|
1030
|
+
</div>`;
|
|
1031
|
+
|
|
1032
|
+
export {
|
|
1033
|
+
Css,
|
|
1034
|
+
Themes,
|
|
1035
|
+
barLabels,
|
|
1036
|
+
barConfig,
|
|
1037
|
+
borderChar,
|
|
1038
|
+
renderMediaQuery,
|
|
1039
|
+
renderDefaultWindowsModalButtonContent,
|
|
1040
|
+
renderStatus,
|
|
1041
|
+
dynamicCol,
|
|
1042
|
+
dynamicColTokens,
|
|
1043
|
+
boxShadow,
|
|
1044
|
+
addTheme,
|
|
1045
|
+
darkTheme,
|
|
1046
|
+
ThemeEvents,
|
|
1047
|
+
TriggerThemeEvents,
|
|
1048
|
+
ThemesScope,
|
|
1049
|
+
renderBubbleDialog,
|
|
1050
|
+
typeWriter,
|
|
1051
|
+
renderStyleTag,
|
|
1052
|
+
renderCssAttr,
|
|
1053
|
+
getTranslate3d,
|
|
1054
|
+
dashRange,
|
|
1055
|
+
triangle,
|
|
1056
|
+
getSectionsStringData,
|
|
1057
|
+
typeWriteSectionsString,
|
|
1058
|
+
cssBrowserCodes,
|
|
1059
|
+
scrollBarDarkRender,
|
|
1060
|
+
scrollBarLightRender,
|
|
1061
|
+
renderWave,
|
|
1062
|
+
cssEffect,
|
|
1063
|
+
imageShimmer,
|
|
1064
|
+
};
|