isite 2021.11.29 → 2021.12.4
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/apps/client-side/site_files/css/fonts.css +40 -3
- package/apps/client-side/site_files/css/layout.css +135 -87
- package/apps/client-side/site_files/css/print.css +11 -3
- package/apps/client-side/site_files/js/site.js +16 -11
- package/apps/client-side/site_files/js/site.min.js +1 -1
- package/apps/security/site_files/html/login_modal.html +8 -22
- package/apps/security/site_files/html/logout_modal.html +7 -18
- package/apps/security/site_files/html/register_modal.html +6 -19
- package/apps/ui-print/site_files/html/image.html +27 -27
- package/apps/ui-print/site_files/html/index.html +21 -26
- package/apps/ui-print/site_files/js/index.js +12 -17
- package/lib/mongodb.js +2 -1
- package/object-options/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
.font-8 {
|
|
2
|
+
font-size: 8px !important;
|
|
3
|
+
}
|
|
4
|
+
.font-9 {
|
|
5
|
+
font-size: 9px !important;
|
|
6
|
+
}
|
|
7
|
+
.font-10 {
|
|
8
|
+
font-size: 10px !important;
|
|
9
|
+
}
|
|
10
|
+
.font-11 {
|
|
11
|
+
font-size: 11px !important;
|
|
12
|
+
}
|
|
13
|
+
.font-12 {
|
|
14
|
+
font-size: 12px !important;
|
|
15
|
+
}
|
|
16
|
+
.font-13 {
|
|
17
|
+
font-size: 13px !important;
|
|
18
|
+
}
|
|
19
|
+
.font-14 {
|
|
20
|
+
font-size: 14px !important;
|
|
21
|
+
}
|
|
22
|
+
.font-15 {
|
|
23
|
+
font-size: 15px !important;
|
|
24
|
+
}
|
|
2
25
|
.font-16 {
|
|
3
26
|
font-size: 16px !important;
|
|
4
27
|
}
|
|
5
|
-
|
|
28
|
+
.font-17 {
|
|
29
|
+
font-size: 17px !important;
|
|
30
|
+
}
|
|
6
31
|
.font-18 {
|
|
7
32
|
font-size: 18px !important;
|
|
8
33
|
}
|
|
34
|
+
.font-19 {
|
|
35
|
+
font-size: 19px !important;
|
|
36
|
+
}
|
|
9
37
|
.font-20 {
|
|
10
|
-
font-size:
|
|
38
|
+
font-size: 20px !important;
|
|
39
|
+
}
|
|
40
|
+
.font-21 {
|
|
41
|
+
font-size: 21px !important;
|
|
11
42
|
}
|
|
12
43
|
.font-22 {
|
|
13
44
|
font-size: 22px !important;
|
|
14
45
|
}
|
|
46
|
+
.font-23 {
|
|
47
|
+
font-size: 23px !important;
|
|
48
|
+
}
|
|
15
49
|
.font-24 {
|
|
16
50
|
font-size: 24px !important;
|
|
17
51
|
}
|
|
52
|
+
.font-25 {
|
|
53
|
+
font-size: 25px !important;
|
|
54
|
+
}
|
|
18
55
|
.font-26 {
|
|
19
56
|
font-size: 26px !important;
|
|
20
57
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
@charset "utf-8";
|
|
2
2
|
|
|
3
3
|
* {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0px;
|
|
6
|
+
line-height: var(--line-height);
|
|
7
|
+
min-height: 1px;
|
|
8
|
+
text-align: var(--text-align);
|
|
9
|
+
direction: var(--direction);
|
|
10
|
+
max-width: 100%;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
html {
|
|
14
|
-
|
|
14
|
+
background-color: var(--body-background);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
body {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
font-family: var(--font-family);
|
|
19
|
+
font-weight: var(--font-weight);
|
|
20
|
+
font-size: var(--font-size);
|
|
21
|
+
line-height: var(--line-height);
|
|
22
|
+
margin-top: var(--body-margin-top);
|
|
23
|
+
margin-bottom: var(--body-margin-bottom);
|
|
24
|
+
color: var(--color);
|
|
25
|
+
background: var(--body-background);
|
|
26
|
+
zoom: var(--zoom);
|
|
27
|
+
user-select: var(--user-select);
|
|
28
|
+
-webkit-user-select: var(--user-select);
|
|
29
|
+
-moz-user-select: var(--user-select);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
h1,
|
|
@@ -34,43 +34,43 @@ h2,
|
|
|
34
34
|
h3,
|
|
35
35
|
h4,
|
|
36
36
|
h5 {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
font-family: var(--font-family);
|
|
38
|
+
font-weight: var(--h-font-weight);
|
|
39
|
+
line-height: var(--line-height);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.loaded {
|
|
43
|
-
|
|
43
|
+
visibility: collapse;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.hidden {
|
|
47
|
-
|
|
47
|
+
display: none !important;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.hide {
|
|
51
|
-
|
|
51
|
+
visibility: collapse;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.container {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
display: block !important;
|
|
56
|
+
width: 100% !important;
|
|
57
|
+
margin: 0 auto !important;
|
|
58
|
+
padding: 10px !important;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.row,
|
|
62
62
|
.row10 {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
display: inline-block;
|
|
64
|
+
width: 100% !important;
|
|
65
|
+
padding: 0px !important;
|
|
66
|
+
margin: 0px !important;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.row::after,
|
|
70
70
|
.row10::after {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
content: '' !important;
|
|
72
|
+
clear: both !important;
|
|
73
|
+
display: table !important;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.col1,
|
|
@@ -97,94 +97,142 @@ h5 {
|
|
|
97
97
|
.col-10,
|
|
98
98
|
.col-11,
|
|
99
99
|
.col-12 {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
vertical-align: top;
|
|
101
|
+
margin: 0px;
|
|
102
|
+
padding: 0px;
|
|
103
|
+
float: var(--float);
|
|
104
|
+
display: inline;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.row .col1 {
|
|
108
|
+
width: calc(1 / 12 * 100%);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.row .col2 {
|
|
112
|
+
width: calc(2 / 12 * 100%);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.row .col3 {
|
|
116
|
+
width: calc(3 / 12 * 100%);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.row .col4 {
|
|
120
|
+
width: calc(4 / 12 * 100%);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.row .col5 {
|
|
124
|
+
width: calc(5 / 12 * 100%);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.row .col6 {
|
|
128
|
+
width: calc(6 / 12 * 100%);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.row .col7 {
|
|
132
|
+
width: calc(7 / 12 * 100%);
|
|
105
133
|
}
|
|
106
134
|
|
|
107
|
-
.row .
|
|
108
|
-
|
|
135
|
+
.row .col8 {
|
|
136
|
+
width: calc(8 / 12 * 100%);
|
|
109
137
|
}
|
|
110
138
|
|
|
111
|
-
.row .
|
|
112
|
-
|
|
139
|
+
.row .col9 {
|
|
140
|
+
width: calc(9 / 12 * 100%);
|
|
113
141
|
}
|
|
114
142
|
|
|
115
|
-
.row .
|
|
116
|
-
|
|
143
|
+
.row .col10 {
|
|
144
|
+
width: calc(10 / 12 * 100%);
|
|
117
145
|
}
|
|
118
146
|
|
|
119
|
-
.row .
|
|
120
|
-
|
|
147
|
+
.row .col11 {
|
|
148
|
+
width: calc(11 / 12 * 100%);
|
|
121
149
|
}
|
|
122
150
|
|
|
123
|
-
.row .
|
|
124
|
-
|
|
151
|
+
.row .col12 {
|
|
152
|
+
width: calc(12 / 12 * 100%);
|
|
125
153
|
}
|
|
126
154
|
|
|
127
|
-
.
|
|
128
|
-
|
|
155
|
+
.col-1 {
|
|
156
|
+
width: calc(0.9 / 12 * 100%);
|
|
129
157
|
}
|
|
130
158
|
|
|
131
|
-
.
|
|
132
|
-
|
|
159
|
+
.col-2 {
|
|
160
|
+
width: calc(1.9 / 12 * 100%);
|
|
133
161
|
}
|
|
134
162
|
|
|
135
|
-
.
|
|
136
|
-
|
|
163
|
+
.col-3 {
|
|
164
|
+
width: calc(2.9 / 12 * 100%);
|
|
137
165
|
}
|
|
138
166
|
|
|
139
|
-
.
|
|
140
|
-
|
|
167
|
+
.col-4 {
|
|
168
|
+
width: calc(3.9 / 12 * 100%);
|
|
141
169
|
}
|
|
142
170
|
|
|
143
|
-
.
|
|
144
|
-
|
|
171
|
+
.col-5 {
|
|
172
|
+
width: calc(4.9 / 12 * 100%);
|
|
145
173
|
}
|
|
146
174
|
|
|
147
|
-
.
|
|
148
|
-
|
|
175
|
+
.col-6 {
|
|
176
|
+
width: calc(5.9 / 12 * 100%);
|
|
149
177
|
}
|
|
150
178
|
|
|
151
|
-
.
|
|
152
|
-
|
|
179
|
+
.col-7 {
|
|
180
|
+
width: calc(6.9 / 12 * 100%);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.col-8 {
|
|
184
|
+
width: calc(7.9 / 12 * 100%);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.col-9 {
|
|
188
|
+
width: calc(8.9 / 12 * 100%);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.col-10 {
|
|
192
|
+
width: calc(9.9 / 12 * 100%);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.col-11 {
|
|
196
|
+
width: calc(10.9 / 12 * 100%);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.col-12 {
|
|
200
|
+
width: calc(11.9 / 12 * 100%);
|
|
153
201
|
}
|
|
154
202
|
|
|
155
203
|
.rtl {
|
|
156
|
-
|
|
204
|
+
direction: rtl;
|
|
157
205
|
}
|
|
158
206
|
|
|
159
207
|
.ltr {
|
|
160
|
-
|
|
208
|
+
direction: ltr;
|
|
161
209
|
}
|
|
162
210
|
|
|
163
211
|
@media screen and (min-width: 768px
|
|
164
212
|
|
|
165
213
|
/*desktop*/) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
214
|
+
.mobile {
|
|
215
|
+
display: none !important;
|
|
216
|
+
}
|
|
169
217
|
}
|
|
170
218
|
|
|
171
219
|
@media screen and (max-width: 768px
|
|
172
220
|
|
|
173
221
|
/*mobile*/) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
222
|
+
.col1,
|
|
223
|
+
.col2,
|
|
224
|
+
.col3,
|
|
225
|
+
.col4,
|
|
226
|
+
.col5,
|
|
227
|
+
.col6,
|
|
228
|
+
.col7,
|
|
229
|
+
.col8,
|
|
230
|
+
.col9 {
|
|
231
|
+
vertical-align: top;
|
|
232
|
+
width: calc(12 / 12 * 100%) !important;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.desktop {
|
|
236
|
+
display: none !important;
|
|
237
|
+
}
|
|
190
238
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.page-a4 {
|
|
6
|
-
width: 210mm !important;
|
|
7
6
|
height: 297mm !important;
|
|
8
7
|
padding: 2mm !important;
|
|
9
8
|
margin: 0mm !important;
|
|
@@ -15,7 +14,6 @@
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
.page-width-a4 {
|
|
18
|
-
width: 210mm;
|
|
19
17
|
padding: 2mm;
|
|
20
18
|
margin: 0mm;
|
|
21
19
|
}
|
|
@@ -27,6 +25,10 @@ body.a4 {
|
|
|
27
25
|
body.a4 {
|
|
28
26
|
height: 297mm;
|
|
29
27
|
}
|
|
28
|
+
body.print-mode{
|
|
29
|
+
padding: 0px !important;
|
|
30
|
+
margin: 2mm !important;
|
|
31
|
+
}
|
|
30
32
|
body.print-mode .hide {
|
|
31
33
|
visibility: visible;
|
|
32
34
|
}
|
|
@@ -39,7 +41,6 @@ body.print-mode .print-only {
|
|
|
39
41
|
}
|
|
40
42
|
body.print-mode .table {
|
|
41
43
|
table-layout: fixed;
|
|
42
|
-
max-width: 206mm !important;
|
|
43
44
|
border-collapse: collapse;
|
|
44
45
|
border: 1px solid black;
|
|
45
46
|
font-size: 8pt;
|
|
@@ -66,6 +67,12 @@ body.print-mode textarea {
|
|
|
66
67
|
body.print-mode .small {
|
|
67
68
|
font-size: 6pt;
|
|
68
69
|
}
|
|
70
|
+
|
|
71
|
+
.page {
|
|
72
|
+
page-break-before: always;
|
|
73
|
+
page-break-after: always;
|
|
74
|
+
page-break-inside: avoid !important;
|
|
75
|
+
}
|
|
69
76
|
@media print {
|
|
70
77
|
:root {
|
|
71
78
|
--legend-color: #000;
|
|
@@ -76,6 +83,7 @@ body.print-mode .small {
|
|
|
76
83
|
/* this section always occupies it's own page or pages. */
|
|
77
84
|
page-break-before: always;
|
|
78
85
|
page-break-after: always;
|
|
86
|
+
page-break-inside: avoid !important;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
.print-break {
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
Accept: 'application/json',
|
|
228
228
|
'Content-Type': 'application/json',
|
|
229
229
|
};
|
|
230
|
-
|
|
230
|
+
op.url = site.handle_url(op.url);
|
|
231
231
|
fetch(op.url, {
|
|
232
232
|
mode: 'cors',
|
|
233
233
|
method: 'get',
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
url: op,
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
|
|
254
|
+
op.url = site.handle_url(op.url);
|
|
255
255
|
fetch(op.url, {
|
|
256
256
|
mode: 'cors',
|
|
257
257
|
method: 'get',
|
|
@@ -290,19 +290,22 @@
|
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
op.data = op.data ||
|
|
294
|
-
|
|
295
|
-
xInfo: 'No Data',
|
|
296
|
-
};
|
|
293
|
+
op.data = op.data || op.body;
|
|
294
|
+
delete op.body;
|
|
297
295
|
|
|
298
|
-
|
|
296
|
+
if (op.data && typeof op.data == 'object') {
|
|
297
|
+
op.data = JSON.stringify(op.data);
|
|
298
|
+
}
|
|
299
299
|
|
|
300
300
|
op.headers = op.headers || {
|
|
301
301
|
Accept: 'application/json',
|
|
302
302
|
'Content-Type': 'application/json',
|
|
303
|
-
'Content-Length': body.length.toString(),
|
|
304
303
|
};
|
|
305
304
|
|
|
305
|
+
if (op.data && typeof op.data == 'string') {
|
|
306
|
+
op.headers['Content-Length'] = op.data.length.toString();
|
|
307
|
+
}
|
|
308
|
+
|
|
306
309
|
try {
|
|
307
310
|
op.headers['Cookie'] = document.cookie;
|
|
308
311
|
} catch (error) {
|
|
@@ -315,15 +318,17 @@
|
|
|
315
318
|
op.url = site.handle_url(op.url);
|
|
316
319
|
|
|
317
320
|
if (window.SOCIALBROWSER && window.SOCIALBROWSER.fetchJson) {
|
|
321
|
+
console.log(' ( SOCIALBROWSER.fetchJson ) ', op);
|
|
318
322
|
SOCIALBROWSER.fetchJson(op, (data) => {
|
|
319
323
|
callback(data);
|
|
324
|
+
console.log(' ( SOCIALBROWSER.fetchJson callback ) ', data);
|
|
320
325
|
});
|
|
321
326
|
} else {
|
|
322
327
|
fetch(op.url, {
|
|
323
328
|
mode: op.mode,
|
|
324
329
|
method: op.method,
|
|
325
330
|
headers: op.headers,
|
|
326
|
-
body:
|
|
331
|
+
body: op.data,
|
|
327
332
|
redirect: op.redirect,
|
|
328
333
|
})
|
|
329
334
|
.then((res) => res.json())
|
|
@@ -1079,9 +1084,9 @@
|
|
|
1079
1084
|
text: options.text,
|
|
1080
1085
|
width: options.width || 256,
|
|
1081
1086
|
height: options.height || 256,
|
|
1082
|
-
colorDark: options.colorDark || '#
|
|
1087
|
+
colorDark: options.colorDark || '#345BD1',
|
|
1083
1088
|
colorLight: options.colorLight || '#ffffff',
|
|
1084
|
-
correctLevel: options.correctLevel || QRCode.CorrectLevel.
|
|
1089
|
+
correctLevel: options.correctLevel || QRCode.CorrectLevel.L,
|
|
1085
1090
|
});
|
|
1086
1091
|
}
|
|
1087
1092
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t,n,r){function o(e){return e?("string"!=typeof e&&(e=e.toString()),e.replace(/[\/\\^$*+?.()\[\]{}]/g,"\\$&")):""}function a(e,t){let n="";return g.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function l(e,t){let n="";return 11==e?g.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?g.forEach(r=>{r.n==e&&(n=r.i0[t])}):(g.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),g.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=f.strings.space[t]+f.strings.and[t]:n+="",n+=r.i1[t])})),n}function s(e,t){let n="";g.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+f.strings.space[t])});let r=l(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function c(e,t){let n="";g.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+f.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function u(e,t){let n=l(e.substring(0,2),t)+f.strings.space[t];1==e[0]?n+=f.strings[10][t]+f.strings.space[t]:n+=f.strings[20][t]+f.strings.space[t];let r=s(e.substring(2),t);return r&&(n+=f.strings.and[t]+r),n}if(String.prototype.test||(String.prototype.test=function(e,t="gium"){try{return new RegExp(e,t).test(this)}catch(e){return!1}}),String.prototype.like||(String.prototype.like=function(e){if(!e)return!1;let t=!1;return e.split("|").forEach(e=>{e=e.split("*"),e.forEach((t,n)=>{e[n]=o(t)}),e=e.join(".*"),this.test("^"+e+"$","gium")&&(t=!0)}),t}),String.prototype.contains||(String.prototype.contains=function(e){let t=!1;return e?(e.split("|").forEach(e=>{e&&this.test("^.*"+o(e)+".*$","gium")&&(t=!0)}),t):t}),"object"==typeof SOCIALBROWSER){if(SOCIALBROWSER.var=SOCIALBROWSER.var||{},SOCIALBROWSER.var.white_list=SOCIALBROWSER.var.white_list||[],t.location.hostname){let e=`*${t.location.hostname}*`,n=!1;SOCIALBROWSER.var.white_list.forEach(t=>{t.url==e&&(n=!0)}),n||(SOCIALBROWSER.var.white_list.push({url:e}),SOCIALBROWSER.call("set_var",{name:"white_list",data:SOCIALBROWSER.var.white_list}))}SOCIALBROWSER.var.blocking=SOCIALBROWSER.var.blocking||{},SOCIALBROWSER.var.blocking.block_ads=!1,SOCIALBROWSER.var.blocking.block_empty_iframe=!1,SOCIALBROWSER.var.blocking.remove_external_iframe=!1,SOCIALBROWSER.var.blocking.skip_video_ads=!1,SOCIALBROWSER.var.blocking.popup=SOCIALBROWSER.var.blocking.popup||{},SOCIALBROWSER.var.blocking.popup.allow_external=!0,SOCIALBROWSER.var.blocking.popup.allow_internal=!0,SOCIALBROWSER.var.blocking.javascript=SOCIALBROWSER.var.blocking.javascript||{},SOCIALBROWSER.var.blocking.javascript.block_window_open=!1,SOCIALBROWSER.var.blocking.javascript.block_eval=!1,SOCIALBROWSER.var.blocking.javascript.block_console_output=!1}let f={render:function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},html:function(e,t){return Mustache.render(e,t)},getUniqueObjects:function(e,t){const n=e.map(e=>e[t]).map((e,t,n)=>n.indexOf(e)===t&&t).filter(t=>e[t]).map(t=>e[t]);return n},$:function(e){let n=t.querySelectorAll(e);return n}},p=999999;f.showModal=function(t){r(t).click(()=>{r("popup").hide()}),p++;let n=f.$(t);if(0===n.length)return;n[0].style.zIndex=p,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){f.hideModal(t)});let i=f.$(t+" i-control input");i.length>0&&i[0].focus(),f.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){f.hideModal(t)})}),f.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},f.hideModal=function(e){r("popup").hide();let t=f.$(e);t.length>0&&(t[0].style.display="none")},f.eventList=[],f.on=function(e,t){t=t||function(){},f.eventList.push({name:e,callback:t})},f.call=function(e,t){for(var n=0;n<f.eventList.length;n++){var r=f.eventList[n];r.name==e&&r.callback(t)}},f.translate=function(e,t){"string"==typeof e&&(e={text:e,lang:"ar"}),e.url=`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${e.lang}&dt=t&dt=bd&dj=1&q=${e.text}`,f.getData(e,t)},f.getData=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},fetch(e.url,{mode:"cors",method:"get",headers:e.headers}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})},f.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},f.handle_url=function(t){if("string"!=typeof t)return t;if(t=t.trim(),t.like("http*")||0===t.indexOf("//")||0===t.indexOf("data:"))t=t;else if(0===t.indexOf("/"))t=e.location.origin+t;else if(t.split("?")[0].split(".").length<3){let n=e.location.pathname.split("/").pop();t=e.location.origin+e.location.pathname.replace(n,"")+t}return t},f.postData=function(n,r,o){r=r||function(){},o=o||function(){},"string"==typeof n&&(n={url:n}),n.data=n.data||n.body||{xInfo:"No Data"};let i=JSON.stringify(n.data);n.headers=n.headers||{Accept:"application/json","Content-Type":"application/json","Content-Length":i.length.toString()};try{n.headers.Cookie=t.cookie}catch(o){console.log(o)}n.method="post",n.redirect="follow",n.mode="cors",n.url=f.handle_url(n.url),e.SOCIALBROWSER&&e.SOCIALBROWSER.fetchJson?SOCIALBROWSER.fetchJson(n,e=>{r(e)}):fetch(n.url,{mode:n.mode,method:n.method,headers:n.headers,body:i,redirect:n.redirect}).then(e=>e.json()).then(e=>{r(e)}).catch(e=>{o(e)})},f.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.toDateTime=function(e){return e?new Date(e):new Date},f.toDateX=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},f.toDateXT=function(e){let t=f.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateXF=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateOnly=function(e){let t=f.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},f.toDateT=function(e){return f.toDateOnly(e).getTime()},f.toDateF=function(e){return f.toDateTime(e).getTime()},f.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},f.addSubZero=function(e,t){let n=t;if(2==e.toString().split(".").length){e.toString().split(".")[1].length;e=e.toString()}else e=e.toString()+".";for(let t=0;t<n;t++)e=e.toString()+0;return e},f.fixed=2,f.to_number=f.toNumber=function(e,t){let n=t||f.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},f.to_float=f.toFloat=function(e){return e?parseFloat(e):0},f.to_int=f.toInt=function(e){return e?parseInt(e):0},f.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&f.$base64Numbers.push(e);f.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),f.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),f.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=f.toJson(e)),btoa(unescape(encodeURIComponent(e))))),f.fromBase64=(e=>typeof e===n||null===e||""===e?"":decodeURIComponent(o(atob(e)))),f.to123=(e=>{e=f.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=f.$base64Numbers[f.$base64Letter.indexOf(r)]}return t}),f.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=f.$base64Numbers.indexOf(parseInt(r));t+=f.$base64Letter[o],n++}return t=f.fromBase64(t),t}),f.typeOf=f.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.showTabContent=function(e,n){let r=t.querySelectorAll(".tab-content");for(i=0;i<r.length;i++)r[i].style.display="none";let o=t.querySelectorAll(".tab-link");for(i=0;i<o.length;i++)o[i].className=o[i].className.replace(" active","");t.querySelectorAll(n+".tab-content").forEach(e=>{e.style.display="inline-block"}),e&&(e.currentTarget.className+=" active")},f.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},f.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<Object.getOwnPropertyNames(e).length;n++){let r=Object.getOwnPropertyNames(e)[n];t+="<tr>",t+=`<td><p> ${r} </p></td>`,"Object"==f.typeOf(e[r])||"Array"==f.typeOf(e[r])?t+=`<td><p> ${f.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==f.typeOf(e[n])||"Array"==f.typeOf(e[n])?t+=`<tr><td><p>${f.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},f.vControles=[],f.validated=function(e){const n={ok:!0,messages:[]};f.vControles.forEach(e=>{e.el.style.border=e.border}),f.vControles=[],e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{const t=e.style.border,r=e.getAttribute("v"),o=r.split(" ");o.forEach(r=>{if(r=r.toLowerCase().trim(),"r"===r)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName||e.value&&!e.value.like("*undefined*")||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(r.like("ml*")){const o=parseInt(r.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+o,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+o}))}else if(r.like("ll*")){const o=parseInt(r.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+o,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+o}))}else if(r.like("l*")){const o=parseInt(r.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===o||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be = "+o,ar:"عدد الاحرف يجب ان يساوى "+o}))}})}),n};let g=[{n:1,i0:{ar:"واحد"},i1:{ar:"عشرة"},i2:{ar:"مائة"},i3:{ar:"الف"},i4:{ar:"عشرة الاف"}},{n:2,i0:{ar:"اثنان "},i1:{ar:"عشرون"},i2:{ar:"مائتان"},i3:{ar:"الفان"},i4:{ar:"عشرون الف"}},{n:3,i0:{ar:"ثلاثة"},i1:{ar:"ثلاثون"},i2:{ar:"ثلاثمائة"},i3:{ar:"ثلاث الاف"},i4:{ar:"ثلاثون الف"}},{n:4,i0:{ar:"اربعة"},i1:{ar:"اربعون"},i2:{ar:"اربعة مائة"},i3:{ar:"اربعة الاف"},i4:{ar:"اربعون الف"}},{n:5,i0:{ar:"خمسة"},i1:{ar:"خمسون"},i2:{ar:"خمسمائة"},i3:{ar:"خمسة الاف"},i4:{ar:"خمسون الف"}},{n:6,i0:{ar:"ستة"},i1:{ar:"ستون"},i2:{ar:"ستة مائة"},i3:{ar:"ستة الااف"},i4:{ar:"ستون الف"}},{n:7,i0:{ar:"سبعة"},i1:{ar:"سبعون"},i2:{ar:"سبعمائة"},i3:{ar:"سبعة الااف"},i4:{ar:"سبعون الف"}},{n:8,i0:{ar:"ثمانية"},i1:{ar:"ثمانون"},i2:{ar:"ثمانمائة"},i3:{ar:"ثمان الااف"},i4:{ar:"ثمانون الف"}},{n:9,i0:{ar:"تسعة"},i1:{ar:"تسعون"},i2:{ar:"تسعمائة"},i3:{ar:"تسعة الااف"},i4:{ar:"تسعون الف"}},{n:11,i0:{ar:"احدى عشر"}},{n:12,i0:{ar:"اثنى عشر"}}];f.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},f.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";if(1==n.length)o=a(n,t);else if(2==n.length)o=l(n,t);else if(3==n.length)o=s(n,t);else if(4==n.length)o=c(n,t);else if(5==n.length)o=u(n,t);else if(6==n.length){o=l(n.substring(0,2),t)+f.strings.space[t],1==n[0]?o+=f.strings[10][t]+f.strings.space[t]:o+=f.strings[20][t]+f.strings.space[t];let e=s(n.substring(2),t);e&&(o+=f.strings.and[t]+e)}let i="";return r&&(1==r.length&&(r+="0"),1==r.length?i=a(r,t)+f.strings.from10[t]:2==r.length?i=l(r,t)+f.strings.from100[t]:3==r.length&&(i=s(r,t)+f.strings.from1000[t])),o+=f.strings.currency[t],i&&(o+=f.strings.space[t]+f.strings.and[t]+f.strings.space[t]+i),o},f.ws=function(t,n){if("WebSocket"in e){"string"==typeof t&&(t={url:t});var r=new WebSocket(t.url);let e={ws:r,options:t,closed:!0,onError:e=>{console.log("server.onError Not Implement ... ")},onClose:function(e){e.wasClean?console.log(`[ws closed] Connection closed cleanly, code=${e.code} reason=${e.reason}`):(console.warn("[ws closed] Connection died"),setTimeout(()=>{f.ws(t,n)},5e3))},onOpen:()=>{console.log("server.onOpen Not Implement ... ")},onMessage:()=>{console.log("server.onMessage Not Implement ... ")},onData:()=>{console.log("server.onData Not Implement ... ")},send:function(e){if(this.closed)return!1;"object"!=typeof e&&(e={type:"text",content:e}),this.ws.send(JSON.stringify(e))}};r.onerror=function(t){e.onError(t)},r.onclose=function(t){e.closed=!0,e.onClose(t)},r.onopen=function(){e.closed=!1,e.onOpen()},r.onmessage=function(t){t instanceof Blob?e.onData(t):e.onMessage(JSON.parse(t.data))},n(e)}else console.error("WebSocket Not Supported")},f.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector);console.error("qrcode need {selector , text}")},f.qrcode=function(e){if(!e||!e.selector||!e.text)return void console.error("qrcode need {selector , text}");let n="string"==typeof e.selector?t.querySelector(e.selector):e.selector;return n?(n.innerHTML="",192<=e.text.length<=217&&(e.text=e.text.padEnd(220)),new QRCode(n,{text:e.text,width:e.width||256,height:e.height||256,colorDark:e.colorDark||"#000000",colorLight:e.colorLight||"#ffffff",correctLevel:e.correctLevel||QRCode.CorrectLevel.H})):void 0},e.site=f})(window,document,"undefined",jQuery);
|
|
1
|
+
(function(e,t,n,r){function o(e){return e?("string"!=typeof e&&(e=e.toString()),e.replace(/[\/\\^$*+?.()\[\]{}]/g,"\\$&")):""}function a(e,t){let n="";return d.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function l(e,t){let n="";return 11==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):(d.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),d.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=f.strings.space[t]+f.strings.and[t]:n+="",n+=r.i1[t])})),n}function s(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+f.strings.space[t])});let r=l(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function c(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+f.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function u(e,t){let n=l(e.substring(0,2),t)+f.strings.space[t];1==e[0]?n+=f.strings[10][t]+f.strings.space[t]:n+=f.strings[20][t]+f.strings.space[t];let r=s(e.substring(2),t);return r&&(n+=f.strings.and[t]+r),n}if(String.prototype.test||(String.prototype.test=function(e,t="gium"){try{return new RegExp(e,t).test(this)}catch(e){return!1}}),String.prototype.like||(String.prototype.like=function(e){if(!e)return!1;let t=!1;return e.split("|").forEach(e=>{e=e.split("*"),e.forEach((t,n)=>{e[n]=o(t)}),e=e.join(".*"),this.test("^"+e+"$","gium")&&(t=!0)}),t}),String.prototype.contains||(String.prototype.contains=function(e){let t=!1;return e?(e.split("|").forEach(e=>{e&&this.test("^.*"+o(e)+".*$","gium")&&(t=!0)}),t):t}),"object"==typeof SOCIALBROWSER){if(SOCIALBROWSER.var=SOCIALBROWSER.var||{},SOCIALBROWSER.var.white_list=SOCIALBROWSER.var.white_list||[],t.location.hostname){let e=`*${t.location.hostname}*`,n=!1;SOCIALBROWSER.var.white_list.forEach(t=>{t.url==e&&(n=!0)}),n||(SOCIALBROWSER.var.white_list.push({url:e}),SOCIALBROWSER.call("set_var",{name:"white_list",data:SOCIALBROWSER.var.white_list}))}SOCIALBROWSER.var.blocking=SOCIALBROWSER.var.blocking||{},SOCIALBROWSER.var.blocking.block_ads=!1,SOCIALBROWSER.var.blocking.block_empty_iframe=!1,SOCIALBROWSER.var.blocking.remove_external_iframe=!1,SOCIALBROWSER.var.blocking.skip_video_ads=!1,SOCIALBROWSER.var.blocking.popup=SOCIALBROWSER.var.blocking.popup||{},SOCIALBROWSER.var.blocking.popup.allow_external=!0,SOCIALBROWSER.var.blocking.popup.allow_internal=!0,SOCIALBROWSER.var.blocking.javascript=SOCIALBROWSER.var.blocking.javascript||{},SOCIALBROWSER.var.blocking.javascript.block_window_open=!1,SOCIALBROWSER.var.blocking.javascript.block_eval=!1,SOCIALBROWSER.var.blocking.javascript.block_console_output=!1}let f={render:function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},html:function(e,t){return Mustache.render(e,t)},getUniqueObjects:function(e,t){const n=e.map(e=>e[t]).map((e,t,n)=>n.indexOf(e)===t&&t).filter(t=>e[t]).map(t=>e[t]);return n},$:function(e){let n=t.querySelectorAll(e);return n}},p=999999;f.showModal=function(t){r(t).click(()=>{r("popup").hide()}),p++;let n=f.$(t);if(0===n.length)return;n[0].style.zIndex=p,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){f.hideModal(t)});let a=f.$(t+" i-control input");a.length>0&&a[0].focus(),f.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){f.hideModal(t)})}),f.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},f.hideModal=function(e){r("popup").hide();let t=f.$(e);t.length>0&&(t[0].style.display="none")},f.eventList=[],f.on=function(e,t){t=t||function(){},f.eventList.push({name:e,callback:t})},f.call=function(e,t){for(var n=0;n<f.eventList.length;n++){var r=f.eventList[n];r.name==e&&r.callback(t)}},f.translate=function(e,t){"string"==typeof e&&(e={text:e,lang:"ar"}),e.url=`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${e.lang}&dt=t&dt=bd&dj=1&q=${e.text}`,f.getData(e,t)},f.getData=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get",headers:e.headers}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})},f.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},f.handle_url=function(t){if("string"!=typeof t)return t;if(t=t.trim(),t.like("http*")||0===t.indexOf("//")||0===t.indexOf("data:"))t=t;else if(0===t.indexOf("/"))t=e.location.origin+t;else if(t.split("?")[0].split(".").length<3){let n=e.location.pathname.split("/").pop();t=e.location.origin+e.location.pathname.replace(n,"")+t}return t},f.postData=function(n,r,o){r=r||function(){},o=o||function(){},"string"==typeof n&&(n={url:n}),n.data=n.data||n.body,delete n.body,n.data&&"object"==typeof n.data&&(n.data=JSON.stringify(n.data)),n.headers=n.headers||{Accept:"application/json","Content-Type":"application/json"},n.data&&"string"==typeof n.data&&(n.headers["Content-Length"]=n.data.length.toString());try{n.headers.Cookie=t.cookie}catch(o){console.log(o)}n.method="post",n.redirect="follow",n.mode="cors",n.url=f.handle_url(n.url),e.SOCIALBROWSER&&e.SOCIALBROWSER.fetchJson?(console.log(" ( SOCIALBROWSER.fetchJson ) ",n),SOCIALBROWSER.fetchJson(n,e=>{r(e),console.log(" ( SOCIALBROWSER.fetchJson callback ) ",e)})):fetch(n.url,{mode:n.mode,method:n.method,headers:n.headers,body:n.data,redirect:n.redirect}).then(e=>e.json()).then(e=>{r(e)}).catch(e=>{o(e)})},f.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.toDateTime=function(e){return e?new Date(e):new Date},f.toDateX=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},f.toDateXT=function(e){let t=f.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateXF=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateOnly=function(e){let t=f.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},f.toDateT=function(e){return f.toDateOnly(e).getTime()},f.toDateF=function(e){return f.toDateTime(e).getTime()},f.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},f.addSubZero=function(e,t){let n=t;if(2==e.toString().split(".").length){e.toString().split(".")[1].length;e=e.toString()}else e=e.toString()+".";for(let t=0;t<n;t++)e=e.toString()+0;return e},f.fixed=2,f.to_number=f.toNumber=function(e,t){let n=t||f.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},f.to_float=f.toFloat=function(e){return e?parseFloat(e):0},f.to_int=f.toInt=function(e){return e?parseInt(e):0},f.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&f.$base64Numbers.push(e);f.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),f.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),f.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=f.toJson(e)),btoa(unescape(encodeURIComponent(e))))),f.fromBase64=(e=>typeof e===n||null===e||""===e?"":decodeURIComponent(o(atob(e)))),f.to123=(e=>{e=f.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=f.$base64Numbers[f.$base64Letter.indexOf(r)]}return t}),f.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=f.$base64Numbers.indexOf(parseInt(r));t+=f.$base64Letter[o],n++}return t=f.fromBase64(t),t}),f.typeOf=f.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.showTabContent=function(e,n){let r=t.querySelectorAll(".tab-content");for(i=0;i<r.length;i++)r[i].style.display="none";let o=t.querySelectorAll(".tab-link");for(i=0;i<o.length;i++)o[i].className=o[i].className.replace(" active","");t.querySelectorAll(n+".tab-content").forEach(e=>{e.style.display="inline-block"}),e&&(e.currentTarget.className+=" active")},f.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},f.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<Object.getOwnPropertyNames(e).length;n++){let r=Object.getOwnPropertyNames(e)[n];t+="<tr>",t+=`<td><p> ${r} </p></td>`,"Object"==f.typeOf(e[r])||"Array"==f.typeOf(e[r])?t+=`<td><p> ${f.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==f.typeOf(e[n])||"Array"==f.typeOf(e[n])?t+=`<tr><td><p>${f.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},f.vControles=[],f.validated=function(e){const n={ok:!0,messages:[]};f.vControles.forEach(e=>{e.el.style.border=e.border}),f.vControles=[],e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{const t=e.style.border,r=e.getAttribute("v"),o=r.split(" ");o.forEach(r=>{if(r=r.toLowerCase().trim(),"r"===r)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName||e.value&&!e.value.like("*undefined*")||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(r.like("ml*")){const o=parseInt(r.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+o,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+o}))}else if(r.like("ll*")){const o=parseInt(r.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+o,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+o}))}else if(r.like("l*")){const o=parseInt(r.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===o||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be = "+o,ar:"عدد الاحرف يجب ان يساوى "+o}))}})}),n};let d=[{n:1,i0:{ar:"واحد"},i1:{ar:"عشرة"},i2:{ar:"مائة"},i3:{ar:"الف"},i4:{ar:"عشرة الاف"}},{n:2,i0:{ar:"اثنان "},i1:{ar:"عشرون"},i2:{ar:"مائتان"},i3:{ar:"الفان"},i4:{ar:"عشرون الف"}},{n:3,i0:{ar:"ثلاثة"},i1:{ar:"ثلاثون"},i2:{ar:"ثلاثمائة"},i3:{ar:"ثلاث الاف"},i4:{ar:"ثلاثون الف"}},{n:4,i0:{ar:"اربعة"},i1:{ar:"اربعون"},i2:{ar:"اربعة مائة"},i3:{ar:"اربعة الاف"},i4:{ar:"اربعون الف"}},{n:5,i0:{ar:"خمسة"},i1:{ar:"خمسون"},i2:{ar:"خمسمائة"},i3:{ar:"خمسة الاف"},i4:{ar:"خمسون الف"}},{n:6,i0:{ar:"ستة"},i1:{ar:"ستون"},i2:{ar:"ستة مائة"},i3:{ar:"ستة الااف"},i4:{ar:"ستون الف"}},{n:7,i0:{ar:"سبعة"},i1:{ar:"سبعون"},i2:{ar:"سبعمائة"},i3:{ar:"سبعة الااف"},i4:{ar:"سبعون الف"}},{n:8,i0:{ar:"ثمانية"},i1:{ar:"ثمانون"},i2:{ar:"ثمانمائة"},i3:{ar:"ثمان الااف"},i4:{ar:"ثمانون الف"}},{n:9,i0:{ar:"تسعة"},i1:{ar:"تسعون"},i2:{ar:"تسعمائة"},i3:{ar:"تسعة الااف"},i4:{ar:"تسعون الف"}},{n:11,i0:{ar:"احدى عشر"}},{n:12,i0:{ar:"اثنى عشر"}}];f.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},f.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";if(1==n.length)o=a(n,t);else if(2==n.length)o=l(n,t);else if(3==n.length)o=s(n,t);else if(4==n.length)o=c(n,t);else if(5==n.length)o=u(n,t);else if(6==n.length){o=l(n.substring(0,2),t)+f.strings.space[t],1==n[0]?o+=f.strings[10][t]+f.strings.space[t]:o+=f.strings[20][t]+f.strings.space[t];let e=s(n.substring(2),t);e&&(o+=f.strings.and[t]+e)}let i="";return r&&(1==r.length&&(r+="0"),1==r.length?i=a(r,t)+f.strings.from10[t]:2==r.length?i=l(r,t)+f.strings.from100[t]:3==r.length&&(i=s(r,t)+f.strings.from1000[t])),o+=f.strings.currency[t],i&&(o+=f.strings.space[t]+f.strings.and[t]+f.strings.space[t]+i),o},f.ws=function(t,n){if("WebSocket"in e){"string"==typeof t&&(t={url:t});var r=new WebSocket(t.url);let e={ws:r,options:t,closed:!0,onError:e=>{console.log("server.onError Not Implement ... ")},onClose:function(e){e.wasClean?console.log(`[ws closed] Connection closed cleanly, code=${e.code} reason=${e.reason}`):(console.warn("[ws closed] Connection died"),setTimeout(()=>{f.ws(t,n)},5e3))},onOpen:()=>{console.log("server.onOpen Not Implement ... ")},onMessage:()=>{console.log("server.onMessage Not Implement ... ")},onData:()=>{console.log("server.onData Not Implement ... ")},send:function(e){if(this.closed)return!1;"object"!=typeof e&&(e={type:"text",content:e}),this.ws.send(JSON.stringify(e))}};r.onerror=function(t){e.onError(t)},r.onclose=function(t){e.closed=!0,e.onClose(t)},r.onopen=function(){e.closed=!1,e.onOpen()},r.onmessage=function(t){t instanceof Blob?e.onData(t):e.onMessage(JSON.parse(t.data))},n(e)}else console.error("WebSocket Not Supported")},f.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector);console.error("qrcode need {selector , text}")},f.qrcode=function(e){if(!e||!e.selector||!e.text)return void console.error("qrcode need {selector , text}");let n="string"==typeof e.selector?t.querySelector(e.selector):e.selector;return n?(n.innerHTML="",192<=e.text.length<=217&&(e.text=e.text.padEnd(220)),new QRCode(n,{text:e.text,width:e.width||256,height:e.height||256,colorDark:e.colorDark||"#272727",colorLight:e.colorLight||"#ffffff",correctLevel:e.correctLevel||QRCode.CorrectLevel.L})):void 0},e.site=f})(window,document,"undefined",jQuery);
|
|
@@ -1,46 +1,32 @@
|
|
|
1
|
-
|
|
2
1
|
<div data-ng-controller="login" id="loginModal" class="modal small fade" tabindex="-1" role="dialog" fixed>
|
|
3
|
-
|
|
4
2
|
<div class="modal-content">
|
|
5
|
-
|
|
6
3
|
<div class="modal-header">
|
|
7
4
|
<span class="close">×</span>
|
|
8
|
-
<h2 class="text-center"
|
|
5
|
+
<h2 class="text-center"><i class="fa fa-sign-in"></i> ##word.security_login##</h2>
|
|
9
6
|
</div>
|
|
10
7
|
|
|
11
8
|
<div class="modal-body">
|
|
12
|
-
|
|
13
|
-
<h1 ng-show="busy">
|
|
14
|
-
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span>
|
|
15
|
-
</h1>
|
|
9
|
+
<h1 ng-show="busy" class="center"><i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i></h1>
|
|
16
10
|
|
|
17
11
|
<form ng-hide="busy">
|
|
18
12
|
<div class="control">
|
|
19
13
|
<label>##word.security_user_email##</label>
|
|
20
|
-
<input id="userEmail" ng-model="userEmail" type="text"
|
|
14
|
+
<input id="userEmail" ng-model="userEmail" type="text" ng-keydown="tryLogin($event)" />
|
|
21
15
|
</div>
|
|
22
16
|
<div class="control">
|
|
23
17
|
<label>##word.security_user_password##</label>
|
|
24
|
-
<input id="userPassword" ng-model="userPassword" type="password" ng-keydown="tryLogin($event)"
|
|
18
|
+
<input id="userPassword" ng-model="userPassword" type="password" ng-keydown="tryLogin($event)" />
|
|
25
19
|
</div>
|
|
26
|
-
|
|
27
20
|
</form>
|
|
28
21
|
|
|
29
|
-
<p class="yellow"
|
|
30
|
-
|
|
22
|
+
<p class="yellow">{{error}}</p>
|
|
31
23
|
</div>
|
|
32
24
|
<div class="modal-footer center">
|
|
33
|
-
|
|
34
|
-
<a class="btn bg-blue" onclick="site.hideModal('#loginModal')"> <i class="fa fa-times" aria-hidden="true"></i> ##word.close## </a>
|
|
35
|
-
|
|
25
|
+
<a ng-hide="busy" id="loginBtn" ng-click="login()" class="btn bg-green white"> <i class="fa fa-sign-in" aria-hidden="true"></i> ##word.security_login## </a>
|
|
26
|
+
<a class="btn bg-blue white" onclick="site.hideModal('#loginModal')"> <i class="fa fa-times" aria-hidden="true"></i> ##word.close## </a>
|
|
36
27
|
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
28
|
</div>
|
|
41
29
|
<!-- /.modal-content -->
|
|
42
|
-
|
|
43
|
-
|
|
44
30
|
</div>
|
|
45
31
|
<!-- /.modal -->
|
|
46
|
-
<script x-import="security/login.js"></script>
|
|
32
|
+
<script x-import="security/login.js"></script>
|
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
<div data-ng-controller="logout" id="logoutModal" class="modal small" tabindex="-1"
|
|
2
|
-
|
|
1
|
+
<div data-ng-controller="logout" id="logoutModal" class="modal small" tabindex="-1">
|
|
3
2
|
<div class="modal-content">
|
|
4
|
-
|
|
5
3
|
<div class="modal-header">
|
|
6
4
|
<span class="close">×</span>
|
|
7
|
-
<h2 class="text-center"
|
|
5
|
+
<h2 class="text-center"><i class="fa fa-sign-out"></i> ##word.security_logout##</h2>
|
|
8
6
|
</div>
|
|
9
7
|
|
|
10
8
|
<div class="modal-body">
|
|
9
|
+
<h1 class="center" ng-show="busy"><i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span></h1>
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span>
|
|
14
|
-
</h1>
|
|
15
|
-
|
|
16
|
-
<p class="red" >{{error}}</p>
|
|
17
|
-
|
|
11
|
+
<p class="red">{{error}}</p>
|
|
18
12
|
</div>
|
|
19
13
|
<div class="modal-footer center">
|
|
20
|
-
<a class="btn bg-blue" onclick="site.hideModal('#logoutModal')"> <i class="fa fa-times" aria-hidden="true"></i> Close</a>
|
|
21
|
-
<a ng-hide="busy" id="loginBtn" ng-click="logout()" class="btn bg-red"> <i class="fa fa-sign-out" aria-hidden="true"></i> ##word.security_logout## </a>
|
|
14
|
+
<a class="btn bg-blue white" onclick="site.hideModal('#logoutModal')"> <i class="fa fa-times" aria-hidden="true"></i> Close</a>
|
|
15
|
+
<a ng-hide="busy" id="loginBtn" ng-click="logout()" class="btn bg-red white"> <i class="fa fa-sign-out" aria-hidden="true"></i> ##word.security_logout## </a>
|
|
22
16
|
</div>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
17
|
</div>
|
|
27
18
|
<!-- /.modal-content -->
|
|
28
|
-
|
|
29
|
-
|
|
30
19
|
</div>
|
|
31
20
|
<!-- /.modal -->
|
|
32
|
-
<script x-import="security/logout.js"></script>
|
|
21
|
+
<script x-import="security/logout.js"></script>
|
|
@@ -1,45 +1,32 @@
|
|
|
1
|
-
|
|
2
1
|
<div data-ng-controller="register" id="registerModal" class="modal fade small" tabindex="-1" role="dialog" fixed>
|
|
3
|
-
|
|
4
2
|
<div class="modal-content">
|
|
5
|
-
|
|
6
3
|
<div class="modal-header">
|
|
7
4
|
<span class="close">×</span>
|
|
8
|
-
<h2 class="text-center"
|
|
5
|
+
<h2 class="text-center"><i class="fa fa-sign-in"></i> ##word.security_register##</h2>
|
|
9
6
|
</div>
|
|
10
7
|
|
|
11
8
|
<div class="modal-body">
|
|
12
|
-
|
|
13
|
-
<h1 ng-show="busy">
|
|
14
|
-
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span>
|
|
15
|
-
</h1>
|
|
9
|
+
<h1 ng-show="busy" class="center"><i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span></h1>
|
|
16
10
|
|
|
17
11
|
<form ng-hide="busy">
|
|
18
12
|
<div class="control">
|
|
19
13
|
<label>##word.security_user_email##</label>
|
|
20
|
-
<input ng-model="userEmail" type="text"
|
|
14
|
+
<input ng-model="userEmail" type="text" />
|
|
21
15
|
</div>
|
|
22
16
|
<div class="control">
|
|
23
17
|
<label>##word.security_user_password##</label>
|
|
24
|
-
<input ng-model="userPassword" type="password"
|
|
18
|
+
<input ng-model="userPassword" type="password" />
|
|
25
19
|
</div>
|
|
26
|
-
|
|
27
20
|
</form>
|
|
28
21
|
|
|
29
|
-
<p class="yellow"
|
|
30
|
-
|
|
22
|
+
<p class="yellow">{{error}}</p>
|
|
31
23
|
</div>
|
|
32
24
|
<div class="modal-footer center">
|
|
33
25
|
<a class="btn" onclick="site.hideModal('#registerModal')"> <i class="fa fa-times" aria-hidden="true"></i> ##word.close## </a>
|
|
34
26
|
<a ng-hide="busy" id="registerBtn" ng-click="register()" class="btn"> <i class="fa fa-sign-in" aria-hidden="true"></i> ##word.security_register## </a>
|
|
35
27
|
</div>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
28
|
</div>
|
|
40
29
|
<!-- /.modal-content -->
|
|
41
|
-
|
|
42
|
-
|
|
43
30
|
</div>
|
|
44
31
|
<!-- /.modal -->
|
|
45
|
-
<script x-import="security/register.js"></script>
|
|
32
|
+
<script x-import="security/register.js"></script>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
7
|
+
<title>Print</title>
|
|
8
|
+
<style>
|
|
9
|
+
html,
|
|
10
|
+
body {
|
|
11
|
+
margin: 0px;
|
|
12
|
+
padding: 0px;
|
|
13
|
+
}
|
|
14
|
+
img {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: auto;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
<body>
|
|
22
|
+
<img />
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
<script>
|
|
25
|
+
let dataUrl = `##data.content##`;
|
|
26
|
+
document.querySelector('img').src = dataUrl;
|
|
27
|
+
window.addEventListener('load', () => {
|
|
28
|
+
window.print({});
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
</body>
|
|
32
32
|
</html>
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="en"
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
7
|
+
<title>Print</title>
|
|
8
|
+
</head>
|
|
3
9
|
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
8
|
-
<title> Print </title>
|
|
9
|
-
</head>
|
|
10
|
+
<body class="print-mode">
|
|
11
|
+
##data.content##
|
|
10
12
|
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
21
|
-
window.addEventListener('load' , ()=>{
|
|
22
|
-
window.print({})
|
|
23
|
-
})
|
|
24
|
-
/*
|
|
13
|
+
<style></style>
|
|
14
|
+
<script>
|
|
15
|
+
document.querySelectorAll('.not-print').forEach((el) => {
|
|
16
|
+
el.remove();
|
|
17
|
+
});
|
|
18
|
+
window.addEventListener('load', () => {
|
|
19
|
+
window.print({});
|
|
20
|
+
});
|
|
21
|
+
/*
|
|
25
22
|
Repeat table headers in every page if table too large
|
|
26
23
|
use thead & tbody
|
|
27
24
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</
|
|
31
|
-
|
|
32
|
-
</html>
|
|
25
|
+
</script>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -12,7 +12,7 @@ site.print = site.printHTML = function (options) {
|
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
14
|
if (!options.ip) {
|
|
15
|
-
options.ip = '
|
|
15
|
+
options.ip = '127.0.0.1';
|
|
16
16
|
}
|
|
17
17
|
if (!options.port) {
|
|
18
18
|
options.port = '60080';
|
|
@@ -20,6 +20,7 @@ site.print = site.printHTML = function (options) {
|
|
|
20
20
|
|
|
21
21
|
let content = '';
|
|
22
22
|
window.document.querySelectorAll('link[rel=stylesheet]').forEach((l) => {
|
|
23
|
+
l.href = site.handle_url(l.href);
|
|
23
24
|
content += l.outerHTML;
|
|
24
25
|
});
|
|
25
26
|
|
|
@@ -77,15 +78,12 @@ site.print = site.printHTML = function (options) {
|
|
|
77
78
|
})
|
|
78
79
|
.then((res) => res.text())
|
|
79
80
|
.then((html) => {
|
|
81
|
+
options.html = html;
|
|
82
|
+
options.type = 'html';
|
|
80
83
|
site.postData(
|
|
81
84
|
{
|
|
82
85
|
url: `http://${options.ip}:${options.port}/print`,
|
|
83
|
-
data:
|
|
84
|
-
html: html,
|
|
85
|
-
type: 'html',
|
|
86
|
-
printer: options.printer,
|
|
87
|
-
width: options.width ?? 320,
|
|
88
|
-
},
|
|
86
|
+
data: options,
|
|
89
87
|
},
|
|
90
88
|
(res) => {
|
|
91
89
|
console.log(res);
|
|
@@ -135,7 +133,7 @@ site.printAsImage = function (options, callback) {
|
|
|
135
133
|
return false;
|
|
136
134
|
}
|
|
137
135
|
if (!options.ip) {
|
|
138
|
-
options.ip = '
|
|
136
|
+
options.ip = '127.0.0.1';
|
|
139
137
|
}
|
|
140
138
|
if (!options.port) {
|
|
141
139
|
options.port = '60080';
|
|
@@ -152,14 +150,14 @@ site.printAsImage = function (options, callback) {
|
|
|
152
150
|
}
|
|
153
151
|
|
|
154
152
|
domtoimage
|
|
155
|
-
.toPng(node, { quality: 1, bgcolor: '#ffffff' })
|
|
153
|
+
.toPng(node, { quality: 1, bgcolor: '#ffffff', cacheBust: true })
|
|
156
154
|
.then(function (dataUrl) {
|
|
157
155
|
var img = new Image();
|
|
158
156
|
img.src = dataUrl;
|
|
159
157
|
if (callback) {
|
|
160
158
|
callback(img);
|
|
161
159
|
}
|
|
162
|
-
options.
|
|
160
|
+
options.content = dataUrl;
|
|
163
161
|
site.printDataUrl(options);
|
|
164
162
|
site.printAsImageBusy = false;
|
|
165
163
|
})
|
|
@@ -171,7 +169,7 @@ site.printAsImage = function (options, callback) {
|
|
|
171
169
|
|
|
172
170
|
site.printDataUrl = function (options) {
|
|
173
171
|
site.postData(
|
|
174
|
-
{ url: '/api/print', data:
|
|
172
|
+
{ url: '/api/print', data: options },
|
|
175
173
|
(response) => {
|
|
176
174
|
if (response.done) {
|
|
177
175
|
if (options.printer) {
|
|
@@ -181,15 +179,12 @@ site.printDataUrl = function (options) {
|
|
|
181
179
|
})
|
|
182
180
|
.then((res) => res.text())
|
|
183
181
|
.then((html) => {
|
|
182
|
+
options.html = html;
|
|
183
|
+
options.type = 'html';
|
|
184
184
|
site.postData(
|
|
185
185
|
{
|
|
186
186
|
url: `http://${options.ip}:${options.port}/print`,
|
|
187
|
-
data:
|
|
188
|
-
html: html,
|
|
189
|
-
type: 'html',
|
|
190
|
-
printer: options.printer,
|
|
191
|
-
width: options.width ?? 320,
|
|
192
|
-
},
|
|
187
|
+
data: options,
|
|
193
188
|
},
|
|
194
189
|
(res) => {},
|
|
195
190
|
);
|
package/lib/mongodb.js
CHANGED
|
@@ -126,11 +126,12 @@ module.exports = function init(____0) {
|
|
|
126
126
|
|
|
127
127
|
_mongo.connections.push({
|
|
128
128
|
name: name,
|
|
129
|
+
url : db_url,
|
|
129
130
|
db: db,
|
|
130
131
|
client: client,
|
|
131
132
|
connected: !0,
|
|
132
133
|
});
|
|
133
|
-
____0.log('\n ( Connected DB : ' + db_name + ' ) \n');
|
|
134
|
+
____0.log('\n ( Connected DB : ' + db_name + ' ) : ' + db_url + '\n');
|
|
134
135
|
callback(err, db);
|
|
135
136
|
} else {
|
|
136
137
|
err.message += ' , ' + db_url;
|
package/object-options/index.js
CHANGED