isite 2024.12.6 → 2025.1.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.
@@ -38,11 +38,11 @@ module.exports = function (site) {
38
38
  __dirname + '/site_files/js/first.js',
39
39
  __dirname + '/site_files/js/jquery.js',
40
40
  __dirname + '/site_files/js/mustache.js',
41
- __dirname + '/site_files/js/base64.js',
41
+ __dirname + '/site_files/js/base64.min.js',
42
42
  __dirname + '/site_files/js/site.js',
43
- __dirname + '/site_files/js/dom-to-image.js',
43
+ __dirname + '/site_files/js/dom-to-image.min.js',
44
44
  __dirname + '/site_files/js/barcode.js',
45
- __dirname + '/site_files/js/qrcode.js',
45
+ __dirname + '/site_files/js/qrcode.min.js',
46
46
  __dirname + '/site_files/js/angular.min.js',
47
47
  __dirname + '/site_files/js/app.js',
48
48
  __dirname + '/site_files/js/directive-core.js',
@@ -61,11 +61,11 @@ module.exports = function (site) {
61
61
  __dirname + '/site_files/js/first.js',
62
62
  __dirname + '/site_files/js/jquery.js',
63
63
  __dirname + '/site_files/js/mustache.js',
64
- __dirname + '/site_files/js/base64.js',
64
+ __dirname + '/site_files/js/base64.min.js',
65
65
  __dirname + '/site_files/js/site.js',
66
- __dirname + '/site_files/js/dom-to-image.js',
66
+ __dirname + '/site_files/js/dom-to-image.min.js',
67
67
  __dirname + '/site_files/js/barcode.js',
68
- __dirname + '/site_files/js/qrcode.js',
68
+ __dirname + '/site_files/js/qrcode.min.js',
69
69
  __dirname + '/site_files/js/angular.min.js',
70
70
  __dirname + '/site_files/js/app.js',
71
71
  __dirname + '/site_files/js/directive-core.js',
@@ -87,11 +87,11 @@ module.exports = function (site) {
87
87
  __dirname + '/site_files/js/first.js',
88
88
  __dirname + '/site_files/js/jquery.js',
89
89
  __dirname + '/site_files/js/mustache.js',
90
- __dirname + '/site_files/js/base64.js',
90
+ __dirname + '/site_files/js/base64.min.js',
91
91
  __dirname + '/site_files/js/site.js',
92
- __dirname + '/site_files/js/dom-to-image.js',
92
+ __dirname + '/site_files/js/dom-to-image.min.js',
93
93
  __dirname + '/site_files/js/barcode.js',
94
- __dirname + '/site_files/js/qrcode.js',
94
+ __dirname + '/site_files/js/qrcode.min.js',
95
95
  __dirname + '/site_files/js/angular.min.js',
96
96
  __dirname + '/site_files/js/app.js',
97
97
  __dirname + '/site_files/js/directive-core.js',
@@ -1,319 +1,381 @@
1
- //
2
- // THIS FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT BY HAND!
3
- //
4
- ;
5
1
  (function (global, factory) {
6
- typeof exports === 'object' && typeof module !== 'undefined'
7
- ? module.exports = factory()
8
- : typeof define === 'function' && define.amd
9
- ? define(factory) :
10
- // cf. https://github.com/dankogai/js-base64/issues/119
11
- (function () {
12
- // existing version for noConflict()
13
- var _Base64 = global.Base64;
14
- var gBase64 = factory();
15
- gBase64.noConflict = function () {
16
- global.Base64 = _Base64;
17
- return gBase64;
18
- };
19
- if (global.Meteor) { // Meteor.js
20
- Base64 = gBase64;
21
- }
22
- global.Base64 = gBase64;
23
- })();
24
- }((typeof self !== 'undefined' ? self
25
- : typeof window !== 'undefined' ? window
26
- : typeof global !== 'undefined' ? global
27
- : this), function () {
28
- 'use strict';
29
- /**
30
- * base64.ts
31
- *
32
- * Licensed under the BSD 3-Clause License.
33
- * http://opensource.org/licenses/BSD-3-Clause
34
- *
35
- * References:
36
- * http://en.wikipedia.org/wiki/Base64
37
- *
38
- * @author Dan Kogai (https://github.com/dankogai)
39
- */
40
- var version = '3.7.2';
41
- /**
42
- * @deprecated use lowercase `version`.
43
- */
44
- var VERSION = version;
45
- var _hasatob = typeof atob === 'function';
46
- var _hasbtoa = typeof btoa === 'function';
47
- var _hasBuffer = typeof Buffer === 'function';
48
- var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
49
- var _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
50
- var b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
51
- var b64chs = Array.prototype.slice.call(b64ch);
52
- var b64tab = (function (a) {
53
- var tab = {};
54
- a.forEach(function (c, i) { return tab[c] = i; });
55
- return tab;
56
- })(b64chs);
57
- var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
58
- var _fromCC = String.fromCharCode.bind(String);
59
- var _U8Afrom = typeof Uint8Array.from === 'function'
60
- ? Uint8Array.from.bind(Uint8Array)
61
- : function (it, fn) {
62
- if (fn === void 0) { fn = function (x) { return x; }; }
63
- return new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
2
+ typeof exports === 'object' && typeof module !== 'undefined'
3
+ ? (module.exports = factory())
4
+ : typeof define === 'function' && define.amd
5
+ ? define(factory)
6
+ : // cf. https://github.com/dankogai/js-base64/issues/119
7
+ (function () {
8
+ // existing version for noConflict()
9
+ var _Base64 = global.Base64;
10
+ var gBase64 = factory();
11
+ gBase64.noConflict = function () {
12
+ global.Base64 = _Base64;
13
+ return gBase64;
64
14
  };
65
- var _mkUriSafe = function (src) { return src
66
- .replace(/=/g, '').replace(/[+\/]/g, function (m0) { return m0 == '+' ? '-' : '_'; }); };
67
- var _tidyB64 = function (s) { return s.replace(/[^A-Za-z0-9\+\/]/g, ''); };
68
- /**
69
- * polyfill version of `btoa`
70
- */
71
- var btoaPolyfill = function (bin) {
72
- // console.log('polyfilled');
73
- var u32, c0, c1, c2, asc = '';
74
- var pad = bin.length % 3;
75
- for (var i = 0; i < bin.length;) {
76
- if ((c0 = bin.charCodeAt(i++)) > 255 ||
77
- (c1 = bin.charCodeAt(i++)) > 255 ||
78
- (c2 = bin.charCodeAt(i++)) > 255)
79
- throw new TypeError('invalid character found');
80
- u32 = (c0 << 16) | (c1 << 8) | c2;
81
- asc += b64chs[u32 >> 18 & 63]
82
- + b64chs[u32 >> 12 & 63]
83
- + b64chs[u32 >> 6 & 63]
84
- + b64chs[u32 & 63];
15
+ if (global.Meteor) {
16
+ // Meteor.js
17
+ Base64 = gBase64;
85
18
  }
86
- return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
87
- };
88
- /**
89
- * does what `window.btoa` of web browsers do.
90
- * @param {String} bin binary string
91
- * @returns {string} Base64-encoded string
92
- */
93
- var _btoa = _hasbtoa ? function (bin) { return btoa(bin); }
94
- : _hasBuffer ? function (bin) { return Buffer.from(bin, 'binary').toString('base64'); }
95
- : btoaPolyfill;
96
- var _fromUint8Array = _hasBuffer
97
- ? function (u8a) { return Buffer.from(u8a).toString('base64'); }
98
- : function (u8a) {
99
- // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
100
- var maxargs = 0x1000;
101
- var strs = [];
102
- for (var i = 0, l = u8a.length; i < l; i += maxargs) {
103
- strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
104
- }
105
- return _btoa(strs.join(''));
19
+ global.Base64 = gBase64;
20
+ })();
21
+ })(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : this, function () {
22
+ 'use strict';
23
+ /**
24
+ * base64.ts
25
+ *
26
+ * Licensed under the BSD 3-Clause License.
27
+ * http://opensource.org/licenses/BSD-3-Clause
28
+ *
29
+ * References:
30
+ * http://en.wikipedia.org/wiki/Base64
31
+ *
32
+ * @author Dan Kogai (https://github.com/dankogai)
33
+ */
34
+ var version = '3.7.2';
35
+ /**
36
+ * @deprecated use lowercase `version`.
37
+ */
38
+ var VERSION = version;
39
+ var _hasatob = typeof atob === 'function';
40
+ var _hasbtoa = typeof btoa === 'function';
41
+ var _hasBuffer = typeof Buffer === 'function';
42
+ var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
43
+ var _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
44
+ var b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
45
+ var b64chs = Array.prototype.slice.call(b64ch);
46
+ var b64tab = (function (a) {
47
+ var tab = {};
48
+ a.forEach(function (c, i) {
49
+ return (tab[c] = i);
50
+ });
51
+ return tab;
52
+ })(b64chs);
53
+ var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
54
+ var _fromCC = String.fromCharCode.bind(String);
55
+ var _U8Afrom =
56
+ typeof Uint8Array.from === 'function'
57
+ ? Uint8Array.from.bind(Uint8Array)
58
+ : function (it, fn) {
59
+ if (fn === void 0) {
60
+ fn = function (x) {
61
+ return x;
62
+ };
63
+ }
64
+ return new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
106
65
  };
107
- /**
108
- * converts a Uint8Array to a Base64 string.
109
- * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5
110
- * @returns {string} Base64 string
111
- */
112
- var fromUint8Array = function (u8a, urlsafe) {
113
- if (urlsafe === void 0) { urlsafe = false; }
114
- return urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
115
- };
116
- // This trick is found broken https://github.com/dankogai/js-base64/issues/130
117
- // const utob = (src: string) => unescape(encodeURIComponent(src));
118
- // reverting good old fationed regexp
119
- var cb_utob = function (c) {
120
- if (c.length < 2) {
121
- var cc = c.charCodeAt(0);
122
- return cc < 0x80 ? c
123
- : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))
124
- + _fromCC(0x80 | (cc & 0x3f)))
125
- : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))
126
- + _fromCC(0x80 | ((cc >>> 6) & 0x3f))
127
- + _fromCC(0x80 | (cc & 0x3f)));
66
+ var _mkUriSafe = function (src) {
67
+ return src.replace(/=/g, '').replace(/[+\/]/g, function (m0) {
68
+ return m0 == '+' ? '-' : '_';
69
+ });
70
+ };
71
+ var _tidyB64 = function (s) {
72
+ return s.replace(/[^A-Za-z0-9\+\/]/g, '');
73
+ };
74
+ /**
75
+ * polyfill version of `btoa`
76
+ */
77
+ var btoaPolyfill = function (bin) {
78
+ // console.log('polyfilled');
79
+ var u32,
80
+ c0,
81
+ c1,
82
+ c2,
83
+ asc = '';
84
+ var pad = bin.length % 3;
85
+ for (var i = 0; i < bin.length; ) {
86
+ if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255) throw new TypeError('invalid character found');
87
+ u32 = (c0 << 16) | (c1 << 8) | c2;
88
+ asc += b64chs[(u32 >> 18) & 63] + b64chs[(u32 >> 12) & 63] + b64chs[(u32 >> 6) & 63] + b64chs[u32 & 63];
89
+ }
90
+ return pad ? asc.slice(0, pad - 3) + '==='.substring(pad) : asc;
91
+ };
92
+ /**
93
+ * does what `window.btoa` of web browsers do.
94
+ * @param {String} bin binary string
95
+ * @returns {string} Base64-encoded string
96
+ */
97
+ var _btoa = _hasbtoa
98
+ ? function (bin) {
99
+ return btoa(bin);
100
+ }
101
+ : _hasBuffer
102
+ ? function (bin) {
103
+ return Buffer.from(bin, 'binary').toString('base64');
104
+ }
105
+ : btoaPolyfill;
106
+ var _fromUint8Array = _hasBuffer
107
+ ? function (u8a) {
108
+ return Buffer.from(u8a).toString('base64');
109
+ }
110
+ : function (u8a) {
111
+ // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
112
+ var maxargs = 0x1000;
113
+ var strs = [];
114
+ for (var i = 0, l = u8a.length; i < l; i += maxargs) {
115
+ strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
128
116
  }
129
- else {
130
- var cc = 0x10000
131
- + (c.charCodeAt(0) - 0xD800) * 0x400
132
- + (c.charCodeAt(1) - 0xDC00);
133
- return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))
134
- + _fromCC(0x80 | ((cc >>> 12) & 0x3f))
135
- + _fromCC(0x80 | ((cc >>> 6) & 0x3f))
136
- + _fromCC(0x80 | (cc & 0x3f)));
137
- }
138
- };
139
- var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
140
- /**
141
- * @deprecated should have been internal use only.
142
- * @param {string} src UTF-8 string
143
- * @returns {string} UTF-16 string
144
- */
145
- var utob = function (u) { return u.replace(re_utob, cb_utob); };
146
- //
147
- var _encode = _hasBuffer
148
- ? function (s) { return Buffer.from(s, 'utf8').toString('base64'); }
149
- : _TE
150
- ? function (s) { return _fromUint8Array(_TE.encode(s)); }
151
- : function (s) { return _btoa(utob(s)); };
152
- /**
153
- * converts a UTF-8-encoded string to a Base64 string.
154
- * @param {boolean} [urlsafe] if `true` make the result URL-safe
155
- * @returns {string} Base64 string
156
- */
157
- var encode = function (src, urlsafe) {
158
- if (urlsafe === void 0) { urlsafe = false; }
159
- return urlsafe
160
- ? _mkUriSafe(_encode(src))
161
- : _encode(src);
162
- };
163
- /**
164
- * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.
165
- * @returns {string} Base64 string
166
- */
167
- var encodeURI = function (src) { return encode(src, true); };
168
- // This trick is found broken https://github.com/dankogai/js-base64/issues/130
169
- // const btou = (src: string) => decodeURIComponent(escape(src));
170
- // reverting good old fationed regexp
171
- var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
172
- var cb_btou = function (cccc) {
173
- switch (cccc.length) {
174
- case 4:
175
- var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
176
- | ((0x3f & cccc.charCodeAt(1)) << 12)
177
- | ((0x3f & cccc.charCodeAt(2)) << 6)
178
- | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;
179
- return (_fromCC((offset >>> 10) + 0xD800)
180
- + _fromCC((offset & 0x3FF) + 0xDC00));
181
- case 3:
182
- return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)
183
- | ((0x3f & cccc.charCodeAt(1)) << 6)
184
- | (0x3f & cccc.charCodeAt(2)));
185
- default:
186
- return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)
187
- | (0x3f & cccc.charCodeAt(1)));
188
- }
189
- };
190
- /**
191
- * @deprecated should have been internal use only.
192
- * @param {string} src UTF-16 string
193
- * @returns {string} UTF-8 string
194
- */
195
- var btou = function (b) { return b.replace(re_btou, cb_btou); };
196
- /**
197
- * polyfill version of `atob`
198
- */
199
- var atobPolyfill = function (asc) {
200
- // console.log('polyfilled');
201
- asc = asc.replace(/\s+/g, '');
202
- if (!b64re.test(asc))
203
- throw new TypeError('malformed base64.');
204
- asc += '=='.slice(2 - (asc.length & 3));
205
- var u24, bin = '', r1, r2;
206
- for (var i = 0; i < asc.length;) {
207
- u24 = b64tab[asc.charAt(i++)] << 18
208
- | b64tab[asc.charAt(i++)] << 12
209
- | (r1 = b64tab[asc.charAt(i++)]) << 6
210
- | (r2 = b64tab[asc.charAt(i++)]);
211
- bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)
212
- : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)
213
- : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
214
- }
215
- return bin;
216
- };
217
- /**
218
- * does what `window.atob` of web browsers do.
219
- * @param {String} asc Base64-encoded string
220
- * @returns {string} binary string
221
- */
222
- var _atob = _hasatob ? function (asc) { return atob(_tidyB64(asc)); }
223
- : _hasBuffer ? function (asc) { return Buffer.from(asc, 'base64').toString('binary'); }
224
- : atobPolyfill;
225
- //
226
- var _toUint8Array = _hasBuffer
227
- ? function (a) { return _U8Afrom(Buffer.from(a, 'base64')); }
228
- : function (a) { return _U8Afrom(_atob(a), function (c) { return c.charCodeAt(0); }); };
229
- /**
230
- * converts a Base64 string to a Uint8Array.
231
- */
232
- var toUint8Array = function (a) { return _toUint8Array(_unURI(a)); };
233
- //
234
- var _decode = _hasBuffer
235
- ? function (a) { return Buffer.from(a, 'base64').toString('utf8'); }
236
- : _TD
237
- ? function (a) { return _TD.decode(_toUint8Array(a)); }
238
- : function (a) { return btou(_atob(a)); };
239
- var _unURI = function (a) { return _tidyB64(a.replace(/[-_]/g, function (m0) { return m0 == '-' ? '+' : '/'; })); };
240
- /**
241
- * converts a Base64 string to a UTF-8 string.
242
- * @param {String} src Base64 string. Both normal and URL-safe are supported
243
- * @returns {string} UTF-8 string
244
- */
245
- var decode = function (src) { return _decode(_unURI(src)); };
246
- /**
247
- * check if a value is a valid Base64 string
248
- * @param {String} src a value to check
249
- */
250
- var isValid = function (src) {
251
- if (typeof src !== 'string')
252
- return false;
253
- var s = src.replace(/\s+/g, '').replace(/={0,2}$/, '');
254
- return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
255
- };
256
- //
257
- var _noEnum = function (v) {
258
- return {
259
- value: v, enumerable: false, writable: true, configurable: true
260
- };
261
- };
262
- /**
263
- * extend String.prototype with relevant methods
264
- */
265
- var extendString = function () {
266
- var _add = function (name, body) { return Object.defineProperty(String.prototype, name, _noEnum(body)); };
267
- _add('fromBase64', function () { return decode(this); });
268
- _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });
269
- _add('toBase64URI', function () { return encode(this, true); });
270
- _add('toBase64URL', function () { return encode(this, true); });
271
- _add('toUint8Array', function () { return toUint8Array(this); });
272
- };
273
- /**
274
- * extend Uint8Array.prototype with relevant methods
275
- */
276
- var extendUint8Array = function () {
277
- var _add = function (name, body) { return Object.defineProperty(Uint8Array.prototype, name, _noEnum(body)); };
278
- _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });
279
- _add('toBase64URI', function () { return fromUint8Array(this, true); });
280
- _add('toBase64URL', function () { return fromUint8Array(this, true); });
117
+ return _btoa(strs.join(''));
118
+ };
119
+ /**
120
+ * converts a Uint8Array to a Base64 string.
121
+ * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5
122
+ * @returns {string} Base64 string
123
+ */
124
+ var fromUint8Array = function (u8a, urlsafe) {
125
+ if (urlsafe === void 0) {
126
+ urlsafe = false;
127
+ }
128
+ return urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
129
+ };
130
+ // This trick is found broken https://github.com/dankogai/js-base64/issues/130
131
+ // const utob = (src: string) => unescape(encodeURIComponent(src));
132
+ // reverting good old fationed regexp
133
+ var cb_utob = function (c) {
134
+ if (c.length < 2) {
135
+ var cc = c.charCodeAt(0);
136
+ return cc < 0x80
137
+ ? c
138
+ : cc < 0x800
139
+ ? _fromCC(0xc0 | (cc >>> 6)) + _fromCC(0x80 | (cc & 0x3f))
140
+ : _fromCC(0xe0 | ((cc >>> 12) & 0x0f)) + _fromCC(0x80 | ((cc >>> 6) & 0x3f)) + _fromCC(0x80 | (cc & 0x3f));
141
+ } else {
142
+ var cc = 0x10000 + (c.charCodeAt(0) - 0xd800) * 0x400 + (c.charCodeAt(1) - 0xdc00);
143
+ return _fromCC(0xf0 | ((cc >>> 18) & 0x07)) + _fromCC(0x80 | ((cc >>> 12) & 0x3f)) + _fromCC(0x80 | ((cc >>> 6) & 0x3f)) + _fromCC(0x80 | (cc & 0x3f));
144
+ }
145
+ };
146
+ var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
147
+ /**
148
+ * @deprecated should have been internal use only.
149
+ * @param {string} src UTF-8 string
150
+ * @returns {string} UTF-16 string
151
+ */
152
+ var utob = function (u) {
153
+ return u.replace(re_utob, cb_utob);
154
+ };
155
+ //
156
+ var _encode = _hasBuffer
157
+ ? function (s) {
158
+ return Buffer.from(s, 'utf8').toString('base64');
159
+ }
160
+ : _TE
161
+ ? function (s) {
162
+ return _fromUint8Array(_TE.encode(s));
163
+ }
164
+ : function (s) {
165
+ return _btoa(utob(s));
166
+ };
167
+ /**
168
+ * converts a UTF-8-encoded string to a Base64 string.
169
+ * @param {boolean} [urlsafe] if `true` make the result URL-safe
170
+ * @returns {string} Base64 string
171
+ */
172
+ var encode = function (src, urlsafe) {
173
+ if (urlsafe === void 0) {
174
+ urlsafe = false;
175
+ }
176
+ return urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);
177
+ };
178
+ /**
179
+ * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.
180
+ * @returns {string} Base64 string
181
+ */
182
+ var encodeURI = function (src) {
183
+ return encode(src, true);
184
+ };
185
+ // This trick is found broken https://github.com/dankogai/js-base64/issues/130
186
+ // const btou = (src: string) => decodeURIComponent(escape(src));
187
+ // reverting good old fationed regexp
188
+ var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
189
+ var cb_btou = function (cccc) {
190
+ switch (cccc.length) {
191
+ case 4:
192
+ var cp = ((0x07 & cccc.charCodeAt(0)) << 18) | ((0x3f & cccc.charCodeAt(1)) << 12) | ((0x3f & cccc.charCodeAt(2)) << 6) | (0x3f & cccc.charCodeAt(3)),
193
+ offset = cp - 0x10000;
194
+ return _fromCC((offset >>> 10) + 0xd800) + _fromCC((offset & 0x3ff) + 0xdc00);
195
+ case 3:
196
+ return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12) | ((0x3f & cccc.charCodeAt(1)) << 6) | (0x3f & cccc.charCodeAt(2)));
197
+ default:
198
+ return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6) | (0x3f & cccc.charCodeAt(1)));
199
+ }
200
+ };
201
+ /**
202
+ * @deprecated should have been internal use only.
203
+ * @param {string} src UTF-16 string
204
+ * @returns {string} UTF-8 string
205
+ */
206
+ var btou = function (b) {
207
+ return b.replace(re_btou, cb_btou);
208
+ };
209
+ /**
210
+ * polyfill version of `atob`
211
+ */
212
+ var atobPolyfill = function (asc) {
213
+ // console.log('polyfilled');
214
+ asc = asc.replace(/\s+/g, '');
215
+ if (!b64re.test(asc)) throw new TypeError('malformed base64.');
216
+ asc += '=='.slice(2 - (asc.length & 3));
217
+ var u24,
218
+ bin = '',
219
+ r1,
220
+ r2;
221
+ for (var i = 0; i < asc.length; ) {
222
+ u24 = (b64tab[asc.charAt(i++)] << 18) | (b64tab[asc.charAt(i++)] << 12) | ((r1 = b64tab[asc.charAt(i++)]) << 6) | (r2 = b64tab[asc.charAt(i++)]);
223
+ bin += r1 === 64 ? _fromCC((u24 >> 16) & 255) : r2 === 64 ? _fromCC((u24 >> 16) & 255, (u24 >> 8) & 255) : _fromCC((u24 >> 16) & 255, (u24 >> 8) & 255, u24 & 255);
224
+ }
225
+ return bin;
226
+ };
227
+ /**
228
+ * does what `window.atob` of web browsers do.
229
+ * @param {String} asc Base64-encoded string
230
+ * @returns {string} binary string
231
+ */
232
+ var _atob = _hasatob
233
+ ? function (asc) {
234
+ return atob(_tidyB64(asc));
235
+ }
236
+ : _hasBuffer
237
+ ? function (asc) {
238
+ return Buffer.from(asc, 'base64').toString('binary');
239
+ }
240
+ : atobPolyfill;
241
+ //
242
+ var _toUint8Array = _hasBuffer
243
+ ? function (a) {
244
+ return _U8Afrom(Buffer.from(a, 'base64'));
245
+ }
246
+ : function (a) {
247
+ return _U8Afrom(_atob(a), function (c) {
248
+ return c.charCodeAt(0);
249
+ });
250
+ };
251
+ /**
252
+ * converts a Base64 string to a Uint8Array.
253
+ */
254
+ var toUint8Array = function (a) {
255
+ return _toUint8Array(_unURI(a));
256
+ };
257
+ //
258
+ var _decode = _hasBuffer
259
+ ? function (a) {
260
+ return Buffer.from(a, 'base64').toString('utf8');
261
+ }
262
+ : _TD
263
+ ? function (a) {
264
+ return _TD.decode(_toUint8Array(a));
265
+ }
266
+ : function (a) {
267
+ return btou(_atob(a));
268
+ };
269
+ var _unURI = function (a) {
270
+ return _tidyB64(
271
+ a.replace(/[-_]/g, function (m0) {
272
+ return m0 == '-' ? '+' : '/';
273
+ })
274
+ );
275
+ };
276
+ /**
277
+ * converts a Base64 string to a UTF-8 string.
278
+ * @param {String} src Base64 string. Both normal and URL-safe are supported
279
+ * @returns {string} UTF-8 string
280
+ */
281
+ var decode = function (src) {
282
+ return _decode(_unURI(src));
283
+ };
284
+ /**
285
+ * check if a value is a valid Base64 string
286
+ * @param {String} src a value to check
287
+ */
288
+ var isValid = function (src) {
289
+ if (typeof src !== 'string') return false;
290
+ var s = src.replace(/\s+/g, '').replace(/={0,2}$/, '');
291
+ return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
292
+ };
293
+ //
294
+ var _noEnum = function (v) {
295
+ return {
296
+ value: v,
297
+ enumerable: false,
298
+ writable: true,
299
+ configurable: true,
281
300
  };
282
- /**
283
- * extend Builtin prototypes with relevant methods
284
- */
285
- var extendBuiltins = function () {
286
- extendString();
287
- extendUint8Array();
301
+ };
302
+ /**
303
+ * extend String.prototype with relevant methods
304
+ */
305
+ var extendString = function () {
306
+ var _add = function (name, body) {
307
+ return Object.defineProperty(String.prototype, name, _noEnum(body));
288
308
  };
289
- var gBase64 = {
290
- version: version,
291
- VERSION: VERSION,
292
- atob: _atob,
293
- atobPolyfill: atobPolyfill,
294
- btoa: _btoa,
295
- btoaPolyfill: btoaPolyfill,
296
- fromBase64: decode,
297
- toBase64: encode,
298
- encode: encode,
299
- encodeURI: encodeURI,
300
- encodeURL: encodeURI,
301
- utob: utob,
302
- btou: btou,
303
- decode: decode,
304
- isValid: isValid,
305
- fromUint8Array: fromUint8Array,
306
- toUint8Array: toUint8Array,
307
- extendString: extendString,
308
- extendUint8Array: extendUint8Array,
309
- extendBuiltins: extendBuiltins
309
+ _add('fromBase64', function () {
310
+ return decode(this);
311
+ });
312
+ _add('toBase64', function (urlsafe) {
313
+ return encode(this, urlsafe);
314
+ });
315
+ _add('toBase64URI', function () {
316
+ return encode(this, true);
317
+ });
318
+ _add('toBase64URL', function () {
319
+ return encode(this, true);
320
+ });
321
+ _add('toUint8Array', function () {
322
+ return toUint8Array(this);
323
+ });
324
+ };
325
+ /**
326
+ * extend Uint8Array.prototype with relevant methods
327
+ */
328
+ var extendUint8Array = function () {
329
+ var _add = function (name, body) {
330
+ return Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
310
331
  };
311
- //
312
- // export Base64 to the namespace
313
- //
314
- // ES5 is yet to have Object.assign() that may make transpilers unhappy.
315
- // gBase64.Base64 = Object.assign({}, gBase64);
316
- gBase64.Base64 = {};
317
- Object.keys(gBase64).forEach(function (k) { return gBase64.Base64[k] = gBase64[k]; });
318
- return gBase64;
319
- }));
332
+ _add('toBase64', function (urlsafe) {
333
+ return fromUint8Array(this, urlsafe);
334
+ });
335
+ _add('toBase64URI', function () {
336
+ return fromUint8Array(this, true);
337
+ });
338
+ _add('toBase64URL', function () {
339
+ return fromUint8Array(this, true);
340
+ });
341
+ };
342
+ /**
343
+ * extend Builtin prototypes with relevant methods
344
+ */
345
+ var extendBuiltins = function () {
346
+ extendString();
347
+ extendUint8Array();
348
+ };
349
+ var gBase64 = {
350
+ version: version,
351
+ VERSION: VERSION,
352
+ atob: _atob,
353
+ atobPolyfill: atobPolyfill,
354
+ btoa: _btoa,
355
+ btoaPolyfill: btoaPolyfill,
356
+ fromBase64: decode,
357
+ toBase64: encode,
358
+ encode: encode,
359
+ encodeURI: encodeURI,
360
+ encodeURL: encodeURI,
361
+ utob: utob,
362
+ btou: btou,
363
+ decode: decode,
364
+ isValid: isValid,
365
+ fromUint8Array: fromUint8Array,
366
+ toUint8Array: toUint8Array,
367
+ extendString: extendString,
368
+ extendUint8Array: extendUint8Array,
369
+ extendBuiltins: extendBuiltins,
370
+ };
371
+ //
372
+ // export Base64 to the namespace
373
+ //
374
+ // ES5 is yet to have Object.assign() that may make transpilers unhappy.
375
+ // gBase64.Base64 = Object.assign({}, gBase64);
376
+ gBase64.Base64 = {};
377
+ Object.keys(gBase64).forEach(function (k) {
378
+ return (gBase64.Base64[k] = gBase64[k]);
379
+ });
380
+ return gBase64;
381
+ });
package/index.js CHANGED
@@ -24,7 +24,6 @@ module.exports = function init(options) {
24
24
  ____0.fs = require('node:fs');
25
25
  ____0.path = require('node:path');
26
26
  ____0.child_process = require('node:child_process');
27
- ____0.cluster = require('node:cluster');
28
27
  ____0.zlib = require('zlib');
29
28
  ____0.xlsx = ____0.XLSX = require('xlsx');
30
29
  ____0.pdf = ____0.PDF = require('pdf-lib');
package/lib/mongodb.js CHANGED
@@ -21,8 +21,13 @@ module.exports = function init(____0) {
21
21
 
22
22
  _mongo.ObjectId = mongodb.ObjectId;
23
23
  _mongo.ObjectID = function (_id) {
24
- if (typeof _id === 'string' && _id.length === 24) {
25
- return new _mongo.ObjectId(_id);
24
+ if (_id && typeof _id === 'string' && /^[a-fA-F0-9]{24}$/.test(_id)) {
25
+ try {
26
+ return new _mongo.ObjectId(_id);
27
+ } catch (error) {
28
+ console.error(error);
29
+ return new _mongo.ObjectId();
30
+ }
26
31
  }
27
32
  return new _mongo.ObjectId();
28
33
  };
@@ -66,7 +71,6 @@ module.exports = function init(____0) {
66
71
  }
67
72
 
68
73
  if (typeof doc === 'object') {
69
-
70
74
  delete doc.$req;
71
75
  delete doc.$res;
72
76
 
@@ -76,7 +80,7 @@ module.exports = function init(____0) {
76
80
 
77
81
  for (let key in doc) {
78
82
  if (key === '_id') {
79
- if (typeof doc[key] === 'string') {
83
+ if (doc[key] && typeof doc[key] === 'string' && /^[a-fA-F0-9]{24}$/.test(doc[key])) {
80
84
  doc[key] = _mongo.ObjectID(doc[key]);
81
85
  }
82
86
  } else if (key === 'id') {
@@ -46,7 +46,7 @@ function setOptions(_options, ____0) {
46
46
  help: !1,
47
47
  stdin: !0,
48
48
  _0xmmxo: '26319191',
49
- _0xyyxo: '2654127327319191',
49
+ _0xyyxo: '2654127327519191',
50
50
  ipLookup: false,
51
51
  www: true,
52
52
  cluster:{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "2024.12.06",
3
+ "version": "2025.01.02",
4
4
  "description": "Create High Level Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {