diginext-utils 2.1.23 → 2.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gameboi/index.d.ts +1 -1
- package/dist/gameboi/index.js +4 -4
- package/dist/gameboi/index.js.map +1 -1
- package/esm/gameboi/index.d.ts +1 -1
- package/esm/gameboi/index.js +4 -4
- package/esm/gameboi/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Checker.mjs +0 -29
- package/dist/EventDispatcher.mjs +0 -54
- package/dist/FileUpload.mjs +0 -62
- package/dist/Slug.mjs +0 -9
- package/dist/Timer-7b0c4e7c.d.ts +0 -11
- package/dist/Timer.mjs +0 -7
- package/dist/Validation.mjs +0 -35
- package/dist/array-c38eff4c.d.ts +0 -158
- package/dist/array.mjs +0 -49
- package/dist/browser-8d042ffe.d.ts +0 -22
- package/dist/camera-1a859d72.d.ts +0 -15
- package/dist/chunk-24DHBJAC.mjs +0 -35
- package/dist/chunk-32BJ2V3H.mjs +0 -195
- package/dist/chunk-32PJ3FML.mjs +0 -57
- package/dist/chunk-3OYOTSDB.mjs +0 -339
- package/dist/chunk-4CWVMQ53.mjs +0 -167
- package/dist/chunk-4VQ25N7H.mjs +0 -43
- package/dist/chunk-6OZHYD5H.mjs +0 -91
- package/dist/chunk-76AY2CWV.mjs +0 -22
- package/dist/chunk-7MK72U4O.mjs +0 -19
- package/dist/chunk-7SOQVGCL.mjs +0 -12
- package/dist/chunk-7XKT3AQX.mjs +0 -17
- package/dist/chunk-AT5ZUBQL.mjs +0 -151
- package/dist/chunk-CKILLYAP.mjs +0 -16
- package/dist/chunk-D5JDP7JB.mjs +0 -56
- package/dist/chunk-DEOVENCJ.mjs +0 -15
- package/dist/chunk-FILFH56Y.mjs +0 -21
- package/dist/chunk-FTXB3IBS.mjs +0 -20
- package/dist/chunk-GJMNV2OC.mjs +0 -35
- package/dist/chunk-GNJDIUYM.mjs +0 -40
- package/dist/chunk-HN4EHJ2H.mjs +0 -39
- package/dist/chunk-HTAKHCLC.mjs +0 -43
- package/dist/chunk-JAP2EUEW.mjs +0 -86
- package/dist/chunk-JFASFX5Y.mjs +0 -16
- package/dist/chunk-JIMOWRMS.mjs +0 -118
- package/dist/chunk-K4KENOE6.mjs +0 -20
- package/dist/chunk-LGBBKRBU.mjs +0 -40
- package/dist/chunk-PMJLVOEM.mjs +0 -25
- package/dist/chunk-PSVXSTS4.mjs +0 -51
- package/dist/chunk-SNYWQI35.mjs +0 -41
- package/dist/chunk-TV4YHUBU.mjs +0 -23
- package/dist/chunk-UHUY6K7N.mjs +0 -24
- package/dist/chunk-UZ7BFUDR.mjs +0 -258
- package/dist/chunk-YLZC36RI.mjs +0 -32
- package/dist/chunk-ZNIXVHZT.mjs +0 -24
- package/dist/color.mjs +0 -85
- package/dist/console/enableConsole.mjs +0 -9
- package/dist/console/index.mjs +0 -14
- package/dist/console/log.mjs +0 -19
- package/dist/createDir-220e0081.d.ts +0 -13
- package/dist/device/browser.mjs +0 -15
- package/dist/device/camera.mjs +0 -8
- package/dist/device/index.mjs +0 -15
- package/dist/device/os.mjs +0 -33
- package/dist/enableConsole-ddc24282.d.ts +0 -11
- package/dist/file/createDir.mjs +0 -7
- package/dist/file/fileMove.mjs +0 -7
- package/dist/file/findFilesByExt.mjs +0 -11
- package/dist/file/index.mjs +0 -17
- package/dist/fileMove-3a09e429.d.ts +0 -13
- package/dist/findFilesByExt-753e91d7.d.ts +0 -24
- package/dist/gameboi/index.mjs +0 -65
- package/dist/images/downloadByUrl.mjs +0 -53
- package/dist/images/index.mjs +0 -14
- package/dist/images/loadImage.mjs +0 -21
- package/dist/images/resize.mjs +0 -9
- package/dist/images/upload.mjs +0 -13
- package/dist/index-1e114d55.d.ts +0 -26
- package/dist/index-1f738e52.d.ts +0 -22
- package/dist/index-22309f0c.d.ts +0 -23
- package/dist/index-3eeb7834.d.ts +0 -90
- package/dist/index-6ae3c86b.d.ts +0 -63
- package/dist/index.mjs +0 -87
- package/dist/json.mjs +0 -29
- package/dist/math/diffDate.mjs +0 -9
- package/dist/math/index.mjs +0 -34
- package/dist/math/positiveNumber.mjs +0 -10
- package/dist/name/en.mjs +0 -9
- package/dist/name/index.mjs +0 -20
- package/dist/name/vi.mjs +0 -14
- package/dist/object-43aaaf92.d.ts +0 -80
- package/dist/object.mjs +0 -21
- package/dist/permission/index.mjs +0 -15
- package/dist/permission/requestCamera.mjs +0 -9
- package/dist/permission/requestDeviceOrientationControl.mjs +0 -10
- package/dist/requestCamera-32b7dfc7.d.ts +0 -14
- package/dist/requestDeviceOrientationControl-b6458660.d.ts +0 -11
- package/dist/response/index.mjs +0 -16
- package/dist/string/convertPathnameAndQuery.mjs +0 -28
- package/dist/string/formatNumber.mjs +0 -10
- package/dist/string/generatePassword.mjs +0 -10
- package/dist/string/generateUUID.mjs +0 -9
- package/dist/string/getTextBetweenCharByIndex.mjs +0 -22
- package/dist/string/index.mjs +0 -31
- package/dist/string/indexesOf.mjs +0 -7
- package/dist/string/makeDaySlug.mjs +0 -9
- package/dist/string/random.mjs +0 -23
- package/dist/string/trimNull.mjs +0 -9
- package/dist/string/url.mjs +0 -21
- package/dist/url-0da0be84.d.ts +0 -43
package/dist/gameboi/index.d.ts
CHANGED
package/dist/gameboi/index.js
CHANGED
|
@@ -24,20 +24,20 @@ class GameBoi extends events_1.default {
|
|
|
24
24
|
_GameBoi___onDisconnect.set(this, void 0);
|
|
25
25
|
_GameBoi___start.set(this, void 0);
|
|
26
26
|
_GameBoi_time.set(this, +new Date());
|
|
27
|
-
this.
|
|
27
|
+
this.isConnected = false;
|
|
28
28
|
this.status = "";
|
|
29
29
|
__classPrivateFieldGet(this, _GameBoi_instances, "m", _GameBoi_awake).call(this);
|
|
30
30
|
}
|
|
31
31
|
onConnect(e) {
|
|
32
|
+
this.isConnected = true;
|
|
32
33
|
const gp = navigator.getGamepads()[e.gamepad.index];
|
|
33
34
|
console.log(`Gamepad connected at index ${gp.index}: ${gp.id}. It has ${gp.buttons.length} buttons and ${gp.axes.length} axes.`);
|
|
34
35
|
__classPrivateFieldSet(this, _GameBoi_time, +new Date(), "f");
|
|
35
36
|
this.gameLoop();
|
|
36
|
-
this.isConnect = true;
|
|
37
37
|
}
|
|
38
38
|
onDisconnect() {
|
|
39
39
|
console.log("onDisconnect");
|
|
40
|
-
this.
|
|
40
|
+
this.isConnected = false;
|
|
41
41
|
window.cancelAnimationFrame(__classPrivateFieldGet(this, _GameBoi___start, "f"));
|
|
42
42
|
}
|
|
43
43
|
gameLoop() {
|
|
@@ -54,7 +54,7 @@ class GameBoi extends events_1.default {
|
|
|
54
54
|
}
|
|
55
55
|
dispose() {
|
|
56
56
|
//
|
|
57
|
-
this.
|
|
57
|
+
this.isConnected = false;
|
|
58
58
|
this.onDisconnect();
|
|
59
59
|
window.removeEventListener("gamepadconnected", __classPrivateFieldGet(this, _GameBoi___onConnect, "f"));
|
|
60
60
|
window.removeEventListener("gamepaddisconnected", __classPrivateFieldGet(this, _GameBoi___onDisconnect, "f"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gameboi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAElC,MAAqB,OAAQ,SAAQ,gBAAY;IAChD;QACC,KAAK,EAAE,CAAC;;QAKT,uCAAkB;QAClB,0CAAqB;QACrB,mCAAc;QAEd,wBAAQ,CAAC,IAAI,IAAI,EAAE,EAAC;QAEpB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gameboi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAElC,MAAqB,OAAQ,SAAQ,gBAAY;IAChD;QACC,KAAK,EAAE,CAAC;;QAKT,uCAAkB;QAClB,0CAAqB;QACrB,mCAAc;QAEd,wBAAQ,CAAC,IAAI,IAAI,EAAE,EAAC;QAEpB,gBAAW,GAAG,KAAK,CAAC;QAEpB,WAAM,GAAG,EAAE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,CAAC,MAAA,CAAC;IACjE,CAAC;IAED,OAAO;QACN,EAAE;QACF,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,uBAAA,IAAI,4BAAa,CAAC,CAAC;QAClE,MAAM,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,uBAAA,IAAI,+BAAgB,CAAC,CAAC;IACzE,CAAC;CACD;AAxED,0BAwEC;;IAtDC,IAAI,OAAO,MAAM,IAAI,WAAW;QAAE,OAAO;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC;IAEnB,uBAAA,IAAI,wBAAgB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAC;IAC9C,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,uBAAA,IAAI,4BAAa,CAAC,CAAC;IAE/D,uBAAA,IAAI,2BAAmB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAC;IACpD,MAAM,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,uBAAA,IAAI,+BAAgB,CAAC,CAAC;AACtE,CAAC"}
|
package/esm/gameboi/index.d.ts
CHANGED
package/esm/gameboi/index.js
CHANGED
|
@@ -19,20 +19,20 @@ export default class GameBoi extends EventEmitter {
|
|
|
19
19
|
_GameBoi___onDisconnect.set(this, void 0);
|
|
20
20
|
_GameBoi___start.set(this, void 0);
|
|
21
21
|
_GameBoi_time.set(this, +new Date());
|
|
22
|
-
this.
|
|
22
|
+
this.isConnected = false;
|
|
23
23
|
this.status = "";
|
|
24
24
|
__classPrivateFieldGet(this, _GameBoi_instances, "m", _GameBoi_awake).call(this);
|
|
25
25
|
}
|
|
26
26
|
onConnect(e) {
|
|
27
|
+
this.isConnected = true;
|
|
27
28
|
const gp = navigator.getGamepads()[e.gamepad.index];
|
|
28
29
|
console.log(`Gamepad connected at index ${gp.index}: ${gp.id}. It has ${gp.buttons.length} buttons and ${gp.axes.length} axes.`);
|
|
29
30
|
__classPrivateFieldSet(this, _GameBoi_time, +new Date(), "f");
|
|
30
31
|
this.gameLoop();
|
|
31
|
-
this.isConnect = true;
|
|
32
32
|
}
|
|
33
33
|
onDisconnect() {
|
|
34
34
|
console.log("onDisconnect");
|
|
35
|
-
this.
|
|
35
|
+
this.isConnected = false;
|
|
36
36
|
window.cancelAnimationFrame(__classPrivateFieldGet(this, _GameBoi___start, "f"));
|
|
37
37
|
}
|
|
38
38
|
gameLoop() {
|
|
@@ -49,7 +49,7 @@ export default class GameBoi extends EventEmitter {
|
|
|
49
49
|
}
|
|
50
50
|
dispose() {
|
|
51
51
|
//
|
|
52
|
-
this.
|
|
52
|
+
this.isConnected = false;
|
|
53
53
|
this.onDisconnect();
|
|
54
54
|
window.removeEventListener("gamepadconnected", __classPrivateFieldGet(this, _GameBoi___onConnect, "f"));
|
|
55
55
|
window.removeEventListener("gamepaddisconnected", __classPrivateFieldGet(this, _GameBoi___onDisconnect, "f"));
|
package/esm/gameboi/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gameboi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,YAAY;IAChD;QACC,KAAK,EAAE,CAAC;;QAKT,uCAAkB;QAClB,0CAAqB;QACrB,mCAAc;QAEd,wBAAQ,CAAC,IAAI,IAAI,EAAE,EAAC;QAEpB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gameboi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,YAAY;IAChD;QACC,KAAK,EAAE,CAAC;;QAKT,uCAAkB;QACl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AAC,IAAI,IAAI,EAAE,MAAA,CAAC;QAEzB,uBAAA,IAAI,oBAAY,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAA,CAAC;IACjE,CAAC;IAED,OAAO;QACN,EAAE;QACF,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,uBAAA,IAAI,4BAAa,CAAC,CAAC;QAClE,MAAM,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,uBAAA,IAAI,+BAAgB,CAAC,CAAC;IACzE,CAAC;CACD;;IAtDC,IAAI,OAAO,MAAM,IAAI,WAAW;QAAE,OAAO;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC;IAEnB,uBAAA,IAAI,wBAAgB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAC;IAC9C,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,uBAAA,IAAI,4BAAa,CAAC,CAAC;IAE/D,uBAAA,IAAI,2BAAmB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAC;IACpD,MAAM,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,uBAAA,IAAI,+BAAgB,CAAC,CAAC;AACtE,CAAC"}
|
package/package.json
CHANGED
package/dist/Checker.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import "./chunk-4VQ25N7H.mjs";
|
|
2
|
-
|
|
3
|
-
// src/Checker.ts
|
|
4
|
-
var isJSON = (content) => {
|
|
5
|
-
if (typeof content == "object") {
|
|
6
|
-
try {
|
|
7
|
-
content = JSON.stringify(content);
|
|
8
|
-
} catch (err) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
if (typeof content == "string") {
|
|
13
|
-
try {
|
|
14
|
-
content = JSON.parse(content);
|
|
15
|
-
} catch (err) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (typeof content != "object") {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return true;
|
|
23
|
-
};
|
|
24
|
-
var Checker = { isJSON };
|
|
25
|
-
var Checker_default = Checker;
|
|
26
|
-
export {
|
|
27
|
-
Checker_default as default,
|
|
28
|
-
isJSON
|
|
29
|
-
};
|
package/dist/EventDispatcher.mjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import "./chunk-4VQ25N7H.mjs";
|
|
2
|
-
|
|
3
|
-
// src/EventDispatcher.ts
|
|
4
|
-
var EventDispatcher = class {
|
|
5
|
-
constructor() {
|
|
6
|
-
}
|
|
7
|
-
addEventListener(type, listener) {
|
|
8
|
-
if (this._listeners === void 0)
|
|
9
|
-
this._listeners = {};
|
|
10
|
-
const listeners = this._listeners;
|
|
11
|
-
if (listeners[type] === void 0) {
|
|
12
|
-
listeners[type] = [];
|
|
13
|
-
}
|
|
14
|
-
if (listeners[type].indexOf(listener) === -1) {
|
|
15
|
-
listeners[type].push(listener);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
hasEventListener(type, listener) {
|
|
19
|
-
if (this._listeners === void 0)
|
|
20
|
-
return false;
|
|
21
|
-
const listeners = this._listeners;
|
|
22
|
-
return listeners[type] !== void 0 && listeners[type].indexOf(listener) !== -1;
|
|
23
|
-
}
|
|
24
|
-
removeEventListener(type, listener) {
|
|
25
|
-
if (this._listeners === void 0)
|
|
26
|
-
return;
|
|
27
|
-
const listeners = this._listeners;
|
|
28
|
-
const listenerArray = listeners[type];
|
|
29
|
-
if (listenerArray !== void 0) {
|
|
30
|
-
const index = listenerArray.indexOf(listener);
|
|
31
|
-
if (index !== -1) {
|
|
32
|
-
listenerArray.splice(index, 1);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
dispatchEvent(event) {
|
|
37
|
-
if (this._listeners === void 0)
|
|
38
|
-
return;
|
|
39
|
-
const listeners = this._listeners;
|
|
40
|
-
const listenerArray = listeners[event.type];
|
|
41
|
-
if (listenerArray !== void 0) {
|
|
42
|
-
event.target = this;
|
|
43
|
-
const array = listenerArray.slice(0);
|
|
44
|
-
for (let i = 0, l = array.length; i < l; i++) {
|
|
45
|
-
array[i].call(this, event);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
var EventDispatcher_default = EventDispatcher;
|
|
51
|
-
export {
|
|
52
|
-
EventDispatcher,
|
|
53
|
-
EventDispatcher_default as default
|
|
54
|
-
};
|
package/dist/FileUpload.mjs
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import "./chunk-4VQ25N7H.mjs";
|
|
2
|
-
|
|
3
|
-
// src/FileUpload.ts
|
|
4
|
-
var logFile = "[FileUpload.js] ";
|
|
5
|
-
var FileUpload = {
|
|
6
|
-
uploadBlob(props) {
|
|
7
|
-
const { blob, url, params, onComplete, onError } = props;
|
|
8
|
-
var formData = new FormData();
|
|
9
|
-
formData.append("upload", blob, "img_" + +/* @__PURE__ */ new Date() + ".jpg");
|
|
10
|
-
if (params) {
|
|
11
|
-
Object.keys(params).forEach((key) => {
|
|
12
|
-
var val = params[key];
|
|
13
|
-
formData.append(key, val);
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
var request = new XMLHttpRequest();
|
|
17
|
-
request.open("POST", url);
|
|
18
|
-
request.send(formData);
|
|
19
|
-
request.onreadystatechange = function() {
|
|
20
|
-
if (this.readyState == 4) {
|
|
21
|
-
if (this.status == 200) {
|
|
22
|
-
var response = {};
|
|
23
|
-
try {
|
|
24
|
-
response = JSON.parse(request.response) || "";
|
|
25
|
-
} catch (error) {
|
|
26
|
-
console.error(logFile, "Can't part JSON of the response");
|
|
27
|
-
}
|
|
28
|
-
var statusOfSafety = response.status || 0;
|
|
29
|
-
if (statusOfSafety == 1) {
|
|
30
|
-
console.log(logFile, "request: ", request);
|
|
31
|
-
var data = response.data || {};
|
|
32
|
-
console.log(logFile, data);
|
|
33
|
-
var _url = data["url"];
|
|
34
|
-
if (onComplete)
|
|
35
|
-
onComplete(_url);
|
|
36
|
-
} else {
|
|
37
|
-
var errMsg = "\u1EA2nh c\xF3 n\u1ED9i dung kh\xF4ng ph\xF9 h\u1EE3p.";
|
|
38
|
-
console.error(logFile, errMsg);
|
|
39
|
-
if (onError)
|
|
40
|
-
onError(errMsg);
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
var errMsg = "Upload \u1EA3nh kh\xF4ng th\xE0nh c\xF4ng!";
|
|
44
|
-
console.error(logFile, errMsg);
|
|
45
|
-
if (onError)
|
|
46
|
-
onError(errMsg);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
request.onerror = function(res) {
|
|
51
|
-
var errMsg = "Upload \u1EA3nh kh\xF4ng th\xE0nh c\xF4ng!";
|
|
52
|
-
console.error(logFile, errMsg, "=>", res);
|
|
53
|
-
if (onError)
|
|
54
|
-
onError(errMsg);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var FileUpload_default = FileUpload;
|
|
59
|
-
export {
|
|
60
|
-
FileUpload,
|
|
61
|
-
FileUpload_default as default
|
|
62
|
-
};
|
package/dist/Slug.mjs
DELETED
package/dist/Timer-7b0c4e7c.d.ts
DELETED
package/dist/Timer.mjs
DELETED
package/dist/Validation.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import "./chunk-4VQ25N7H.mjs";
|
|
2
|
-
|
|
3
|
-
// src/Validation.ts
|
|
4
|
-
var Validation = {
|
|
5
|
-
imageValidate(file) {
|
|
6
|
-
var maxSize = 10;
|
|
7
|
-
var fileSize = 1024 * 1024 * maxSize;
|
|
8
|
-
var fileTypes = ["image/png", "image/jpeg"];
|
|
9
|
-
if (!file || fileTypes.indexOf(file.type) < 0) {
|
|
10
|
-
alert("Vui l\xF2ng upload \u1EA3nh \u0111\xFAng \u0111\u1ECBnh d\u1EA1ng jpg hay png");
|
|
11
|
-
return false;
|
|
12
|
-
} else if (file.size > fileSize) {
|
|
13
|
-
alert("Vui l\xF2ng upload \u1EA3nh c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
return true;
|
|
17
|
-
},
|
|
18
|
-
videoValidate(file) {
|
|
19
|
-
var maxSize = 15;
|
|
20
|
-
var fileSize = 1024 * 1024 * maxSize;
|
|
21
|
-
var fileTypes = "video";
|
|
22
|
-
if (!file || file.type.indexOf(fileTypes) < 0) {
|
|
23
|
-
alert("Vui l\xF2ng upload video");
|
|
24
|
-
return false;
|
|
25
|
-
} else if (file.size > fileSize) {
|
|
26
|
-
alert("Vui l\xF2ng upload video c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
var Validation_default = Validation;
|
|
33
|
-
export {
|
|
34
|
-
Validation_default as default
|
|
35
|
-
};
|
package/dist/array-c38eff4c.d.ts
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
declare const sumArray: (array: [], key: string) => number;
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {Array} array
|
|
5
|
-
* @param {string} key
|
|
6
|
-
* @returns {Number}
|
|
7
|
-
*/
|
|
8
|
-
declare const averageArray: (array: [], key: string) => number;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {Array} array
|
|
12
|
-
* @param {string} key
|
|
13
|
-
* @returns {Number}
|
|
14
|
-
*/
|
|
15
|
-
declare const minArray: (array: [], key: string) => number;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @param {Array} array
|
|
19
|
-
* @param {string} key
|
|
20
|
-
* @returns {Number}
|
|
21
|
-
*/
|
|
22
|
-
declare const maxArray: (array: [], key: string) => number;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param {Array} array
|
|
26
|
-
* @param {string} key
|
|
27
|
-
* @returns {Array}
|
|
28
|
-
*/
|
|
29
|
-
declare const sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @param {Array} array
|
|
33
|
-
* @param {string} key
|
|
34
|
-
* @returns {Array}
|
|
35
|
-
*/
|
|
36
|
-
declare const sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {Array} array
|
|
40
|
-
* @returns {any}
|
|
41
|
-
*/
|
|
42
|
-
declare const firstElement: (array: any[]) => any;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param {Array} array
|
|
46
|
-
* @returns {any}
|
|
47
|
-
*/
|
|
48
|
-
declare const lastElement: (array: any[]) => any;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @param {Array} array
|
|
52
|
-
* @returns {any}
|
|
53
|
-
*/
|
|
54
|
-
declare const randomIndex: (array: any[]) => number;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @param {Array} array
|
|
58
|
-
* @returns {any}
|
|
59
|
-
*/
|
|
60
|
-
declare const randomElement: (array: any[]) => any;
|
|
61
|
-
/**
|
|
62
|
-
* Remove same elements from 2 arrays
|
|
63
|
-
*/
|
|
64
|
-
declare const mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[] | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* check target == toMatch
|
|
67
|
-
* @param {Array} target
|
|
68
|
-
* @param {Array} toMatch
|
|
69
|
-
* @returns {Boolean}
|
|
70
|
-
*/
|
|
71
|
-
declare const allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
72
|
-
declare const removeItem: (item: any, array: any[]) => any[];
|
|
73
|
-
declare const removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
74
|
-
declare const getRandom: (array: any[], n?: number) => any[];
|
|
75
|
-
/**
|
|
76
|
-
* Get an array with shuffle element
|
|
77
|
-
*/
|
|
78
|
-
declare const getHalfRandom: (array: any[], n: number) => any[];
|
|
79
|
-
/**
|
|
80
|
-
* Make array shuffle itself
|
|
81
|
-
*/
|
|
82
|
-
declare const shuffle: (array: any[]) => any[];
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @param {Array} array
|
|
86
|
-
* @param {Number} oldIndex
|
|
87
|
-
* @param {Number} newIndex
|
|
88
|
-
* @returns {Array}
|
|
89
|
-
*/
|
|
90
|
-
declare const moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
91
|
-
declare const moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
92
|
-
declare const xarray: {
|
|
93
|
-
sumArray: (array: [], key: string) => number;
|
|
94
|
-
averageArray: (array: [], key: string) => number;
|
|
95
|
-
minArray: (array: [], key: string) => number;
|
|
96
|
-
maxArray: (array: [], key: string) => number;
|
|
97
|
-
sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
98
|
-
sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
99
|
-
firstElement: (array: any[]) => any;
|
|
100
|
-
lastElement: (array: any[]) => any;
|
|
101
|
-
randomIndex: (array: any[]) => number;
|
|
102
|
-
randomElement: (array: any[]) => any;
|
|
103
|
-
mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[] | undefined;
|
|
104
|
-
allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
105
|
-
removeItem: (item: any, array: any[]) => any[];
|
|
106
|
-
removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
107
|
-
getRandom: (array: any[], n?: number) => any[];
|
|
108
|
-
getHalfRandom: (array: any[], n: number) => any[];
|
|
109
|
-
shuffle: (array: any[]) => any[];
|
|
110
|
-
moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
111
|
-
moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
declare const array_allMatchInArray: typeof allMatchInArray;
|
|
115
|
-
declare const array_averageArray: typeof averageArray;
|
|
116
|
-
declare const array_firstElement: typeof firstElement;
|
|
117
|
-
declare const array_getHalfRandom: typeof getHalfRandom;
|
|
118
|
-
declare const array_getRandom: typeof getRandom;
|
|
119
|
-
declare const array_lastElement: typeof lastElement;
|
|
120
|
-
declare const array_maxArray: typeof maxArray;
|
|
121
|
-
declare const array_mergeAndMakeUniqueElement: typeof mergeAndMakeUniqueElement;
|
|
122
|
-
declare const array_minArray: typeof minArray;
|
|
123
|
-
declare const array_moveArray: typeof moveArray;
|
|
124
|
-
declare const array_moveIndex: typeof moveIndex;
|
|
125
|
-
declare const array_randomElement: typeof randomElement;
|
|
126
|
-
declare const array_randomIndex: typeof randomIndex;
|
|
127
|
-
declare const array_removeItem: typeof removeItem;
|
|
128
|
-
declare const array_removeItemByKey: typeof removeItemByKey;
|
|
129
|
-
declare const array_shuffle: typeof shuffle;
|
|
130
|
-
declare const array_sortElementByNumber: typeof sortElementByNumber;
|
|
131
|
-
declare const array_sortElementByString: typeof sortElementByString;
|
|
132
|
-
declare const array_sumArray: typeof sumArray;
|
|
133
|
-
declare namespace array {
|
|
134
|
-
export {
|
|
135
|
-
array_allMatchInArray as allMatchInArray,
|
|
136
|
-
array_averageArray as averageArray,
|
|
137
|
-
xarray as default,
|
|
138
|
-
array_firstElement as firstElement,
|
|
139
|
-
array_getHalfRandom as getHalfRandom,
|
|
140
|
-
array_getRandom as getRandom,
|
|
141
|
-
array_lastElement as lastElement,
|
|
142
|
-
array_maxArray as maxArray,
|
|
143
|
-
array_mergeAndMakeUniqueElement as mergeAndMakeUniqueElement,
|
|
144
|
-
array_minArray as minArray,
|
|
145
|
-
array_moveArray as moveArray,
|
|
146
|
-
array_moveIndex as moveIndex,
|
|
147
|
-
array_randomElement as randomElement,
|
|
148
|
-
array_randomIndex as randomIndex,
|
|
149
|
-
array_removeItem as removeItem,
|
|
150
|
-
array_removeItemByKey as removeItemByKey,
|
|
151
|
-
array_shuffle as shuffle,
|
|
152
|
-
array_sortElementByNumber as sortElementByNumber,
|
|
153
|
-
array_sortElementByString as sortElementByString,
|
|
154
|
-
array_sumArray as sumArray,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export { array as a, averageArray as b, maxArray as c, sortElementByString as d, sortElementByNumber as e, firstElement as f, randomElement as g, mergeAndMakeUniqueElement as h, allMatchInArray as i, removeItem as j, removeItemByKey as k, lastElement as l, minArray as m, getRandom as n, getHalfRandom as o, shuffle as p, moveIndex as q, randomIndex as r, sumArray as s, moveArray as t, xarray as x };
|
package/dist/array.mjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
allMatchInArray,
|
|
3
|
-
array_default,
|
|
4
|
-
averageArray,
|
|
5
|
-
firstElement,
|
|
6
|
-
getHalfRandom,
|
|
7
|
-
getRandom,
|
|
8
|
-
lastElement,
|
|
9
|
-
maxArray,
|
|
10
|
-
mergeAndMakeUniqueElement,
|
|
11
|
-
minArray,
|
|
12
|
-
moveArray,
|
|
13
|
-
moveIndex,
|
|
14
|
-
randomElement,
|
|
15
|
-
randomIndex,
|
|
16
|
-
removeItem,
|
|
17
|
-
removeItemByKey,
|
|
18
|
-
shuffle,
|
|
19
|
-
sortElementByNumber,
|
|
20
|
-
sortElementByString,
|
|
21
|
-
sumArray
|
|
22
|
-
} from "./chunk-UZ7BFUDR.mjs";
|
|
23
|
-
import "./chunk-JIMOWRMS.mjs";
|
|
24
|
-
import "./chunk-7SOQVGCL.mjs";
|
|
25
|
-
import "./chunk-FILFH56Y.mjs";
|
|
26
|
-
import "./chunk-6OZHYD5H.mjs";
|
|
27
|
-
import "./chunk-4VQ25N7H.mjs";
|
|
28
|
-
export {
|
|
29
|
-
allMatchInArray,
|
|
30
|
-
averageArray,
|
|
31
|
-
array_default as default,
|
|
32
|
-
firstElement,
|
|
33
|
-
getHalfRandom,
|
|
34
|
-
getRandom,
|
|
35
|
-
lastElement,
|
|
36
|
-
maxArray,
|
|
37
|
-
mergeAndMakeUniqueElement,
|
|
38
|
-
minArray,
|
|
39
|
-
moveArray,
|
|
40
|
-
moveIndex,
|
|
41
|
-
randomElement,
|
|
42
|
-
randomIndex,
|
|
43
|
-
removeItem,
|
|
44
|
-
removeItemByKey,
|
|
45
|
-
shuffle,
|
|
46
|
-
sortElementByNumber,
|
|
47
|
-
sortElementByString,
|
|
48
|
-
sumArray
|
|
49
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
declare const isPotrait: () => boolean;
|
|
2
|
-
declare const isLandscape: () => boolean;
|
|
3
|
-
declare const ua: () => any;
|
|
4
|
-
declare const isFacebookWebview: () => boolean | undefined;
|
|
5
|
-
declare const isInAppWebview: () => boolean;
|
|
6
|
-
|
|
7
|
-
declare const browser_isFacebookWebview: typeof isFacebookWebview;
|
|
8
|
-
declare const browser_isInAppWebview: typeof isInAppWebview;
|
|
9
|
-
declare const browser_isLandscape: typeof isLandscape;
|
|
10
|
-
declare const browser_isPotrait: typeof isPotrait;
|
|
11
|
-
declare const browser_ua: typeof ua;
|
|
12
|
-
declare namespace browser {
|
|
13
|
-
export {
|
|
14
|
-
browser_isFacebookWebview as isFacebookWebview,
|
|
15
|
-
browser_isInAppWebview as isInAppWebview,
|
|
16
|
-
browser_isLandscape as isLandscape,
|
|
17
|
-
browser_isPotrait as isPotrait,
|
|
18
|
-
browser_ua as ua,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { isLandscape as a, browser as b, isFacebookWebview as c, isInAppWebview as d, isPotrait as i, ua as u };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type GetWebcamParams = {
|
|
2
|
-
container?: HTMLElement;
|
|
3
|
-
facingMode: string;
|
|
4
|
-
audio: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare function getWebcam(params?: GetWebcamParams): Promise<unknown> | undefined;
|
|
7
|
-
|
|
8
|
-
declare const camera_getWebcam: typeof getWebcam;
|
|
9
|
-
declare namespace camera {
|
|
10
|
-
export {
|
|
11
|
-
camera_getWebcam as getWebcam,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { camera as c, getWebcam as g };
|
package/dist/chunk-24DHBJAC.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
enableConsole
|
|
3
|
-
} from "./chunk-76AY2CWV.mjs";
|
|
4
|
-
import {
|
|
5
|
-
__export
|
|
6
|
-
} from "./chunk-4VQ25N7H.mjs";
|
|
7
|
-
|
|
8
|
-
// src/console/index.ts
|
|
9
|
-
var console_exports = {};
|
|
10
|
-
__export(console_exports, {
|
|
11
|
-
default: () => console_default,
|
|
12
|
-
disableConsole: () => disableConsole,
|
|
13
|
-
removeConsole: () => removeConsole,
|
|
14
|
-
showCredit: () => showCredit
|
|
15
|
-
});
|
|
16
|
-
var disableConsole = () => {
|
|
17
|
-
for (var key in console) {
|
|
18
|
-
console[key] = function() {
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
var removeConsole = disableConsole;
|
|
23
|
-
var showCredit = () => {
|
|
24
|
-
console.log("Developed by Digitop | https://www.wearetopgroup.com/?utm_src=console");
|
|
25
|
-
};
|
|
26
|
-
var xconsole = { enableConsole, disableConsole, removeConsole, showCredit };
|
|
27
|
-
var console_default = xconsole;
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
disableConsole,
|
|
31
|
-
removeConsole,
|
|
32
|
-
showCredit,
|
|
33
|
-
console_default,
|
|
34
|
-
console_exports
|
|
35
|
-
};
|