ts-glitter 20.7.3 → 20.7.5
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/jr9x7k3aau.json +1 -0
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-notify.js +2 -0
- package/lowcode/backend-manager/bg-notify.ts +2 -0
- package/lowcode/backend-manager/bg-widget.js +280 -155
- package/lowcode/backend-manager/bg-widget.ts +387 -244
- package/lowcode/backend-manager/splitPage.js +27 -52
- package/lowcode/backend-manager/splitPage.ts +29 -47
- package/lowcode/cms-plugin/app-release.js +63 -13
- package/lowcode/cms-plugin/app-release.ts +73 -13
- package/lowcode/cms-plugin/auto-fcm-advertise.js +23 -24
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +286 -285
- package/lowcode/cms-plugin/auto-reply.js +285 -273
- package/lowcode/cms-plugin/auto-reply.ts +673 -660
- package/lowcode/cms-plugin/module/data.ts +1 -0
- package/lowcode/cms-plugin/module/order-setting.js +134 -117
- package/lowcode/cms-plugin/module/order-setting.ts +152 -138
- package/lowcode/cms-plugin/pos-pages/products-page.js +8 -16
- package/lowcode/cms-plugin/pos-pages/products-page.ts +10 -12
- package/lowcode/cms-plugin/shopping-order-manager.js +244 -289
- package/lowcode/cms-plugin/shopping-order-manager.ts +128 -156
- package/lowcode/cms-plugin/shopping-order-return.js +1 -1
- package/lowcode/cms-plugin/shopping-order-return.ts +1 -1
- package/lowcode/cms-plugin/shopping-product-setting.js +3 -3
- package/lowcode/cms-plugin/shopping-product-setting.ts +3 -3
- package/lowcode/cms-plugin/shopping-setting-advance.js +3 -28
- package/lowcode/cms-plugin/shopping-setting-advance.ts +3 -28
- package/lowcode/cms-plugin/stock-history.js +31 -15
- package/lowcode/cms-plugin/stock-history.ts +43 -25
- package/lowcode/cms-plugin/third-party-google.js +103 -81
- package/lowcode/cms-plugin/third-party-google.ts +296 -265
- package/lowcode/cms-plugin/user-list.js +166 -113
- package/lowcode/cms-plugin/user-list.ts +136 -78
- package/lowcode/form-view/e-commerce/path-select.js +100 -87
- package/lowcode/form-view/e-commerce/path-select.ts +372 -343
- package/lowcode/glitter-base/route/stock.ts +153 -141
- package/lowcode/glitterBundle/plugins/editor-elem.js +139 -149
- package/lowcode/glitterBundle/plugins/editor-elem.ts +207 -222
- package/lowcode/public-components/blogs/list.js +8 -16
- package/lowcode/public-components/blogs/list.ts +10 -12
- package/lowcode/public-components/product/product-list.js +8 -16
- package/lowcode/public-components/product/product-list.ts +10 -12
- package/lowcode/public-components/user-manager/um-login.js +270 -267
- package/lowcode/public-components/user-manager/um-login.ts +987 -983
- package/lowcode/public-models/order-info.js +12 -20
- package/lowcode/public-models/order-info.ts +13 -12
- package/package.json +1 -1
- package/src/Language.js.map +1 -1
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/ai-points.js.map +1 -1
- package/src/api-public/controllers/app-release.js.map +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/controllers/customer-sessions.js.map +1 -1
- package/src/api-public/controllers/delivery.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/fb-service.js.map +1 -1
- package/src/api-public/controllers/fcm.js.map +1 -1
- package/src/api-public/controllers/graph-api.js.map +1 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/invoice.js.map +1 -1
- package/src/api-public/controllers/lambda.js.map +1 -1
- package/src/api-public/controllers/line-message.js.map +1 -1
- package/src/api-public/controllers/manager.js.map +1 -1
- package/src/api-public/controllers/oauth.js.map +1 -1
- package/src/api-public/controllers/post.js.map +1 -1
- package/src/api-public/controllers/progress.js.map +1 -1
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/recommend.js.map +1 -1
- package/src/api-public/controllers/reconciliation.js.map +1 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shopee.js.map +1 -1
- package/src/api-public/controllers/sms-points.js.map +1 -1
- package/src/api-public/controllers/sms.js.map +1 -1
- package/src/api-public/controllers/smtp.js.map +1 -1
- package/src/api-public/controllers/sql_api.js.map +1 -1
- package/src/api-public/controllers/stock.js.map +1 -1
- package/src/api-public/controllers/track.js.map +1 -1
- package/src/api-public/controllers/user.js +1 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +1 -1
- package/src/api-public/controllers/voucher.js.map +1 -1
- package/src/api-public/controllers/wallet.js.map +1 -1
- package/src/api-public/models/glitter-finance.js +2 -1
- package/src/api-public/models/glitter-finance.js.map +1 -1
- package/src/api-public/services/EcInvoice.js.map +1 -1
- package/src/api-public/services/ai-pointes.js.map +1 -1
- package/src/api-public/services/ai-robot.d.ts +1 -0
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/article.js.map +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/checkout-event.d.ts +3 -1
- package/src/api-public/services/checkout-event.js +7 -4
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/checkout-event.ts +26 -17
- package/src/api-public/services/checkout.js.map +1 -1
- package/src/api-public/services/custom-code.js.map +1 -1
- package/src/api-public/services/customer-sessions.js.map +1 -1
- package/src/api-public/services/data-analyze.js +3 -3
- package/src/api-public/services/data-analyze.js.map +1 -1
- package/src/api-public/services/data-analyze.ts +3 -3
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/ezpay/tool.d.ts +1 -0
- package/src/api-public/services/ezpay/tool.js.map +1 -1
- package/src/api-public/services/fake-data-model/fake-order.js.map +1 -1
- package/src/api-public/services/fake-data-model/fake-product.js.map +1 -1
- package/src/api-public/services/fake-data-model/fake-user.js.map +1 -1
- package/src/api-public/services/fb-api.d.ts +1 -0
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/fb-message.d.ts +1 -0
- package/src/api-public/services/fb-message.js.map +1 -1
- package/src/api-public/services/fb-service.js +4 -4
- package/src/api-public/services/fb-service.js.map +1 -1
- package/src/api-public/services/filter-protect-data.js.map +1 -1
- package/src/api-public/services/financial-service.d.ts +1 -0
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/form-check.js.map +1 -1
- package/src/api-public/services/graph-api.js.map +1 -1
- package/src/api-public/services/initial-fake-data.js.map +1 -1
- package/src/api-public/services/invoice.js.map +1 -1
- package/src/api-public/services/language-setting.js.map +1 -1
- package/src/api-public/services/line-message.d.ts +1 -0
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/mail.js.map +1 -1
- package/src/api-public/services/manager.js.map +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
- package/src/api-public/services/model/shopnex-line-message.js.map +1 -1
- package/src/api-public/services/monitor.d.ts +1 -0
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/notify.js.map +1 -1
- package/src/api-public/services/order-event.js.map +1 -1
- package/src/api-public/services/paynow-logistics.js.map +1 -1
- package/src/api-public/services/phone-verify.js.map +1 -1
- package/src/api-public/services/pos.js.map +1 -1
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/product-initial.js.map +1 -1
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/recommend.js.map +1 -1
- package/src/api-public/services/reconciliation.js.map +1 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/share-permission.d.ts +1 -1
- package/src/api-public/services/share-permission.js.map +1 -1
- package/src/api-public/services/shopee.d.ts +1 -0
- package/src/api-public/services/shopee.js.map +1 -1
- package/src/api-public/services/shopping.js +5 -9
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +4 -10
- package/src/api-public/services/sms-pointes.js.map +1 -1
- package/src/api-public/services/sms.js.map +1 -1
- package/src/api-public/services/stock.js.map +1 -1
- package/src/api-public/services/terms-check.js.map +1 -1
- package/src/api-public/services/updated-table-checked.js.map +1 -1
- package/src/api-public/services/user-update.js.map +1 -1
- package/src/api-public/services/user.d.ts +6 -1
- package/src/api-public/services/user.js +30 -15
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +109 -91
- package/src/api-public/services/voucher.js.map +1 -1
- package/src/api-public/services/wallet.js.map +1 -1
- package/src/api-public/services/workers.js.map +1 -1
- package/src/api-public/utils/ut-database.js.map +1 -1
- package/src/api-public/utils/ut-permission.d.ts +1 -0
- package/src/api-public/utils/ut-permission.js.map +1 -1
- package/src/app-project/serverless/src/controllers/index.js.map +1 -1
- package/src/app-project/serverless/src/controllers/sample.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.d.ts +2 -1
- package/src/app-project/serverless/src/modules/database.js.map +1 -1
- package/src/app-project/serverless/src/modules/exception.js.map +1 -1
- package/src/app-project/serverless/src/modules/hooks.js.map +1 -1
- package/src/app-project/serverless/src/modules/logger.js.map +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.js.map +1 -1
- package/src/app-project/serverless/src/modules/response.js.map +1 -1
- package/src/app-project/serverless/src/modules/ssh.js.map +1 -1
- package/src/config.d.ts +1 -1
- package/src/config.js.map +1 -1
- package/src/controllers/ai.js.map +1 -1
- package/src/controllers/app.js.map +1 -1
- package/src/controllers/backend-server.js.map +1 -1
- package/src/controllers/filemanager.js.map +1 -1
- package/src/controllers/global-event.js.map +1 -1
- package/src/controllers/index.js.map +1 -1
- package/src/controllers/page.js.map +1 -1
- package/src/controllers/private_config.js.map +1 -1
- package/src/controllers/template.js.map +1 -1
- package/src/controllers/user.js.map +1 -1
- package/src/domain-check.js.map +1 -1
- package/src/export/export-test.js.map +1 -1
- package/src/firebase/message.js +2 -1
- package/src/firebase/message.js.map +1 -1
- package/src/helper/app_creater.js +2 -1
- package/src/helper/app_creater.js.map +1 -1
- package/src/helper/glitter-util.d.ts +1 -0
- package/src/helper/glitter-util.js.map +1 -1
- package/src/index.js +3 -3
- package/src/index.js.map +1 -1
- package/src/lambda/interface.d.ts +1 -1
- package/src/lambda/interface.js +2 -2
- package/src/lambda/interface.js.map +1 -1
- package/src/modules/AWSLib.js +3 -2
- package/src/modules/AWSLib.js.map +1 -1
- package/src/modules/caught-error.js.map +1 -1
- package/src/modules/database.d.ts +2 -1
- package/src/modules/database.js.map +1 -1
- package/src/modules/exception.js.map +1 -1
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/hooks.js.map +1 -1
- package/src/modules/logger.js.map +1 -1
- package/src/modules/redis.d.ts +1 -1
- package/src/modules/redis.js.map +1 -1
- package/src/modules/response.js.map +1 -1
- package/src/modules/ssh.js.map +1 -1
- package/src/modules/tool.d.ts +4 -4
- package/src/modules/tool.js +2 -1
- package/src/modules/tool.js.map +1 -1
- package/src/public-config-initial/auto-fcm.js.map +1 -1
- package/src/run.js +2 -1
- package/src/run.js.map +1 -1
- package/src/seo-config.d.ts +1 -0
- package/src/seo-config.js +3 -3
- package/src/seo-config.js.map +1 -1
- package/src/services/ai.js.map +1 -1
- package/src/services/app.js.map +1 -1
- package/src/services/backend-service.js.map +1 -1
- package/src/services/create-instance.js +4 -3
- package/src/services/create-instance.js.map +1 -1
- package/src/services/global-event.js.map +1 -1
- package/src/services/ios-release.js.map +1 -1
- package/src/services/page.js.map +1 -1
- package/src/services/private_config.js.map +1 -1
- package/src/services/release.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/seo.js.map +1 -1
- package/src/services/ses.js +2 -1
- package/src/services/ses.js.map +1 -1
- package/src/services/system-schedule.js.map +1 -1
- package/src/services/template.js.map +1 -1
- package/src/services/tool.js +3 -2
- package/src/services/tool.js.map +1 -1
- package/src/services/user.js.map +1 -1
- package/src/services/web-socket.js.map +1 -1
- package/src/update-progress-track.js.map +1 -1
- package/src/update-script.js.map +1 -1
- package/src/api-public/services/checkout-service.js +0 -1074
|
@@ -54,7 +54,7 @@ interface UserQuery {
|
|
|
54
54
|
member_levels?: string;
|
|
55
55
|
groupType?: string;
|
|
56
56
|
groupTag?: string;
|
|
57
|
-
filter_type?:
|
|
57
|
+
filter_type?: 'block' | 'normal' | 'watch' | 'excel';
|
|
58
58
|
tags?: string;
|
|
59
59
|
all_result?: boolean;
|
|
60
60
|
only_id:string;
|
|
@@ -106,15 +106,21 @@ type MemberConfig = {
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
export class User {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
app: string;
|
|
110
|
+
token?: IToken;
|
|
111
111
|
|
|
112
112
|
constructor(app: string, token?: IToken) {
|
|
113
113
|
this.app = app;
|
|
114
114
|
this.token = token;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
static typeMap = {
|
|
118
|
+
block: 0,
|
|
119
|
+
normal: 1,
|
|
120
|
+
watch: 2,
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
static generateUserID() {
|
|
118
124
|
let userID = '';
|
|
119
125
|
const characters = '0123456789';
|
|
120
126
|
const charactersLength = characters.length;
|
|
@@ -125,7 +131,7 @@ export class User {
|
|
|
125
131
|
return userID;
|
|
126
132
|
}
|
|
127
133
|
|
|
128
|
-
|
|
134
|
+
async findAuthUser(email?: string) {
|
|
129
135
|
try {
|
|
130
136
|
//SAAS 平台才需要檢查是否有邀請
|
|
131
137
|
if (['shopnex'].includes(this.app)) {
|
|
@@ -147,7 +153,7 @@ export class User {
|
|
|
147
153
|
}
|
|
148
154
|
}
|
|
149
155
|
|
|
150
|
-
|
|
156
|
+
async emailVerify(account: string) {
|
|
151
157
|
const time: any = await redis.getValue(`verify-${account}-last-time`);
|
|
152
158
|
//超過30秒可在次發送
|
|
153
159
|
if (!time || new Date().getTime() - new Date(time).getTime() > 1000 * 30) {
|
|
@@ -167,7 +173,7 @@ export class User {
|
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
|
|
170
|
-
|
|
176
|
+
async phoneVerify(account: string) {
|
|
171
177
|
const time: any = await redis.getValue(`verify-phone-${account}-last-time`);
|
|
172
178
|
let last_count: any = parseInt(`${(await redis.getValue(`verify-phone-${account}-last-count`)) || '0'}`, 10);
|
|
173
179
|
last_count++;
|
|
@@ -196,7 +202,7 @@ export class User {
|
|
|
196
202
|
}
|
|
197
203
|
}
|
|
198
204
|
|
|
199
|
-
|
|
205
|
+
async createUser(account: string, pwd: string, userData: any, req: any, pass_verify?: boolean) {
|
|
200
206
|
try {
|
|
201
207
|
const login_config = await this.getConfigV2({
|
|
202
208
|
key: 'login_config',
|
|
@@ -303,7 +309,7 @@ export class User {
|
|
|
303
309
|
}
|
|
304
310
|
|
|
305
311
|
// 用戶初次建立的initial函式
|
|
306
|
-
|
|
312
|
+
async createUserHook(userID: string) {
|
|
307
313
|
// 發送歡迎信件
|
|
308
314
|
const usData: any = await this.getUserData(userID, 'userID');
|
|
309
315
|
usData.userData.repeatPwd = undefined;
|
|
@@ -340,7 +346,7 @@ export class User {
|
|
|
340
346
|
await UserUpdate.update(this.app, userID);
|
|
341
347
|
}
|
|
342
348
|
|
|
343
|
-
|
|
349
|
+
async updateAccount(account: string, userID: string): Promise<any> {
|
|
344
350
|
try {
|
|
345
351
|
const configAd = await App.getAdConfig(this.app, 'glitter_loginConfig');
|
|
346
352
|
switch (configAd.verify) {
|
|
@@ -367,14 +373,14 @@ export class User {
|
|
|
367
373
|
}
|
|
368
374
|
}
|
|
369
375
|
|
|
370
|
-
|
|
376
|
+
async login(account: string, pwd: string) {
|
|
371
377
|
try {
|
|
372
378
|
const data: any = (
|
|
373
379
|
(await db.execute(
|
|
374
380
|
`select *
|
|
375
381
|
from \`${this.app}\`.t_user
|
|
376
382
|
where (userData ->>'$.email' = ? or phone=? or account=?)
|
|
377
|
-
and status
|
|
383
|
+
and status <> 0`,
|
|
378
384
|
[account.toLowerCase(), account.toLowerCase(), account.toLowerCase()]
|
|
379
385
|
)) as any
|
|
380
386
|
)[0];
|
|
@@ -397,7 +403,7 @@ export class User {
|
|
|
397
403
|
}
|
|
398
404
|
}
|
|
399
405
|
|
|
400
|
-
|
|
406
|
+
async loginWithFb(token: string) {
|
|
401
407
|
let config = {
|
|
402
408
|
method: 'get',
|
|
403
409
|
maxBodyLength: Infinity,
|
|
@@ -450,7 +456,7 @@ export class User {
|
|
|
450
456
|
`select *
|
|
451
457
|
from \`${this.app}\`.t_user
|
|
452
458
|
where userData ->>'$.email' = ?
|
|
453
|
-
|
|
459
|
+
and status <> 0`,
|
|
454
460
|
[fbResponse.email]
|
|
455
461
|
)) as any
|
|
456
462
|
)[0];
|
|
@@ -472,7 +478,7 @@ export class User {
|
|
|
472
478
|
return usData;
|
|
473
479
|
}
|
|
474
480
|
|
|
475
|
-
|
|
481
|
+
async loginWithLine(code: string, redirect: string) {
|
|
476
482
|
try {
|
|
477
483
|
const lineData = await this.getConfigV2({
|
|
478
484
|
key: 'login_line_setting',
|
|
@@ -501,10 +507,10 @@ export class User {
|
|
|
501
507
|
redirect_uri: redirect,
|
|
502
508
|
}),
|
|
503
509
|
})
|
|
504
|
-
.then((response:any) => {
|
|
510
|
+
.then((response: any) => {
|
|
505
511
|
resolve(response.data);
|
|
506
512
|
})
|
|
507
|
-
.catch((error:any) => {
|
|
513
|
+
.catch((error: any) => {
|
|
508
514
|
console.error(error);
|
|
509
515
|
resolve(false);
|
|
510
516
|
});
|
|
@@ -600,7 +606,7 @@ export class User {
|
|
|
600
606
|
}
|
|
601
607
|
}
|
|
602
608
|
|
|
603
|
-
|
|
609
|
+
async loginWithGoogle(code: string, redirect: string) {
|
|
604
610
|
try {
|
|
605
611
|
const config = await this.getConfigV2({
|
|
606
612
|
key: 'login_google_setting',
|
|
@@ -618,7 +624,15 @@ export class User {
|
|
|
618
624
|
audience: config.app_id, // 這裡是你的應用的 client_id
|
|
619
625
|
})
|
|
620
626
|
);
|
|
621
|
-
}
|
|
627
|
+
}else if (redirect === 'android') {
|
|
628
|
+
const client = new OAuth2Client(config.android_app_id);
|
|
629
|
+
resolve(
|
|
630
|
+
await client.verifyIdToken({
|
|
631
|
+
idToken: code,
|
|
632
|
+
audience: config.android_app_id, // 這裡是你的應用的 client_id
|
|
633
|
+
})
|
|
634
|
+
);
|
|
635
|
+
}else {
|
|
622
636
|
const oauth2Client = new OAuth2Client(config.id, config.secret, redirect);
|
|
623
637
|
// 使用授权码交换令牌
|
|
624
638
|
const { tokens } = await oauth2Client.getToken(code);
|
|
@@ -672,7 +686,7 @@ export class User {
|
|
|
672
686
|
`select *
|
|
673
687
|
from \`${this.app}\`.t_user
|
|
674
688
|
where userData ->>'$.email' = ?
|
|
675
|
-
|
|
689
|
+
and status <> 0`,
|
|
676
690
|
[payload?.email]
|
|
677
691
|
)) as any
|
|
678
692
|
)[0];
|
|
@@ -698,7 +712,7 @@ export class User {
|
|
|
698
712
|
}
|
|
699
713
|
|
|
700
714
|
//POS切換
|
|
701
|
-
|
|
715
|
+
async loginWithPin(user_id: string, pin: string) {
|
|
702
716
|
try {
|
|
703
717
|
if (await UtPermission.isManagerTokenCheck(this.app, `${this.token!!.userID}`)) {
|
|
704
718
|
const per_c = new SharePermission(this.app, this.token!!);
|
|
@@ -734,7 +748,7 @@ export class User {
|
|
|
734
748
|
}
|
|
735
749
|
}
|
|
736
750
|
|
|
737
|
-
|
|
751
|
+
async loginWithApple(token: string) {
|
|
738
752
|
try {
|
|
739
753
|
const config = await this.getConfigV2({
|
|
740
754
|
key: 'login_apple_setting',
|
|
@@ -810,7 +824,7 @@ export class User {
|
|
|
810
824
|
`select *
|
|
811
825
|
from \`${this.app}\`.t_user
|
|
812
826
|
where userData ->>'$.email' = ?
|
|
813
|
-
|
|
827
|
+
and status <> 0`,
|
|
814
828
|
[decoded.payload.email]
|
|
815
829
|
)) as any
|
|
816
830
|
)[0];
|
|
@@ -835,7 +849,7 @@ export class User {
|
|
|
835
849
|
}
|
|
836
850
|
}
|
|
837
851
|
|
|
838
|
-
|
|
852
|
+
async getUserData(query: string, type: 'userID' | 'account' | 'email_or_phone' = 'userID') {
|
|
839
853
|
try {
|
|
840
854
|
const sql = `select *
|
|
841
855
|
from \`${this.app}\`.t_user
|
|
@@ -886,7 +900,7 @@ export class User {
|
|
|
886
900
|
}
|
|
887
901
|
}
|
|
888
902
|
|
|
889
|
-
|
|
903
|
+
async checkMember(
|
|
890
904
|
userData: any,
|
|
891
905
|
trigger: boolean
|
|
892
906
|
): Promise<
|
|
@@ -1155,7 +1169,7 @@ export class User {
|
|
|
1155
1169
|
}
|
|
1156
1170
|
}
|
|
1157
1171
|
|
|
1158
|
-
|
|
1172
|
+
find30DayPeriodWith3000Spent(
|
|
1159
1173
|
transactions: {
|
|
1160
1174
|
total_amount: number;
|
|
1161
1175
|
date: string;
|
|
@@ -1253,7 +1267,7 @@ export class User {
|
|
|
1253
1267
|
return orderByMap[orderBy] || 'u.id DESC';
|
|
1254
1268
|
}
|
|
1255
1269
|
|
|
1256
|
-
|
|
1270
|
+
async getUserList(query: UserQuery) {
|
|
1257
1271
|
try {
|
|
1258
1272
|
const checkPoint = new UtTimer('GET-USER-LIST').checkPoint;
|
|
1259
1273
|
|
|
@@ -1520,7 +1534,11 @@ export class User {
|
|
|
1520
1534
|
}
|
|
1521
1535
|
|
|
1522
1536
|
if (query.filter_type !== 'excel') {
|
|
1523
|
-
|
|
1537
|
+
if (query.filter_type) {
|
|
1538
|
+
querySql.push(`status = ${User.typeMap[query.filter_type]}`);
|
|
1539
|
+
} else {
|
|
1540
|
+
querySql.push(`status <> ${User.typeMap.block}`);
|
|
1541
|
+
}
|
|
1524
1542
|
}
|
|
1525
1543
|
|
|
1526
1544
|
const countSQL = await this.getUserAndOrderSQL({
|
|
@@ -1664,7 +1682,6 @@ export class User {
|
|
|
1664
1682
|
checkPoint('return data');
|
|
1665
1683
|
|
|
1666
1684
|
const total = (await db.query(countSQL, []))[0]['count(1)'];
|
|
1667
|
-
console.log(`user total: ${total}`);
|
|
1668
1685
|
|
|
1669
1686
|
return {
|
|
1670
1687
|
// 指定頁數和符合篩選條件的會員資料
|
|
@@ -1683,7 +1700,7 @@ export class User {
|
|
|
1683
1700
|
}
|
|
1684
1701
|
}
|
|
1685
1702
|
|
|
1686
|
-
|
|
1703
|
+
async getUserGroups(
|
|
1687
1704
|
type?: string[],
|
|
1688
1705
|
tag?: string,
|
|
1689
1706
|
hide_level?: boolean
|
|
@@ -1812,7 +1829,7 @@ export class User {
|
|
|
1812
1829
|
}
|
|
1813
1830
|
}
|
|
1814
1831
|
|
|
1815
|
-
|
|
1832
|
+
normalMember = {
|
|
1816
1833
|
id: '',
|
|
1817
1834
|
duration: { type: 'noLimit', value: 0 },
|
|
1818
1835
|
tag_name: '一般會員',
|
|
@@ -1821,7 +1838,7 @@ export class User {
|
|
|
1821
1838
|
create_date: '2024-01-01T00:00:00.000Z',
|
|
1822
1839
|
};
|
|
1823
1840
|
|
|
1824
|
-
|
|
1841
|
+
async getLevelConfig() {
|
|
1825
1842
|
const levelData = await this.getConfigV2({ key: 'member_level_config', user_id: 'manager' });
|
|
1826
1843
|
const levelList = levelData.levels || [];
|
|
1827
1844
|
|
|
@@ -1982,7 +1999,7 @@ export class User {
|
|
|
1982
1999
|
};
|
|
1983
2000
|
}
|
|
1984
2001
|
|
|
1985
|
-
|
|
2002
|
+
async getUserLevel(
|
|
1986
2003
|
data: {
|
|
1987
2004
|
userId?: string;
|
|
1988
2005
|
email?: string;
|
|
@@ -2037,7 +2054,7 @@ export class User {
|
|
|
2037
2054
|
return dataList;
|
|
2038
2055
|
}
|
|
2039
2056
|
|
|
2040
|
-
|
|
2057
|
+
async subscribe(email: string, tag: string) {
|
|
2041
2058
|
try {
|
|
2042
2059
|
await db.queryLambada(
|
|
2043
2060
|
{
|
|
@@ -2056,7 +2073,7 @@ export class User {
|
|
|
2056
2073
|
}
|
|
2057
2074
|
}
|
|
2058
2075
|
|
|
2059
|
-
|
|
2076
|
+
async registerFcm(userID: string, deviceToken: string) {
|
|
2060
2077
|
try {
|
|
2061
2078
|
await db.queryLambada(
|
|
2062
2079
|
{
|
|
@@ -2075,7 +2092,7 @@ export class User {
|
|
|
2075
2092
|
}
|
|
2076
2093
|
}
|
|
2077
2094
|
|
|
2078
|
-
|
|
2095
|
+
async deleteSubscribe(email: string) {
|
|
2079
2096
|
try {
|
|
2080
2097
|
await db.query(
|
|
2081
2098
|
`delete
|
|
@@ -2091,7 +2108,7 @@ export class User {
|
|
|
2091
2108
|
}
|
|
2092
2109
|
}
|
|
2093
2110
|
|
|
2094
|
-
|
|
2111
|
+
async getSubScribe(query: any) {
|
|
2095
2112
|
try {
|
|
2096
2113
|
const querySql: any = [];
|
|
2097
2114
|
query.page = query.page ?? 0;
|
|
@@ -2145,7 +2162,7 @@ export class User {
|
|
|
2145
2162
|
}
|
|
2146
2163
|
}
|
|
2147
2164
|
|
|
2148
|
-
|
|
2165
|
+
async getFCM(query: any) {
|
|
2149
2166
|
try {
|
|
2150
2167
|
query.page = query.page ?? 0;
|
|
2151
2168
|
query.limit = query.limit ?? 50;
|
|
@@ -2174,7 +2191,7 @@ export class User {
|
|
|
2174
2191
|
}
|
|
2175
2192
|
}
|
|
2176
2193
|
|
|
2177
|
-
|
|
2194
|
+
async deleteUser(query: { id?: string; email?: string }) {
|
|
2178
2195
|
try {
|
|
2179
2196
|
//確保單一進來的元素不會被解析成字串
|
|
2180
2197
|
if (query.id) {
|
|
@@ -2200,7 +2217,7 @@ export class User {
|
|
|
2200
2217
|
}
|
|
2201
2218
|
}
|
|
2202
2219
|
|
|
2203
|
-
|
|
2220
|
+
async updateUserData(userID: string, par: any, manager: boolean = false) {
|
|
2204
2221
|
const getUser = await db.query(
|
|
2205
2222
|
`SELECT *
|
|
2206
2223
|
FROM \`${this.app}\`.t_user
|
|
@@ -2302,8 +2319,7 @@ export class User {
|
|
|
2302
2319
|
}
|
|
2303
2320
|
}
|
|
2304
2321
|
|
|
2305
|
-
|
|
2306
|
-
par.status = blockCheck ? 0 : 1;
|
|
2322
|
+
par.status = User.typeMap[par.userData.type as 'block' | 'normal' | 'watch'] ?? User.typeMap.normal;
|
|
2307
2323
|
|
|
2308
2324
|
if (par.userData.phone) {
|
|
2309
2325
|
await db.query(
|
|
@@ -2366,7 +2382,7 @@ export class User {
|
|
|
2366
2382
|
}
|
|
2367
2383
|
}
|
|
2368
2384
|
|
|
2369
|
-
|
|
2385
|
+
async batchGetUser(userId: string[]) {
|
|
2370
2386
|
try {
|
|
2371
2387
|
const sql = `SELECT *
|
|
2372
2388
|
FROM \`${this.app}\`.t_user
|
|
@@ -2406,7 +2422,7 @@ export class User {
|
|
|
2406
2422
|
}
|
|
2407
2423
|
}
|
|
2408
2424
|
|
|
2409
|
-
|
|
2425
|
+
async batchUpdateUserData(trackName: string, users: { id: string; data: any }[]) {
|
|
2410
2426
|
try {
|
|
2411
2427
|
const stack: Stack = {
|
|
2412
2428
|
appName: this.app as string,
|
|
@@ -2442,7 +2458,7 @@ export class User {
|
|
|
2442
2458
|
}
|
|
2443
2459
|
}
|
|
2444
2460
|
|
|
2445
|
-
|
|
2461
|
+
async batchAddtag(userId: string[], tags: string[]) {
|
|
2446
2462
|
try {
|
|
2447
2463
|
const users = await this.batchGetUser(userId);
|
|
2448
2464
|
|
|
@@ -2461,7 +2477,7 @@ export class User {
|
|
|
2461
2477
|
}
|
|
2462
2478
|
}
|
|
2463
2479
|
|
|
2464
|
-
|
|
2480
|
+
async batchRemovetag(userId: string[], tags: string[]) {
|
|
2465
2481
|
try {
|
|
2466
2482
|
const users = await this.batchGetUser(userId);
|
|
2467
2483
|
const postMap: Map<string, boolean> = new Map(tags.map(tag => [tag, true]));
|
|
@@ -2481,7 +2497,7 @@ export class User {
|
|
|
2481
2497
|
}
|
|
2482
2498
|
}
|
|
2483
2499
|
|
|
2484
|
-
|
|
2500
|
+
async batchManualLevel(userId: string[], level: string[]) {
|
|
2485
2501
|
try {
|
|
2486
2502
|
const users = await this.batchGetUser(userId);
|
|
2487
2503
|
|
|
@@ -2501,7 +2517,7 @@ export class User {
|
|
|
2501
2517
|
}
|
|
2502
2518
|
}
|
|
2503
2519
|
|
|
2504
|
-
|
|
2520
|
+
async clearUselessData(userData: any, manager: boolean) {
|
|
2505
2521
|
let config = await App.getAdConfig(this.app, 'glitterUserForm');
|
|
2506
2522
|
let register_form =
|
|
2507
2523
|
(
|
|
@@ -2534,7 +2550,7 @@ export class User {
|
|
|
2534
2550
|
});
|
|
2535
2551
|
}
|
|
2536
2552
|
|
|
2537
|
-
|
|
2553
|
+
async checkUpdate(cf: { updateUserData: any; manager: boolean; userID: string }) {
|
|
2538
2554
|
let originUserData = (
|
|
2539
2555
|
await db.query(
|
|
2540
2556
|
`select userData
|
|
@@ -2560,9 +2576,9 @@ export class User {
|
|
|
2560
2576
|
return originUserData;
|
|
2561
2577
|
}
|
|
2562
2578
|
|
|
2563
|
-
|
|
2579
|
+
async resetPwd(user_id_and_account: string, newPwd: string) {
|
|
2564
2580
|
try {
|
|
2565
|
-
|
|
2581
|
+
await db.query(
|
|
2566
2582
|
`update \`${this.app}\`.t_user
|
|
2567
2583
|
SET ?
|
|
2568
2584
|
WHERE 1 = 1
|
|
@@ -2573,23 +2589,23 @@ export class User {
|
|
|
2573
2589
|
},
|
|
2574
2590
|
user_id_and_account,
|
|
2575
2591
|
]
|
|
2576
|
-
)
|
|
2592
|
+
);
|
|
2577
2593
|
return {
|
|
2578
2594
|
result: true,
|
|
2579
2595
|
};
|
|
2580
2596
|
} catch (e) {
|
|
2581
|
-
throw exception.BadRequestError('BAD_REQUEST', '
|
|
2597
|
+
throw exception.BadRequestError('BAD_REQUEST', 'resetPwd Error:' + e, null);
|
|
2582
2598
|
}
|
|
2583
2599
|
}
|
|
2584
2600
|
|
|
2585
|
-
|
|
2601
|
+
async resetPwdNeedCheck(userID: string, pwd: string, newPwd: string) {
|
|
2586
2602
|
try {
|
|
2587
2603
|
const data: any = (
|
|
2588
2604
|
(await db.execute(
|
|
2589
2605
|
`select *
|
|
2590
2606
|
from \`${this.app}\`.t_user
|
|
2591
2607
|
where userID = ?
|
|
2592
|
-
|
|
2608
|
+
and status <> 0`,
|
|
2593
2609
|
[userID]
|
|
2594
2610
|
)) as any
|
|
2595
2611
|
)[0];
|
|
@@ -2617,7 +2633,7 @@ export class User {
|
|
|
2617
2633
|
}
|
|
2618
2634
|
}
|
|
2619
2635
|
|
|
2620
|
-
|
|
2636
|
+
async updateAccountBack(token: string) {
|
|
2621
2637
|
try {
|
|
2622
2638
|
const sql = `select userData
|
|
2623
2639
|
from \`${this.app}\`.t_user
|
|
@@ -2634,7 +2650,7 @@ export class User {
|
|
|
2634
2650
|
}
|
|
2635
2651
|
}
|
|
2636
2652
|
|
|
2637
|
-
|
|
2653
|
+
async verifyPASS(token: string) {
|
|
2638
2654
|
try {
|
|
2639
2655
|
const par = {
|
|
2640
2656
|
status: 1,
|
|
@@ -2651,7 +2667,7 @@ export class User {
|
|
|
2651
2667
|
}
|
|
2652
2668
|
}
|
|
2653
2669
|
|
|
2654
|
-
|
|
2670
|
+
async checkUserExists(account: string) {
|
|
2655
2671
|
try {
|
|
2656
2672
|
return (
|
|
2657
2673
|
(
|
|
@@ -2669,7 +2685,7 @@ export class User {
|
|
|
2669
2685
|
}
|
|
2670
2686
|
}
|
|
2671
2687
|
|
|
2672
|
-
|
|
2688
|
+
async checkMailAndPhoneExists(
|
|
2673
2689
|
email?: string,
|
|
2674
2690
|
phone?: string
|
|
2675
2691
|
): Promise<{
|
|
@@ -2717,7 +2733,7 @@ export class User {
|
|
|
2717
2733
|
}
|
|
2718
2734
|
}
|
|
2719
2735
|
|
|
2720
|
-
|
|
2736
|
+
async checkUserIdExists(id: number) {
|
|
2721
2737
|
try {
|
|
2722
2738
|
const count = (
|
|
2723
2739
|
await db.query(
|
|
@@ -2733,7 +2749,7 @@ export class User {
|
|
|
2733
2749
|
}
|
|
2734
2750
|
}
|
|
2735
2751
|
|
|
2736
|
-
|
|
2752
|
+
async setConfig(config: { key: string; value: any; user_id?: string }) {
|
|
2737
2753
|
try {
|
|
2738
2754
|
if (typeof config.value !== 'string') {
|
|
2739
2755
|
config.value = JSON.stringify(config.value);
|
|
@@ -2775,14 +2791,14 @@ export class User {
|
|
|
2775
2791
|
find_app_301.router = JSON.parse(config.value).list;
|
|
2776
2792
|
}
|
|
2777
2793
|
}
|
|
2778
|
-
User.configData[this.app+config.key+(config.user_id ?? this.token!.userID)]=JSON.parse(config.value)
|
|
2794
|
+
User.configData[this.app + config.key + (config.user_id ?? this.token!.userID)] = JSON.parse(config.value);
|
|
2779
2795
|
} catch (e) {
|
|
2780
2796
|
console.error(e);
|
|
2781
2797
|
throw exception.BadRequestError('ERROR', 'ERROR.' + e, null);
|
|
2782
2798
|
}
|
|
2783
2799
|
}
|
|
2784
2800
|
|
|
2785
|
-
|
|
2801
|
+
async getConfig(config: { key: string; user_id: string }) {
|
|
2786
2802
|
try {
|
|
2787
2803
|
return await db.execute(
|
|
2788
2804
|
`select *
|
|
@@ -2799,32 +2815,32 @@ export class User {
|
|
|
2799
2815
|
}
|
|
2800
2816
|
|
|
2801
2817
|
//CONFIG 的暫存避免頻繁撈取SQL資料
|
|
2802
|
-
|
|
2818
|
+
static configData: any = {};
|
|
2803
2819
|
|
|
2804
|
-
|
|
2805
|
-
const app=this.app;
|
|
2820
|
+
async getConfigV2(config: { key: string; user_id: string }): Promise<any> {
|
|
2821
|
+
const app = this.app;
|
|
2806
2822
|
try {
|
|
2807
|
-
function checkConfigCache(){
|
|
2823
|
+
function checkConfigCache() {
|
|
2808
2824
|
if (
|
|
2809
2825
|
!config.key.split(',').find(dd => {
|
|
2810
|
-
return !User.configData[app+dd + config.user_id];
|
|
2826
|
+
return !User.configData[app + dd + config.user_id];
|
|
2811
2827
|
})
|
|
2812
2828
|
) {
|
|
2813
2829
|
if (config.key.includes(',')) {
|
|
2814
2830
|
return config.key.split(',').map(dd => {
|
|
2815
2831
|
return {
|
|
2816
|
-
key:dd,
|
|
2817
|
-
value:User.configData[app+dd + config.user_id]
|
|
2832
|
+
key: dd,
|
|
2833
|
+
value: User.configData[app + dd + config.user_id],
|
|
2818
2834
|
};
|
|
2819
2835
|
});
|
|
2820
2836
|
} else {
|
|
2821
|
-
return User.configData[app+config.key + config.user_id];
|
|
2837
|
+
return User.configData[app + config.key + config.user_id];
|
|
2822
2838
|
}
|
|
2823
2839
|
}
|
|
2824
2840
|
}
|
|
2825
2841
|
//當有暫存時
|
|
2826
|
-
if(checkConfigCache()){
|
|
2827
|
-
console.log(`[${this.app}] config cache hit`)
|
|
2842
|
+
if (checkConfigCache()) {
|
|
2843
|
+
console.log(`[${this.app}] config cache hit`);
|
|
2828
2844
|
return JSON.parse(JSON.stringify(checkConfigCache()));
|
|
2829
2845
|
}
|
|
2830
2846
|
|
|
@@ -2897,16 +2913,18 @@ export class User {
|
|
|
2897
2913
|
}
|
|
2898
2914
|
|
|
2899
2915
|
if (config.key.includes(',')) {
|
|
2900
|
-
(
|
|
2901
|
-
|
|
2902
|
-
key
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2916
|
+
(
|
|
2917
|
+
await Promise.all(
|
|
2918
|
+
config.key.split(',').map(async dd => ({
|
|
2919
|
+
key: dd,
|
|
2920
|
+
value: await loop(getData.find((d1: any) => d1.key === dd)),
|
|
2921
|
+
}))
|
|
2922
|
+
)
|
|
2923
|
+
).map(dd => {
|
|
2924
|
+
User.configData[app + dd.key + config.user_id] = dd.value;
|
|
2925
|
+
});
|
|
2908
2926
|
} else {
|
|
2909
|
-
User.configData[app+config.key + config.user_id] = await loop(getData[0]);
|
|
2927
|
+
User.configData[app + config.key + config.user_id] = await loop(getData[0]);
|
|
2910
2928
|
}
|
|
2911
2929
|
return JSON.parse(JSON.stringify(checkConfigCache()));
|
|
2912
2930
|
} catch (e) {
|
|
@@ -2915,7 +2933,7 @@ export class User {
|
|
|
2915
2933
|
}
|
|
2916
2934
|
}
|
|
2917
2935
|
|
|
2918
|
-
|
|
2936
|
+
async checkLeakData(key: string, value: any) {
|
|
2919
2937
|
switch (key) {
|
|
2920
2938
|
case 'store-information': {
|
|
2921
2939
|
value.language_setting ??= { def: 'zh-TW', support: ['zh-TW'] };
|
|
@@ -2966,7 +2984,7 @@ export class User {
|
|
|
2966
2984
|
return value;
|
|
2967
2985
|
}
|
|
2968
2986
|
|
|
2969
|
-
|
|
2987
|
+
async checkEmailExists(email: string) {
|
|
2970
2988
|
try {
|
|
2971
2989
|
const count = (
|
|
2972
2990
|
await db.query(
|
|
@@ -2982,7 +3000,7 @@ export class User {
|
|
|
2982
3000
|
}
|
|
2983
3001
|
}
|
|
2984
3002
|
|
|
2985
|
-
|
|
3003
|
+
async checkPhoneExists(phone: string) {
|
|
2986
3004
|
try {
|
|
2987
3005
|
const count = (
|
|
2988
3006
|
await db.query(
|
|
@@ -2998,7 +3016,7 @@ export class User {
|
|
|
2998
3016
|
}
|
|
2999
3017
|
}
|
|
3000
3018
|
|
|
3001
|
-
|
|
3019
|
+
async getUnreadCount() {
|
|
3002
3020
|
try {
|
|
3003
3021
|
const last_read_time = await db.query(
|
|
3004
3022
|
`SELECT value
|
|
@@ -3025,7 +3043,7 @@ export class User {
|
|
|
3025
3043
|
}
|
|
3026
3044
|
}
|
|
3027
3045
|
|
|
3028
|
-
|
|
3046
|
+
async checkAdminPermission() {
|
|
3029
3047
|
try {
|
|
3030
3048
|
const result = await db.query(
|
|
3031
3049
|
`select count(1)
|
|
@@ -3047,7 +3065,7 @@ export class User {
|
|
|
3047
3065
|
} catch (e) {}
|
|
3048
3066
|
}
|
|
3049
3067
|
|
|
3050
|
-
|
|
3068
|
+
async getNotice(cf: { query: any }) {
|
|
3051
3069
|
try {
|
|
3052
3070
|
const query = [`user_id=${this.token?.userID}`];
|
|
3053
3071
|
let last_time_read = 0;
|
|
@@ -3083,7 +3101,7 @@ export class User {
|
|
|
3083
3101
|
}
|
|
3084
3102
|
}
|
|
3085
3103
|
|
|
3086
|
-
|
|
3104
|
+
async forgetPassword(email: string) {
|
|
3087
3105
|
const data = await AutoSendEmail.getDefCompare(this.app, 'auto-email-forget', 'zh-TW');
|
|
3088
3106
|
const code = Tool.randomNumber(6);
|
|
3089
3107
|
await redis.setValue(`forget-${email}`, code);
|
|
@@ -3091,7 +3109,7 @@ export class User {
|
|
|
3091
3109
|
sendmail(`${data.name} <${process.env.smtp}>`, email, data.title, data.content.replace('@{{code}}', code));
|
|
3092
3110
|
}
|
|
3093
3111
|
|
|
3094
|
-
|
|
3112
|
+
static async ipInfo(ip: string) {
|
|
3095
3113
|
try {
|
|
3096
3114
|
let config = {
|
|
3097
3115
|
method: 'get',
|
|
@@ -3125,7 +3143,7 @@ export class User {
|
|
|
3125
3143
|
}
|
|
3126
3144
|
}
|
|
3127
3145
|
|
|
3128
|
-
|
|
3146
|
+
async getCheckoutCountingModeSQL(table?: string) {
|
|
3129
3147
|
const asTable = table ? `${table}.` : '';
|
|
3130
3148
|
const storeInfo = await this.getConfigV2({ key: 'store-information', user_id: 'manager' });
|
|
3131
3149
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voucher.js","sourceRoot":"","sources":["voucher.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AACzC,4EAA2C;AAC3C,8EAAmD;AAGnD,MAAa,OAAO;IAIhB,YAAY,QAAgB,EAAE,KAAa;QACvC,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,OAAY;QAChC,IAAI
|
|
1
|
+
{"version":3,"file":"voucher.js","sourceRoot":"","sources":["voucher.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AACzC,4EAA2C;AAC3C,8EAAmD;AAGnD,MAAa,OAAO;IAIhB,YAAY,QAAgB,EAAE,KAAa;QACvC,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,OAAY;QAChC,IAAI;YACA,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC9C,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,EAAE;gBAC9B,MAAM,IAAI,sBAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC;gBAC9E,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;aAC/C;YACD,OAAO,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;YAClC,MAAM,IAAI,GAAG,MAAM,qBAAE,CAAC,KAAK,CACvB,YAAY,IAAI,CAAC,GAAG;;;8BAGN,SAAS,CAAC,EAAE,EAAE,EAC5B,CAAC,OAAO,CAAC,CACZ,CAAC;YACF,OAAO,IAAI,CAAC;SACf;QAAC,OAAO,CAAC,EAAE;YACR,MAAM,sBAAS,CAAC,eAAe,CAAC,aAAa,EAAE,mBAAmB,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;SACjF;IACL,CAAC;CACJ;AA7BD,0BA6BC"}
|