@calmlens/sdk 0.6.0 → 0.7.0
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/cjs/{CalmLensUtils-DA1_j5-P.js → CalmLensUtils-CJ6o7KRU.js} +8 -8
- package/cjs/index.d.ts +4873 -1
- package/cjs/index.js +76 -57
- package/cjs/testing.js +1 -1
- package/esm/{CalmLensUtils-UthMaLx_.js → CalmLensUtils-BZsX8yeO.js} +8 -8
- package/esm/index.d.ts +4873 -1
- package/esm/index.js +76 -57
- package/esm/testing.js +1 -1
- package/package.json +4 -4
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_CalmLensUtils = require("./CalmLensUtils-
|
|
2
|
+
const require_CalmLensUtils = require("./CalmLensUtils-CJ6o7KRU.js");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
zod = require_CalmLensUtils.__toESM(zod);
|
|
5
5
|
require("zod/v4");
|
|
@@ -105,15 +105,17 @@ createMetaType({ id: "docPropertyInfo" });
|
|
|
105
105
|
const SIZE_LIMITS = {
|
|
106
106
|
small: 64,
|
|
107
107
|
medium: 200,
|
|
108
|
-
large: 1500
|
|
108
|
+
large: 1500,
|
|
109
|
+
xlarge: 1e4,
|
|
110
|
+
token: 1e4
|
|
109
111
|
};
|
|
110
112
|
const saneStringField = (options) => {
|
|
111
113
|
return zod.string().transform((value) => value.trim()).refine((value) => {
|
|
112
114
|
if ((options === null || options === void 0 ? void 0 : options.minWidth) && value.length < options.minWidth) return false;
|
|
113
115
|
return true;
|
|
114
116
|
}, "Not long enough").refine((value) => {
|
|
115
|
-
var _options$type;
|
|
116
|
-
const sizeLimit = SIZE_LIMITS[(_options$type = options === null || options === void 0 ? void 0 : options.type) !== null && _options$type !== void 0 ? _options$type : "medium"];
|
|
117
|
+
var _options$maxLength, _options$type;
|
|
118
|
+
const sizeLimit = (_options$maxLength = options === null || options === void 0 ? void 0 : options.maxLength) !== null && _options$maxLength !== void 0 ? _options$maxLength : SIZE_LIMITS[(_options$type = options === null || options === void 0 ? void 0 : options.type) !== null && _options$type !== void 0 ? _options$type : "medium"];
|
|
117
119
|
return typeof value === "string" && value.length < sizeLimit;
|
|
118
120
|
}, "Too long");
|
|
119
121
|
};
|
|
@@ -598,6 +600,11 @@ const createEndpoints = (api) => {
|
|
|
598
600
|
method: "get",
|
|
599
601
|
path: "/projects/:projectId/assets/page"
|
|
600
602
|
});
|
|
603
|
+
const searchAssets = api.endpoint().paramsOf().queryOf().responseOf().build({
|
|
604
|
+
id: "searchAssets",
|
|
605
|
+
method: "get",
|
|
606
|
+
path: "/projects/:projectId/assets/search"
|
|
607
|
+
});
|
|
601
608
|
const getAsset = api.endpoint().paramsOf().responseOf().build({
|
|
602
609
|
id: "getAsset",
|
|
603
610
|
method: "get",
|
|
@@ -651,6 +658,7 @@ const createEndpoints = (api) => {
|
|
|
651
658
|
deleteFolder,
|
|
652
659
|
moveFolder,
|
|
653
660
|
getAssetsPage,
|
|
661
|
+
searchAssets,
|
|
654
662
|
getAsset,
|
|
655
663
|
getAssetChildren,
|
|
656
664
|
patchAsset,
|
|
@@ -906,21 +914,32 @@ var CalmLensClient = class CalmLensClient {
|
|
|
906
914
|
get assets() {
|
|
907
915
|
var _this5 = this;
|
|
908
916
|
return {
|
|
917
|
+
search: function() {
|
|
918
|
+
var _ref8 = require_CalmLensUtils._asyncToGenerator(function* (options) {
|
|
919
|
+
return (yield _this5.endpoints.searchAssets.submit({
|
|
920
|
+
params: { projectId: _this5.options.projectId },
|
|
921
|
+
query: options
|
|
922
|
+
})).data;
|
|
923
|
+
});
|
|
924
|
+
return function search(_x6) {
|
|
925
|
+
return _ref8.apply(this, arguments);
|
|
926
|
+
};
|
|
927
|
+
}(),
|
|
909
928
|
/**
|
|
910
929
|
* List all assets for a project
|
|
911
930
|
* @param options - Pagination and filtering options
|
|
912
931
|
* @returns Promise with paginated assets
|
|
913
932
|
*/
|
|
914
933
|
list: function() {
|
|
915
|
-
var
|
|
934
|
+
var _ref9 = require_CalmLensUtils._asyncToGenerator(function* (options) {
|
|
916
935
|
var _options$pageIndex;
|
|
917
936
|
return (yield _this5.endpoints.getAssetsPage.submit({
|
|
918
937
|
params: { projectId: _this5.options.projectId },
|
|
919
938
|
query: require_CalmLensUtils._objectSpread2(require_CalmLensUtils._objectSpread2({}, options), {}, { pageIndex: (_options$pageIndex = options.pageIndex) !== null && _options$pageIndex !== void 0 ? _options$pageIndex : 0 })
|
|
920
939
|
})).data;
|
|
921
940
|
});
|
|
922
|
-
return function list(
|
|
923
|
-
return
|
|
941
|
+
return function list(_x7) {
|
|
942
|
+
return _ref9.apply(this, arguments);
|
|
924
943
|
};
|
|
925
944
|
}(),
|
|
926
945
|
/**
|
|
@@ -929,25 +948,25 @@ var CalmLensClient = class CalmLensClient {
|
|
|
929
948
|
* @returns Promise with asset data
|
|
930
949
|
*/
|
|
931
950
|
retrieve: function() {
|
|
932
|
-
var
|
|
951
|
+
var _ref10 = require_CalmLensUtils._asyncToGenerator(function* ({ assetId }) {
|
|
933
952
|
if (!assetId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Asset ID is required" });
|
|
934
953
|
return (yield _this5.endpoints.getAsset.submit({ params: { assetId } })).data;
|
|
935
954
|
});
|
|
936
|
-
return function retrieve(
|
|
937
|
-
return
|
|
955
|
+
return function retrieve(_x8) {
|
|
956
|
+
return _ref10.apply(this, arguments);
|
|
938
957
|
};
|
|
939
958
|
}(),
|
|
940
959
|
update: function() {
|
|
941
|
-
var
|
|
942
|
-
let { assetId } =
|
|
960
|
+
var _ref12 = require_CalmLensUtils._asyncToGenerator(function* (_ref11) {
|
|
961
|
+
let { assetId } = _ref11, body = require_CalmLensUtils._objectWithoutProperties(_ref11, _excluded5);
|
|
943
962
|
if (!assetId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Asset ID is required" });
|
|
944
963
|
return (yield _this5.endpoints.patchAsset.submit({
|
|
945
964
|
params: { assetId },
|
|
946
965
|
body
|
|
947
966
|
})).data;
|
|
948
967
|
});
|
|
949
|
-
return function update(
|
|
950
|
-
return
|
|
968
|
+
return function update(_x9) {
|
|
969
|
+
return _ref12.apply(this, arguments);
|
|
951
970
|
};
|
|
952
971
|
}(),
|
|
953
972
|
/**
|
|
@@ -957,17 +976,17 @@ var CalmLensClient = class CalmLensClient {
|
|
|
957
976
|
* @returns Promise with paginated child assets
|
|
958
977
|
*/
|
|
959
978
|
listChildren: function() {
|
|
960
|
-
var
|
|
979
|
+
var _ref14 = require_CalmLensUtils._asyncToGenerator(function* (_ref13) {
|
|
961
980
|
var _options$pageIndex2;
|
|
962
|
-
let { assetId } =
|
|
981
|
+
let { assetId } = _ref13, options = require_CalmLensUtils._objectWithoutProperties(_ref13, _excluded6);
|
|
963
982
|
if (!assetId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Asset ID is required" });
|
|
964
983
|
return (yield _this5.endpoints.getAssetChildren.submit({
|
|
965
984
|
params: { assetId },
|
|
966
985
|
query: require_CalmLensUtils._objectSpread2(require_CalmLensUtils._objectSpread2({}, options), {}, { pageIndex: (_options$pageIndex2 = options.pageIndex) !== null && _options$pageIndex2 !== void 0 ? _options$pageIndex2 : 0 })
|
|
967
986
|
})).data;
|
|
968
987
|
});
|
|
969
|
-
return function listChildren(
|
|
970
|
-
return
|
|
988
|
+
return function listChildren(_x10) {
|
|
989
|
+
return _ref14.apply(this, arguments);
|
|
971
990
|
};
|
|
972
991
|
}(),
|
|
973
992
|
/**
|
|
@@ -977,7 +996,7 @@ var CalmLensClient = class CalmLensClient {
|
|
|
977
996
|
* @returns Promise with created asset
|
|
978
997
|
*/
|
|
979
998
|
create: function() {
|
|
980
|
-
var
|
|
999
|
+
var _ref15 = require_CalmLensUtils._asyncToGenerator(function* (options) {
|
|
981
1000
|
const body = prepareSubmitAssetOptions(options);
|
|
982
1001
|
if ("content" in body || "part" in body) return yield _this5.submitRawAssetUpload(body, true);
|
|
983
1002
|
return (yield _this5.endpoints.postUploadAsset.submit({
|
|
@@ -986,8 +1005,8 @@ var CalmLensClient = class CalmLensClient {
|
|
|
986
1005
|
query: { queue: true }
|
|
987
1006
|
})).data;
|
|
988
1007
|
});
|
|
989
|
-
return function create(
|
|
990
|
-
return
|
|
1008
|
+
return function create(_x11) {
|
|
1009
|
+
return _ref15.apply(this, arguments);
|
|
991
1010
|
};
|
|
992
1011
|
}(),
|
|
993
1012
|
/**
|
|
@@ -998,7 +1017,7 @@ var CalmLensClient = class CalmLensClient {
|
|
|
998
1017
|
* @returns Promise with created and analyzed asset
|
|
999
1018
|
*/
|
|
1000
1019
|
moderate: function() {
|
|
1001
|
-
var
|
|
1020
|
+
var _ref16 = require_CalmLensUtils._asyncToGenerator(function* (options) {
|
|
1002
1021
|
if ("content" in options && "plainText" in options.content && (typeof options.content.plainText !== "string" || !options.content.plainText.trim())) throw require_CalmLensUtils.calmLensError(require_CalmLensUtils.PUBLIC_ERROR_CODES.INVALID_UPLOAD_PAYLOAD, { message: "Text to moderate must be a non-empty string" });
|
|
1003
1022
|
const body = prepareSubmitAssetOptions(options);
|
|
1004
1023
|
if ("content" in body || "part" in body) return yield _this5.submitRawAssetUpload(body, false);
|
|
@@ -1008,8 +1027,8 @@ var CalmLensClient = class CalmLensClient {
|
|
|
1008
1027
|
query: { queue: false }
|
|
1009
1028
|
})).data;
|
|
1010
1029
|
});
|
|
1011
|
-
return function moderate(
|
|
1012
|
-
return
|
|
1030
|
+
return function moderate(_x12) {
|
|
1031
|
+
return _ref16.apply(this, arguments);
|
|
1013
1032
|
};
|
|
1014
1033
|
}(),
|
|
1015
1034
|
/**
|
|
@@ -1019,7 +1038,7 @@ var CalmLensClient = class CalmLensClient {
|
|
|
1019
1038
|
* @returns Promise with asset data
|
|
1020
1039
|
*/
|
|
1021
1040
|
uploadPart: function() {
|
|
1022
|
-
var
|
|
1041
|
+
var _ref17 = require_CalmLensUtils._asyncToGenerator(function* ({ assetId, part }) {
|
|
1023
1042
|
var _part$sizeInBytes3, _this$multipartUpload;
|
|
1024
1043
|
if (!assetId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Asset ID is required" });
|
|
1025
1044
|
if (!part) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Part options are required" });
|
|
@@ -1037,8 +1056,8 @@ var CalmLensClient = class CalmLensClient {
|
|
|
1037
1056
|
}
|
|
1038
1057
|
return yield _this5.submitRawAssetPart(assetId, part, (_this$multipartUpload = _this5.multipartUploadQueues.get(assetId)) !== null && _this$multipartUpload !== void 0 ? _this$multipartUpload : false);
|
|
1039
1058
|
});
|
|
1040
|
-
return function uploadPart(
|
|
1041
|
-
return
|
|
1059
|
+
return function uploadPart(_x13) {
|
|
1060
|
+
return _ref17.apply(this, arguments);
|
|
1042
1061
|
};
|
|
1043
1062
|
}(),
|
|
1044
1063
|
/**
|
|
@@ -1047,9 +1066,9 @@ var CalmLensClient = class CalmLensClient {
|
|
|
1047
1066
|
* auth cookies or API keys to the CDN on every media request.
|
|
1048
1067
|
*/
|
|
1049
1068
|
createSignedUrl: function() {
|
|
1050
|
-
var
|
|
1069
|
+
var _ref19 = require_CalmLensUtils._asyncToGenerator(function* (_ref18) {
|
|
1051
1070
|
var _options$resource2, _options$expiresInSec;
|
|
1052
|
-
let { assetId } =
|
|
1071
|
+
let { assetId } = _ref18, options = require_CalmLensUtils._objectWithoutProperties(_ref18, _excluded7);
|
|
1053
1072
|
if (!assetId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Asset ID is required" });
|
|
1054
1073
|
if (options.lens && options.transform) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Specify either a lens or a transform, not both" });
|
|
1055
1074
|
return (yield _this5.endpoints.postAssetSignedUrl.submit({
|
|
@@ -1062,20 +1081,20 @@ var CalmLensClient = class CalmLensClient {
|
|
|
1062
1081
|
params: { assetId }
|
|
1063
1082
|
})).data;
|
|
1064
1083
|
});
|
|
1065
|
-
return function createSignedUrl(
|
|
1066
|
-
return
|
|
1084
|
+
return function createSignedUrl(_x14) {
|
|
1085
|
+
return _ref19.apply(this, arguments);
|
|
1067
1086
|
};
|
|
1068
1087
|
}(),
|
|
1069
1088
|
move: function() {
|
|
1070
|
-
var
|
|
1089
|
+
var _ref20 = require_CalmLensUtils._asyncToGenerator(function* ({ assetId, folderId }) {
|
|
1071
1090
|
if (!assetId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Asset ID is required" });
|
|
1072
1091
|
return (yield _this5.endpoints.moveAsset.submit({
|
|
1073
1092
|
params: { assetId },
|
|
1074
1093
|
body: { folderId }
|
|
1075
1094
|
})).data;
|
|
1076
1095
|
});
|
|
1077
|
-
return function move(
|
|
1078
|
-
return
|
|
1096
|
+
return function move(_x15) {
|
|
1097
|
+
return _ref20.apply(this, arguments);
|
|
1079
1098
|
};
|
|
1080
1099
|
}(),
|
|
1081
1100
|
/**
|
|
@@ -1083,12 +1102,12 @@ var CalmLensClient = class CalmLensClient {
|
|
|
1083
1102
|
* moderated like a new upload; its content must still be stored.
|
|
1084
1103
|
*/
|
|
1085
1104
|
retry: function() {
|
|
1086
|
-
var
|
|
1105
|
+
var _ref21 = require_CalmLensUtils._asyncToGenerator(function* ({ assetId }) {
|
|
1087
1106
|
if (!assetId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Asset ID is required" });
|
|
1088
1107
|
return (yield _this5.endpoints.retryAsset.submit({ params: { assetId } })).data;
|
|
1089
1108
|
});
|
|
1090
|
-
return function retry(
|
|
1091
|
-
return
|
|
1109
|
+
return function retry(_x16) {
|
|
1110
|
+
return _ref21.apply(this, arguments);
|
|
1092
1111
|
};
|
|
1093
1112
|
}()
|
|
1094
1113
|
};
|
|
@@ -1102,14 +1121,14 @@ var CalmLensClient = class CalmLensClient {
|
|
|
1102
1121
|
* reshaped as `{ id, type, createdAt, projectId, data }`.
|
|
1103
1122
|
*/
|
|
1104
1123
|
list: function() {
|
|
1105
|
-
var
|
|
1124
|
+
var _ref22 = require_CalmLensUtils._asyncToGenerator(function* (options = {}) {
|
|
1106
1125
|
return (yield _this6.endpoints.getEvents.submit({
|
|
1107
1126
|
params: { projectId: _this6.options.projectId },
|
|
1108
1127
|
query: options
|
|
1109
1128
|
})).data;
|
|
1110
1129
|
});
|
|
1111
1130
|
return function list() {
|
|
1112
|
-
return
|
|
1131
|
+
return _ref22.apply(this, arguments);
|
|
1113
1132
|
};
|
|
1114
1133
|
}() };
|
|
1115
1134
|
}
|
|
@@ -1117,65 +1136,65 @@ list: function() {
|
|
|
1117
1136
|
var _this7 = this;
|
|
1118
1137
|
return {
|
|
1119
1138
|
list: function() {
|
|
1120
|
-
var
|
|
1139
|
+
var _ref23 = require_CalmLensUtils._asyncToGenerator(function* () {
|
|
1121
1140
|
return (yield _this7.endpoints.getFolders.submit({ params: { projectId: _this7.options.projectId } })).data.folders;
|
|
1122
1141
|
});
|
|
1123
1142
|
return function list() {
|
|
1124
|
-
return
|
|
1143
|
+
return _ref23.apply(this, arguments);
|
|
1125
1144
|
};
|
|
1126
1145
|
}(),
|
|
1127
1146
|
retrieve: function() {
|
|
1128
|
-
var
|
|
1147
|
+
var _ref24 = require_CalmLensUtils._asyncToGenerator(function* ({ folderId }) {
|
|
1129
1148
|
if (!folderId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Folder ID is required" });
|
|
1130
1149
|
return (yield _this7.endpoints.getFolder.submit({ params: { folderId } })).data;
|
|
1131
1150
|
});
|
|
1132
|
-
return function retrieve(
|
|
1133
|
-
return
|
|
1151
|
+
return function retrieve(_x17) {
|
|
1152
|
+
return _ref24.apply(this, arguments);
|
|
1134
1153
|
};
|
|
1135
1154
|
}(),
|
|
1136
1155
|
create: function() {
|
|
1137
|
-
var
|
|
1156
|
+
var _ref25 = require_CalmLensUtils._asyncToGenerator(function* (options) {
|
|
1138
1157
|
return (yield _this7.endpoints.postFolder.submit({
|
|
1139
1158
|
params: { projectId: _this7.options.projectId },
|
|
1140
1159
|
body: options
|
|
1141
1160
|
})).data;
|
|
1142
1161
|
});
|
|
1143
|
-
return function create(
|
|
1144
|
-
return
|
|
1162
|
+
return function create(_x18) {
|
|
1163
|
+
return _ref25.apply(this, arguments);
|
|
1145
1164
|
};
|
|
1146
1165
|
}(),
|
|
1147
1166
|
update: function() {
|
|
1148
|
-
var
|
|
1149
|
-
let { folderId } =
|
|
1167
|
+
var _ref27 = require_CalmLensUtils._asyncToGenerator(function* (_ref26) {
|
|
1168
|
+
let { folderId } = _ref26, body = require_CalmLensUtils._objectWithoutProperties(_ref26, _excluded8);
|
|
1150
1169
|
if (!folderId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Folder ID is required" });
|
|
1151
1170
|
return (yield _this7.endpoints.patchFolder.submit({
|
|
1152
1171
|
params: { folderId },
|
|
1153
1172
|
body
|
|
1154
1173
|
})).data;
|
|
1155
1174
|
});
|
|
1156
|
-
return function update(
|
|
1157
|
-
return
|
|
1175
|
+
return function update(_x19) {
|
|
1176
|
+
return _ref27.apply(this, arguments);
|
|
1158
1177
|
};
|
|
1159
1178
|
}(),
|
|
1160
1179
|
delete: function() {
|
|
1161
|
-
var
|
|
1180
|
+
var _ref28 = require_CalmLensUtils._asyncToGenerator(function* ({ folderId }) {
|
|
1162
1181
|
if (!folderId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Folder ID is required" });
|
|
1163
1182
|
yield _this7.endpoints.deleteFolder.submit({ params: { folderId } });
|
|
1164
1183
|
});
|
|
1165
|
-
return function _delete(
|
|
1166
|
-
return
|
|
1184
|
+
return function _delete(_x20) {
|
|
1185
|
+
return _ref28.apply(this, arguments);
|
|
1167
1186
|
};
|
|
1168
1187
|
}(),
|
|
1169
1188
|
move: function() {
|
|
1170
|
-
var
|
|
1189
|
+
var _ref29 = require_CalmLensUtils._asyncToGenerator(function* ({ folderId, parentId }) {
|
|
1171
1190
|
if (!folderId) throw require_CalmLensUtils.calmLensError({ id: "upload/invalid-payload" }, { message: "Folder ID is required" });
|
|
1172
1191
|
return (yield _this7.endpoints.moveFolder.submit({
|
|
1173
1192
|
params: { folderId },
|
|
1174
1193
|
body: { parentId }
|
|
1175
1194
|
})).data;
|
|
1176
1195
|
});
|
|
1177
|
-
return function move(
|
|
1178
|
-
return
|
|
1196
|
+
return function move(_x21) {
|
|
1197
|
+
return _ref29.apply(this, arguments);
|
|
1179
1198
|
};
|
|
1180
1199
|
}()
|
|
1181
1200
|
};
|
package/cjs/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_CalmLensUtils = require("./CalmLensUtils-
|
|
2
|
+
const require_CalmLensUtils = require("./CalmLensUtils-CJ6o7KRU.js");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
zod = require_CalmLensUtils.__toESM(zod);
|
|
5
5
|
//#region ../shared/src/Permissions.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorCode } from "sendable-error";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
3
3
|
function _typeof(o) {
|
|
4
4
|
"@babel/helpers - typeof";
|
|
5
5
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -9,7 +9,7 @@ function _typeof(o) {
|
|
|
9
9
|
}, _typeof(o);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region \0@oxc-project+runtime@0.
|
|
12
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
|
|
13
13
|
function toPrimitive(t, r) {
|
|
14
14
|
if ("object" != _typeof(t) || !t) return t;
|
|
15
15
|
var e = t[Symbol.toPrimitive];
|
|
@@ -21,13 +21,13 @@ function toPrimitive(t, r) {
|
|
|
21
21
|
return ("string" === r ? String : Number)(t);
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
|
-
//#region \0@oxc-project+runtime@0.
|
|
24
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
25
25
|
function toPropertyKey(t) {
|
|
26
26
|
var i = toPrimitive(t, "string");
|
|
27
27
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region \0@oxc-project+runtime@0.
|
|
30
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
31
31
|
function _defineProperty(e, r, t) {
|
|
32
32
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
33
33
|
value: t,
|
|
@@ -37,7 +37,7 @@ function _defineProperty(e, r, t) {
|
|
|
37
37
|
}) : e[r] = t, e;
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region \0@oxc-project+runtime@0.
|
|
40
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/objectSpread2.js
|
|
41
41
|
function ownKeys(e, r) {
|
|
42
42
|
var t = Object.keys(e);
|
|
43
43
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -60,7 +60,7 @@ function _objectSpread2(e) {
|
|
|
60
60
|
return e;
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
|
-
//#region \0@oxc-project+runtime@0.
|
|
63
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/asyncToGenerator.js
|
|
64
64
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
65
65
|
try {
|
|
66
66
|
var i = n[a](c), u = i.value;
|
|
@@ -371,7 +371,7 @@ var CalmLensError = class extends Error {
|
|
|
371
371
|
};
|
|
372
372
|
const calmLensError = (errorCode, options) => new CalmLensError(errorCode, options);
|
|
373
373
|
//#endregion
|
|
374
|
-
//#region \0@oxc-project+runtime@0.
|
|
374
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/objectWithoutPropertiesLoose.js
|
|
375
375
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
376
376
|
if (null == r) return {};
|
|
377
377
|
var t = {};
|
|
@@ -382,7 +382,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
382
382
|
return t;
|
|
383
383
|
}
|
|
384
384
|
//#endregion
|
|
385
|
-
//#region \0@oxc-project+runtime@0.
|
|
385
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/objectWithoutProperties.js
|
|
386
386
|
function _objectWithoutProperties(e, t) {
|
|
387
387
|
if (null == e) return {};
|
|
388
388
|
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|