@qxs-bns/utils 0.0.44 → 0.0.46
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/es/index.mjs +833 -1
- package/es/index.mjs.map +1 -1
- package/lib/index.cjs +31 -1
- package/lib/index.cjs.map +1 -1
- package/package.json +2 -2
- package/types/src/api-client/axios-client.d.ts +2 -2
- package/types/src/api-client/axios-client.d.ts.map +1 -1
- package/types/src/api-client/fetch-client.d.ts +0 -1
- package/types/src/api-client/fetch-client.d.ts.map +1 -1
- package/types/src/argo-log.d.ts +9 -2
- package/types/src/argo-log.d.ts.map +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
- package/README.md +0 -65
- package/es/src/api-client/axios-client.mjs +0 -2
- package/es/src/api-client/axios-client.mjs.map +0 -1
- package/es/src/api-client/fetch-client.mjs +0 -2
- package/es/src/api-client/fetch-client.mjs.map +0 -1
- package/es/src/argo-log.mjs +0 -2
- package/es/src/argo-log.mjs.map +0 -1
- package/es/src/date-transfer.mjs +0 -2
- package/es/src/date-transfer.mjs.map +0 -1
- package/es/src/device.mjs +0 -2
- package/es/src/device.mjs.map +0 -1
- package/es/src/file-operations.mjs +0 -2
- package/es/src/file-operations.mjs.map +0 -1
- package/es/src/json.mjs +0 -2
- package/es/src/json.mjs.map +0 -1
- package/es/src/oss-uploader.mjs +0 -2
- package/es/src/oss-uploader.mjs.map +0 -1
- package/es/src/storage.mjs +0 -2
- package/es/src/storage.mjs.map +0 -1
- package/es/src/types.mjs +0 -2
- package/es/src/types.mjs.map +0 -1
- package/es/src/watermark.mjs +0 -2
- package/es/src/watermark.mjs.map +0 -1
- package/lib/src/api-client/axios-client.cjs +0 -2
- package/lib/src/api-client/axios-client.cjs.map +0 -1
- package/lib/src/api-client/fetch-client.cjs +0 -2
- package/lib/src/api-client/fetch-client.cjs.map +0 -1
- package/lib/src/argo-log.cjs +0 -2
- package/lib/src/argo-log.cjs.map +0 -1
- package/lib/src/date-transfer.cjs +0 -2
- package/lib/src/date-transfer.cjs.map +0 -1
- package/lib/src/device.cjs +0 -2
- package/lib/src/device.cjs.map +0 -1
- package/lib/src/file-operations.cjs +0 -2
- package/lib/src/file-operations.cjs.map +0 -1
- package/lib/src/json.cjs +0 -2
- package/lib/src/json.cjs.map +0 -1
- package/lib/src/oss-uploader.cjs +0 -2
- package/lib/src/oss-uploader.cjs.map +0 -1
- package/lib/src/storage.cjs +0 -2
- package/lib/src/storage.cjs.map +0 -1
- package/lib/src/types.cjs +0 -2
- package/lib/src/types.cjs.map +0 -1
- package/lib/src/watermark.cjs +0 -2
- package/lib/src/watermark.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@vue+shared@3.5.18/node_modules/@vue/shared/dist/shared.d.ts","../../../node_modules/.pnpm/@vue+reactivity@3.5.18/node_modules/@vue/reactivity/dist/reactivity.d.ts","../../../node_modules/.pnpm/@vue+runtime-core@3.5.18/node_modules/@vue/runtime-core/dist/runtime-core.d.ts","../../../node_modules/.pnpm/csstype@3.1.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@vue+runtime-dom@3.5.18/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts","../../../node_modules/.pnpm/vue@3.5.18_typescript@5.9.2/node_modules/vue/jsx-runtime/index.d.ts","../../../packages/utils/src/argo-log.ts","../../../packages/utils/src/date-transfer.ts","../../../packages/utils/src/device.ts","../../../packages/utils/src/file-operations.ts","../../../node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/types/index.d.ts","../../../packages/utils/src/json.ts","../../../node_modules/.pnpm/@types+ali-oss@6.16.13/node_modules/@types/ali-oss/index.d.ts","../../../packages/utils/src/oss-uploader.ts","../../../packages/utils/src/storage.ts","../../../packages/utils/src/types.ts","../../../packages/utils/src/watermark.ts","../../../node_modules/.pnpm/axios@1.11.0/node_modules/axios/index.d.ts","../../../packages/utils/src/api-client/types.ts","../../../packages/utils/src/api-client/axios-client.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/common.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/hooks.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/retry.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/options.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/core/constants.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/response.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/responsepromise.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/ky.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/types/request.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/errors/httperror.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/errors/timeouterror.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/errors/forceretryerror.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/utils/type-guards.d.ts","../../../node_modules/.pnpm/ky@1.14.1/node_modules/ky/distribution/index.d.ts","../../../packages/utils/src/api-client/fetch-client.ts","../../../packages/utils/src/api-client/index.ts","../../../packages/utils/index.ts","../../../packages/utils/shims.d.ts"],"fileIdsList":[[82],[82,83,84,86],[83,84,85,86],[105],[106],[105,107,110],[110],[103,105,107,108,109,110,111,112,113,114],[105,106,115],[105,106,108],[102,103,104],[107],[111,112,113],[86],[87,88,89,90,91,93,95,96,97,98,117],[87,97,99,100],[87,100,115],[87,100,101,116],[87],[87,119],[87,92],[87,94]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"2ab096661c711e4a81cc464fa1e6feb929a54f5340b46b0a07ac6bbf857471f0","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"73f78680d4c08509933daf80947902f6ff41b6230f94dd002ae372620adb0f60","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5239f5c01bcfa9cd32f37c496cf19c61d69d37e48be9de612b541aac915805b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"25e0492430a92b27414c02e43d9a67a96d915cc9982caa3f36096933e1492f1e","impliedFormat":1},{"version":"616a55b9694bdb765470c1f66dc9606779b250520a36b87f4de2e4c594cea9bc","impliedFormat":1},{"version":"7e7187b0314b6ee31f37db0f82da408112ef548713ccbe28796ef551d47a6e0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"591c55c575d645b7f600dd2be6d9cf8d28c4b4a5297d9dfcd41b861fddce04ab","impliedFormat":1},{"version":"269536033c45b92c13747175bf6d197b959559acb119247b3eb9a0eee250c8c5","impliedFormat":1},{"version":"7bdf93e623085b522f7e1bb4fe4ee9c4df2400b53398eb9a803b9f10f911725b","signature":"4085058b6de61f42972027fce952ec6d0f966070d17d023a3f5c3ebd0c869407","affectsGlobalScope":true},{"version":"72af2f99ff91a9a6767e9374d5bcfdfa734f056e0ca4f99acfbdc0b6910cbe6a","signature":"642691020b5d2610d98d8dfa25df7e7c58a2e885d24bdec278f98842b02892f6"},{"version":"de9652b1bdad8aa2fa302b263a6a72265b276fec040394aa3b6c1adcff419ebc","signature":"6364be1269de7f1efc40324fb2cadc9a17d9bd2742d5bc1b95e309d848ca50f6"},{"version":"8f2a5590837d3f29a8d141931432d8b61e019382d1bdcb5d9990f2525242942b","signature":"4f8d8bcaa7127e5ed2d649cd5fc16b4e46b6d6960d82982ede8429d8066f9b96","affectsGlobalScope":true},{"version":"593654eebe902db28ca173f021f74ea9f77e8b344aebb0a80fa4d10f29bb3a9d","impliedFormat":1},{"version":"19f50a093aa873de6321cd996913aa89e0ec5308a8ae49bf05f071cd9614d0c6","signature":"10ee1d72a1aeb7992ec2517f444db7d425261969e0476b94a1bef6e47fd5c4b6"},{"version":"3cee95a3d958bf994db4705fbe6b7ae503867445972247adc49626f7fd16d46a","impliedFormat":1},{"version":"cab10f9be9bc19e3175a7fecd1a3ee3a810c139e8edbb9bd313928cf71d44cb8","signature":"6a2fbda7ededa991e6090e3e1523246344249347d05fbe97b441b3bcf6a5506a"},{"version":"7484cd645652e5de0e944021ff47e2794cd64e91ccba9e2ddfe2e5c4c7e62b89","signature":"b5ff6435fa9c6d61900a8764225558104fce909c6005109cb4ec42a6772052bd"},{"version":"7ad9aed3f5dc3de5049e8ba6912319dace213430b8babffad59e9b3cb8835760","signature":"a7b65e5fbd85d753c99c13a242176ec0f4f024108de502acbd52f82108f9386d"},{"version":"df1bca5fc6bc70b5a4d100bc5e359d8905927cb3534101a90ad6e54334bc4d7a","signature":"57b68e7019ec085b6644c3ce5572dfcf262183369e4e617b1fba51099a851100"},{"version":"1d7ee0c4eb734d59b6d962bc9151f6330895067cd3058ce6a3cd95347ef5c6e8","impliedFormat":99},{"version":"4a3f874e483fa265fcda7d507216a362c0c71bb4eaa1c4406f83b7fb0ecfef8a","signature":"004ed2f28cdc2572c9d668facceda3631929ffe31273b75641263849d3b44bd4"},{"version":"eeed3ec943e5613d867b479bd6f0f27898e8b3b9fc04faaeb472e28926f6cb6a","signature":"c994340180d0d188e270da55ede62fac328ee97d2ed753cd787983cdda1d9b9c"},{"version":"20fcb118bebfb69ca52595ac4f0dd500fe457a5cedb0a4186a3b09cb20aad7c7","impliedFormat":99},{"version":"253aaaa09ecea0012b1a66a3b9f1df249a190cbd4ad3a34faed290ffd76cc2ef","impliedFormat":99},{"version":"d8521817842936ef14076cfe1a5a8cd86f6681afab3e1284b4e6f82ef9603c4a","impliedFormat":99},{"version":"731cfe307acc27e7d6a1b7a92485d91e9381e34e8b23d218aa5ee2a53df399e0","impliedFormat":99},{"version":"f89148f4772e016c8de02d18124e0dd5a84a5ac8e111baaa5405e02311c04345","impliedFormat":99},{"version":"b7ff22e70edc0399bdbb137addc7305f349996fe308125c6e29a5616ddfca817","impliedFormat":99},{"version":"303fdf723814de36ab2dde0cac7aee973ff152b9375b94f5919a66a0520b30f2","impliedFormat":99},{"version":"d599aadec3c934bfebce534bb669a3293a57c0ec1b9c037ccc6e5a3ffddda700","impliedFormat":99},{"version":"e60c9658a1253a68172fa78f91409e3f5587007d6d12c8ea63733db038cfaa33","impliedFormat":99},{"version":"c6c9cac842a0ef7f3358f4caf5c24d24bcb8fad986d8c784ccb813edf8011655","impliedFormat":99},{"version":"924e5a838ba92f49627b61352a57dedffc392cdb39954ac4086e8b786637d142","impliedFormat":99},{"version":"cb26ff91cd0ac970c7653b81163eeef385b170b9e13e4fbbd63f92ca8907f1bf","impliedFormat":99},{"version":"84d5ff92c1e1d49743f1140d1388226e40e311968f9de29cdae606b5111e7bae","impliedFormat":99},{"version":"35f8161d6edaddbdecc2a18ed564ac69fa7dee792b49a8d3f33e4181551b6efe","impliedFormat":99},{"version":"a429070473d398f6d5232ad4e56de7b00a021d279c882abc41e37f4f7b5f3aa7","signature":"fb70f83765415166050b8f626d7a3da40ff9d921a343d9156bb2834db52bd338"},{"version":"4ae6f6585218504ec54c96a0f18ca84325610ecf149151e0f222dd08d4416a51","signature":"30c696c6252651063b8cc48c9ba869f8b975a449b0574a0206d8e8500716cf95"},{"version":"8b9ddc32e6d53ab2563f3a425e99d2a0139d361692e963d7765e35ccc73253db","signature":"88602184760b77d470ad73433b1103ac2f64541749d5ffa63ef2b6eaf2720c5b"},{"version":"a911a3d8df881033bf7dddc7c2e68233d6121c2114826324eae73232d0d30b97","affectsGlobalScope":true}],"root":[[88,91],93,[95,98],100,101,[116,119]],"options":{"allowImportingTsExtensions":true,"allowJs":true,"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":1,"jsxImportSource":"vue","module":99,"noFallthroughCasesInSwitch":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../../packages/utils","skipLibCheck":true,"strict":true,"target":99,"useDefineForClassFields":true,"verbatimModuleSyntax":true},"referencedMap":[[83,1],[84,2],[86,3],[106,4],[113,5],[111,6],[112,7],[115,8],[103,9],[109,10],[105,11],[108,12],[114,13],[87,14],[118,15],[101,16],[116,17],[117,18],[100,19],[88,20],[89,19],[90,19],[91,19],[93,21],[95,22],[96,19],[97,19],[98,19]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.2"}
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@vue+shared@3.5.18/node_modules/@vue/shared/dist/shared.d.ts","../../../node_modules/.pnpm/@vue+reactivity@3.5.18/node_modules/@vue/reactivity/dist/reactivity.d.ts","../../../node_modules/.pnpm/@vue+runtime-core@3.5.18/node_modules/@vue/runtime-core/dist/runtime-core.d.ts","../../../node_modules/.pnpm/csstype@3.1.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@vue+runtime-dom@3.5.18/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts","../../../node_modules/.pnpm/vue@3.5.18_typescript@5.9.2/node_modules/vue/jsx-runtime/index.d.ts","../../../packages/utils/src/argo-log.ts","../../../packages/utils/src/date-transfer.ts","../../../packages/utils/src/device.ts","../../../packages/utils/src/file-operations.ts","../../../node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/types/index.d.ts","../../../packages/utils/src/json.ts","../../../node_modules/.pnpm/@types+ali-oss@6.16.13/node_modules/@types/ali-oss/index.d.ts","../../../packages/utils/src/oss-uploader.ts","../../../packages/utils/src/storage.ts","../../../packages/utils/src/types.ts","../../../packages/utils/src/watermark.ts","../../../node_modules/.pnpm/axios@1.11.0/node_modules/axios/index.d.ts","../../../packages/utils/src/api-client/types.ts","../../../packages/utils/src/api-client/axios-client.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/common.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/hooks.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/retry.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/options.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/core/constants.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/response.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/standard-schema.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/responsepromise.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/ky.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/types/request.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/errors/kyerror.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/errors/httperror.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/errors/schemavalidationerror.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/errors/networkerror.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/errors/timeouterror.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/errors/forceretryerror.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/utils/type-guards.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/utils/merge.d.ts","../../../node_modules/.pnpm/ky@2.0.0/node_modules/ky/distribution/index.d.ts","../../../packages/utils/src/api-client/fetch-client.ts","../../../packages/utils/src/api-client/index.ts","../../../packages/utils/index.ts","../../../packages/utils/shims.d.ts"],"fileIdsList":[[82],[82,83,84,86],[83,84,85,86],[105],[106,112],[105,107,111,112],[111,112],[108],[103,105,107,108,109,110,111,112,113,114,115,116,117,118,119],[105,106,120],[105,106,109],[102,103,104],[107,108],[103,105],[112,113,115,116,117],[86],[87,88,89,90,91,93,95,96,97,98,122],[87,97,99,100],[87,100,120],[87,100,101,121],[87],[87,124],[87,92],[87,94]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"2ab096661c711e4a81cc464fa1e6feb929a54f5340b46b0a07ac6bbf857471f0","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"73f78680d4c08509933daf80947902f6ff41b6230f94dd002ae372620adb0f60","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5239f5c01bcfa9cd32f37c496cf19c61d69d37e48be9de612b541aac915805b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"25e0492430a92b27414c02e43d9a67a96d915cc9982caa3f36096933e1492f1e","impliedFormat":1},{"version":"616a55b9694bdb765470c1f66dc9606779b250520a36b87f4de2e4c594cea9bc","impliedFormat":1},{"version":"7e7187b0314b6ee31f37db0f82da408112ef548713ccbe28796ef551d47a6e0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"591c55c575d645b7f600dd2be6d9cf8d28c4b4a5297d9dfcd41b861fddce04ab","impliedFormat":1},{"version":"269536033c45b92c13747175bf6d197b959559acb119247b3eb9a0eee250c8c5","impliedFormat":1},{"version":"3ee5f064b93d5b1bc5ab91d8ff6a1f28fe1eb74af5fd48516e96777139e79d1e","signature":"ba5cec227cd6368823a178210d65b3e44fa2071a4e5806ee95f0a760ad1dfc7c","affectsGlobalScope":true},{"version":"72af2f99ff91a9a6767e9374d5bcfdfa734f056e0ca4f99acfbdc0b6910cbe6a","signature":"642691020b5d2610d98d8dfa25df7e7c58a2e885d24bdec278f98842b02892f6"},{"version":"de9652b1bdad8aa2fa302b263a6a72265b276fec040394aa3b6c1adcff419ebc","signature":"6364be1269de7f1efc40324fb2cadc9a17d9bd2742d5bc1b95e309d848ca50f6"},{"version":"8f2a5590837d3f29a8d141931432d8b61e019382d1bdcb5d9990f2525242942b","signature":"4f8d8bcaa7127e5ed2d649cd5fc16b4e46b6d6960d82982ede8429d8066f9b96","affectsGlobalScope":true},{"version":"593654eebe902db28ca173f021f74ea9f77e8b344aebb0a80fa4d10f29bb3a9d","impliedFormat":1},{"version":"19f50a093aa873de6321cd996913aa89e0ec5308a8ae49bf05f071cd9614d0c6","signature":"10ee1d72a1aeb7992ec2517f444db7d425261969e0476b94a1bef6e47fd5c4b6"},{"version":"3cee95a3d958bf994db4705fbe6b7ae503867445972247adc49626f7fd16d46a","impliedFormat":1},{"version":"cab10f9be9bc19e3175a7fecd1a3ee3a810c139e8edbb9bd313928cf71d44cb8","signature":"6a2fbda7ededa991e6090e3e1523246344249347d05fbe97b441b3bcf6a5506a"},{"version":"7484cd645652e5de0e944021ff47e2794cd64e91ccba9e2ddfe2e5c4c7e62b89","signature":"b5ff6435fa9c6d61900a8764225558104fce909c6005109cb4ec42a6772052bd"},{"version":"7ad9aed3f5dc3de5049e8ba6912319dace213430b8babffad59e9b3cb8835760","signature":"a7b65e5fbd85d753c99c13a242176ec0f4f024108de502acbd52f82108f9386d"},{"version":"df1bca5fc6bc70b5a4d100bc5e359d8905927cb3534101a90ad6e54334bc4d7a","signature":"57b68e7019ec085b6644c3ce5572dfcf262183369e4e617b1fba51099a851100"},{"version":"1d7ee0c4eb734d59b6d962bc9151f6330895067cd3058ce6a3cd95347ef5c6e8","impliedFormat":99},{"version":"4a3f874e483fa265fcda7d507216a362c0c71bb4eaa1c4406f83b7fb0ecfef8a","signature":"004ed2f28cdc2572c9d668facceda3631929ffe31273b75641263849d3b44bd4"},{"version":"172aa13c7d8f159c1adf2d0ab8e44c2e0502271255896b7b40d7b003a146868e","signature":"5b92768183b0d150947a0546818f9ac8b912dfab2389338e18aa584356aa7627"},{"version":"20fcb118bebfb69ca52595ac4f0dd500fe457a5cedb0a4186a3b09cb20aad7c7","impliedFormat":99},{"version":"5bf01adcc45ea861d59ce9f4a62b72ff067f8e297671f773207feab824ea5bde","impliedFormat":99},{"version":"c181be9250a7e03f2b2e16bfbb8aed9c0360d567347403c98856ca3a5c3e9950","impliedFormat":99},{"version":"a268c81a4bd85d93c573af06affe3ba071dc1fe3cddfe81f56f9eb203c31042d","impliedFormat":99},{"version":"da1974629b064e16e7b17eeaf057eaf85ecf1fdec837670a00978b1c84f48580","impliedFormat":99},{"version":"b7ff22e70edc0399bdbb137addc7305f349996fe308125c6e29a5616ddfca817","impliedFormat":99},{"version":"e5c4d881d584dfff997fe3d5746094dca6b44b7d6bdc530ebc3c9e176d0abfbf","impliedFormat":99},{"version":"e099f5df4879b0571845698f3b9950f8a2fa6d1b9fd7044b846a04b091aa1175","impliedFormat":99},{"version":"5ec70f5848b246f9fa5880cfd83b131f71573535664677934f7a9dca13f960e9","impliedFormat":99},{"version":"e60c9658a1253a68172fa78f91409e3f5587007d6d12c8ea63733db038cfaa33","impliedFormat":99},{"version":"a7893d449478c0a62ab7092ed7462977c16b09f2a370436bc44a1711eed23e67","impliedFormat":99},{"version":"77d8659d9a5972eaa19bf0cd0c3d06231e43d31ba7cc6507547fee351a33dd2e","impliedFormat":99},{"version":"eb5b6a0f0272254c16c41c59a3108132510993e92ec8512978757a176886867f","impliedFormat":99},{"version":"33759fb69865ea3417af3c198d34b8761c22a5a8d8424bf9228fa2f36058fe15","impliedFormat":99},{"version":"32db370355ca5464a3b7ad30344a8f0c7a171af33f827b2029cbf140414c82bd","impliedFormat":99},{"version":"7147f5ae635741341945dd989ba534026494ba84509f65a01db76ff1c223b79c","impliedFormat":99},{"version":"96579784113fb97f4a883f45dc349ea568a35088101c35a227de0667ee92c3ea","impliedFormat":99},{"version":"e1d3f282ba146fc27efc5e818b7a2d40c845d662d910afb84969a84e9b86cd6b","impliedFormat":99},{"version":"fe86507b5967819f478d2576d7717090e5d0752c3e26b87ab55adb29fc460743","impliedFormat":99},{"version":"9169f5689306a28afd84eb638734005cd1054a97a526f2c439d274e903b3006d","signature":"1169e7fd0a2546815e4a2269c205ef9aefc45edd2cb44a995fcae78e221c7e89"},{"version":"4ae6f6585218504ec54c96a0f18ca84325610ecf149151e0f222dd08d4416a51","signature":"30c696c6252651063b8cc48c9ba869f8b975a449b0574a0206d8e8500716cf95"},{"version":"8b9ddc32e6d53ab2563f3a425e99d2a0139d361692e963d7765e35ccc73253db","signature":"88602184760b77d470ad73433b1103ac2f64541749d5ffa63ef2b6eaf2720c5b"},{"version":"a911a3d8df881033bf7dddc7c2e68233d6121c2114826324eae73232d0d30b97","affectsGlobalScope":true}],"root":[[88,91],93,[95,98],100,101,[121,124]],"options":{"allowImportingTsExtensions":true,"allowJs":true,"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":1,"jsxImportSource":"vue","module":99,"noFallthroughCasesInSwitch":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../../packages/utils","skipLibCheck":true,"strict":true,"target":99,"useDefineForClassFields":true,"verbatimModuleSyntax":true},"referencedMap":[[83,1],[84,2],[86,3],[106,4],[117,5],[113,6],[115,7],[114,8],[116,7],[120,9],[103,10],[110,11],[105,12],[109,13],[104,4],[119,14],[118,15],[87,16],[123,17],[101,18],[121,19],[122,20],[100,21],[88,22],[89,21],[90,21],[91,21],[93,23],[95,24],[96,21],[97,21],[98,21]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.2"}
|
package/README.md
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
## utils 开发分类方案
|
|
2
|
-
|
|
3
|
-
### 1. **媒体处理(Media Utilities)**
|
|
4
|
-
|
|
5
|
-
- **适用情况**:如果你有多个与媒体(图像、视频、音频)相关的工具函数。
|
|
6
|
-
- **示例包含内容**:
|
|
7
|
-
- 图片剪切
|
|
8
|
-
- 视频剪辑
|
|
9
|
-
- 音频格式转换
|
|
10
|
-
|
|
11
|
-
### 2. **数据操作(Data Manipulation Utilities)**
|
|
12
|
-
|
|
13
|
-
- **适用情况**:如果你的工具函数主要用于数据处理和操作。
|
|
14
|
-
- **示例包含内容**:
|
|
15
|
-
- 图片数据处理(如剪切、压缩)
|
|
16
|
-
- 字符串处理
|
|
17
|
-
- 数组和对象操作
|
|
18
|
-
|
|
19
|
-
### 3. **工具函数(Utility Functions)**
|
|
20
|
-
|
|
21
|
-
- **适用情况**:如果你有大量通用的工具函数,难以归入更具体的类别。
|
|
22
|
-
- **示例包含内容**:
|
|
23
|
-
- 图片剪切
|
|
24
|
-
- 防抖、节流函数
|
|
25
|
-
- 深拷贝和浅拷贝
|
|
26
|
-
|
|
27
|
-
### 4. **用户界面(UI Utilities)**
|
|
28
|
-
|
|
29
|
-
- **适用情况**:如果你的工具函数主要用于用户界面的处理和操作。
|
|
30
|
-
- **示例包含内容**:
|
|
31
|
-
- 图片剪切(用于 UI)
|
|
32
|
-
- 动画函数
|
|
33
|
-
- 元素布局计算
|
|
34
|
-
|
|
35
|
-
### 5. **格式化和转换(Formatting and Conversion Utilities)**
|
|
36
|
-
|
|
37
|
-
- **适用情况**:如果你的工具函数集中在格式化和数据转换上。
|
|
38
|
-
- **示例包含内容**:
|
|
39
|
-
- 图片格式转换
|
|
40
|
-
- 日期格式化
|
|
41
|
-
- 单位转换
|
|
42
|
-
|
|
43
|
-
### 6. **性能优化(Performance Utilities)**
|
|
44
|
-
|
|
45
|
-
- **适用情况**:如果你的工具函数主要用于优化性能或提升应用效率。
|
|
46
|
-
- **示例包含内容**:
|
|
47
|
-
- 图片压缩(以减少加载时间)
|
|
48
|
-
- 缓存管理
|
|
49
|
-
- 懒加载工具
|
|
50
|
-
|
|
51
|
-
### 7. **网络处理(Networking Utilities)**
|
|
52
|
-
|
|
53
|
-
- **适用情况**:如果你的工具函数涉及网络请求或数据传输。
|
|
54
|
-
- **示例包含内容**:
|
|
55
|
-
- 图片上传/下载
|
|
56
|
-
- HTTP 请求处理
|
|
57
|
-
- WebSocket 管理
|
|
58
|
-
|
|
59
|
-
### 8. **错误处理和调试(Error Handling and Debugging Utilities)**
|
|
60
|
-
|
|
61
|
-
- **适用情况**:如果你的工具函数涉及错误处理或调试辅助。
|
|
62
|
-
- **示例包含内容**:
|
|
63
|
-
- 图片加载错误处理
|
|
64
|
-
- 日志记录
|
|
65
|
-
- 断言工具
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isPlainObject as e}from"../types.mjs";var s=Object.defineProperty,t=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const r=class s{constructor(e,r){var i=this;if(this.apiInstance=e,this.isWholeResponse=r,t(this,"useApi",async function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.isWholeResponse,r=null,o=null;try{const o={...e,...s?e.method&&["GET"].includes(e.method.toUpperCase())?{params:s}:{data:s}:{}};o.url=(o.proxyPrefix||"")+e.url,delete o.proxyPrefix;const n=await i.apiInstance(o);r=t?n.data:n.data.data}catch(e){"AxiosError"!==e.name&&(i.isAxiosResponse(e)?o=e.data:i.isErrorResponse(e)&&(o=e))}return{res:r,error:o}}),t(this,"apiClient",async(e,s,t)=>{t??this.isWholeResponse;const r={...e,...s?e.method&&["GET"].includes(e.method.toUpperCase())?{params:s}:{data:s}:{}};return r.proxyPrefix&&(r.url=(r.proxyPrefix||"")+e.url,delete r.proxyPrefix),await this.apiInstance(r)}),s.instance)return s.instance;s.instance=this,this.isWholeResponse=r}isBusinessError(s){return e(s)&&"string"==typeof s.message&&"number"==typeof s.code&&0!==s.code}isAxiosResponse(s){return e(s)&&void 0!==s.data&&this.isBusinessError(s.data)&&void 0!==s.status&&void 0!==s.statusText&&void 0!==s.headers&&void 0!==s.config&&void 0!==s.request}isErrorResponse(e){return"code"in e&&"data"in e&&"message"in e&&0!==e.code}};t(r,"instance");let i=r;export{i as ApiService};
|
|
2
|
-
//# sourceMappingURL=axios-client.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"axios-client.mjs","sources":["../../../../../packages/utils/src/api-client/axios-client.ts"],"sourcesContent":["import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'\nimport type {\n ApiTypeMap,\n BaseErrorResponse,\n BaseSuccessResponse,\n ErrorResponse,\n RequestParams,\n RequestPayload,\n SuccessResponse,\n UrlObjectType,\n} from './types'\nimport { isPlainObject } from '../types'\n\n/**\n * Axios API 响应的统一封装\n * @template W - 是否返回完整响应,true 返回完整响应,false 只返回 data\n * @template T - 响应数据的类型\n * @template S - 自定义成功响应类型\n * @template E - 自定义错误响应类型\n */\nexport interface AxiosUseApiResponse<\n W extends boolean = false,\n T = unknown,\n S extends BaseSuccessResponse<T> = SuccessResponse<T>,\n E extends BaseErrorResponse = ErrorResponse,\n> {\n res: W extends true ? S : T\n error: E | null\n}\n\n/**\n * API 服务类,提供统一的请求处理和错误处理\n * @template T - API 类型映射\n * @template U - URL 配置对象类型\n * @template S - 自定义成功响应类型\n * @template E - 自定义错误响应类型\n *\n * @example\n * ```typescript\n * // 定义 API 类型映射\n * interface UserApi extends ApiTypeMap<UserUrlObject> {\n * '/user/list': {\n * request: { page: number; size: number }\n * response: User[]\n * }\n * }\n *\n * // 使用默认响应类型\n * const api = new ApiService<UserApi, UserUrlObject>(axios.create(), false)\n *\n * // 使用自定义响应类型\n * interface CustomSuccessResponse<T> {\n * status: number\n * result: T\n * msg: string\n * }\n *\n * interface CustomErrorResponse {\n * status: number\n * result: null\n * msg: string\n * }\n *\n * const customApi = new ApiService<\n * UserApi,\n * UserUrlObject,\n * CustomSuccessResponse<unknown>,\n * CustomErrorResponse\n * >(axios.create(), false)\n *\n * // 发起请求\n * const { res, error } = await api.useApi({\n * url: '/user/list',\n * method: 'GET',\n * params: { page: 1, size: 10 }\n * })\n * ```\n */\nexport class ApiService<\n T extends ApiTypeMap<U>,\n U extends UrlObjectType,\n S extends BaseSuccessResponse = SuccessResponse<unknown>,\n E extends BaseErrorResponse = ErrorResponse,\n> {\n private static instance: ApiService<any, any, any, any>\n\n /**\n * 构造函数,实现单例模式\n * @param apiInstance - Axios 实例\n * @param isWholeResponse - 是否返回完整响应\n */\n constructor(\n private apiInstance: AxiosInstance,\n private isWholeResponse: boolean,\n ) {\n if (ApiService.instance) {\n return ApiService.instance as ApiService<T, U, S, E>\n }\n ApiService.instance = this\n this.isWholeResponse = isWholeResponse\n }\n\n /**\n * 判断是否为业务错误\n * @param obj - 待判断的对象\n */\n private isBusinessError(obj: E): boolean {\n return isPlainObject(obj)\n && typeof (obj as any).message === 'string'\n && typeof (obj as any).code === 'number'\n && (obj as any).code !== 0\n }\n\n /**\n * 判断是否为 Axios 响应对象\n * @param value - 待判断的值\n */\n private isAxiosResponse(value: any): value is AxiosResponse {\n return isPlainObject(value)\n && value.data !== undefined\n && this.isBusinessError(value.data)\n && value.status !== undefined\n && value.statusText !== undefined\n && value.headers !== undefined\n && value.config !== undefined\n && value.request !== undefined\n }\n\n /**\n * 判断是否为错误响应\n * @param value - 待判断的值\n */\n private isErrorResponse(value: any): value is E {\n return 'code' in value && 'data' in value && 'message' in value && value.code !== 0\n }\n\n /**\n * 发起 API 请求,返回统一的响应格式 { res, error }\n * @template K - URL 配置对象类型\n * @template W - 是否返回完整响应,true 返回 SuccessResponse,false 只返回 data\n * @param axiosConfig - Axios 请求配置\n * @param params - 请求参数(GET 请求会自动转为 params,其他方法转为 data)\n * @param isWholeResponse - 是否返回完整响应,默认使用实例配置\n * @returns Promise<UseApiResponse<W, T, S, E>> - 包含 res 和 error 的统一响应对象\n */\n public useApi = async <\n K extends U,\n W extends boolean = false,\n >(\n axiosConfig: Omit<AxiosRequestConfig<RequestPayload<T[K['url']]['request']>>, 'params'> & K & {\n params?: RequestParams<T[K['url']]['request']>\n },\n params?: RequestParams<T[K['url']]['request']>,\n isWholeResponse: W = this.isWholeResponse as W,\n ): Promise<AxiosUseApiResponse<W, T[K['url']]['response'], SuccessResponse<T[K['url']]['response']>, E>> => {\n let res: AxiosUseApiResponse<W, T[K['url']]['response'], SuccessResponse<T[K['url']]['response']>, E>['res'] | null = null\n let error: AxiosUseApiResponse<W, T[K['url']]['response'], SuccessResponse<T[K['url']]['response']>, E>['error'] = null\n\n try {\n // 处理请求配置\n const config = {\n ...axiosConfig,\n ...(params ? (axiosConfig.method && ['GET'].includes(axiosConfig.method.toUpperCase()) ? { params } : { data: params }) : {}),\n }\n\n // 处理代理前缀\n config.url = (config.proxyPrefix || '') + axiosConfig.url\n delete config.proxyPrefix\n\n // 发起请求\n const response = await this.apiInstance<SuccessResponse<T[K['url']]['response']>>(config)\n res = isWholeResponse\n ? response.data\n : response.data.data\n }\n catch (err: any) {\n // 错误处理\n if (err.name !== 'AxiosError') {\n if (this.isAxiosResponse(err)) {\n error = err.data as E\n }\n else if (this.isErrorResponse(err)) {\n error = err\n }\n }\n else {\n console.error(err)\n }\n }\n\n return { res: res!, error }\n }\n\n /**\n * 发起 API 请求\n * @template K - URL 配置对象类型\n * @template W - 是否返回完整响应\n * @param axiosConfig - Axios 请求配置\n * @param params - 请求参数\n * @param isWholeResponse - 是否返回完整响应,默认使用实例配置\n * @returns 根据 isWholeResponse 返回完整响应或解包后的数据\n */\n public apiClient = async <K extends U, W extends boolean = false>(\n axiosConfig: Omit<AxiosRequestConfig<RequestPayload<T[K['url']]['request']>>, 'params'> & K & {\n params?: RequestParams<T[K['url']]['request']>\n },\n params?: RequestParams<T[K['url']]['request']>,\n isWholeResponse?: W,\n ): Promise<W extends true ? AxiosResponse<T[K['url']]['response']> : T[K['url']]['response']> => {\n const useWholeResponse = isWholeResponse ?? this.isWholeResponse\n // 处理请求配置\n const config = {\n ...axiosConfig,\n ...(params ? (axiosConfig.method && ['GET'].includes(axiosConfig.method.toUpperCase()) ? { params } : { data: params }) : {}),\n }\n\n // 处理代理前缀\n if (config.proxyPrefix) {\n config.url = (config.proxyPrefix || '') + axiosConfig.url\n delete config.proxyPrefix\n }\n\n // 发起请求,利用 axios 的第二个泛型参数 R 控制解包\n if (useWholeResponse) {\n return await this.apiInstance<T[K['url']]['response']>(config)\n }\n else {\n return await this.apiInstance<any, T[K['url']]['response']>(config)\n }\n }\n}\n"],"names":["_ApiService","constructor","apiInstance","isWholeResponse","_this","this","__publicField","async","axiosConfig","params","arguments","length","undefined","res","error","config","method","includes","toUpperCase","data","url","proxyPrefix","response","err","name","isAxiosResponse","isErrorResponse","instance","isBusinessError","obj","isPlainObject","message","code","value","status","statusText","headers","request","ApiService"],"mappings":"uMA8EO,MAAMA,EAAN,MAAMA,EAaXC,WAAAA,CACUC,EACAC,GACR,IAAAC,EAAAC,KACA,GAHQA,KAAAH,YAAAA,EACAG,KAAAF,gBAAAA,EAoDVG,EAAAD,KAAO,SAASE,eAIdC,EAGAC,GAE0G,IAD1GN,EAAAO,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAqBN,EAAKD,gBAEtBU,EAAkH,KAClHC,EAA+G,KAEnH,IAEE,MAAMC,EAAS,IACVP,KACCC,EAAUD,EAAYQ,QAAU,CAAC,OAAOC,SAAST,EAAYQ,OAAOE,eAAiB,CAAET,UAAW,CAAEU,KAAMV,GAAY,CAAA,GAI5HM,EAAOK,KAAOL,EAAOM,aAAe,IAAMb,EAAYY,WAC/CL,EAAOM,YAGd,MAAMC,QAAiBlB,EAAKF,YAAsDa,GAClFF,EAAMV,EACFmB,EAASH,KACTG,EAASH,KAAKA,IACpB,OACOI,GAEY,eAAbA,EAAIC,OACFpB,EAAKqB,gBAAgBF,GACvBT,EAAQS,EAAIJ,KAELf,EAAKsB,gBAAgBH,KAC5BT,EAAQS,GAMd,CAEA,MAAO,CAAEV,MAAWC,QACtB,GAWAR,EAAAD,KAAO,YAAYE,MACjBC,EAGAC,EACAN,KAEyBA,GAAmBE,KAAKF,gBAAjD,MAEMY,EAAS,IACVP,KACCC,EAAUD,EAAYQ,QAAU,CAAC,OAAOC,SAAST,EAAYQ,OAAOE,eAAiB,CAAET,UAAW,CAAEU,KAAMV,GAAY,CAAA,GAU5H,OANIM,EAAOM,cACTN,EAAOK,KAAOL,EAAOM,aAAe,IAAMb,EAAYY,WAC/CL,EAAOM,mBAKDhB,KAAKH,YAAqCa,KAjIrDf,EAAW2B,SACb,OAAO3B,EAAW2B,SAEpB3B,EAAW2B,SAAWtB,KACtBA,KAAKF,gBAAkBA,CACzB,CAMQyB,eAAAA,CAAgBC,GACtB,OAAOC,EAAcD,IACgB,iBAAxBA,EAAYE,SACS,iBAArBF,EAAYG,MACE,IAArBH,EAAYG,IACpB,CAMQP,eAAAA,CAAgBQ,GACtB,OAAOH,EAAcG,SACD,IAAfA,EAAMd,MACNd,KAAKuB,gBAAgBK,EAAMd,YACV,IAAjBc,EAAMC,aACe,IAArBD,EAAME,iBACY,IAAlBF,EAAMG,cACW,IAAjBH,EAAMlB,aACY,IAAlBkB,EAAMI,OACb,CAMQX,eAAAA,CAAgBO,GACtB,MAAO,SAAUA,GAAS,SAAUA,GAAS,YAAaA,GAAwB,IAAfA,EAAMD,IAC3E,GAlDA1B,EANWN,EAMI,YANV,IAAMsC,EAANtC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=(e,s,r)=>((e,s,r)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r)(e,"symbol"!=typeof s?s+"":s,r);class s extends Error{constructor(t,s,r,n){super(s),e(this,"code"),e(this,"details"),e(this,"status"),this.name="ApiError",this.code=t,this.status=r,this.details=n}}const r=class t{constructor(s){if(this.client=s,e(this,"useApi",async(t,e)=>{let s=null,r=null;try{const{url:r,proxyPrefix:n,signal:a,...i}=t,o=(n||"")+r,c={...i,signal:a};e&&("GET"===t.method.toUpperCase()?c.searchParams=e:c.json=e);const l=await this.client(o,c);s=(l.headers.get("content-type")??"").toLowerCase().includes("text/event-stream")?l.body:await l.json()}catch(t){r=t}return{res:s,error:r}}),e(this,"apiClient",async(t,e)=>{const{url:s,method:r,proxyPrefix:n,signal:a,...i}=t,o=(n||"")+s,c={...i,method:r.toLowerCase(),signal:a,throwOnError:!0};e&&("GET"===r.toUpperCase()?c.searchParams=e:c.json=e);const l=await this.client(o,c);return(l.headers.get("content-type")??"").toLowerCase().includes("text/event-stream")?l.body:await l.json()}),t.instance)return t.instance;t.instance=this}};e(r,"instance");let n=r;export{s as ApiError,n as FetchApiService};
|
|
2
|
-
//# sourceMappingURL=fetch-client.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-client.mjs","sources":["../../../../../packages/utils/src/api-client/fetch-client.ts"],"sourcesContent":["import type { Options } from 'ky'\nimport type {\n ApiTypeMap,\n BaseErrorResponse,\n ErrorResponse,\n RequestParams,\n RequestPayload,\n UrlObjectType,\n UseApiResponse,\n} from './types'\n\n/**\n * 扩展的 API 请求配置选项\n */\ninterface ExtendedOptions extends Options {\n /** 内部标记:是否为重试请求 @internal */\n _isRetry?: boolean\n /** 静默模式:401 错误不弹出登录弹窗 @default false */\n _silent?: boolean\n /** 操作上下文:用于登录弹窗说明 */\n _actionContext?: string\n /** 错误处理策略:是否抛出错误 @default false */\n throwOnError?: boolean\n /** 请求取消信号,用于中止请求 */\n signal?: AbortSignal\n}\n\n/**\n * 自定义 API 错误类\n */\nexport class ApiError extends Error {\n code: string\n details?: string\n status: number\n\n constructor(code: string, message: string, status: number, details?: string) {\n super(message)\n this.name = 'ApiError'\n this.code = code\n this.status = status\n this.details = details\n }\n}\n\n// ============================================================================\n// Fetch API 服务类\n// ============================================================================\n\n/**\n * Fetch API 服务类,基于 ky 提供统一的请求处理\n */\nexport class FetchApiService<\n T extends ApiTypeMap<U>,\n U extends UrlObjectType,\n E extends BaseErrorResponse = ErrorResponse,\n> {\n private static instance: FetchApiService<any, any, any>\n\n constructor(private client: any) {\n if (FetchApiService.instance) {\n return FetchApiService.instance as FetchApiService<T, U, E>\n }\n FetchApiService.instance = this\n }\n\n /**\n * 发起 API 请求,返回统一的响应格式 { res, error }\n * @template K - URL 配置对象类型\n * @param config - 请求配置(单参数时使用 ky 原生参数如 searchParams/json)\n * @param requestData - 请求数据(双参数时自动根据 method 处理)\n * @returns Promise<{ res, error }> - 统一响应格式\n */\n public useApi = async <K extends U>(\n config: Omit<ExtendedOptions, 'method'> & K,\n requestData?: RequestParams<T[K['url']]['request']> | RequestPayload<T[K['url']]['request']>,\n ): Promise<UseApiResponse<T[K['url']]['response'], E>> => {\n let res: T[K['url']]['response'] | null = null\n let error: E | null = null\n\n try {\n // 构建请求配置\n const { url, proxyPrefix, signal, ...restOptions } = config\n const fullUrl = (proxyPrefix || '') + url\n\n const options: ExtendedOptions = {\n ...restOptions,\n signal, // 传递 signal 给 ky\n }\n\n // 双参数调用:自动根据 method 处理\n if (requestData) {\n if (config.method.toUpperCase() === 'GET') {\n options.searchParams = requestData\n }\n else {\n options.json = requestData\n }\n }\n\n // 发起请求\n const response = await this.client(fullUrl, options)\n\n // 处理 SSE 流式响应\n const contentType = response.headers.get('content-type') ?? ''\n if (contentType.toLowerCase().includes('text/event-stream')) {\n res = response.body\n }\n else {\n res = await response.json()\n }\n }\n catch (err: any) {\n // 错误已在 ky hooks 中处理,这里只需捕获\n error = err\n }\n\n return { res, error }\n }\n\n /**\n * 发起 API 请求,直接返回数据或抛出错误\n * @template K - URL 配置对象类型\n * @param config - 请求配置(单参数时使用 ky 原生参数如 searchParams/json)\n * @param requestData - 请求数据(双参数时自动根据 method 处理)\n * @returns Promise<Response> - 直接返回响应数据\n */\n public apiClient = async <K extends U>(\n config: Omit<ExtendedOptions, 'method'> & K,\n requestData?: RequestParams<T[K['url']]['request']> | RequestPayload<T[K['url']]['request']>,\n ): Promise<T[K['url']]['response']> => {\n const { url, method, proxyPrefix, signal, ...restOptions } = config\n const fullUrl = (proxyPrefix || '') + url\n\n const options: ExtendedOptions = {\n ...restOptions,\n method: method.toLowerCase(),\n signal, // 传递 signal 给 ky\n throwOnError: true,\n }\n\n // 双参数调用:自动根据 method 处理\n if (requestData) {\n if (method.toUpperCase() === 'GET') {\n options.searchParams = requestData\n }\n else {\n options.json = requestData\n }\n }\n\n // 发起请求\n const response = await this.client(fullUrl, options)\n\n // 处理 SSE 流式响应\n const contentType = response.headers.get('content-type') ?? ''\n if (contentType.toLowerCase().includes('text/event-stream')) {\n return response.body as any\n }\n\n return await response.json()\n }\n}\n"],"names":["ApiError","Error","constructor","code","message","status","details","super","__publicField","this","name","_FetchApiService","client","async","config","requestData","res","error","url","proxyPrefix","signal","restOptions","fullUrl","options","method","toUpperCase","searchParams","json","response","headers","get","toLowerCase","includes","body","err","throwOnError","instance","FetchApiService"],"mappings":"0JA8BO,MAAMA,UAAiBC,MAK5BC,WAAAA,CAAYC,EAAcC,EAAiBC,EAAgBC,GACzDC,MAAMH,GALRI,EAAAC,KAAA,QACAD,EAAAC,KAAA,WACAD,EAAAC,KAAA,UAIEA,KAAKC,KAAO,WACZD,KAAKN,KAAOA,EACZM,KAAKJ,OAASA,EACdI,KAAKH,QAAUA,CACjB,EAUK,MAAMK,EAAN,MAAMA,EAOXT,WAAAA,CAAoBU,GAClB,GADkBH,KAAAG,OAAAA,EAcpBJ,EAAAC,KAAO,SAASI,MACdC,EACAC,KAEA,IAAIC,EAAsC,KACtCC,EAAkB,KAEtB,IAEE,MAAMC,IAAEA,EAAAC,YAAKA,EAAAC,OAAaA,KAAWC,GAAgBP,EAC/CQ,GAAWH,GAAe,IAAMD,EAEhCK,EAA2B,IAC5BF,EACHD,UAIEL,IACkC,QAAhCD,EAAOU,OAAOC,cAChBF,EAAQG,aAAeX,EAGvBQ,EAAQI,KAAOZ,GAKnB,MAAMa,QAAiBnB,KAAKG,OAAOU,EAASC,GAK1CP,GAFkBY,EAASC,QAAQC,IAAI,iBAAmB,IAC5CC,cAAcC,SAAS,qBAC/BJ,EAASK,WAGHL,EAASD,MAEzB,OACOO,GAELjB,EAAQiB,CACV,CAEA,MAAO,CAAElB,MAAKC,WAUhBT,EAAAC,KAAO,YAAYI,MACjBC,EACAC,KAEA,MAAMG,IAAEA,EAAAM,OAAKA,EAAAL,YAAQA,SAAaC,KAAWC,GAAgBP,EACvDQ,GAAWH,GAAe,IAAMD,EAEhCK,EAA2B,IAC5BF,EACHG,OAAQA,EAAOO,cACfX,SACAe,cAAc,GAIZpB,IAC2B,QAAzBS,EAAOC,cACTF,EAAQG,aAAeX,EAGvBQ,EAAQI,KAAOZ,GAKnB,MAAMa,QAAiBnB,KAAKG,OAAOU,EAASC,GAI5C,OADoBK,EAASC,QAAQC,IAAI,iBAAmB,IAC5CC,cAAcC,SAAS,qBAC9BJ,EAASK,WAGLL,EAASD,SApGlBhB,EAAgByB,SAClB,OAAOzB,EAAgByB,SAEzBzB,EAAgByB,SAAW3B,IAC7B,GAPAD,EALWG,EAKI,YALV,IAAM0B,EAAN1B"}
|
package/es/src/argo-log.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty,t=(t,s,e)=>((t,s,e)=>s in t?i(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e)(t,"symbol"!=typeof s?s+"":s,e);const s=class i{constructor(){t(this,"sdkPromise",null),t(this,"sdk",null)}static getInstance(){return i.instance||(i.instance=new i),i.instance}async loadSDK(){if(this.sdk)return this.sdk;if(this.sdkPromise)return this.sdkPromise;if("undefined"==typeof window)return null;const i=window;return i.__argoLogSDKPromise?(this.sdkPromise=i.__argoLogSDKPromise,this.sdk=await this.sdkPromise,this.sdk):(this.sdkPromise=this.createSDKPromise(),i.__argoLogSDKPromise=this.sdkPromise,this.sdk=await this.sdkPromise,this.sdk)}async createSDKPromise(){try{return(await import("ans-javascript-sdk")).default}catch(i){return this.createMockSDK()}}createMockSDK(){return{init:i=>{},track:(i,t)=>{},profileSet:i=>{},alias:i=>{}}}getSDK(){return this.sdk}isLoaded(){return null!==this.sdk}};t(s,"instance");const e=s.getInstance(),n=class i{constructor(s){t(this,"AnalysysAgent",null),t(this,"pendingQueue",[]),t(this,"isInitialized",!1),t(this,"isInitializing",!1),t(this,"track",(i,t)=>{const s=()=>{i&&this.AnalysysAgent&&this.AnalysysAgent.track(i,t)};if(this.isInitialized)try{s()}catch(i){}else this.pendingQueue.push(s)}),t(this,"setProfile",i=>{const t=()=>{i&&this.AnalysysAgent&&this.AnalysysAgent.profileSet(i)};if(this.isInitialized)try{t()}catch(i){}else this.pendingQueue.push(t)}),t(this,"setAlias",i=>{const t=()=>{i&&this.AnalysysAgent&&this.AnalysysAgent.alias(i)};if(this.isInitialized)try{t()}catch(i){}else this.pendingQueue.push(t)});try{if("undefined"==typeof window)return this;const t=JSON.stringify(s),e=i.instances.get(t);if(e)return e;if(!s)return this;this.initializeSDK(s,t)}catch(i){}return this}async initializeSDK(t,s){if(!this.isInitializing&&!this.isInitialized){this.isInitializing=!0;try{const n=await e.loadSDK();n&&(this.AnalysysAgent=n,n.init(t),this.isInitialized=!0,i.instances.set(s,this),this.processPendingQueue())}catch(i){}finally{this.isInitializing=!1}}}processPendingQueue(){this.pendingQueue.forEach(i=>i()),this.pendingQueue=[]}get initialized(){return this.isInitialized}async waitForInitialization(){if(this.isInitialized)return!0;const i=Date.now();for(;!this.isInitialized&&Date.now()-i<5e3;)await new Promise(i=>setTimeout(i,100));return this.isInitialized}};t(n,"instances",new Map);let a=n;export{a as ArgoLog};
|
|
2
|
-
//# sourceMappingURL=argo-log.mjs.map
|
package/es/src/argo-log.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"argo-log.mjs","sources":["../../../../packages/utils/src/argo-log.ts"],"sourcesContent":["// SDK 配置接口\nexport interface AnalysysConfig {\n encryptType?: number\n debugMode?: number\n appkey: string\n uploadURL: string\n autoProfile?: boolean\n autoTrack?: boolean\n}\n\n// SDK 实例接口\nexport interface AnalysysAgentInterface {\n init: (config: AnalysysConfig) => void\n track: (eventName: string, properties?: Record<string, any>) => void\n profileSet: (properties: Record<string, any>) => void\n alias: (aliasId: string) => void\n}\n\n// 全局窗口类型扩展\ndeclare global {\n interface Window {\n __argoLogSDKPromise?: Promise<AnalysysAgentInterface | null>\n }\n}\n\n// 定义配置项的类型别名,保持向后兼容\nexport interface EnvironmentConfig extends AnalysysConfig {}\n\n/**\n * SDK 加载器 - 统一管理 SDK 的加载和初始化\n */\nclass SDKLoader {\n private static instance: SDKLoader\n private sdkPromise: Promise<AnalysysAgentInterface | null> | null = null\n private sdk: AnalysysAgentInterface | null = null\n\n private constructor() {}\n\n static getInstance(): SDKLoader {\n if (!SDKLoader.instance) {\n SDKLoader.instance = new SDKLoader()\n }\n return SDKLoader.instance\n }\n\n /**\n * 加载 SDK\n */\n async loadSDK(): Promise<AnalysysAgentInterface | null> {\n // 如果已经加载过,直接返回\n if (this.sdk) {\n return this.sdk\n }\n\n // 如果正在加载,等待加载完成\n if (this.sdkPromise) {\n return this.sdkPromise\n }\n\n // 检查浏览器环境\n if (typeof window === 'undefined') {\n console.warn('[ArgoLog] 仅支持浏览器环境')\n return null\n }\n\n // 检查是否已有全局 Promise\n const windowAny = window as any\n if (windowAny.__argoLogSDKPromise) {\n this.sdkPromise = windowAny.__argoLogSDKPromise\n this.sdk = await this.sdkPromise\n return this.sdk\n }\n\n // 创建新的加载 Promise\n this.sdkPromise = this.createSDKPromise()\n windowAny.__argoLogSDKPromise = this.sdkPromise\n\n this.sdk = await this.sdkPromise\n return this.sdk\n }\n\n /**\n * 创建 SDK 加载 Promise\n */\n private async createSDKPromise(): Promise<AnalysysAgentInterface | null> {\n try {\n // 尝试动态导入\n const module = await import('ans-javascript-sdk')\n return module.default as AnalysysAgentInterface\n }\n catch (error) {\n // 在 docs 环境中,可能无法加载 SDK,提供一个 mock 实现\n console.warn('[ArgoLog] SDK 加载失败,使用 mock 实现:', error)\n return this.createMockSDK()\n }\n }\n\n /**\n * 创建 Mock SDK - 用于开发和文档环境\n */\n private createMockSDK(): AnalysysAgentInterface {\n return {\n init: (config) => {\n console.log('[ArgoLog Mock] SDK 初始化:', config)\n },\n track: (eventName, properties) => {\n console.log('[ArgoLog Mock] 追踪事件:', eventName, properties)\n },\n profileSet: (properties) => {\n console.log('[ArgoLog Mock] 设置用户画像:', properties)\n },\n alias: (aliasId) => {\n console.log('[ArgoLog Mock] 设置用户别名:', aliasId)\n },\n }\n }\n\n /**\n * 获取已加载的 SDK\n */\n getSDK(): AnalysysAgentInterface | null {\n return this.sdk\n }\n\n /**\n * 检查 SDK 是否已加载\n */\n isLoaded(): boolean {\n return this.sdk !== null\n }\n}\n\n// SDK 加载器单例\nconst sdkLoader = SDKLoader.getInstance()\n\n/**\n * ArgoLog 类 - 用于处理埋点统计的工具类\n *\n * @class ArgoLog\n * @description 基于 AnalysysAgent SDK 封装的埋点工具类,提供了埋点追踪、用户画像设置和用户别名设置等功能\n * @example\n * ```typescript\n * const argoLog = new ArgoLog({\n * appkey: 'your-app-key',\n * uploadURL: 'your-upload-url'\n * });\n *\n * // 追踪事件\n * argoLog.track('event_name', { key: 'value' });\n * ```\n */\nexport class ArgoLog<T extends EnvironmentConfig = EnvironmentConfig> {\n private static instances = new Map<string, ArgoLog<any>>()\n private AnalysysAgent: AnalysysAgentInterface | null = null\n private pendingQueue: Array<() => void> = []\n private isInitialized = false\n private isInitializing = false\n\n constructor(envConfig: T) {\n try {\n if (typeof window === 'undefined') {\n console.warn('[ArgoLog] 仅支持浏览器环境')\n return this\n }\n\n const configKey = JSON.stringify(envConfig)\n const existingInstance = ArgoLog.instances.get(configKey)\n if (existingInstance) {\n return existingInstance\n }\n\n if (!envConfig) {\n console.error('[ArgoLog] envConfig is required')\n return this\n }\n\n this.initializeSDK(envConfig, configKey)\n }\n catch (error) {\n console.warn('[ArgoLog] Init failed:', error)\n }\n return this\n }\n\n private async initializeSDK(envConfig: T, configKey: string) {\n if (this.isInitializing || this.isInitialized) {\n return\n }\n\n this.isInitializing = true\n\n try {\n // 使用 SDK 加载器加载 SDK\n const sdk = await sdkLoader.loadSDK()\n\n if (sdk) {\n this.AnalysysAgent = sdk\n sdk.init(envConfig)\n this.isInitialized = true\n ArgoLog.instances.set(configKey, this)\n this.processPendingQueue()\n }\n else {\n console.warn('[ArgoLog] SDK 加载失败')\n }\n }\n catch (error) {\n console.warn('[ArgoLog] SDK 初始化失败:', error)\n }\n finally {\n this.isInitializing = false\n }\n }\n\n private processPendingQueue() {\n // SDK 初始化完成后,重放所有暂存的调用\n this.pendingQueue.forEach(fn => fn())\n this.pendingQueue = []\n }\n\n track = (name: string, opt?: Record<string, any>): void => {\n const exec = () => {\n if (!name) {\n console.warn('[ArgoLog] track: name is required')\n return\n }\n if (this.AnalysysAgent) {\n this.AnalysysAgent.track(name, opt)\n }\n }\n\n if (!this.isInitialized) {\n // SDK 未初始化,暂存调用\n this.pendingQueue.push(exec)\n // 静默处理,不显示暂存信息,避免用户困惑\n return\n }\n\n try {\n exec()\n }\n catch (error) {\n console.warn('[ArgoLog] track failed:', error)\n }\n }\n\n setProfile = (info: Record<string, any>): void => {\n const exec = () => {\n if (!info) {\n console.warn('[ArgoLog] setProfile: info is required')\n return\n }\n if (this.AnalysysAgent) {\n this.AnalysysAgent.profileSet(info)\n }\n }\n\n if (!this.isInitialized) {\n this.pendingQueue.push(exec)\n // 静默处理,不显示暂存信息\n return\n }\n\n try {\n exec()\n }\n catch (error) {\n console.warn('[ArgoLog] setProfile failed:', error)\n }\n }\n\n setAlias = (code: string): void => {\n const exec = () => {\n if (!code) {\n console.warn('[ArgoLog] setAlias: code is required')\n return\n }\n if (this.AnalysysAgent) {\n this.AnalysysAgent.alias(code)\n }\n }\n\n if (!this.isInitialized) {\n this.pendingQueue.push(exec)\n // 静默处理,不显示暂存信息\n return\n }\n\n try {\n exec()\n }\n catch (error) {\n console.warn('[ArgoLog] setAlias failed:', error)\n }\n }\n\n /**\n * 获取 SDK 初始化状态\n */\n get initialized(): boolean {\n return this.isInitialized\n }\n\n /**\n * 等待 SDK 初始化完成\n */\n async waitForInitialization(): Promise<boolean> {\n if (this.isInitialized) {\n return true\n }\n\n // 等待最多 5 秒\n const timeout = 5000\n const startTime = Date.now()\n\n while (!this.isInitialized && (Date.now() - startTime) < timeout) {\n await new Promise(resolve => setTimeout(resolve, 100))\n }\n\n return this.isInitialized\n }\n}\n"],"names":["_SDKLoader","constructor","__publicField","this","getInstance","instance","loadSDK","sdk","sdkPromise","window","windowAny","__argoLogSDKPromise","createSDKPromise","import","default","error","createMockSDK","init","config","track","eventName","properties","profileSet","alias","aliasId","getSDK","isLoaded","sdkLoader","_ArgoLog","envConfig","name","opt","exec","AnalysysAgent","isInitialized","pendingQueue","push","info","code","configKey","JSON","stringify","existingInstance","instances","get","initializeSDK","isInitializing","set","processPendingQueue","forEach","fn","initialized","waitForInitialization","startTime","Date","now","Promise","resolve","setTimeout","Map","ArgoLog"],"mappings":"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"}
|
package/es/src/date-transfer.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function t(t){const o=Math.floor(t/1e3),r=Math.floor(o/60),n=Math.floor(r/60),$=Math.floor(n/24),f=t=>t.toString().padStart(2,"0");if(n<1){return`${f(r%60)}:${f(o%60)}`}if($<1){return`${f(n)}:${f(r%60)}:${f(o%60)}`}const h=n%24,u=r%60,a=[];return $>0&&a.push(`${$}天`),h>0&&a.push(`${h}小时`),u>0&&a.push(`${u}分钟`),a.join("")}export{t as formatDuration};
|
|
2
|
-
//# sourceMappingURL=date-transfer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-transfer.mjs","sources":["../../../../packages/utils/src/date-transfer.ts"],"sourcesContent":["/**\n * 智能格式化毫秒时间\n * @param ms 毫秒数\n * @returns 格式化后的时间字符串\n *\n * 规则:\n * 1. 小于1小时:显示 MM:SS\n * 2. 小于24小时:显示 HH:MM:SS\n * 3. 大于等于24小时:显示 x天x小时x分钟\n */\nexport function formatDuration(ms: number): string {\n const seconds = Math.floor(ms / 1000)\n const minutes = Math.floor(seconds / 60)\n const hours = Math.floor(minutes / 60)\n const days = Math.floor(hours / 24)\n\n const pad = (num: number) => num.toString().padStart(2, '0')\n\n // 如果时间小于1小时,返回 MM:SS\n if (hours < 1) {\n const mm = pad(minutes % 60)\n const ss = pad(seconds % 60)\n return `${mm}:${ss}`\n }\n\n // 如果时间小于24小时,返回 HH:MM:SS\n if (days < 1) {\n const hh = pad(hours)\n const mm = pad(minutes % 60)\n const ss = pad(seconds % 60)\n return `${hh}:${mm}:${ss}`\n }\n\n // 如果时间大于等于24小时,返回 x天x小时x分钟\n const remainingHours = hours % 24\n const remainingMinutes = minutes % 60\n\n const parts: string[] = []\n if (days > 0) {\n parts.push(`${days}天`)\n }\n if (remainingHours > 0) {\n parts.push(`${remainingHours}小时`)\n }\n if (remainingMinutes > 0) {\n parts.push(`${remainingMinutes}分钟`)\n }\n\n return parts.join('')\n}\n"],"names":["formatDuration","ms","seconds","Math","floor","minutes","hours","days","pad","num","toString","padStart","remainingHours","remainingMinutes","parts","push","join"],"mappings":"AAUO,SAASA,EAAeC,GAC7B,MAAMC,EAAUC,KAAKC,MAAMH,EAAK,KAC1BI,EAAUF,KAAKC,MAAMF,EAAU,IAC/BI,EAAQH,KAAKC,MAAMC,EAAU,IAC7BE,EAAOJ,KAAKC,MAAME,EAAQ,IAE1BE,EAAOC,GAAgBA,EAAIC,WAAWC,SAAS,EAAG,KAGxD,GAAIL,EAAQ,EAAG,CAGb,MAAO,GAFIE,EAAIH,EAAU,OACdG,EAAIN,EAAU,KAE3B,CAGA,GAAIK,EAAO,EAAG,CAIZ,MAAO,GAHIC,EAAIF,MACJE,EAAIH,EAAU,OACdG,EAAIN,EAAU,KAE3B,CAGA,MAAMU,EAAiBN,EAAQ,GACzBO,EAAmBR,EAAU,GAE7BS,EAAkB,GAWxB,OAVIP,EAAO,GACTO,EAAMC,KAAK,GAAGR,MAEZK,EAAiB,GACnBE,EAAMC,KAAK,GAAGH,OAEZC,EAAmB,GACrBC,EAAMC,KAAK,GAAGF,OAGTC,EAAME,KAAK,GACpB"}
|
package/es/src/device.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function n(){const n=navigator.userAgent;return/iPhone|iPad|iPod|iOS/i.test(n)?"iOS":/Android/i.test(n)?"Android":"desktop"}function t(){const t=n();return"iOS"===t||"Android"===t}function i(){return/iPhone|iPad|iPod|iOS/i.test(navigator.userAgent)}function o(){return/Android/i.test(navigator.userAgent)}export{n as getDeviceType,o as isAndroid,i as isIOS,t as isMobile};
|
|
2
|
-
//# sourceMappingURL=device.mjs.map
|
package/es/src/device.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device.mjs","sources":["../../../../packages/utils/src/device.ts"],"sourcesContent":["/**\n * 获取设备类型\n * @returns {string} 设备类型: \"iOS\", \"Android\" 或 \"desktop\"\n */\nexport function getDeviceType() {\n const userAgent = navigator.userAgent\n\n if (/iPhone|iPad|iPod|iOS/i.test(userAgent)) {\n return 'iOS'\n }\n else if (/Android/i.test(userAgent)) {\n return 'Android'\n }\n else {\n return 'desktop'\n }\n}\n\n/**\n * 判断是否是移动端\n */\nexport function isMobile() {\n const deviceType = getDeviceType()\n return deviceType === 'iOS' || deviceType === 'Android'\n}\n\n/**\n * 判断是否是ios\n */\nexport function isIOS() {\n return /iPhone|iPad|iPod|iOS/i.test(navigator.userAgent)\n}\n\n/**\n * 判断是否是安卓\n */\nexport function isAndroid() {\n return /Android/i.test(navigator.userAgent)\n}\n"],"names":["getDeviceType","userAgent","navigator","test","isMobile","deviceType","isIOS","isAndroid"],"mappings":"AAIO,SAASA,IACd,MAAMC,EAAYC,UAAUD,UAE5B,MAAI,wBAAwBE,KAAKF,GACxB,MAEA,WAAWE,KAAKF,GAChB,UAGA,SAEX,CAKO,SAASG,IACd,MAAMC,EAAaL,IACnB,MAAsB,QAAfK,GAAuC,YAAfA,CACjC,CAKO,SAASC,IACd,MAAO,wBAAwBH,KAAKD,UAAUD,UAChD,CAKO,SAASM,IACd,MAAO,WAAWJ,KAAKD,UAAUD,UACnC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
async function o(o){return new Promise((n,d)=>{try{const e=document.createElement("script");e.src=o,e.onload=()=>{n()},e.onerror=()=>{d(new Error(`Failed to load script from ${o}`))},document.head.appendChild(e)}catch(o){d(o)}})}async function n(n){if("undefined"==typeof window)throw new TypeError("VideoUploader 只能在浏览器环境中使用");window.AliyunUpload||await async function(){try{if(await o("https://gosspublic.alicdn.com/aliyun-oss-sdk.min.js"),await o("https://cdnfile.yaomaitong.cn/cdn/js/aliyun-upload-sdk1.3.1.min.js"),!window.AliyunUpload)throw new Error("SDK 加载成功但未找到 AliyunUpload 对象")}catch(o){throw o}}();let d=null,e=null;const a=new window.AliyunUpload.Vod({onUploadProgress:n.onUploadProgress,onUploadTokenExpired:n.onUploadTokenExpired||(()=>{}),onUploadstarted:async o=>{try{const{uploadAuth:d,uploadAddress:e,videoId:t}=await(n.onUploadstarted?.(o))||{};d&&e&&t&&a.setUploadAuthAndAddress(o,d,e,t)}catch(o){throw o}},onUploadSucceed:o=>{d?.(o)},onUploadFailed:(o,n,d)=>{e?.(new Error(`${d} ${n}`))}});return{uploader:a,upload:async o=>new Promise((n,t)=>{d=n,e=t;const r=JSON.stringify({Vod:{UserData:{IsShowWaterMark:"false",Priority:"7"}}});a.addFile(o,null,null,null,r),a.startUpload()})}}function d(o,n){const d=document.createElement("a");d.download=n,d.style.display="none",d.href=o,document.body.appendChild(d),d.click(),document.body.removeChild(d)}export{n as createVideoUploader,d as downloadFile};
|
|
2
|
-
//# sourceMappingURL=file-operations.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-operations.mjs","sources":["../../../../packages/utils/src/file-operations.ts"],"sourcesContent":["declare global {\n interface Window {\n AliyunUpload: any\n OSS: any\n }\n}\n\nasync function loadScript(src: string): Promise<void> {\n return new Promise((resolve, reject) => {\n try {\n const script = document.createElement('script')\n script.src = src\n script.onload = () => {\n resolve()\n }\n script.onerror = () => {\n reject(new Error(`Failed to load script from ${src}`))\n }\n document.head.appendChild(script)\n }\n catch (error) {\n console.error('loadScript error:', error)\n reject(error)\n }\n })\n}\nasync function initAliyunSDK() {\n try {\n await loadScript('https://gosspublic.alicdn.com/aliyun-oss-sdk.min.js')\n await loadScript('https://cdnfile.yaomaitong.cn/cdn/js/aliyun-upload-sdk1.3.1.min.js')\n\n if (!window.AliyunUpload) {\n throw new Error('SDK 加载成功但未找到 AliyunUpload 对象')\n }\n }\n catch (error) {\n console.error('无法加载阿里云上传SDK:', error)\n throw error\n }\n}\n\nexport interface UploadInfo {\n file: File\n videoId?: string\n}\n\ninterface VideoUploadOptions {\n onUploadFailed?: (uploadInfo: any, code: string, message: string) => void\n onUploadSucceed?: (uploadInfo: any) => void\n onUploadProgress?: (uploadInfo: UploadInfo, totalSize: number, percent: number) => void\n onUploadTokenExpired?: (response: any) => void\n onUploadstarted?: (uploadInfo: UploadInfo) => Promise<{ uploadAuth: string, uploadAddress: string, videoId: string }>\n}\n\ninterface VideoUploadResult {\n videoId: string\n uploadInfo: any\n}\nexport interface IVideoUploader {\n uploader: any\n upload: (file: File) => Promise<VideoUploadResult>\n}\n\n/**\n * 创建阿里云视频上传器实例\n * @param options - 上传配置选项,包含各种回调函数\n * @returns 返回一个包含上传器实例和上传方法的对象\n */\nexport async function createVideoUploader(options: VideoUploadOptions): Promise<IVideoUploader> {\n // 检查是否在浏览器环境中运行\n if (typeof window === 'undefined') {\n throw new TypeError('VideoUploader 只能在浏览器环境中使用')\n }\n\n // 如果阿里云SDK未加载,则初始化SDK\n if (!window.AliyunUpload) {\n await initAliyunSDK()\n }\n\n // 声明Promise的resolve和reject函数,用于控制上传过程\n let currentResolve: ((value: VideoUploadResult) => void) | null = null\n let currentReject: ((reason: any) => void) | null = null\n\n // 创建阿里云上传实例\n const uploader = new window.AliyunUpload.Vod({\n // 上传进度回调\n onUploadProgress: options.onUploadProgress,\n // 上传凭证过期回调\n onUploadTokenExpired: options.onUploadTokenExpired || (() => {}),\n // 开始上传回调,用于设置上传凭证和地址\n onUploadstarted: async (uploadInfo: UploadInfo) => {\n try {\n const { uploadAuth, uploadAddress, videoId } = await options.onUploadstarted?.(uploadInfo) || {}\n if (uploadAuth && uploadAddress && videoId) {\n uploader.setUploadAuthAndAddress(uploadInfo, uploadAuth, uploadAddress, videoId)\n }\n }\n catch (error) {\n console.error('onUploadstarted error: ', error)\n throw error\n }\n },\n // 上传成功回调\n onUploadSucceed: (uploadInfo: any) => {\n currentResolve?.(uploadInfo)\n },\n // 上传失败回调\n onUploadFailed: (info: any, code: string, message: string) => {\n console.log('info: ', info)\n currentReject?.(new Error(`${message} ${code}`))\n },\n })\n\n /**\n * 上传文件方法\n * @param file - 要上传的文件对象\n * @returns Promise,解析为上传结果\n */\n const upload = async (file: File): Promise<VideoUploadResult> => {\n return new Promise((resolve, reject) => {\n currentResolve = resolve\n currentReject = reject\n\n // 设置上传的用户自定义数据\n const userData = JSON.stringify({\n Vod: {\n UserData: {\n IsShowWaterMark: 'false', // 不显示水印\n Priority: '7', // 上传优先级\n },\n },\n })\n\n // 添加文件到上传队列并开始上传\n uploader.addFile(file, null, null, null, userData)\n uploader.startUpload()\n })\n }\n\n // 返回上传器实例和上传方法\n return {\n uploader,\n upload,\n }\n}\n\n/**\n * 下载文件,创建一个隐藏的链接元素,设置下载属性并触发点击事件,然后移除该链接元素\n * @param url - 文件的URL\n * @param fileName - 文件的名称\n */\nexport function downloadFile(url: string, fileName: string) {\n const link = document.createElement('a')\n link.download = fileName\n link.style.display = 'none'\n link.href = url\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n}\n"],"names":["async","loadScript","src","Promise","resolve","reject","script","document","createElement","onload","onerror","Error","head","appendChild","error","createVideoUploader","options","window","TypeError","AliyunUpload","initAliyunSDK","currentResolve","currentReject","uploader","Vod","onUploadProgress","onUploadTokenExpired","onUploadstarted","uploadAuth","uploadAddress","videoId","uploadInfo","setUploadAuthAndAddress","onUploadSucceed","onUploadFailed","info","code","message","upload","userData","JSON","stringify","UserData","IsShowWaterMark","Priority","addFile","file","startUpload","downloadFile","url","fileName","link","download","style","display","href","body","click","removeChild"],"mappings":"AAOAA,eAAeC,EAAWC,GACxB,OAAO,IAAIC,QAAQ,CAACC,EAASC,KAC3B,IACE,MAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOJ,IAAMA,EACbI,EAAOG,OAAS,KACdL,KAEFE,EAAOI,QAAU,KACfL,EAAO,IAAIM,MAAM,8BAA8BT,OAEjDK,SAASK,KAAKC,YAAYP,EAC5B,OACOQ,GAELT,EAAOS,EACT,GAEJ,CA2CAd,eAAsBe,EAAoBC,GAExC,GAAsB,oBAAXC,OACT,MAAM,IAAIC,UAAU,6BAIjBD,OAAOE,oBAjDdnB,iBACE,IAIE,SAHMC,EAAW,6DACXA,EAAW,uEAEZgB,OAAOE,aACV,MAAM,IAAIR,MAAM,+BAEpB,OACOG,GAEL,MAAMA,CACR,CACF,CAqCUM,GAIR,IAAIC,EAA8D,KAC9DC,EAAgD,KAGpD,MAAMC,EAAW,IAAIN,OAAOE,aAAaK,IAAI,CAE3CC,iBAAkBT,EAAQS,iBAE1BC,qBAAsBV,EAAQU,sBAAA,MAAgC,GAE9DC,gBAAiB3B,UACf,IACE,MAAM4B,WAAEA,EAAAC,cAAYA,EAAAC,QAAeA,SAAkBd,EAAQW,kBAAkBI,KAAe,CAAA,EAC1FH,GAAcC,GAAiBC,GACjCP,EAASS,wBAAwBD,EAAYH,EAAYC,EAAeC,EAE5E,OACOhB,GAEL,MAAMA,CACR,GAGFmB,gBAAkBF,IAChBV,IAAiBU,IAGnBG,eAAgBA,CAACC,EAAWC,EAAcC,KAExCf,IAAgB,IAAIX,MAAM,GAAG0B,KAAWD,SA+B5C,MAAO,CACLb,WACAe,OAxBatC,SACN,IAAIG,QAAQ,CAACC,EAASC,KAC3BgB,EAAiBjB,EACjBkB,EAAgBjB,EAGhB,MAAMkC,EAAWC,KAAKC,UAAU,CAC9BjB,IAAK,CACHkB,SAAU,CACRC,gBAAiB,QACjBC,SAAU,QAMhBrB,EAASsB,QAAQC,EAAM,KAAM,KAAM,KAAMP,GACzChB,EAASwB,gBASf,CAOO,SAASC,EAAaC,EAAaC,GACxC,MAAMC,EAAO5C,SAASC,cAAc,KACpC2C,EAAKC,SAAWF,EAChBC,EAAKE,MAAMC,QAAU,OACrBH,EAAKI,KAAON,EACZ1C,SAASiD,KAAK3C,YAAYsC,GAC1BA,EAAKM,QACLlD,SAASiD,KAAKE,YAAYP,EAC5B"}
|
package/es/src/json.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{utils as e,writeFile as t,read as o}from"xlsx";function r(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;try{if(!r.length)return;const s=e.aoa_to_sheet(r);n&&(s["!merges"]=n);const c=e.book_new();e.book_append_sheet(c,s,""),t(c,`${o}.xlsx`)}catch(e){return new Error("数据导出失败")}}function n(t,r,n){return new Promise((s,c)=>{const a=new FileReader;a.readAsArrayBuffer(t),a.onload=t=>{const c=t.target?.result,a=o(c,{type:"binary"}),h=[];for(const t in a.Sheets)if(Object.prototype.hasOwnProperty.call(a.Sheets,t)){let o=[];const r=a.Sheets[t]["!ref"]||"",s=r.split(":"),c=n+s[1].toString();o=o.concat(e.sheet_to_json(a.Sheets[t],{header:1,range:n?c:r}));const i=o[0];o.shift();const l=o.map(e=>{const t={};return i.forEach((o,r)=>{t[o]=e[r]}),t});h.push(...l)}r&&r(h),s(h)},a.onerror=e=>{c(e)}})}export{r as JsonToExcel,n as excelToJson};
|
|
2
|
-
//# sourceMappingURL=json.mjs.map
|
package/es/src/json.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.mjs","sources":["../../../../packages/utils/src/json.ts"],"sourcesContent":["import { read, utils, writeFile } from 'xlsx'\n\n/**\n * 将JSON数据导出为Excel文件\n * @param title - Excel文件的标题\n * @param json - JSON数据\n * @param merge - 合并单元格的配置\n * @returns 如果JSON数据为空,则返回undefined,否则返回Excel文件的名称\n */\nexport function JsonToExcel(title = '', json: (string | number)[][] = [], merge?: any) {\n try {\n if (!json.length) {\n return\n }\n // 创建worksheet\n const worksheet = utils.aoa_to_sheet(json)\n if (merge) {\n worksheet['!merges'] = merge\n }\n // 新建空workbook,加入worksheet\n const workbook = utils.book_new()\n utils.book_append_sheet(workbook, worksheet, '')\n writeFile(workbook, `${title}.xlsx`)\n }\n catch (e) {\n console.log('e: ', e)\n return new Error('数据导出失败')\n }\n}\n\n/**\n * 将Excel数据转换为JSON\n * @param file - Excel文件\n * @param cb - 转换完成后的回调函数\n * @param start - 开始行号\n */\nexport function excelToJson(file: File, cb: (json: any[]) => void, start: number): Promise<any[]> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader()\n reader.readAsArrayBuffer(file)\n reader.onload = (e) => {\n const data = e.target?.result\n const workbook = read(data, { type: 'binary' })\n // 遍历每张表读取\n const json: any[] = []\n for (const sheet in workbook.Sheets) {\n if (Object.prototype.hasOwnProperty.call(workbook.Sheets, sheet)) {\n let arr: string[][] = []\n const fromTo = workbook.Sheets[sheet]['!ref'] || ''\n const end = fromTo.split(':')\n const space = start + end[1].toString()\n arr = arr.concat(utils.sheet_to_json(workbook.Sheets[sheet], { header: 1, range: start ? space : fromTo }))\n const titleArr = arr[0]\n arr.shift()\n const excelJsonArr = arr.map((item) => {\n const obj: {\n [key: string]: any\n } = {}\n titleArr.forEach((titleItem: string, index: number) => {\n obj[titleItem] = item[index]\n })\n return obj\n })\n json.push(...excelJsonArr)\n }\n }\n if (cb) {\n cb(json)\n }\n resolve(json)\n }\n reader.onerror = (e) => {\n reject(e)\n }\n })\n}\n"],"names":["JsonToExcel","title","arguments","length","undefined","json","merge","worksheet","utils","aoa_to_sheet","workbook","book_new","book_append_sheet","writeFile","e","Error","excelToJson","file","cb","start","Promise","resolve","reject","reader","FileReader","readAsArrayBuffer","onload","data","target","result","read","type","sheet","Sheets","Object","prototype","hasOwnProperty","call","arr","fromTo","end","split","space","toString","concat","sheet_to_json","header","range","titleArr","shift","excelJsonArr","map","item","obj","forEach","titleItem","index","push","onerror"],"mappings":"sDASO,SAASA,IAAuE,IAA3DC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAQ,GAAIG,EAAAH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAA8B,GAAII,EAAAJ,UAAAC,OAAA,EAAAD,kBAAAE,EACxE,IACE,IAAKC,EAAKF,OACR,OAGF,MAAMI,EAAYC,EAAMC,aAAaJ,GACjCC,IACFC,EAAU,WAAaD,GAGzB,MAAMI,EAAWF,EAAMG,WACvBH,EAAMI,kBAAkBF,EAAUH,EAAW,IAC7CM,EAAUH,EAAU,GAAGT,SACzB,OACOa,GAEL,OAAO,IAAIC,MAAM,SACnB,CACF,CAQO,SAASC,EAAYC,EAAYC,EAA2BC,GACjE,OAAO,IAAIC,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAS,IAAIC,WACnBD,EAAOE,kBAAkBR,GACzBM,EAAOG,OAAUZ,IACf,MAAMa,EAAOb,EAAEc,QAAQC,OACjBnB,EAAWoB,EAAKH,EAAM,CAAEI,KAAM,WAE9B1B,EAAc,GACpB,IAAA,MAAW2B,KAAStB,EAASuB,OAC3B,GAAIC,OAAOC,UAAUC,eAAeC,KAAK3B,EAASuB,OAAQD,GAAQ,CAChE,IAAIM,EAAkB,GACtB,MAAMC,EAAS7B,EAASuB,OAAOD,GAAO,SAAW,GAC3CQ,EAAMD,EAAOE,MAAM,KACnBC,EAAQvB,EAAQqB,EAAI,GAAGG,WAC7BL,EAAMA,EAAIM,OAAOpC,EAAMqC,cAAcnC,EAASuB,OAAOD,GAAQ,CAAEc,OAAQ,EAAGC,MAAO5B,EAAQuB,EAAQH,KACjG,MAAMS,EAAWV,EAAI,GACrBA,EAAIW,QACJ,MAAMC,EAAeZ,EAAIa,IAAKC,IAC5B,MAAMC,EAEF,CAAA,EAIJ,OAHAL,EAASM,QAAQ,CAACC,EAAmBC,KACnCH,EAAIE,GAAaH,EAAKI,KAEjBH,IAEThD,EAAKoD,QAAQP,EACf,CAEEhC,GACFA,EAAGb,GAELgB,EAAQhB,IAEVkB,EAAOmC,QAAW5C,IAChBQ,EAAOR,KAGb"}
|
package/es/src/oss-uploader.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"ali-oss";var t=Object.defineProperty,s=(e,s,i)=>((e,s,i)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i)(e,"symbol"!=typeof s?s+"":s,i);class i extends Error{constructor(e){super(e),this.name="OssError"}}const n={accessKeyId:"",accessKeySecret:"",stsToken:"",secure:!0,bucket:"yao-file-daily",region:"oss-cn-hangzhou",timeout:6e4};class r{static async getOssCredentials(e){const t=await e();if(!t)throw new i("获取凭证失败");return t}static getClientKey(e){return`${e.endpoint||""}-${e.region||n.region}-${e.bucket||n.bucket}`}static async initOssClient(t,s){const r=this.getClientKey(t),a=this.clients.get(r),c=Date.now();if(a&&c-a.createTime<this.expireTime)return a.client;try{const{accessKeyId:i,accessKeySecret:a,securityToken:o,bucket:l,region:d,endpoint:u,cname:g,secure:h,timeout:y}=t,p={...n,accessKeyId:i,accessKeySecret:a,stsToken:o,bucket:l||n.bucket,region:d||n.region,endpoint:u,cname:g,secure:void 0!==h?h:n.secure,timeout:y||n.timeout,refreshSTSToken:async()=>{const e=await this.getOssCredentials(s);return{accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,stsToken:e.securityToken}},refreshSTSTokenInterval:3e5},w=new e(p);return this.clients.set(r,{client:w,createTime:c,credentials:t}),w}catch(e){throw new i(e instanceof Error?e.message:String(e))}}static async getClient(e){const{getCredentials:t}=e,s=await this.getOssCredentials(t);return await this.initOssClient(s,t)}static async uploadFile(e){const{file:t,onProgress:s=()=>{},path:n,headers:r,getCredentials:a}=e,c=await this.getOssCredentials(a),o=await this.initOssClient(c,a);try{const e=n||c.path||"ksh/pdf",i=e&&/\.\w+$/.test(e)?e:`${e}/${t.name}`,a=r||c.headers,l={progress(e){const t=Math.round(100*e);s({percent:t})}};a&&(l.headers=a);return await o.multipartUpload(i,t,l)}catch(e){throw new i(e instanceof Error?e.message:String(e))}}static async generateSignedUrl(e){const{objectKey:t,getCredentials:s,expires:n=3600}=e,r=await this.getOssCredentials(s),a=await this.initOssClient(r,s);try{return await a.signatureUrl(t,{expires:n})}catch(e){throw new i(e instanceof Error?e.message:String(e))}}static clearExpiredClients(){const e=Date.now();for(const[t,s]of this.clients.entries())e-s.createTime>=this.expireTime&&this.clients.delete(t)}static clearAllClients(){this.clients.clear()}}s(r,"clients",new Map),s(r,"expireTime",9e5);const a=r.getClient.bind(r),c=r.uploadFile.bind(r),o=r.generateSignedUrl.bind(r);export{i as OssError,r as OssUploader,o as generateSignedUrl,a as getClient,c as uploadFile};
|
|
2
|
-
//# sourceMappingURL=oss-uploader.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oss-uploader.mjs","sources":["../../../../packages/utils/src/oss-uploader.ts"],"sourcesContent":["import OSS from 'ali-oss'\n\n// OSS 凭证和配置(由 getCredentials 返回)\nexport interface OssCredentialsConfig {\n // 必需的凭证\n accessKeyId: string\n accessKeySecret: string\n securityToken: string\n\n // OSS 配置\n bucket?: string\n region?: string\n endpoint?: string\n cname?: boolean\n secure?: boolean\n timeout?: number\n\n // 上传相关配置\n path?: string // 上传路径/对象键\n headers?: Record<string, string> // 自定义 headers(如 OSS 回调)\n}\n\n// uploadFile 的参数(补充性参数)\nexport interface UploadFileOptions {\n file: File\n getCredentials: () => Promise<OssCredentialsConfig | null>\n onProgress?: (p: { percent: number }) => void\n\n // 以下参数可以覆盖 getCredentials 返回的配置\n path?: string\n headers?: Record<string, string>\n}\n\n// generateSignedUrl 的参数\nexport interface GenerateSignedUrlOptions {\n objectKey: string\n getCredentials: () => Promise<OssCredentialsConfig | null>\n expires?: number // 过期时间(秒)\n}\n\n// 定义错误类型\nexport class OssError extends Error {\n constructor(message: string) {\n super(message)\n this.name = 'OssError'\n }\n}\n\nconst ossConfig: OSS.Options = {\n accessKeyId: '',\n accessKeySecret: '',\n stsToken: '',\n secure: true,\n bucket: 'yao-file-daily',\n region: 'oss-cn-hangzhou',\n timeout: 60000,\n}\n\nexport class OssUploader {\n // 使用 Map 缓存不同配置的 client\n private static clients: Map<string, { client: OSS, createTime: number, credentials: OssCredentialsConfig }> = new Map()\n private static readonly expireTime = 15 * 60 * 1000\n\n // 获取凭证配置\n private static async getOssCredentials(getCredentials: () => Promise<OssCredentialsConfig | null>): Promise<OssCredentialsConfig> {\n const credentials = await getCredentials()\n if (!credentials) {\n throw new OssError('获取凭证失败')\n }\n return credentials\n }\n\n // 生成 client 缓存 key\n private static getClientKey(config: OssCredentialsConfig): string {\n const endpoint = config.endpoint || ''\n const region = config.region || ossConfig.region\n const bucket = config.bucket || ossConfig.bucket\n return `${endpoint}-${region}-${bucket}`\n }\n\n // 初始化 OSS Client\n private static async initOssClient(credentialsConfig: OssCredentialsConfig, getCredentials: () => Promise<OssCredentialsConfig | null>): Promise<OSS> {\n const clientKey = this.getClientKey(credentialsConfig)\n const cached = this.clients.get(clientKey)\n const now = Date.now()\n\n // 检查缓存是否有效\n if (cached && (now - cached.createTime) < this.expireTime) {\n return cached.client\n }\n\n try {\n const { accessKeyId, accessKeySecret, securityToken, bucket, region, endpoint, cname, secure, timeout } = credentialsConfig\n\n // 合并配置\n const finalConfig: OSS.Options = {\n ...ossConfig,\n accessKeyId,\n accessKeySecret,\n stsToken: securityToken,\n bucket: bucket || ossConfig.bucket,\n region: region || ossConfig.region,\n endpoint,\n cname,\n secure: secure !== undefined ? secure : ossConfig.secure,\n timeout: timeout || ossConfig.timeout,\n refreshSTSToken: async () => {\n const creds = await this.getOssCredentials(getCredentials)\n return {\n accessKeyId: creds.accessKeyId,\n accessKeySecret: creds.accessKeySecret,\n stsToken: creds.securityToken,\n }\n },\n refreshSTSTokenInterval: 300000,\n }\n\n // 创建新 client\n const client = new OSS(finalConfig)\n\n // 缓存 client\n this.clients.set(clientKey, {\n client,\n createTime: now,\n credentials: credentialsConfig,\n })\n\n return client\n }\n catch (error) {\n throw new OssError(error instanceof Error ? error.message : String(error))\n }\n }\n\n // 获取 OSS Client(用于手动控制上传流程)\n public static async getClient(opts: {\n getCredentials: () => Promise<OssCredentialsConfig | null>\n }): Promise<OSS> {\n const { getCredentials } = opts\n const credentialsConfig = await this.getOssCredentials(getCredentials)\n return await this.initOssClient(credentialsConfig, getCredentials)\n }\n\n // 上传文件方法\n public static async uploadFile(opts: UploadFileOptions): Promise<OSS.MultipartUploadResult> {\n const { file, onProgress = () => {}, path, headers, getCredentials } = opts\n\n // 获取凭证配置\n const credentialsConfig = await this.getOssCredentials(getCredentials)\n\n // 初始化 client\n const client = await this.initOssClient(credentialsConfig, getCredentials)\n\n try {\n // 确定上传路径:优先使用 opts.path,其次使用 credentialsConfig.path,最后使用默认值\n const uploadPath = path || credentialsConfig.path || 'ksh/pdf'\n\n // 确定上传的对象键\n const uploadKey = (() => {\n // 1. 判断 path 是否已经是完整路径(带文件后缀)\n if (uploadPath && /\\.\\w+$/.test(uploadPath)) {\n return uploadPath\n }\n\n // 2. 否则使用 path + filename 组合\n return `${uploadPath}/${file.name}`\n })()\n\n // 确定 headers:优先使用 opts.headers,其次使用 credentialsConfig.headers\n const finalHeaders = headers || credentialsConfig.headers\n\n // 构建上传选项\n const uploadOptions: OSS.MultipartUploadOptions = {\n progress(p: number) {\n const percent = Math.round(p * 100)\n onProgress({ percent })\n },\n }\n\n // 如果有自定义 headers,添加到上传选项中\n if (finalHeaders) {\n uploadOptions.headers = finalHeaders\n }\n\n const result = await client.multipartUpload(uploadKey, file, uploadOptions)\n return result\n }\n catch (error) {\n throw new OssError(error instanceof Error ? error.message : String(error))\n }\n }\n\n // 生成签名URL方法\n public static async generateSignedUrl(opts: GenerateSignedUrlOptions): Promise<string> {\n const { objectKey, getCredentials, expires = 3600 } = opts\n\n // 获取凭证配置\n const credentialsConfig = await this.getOssCredentials(getCredentials)\n\n // 初始化 client\n const client = await this.initOssClient(credentialsConfig, getCredentials)\n\n try {\n return await client.signatureUrl(objectKey, { expires })\n }\n catch (error) {\n throw new OssError(error instanceof Error ? error.message : String(error))\n }\n }\n\n // 清理过期的 client 缓存\n public static clearExpiredClients(): void {\n const now = Date.now()\n for (const [key, value] of this.clients.entries()) {\n if (now - value.createTime >= this.expireTime) {\n this.clients.delete(key)\n }\n }\n }\n\n // 清理所有缓存\n public static clearAllClients(): void {\n this.clients.clear()\n }\n}\n\n// 导出便捷方法\nexport const getClient = OssUploader.getClient.bind(OssUploader)\nexport const uploadFile = OssUploader.uploadFile.bind(OssUploader)\nexport const generateSignedUrl = OssUploader.generateSignedUrl.bind(OssUploader)\n"],"names":["OssError","Error","constructor","message","super","this","name","ossConfig","accessKeyId","accessKeySecret","stsToken","secure","bucket","region","timeout","OssUploader","getOssCredentials","getCredentials","credentials","getClientKey","config","endpoint","initOssClient","credentialsConfig","clientKey","cached","clients","get","now","Date","createTime","expireTime","client","securityToken","cname","finalConfig","refreshSTSToken","async","creds","refreshSTSTokenInterval","OSS","set","error","String","getClient","opts","uploadFile","file","onProgress","path","headers","uploadPath","uploadKey","test","finalHeaders","uploadOptions","progress","p","percent","Math","round","multipartUpload","generateSignedUrl","objectKey","expires","signatureUrl","clearExpiredClients","key","value","entries","delete","clearAllClients","clear","__publicField","Map","bind"],"mappings":"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"}
|
package/es/src/storage.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,o,n)=>((t,o,n)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n)(t,"symbol"!=typeof o?o+"":o,n);class o{constructor(){var e=this;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"qxs_";t(this,"prefix"),t(this,"local",{has:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t;return Object.prototype.hasOwnProperty.call(localStorage,o)},get:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t;return localStorage.getItem(o)},set:function(t,o){const n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?`${e.prefix}${t}`:t;localStorage.setItem(n,o)},remove:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t;localStorage.removeItem(o)},clear:()=>{localStorage.clear()}}),t(this,"session",{has:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t;return Object.prototype.hasOwnProperty.call(sessionStorage,o)},get:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t;return sessionStorage.getItem(o)},set:function(t,o){const n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?`${e.prefix}${t}`:t;sessionStorage.setItem(n,o)},remove:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t;sessionStorage.removeItem(o)},clear:()=>{sessionStorage.clear()}}),t(this,"cookie",{has:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t;return new RegExp(`(^|;)\\s*${o}=`).test(document.cookie)},get:function(t){const o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`${e.prefix}${t}`:t,n=document.cookie.match(new RegExp(`(^|;)\\s*${o}=([^;]*)`));return n?decodeURIComponent(n[2]):null},set:function(t,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window.location.hostname;const c=!(arguments.length>5&&void 0!==arguments[5])||arguments[5]?`${e.prefix}${t}`:t,s=new Date;s.setTime(s.getTime()+24*n*60*60*1e3);const l=`;expires=${s.toUTCString()}`,a=`;path=${i}`,$=r?`;domain=${r}`:"";document.cookie=`${c}=${encodeURIComponent(o)}${l}${a}${$}`},remove:function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.hostname;const i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?`${e.prefix}${t}`:t,r=`;expires=${new Date(0).toUTCString()}`,c=`;path=${o}`,s=n?`;domain=${n}`:"";document.cookie=`${i}=;${r}${c}${s}`},clear:()=>{const e=document.cookie.match(/[^ =;]+(?==)/g);e&&e.forEach(e=>{document.cookie=`${e}=;expires=${new Date(0).toUTCString()};path=/`})}}),this.prefix=o}}export{o as Storage};
|
|
2
|
-
//# sourceMappingURL=storage.mjs.map
|
package/es/src/storage.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.mjs","sources":["../../../../packages/utils/src/storage.ts"],"sourcesContent":["// 使用单例模式\nclass Storage {\n private readonly prefix: string\n\n constructor(prefix = 'qxs_') {\n this.prefix = prefix\n }\n\n local = {\n has: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n return Object.prototype.hasOwnProperty.call(localStorage, prefixedKey)\n },\n get: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n return localStorage.getItem(prefixedKey)\n },\n set: (key: string, value: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n localStorage.setItem(prefixedKey, value)\n },\n remove: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n localStorage.removeItem(prefixedKey)\n },\n clear: () => {\n localStorage.clear()\n },\n }\n\n session = {\n has: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n return Object.prototype.hasOwnProperty.call(sessionStorage, prefixedKey)\n },\n get: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n return sessionStorage.getItem(prefixedKey)\n },\n set: (key: string, value: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n sessionStorage.setItem(prefixedKey, value)\n },\n remove: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n sessionStorage.removeItem(prefixedKey)\n },\n clear: () => {\n sessionStorage.clear()\n },\n }\n\n cookie = {\n has: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n return new RegExp(`(^|;)\\\\s*${prefixedKey}=`).test(document.cookie)\n },\n get: (key: string, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n const match = document.cookie.match(new RegExp(`(^|;)\\\\s*${prefixedKey}=([^;]*)`))\n return match ? decodeURIComponent(match[2]) : null\n },\n set: (key: string, value: string, expires = 1, path = '/', domain = window.location.hostname, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n const expiresDate = new Date()\n expiresDate.setTime(expiresDate.getTime() + expires * 24 * 60 * 60 * 1000)\n const expiresStr = `;expires=${expiresDate.toUTCString()}`\n const pathStr = `;path=${path}`\n const domainStr = domain ? `;domain=${domain}` : ''\n\n document.cookie = `${prefixedKey}=${encodeURIComponent(value)}${expiresStr}${pathStr}${domainStr}`\n },\n remove: (key: string, path = '/', domain = window.location.hostname, usePrefix: boolean = true) => {\n const prefixedKey = usePrefix ? `${this.prefix}${key}` : key\n const expiresStr = `;expires=${new Date(0).toUTCString()}`\n const pathStr = `;path=${path}`\n const domainStr = domain ? `;domain=${domain}` : ''\n\n document.cookie = `${prefixedKey}=;${expiresStr}${pathStr}${domainStr}`\n },\n clear: () => {\n const keys = document.cookie.match(/[^ =;]+(?==)/g)\n if (keys) {\n keys.forEach((key) => {\n document.cookie = `${key}=;expires=${new Date(0).toUTCString()};path=/`\n })\n }\n },\n }\n}\n\n// 直接导出 Storage 类\nexport { Storage }\n"],"names":["Storage","constructor","_this","this","prefix","__publicField","has","key","prefixedKey","arguments","length","undefined","Object","prototype","hasOwnProperty","call","localStorage","get","getItem","set","value","setItem","remove","removeItem","clear","sessionStorage","RegExp","test","document","cookie","match","decodeURIComponent","expires","path","domain","window","location","hostname","expiresDate","Date","setTime","getTime","expiresStr","toUTCString","pathStr","domainStr","encodeURIComponent","keys","forEach"],"mappings":"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"}
|
package/es/src/types.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const t=t=>void 0===t,e=t=>"boolean"==typeof t,n=t=>"number"==typeof t;function r(t){return"undefined"!=typeof Element&&t instanceof Element}function o(t){return t===window}function u(t){return/^[\],:{}\s]*$/.test(t.replace(/\\["\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))&&function(t){try{return JSON.parse(t),!0}catch(t){return!1}}(t)}function c(t){return t.type.startsWith("image/")}function f(t){if(null===t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}export{e as isBoolean,r as isElement,c as isImageByMimeType,u as isJSONString,n as isNumber,f as isPlainObject,t as isUndefined,o as isWindow};
|
|
2
|
-
//# sourceMappingURL=types.mjs.map
|
package/es/src/types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../packages/utils/src/types.ts"],"sourcesContent":["export const isUndefined = (val: any): val is undefined => val === undefined\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: any): val is number => typeof val === 'number'\n\nexport function isElement(e: unknown): e is Element {\n if (typeof Element === 'undefined') {\n return false\n }\n return e instanceof Element\n}\n\nexport function isWindow(val: unknown): val is Window {\n return val === window\n}\n\n/**\n * 判断字符串是否为JSON字符串\n * @param str - 要判断的字符串\n * @returns 如果字符串是JSON字符串,则返回true,否则返回false\n */\nexport function isJSONString(str: string) {\n const jsonStringRegex = /^[\\],:{}\\s]*$/\n .test(str.replace(/\\\\[\"\\\\/bfnrtu]/g, '@')\n .replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g, ']')\n .replace(/(?:^|:|,)(?:\\s*\\[)+/g, ''))\n\n return jsonStringRegex && isValidJSON(str)\n}\n\n/**\n * 判断字符串是否为有效的JSON字符串\n * @param str - 要判断的字符串\n * @returns 如果字符串是有效的JSON字符串,则返回true,否则返回false\n */\nfunction isValidJSON(str: string) {\n try {\n JSON.parse(str)\n return true\n }\n catch (e) {\n console.log('e: ', e)\n return false\n }\n}\n\n/**\n * 通过 MIME 类型判断文件是否为图片\n * @param file - 要检查的文件对象\n * @returns {boolean} 如果文件是图片类型返回 true,否则返回 false\n * @example\n * const file = new File([''], 'test.png', { type: 'image/png' });\n * isImageByMimeType(file); // true\n */\nexport function isImageByMimeType(file: File) {\n return file.type.startsWith('image/')\n}\n\n/**\n * 判断一个值是否为普通对象\n * @param value - 要判断的值\n * @returns 如果值是普通对象,则返回 true,否则返回 false\n */\nexport function isPlainObject(value: unknown): value is Record<string, any> {\n if (value === null || typeof value !== 'object') {\n return false\n }\n\n // 获取原型\n const proto = Object.getPrototypeOf(value)\n\n // 如果没有原型(proto === null),说明是通过 Object.create(null) 创建的\n // 或者原型就是 Object.prototype,说明是普通对象\n return proto === null || proto === Object.prototype\n}\n"],"names":["isUndefined","val","isBoolean","isNumber","isElement","e","Element","isWindow","window","isJSONString","str","test","replace","JSON","parse","isValidJSON","isImageByMimeType","file","type","startsWith","isPlainObject","value","proto","Object","getPrototypeOf","prototype"],"mappings":"AAAO,MAAMA,EAAeC,QAAuC,IAARA,EAC9CC,EAAaD,GAA4C,kBAARA,EACjDE,EAAYF,GAA2C,iBAARA,EAErD,SAASG,EAAUC,GACxB,MAAuB,oBAAZC,SAGJD,aAAaC,OACtB,CAEO,SAASC,EAASN,GACvB,OAAOA,IAAQO,MACjB,CAOO,SAASC,EAAaC,GAM3B,MALwB,gBACrBC,KAAKD,EAAIE,QAAQ,kBAAmB,KAClCA,QAAQ,mEAAoE,KAC5EA,QAAQ,uBAAwB,MAUvC,SAAqBF,GACnB,IAEE,OADAG,KAAKC,MAAMJ,IACJ,CACT,OACOL,GAEL,OAAO,CACT,CACF,CAjB4BU,CAAYL,EACxC,CA0BO,SAASM,EAAkBC,GAChC,OAAOA,EAAKC,KAAKC,WAAW,SAC9B,CAOO,SAASC,EAAcC,GAC5B,GAAc,OAAVA,GAAmC,iBAAVA,EAC3B,OAAO,EAIT,MAAMC,EAAQC,OAAOC,eAAeH,GAIpC,OAAiB,OAAVC,GAAkBA,IAAUC,OAAOE,SAC5C"}
|
package/es/src/watermark.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const t={id:"wm_div_id",prefix:"mask_div_id",text:"测试水印",x:0,y:0,rows:0,cols:0,width:0,height:0,x_space:100,y_space:40,font:"微软雅黑",color:"black",fontsize:"18px",alpha:.15,zIndex:9999999,angle:15,parent_width:0,parent_height:0,parent_node:null,monitor:!0};function e(){const e={...t};let n=!1;const i=new MutationObserver(function(t){if(n)return void(n=!1);if(!document.getElementById(e.id))return void s(e);t.some(t=>"childList"===t.type||("attributes"===t.type||"characterData"===t.type))&&s(e)}),o=new ResizeObserver(()=>{n||s(e)});function c(t,n,i){const o=document.createElement("div");return o.textContent=e.text,o.id=`${e.prefix}${i}`,o.style.cssText=`\n transform: rotate(-${e.angle}deg);\n position: absolute;\n left: ${t}px;\n top: ${n}px;\n overflow: hidden;\n z-index: 999999;\n opacity: ${e.alpha};\n font-size: ${e.fontsize};\n font-family: ${e.font};\n color: ${e.color};\n text-align: center;\n width: ${e.width}px;\n height: ${e.height}px;\n line-height: ${e.height}px;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n visibility: visible;\n `.replace(/\s+/g," ").trim(),o}function s(t){if(document.querySelectorAll(`#${e.id}`).forEach(t=>{t.parentNode?.removeChild(t)}),Object.assign(e,t),0===e.width&&0===e.height||0===e.width||0===e.height){const t=function(t,e,n){const i=document.createElement("canvas").getContext("2d");if(!i)return{width:100,height:100};i.font=`${n} ${e}`;const o=i.measureText(t.trim()),c=Number.parseFloat(n),s=void 0!==o.actualBoundingBoxAscent&&void 0!==o.actualBoundingBoxDescent?o.actualBoundingBoxAscent+o.actualBoundingBoxDescent:c;return{width:Math.ceil(o.width),height:Math.ceil(s)}}(e.text,e.font,e.fontsize),n=10;0===e.width&&(e.width=t.width+n),0===e.height&&(e.height=t.height+n)}const n=e.parent_node||document.body,s=Math.max(n.scrollWidth,n.clientWidth),a=Math.max(n.scrollHeight,n.clientHeight),d=document.createElement("div");d.id=e.id,n.closest("body")&&"static"===getComputedStyle(n).position&&(n.style.position="relative"),d.style.cssText=`\n pointer-events: none;\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: ${e.zIndex};\n overflow: hidden;\n `.replace(/\s+/g," ").trim();const r=d.attachShadow?d.attachShadow({mode:"open"}):d;n.appendChild(d);const{cols:h,rows:l,x_space:p,y_space:u}=function(t,n){const i=t-e.x,o=n-e.y,c=e.x_space||20,s=e.y_space||20;return{cols:Math.ceil(i/(e.width+c)),rows:Math.ceil(o/(e.height+s)),x_space:c,y_space:s}}(s,a);e.cols=h,e.rows=l,e.x_space=p,e.y_space=u;const x=document.createDocumentFragment();for(let t=0;t<l;t++){const n=e.y+(e.height+u)*t;for(let i=0;i<h;i++){const o=e.x+(e.width+p)*i;x.appendChild(c(o,n,t*h+i))}}if(r.appendChild(x),e.monitor){o.observe(n);const t={attributes:!0,childList:!0,subtree:!0,characterData:!0};i.observe(d,t),r!==d&&i.observe(r,t)}}return{addMark:s,removeMark:()=>{n=!0,function(){const t=document.getElementById(e.id);i.disconnect(),t&&t.parentNode?.removeChild(t)}()}}}export{e as watermark};
|
|
2
|
-
//# sourceMappingURL=watermark.mjs.map
|
package/es/src/watermark.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"watermark.mjs","sources":["../../../../packages/utils/src/watermark.ts"],"sourcesContent":["interface SettingsType {\n /** 水印总体的id */\n id?: string\n /** 小水印的id前缀 */\n prefix?: string\n /** 水印文案 */\n text?: string\n /** 水印起始位置x轴坐标 */\n x?: number\n /** 水印起始位置Y轴坐标 */\n y?: number\n /** 水印行数 */\n rows?: number\n /** 水印层级 */\n zIndex?: number\n /** 水印列数 */\n cols?: number\n /** 水印x轴间隔 */\n x_space?: number\n /** 水印y轴间隔 */\n y_space?: number\n /** 水印字体 */\n font?: string\n /** 水印字体颜色 */\n color?: string\n /** 水印字体大小 */\n fontsize?: string\n /** 水印透明度,要求设置在大于等于0.005 */\n alpha?: number\n /** 水印宽度 */\n width?: number\n /** 水印长度 */\n height?: number\n /** 水印倾斜度数 */\n angle?: number\n /** 水印的总体宽度(默认值:body的scrollWidth和clientWidth的较大值) */\n parent_width?: number\n /** 水印的总体高度(默认值:body的scrollHeight和clientHeight的较大值) */\n parent_height?: number\n /** 水印插件挂载的父元素element,不输入则默认挂在body */\n parent_node?: HTMLElement | null\n /** 是否监控,true: 不可删除水印; false: 可删水印 */\n monitor?: boolean\n}\n\n// 默认配置\nconst initialSettings: Required<SettingsType> = {\n id: 'wm_div_id',\n prefix: 'mask_div_id',\n text: '测试水印',\n x: 0,\n y: 0,\n rows: 0,\n cols: 0,\n width: 0,\n height: 0,\n x_space: 100,\n y_space: 40,\n font: '微软雅黑',\n color: 'black',\n fontsize: '18px',\n alpha: 0.15,\n zIndex: 9999999,\n angle: 15,\n parent_width: 0,\n parent_height: 0,\n parent_node: null,\n monitor: true,\n}\n\nfunction calculateTextDimensions(text: string, font: string, fontSize: string): { width: number, height: number } {\n const canvas = document.createElement('canvas')\n const context = canvas.getContext('2d')\n if (!context) {\n return { width: 100, height: 100 }\n }\n\n context.font = `${fontSize} ${font}`\n const metrics = context.measureText(text.trim())\n const fontSizeNum = Number.parseFloat(fontSize)\n\n // 移除 DPI 缩放,直接使用原始值\n const height = (metrics.actualBoundingBoxAscent !== undefined && metrics.actualBoundingBoxDescent !== undefined)\n ? (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent)\n : fontSizeNum\n\n return {\n width: Math.ceil(metrics.width),\n height: Math.ceil(height),\n }\n}\n\nexport function watermark() {\n const globalSetting: Required<SettingsType> = { ...initialSettings }\n let forceRemove = false\n const watermarkDom = new MutationObserver(domChangeCallback)\n const resizeObserver = new ResizeObserver(() => {\n if (!forceRemove) {\n loadMark(globalSetting)\n }\n })\n\n // 计算水印布局\n function calculateWatermarkLayout(pageWidth: number, pageHeight: number) {\n const availableWidth = pageWidth - globalSetting.x\n const availableHeight = pageHeight - globalSetting.y\n\n // 使用固定间距\n const x_space = globalSetting.x_space || 20 // 如果未设置则使用默认值\n const y_space = globalSetting.y_space || 20 // 如果未设置则使用默认值\n\n // 计算能容纳的行数和列数\n const cols = Math.ceil(availableWidth / (globalSetting.width + x_space))\n const rows = Math.ceil(availableHeight / (globalSetting.height + y_space))\n\n return {\n cols,\n rows,\n x_space,\n y_space,\n }\n }\n\n // 创建水印元素\n function createWatermarkElement(x: number, y: number, index: number): HTMLElement {\n const maskDiv = document.createElement('div')\n maskDiv.textContent = globalSetting.text\n maskDiv.id = `${globalSetting.prefix}${index}`\n\n maskDiv.style.cssText = `\n transform: rotate(-${globalSetting.angle}deg);\n position: absolute;\n left: ${x}px;\n top: ${y}px;\n overflow: hidden;\n z-index: 999999;\n opacity: ${globalSetting.alpha};\n font-size: ${globalSetting.fontsize};\n font-family: ${globalSetting.font};\n color: ${globalSetting.color};\n text-align: center;\n width: ${globalSetting.width}px;\n height: ${globalSetting.height}px;\n line-height: ${globalSetting.height}px;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n visibility: visible;\n `.replace(/\\s+/g, ' ').trim()\n\n return maskDiv\n }\n\n // 加载水印\n function loadMark(settings: Partial<SettingsType>) {\n // 先移除所有已存在的水印\n const existingWatermarks = document.querySelectorAll(`#${globalSetting.id}`)\n existingWatermarks.forEach((watermark) => {\n watermark.parentNode?.removeChild(watermark)\n })\n\n Object.assign(globalSetting, settings)\n\n if ((globalSetting.width === 0 && globalSetting.height === 0) || globalSetting.width === 0 || globalSetting.height === 0) {\n // 计算文本尺寸\n const textDimensions = calculateTextDimensions(\n globalSetting.text,\n globalSetting.font,\n globalSetting.fontsize,\n )\n const padding = 10\n if (globalSetting.width === 0) {\n globalSetting.width = textDimensions.width + padding\n }\n if (globalSetting.height === 0) {\n globalSetting.height = textDimensions.height + padding\n }\n }\n\n const parentElement = globalSetting.parent_node || document.body\n const pageWidth = Math.max(parentElement.scrollWidth, parentElement.clientWidth)\n const pageHeight = Math.max(parentElement.scrollHeight, parentElement.clientHeight)\n\n const watermarkContainer = document.createElement('div')\n watermarkContainer.id = globalSetting.id\n\n // 处理父元素定位\n if (parentElement.closest('body') && getComputedStyle(parentElement).position === 'static') {\n parentElement.style.position = 'relative'\n }\n\n watermarkContainer.style.cssText = `\n pointer-events: none;\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: ${globalSetting.zIndex};\n overflow: hidden;\n `.replace(/\\s+/g, ' ').trim()\n\n const shadowRoot = watermarkContainer.attachShadow ? watermarkContainer.attachShadow({ mode: 'open' }) : watermarkContainer\n\n parentElement.appendChild(watermarkContainer)\n\n const { cols, rows, x_space, y_space } = calculateWatermarkLayout(pageWidth, pageHeight)\n globalSetting.cols = cols\n globalSetting.rows = rows\n globalSetting.x_space = x_space\n globalSetting.y_space = y_space\n\n const fragment = document.createDocumentFragment()\n for (let i = 0; i < rows; i++) {\n const y = globalSetting.y + (globalSetting.height + y_space) * i\n for (let j = 0; j < cols; j++) {\n const x = globalSetting.x + (globalSetting.width + x_space) * j\n fragment.appendChild(createWatermarkElement(x, y, i * cols + j))\n }\n }\n shadowRoot.appendChild(fragment)\n\n if (globalSetting.monitor) {\n // 监听父元素大小变化\n resizeObserver.observe(parentElement)\n\n // 监听水印容器及其子元素\n const config: MutationObserverInit = {\n attributes: true, // 监听属性变化\n childList: true, // 监听子元素变化\n subtree: true, // 监听子树变化\n characterData: true, // 监听文本内容变化\n }\n\n // 监听水印容器\n watermarkDom.observe(watermarkContainer, config)\n\n // 如果使用了 Shadow DOM,还需要监听 shadowRoot 内的元素\n if (shadowRoot !== watermarkContainer) {\n watermarkDom.observe(shadowRoot, config)\n }\n }\n }\n\n // 移除水印\n function removeMark() {\n const watermarkElement = document.getElementById(globalSetting.id)\n watermarkDom.disconnect()\n if (watermarkElement) {\n watermarkElement.parentNode?.removeChild(watermarkElement)\n }\n }\n\n // 监听DOM变化\n function domChangeCallback(records: MutationRecord[]) {\n if (forceRemove) {\n forceRemove = false\n return\n }\n\n const watermarkElement = document.getElementById(globalSetting.id)\n if (!watermarkElement) {\n // 如果水印容器被删除,重新创建\n loadMark(globalSetting)\n return\n }\n\n // 检查是否有任何修改\n const hasChanges = records.some((record) => {\n // 检查元素是否被删除或添加\n if (record.type === 'childList') {\n return true\n }\n\n // 检查属性是否被修改\n if (record.type === 'attributes') {\n return true\n }\n\n // 检查文本内容是否被修改\n if (record.type === 'characterData') {\n return true\n }\n\n return false\n })\n\n if (hasChanges) {\n loadMark(globalSetting)\n }\n }\n\n return {\n addMark: loadMark,\n removeMark: () => {\n forceRemove = true\n // 删除这行,不重置全局配置\n // Object.assign(globalSetting, initialSettings)\n removeMark()\n },\n }\n}\n"],"names":["initialSettings","id","prefix","text","x","y","rows","cols","width","height","x_space","y_space","font","color","fontsize","alpha","zIndex","angle","parent_width","parent_height","parent_node","monitor","watermark","globalSetting","forceRemove","watermarkDom","MutationObserver","records","document","getElementById","loadMark","some","record","type","resizeObserver","ResizeObserver","createWatermarkElement","index","maskDiv","createElement","textContent","style","cssText","replace","trim","settings","querySelectorAll","forEach","parentNode","removeChild","Object","assign","textDimensions","fontSize","context","getContext","metrics","measureText","fontSizeNum","Number","parseFloat","actualBoundingBoxAscent","actualBoundingBoxDescent","Math","ceil","calculateTextDimensions","padding","parentElement","body","pageWidth","max","scrollWidth","clientWidth","pageHeight","scrollHeight","clientHeight","watermarkContainer","closest","getComputedStyle","position","shadowRoot","attachShadow","mode","appendChild","availableWidth","availableHeight","calculateWatermarkLayout","fragment","createDocumentFragment","i","j","observe","config","attributes","childList","subtree","characterData","addMark","removeMark","watermarkElement","disconnect"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("../types.cjs"),s=Object.defineProperty,t=(e,t,i)=>((e,t,i)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i);const i=class s{constructor(e,i){var r=this;if(this.apiInstance=e,this.isWholeResponse=i,t(this,"useApi",async function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.isWholeResponse,i=null,n=null;try{const n={...e,...s?e.method&&["GET"].includes(e.method.toUpperCase())?{params:s}:{data:s}:{}};n.url=(n.proxyPrefix||"")+e.url,delete n.proxyPrefix;const o=await r.apiInstance(n);i=t?o.data:o.data.data}catch(e){"AxiosError"!==e.name&&(r.isAxiosResponse(e)?n=e.data:r.isErrorResponse(e)&&(n=e))}return{res:i,error:n}}),t(this,"apiClient",async(e,s,t)=>{t??this.isWholeResponse;const i={...e,...s?e.method&&["GET"].includes(e.method.toUpperCase())?{params:s}:{data:s}:{}};return i.proxyPrefix&&(i.url=(i.proxyPrefix||"")+e.url,delete i.proxyPrefix),await this.apiInstance(i)}),s.instance)return s.instance;s.instance=this,this.isWholeResponse=i}isBusinessError(s){return e.isPlainObject(s)&&"string"==typeof s.message&&"number"==typeof s.code&&0!==s.code}isAxiosResponse(s){return e.isPlainObject(s)&&void 0!==s.data&&this.isBusinessError(s.data)&&void 0!==s.status&&void 0!==s.statusText&&void 0!==s.headers&&void 0!==s.config&&void 0!==s.request}isErrorResponse(e){return"code"in e&&"data"in e&&"message"in e&&0!==e.code}};t(i,"instance");let r=i;exports.ApiService=r;
|
|
2
|
-
//# sourceMappingURL=axios-client.cjs.map
|