appos 0.3.5-0 → 0.3.6-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/main.mjs +2 -2
- package/dist/exports/api/adapter-C2mMJKvG.mjs +1504 -0
- package/dist/exports/api/{auth-schema.mjs → auth-schema-CON4yFFY.mjs} +2 -3
- package/dist/exports/api/bun-sqlite-dialect-CPpPZa23.mjs +155 -0
- package/dist/exports/{cli/_virtual/rolldown_runtime.mjs → api/chunk-CyXqrcp_.mjs} +14 -1
- package/dist/exports/api/conditions-DjBAWfiK.mjs +116 -0
- package/dist/exports/api/dialect-CUUD24Ge.mjs +72 -0
- package/dist/exports/api/env-CwT3zhez.mjs +1 -0
- package/dist/exports/api/esm-_hkVMulx.mjs +15816 -0
- package/dist/exports/api/event-BHFSE6hY.mjs +20983 -0
- package/dist/exports/api/extract-blob-metadata-BMgUEPcW.mjs +4 -0
- package/dist/exports/api/extract-blob-metadata-_9RUEwoU.mjs +9818 -0
- package/dist/exports/api/generate-image-variant-DOIzj1wJ.mjs +4 -0
- package/dist/exports/api/generate-image-variant-DxOPoGAk.mjs +118 -0
- package/dist/exports/api/generate-preview-CvTFuq58.mjs +160 -0
- package/dist/exports/api/generate-preview-Dk3coswZ.mjs +4 -0
- package/dist/exports/api/index.d.mts +7347 -20
- package/dist/exports/api/index.mjs +146856 -18
- package/dist/exports/api/kysely-adapter-CmP2TbkS.mjs +296 -0
- package/dist/exports/api/memory-adapter-BzhRhLFK.mjs +212 -0
- package/dist/exports/api/node-sqlite-dialect-Bl5suBxl.mjs +155 -0
- package/dist/exports/api/orm-CMqufD21.mjs +153690 -0
- package/dist/exports/api/orm-DXqYuKvB.d.mts +11 -0
- package/dist/exports/api/orm.d.mts +2 -11
- package/dist/exports/api/orm.mjs +4 -42
- package/dist/exports/api/pdf-YxB2Hm1p.mjs +25822 -0
- package/dist/exports/api/purge-attachment-Cf6KH2Jv.mjs +34 -0
- package/dist/exports/api/purge-attachment-DIuil7ps.mjs +4 -0
- package/dist/exports/{cli/api/workflows/purge-audit-logs.mjs → api/purge-audit-logs-z6j_Pu47.mjs} +3 -3
- package/dist/exports/{cli/api/workflows/purge-unattached-blobs.mjs → api/purge-unattached-blobs-B0TfY5Hk.mjs} +1 -1
- package/dist/exports/api/react-BYhV5bYt.mjs +1131 -0
- package/dist/exports/api/server.node-DyVrQ6cz.mjs +19298 -0
- package/dist/exports/api/table-6bTIEqON.mjs +2636 -0
- package/dist/exports/api/{workflows/track-db-changes.mjs → track-db-changes-BysaV6nN.mjs} +14 -14
- package/dist/exports/api/{workflow.mjs → workflow-BuSWHcX-.mjs} +121 -10
- package/dist/exports/api/workflows/auth-schema-BFve3hgZ.mjs +2813 -0
- package/dist/exports/api/{_virtual/rolldown_runtime.mjs → workflows/chunk-B36mNPO4.mjs} +5 -1
- package/dist/exports/api/workflows/extract-blob-metadata-BcWKvY2K.mjs +9818 -0
- package/dist/exports/api/workflows/{generate-image-variant.mjs → generate-image-variant-BAFvL_zV.mjs} +20 -20
- package/dist/exports/{cli/api/workflows/generate-preview.mjs → api/workflows/generate-preview-BjlIVYYp.mjs} +6 -6
- package/dist/exports/api/workflows/index.d.mts +2011 -1
- package/dist/exports/api/workflows/index.mjs +2 -1
- package/dist/exports/api/workflows/pdf-DUB8zyIc.mjs +25822 -0
- package/dist/exports/{cli/api/workflows/purge-attachment.mjs → api/workflows/purge-attachment-k_sdxTPY.mjs} +3 -3
- package/dist/exports/api/workflows/{purge-audit-logs.mjs → purge-audit-logs-zCyWj4Mw.mjs} +12 -3
- package/dist/exports/api/workflows/{purge-unattached-blobs.mjs → purge-unattached-blobs-CdsuFAeW.mjs} +1 -1
- package/dist/exports/api/workflows/track-db-changes-CiKaI9gT.mjs +20943 -0
- package/dist/exports/api/workflows/track-db-changes-DEWQYryO.mjs +4 -0
- package/dist/exports/{cli/api/workflow.mjs → api/workflows/workflow-BjM2xCa6.mjs} +23 -3
- package/dist/exports/api/workflows/zod-Br0enFWK.mjs +12333 -0
- package/dist/exports/api/zod-CdrJdBtV.mjs +12571 -0
- package/dist/exports/cli/auth-schema-CNuOqPi-.mjs +2813 -0
- package/dist/exports/{api/workflows/_virtual/rolldown_runtime.mjs → cli/chunk-B36mNPO4.mjs} +5 -1
- package/dist/exports/cli/extract-blob-metadata-CV1Ke90d.mjs +9818 -0
- package/dist/exports/cli/{api/workflows/generate-image-variant.mjs → generate-image-variant-CM1BrVvZ.mjs} +20 -20
- package/dist/exports/{api/workflows/generate-preview.mjs → cli/generate-preview-DdHQ3ukz.mjs} +6 -6
- package/dist/exports/cli/index.d.mts +2142 -2
- package/dist/exports/cli/index.mjs +41 -1
- package/dist/exports/cli/pdf-CLUPEIdT.mjs +25822 -0
- package/dist/exports/{api/workflows/purge-attachment.mjs → cli/purge-attachment-Dc_J74dG.mjs} +3 -3
- package/dist/exports/cli/purge-audit-logs-DFhWh-Bx.mjs +56 -0
- package/dist/exports/cli/purge-unattached-blobs-C1MRlM_2.mjs +46 -0
- package/dist/exports/cli/track-db-changes-CfneOF2_.mjs +20943 -0
- package/dist/exports/{api/workflows/api/workflow.mjs → cli/workflow-DSbbXBMt.mjs} +23 -3
- package/dist/exports/cli/zod-7q0_Mtnn.mjs +12333 -0
- package/dist/exports/devtools/BaseTanStackRouterDevtoolsPanel-BBz1qLry-DUwdvyLv.js +2090 -0
- package/dist/exports/devtools/EIDV623S-B7f6114d.js +2497 -0
- package/dist/exports/devtools/FloatingTanStackRouterDevtools-DymJEvfG-BHuQHiRR.js +237 -0
- package/dist/exports/devtools/MIMHJGAX-Cb3wf11F.js +10903 -0
- package/dist/exports/devtools/Q7LWSL4U-BoEO3rNq.js +37 -0
- package/dist/exports/devtools/VLTTJS3N-CIyRc84e.js +44 -0
- package/dist/exports/devtools/index.js +1724 -3
- package/dist/exports/devtools/utils-YRTCpRgb.js +1670 -0
- package/dist/exports/tests/api.d.mts +7354 -5
- package/dist/exports/tests/api.mjs +79 -1
- package/dist/exports/tests/auth-schema-DUCJw-_2.mjs +1 -0
- package/dist/exports/tests/chunk-Cii4FAhs.mjs +1 -0
- package/dist/exports/tests/conditions-B0ffVJ5E.mjs +1 -0
- package/dist/exports/tests/constants-DHjjg05J.mjs +1 -0
- package/dist/exports/tests/dist-D6vgKv3t.mjs +7 -0
- package/dist/exports/tests/dist-EfrRkq5c.mjs +296 -0
- package/dist/exports/tests/extract-blob-metadata-Dv343Vcn.mjs +169 -0
- package/dist/exports/tests/generate-image-variant-cQc8q0kh.mjs +1 -0
- package/dist/exports/tests/generate-preview-HaTMd2hS.mjs +1 -0
- package/dist/exports/tests/magic-string.es-D6VRmdiF.mjs +14 -0
- package/dist/exports/tests/mock-BvkO5nlm.mjs +1 -0
- package/dist/exports/tests/mock.mjs +1 -1
- package/dist/exports/tests/pdf-BDsS3vjF.mjs +13 -0
- package/dist/exports/tests/purge-attachment-D4uOzHRi.mjs +1 -0
- package/dist/exports/tests/purge-audit-logs-DiPcc09d.mjs +1 -0
- package/dist/exports/tests/purge-unattached-blobs-CqW6tlIC.mjs +1 -0
- package/dist/exports/tests/react.mjs +6 -1
- package/dist/exports/tests/setup.d.mts +1 -1
- package/dist/exports/tests/setup.mjs +34 -1
- package/dist/exports/tests/table-CbU04119.mjs +1 -0
- package/dist/exports/tests/track-db-changes-Bd4W-P1q.mjs +1 -0
- package/dist/exports/tests/vi.2VT5v0um-Cme1b0Dl.mjs +348 -0
- package/dist/exports/tests/{api/workflow.mjs → workflow-DwZxTqdH.mjs} +1 -1
- package/dist/exports/tests/zod-DcpxsMPz.mjs +23 -0
- package/dist/exports/vendors/date.js +13236 -1
- package/dist/exports/vendors/toolkit.js +2206 -1
- package/dist/exports/vendors/zod.js +12344 -1
- package/dist/exports/vite/api-DGRU_RdM.mjs +27 -0
- package/dist/exports/vite/build-CxJAu2Bn.mjs +1 -0
- package/dist/exports/vite/build2-BMK0OFVt.mjs +16 -0
- package/dist/exports/vite/chunk-CxnlK1Zi.mjs +1 -0
- package/dist/exports/vite/chunk-PtveFMYu.mjs +1 -0
- package/dist/exports/vite/dist-Bxp8DqWh.mjs +114 -0
- package/dist/exports/vite/dist-CX51FKbX.mjs +1 -0
- package/dist/exports/vite/dist-DcyNr-KR.mjs +1 -0
- package/dist/exports/vite/dist-j3-Khlzt.mjs +1 -0
- package/dist/exports/vite/experimental-index-3KsfmUbz.mjs +1 -0
- package/dist/exports/vite/false-BNJbUKYT.mjs +1 -0
- package/dist/exports/vite/false-BvrPEDU6.mjs +1 -0
- package/dist/exports/vite/index.d.mts +1 -1
- package/dist/exports/vite/index.mjs +26 -1
- package/dist/exports/vite/internal-C5cVwRiK.mjs +1 -0
- package/dist/exports/vite/jiti-BjSPrFvg.mjs +9 -0
- package/dist/exports/vite/lexer-DQCqS3nf-C6xCDOEQ.mjs +3 -0
- package/dist/exports/vite/lib-CMv7Sfwa.mjs +1 -0
- package/dist/exports/vite/lib-D9TnS-7w.mjs +1 -0
- package/dist/exports/vite/lib-DuBRr9dH.mjs +382 -0
- package/dist/exports/vite/node-DI8AnY_i.mjs +437 -0
- package/dist/exports/vite/postcss-BtmDpj-c.mjs +32 -0
- package/dist/exports/vite/postcss-import-Bk_ZCd6c.mjs +5 -0
- package/dist/exports/vite/rolldown-build-CNW2eye_-CJNfyXdF.mjs +13 -0
- package/dist/exports/vitest/api-CPv6lnxG.mjs +27 -0
- package/dist/exports/vitest/build2-28i3OiJ3.mjs +16 -0
- package/dist/exports/vitest/chunk-_e2jlDPK.mjs +1 -0
- package/dist/exports/vitest/chunk-jwDkFoXW.mjs +1 -0
- package/dist/exports/vitest/config.mjs +77 -1
- package/dist/exports/vitest/dist-L-OpshPJ.mjs +114 -0
- package/dist/exports/vitest/index.mjs +348 -1
- package/dist/exports/vitest/jiti-eNGOyHIo.mjs +9 -0
- package/dist/exports/vitest/lexer-DQCqS3nf-TWLyIqlY.mjs +3 -0
- package/dist/exports/vitest/lib-C3G64csm.mjs +1 -0
- package/dist/exports/vitest/magic-string.es-CxM5Ubyl.mjs +14 -0
- package/dist/exports/vitest/module-runner-DsF4L04D.mjs +1 -0
- package/dist/exports/vitest/postcss-BxLp_Too.mjs +32 -0
- package/dist/exports/vitest/postcss-import-5pKj3f5q.mjs +5 -0
- package/dist/exports/web/browser-ponyfill-DxTJMXNq.js +443 -0
- package/dist/exports/web/chunk-DksrlJLg.js +49 -0
- package/dist/exports/web/index.d.ts +2546 -2
- package/dist/exports/web/index.js +9295 -6
- package/dist/exports/web/plugin-DqTFWG7p.js +250 -0
- package/package.json +1 -1
- package/dist/exports/api/app-context.d.mts +0 -115
- package/dist/exports/api/app-context.mjs +0 -24
- package/dist/exports/api/auth-schema.d.mts +0 -4248
- package/dist/exports/api/auth.d.mts +0 -402
- package/dist/exports/api/auth.mjs +0 -188
- package/dist/exports/api/cache.d.mts +0 -44
- package/dist/exports/api/cache.mjs +0 -28
- package/dist/exports/api/config.d.mts +0 -28
- package/dist/exports/api/config.mjs +0 -72
- package/dist/exports/api/constants.mjs +0 -92
- package/dist/exports/api/container.d.mts +0 -210
- package/dist/exports/api/container.mjs +0 -49
- package/dist/exports/api/database.d.mts +0 -101
- package/dist/exports/api/database.mjs +0 -219
- package/dist/exports/api/event.d.mts +0 -235
- package/dist/exports/api/event.mjs +0 -236
- package/dist/exports/api/i18n.d.mts +0 -34
- package/dist/exports/api/i18n.mjs +0 -45
- package/dist/exports/api/instrumentation.d.mts +0 -7
- package/dist/exports/api/instrumentation.mjs +0 -40
- package/dist/exports/api/logger.d.mts +0 -21
- package/dist/exports/api/logger.mjs +0 -26
- package/dist/exports/api/mailer.d.mts +0 -70
- package/dist/exports/api/mailer.mjs +0 -37
- package/dist/exports/api/middleware/request-logger.d.mts +0 -24
- package/dist/exports/api/middleware.d.mts +0 -39
- package/dist/exports/api/middleware.mjs +0 -73
- package/dist/exports/api/openapi.d.mts +0 -271
- package/dist/exports/api/openapi.mjs +0 -507
- package/dist/exports/api/otel.d.mts +0 -40
- package/dist/exports/api/otel.mjs +0 -56
- package/dist/exports/api/redis.d.mts +0 -34
- package/dist/exports/api/redis.mjs +0 -41
- package/dist/exports/api/storage-schema.d.mts +0 -707
- package/dist/exports/api/storage-schema.mjs +0 -72
- package/dist/exports/api/storage.d.mts +0 -506
- package/dist/exports/api/storage.mjs +0 -833
- package/dist/exports/api/web/auth.mjs +0 -17
- package/dist/exports/api/workflow.d.mts +0 -250
- package/dist/exports/api/workflows/api/auth-schema.mjs +0 -373
- package/dist/exports/api/workflows/api/auth.d.mts +0 -379
- package/dist/exports/api/workflows/api/cache.d.mts +0 -44
- package/dist/exports/api/workflows/api/config.d.mts +0 -18
- package/dist/exports/api/workflows/api/container.d.mts +0 -167
- package/dist/exports/api/workflows/api/database.d.mts +0 -47
- package/dist/exports/api/workflows/api/event.d.mts +0 -68
- package/dist/exports/api/workflows/api/event.mjs +0 -126
- package/dist/exports/api/workflows/api/logger.d.mts +0 -21
- package/dist/exports/api/workflows/api/mailer.d.mts +0 -70
- package/dist/exports/api/workflows/api/orm.d.mts +0 -13
- package/dist/exports/api/workflows/api/redis.mjs +0 -3
- package/dist/exports/api/workflows/api/storage-schema.d.mts +0 -699
- package/dist/exports/api/workflows/api/storage.d.mts +0 -396
- package/dist/exports/api/workflows/api/workflow.d.mts +0 -24
- package/dist/exports/api/workflows/constants.mjs +0 -23
- package/dist/exports/api/workflows/extract-blob-metadata.mjs +0 -132
- package/dist/exports/api/workflows/generate-image-variant.d.mts +0 -63
- package/dist/exports/api/workflows/track-db-changes.d.mts +0 -72
- package/dist/exports/cli/api/auth-schema.mjs +0 -373
- package/dist/exports/cli/api/auth.d.mts +0 -379
- package/dist/exports/cli/api/cache.d.mts +0 -44
- package/dist/exports/cli/api/config.d.mts +0 -18
- package/dist/exports/cli/api/container.d.mts +0 -167
- package/dist/exports/cli/api/database.d.mts +0 -47
- package/dist/exports/cli/api/event.d.mts +0 -68
- package/dist/exports/cli/api/event.mjs +0 -126
- package/dist/exports/cli/api/logger.d.mts +0 -21
- package/dist/exports/cli/api/mailer.d.mts +0 -70
- package/dist/exports/cli/api/orm.d.mts +0 -13
- package/dist/exports/cli/api/redis.mjs +0 -3
- package/dist/exports/cli/api/storage-schema.d.mts +0 -699
- package/dist/exports/cli/api/storage.d.mts +0 -396
- package/dist/exports/cli/api/workflow.d.mts +0 -2
- package/dist/exports/cli/api/workflows/extract-blob-metadata.mjs +0 -132
- package/dist/exports/cli/api/workflows/generate-image-variant.d.mts +0 -63
- package/dist/exports/cli/api/workflows/track-db-changes.mjs +0 -110
- package/dist/exports/cli/command.d.mts +0 -56
- package/dist/exports/cli/command.mjs +0 -43
- package/dist/exports/cli/constants.mjs +0 -23
- package/dist/exports/cli/context.d.mts +0 -170
- package/dist/exports/tests/_virtual/rolldown_runtime.mjs +0 -1
- package/dist/exports/tests/api/app-context.d.mts +0 -115
- package/dist/exports/tests/api/app-context.mjs +0 -1
- package/dist/exports/tests/api/auth-schema.d.mts +0 -4248
- package/dist/exports/tests/api/auth-schema.mjs +0 -1
- package/dist/exports/tests/api/auth.d.mts +0 -402
- package/dist/exports/tests/api/cache.d.mts +0 -44
- package/dist/exports/tests/api/config.d.mts +0 -28
- package/dist/exports/tests/api/container.d.mts +0 -210
- package/dist/exports/tests/api/database.d.mts +0 -101
- package/dist/exports/tests/api/database.mjs +0 -1
- package/dist/exports/tests/api/event.d.mts +0 -235
- package/dist/exports/tests/api/event.mjs +0 -1
- package/dist/exports/tests/api/i18n.d.mts +0 -34
- package/dist/exports/tests/api/index.d.mts +0 -26
- package/dist/exports/tests/api/logger.d.mts +0 -21
- package/dist/exports/tests/api/mailer.d.mts +0 -70
- package/dist/exports/tests/api/middleware/error-handler.mjs +0 -1
- package/dist/exports/tests/api/middleware/health.mjs +0 -1
- package/dist/exports/tests/api/middleware/i18n.mjs +0 -1
- package/dist/exports/tests/api/middleware/request-logger.d.mts +0 -24
- package/dist/exports/tests/api/middleware/request-logger.mjs +0 -1
- package/dist/exports/tests/api/middleware/shutdown.mjs +0 -1
- package/dist/exports/tests/api/middleware/timeout.mjs +0 -1
- package/dist/exports/tests/api/middleware.d.mts +0 -39
- package/dist/exports/tests/api/middleware.mjs +0 -1
- package/dist/exports/tests/api/openapi.d.mts +0 -271
- package/dist/exports/tests/api/openapi.mjs +0 -1
- package/dist/exports/tests/api/orm.d.mts +0 -13
- package/dist/exports/tests/api/otel.d.mts +0 -40
- package/dist/exports/tests/api/redis.d.mts +0 -34
- package/dist/exports/tests/api/redis.mjs +0 -1
- package/dist/exports/tests/api/server.mjs +0 -1
- package/dist/exports/tests/api/storage-schema.d.mts +0 -707
- package/dist/exports/tests/api/storage.d.mts +0 -506
- package/dist/exports/tests/api/workflow.d.mts +0 -250
- package/dist/exports/tests/api/workflows/extract-blob-metadata.mjs +0 -1
- package/dist/exports/tests/api/workflows/generate-image-variant.d.mts +0 -63
- package/dist/exports/tests/api/workflows/generate-image-variant.mjs +0 -1
- package/dist/exports/tests/api/workflows/generate-preview.mjs +0 -1
- package/dist/exports/tests/api/workflows/purge-attachment.mjs +0 -1
- package/dist/exports/tests/api/workflows/purge-audit-logs.mjs +0 -1
- package/dist/exports/tests/api/workflows/purge-unattached-blobs.mjs +0 -1
- package/dist/exports/tests/api/workflows/track-db-changes.mjs +0 -1
- package/dist/exports/tests/constants.mjs +0 -1
- package/dist/exports/tests/instrumentation.d.mts +0 -7
- package/dist/exports/tests/instrumentation.mjs +0 -1
- package/dist/exports/web/api/auth.d.ts +0 -125
- package/dist/exports/web/api/database.d.ts +0 -4
- package/dist/exports/web/api/logger.d.ts +0 -1
- package/dist/exports/web/auth.d.ts +0 -2388
- package/dist/exports/web/auth.js +0 -75
- package/dist/exports/web/i18n.d.ts +0 -42
- package/dist/exports/web/i18n.js +0 -45
- /package/dist/exports/tests/{api/middleware/youch-handler.mjs → youch-handler-Ch5yf6im.mjs} +0 -0
|
@@ -1 +1,2206 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/at.mjs
|
|
2
|
+
function at(arr, indices) {
|
|
3
|
+
const result = new Array(indices.length);
|
|
4
|
+
const length = arr.length;
|
|
5
|
+
for (let i = 0; i < indices.length; i++) {
|
|
6
|
+
let index = indices[i];
|
|
7
|
+
index = Number.isInteger(index) ? index : Math.trunc(index) || 0;
|
|
8
|
+
if (index < 0) index += length;
|
|
9
|
+
result[i] = arr[index];
|
|
10
|
+
}
|
|
11
|
+
return result;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/chunk.mjs
|
|
16
|
+
function chunk(arr, size) {
|
|
17
|
+
if (!Number.isInteger(size) || size <= 0) throw new Error("Size must be an integer greater than zero.");
|
|
18
|
+
const chunkLength = Math.ceil(arr.length / size);
|
|
19
|
+
const result = Array(chunkLength);
|
|
20
|
+
for (let index = 0; index < chunkLength; index++) {
|
|
21
|
+
const start = index * size;
|
|
22
|
+
const end = start + size;
|
|
23
|
+
result[index] = arr.slice(start, end);
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/compact.mjs
|
|
30
|
+
function compact(arr) {
|
|
31
|
+
const result = [];
|
|
32
|
+
for (let i = 0; i < arr.length; i++) {
|
|
33
|
+
const item = arr[i];
|
|
34
|
+
if (item) result.push(item);
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/countBy.mjs
|
|
41
|
+
function countBy(arr, mapper) {
|
|
42
|
+
const result = {};
|
|
43
|
+
for (let i = 0; i < arr.length; i++) {
|
|
44
|
+
const item = arr[i];
|
|
45
|
+
const key = mapper(item);
|
|
46
|
+
result[key] = (result[key] ?? 0) + 1;
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/difference.mjs
|
|
53
|
+
function difference(firstArr, secondArr) {
|
|
54
|
+
const secondSet = new Set(secondArr);
|
|
55
|
+
return firstArr.filter((item) => !secondSet.has(item));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/differenceBy.mjs
|
|
60
|
+
function differenceBy(firstArr, secondArr, mapper) {
|
|
61
|
+
const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
|
|
62
|
+
return firstArr.filter((item) => {
|
|
63
|
+
return !mappedSecondSet.has(mapper(item));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/differenceWith.mjs
|
|
69
|
+
function differenceWith(firstArr, secondArr, areItemsEqual) {
|
|
70
|
+
return firstArr.filter((firstItem) => {
|
|
71
|
+
return secondArr.every((secondItem) => {
|
|
72
|
+
return !areItemsEqual(firstItem, secondItem);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/drop.mjs
|
|
79
|
+
function drop(arr, itemsCount) {
|
|
80
|
+
itemsCount = Math.max(itemsCount, 0);
|
|
81
|
+
return arr.slice(itemsCount);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/dropRight.mjs
|
|
86
|
+
function dropRight(arr, itemsCount) {
|
|
87
|
+
itemsCount = Math.min(-itemsCount, 0);
|
|
88
|
+
if (itemsCount === 0) return arr.slice();
|
|
89
|
+
return arr.slice(0, itemsCount);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/dropRightWhile.mjs
|
|
94
|
+
function dropRightWhile(arr, canContinueDropping) {
|
|
95
|
+
for (let i = arr.length - 1; i >= 0; i--) if (!canContinueDropping(arr[i], i, arr)) return arr.slice(0, i + 1);
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/dropWhile.mjs
|
|
101
|
+
function dropWhile(arr, canContinueDropping) {
|
|
102
|
+
const dropEndIndex = arr.findIndex((item, index, arr$1) => !canContinueDropping(item, index, arr$1));
|
|
103
|
+
if (dropEndIndex === -1) return [];
|
|
104
|
+
return arr.slice(dropEndIndex);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/fill.mjs
|
|
109
|
+
function fill(array, value, start = 0, end = array.length) {
|
|
110
|
+
const length = array.length;
|
|
111
|
+
const finalStart = Math.max(start >= 0 ? start : length + start, 0);
|
|
112
|
+
const finalEnd = Math.min(end >= 0 ? end : length + end, length);
|
|
113
|
+
for (let i = finalStart; i < finalEnd; i++) array[i] = value;
|
|
114
|
+
return array;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/promise/semaphore.mjs
|
|
119
|
+
var Semaphore = class {
|
|
120
|
+
capacity;
|
|
121
|
+
available;
|
|
122
|
+
deferredTasks = [];
|
|
123
|
+
constructor(capacity) {
|
|
124
|
+
this.capacity = capacity;
|
|
125
|
+
this.available = capacity;
|
|
126
|
+
}
|
|
127
|
+
async acquire() {
|
|
128
|
+
if (this.available > 0) {
|
|
129
|
+
this.available--;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
return new Promise((resolve) => {
|
|
133
|
+
this.deferredTasks.push(resolve);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
release() {
|
|
137
|
+
const deferredTask = this.deferredTasks.shift();
|
|
138
|
+
if (deferredTask != null) {
|
|
139
|
+
deferredTask();
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (this.available < this.capacity) this.available++;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/limitAsync.mjs
|
|
148
|
+
function limitAsync(callback, concurrency) {
|
|
149
|
+
const semaphore = new Semaphore(concurrency);
|
|
150
|
+
return async function(...args) {
|
|
151
|
+
try {
|
|
152
|
+
await semaphore.acquire();
|
|
153
|
+
return await callback.apply(this, args);
|
|
154
|
+
} finally {
|
|
155
|
+
semaphore.release();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/filterAsync.mjs
|
|
162
|
+
async function filterAsync(array, predicate, options) {
|
|
163
|
+
if (options?.concurrency != null) predicate = limitAsync(predicate, options.concurrency);
|
|
164
|
+
const results = await Promise.all(array.map(predicate));
|
|
165
|
+
return array.filter((_, index) => results[index]);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/flatten.mjs
|
|
170
|
+
function flatten(arr, depth = 1) {
|
|
171
|
+
const result = [];
|
|
172
|
+
const flooredDepth = Math.floor(depth);
|
|
173
|
+
const recursive = (arr$1, currentDepth) => {
|
|
174
|
+
for (let i = 0; i < arr$1.length; i++) {
|
|
175
|
+
const item = arr$1[i];
|
|
176
|
+
if (Array.isArray(item) && currentDepth < flooredDepth) recursive(item, currentDepth + 1);
|
|
177
|
+
else result.push(item);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
recursive(arr, 0);
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/flatMap.mjs
|
|
186
|
+
function flatMap(arr, iteratee, depth = 1) {
|
|
187
|
+
return flatten(arr.map((item) => iteratee(item)), depth);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/flatMapAsync.mjs
|
|
192
|
+
async function flatMapAsync(array, callback, options) {
|
|
193
|
+
if (options?.concurrency != null) callback = limitAsync(callback, options.concurrency);
|
|
194
|
+
return flatten(await Promise.all(array.map(callback)));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/flattenDeep.mjs
|
|
199
|
+
function flattenDeep(arr) {
|
|
200
|
+
return flatten(arr, Infinity);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/flatMapDeep.mjs
|
|
205
|
+
function flatMapDeep(arr, iteratee) {
|
|
206
|
+
return flattenDeep(arr.map((item) => iteratee(item)));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/forEachAsync.mjs
|
|
211
|
+
async function forEachAsync(array, callback, options) {
|
|
212
|
+
if (options?.concurrency != null) callback = limitAsync(callback, options.concurrency);
|
|
213
|
+
await Promise.all(array.map(callback));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/forEachRight.mjs
|
|
218
|
+
function forEachRight(arr, callback) {
|
|
219
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
220
|
+
const element = arr[i];
|
|
221
|
+
callback(element, i, arr);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/groupBy.mjs
|
|
227
|
+
function groupBy(arr, getKeyFromItem) {
|
|
228
|
+
const result = {};
|
|
229
|
+
for (let i = 0; i < arr.length; i++) {
|
|
230
|
+
const item = arr[i];
|
|
231
|
+
const key = getKeyFromItem(item);
|
|
232
|
+
if (!Object.hasOwn(result, key)) result[key] = [];
|
|
233
|
+
result[key].push(item);
|
|
234
|
+
}
|
|
235
|
+
return result;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/head.mjs
|
|
240
|
+
function head(arr) {
|
|
241
|
+
return arr[0];
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/initial.mjs
|
|
246
|
+
function initial(arr) {
|
|
247
|
+
return arr.slice(0, -1);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/intersection.mjs
|
|
252
|
+
function intersection(firstArr, secondArr) {
|
|
253
|
+
const secondSet = new Set(secondArr);
|
|
254
|
+
return firstArr.filter((item) => {
|
|
255
|
+
return secondSet.has(item);
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/intersectionBy.mjs
|
|
261
|
+
function intersectionBy(firstArr, secondArr, mapper) {
|
|
262
|
+
const result = [];
|
|
263
|
+
const mappedSecondSet = new Set(secondArr.map(mapper));
|
|
264
|
+
for (let i = 0; i < firstArr.length; i++) {
|
|
265
|
+
const item = firstArr[i];
|
|
266
|
+
const mappedItem = mapper(item);
|
|
267
|
+
if (mappedSecondSet.has(mappedItem)) {
|
|
268
|
+
result.push(item);
|
|
269
|
+
mappedSecondSet.delete(mappedItem);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return result;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/intersectionWith.mjs
|
|
277
|
+
function intersectionWith(firstArr, secondArr, areItemsEqual) {
|
|
278
|
+
return firstArr.filter((firstItem) => {
|
|
279
|
+
return secondArr.some((secondItem) => {
|
|
280
|
+
return areItemsEqual(firstItem, secondItem);
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/isSubset.mjs
|
|
287
|
+
function isSubset(superset, subset) {
|
|
288
|
+
return difference(subset, superset).length === 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/isSubsetWith.mjs
|
|
293
|
+
function isSubsetWith(superset, subset, areItemsEqual) {
|
|
294
|
+
return differenceWith(subset, superset, areItemsEqual).length === 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/keyBy.mjs
|
|
299
|
+
function keyBy(arr, getKeyFromItem) {
|
|
300
|
+
const result = {};
|
|
301
|
+
for (let i = 0; i < arr.length; i++) {
|
|
302
|
+
const item = arr[i];
|
|
303
|
+
const key = getKeyFromItem(item);
|
|
304
|
+
result[key] = item;
|
|
305
|
+
}
|
|
306
|
+
return result;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/last.mjs
|
|
311
|
+
function last(arr) {
|
|
312
|
+
return arr[arr.length - 1];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/mapAsync.mjs
|
|
317
|
+
function mapAsync(array, callback, options) {
|
|
318
|
+
if (options?.concurrency != null) callback = limitAsync(callback, options.concurrency);
|
|
319
|
+
return Promise.all(array.map(callback));
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/maxBy.mjs
|
|
324
|
+
function maxBy(items, getValue) {
|
|
325
|
+
if (items.length === 0) return;
|
|
326
|
+
let maxElement = items[0];
|
|
327
|
+
let max = getValue(maxElement);
|
|
328
|
+
for (let i = 1; i < items.length; i++) {
|
|
329
|
+
const element = items[i];
|
|
330
|
+
const value = getValue(element);
|
|
331
|
+
if (value > max) {
|
|
332
|
+
max = value;
|
|
333
|
+
maxElement = element;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return maxElement;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/minBy.mjs
|
|
341
|
+
function minBy(items, getValue) {
|
|
342
|
+
if (items.length === 0) return;
|
|
343
|
+
let minElement = items[0];
|
|
344
|
+
let min = getValue(minElement);
|
|
345
|
+
for (let i = 1; i < items.length; i++) {
|
|
346
|
+
const element = items[i];
|
|
347
|
+
const value = getValue(element);
|
|
348
|
+
if (value < min) {
|
|
349
|
+
min = value;
|
|
350
|
+
minElement = element;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return minElement;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs
|
|
358
|
+
function compareValues(a, b, order) {
|
|
359
|
+
if (a < b) return order === "asc" ? -1 : 1;
|
|
360
|
+
if (a > b) return order === "asc" ? 1 : -1;
|
|
361
|
+
return 0;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/orderBy.mjs
|
|
366
|
+
function orderBy(arr, criteria, orders) {
|
|
367
|
+
return arr.slice().sort((a, b) => {
|
|
368
|
+
const ordersLength = orders.length;
|
|
369
|
+
for (let i = 0; i < criteria.length; i++) {
|
|
370
|
+
const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];
|
|
371
|
+
const criterion = criteria[i];
|
|
372
|
+
const criterionIsFunction = typeof criterion === "function";
|
|
373
|
+
const result = compareValues(criterionIsFunction ? criterion(a) : a[criterion], criterionIsFunction ? criterion(b) : b[criterion], order);
|
|
374
|
+
if (result !== 0) return result;
|
|
375
|
+
}
|
|
376
|
+
return 0;
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/partition.mjs
|
|
382
|
+
function partition(arr, isInTruthy) {
|
|
383
|
+
const truthy = [];
|
|
384
|
+
const falsy = [];
|
|
385
|
+
for (let i = 0; i < arr.length; i++) {
|
|
386
|
+
const item = arr[i];
|
|
387
|
+
if (isInTruthy(item)) truthy.push(item);
|
|
388
|
+
else falsy.push(item);
|
|
389
|
+
}
|
|
390
|
+
return [truthy, falsy];
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/pull.mjs
|
|
395
|
+
function pull(arr, valuesToRemove) {
|
|
396
|
+
const valuesSet = new Set(valuesToRemove);
|
|
397
|
+
let resultIndex = 0;
|
|
398
|
+
for (let i = 0; i < arr.length; i++) {
|
|
399
|
+
if (valuesSet.has(arr[i])) continue;
|
|
400
|
+
if (!Object.hasOwn(arr, i)) {
|
|
401
|
+
delete arr[resultIndex++];
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
arr[resultIndex++] = arr[i];
|
|
405
|
+
}
|
|
406
|
+
arr.length = resultIndex;
|
|
407
|
+
return arr;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/pullAt.mjs
|
|
412
|
+
function pullAt(arr, indicesToRemove) {
|
|
413
|
+
const removed = at(arr, indicesToRemove);
|
|
414
|
+
const indices = new Set(indicesToRemove.slice().sort((x, y) => y - x));
|
|
415
|
+
for (const index of indices) arr.splice(index, 1);
|
|
416
|
+
return removed;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/reduceAsync.mjs
|
|
421
|
+
async function reduceAsync(array, reducer, initialValue) {
|
|
422
|
+
let startIndex = 0;
|
|
423
|
+
if (initialValue == null) {
|
|
424
|
+
initialValue = array[0];
|
|
425
|
+
startIndex = 1;
|
|
426
|
+
}
|
|
427
|
+
let accumulator = initialValue;
|
|
428
|
+
for (let i = startIndex; i < array.length; i++) accumulator = await reducer(accumulator, array[i], i, array);
|
|
429
|
+
return accumulator;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/remove.mjs
|
|
434
|
+
function remove(arr, shouldRemoveElement) {
|
|
435
|
+
const originalArr = arr.slice();
|
|
436
|
+
const removed = [];
|
|
437
|
+
let resultIndex = 0;
|
|
438
|
+
for (let i = 0; i < arr.length; i++) {
|
|
439
|
+
if (shouldRemoveElement(arr[i], i, originalArr)) {
|
|
440
|
+
removed.push(arr[i]);
|
|
441
|
+
continue;
|
|
442
|
+
}
|
|
443
|
+
if (!Object.hasOwn(arr, i)) {
|
|
444
|
+
delete arr[resultIndex++];
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
arr[resultIndex++] = arr[i];
|
|
448
|
+
}
|
|
449
|
+
arr.length = resultIndex;
|
|
450
|
+
return removed;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/sample.mjs
|
|
455
|
+
function sample(arr) {
|
|
456
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/random.mjs
|
|
461
|
+
function random(minimum, maximum) {
|
|
462
|
+
if (maximum == null) {
|
|
463
|
+
maximum = minimum;
|
|
464
|
+
minimum = 0;
|
|
465
|
+
}
|
|
466
|
+
if (minimum >= maximum) throw new Error("Invalid input: The maximum value must be greater than the minimum value.");
|
|
467
|
+
return Math.random() * (maximum - minimum) + minimum;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
//#endregion
|
|
471
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/randomInt.mjs
|
|
472
|
+
function randomInt(minimum, maximum) {
|
|
473
|
+
return Math.floor(random(minimum, maximum));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/sampleSize.mjs
|
|
478
|
+
function sampleSize(array, size) {
|
|
479
|
+
if (size > array.length) throw new Error("Size must be less than or equal to the length of array.");
|
|
480
|
+
const result = new Array(size);
|
|
481
|
+
const selected = /* @__PURE__ */ new Set();
|
|
482
|
+
for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {
|
|
483
|
+
let index = randomInt(0, step + 1);
|
|
484
|
+
if (selected.has(index)) index = step;
|
|
485
|
+
selected.add(index);
|
|
486
|
+
result[resultIndex] = array[index];
|
|
487
|
+
}
|
|
488
|
+
return result;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/shuffle.mjs
|
|
493
|
+
function shuffle(arr) {
|
|
494
|
+
const result = arr.slice();
|
|
495
|
+
for (let i = result.length - 1; i >= 1; i--) {
|
|
496
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
497
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
498
|
+
}
|
|
499
|
+
return result;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/sortBy.mjs
|
|
504
|
+
function sortBy(arr, criteria) {
|
|
505
|
+
return orderBy(arr, criteria, ["asc"]);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/tail.mjs
|
|
510
|
+
function tail(arr) {
|
|
511
|
+
return arr.slice(1);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
//#endregion
|
|
515
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
|
|
516
|
+
function isSymbol$1(value) {
|
|
517
|
+
return typeof value === "symbol" || value instanceof Symbol;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/util/toNumber.mjs
|
|
522
|
+
function toNumber(value) {
|
|
523
|
+
if (isSymbol$1(value)) return NaN;
|
|
524
|
+
return Number(value);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/util/toFinite.mjs
|
|
529
|
+
function toFinite(value) {
|
|
530
|
+
if (!value) return value === 0 ? value : 0;
|
|
531
|
+
value = toNumber(value);
|
|
532
|
+
if (value === Infinity || value === -Infinity) return (value < 0 ? -1 : 1) * Number.MAX_VALUE;
|
|
533
|
+
return value === value ? value : 0;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/util/toInteger.mjs
|
|
538
|
+
function toInteger(value) {
|
|
539
|
+
const finite = toFinite(value);
|
|
540
|
+
const remainder = finite % 1;
|
|
541
|
+
return remainder ? finite - remainder : finite;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
//#endregion
|
|
545
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/take.mjs
|
|
546
|
+
function take(arr, count, guard) {
|
|
547
|
+
count = guard || count === void 0 ? 1 : toInteger(count);
|
|
548
|
+
return arr.slice(0, count);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
//#endregion
|
|
552
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/takeRight.mjs
|
|
553
|
+
function takeRight(arr, count, guard) {
|
|
554
|
+
count = guard || count === void 0 ? 1 : toInteger(count);
|
|
555
|
+
if (count <= 0 || arr.length === 0) return [];
|
|
556
|
+
return arr.slice(-count);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
//#endregion
|
|
560
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/takeRightWhile.mjs
|
|
561
|
+
function takeRightWhile(arr, shouldContinueTaking) {
|
|
562
|
+
for (let i = arr.length - 1; i >= 0; i--) if (!shouldContinueTaking(arr[i])) return arr.slice(i + 1);
|
|
563
|
+
return arr.slice();
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/takeWhile.mjs
|
|
568
|
+
function takeWhile(arr, shouldContinueTaking) {
|
|
569
|
+
const result = [];
|
|
570
|
+
for (let i = 0; i < arr.length; i++) {
|
|
571
|
+
const item = arr[i];
|
|
572
|
+
if (!shouldContinueTaking(item)) break;
|
|
573
|
+
result.push(item);
|
|
574
|
+
}
|
|
575
|
+
return result;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
//#endregion
|
|
579
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/toFilled.mjs
|
|
580
|
+
function toFilled(arr, value, start = 0, end = arr.length) {
|
|
581
|
+
const length = arr.length;
|
|
582
|
+
const finalStart = Math.max(start >= 0 ? start : length + start, 0);
|
|
583
|
+
const finalEnd = Math.min(end >= 0 ? end : length + end, length);
|
|
584
|
+
const newArr = arr.slice();
|
|
585
|
+
for (let i = finalStart; i < finalEnd; i++) newArr[i] = value;
|
|
586
|
+
return newArr;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/uniq.mjs
|
|
591
|
+
function uniq(arr) {
|
|
592
|
+
return [...new Set(arr)];
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/union.mjs
|
|
597
|
+
function union(arr1, arr2) {
|
|
598
|
+
return uniq(arr1.concat(arr2));
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
//#endregion
|
|
602
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/uniqBy.mjs
|
|
603
|
+
function uniqBy(arr, mapper) {
|
|
604
|
+
const map = /* @__PURE__ */ new Map();
|
|
605
|
+
for (let i = 0; i < arr.length; i++) {
|
|
606
|
+
const item = arr[i];
|
|
607
|
+
const key = mapper(item);
|
|
608
|
+
if (!map.has(key)) map.set(key, item);
|
|
609
|
+
}
|
|
610
|
+
return Array.from(map.values());
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/unionBy.mjs
|
|
615
|
+
function unionBy(arr1, arr2, mapper) {
|
|
616
|
+
return uniqBy(arr1.concat(arr2), mapper);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/uniqWith.mjs
|
|
621
|
+
function uniqWith(arr, areItemsEqual) {
|
|
622
|
+
const result = [];
|
|
623
|
+
for (let i = 0; i < arr.length; i++) {
|
|
624
|
+
const item = arr[i];
|
|
625
|
+
if (result.every((v) => !areItemsEqual(v, item))) result.push(item);
|
|
626
|
+
}
|
|
627
|
+
return result;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/unionWith.mjs
|
|
632
|
+
function unionWith(arr1, arr2, areItemsEqual) {
|
|
633
|
+
return uniqWith(arr1.concat(arr2), areItemsEqual);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/unzip.mjs
|
|
638
|
+
function unzip(zipped) {
|
|
639
|
+
let maxLen = 0;
|
|
640
|
+
for (let i = 0; i < zipped.length; i++) if (zipped[i].length > maxLen) maxLen = zipped[i].length;
|
|
641
|
+
const result = new Array(maxLen);
|
|
642
|
+
for (let i = 0; i < maxLen; i++) {
|
|
643
|
+
result[i] = new Array(zipped.length);
|
|
644
|
+
for (let j = 0; j < zipped.length; j++) result[i][j] = zipped[j][i];
|
|
645
|
+
}
|
|
646
|
+
return result;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/unzipWith.mjs
|
|
651
|
+
function unzipWith(target, iteratee) {
|
|
652
|
+
const maxLength = Math.max(...target.map((innerArray) => innerArray.length));
|
|
653
|
+
const result = new Array(maxLength);
|
|
654
|
+
for (let i = 0; i < maxLength; i++) {
|
|
655
|
+
const group = new Array(target.length);
|
|
656
|
+
for (let j = 0; j < target.length; j++) group[j] = target[j][i];
|
|
657
|
+
result[i] = iteratee(...group);
|
|
658
|
+
}
|
|
659
|
+
return result;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/windowed.mjs
|
|
664
|
+
function windowed(arr, size, step = 1, { partialWindows = false } = {}) {
|
|
665
|
+
if (size <= 0 || !Number.isInteger(size)) throw new Error("Size must be a positive integer.");
|
|
666
|
+
if (step <= 0 || !Number.isInteger(step)) throw new Error("Step must be a positive integer.");
|
|
667
|
+
const result = [];
|
|
668
|
+
const end = partialWindows ? arr.length : arr.length - size + 1;
|
|
669
|
+
for (let i = 0; i < end; i += step) result.push(arr.slice(i, i + size));
|
|
670
|
+
return result;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/without.mjs
|
|
675
|
+
function without(array, ...values) {
|
|
676
|
+
return difference(array, values);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
//#endregion
|
|
680
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/xor.mjs
|
|
681
|
+
function xor(arr1, arr2) {
|
|
682
|
+
return difference(union(arr1, arr2), intersection(arr1, arr2));
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
//#endregion
|
|
686
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/xorBy.mjs
|
|
687
|
+
function xorBy(arr1, arr2, mapper) {
|
|
688
|
+
return differenceBy(unionBy(arr1, arr2, mapper), intersectionBy(arr1, arr2, mapper), mapper);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
//#endregion
|
|
692
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/xorWith.mjs
|
|
693
|
+
function xorWith(arr1, arr2, areElementsEqual) {
|
|
694
|
+
return differenceWith(unionWith(arr1, arr2, areElementsEqual), intersectionWith(arr1, arr2, areElementsEqual), areElementsEqual);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
//#endregion
|
|
698
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/zip.mjs
|
|
699
|
+
function zip(...arrs) {
|
|
700
|
+
let rowCount = 0;
|
|
701
|
+
for (let i = 0; i < arrs.length; i++) if (arrs[i].length > rowCount) rowCount = arrs[i].length;
|
|
702
|
+
const columnCount = arrs.length;
|
|
703
|
+
const result = Array(rowCount);
|
|
704
|
+
for (let i = 0; i < rowCount; ++i) {
|
|
705
|
+
const row = Array(columnCount);
|
|
706
|
+
for (let j = 0; j < columnCount; ++j) row[j] = arrs[j][i];
|
|
707
|
+
result[i] = row;
|
|
708
|
+
}
|
|
709
|
+
return result;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/zipObject.mjs
|
|
714
|
+
function zipObject(keys, values) {
|
|
715
|
+
const result = {};
|
|
716
|
+
for (let i = 0; i < keys.length; i++) result[keys[i]] = values[i];
|
|
717
|
+
return result;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
//#endregion
|
|
721
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/array/zipWith.mjs
|
|
722
|
+
function zipWith(arr1, ...rest$1) {
|
|
723
|
+
const arrs = [arr1, ...rest$1.slice(0, -1)];
|
|
724
|
+
const combine = rest$1[rest$1.length - 1];
|
|
725
|
+
const maxIndex = Math.max(...arrs.map((arr) => arr.length));
|
|
726
|
+
const result = Array(maxIndex);
|
|
727
|
+
for (let i = 0; i < maxIndex; i++) result[i] = combine(...arrs.map((arr) => arr[i]));
|
|
728
|
+
return result;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/error/AbortError.mjs
|
|
733
|
+
var AbortError = class extends Error {
|
|
734
|
+
constructor(message = "The operation was aborted") {
|
|
735
|
+
super(message);
|
|
736
|
+
this.name = "AbortError";
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
//#endregion
|
|
741
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/error/TimeoutError.mjs
|
|
742
|
+
var TimeoutError = class extends Error {
|
|
743
|
+
constructor(message = "The operation was timed out") {
|
|
744
|
+
super(message);
|
|
745
|
+
this.name = "TimeoutError";
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
//#endregion
|
|
750
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/after.mjs
|
|
751
|
+
function after(n, func) {
|
|
752
|
+
if (!Number.isInteger(n) || n < 0) throw new Error(`n must be a non-negative integer.`);
|
|
753
|
+
let counter = 0;
|
|
754
|
+
return (...args) => {
|
|
755
|
+
if (++counter >= n) return func(...args);
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/ary.mjs
|
|
761
|
+
function ary(func, n) {
|
|
762
|
+
return function(...args) {
|
|
763
|
+
return func.apply(this, args.slice(0, n));
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/asyncNoop.mjs
|
|
769
|
+
async function asyncNoop() {}
|
|
770
|
+
|
|
771
|
+
//#endregion
|
|
772
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/before.mjs
|
|
773
|
+
function before(n, func) {
|
|
774
|
+
if (!Number.isInteger(n) || n < 0) throw new Error("n must be a non-negative integer.");
|
|
775
|
+
let counter = 0;
|
|
776
|
+
return (...args) => {
|
|
777
|
+
if (++counter < n) return func(...args);
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/curry.mjs
|
|
783
|
+
function curry(func) {
|
|
784
|
+
if (func.length === 0 || func.length === 1) return func;
|
|
785
|
+
return function(arg) {
|
|
786
|
+
return makeCurry(func, func.length, [arg]);
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
function makeCurry(origin, argsLength, args) {
|
|
790
|
+
if (args.length === argsLength) return origin(...args);
|
|
791
|
+
else {
|
|
792
|
+
const next = function(arg) {
|
|
793
|
+
return makeCurry(origin, argsLength, [...args, arg]);
|
|
794
|
+
};
|
|
795
|
+
return next;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
//#endregion
|
|
800
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/curryRight.mjs
|
|
801
|
+
function curryRight(func) {
|
|
802
|
+
if (func.length === 0 || func.length === 1) return func;
|
|
803
|
+
return function(arg) {
|
|
804
|
+
return makeCurryRight(func, func.length, [arg]);
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
function makeCurryRight(origin, argsLength, args) {
|
|
808
|
+
if (args.length === argsLength) return origin(...args);
|
|
809
|
+
else {
|
|
810
|
+
const next = function(arg) {
|
|
811
|
+
return makeCurryRight(origin, argsLength, [arg, ...args]);
|
|
812
|
+
};
|
|
813
|
+
return next;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
//#endregion
|
|
818
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/debounce.mjs
|
|
819
|
+
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
820
|
+
let pendingThis = void 0;
|
|
821
|
+
let pendingArgs = null;
|
|
822
|
+
const leading = edges != null && edges.includes("leading");
|
|
823
|
+
const trailing = edges == null || edges.includes("trailing");
|
|
824
|
+
const invoke = () => {
|
|
825
|
+
if (pendingArgs !== null) {
|
|
826
|
+
func.apply(pendingThis, pendingArgs);
|
|
827
|
+
pendingThis = void 0;
|
|
828
|
+
pendingArgs = null;
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
const onTimerEnd = () => {
|
|
832
|
+
if (trailing) invoke();
|
|
833
|
+
cancel();
|
|
834
|
+
};
|
|
835
|
+
let timeoutId = null;
|
|
836
|
+
const schedule = () => {
|
|
837
|
+
if (timeoutId != null) clearTimeout(timeoutId);
|
|
838
|
+
timeoutId = setTimeout(() => {
|
|
839
|
+
timeoutId = null;
|
|
840
|
+
onTimerEnd();
|
|
841
|
+
}, debounceMs);
|
|
842
|
+
};
|
|
843
|
+
const cancelTimer = () => {
|
|
844
|
+
if (timeoutId !== null) {
|
|
845
|
+
clearTimeout(timeoutId);
|
|
846
|
+
timeoutId = null;
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
const cancel = () => {
|
|
850
|
+
cancelTimer();
|
|
851
|
+
pendingThis = void 0;
|
|
852
|
+
pendingArgs = null;
|
|
853
|
+
};
|
|
854
|
+
const flush = () => {
|
|
855
|
+
invoke();
|
|
856
|
+
};
|
|
857
|
+
const debounced = function(...args) {
|
|
858
|
+
if (signal?.aborted) return;
|
|
859
|
+
pendingThis = this;
|
|
860
|
+
pendingArgs = args;
|
|
861
|
+
const isFirstCall = timeoutId == null;
|
|
862
|
+
schedule();
|
|
863
|
+
if (leading && isFirstCall) invoke();
|
|
864
|
+
};
|
|
865
|
+
debounced.schedule = schedule;
|
|
866
|
+
debounced.cancel = cancel;
|
|
867
|
+
debounced.flush = flush;
|
|
868
|
+
signal?.addEventListener("abort", cancel, { once: true });
|
|
869
|
+
return debounced;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/flow.mjs
|
|
874
|
+
function flow(...funcs) {
|
|
875
|
+
return function(...args) {
|
|
876
|
+
let result = funcs.length ? funcs[0].apply(this, args) : args[0];
|
|
877
|
+
for (let i = 1; i < funcs.length; i++) result = funcs[i].call(this, result);
|
|
878
|
+
return result;
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
//#endregion
|
|
883
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/flowRight.mjs
|
|
884
|
+
function flowRight(...funcs) {
|
|
885
|
+
return flow(...funcs.reverse());
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
//#endregion
|
|
889
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/identity.mjs
|
|
890
|
+
function identity(x) {
|
|
891
|
+
return x;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
//#endregion
|
|
895
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/memoize.mjs
|
|
896
|
+
function memoize(fn, options = {}) {
|
|
897
|
+
const { cache = /* @__PURE__ */ new Map(), getCacheKey } = options;
|
|
898
|
+
const memoizedFn = function(arg) {
|
|
899
|
+
const key = getCacheKey ? getCacheKey(arg) : arg;
|
|
900
|
+
if (cache.has(key)) return cache.get(key);
|
|
901
|
+
const result = fn.call(this, arg);
|
|
902
|
+
cache.set(key, result);
|
|
903
|
+
return result;
|
|
904
|
+
};
|
|
905
|
+
memoizedFn.cache = cache;
|
|
906
|
+
return memoizedFn;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
//#endregion
|
|
910
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/negate.mjs
|
|
911
|
+
function negate(func) {
|
|
912
|
+
return ((...args) => !func(...args));
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
//#endregion
|
|
916
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/noop.mjs
|
|
917
|
+
function noop() {}
|
|
918
|
+
|
|
919
|
+
//#endregion
|
|
920
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/once.mjs
|
|
921
|
+
function once(func) {
|
|
922
|
+
let called = false;
|
|
923
|
+
let cache;
|
|
924
|
+
return function(...args) {
|
|
925
|
+
if (!called) {
|
|
926
|
+
called = true;
|
|
927
|
+
cache = func(...args);
|
|
928
|
+
}
|
|
929
|
+
return cache;
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/partial.mjs
|
|
935
|
+
function partial(func, ...partialArgs) {
|
|
936
|
+
return partialImpl(func, placeholderSymbol$1, ...partialArgs);
|
|
937
|
+
}
|
|
938
|
+
function partialImpl(func, placeholder, ...partialArgs) {
|
|
939
|
+
const partialed = function(...providedArgs) {
|
|
940
|
+
let providedArgsIndex = 0;
|
|
941
|
+
const substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
|
|
942
|
+
const remainingArgs = providedArgs.slice(providedArgsIndex);
|
|
943
|
+
return func.apply(this, substitutedArgs.concat(remainingArgs));
|
|
944
|
+
};
|
|
945
|
+
if (func.prototype) partialed.prototype = Object.create(func.prototype);
|
|
946
|
+
return partialed;
|
|
947
|
+
}
|
|
948
|
+
const placeholderSymbol$1 = Symbol("partial.placeholder");
|
|
949
|
+
partial.placeholder = placeholderSymbol$1;
|
|
950
|
+
|
|
951
|
+
//#endregion
|
|
952
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/partialRight.mjs
|
|
953
|
+
function partialRight(func, ...partialArgs) {
|
|
954
|
+
return partialRightImpl(func, placeholderSymbol, ...partialArgs);
|
|
955
|
+
}
|
|
956
|
+
function partialRightImpl(func, placeholder, ...partialArgs) {
|
|
957
|
+
const partialedRight = function(...providedArgs) {
|
|
958
|
+
const placeholderLength = partialArgs.filter((arg) => arg === placeholder).length;
|
|
959
|
+
const rangeLength = Math.max(providedArgs.length - placeholderLength, 0);
|
|
960
|
+
const remainingArgs = providedArgs.slice(0, rangeLength);
|
|
961
|
+
let providedArgsIndex = rangeLength;
|
|
962
|
+
const substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
|
|
963
|
+
return func.apply(this, remainingArgs.concat(substitutedArgs));
|
|
964
|
+
};
|
|
965
|
+
if (func.prototype) partialedRight.prototype = Object.create(func.prototype);
|
|
966
|
+
return partialedRight;
|
|
967
|
+
}
|
|
968
|
+
const placeholderSymbol = Symbol("partialRight.placeholder");
|
|
969
|
+
partialRight.placeholder = placeholderSymbol;
|
|
970
|
+
|
|
971
|
+
//#endregion
|
|
972
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/rest.mjs
|
|
973
|
+
function rest(func, startIndex = func.length - 1) {
|
|
974
|
+
return function(...args) {
|
|
975
|
+
const rest$1 = args.slice(startIndex);
|
|
976
|
+
const params = args.slice(0, startIndex);
|
|
977
|
+
while (params.length < startIndex) params.push(void 0);
|
|
978
|
+
return func.apply(this, [...params, rest$1]);
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
//#endregion
|
|
983
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/promise/delay.mjs
|
|
984
|
+
function delay(ms, { signal } = {}) {
|
|
985
|
+
return new Promise((resolve, reject) => {
|
|
986
|
+
const abortError = () => {
|
|
987
|
+
reject(new AbortError());
|
|
988
|
+
};
|
|
989
|
+
const abortHandler = () => {
|
|
990
|
+
clearTimeout(timeoutId);
|
|
991
|
+
abortError();
|
|
992
|
+
};
|
|
993
|
+
if (signal?.aborted) return abortError();
|
|
994
|
+
const timeoutId = setTimeout(() => {
|
|
995
|
+
signal?.removeEventListener("abort", abortHandler);
|
|
996
|
+
resolve();
|
|
997
|
+
}, ms);
|
|
998
|
+
signal?.addEventListener("abort", abortHandler, { once: true });
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
//#endregion
|
|
1003
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/retry.mjs
|
|
1004
|
+
const DEFAULT_DELAY = 0;
|
|
1005
|
+
const DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
|
|
1006
|
+
async function retry(func, _options) {
|
|
1007
|
+
let delay$1;
|
|
1008
|
+
let retries;
|
|
1009
|
+
let signal;
|
|
1010
|
+
if (typeof _options === "number") {
|
|
1011
|
+
delay$1 = DEFAULT_DELAY;
|
|
1012
|
+
retries = _options;
|
|
1013
|
+
signal = void 0;
|
|
1014
|
+
} else {
|
|
1015
|
+
delay$1 = _options?.delay ?? DEFAULT_DELAY;
|
|
1016
|
+
retries = _options?.retries ?? DEFAULT_RETRIES;
|
|
1017
|
+
signal = _options?.signal;
|
|
1018
|
+
}
|
|
1019
|
+
let error;
|
|
1020
|
+
for (let attempts = 0; attempts < retries; attempts++) {
|
|
1021
|
+
if (signal?.aborted) throw error ?? /* @__PURE__ */ new Error(`The retry operation was aborted due to an abort signal.`);
|
|
1022
|
+
try {
|
|
1023
|
+
return await func();
|
|
1024
|
+
} catch (err) {
|
|
1025
|
+
error = err;
|
|
1026
|
+
await delay(typeof delay$1 === "function" ? delay$1(attempts) : delay$1);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
throw error;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
//#endregion
|
|
1033
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/spread.mjs
|
|
1034
|
+
function spread(func) {
|
|
1035
|
+
return function(argsArr) {
|
|
1036
|
+
return func.apply(this, argsArr);
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/throttle.mjs
|
|
1042
|
+
function throttle(func, throttleMs, { signal, edges = ["leading", "trailing"] } = {}) {
|
|
1043
|
+
let pendingAt = null;
|
|
1044
|
+
const debounced = debounce(function(...args) {
|
|
1045
|
+
pendingAt = Date.now();
|
|
1046
|
+
func.apply(this, args);
|
|
1047
|
+
}, throttleMs, {
|
|
1048
|
+
signal,
|
|
1049
|
+
edges
|
|
1050
|
+
});
|
|
1051
|
+
const throttled = function(...args) {
|
|
1052
|
+
if (pendingAt == null) pendingAt = Date.now();
|
|
1053
|
+
if (Date.now() - pendingAt >= throttleMs) {
|
|
1054
|
+
pendingAt = Date.now();
|
|
1055
|
+
func.apply(this, args);
|
|
1056
|
+
debounced.cancel();
|
|
1057
|
+
debounced.schedule();
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
1060
|
+
debounced.apply(this, args);
|
|
1061
|
+
};
|
|
1062
|
+
throttled.cancel = debounced.cancel;
|
|
1063
|
+
throttled.flush = debounced.flush;
|
|
1064
|
+
return throttled;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
//#endregion
|
|
1068
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/function/unary.mjs
|
|
1069
|
+
function unary(func) {
|
|
1070
|
+
return ary(func, 1);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
//#endregion
|
|
1074
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/clamp.mjs
|
|
1075
|
+
function clamp(value, bound1, bound2) {
|
|
1076
|
+
if (bound2 == null) return Math.min(value, bound1);
|
|
1077
|
+
return Math.min(Math.max(value, bound1), bound2);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
//#endregion
|
|
1081
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/inRange.mjs
|
|
1082
|
+
function inRange(value, minimum, maximum) {
|
|
1083
|
+
if (maximum == null) {
|
|
1084
|
+
maximum = minimum;
|
|
1085
|
+
minimum = 0;
|
|
1086
|
+
}
|
|
1087
|
+
if (minimum >= maximum) throw new Error("The maximum value must be greater than the minimum value.");
|
|
1088
|
+
return minimum <= value && value < maximum;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
//#endregion
|
|
1092
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/sum.mjs
|
|
1093
|
+
function sum(nums) {
|
|
1094
|
+
let result = 0;
|
|
1095
|
+
for (let i = 0; i < nums.length; i++) result += nums[i];
|
|
1096
|
+
return result;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
//#endregion
|
|
1100
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/mean.mjs
|
|
1101
|
+
function mean(nums) {
|
|
1102
|
+
return sum(nums) / nums.length;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
//#endregion
|
|
1106
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/sumBy.mjs
|
|
1107
|
+
function sumBy(items, getValue) {
|
|
1108
|
+
let result = 0;
|
|
1109
|
+
for (let i = 0; i < items.length; i++) result += getValue(items[i], i);
|
|
1110
|
+
return result;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
//#endregion
|
|
1114
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/meanBy.mjs
|
|
1115
|
+
function meanBy(items, getValue) {
|
|
1116
|
+
return sumBy(items, (item) => getValue(item)) / items.length;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
//#endregion
|
|
1120
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/median.mjs
|
|
1121
|
+
function median(nums) {
|
|
1122
|
+
if (nums.length === 0) return NaN;
|
|
1123
|
+
const sorted = nums.slice().sort((a, b) => a - b);
|
|
1124
|
+
const middleIndex = Math.floor(sorted.length / 2);
|
|
1125
|
+
if (sorted.length % 2 === 0) return (sorted[middleIndex - 1] + sorted[middleIndex]) / 2;
|
|
1126
|
+
else return sorted[middleIndex];
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
//#endregion
|
|
1130
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/medianBy.mjs
|
|
1131
|
+
function medianBy(items, getValue) {
|
|
1132
|
+
return median(items.map((x) => getValue(x)));
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/range.mjs
|
|
1137
|
+
function range(start, end, step = 1) {
|
|
1138
|
+
if (end == null) {
|
|
1139
|
+
end = start;
|
|
1140
|
+
start = 0;
|
|
1141
|
+
}
|
|
1142
|
+
if (!Number.isInteger(step) || step === 0) throw new Error(`The step value must be a non-zero integer.`);
|
|
1143
|
+
const length = Math.max(Math.ceil((end - start) / step), 0);
|
|
1144
|
+
const result = new Array(length);
|
|
1145
|
+
for (let i = 0; i < length; i++) result[i] = start + i * step;
|
|
1146
|
+
return result;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
//#endregion
|
|
1150
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/rangeRight.mjs
|
|
1151
|
+
function rangeRight(start, end, step = 1) {
|
|
1152
|
+
if (end == null) {
|
|
1153
|
+
end = start;
|
|
1154
|
+
start = 0;
|
|
1155
|
+
}
|
|
1156
|
+
if (!Number.isInteger(step) || step === 0) throw new Error(`The step value must be a non-zero integer.`);
|
|
1157
|
+
const length = Math.max(Math.ceil((end - start) / step), 0);
|
|
1158
|
+
const result = new Array(length);
|
|
1159
|
+
for (let i = 0; i < length; i++) result[i] = start + (length - i - 1) * step;
|
|
1160
|
+
return result;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
//#endregion
|
|
1164
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/math/round.mjs
|
|
1165
|
+
function round(value, precision = 0) {
|
|
1166
|
+
if (!Number.isInteger(precision)) throw new Error("Precision must be an integer.");
|
|
1167
|
+
const multiplier = Math.pow(10, precision);
|
|
1168
|
+
return Math.round(value * multiplier) / multiplier;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
//#endregion
|
|
1172
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
1173
|
+
function isPrimitive(value) {
|
|
1174
|
+
return value == null || typeof value !== "object" && typeof value !== "function";
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
//#endregion
|
|
1178
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
1179
|
+
function isTypedArray(x) {
|
|
1180
|
+
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
//#endregion
|
|
1184
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/clone.mjs
|
|
1185
|
+
function clone(obj) {
|
|
1186
|
+
if (isPrimitive(obj)) return obj;
|
|
1187
|
+
if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
|
|
1188
|
+
const prototype = Object.getPrototypeOf(obj);
|
|
1189
|
+
const Constructor = prototype.constructor;
|
|
1190
|
+
if (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);
|
|
1191
|
+
if (obj instanceof RegExp) {
|
|
1192
|
+
const newRegExp = new Constructor(obj);
|
|
1193
|
+
newRegExp.lastIndex = obj.lastIndex;
|
|
1194
|
+
return newRegExp;
|
|
1195
|
+
}
|
|
1196
|
+
if (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));
|
|
1197
|
+
if (obj instanceof Error) {
|
|
1198
|
+
const newError = new Constructor(obj.message);
|
|
1199
|
+
newError.stack = obj.stack;
|
|
1200
|
+
newError.name = obj.name;
|
|
1201
|
+
newError.cause = obj.cause;
|
|
1202
|
+
return newError;
|
|
1203
|
+
}
|
|
1204
|
+
if (typeof File !== "undefined" && obj instanceof File) return new Constructor([obj], obj.name, {
|
|
1205
|
+
type: obj.type,
|
|
1206
|
+
lastModified: obj.lastModified
|
|
1207
|
+
});
|
|
1208
|
+
if (typeof obj === "object") {
|
|
1209
|
+
const newObject = Object.create(prototype);
|
|
1210
|
+
return Object.assign(newObject, obj);
|
|
1211
|
+
}
|
|
1212
|
+
return obj;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
//#endregion
|
|
1216
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
1217
|
+
function getSymbols(object) {
|
|
1218
|
+
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
//#endregion
|
|
1222
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
1223
|
+
function getTag(value) {
|
|
1224
|
+
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
1225
|
+
return Object.prototype.toString.call(value);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
//#endregion
|
|
1229
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
1230
|
+
const regexpTag = "[object RegExp]";
|
|
1231
|
+
const stringTag = "[object String]";
|
|
1232
|
+
const numberTag = "[object Number]";
|
|
1233
|
+
const booleanTag = "[object Boolean]";
|
|
1234
|
+
const argumentsTag = "[object Arguments]";
|
|
1235
|
+
const symbolTag = "[object Symbol]";
|
|
1236
|
+
const dateTag = "[object Date]";
|
|
1237
|
+
const mapTag = "[object Map]";
|
|
1238
|
+
const setTag = "[object Set]";
|
|
1239
|
+
const arrayTag = "[object Array]";
|
|
1240
|
+
const functionTag = "[object Function]";
|
|
1241
|
+
const arrayBufferTag = "[object ArrayBuffer]";
|
|
1242
|
+
const objectTag = "[object Object]";
|
|
1243
|
+
const errorTag = "[object Error]";
|
|
1244
|
+
const dataViewTag = "[object DataView]";
|
|
1245
|
+
const uint8ArrayTag = "[object Uint8Array]";
|
|
1246
|
+
const uint8ClampedArrayTag = "[object Uint8ClampedArray]";
|
|
1247
|
+
const uint16ArrayTag = "[object Uint16Array]";
|
|
1248
|
+
const uint32ArrayTag = "[object Uint32Array]";
|
|
1249
|
+
const bigUint64ArrayTag = "[object BigUint64Array]";
|
|
1250
|
+
const int8ArrayTag = "[object Int8Array]";
|
|
1251
|
+
const int16ArrayTag = "[object Int16Array]";
|
|
1252
|
+
const int32ArrayTag = "[object Int32Array]";
|
|
1253
|
+
const bigInt64ArrayTag = "[object BigInt64Array]";
|
|
1254
|
+
const float32ArrayTag = "[object Float32Array]";
|
|
1255
|
+
const float64ArrayTag = "[object Float64Array]";
|
|
1256
|
+
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
1259
|
+
function cloneDeepWith(obj, cloneValue) {
|
|
1260
|
+
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
|
|
1261
|
+
}
|
|
1262
|
+
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
|
|
1263
|
+
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
1264
|
+
if (cloned !== void 0) return cloned;
|
|
1265
|
+
if (isPrimitive(valueToClone)) return valueToClone;
|
|
1266
|
+
if (stack.has(valueToClone)) return stack.get(valueToClone);
|
|
1267
|
+
if (Array.isArray(valueToClone)) {
|
|
1268
|
+
const result = new Array(valueToClone.length);
|
|
1269
|
+
stack.set(valueToClone, result);
|
|
1270
|
+
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
1271
|
+
if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
|
|
1272
|
+
if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
|
|
1273
|
+
return result;
|
|
1274
|
+
}
|
|
1275
|
+
if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
|
|
1276
|
+
if (valueToClone instanceof RegExp) {
|
|
1277
|
+
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
1278
|
+
result.lastIndex = valueToClone.lastIndex;
|
|
1279
|
+
return result;
|
|
1280
|
+
}
|
|
1281
|
+
if (valueToClone instanceof Map) {
|
|
1282
|
+
const result = /* @__PURE__ */ new Map();
|
|
1283
|
+
stack.set(valueToClone, result);
|
|
1284
|
+
for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
1285
|
+
return result;
|
|
1286
|
+
}
|
|
1287
|
+
if (valueToClone instanceof Set) {
|
|
1288
|
+
const result = /* @__PURE__ */ new Set();
|
|
1289
|
+
stack.set(valueToClone, result);
|
|
1290
|
+
for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
|
|
1291
|
+
return result;
|
|
1292
|
+
}
|
|
1293
|
+
if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
|
|
1294
|
+
if (isTypedArray(valueToClone)) {
|
|
1295
|
+
const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
|
|
1296
|
+
stack.set(valueToClone, result);
|
|
1297
|
+
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
1298
|
+
return result;
|
|
1299
|
+
}
|
|
1300
|
+
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
|
|
1301
|
+
if (valueToClone instanceof DataView) {
|
|
1302
|
+
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
1303
|
+
stack.set(valueToClone, result);
|
|
1304
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1305
|
+
return result;
|
|
1306
|
+
}
|
|
1307
|
+
if (typeof File !== "undefined" && valueToClone instanceof File) {
|
|
1308
|
+
const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
|
|
1309
|
+
stack.set(valueToClone, result);
|
|
1310
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1311
|
+
return result;
|
|
1312
|
+
}
|
|
1313
|
+
if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
|
|
1314
|
+
const result = new Blob([valueToClone], { type: valueToClone.type });
|
|
1315
|
+
stack.set(valueToClone, result);
|
|
1316
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1317
|
+
return result;
|
|
1318
|
+
}
|
|
1319
|
+
if (valueToClone instanceof Error) {
|
|
1320
|
+
const result = new valueToClone.constructor();
|
|
1321
|
+
stack.set(valueToClone, result);
|
|
1322
|
+
result.message = valueToClone.message;
|
|
1323
|
+
result.name = valueToClone.name;
|
|
1324
|
+
result.stack = valueToClone.stack;
|
|
1325
|
+
result.cause = valueToClone.cause;
|
|
1326
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1327
|
+
return result;
|
|
1328
|
+
}
|
|
1329
|
+
if (valueToClone instanceof Boolean) {
|
|
1330
|
+
const result = new Boolean(valueToClone.valueOf());
|
|
1331
|
+
stack.set(valueToClone, result);
|
|
1332
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1333
|
+
return result;
|
|
1334
|
+
}
|
|
1335
|
+
if (valueToClone instanceof Number) {
|
|
1336
|
+
const result = new Number(valueToClone.valueOf());
|
|
1337
|
+
stack.set(valueToClone, result);
|
|
1338
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1339
|
+
return result;
|
|
1340
|
+
}
|
|
1341
|
+
if (valueToClone instanceof String) {
|
|
1342
|
+
const result = new String(valueToClone.valueOf());
|
|
1343
|
+
stack.set(valueToClone, result);
|
|
1344
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1345
|
+
return result;
|
|
1346
|
+
}
|
|
1347
|
+
if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
|
|
1348
|
+
const result = Object.create(Object.getPrototypeOf(valueToClone));
|
|
1349
|
+
stack.set(valueToClone, result);
|
|
1350
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1351
|
+
return result;
|
|
1352
|
+
}
|
|
1353
|
+
return valueToClone;
|
|
1354
|
+
}
|
|
1355
|
+
function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
|
|
1356
|
+
const keys = [...Object.keys(source), ...getSymbols(source)];
|
|
1357
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1358
|
+
const key = keys[i];
|
|
1359
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
1360
|
+
if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
function isCloneableObject(object) {
|
|
1364
|
+
switch (getTag(object)) {
|
|
1365
|
+
case argumentsTag:
|
|
1366
|
+
case arrayTag:
|
|
1367
|
+
case arrayBufferTag:
|
|
1368
|
+
case dataViewTag:
|
|
1369
|
+
case booleanTag:
|
|
1370
|
+
case dateTag:
|
|
1371
|
+
case float32ArrayTag:
|
|
1372
|
+
case float64ArrayTag:
|
|
1373
|
+
case int8ArrayTag:
|
|
1374
|
+
case int16ArrayTag:
|
|
1375
|
+
case int32ArrayTag:
|
|
1376
|
+
case mapTag:
|
|
1377
|
+
case numberTag:
|
|
1378
|
+
case objectTag:
|
|
1379
|
+
case regexpTag:
|
|
1380
|
+
case setTag:
|
|
1381
|
+
case stringTag:
|
|
1382
|
+
case symbolTag:
|
|
1383
|
+
case uint8ArrayTag:
|
|
1384
|
+
case uint8ClampedArrayTag:
|
|
1385
|
+
case uint16ArrayTag:
|
|
1386
|
+
case uint32ArrayTag: return true;
|
|
1387
|
+
default: return false;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
//#endregion
|
|
1392
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
1393
|
+
function cloneDeep(obj) {
|
|
1394
|
+
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
//#endregion
|
|
1398
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/findKey.mjs
|
|
1399
|
+
function findKey(obj, predicate) {
|
|
1400
|
+
return Object.keys(obj).find((key) => predicate(obj[key], key, obj));
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
//#endregion
|
|
1404
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
1405
|
+
function isPlainObject(value) {
|
|
1406
|
+
if (!value || typeof value !== "object") return false;
|
|
1407
|
+
const proto = Object.getPrototypeOf(value);
|
|
1408
|
+
if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
|
|
1409
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
//#endregion
|
|
1413
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/flattenObject.mjs
|
|
1414
|
+
function flattenObject(object, { delimiter = "." } = {}) {
|
|
1415
|
+
return flattenObjectImpl(object, "", delimiter);
|
|
1416
|
+
}
|
|
1417
|
+
function flattenObjectImpl(object, prefix, delimiter) {
|
|
1418
|
+
const result = {};
|
|
1419
|
+
const keys = Object.keys(object);
|
|
1420
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1421
|
+
const key = keys[i];
|
|
1422
|
+
const value = object[key];
|
|
1423
|
+
const prefixedKey = prefix ? `${prefix}${delimiter}${key}` : key;
|
|
1424
|
+
if (isPlainObject(value) && Object.keys(value).length > 0) {
|
|
1425
|
+
Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
|
|
1426
|
+
continue;
|
|
1427
|
+
}
|
|
1428
|
+
if (Array.isArray(value)) {
|
|
1429
|
+
Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
|
|
1430
|
+
continue;
|
|
1431
|
+
}
|
|
1432
|
+
result[prefixedKey] = value;
|
|
1433
|
+
}
|
|
1434
|
+
return result;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
//#endregion
|
|
1438
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/invert.mjs
|
|
1439
|
+
function invert(obj) {
|
|
1440
|
+
const result = {};
|
|
1441
|
+
const keys = Object.keys(obj);
|
|
1442
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1443
|
+
const key = keys[i];
|
|
1444
|
+
const value = obj[key];
|
|
1445
|
+
result[value] = key;
|
|
1446
|
+
}
|
|
1447
|
+
return result;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
//#endregion
|
|
1451
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/mapKeys.mjs
|
|
1452
|
+
function mapKeys(object, getNewKey) {
|
|
1453
|
+
const result = {};
|
|
1454
|
+
const keys = Object.keys(object);
|
|
1455
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1456
|
+
const key = keys[i];
|
|
1457
|
+
const value = object[key];
|
|
1458
|
+
result[getNewKey(value, key, object)] = value;
|
|
1459
|
+
}
|
|
1460
|
+
return result;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
//#endregion
|
|
1464
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/mapValues.mjs
|
|
1465
|
+
function mapValues(object, getNewValue) {
|
|
1466
|
+
const result = {};
|
|
1467
|
+
const keys = Object.keys(object);
|
|
1468
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1469
|
+
const key = keys[i];
|
|
1470
|
+
const value = object[key];
|
|
1471
|
+
result[key] = getNewValue(value, key, object);
|
|
1472
|
+
}
|
|
1473
|
+
return result;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
//#endregion
|
|
1477
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
1478
|
+
function isUnsafeProperty(key) {
|
|
1479
|
+
return key === "__proto__";
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
//#endregion
|
|
1483
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/merge.mjs
|
|
1484
|
+
function merge(target, source) {
|
|
1485
|
+
const sourceKeys = Object.keys(source);
|
|
1486
|
+
for (let i = 0; i < sourceKeys.length; i++) {
|
|
1487
|
+
const key = sourceKeys[i];
|
|
1488
|
+
if (isUnsafeProperty(key)) continue;
|
|
1489
|
+
const sourceValue = source[key];
|
|
1490
|
+
const targetValue = target[key];
|
|
1491
|
+
if (isMergeableValue(sourceValue) && isMergeableValue(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
1492
|
+
else if (Array.isArray(sourceValue)) target[key] = merge([], sourceValue);
|
|
1493
|
+
else if (isPlainObject(sourceValue)) target[key] = merge({}, sourceValue);
|
|
1494
|
+
else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
|
|
1495
|
+
}
|
|
1496
|
+
return target;
|
|
1497
|
+
}
|
|
1498
|
+
function isMergeableValue(value) {
|
|
1499
|
+
return isPlainObject(value) || Array.isArray(value);
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
//#endregion
|
|
1503
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/mergeWith.mjs
|
|
1504
|
+
function mergeWith(target, source, merge$1) {
|
|
1505
|
+
const sourceKeys = Object.keys(source);
|
|
1506
|
+
for (let i = 0; i < sourceKeys.length; i++) {
|
|
1507
|
+
const key = sourceKeys[i];
|
|
1508
|
+
if (isUnsafeProperty(key)) continue;
|
|
1509
|
+
const sourceValue = source[key];
|
|
1510
|
+
const targetValue = target[key];
|
|
1511
|
+
const merged = merge$1(targetValue, sourceValue, key, target, source);
|
|
1512
|
+
if (merged !== void 0) target[key] = merged;
|
|
1513
|
+
else if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) target[key] = mergeWith(targetValue, sourceValue, merge$1);
|
|
1514
|
+
else target[key] = mergeWith([], sourceValue, merge$1);
|
|
1515
|
+
else if (isPlainObject(sourceValue)) if (isPlainObject(targetValue)) target[key] = mergeWith(targetValue, sourceValue, merge$1);
|
|
1516
|
+
else target[key] = mergeWith({}, sourceValue, merge$1);
|
|
1517
|
+
else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
|
|
1518
|
+
}
|
|
1519
|
+
return target;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
//#endregion
|
|
1523
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/omit.mjs
|
|
1524
|
+
function omit(obj, keys) {
|
|
1525
|
+
const result = { ...obj };
|
|
1526
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1527
|
+
const key = keys[i];
|
|
1528
|
+
delete result[key];
|
|
1529
|
+
}
|
|
1530
|
+
return result;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
//#endregion
|
|
1534
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/omitBy.mjs
|
|
1535
|
+
function omitBy(obj, shouldOmit) {
|
|
1536
|
+
const result = {};
|
|
1537
|
+
const keys = Object.keys(obj);
|
|
1538
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1539
|
+
const key = keys[i];
|
|
1540
|
+
const value = obj[key];
|
|
1541
|
+
if (!shouldOmit(value, key)) result[key] = value;
|
|
1542
|
+
}
|
|
1543
|
+
return result;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
//#endregion
|
|
1547
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/pick.mjs
|
|
1548
|
+
function pick(obj, keys) {
|
|
1549
|
+
const result = {};
|
|
1550
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1551
|
+
const key = keys[i];
|
|
1552
|
+
if (Object.hasOwn(obj, key)) result[key] = obj[key];
|
|
1553
|
+
}
|
|
1554
|
+
return result;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
//#endregion
|
|
1558
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/pickBy.mjs
|
|
1559
|
+
function pickBy(obj, shouldPick) {
|
|
1560
|
+
const result = {};
|
|
1561
|
+
const keys = Object.keys(obj);
|
|
1562
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1563
|
+
const key = keys[i];
|
|
1564
|
+
const value = obj[key];
|
|
1565
|
+
if (shouldPick(value, key)) result[key] = value;
|
|
1566
|
+
}
|
|
1567
|
+
return result;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
//#endregion
|
|
1571
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
|
|
1572
|
+
function isArray(value) {
|
|
1573
|
+
return Array.isArray(value);
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
//#endregion
|
|
1577
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
1578
|
+
function capitalize(str) {
|
|
1579
|
+
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
//#endregion
|
|
1583
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/words.mjs
|
|
1584
|
+
const CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
|
|
1585
|
+
function words(str) {
|
|
1586
|
+
return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
//#endregion
|
|
1590
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/camelCase.mjs
|
|
1591
|
+
function camelCase(str) {
|
|
1592
|
+
const words$1 = words(str);
|
|
1593
|
+
if (words$1.length === 0) return "";
|
|
1594
|
+
const [first, ...rest$1] = words$1;
|
|
1595
|
+
return `${first.toLowerCase()}${rest$1.map((word) => capitalize(word)).join("")}`;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
//#endregion
|
|
1599
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/toCamelCaseKeys.mjs
|
|
1600
|
+
function toCamelCaseKeys(obj) {
|
|
1601
|
+
if (isArray(obj)) return obj.map((item) => toCamelCaseKeys(item));
|
|
1602
|
+
if (isPlainObject(obj)) {
|
|
1603
|
+
const result = {};
|
|
1604
|
+
const keys = Object.keys(obj);
|
|
1605
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1606
|
+
const key = keys[i];
|
|
1607
|
+
const camelKey = camelCase(key);
|
|
1608
|
+
result[camelKey] = toCamelCaseKeys(obj[key]);
|
|
1609
|
+
}
|
|
1610
|
+
return result;
|
|
1611
|
+
}
|
|
1612
|
+
return obj;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
//#endregion
|
|
1616
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/toMerged.mjs
|
|
1617
|
+
function toMerged(target, source) {
|
|
1618
|
+
return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
|
|
1619
|
+
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
|
|
1620
|
+
else return mergeWith([], sourceValue, mergeRecursively);
|
|
1621
|
+
else if (isPlainObject(sourceValue)) if (isPlainObject(targetValue)) return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
|
|
1622
|
+
else return mergeWith({}, sourceValue, mergeRecursively);
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
//#endregion
|
|
1627
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
|
|
1628
|
+
function isPlainObject$1(object) {
|
|
1629
|
+
if (typeof object !== "object") return false;
|
|
1630
|
+
if (object == null) return false;
|
|
1631
|
+
if (Object.getPrototypeOf(object) === null) return true;
|
|
1632
|
+
if (Object.prototype.toString.call(object) !== "[object Object]") {
|
|
1633
|
+
const tag = object[Symbol.toStringTag];
|
|
1634
|
+
if (tag == null) return false;
|
|
1635
|
+
if (!Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable) return false;
|
|
1636
|
+
return object.toString() === `[object ${tag}]`;
|
|
1637
|
+
}
|
|
1638
|
+
let proto = object;
|
|
1639
|
+
while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
|
|
1640
|
+
return Object.getPrototypeOf(object) === proto;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
//#endregion
|
|
1644
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/snakeCase.mjs
|
|
1645
|
+
function snakeCase(str) {
|
|
1646
|
+
return words(str).map((word) => word.toLowerCase()).join("_");
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
//#endregion
|
|
1650
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/object/toSnakeCaseKeys.mjs
|
|
1651
|
+
function toSnakeCaseKeys(obj) {
|
|
1652
|
+
if (isArray(obj)) return obj.map((item) => toSnakeCaseKeys(item));
|
|
1653
|
+
if (isPlainObject$1(obj)) {
|
|
1654
|
+
const result = {};
|
|
1655
|
+
const keys = Object.keys(obj);
|
|
1656
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1657
|
+
const key = keys[i];
|
|
1658
|
+
const snakeKey = snakeCase(key);
|
|
1659
|
+
result[snakeKey] = toSnakeCaseKeys(obj[key]);
|
|
1660
|
+
}
|
|
1661
|
+
return result;
|
|
1662
|
+
}
|
|
1663
|
+
return obj;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
//#endregion
|
|
1667
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isArrayBuffer.mjs
|
|
1668
|
+
function isArrayBuffer(value) {
|
|
1669
|
+
return value instanceof ArrayBuffer;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
//#endregion
|
|
1673
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isBlob.mjs
|
|
1674
|
+
function isBlob(x) {
|
|
1675
|
+
if (typeof Blob === "undefined") return false;
|
|
1676
|
+
return x instanceof Blob;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
//#endregion
|
|
1680
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isBoolean.mjs
|
|
1681
|
+
function isBoolean(x) {
|
|
1682
|
+
return typeof x === "boolean";
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
//#endregion
|
|
1686
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isBrowser.mjs
|
|
1687
|
+
function isBrowser() {
|
|
1688
|
+
return typeof window !== "undefined" && window?.document != null;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
//#endregion
|
|
1692
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
|
|
1693
|
+
function isBuffer(x) {
|
|
1694
|
+
return typeof Buffer !== "undefined" && Buffer.isBuffer(x);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
//#endregion
|
|
1698
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isDate.mjs
|
|
1699
|
+
function isDate(value) {
|
|
1700
|
+
return value instanceof Date;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
//#endregion
|
|
1704
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/compat/util/eq.mjs
|
|
1705
|
+
function eq(value, other) {
|
|
1706
|
+
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
//#endregion
|
|
1710
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
|
|
1711
|
+
function isEqualWith(a, b, areValuesEqual) {
|
|
1712
|
+
return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
|
|
1713
|
+
}
|
|
1714
|
+
function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
|
|
1715
|
+
const result = areValuesEqual(a, b, property, aParent, bParent, stack);
|
|
1716
|
+
if (result !== void 0) return result;
|
|
1717
|
+
if (typeof a === typeof b) switch (typeof a) {
|
|
1718
|
+
case "bigint":
|
|
1719
|
+
case "string":
|
|
1720
|
+
case "boolean":
|
|
1721
|
+
case "symbol":
|
|
1722
|
+
case "undefined": return a === b;
|
|
1723
|
+
case "number": return a === b || Object.is(a, b);
|
|
1724
|
+
case "function": return a === b;
|
|
1725
|
+
case "object": return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
1726
|
+
}
|
|
1727
|
+
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
1728
|
+
}
|
|
1729
|
+
function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
1730
|
+
if (Object.is(a, b)) return true;
|
|
1731
|
+
let aTag = getTag(a);
|
|
1732
|
+
let bTag = getTag(b);
|
|
1733
|
+
if (aTag === argumentsTag) aTag = objectTag;
|
|
1734
|
+
if (bTag === argumentsTag) bTag = objectTag;
|
|
1735
|
+
if (aTag !== bTag) return false;
|
|
1736
|
+
switch (aTag) {
|
|
1737
|
+
case stringTag: return a.toString() === b.toString();
|
|
1738
|
+
case numberTag: return eq(a.valueOf(), b.valueOf());
|
|
1739
|
+
case booleanTag:
|
|
1740
|
+
case dateTag:
|
|
1741
|
+
case symbolTag: return Object.is(a.valueOf(), b.valueOf());
|
|
1742
|
+
case regexpTag: return a.source === b.source && a.flags === b.flags;
|
|
1743
|
+
case functionTag: return a === b;
|
|
1744
|
+
}
|
|
1745
|
+
stack = stack ?? /* @__PURE__ */ new Map();
|
|
1746
|
+
const aStack = stack.get(a);
|
|
1747
|
+
const bStack = stack.get(b);
|
|
1748
|
+
if (aStack != null && bStack != null) return aStack === b;
|
|
1749
|
+
stack.set(a, b);
|
|
1750
|
+
stack.set(b, a);
|
|
1751
|
+
try {
|
|
1752
|
+
switch (aTag) {
|
|
1753
|
+
case mapTag:
|
|
1754
|
+
if (a.size !== b.size) return false;
|
|
1755
|
+
for (const [key, value] of a.entries()) if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) return false;
|
|
1756
|
+
return true;
|
|
1757
|
+
case setTag: {
|
|
1758
|
+
if (a.size !== b.size) return false;
|
|
1759
|
+
const aValues = Array.from(a.values());
|
|
1760
|
+
const bValues = Array.from(b.values());
|
|
1761
|
+
for (let i = 0; i < aValues.length; i++) {
|
|
1762
|
+
const aValue = aValues[i];
|
|
1763
|
+
const index = bValues.findIndex((bValue) => {
|
|
1764
|
+
return isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual);
|
|
1765
|
+
});
|
|
1766
|
+
if (index === -1) return false;
|
|
1767
|
+
bValues.splice(index, 1);
|
|
1768
|
+
}
|
|
1769
|
+
return true;
|
|
1770
|
+
}
|
|
1771
|
+
case arrayTag:
|
|
1772
|
+
case uint8ArrayTag:
|
|
1773
|
+
case uint8ClampedArrayTag:
|
|
1774
|
+
case uint16ArrayTag:
|
|
1775
|
+
case uint32ArrayTag:
|
|
1776
|
+
case bigUint64ArrayTag:
|
|
1777
|
+
case int8ArrayTag:
|
|
1778
|
+
case int16ArrayTag:
|
|
1779
|
+
case int32ArrayTag:
|
|
1780
|
+
case bigInt64ArrayTag:
|
|
1781
|
+
case float32ArrayTag:
|
|
1782
|
+
case float64ArrayTag:
|
|
1783
|
+
if (typeof Buffer !== "undefined" && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) return false;
|
|
1784
|
+
if (a.length !== b.length) return false;
|
|
1785
|
+
for (let i = 0; i < a.length; i++) if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) return false;
|
|
1786
|
+
return true;
|
|
1787
|
+
case arrayBufferTag:
|
|
1788
|
+
if (a.byteLength !== b.byteLength) return false;
|
|
1789
|
+
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
1790
|
+
case dataViewTag:
|
|
1791
|
+
if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) return false;
|
|
1792
|
+
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
1793
|
+
case errorTag: return a.name === b.name && a.message === b.message;
|
|
1794
|
+
case objectTag: {
|
|
1795
|
+
if (!(areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a) && isPlainObject(b))) return false;
|
|
1796
|
+
const aKeys = [...Object.keys(a), ...getSymbols(a)];
|
|
1797
|
+
const bKeys = [...Object.keys(b), ...getSymbols(b)];
|
|
1798
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
1799
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
1800
|
+
const propKey = aKeys[i];
|
|
1801
|
+
const aProp = a[propKey];
|
|
1802
|
+
if (!Object.hasOwn(b, propKey)) return false;
|
|
1803
|
+
const bProp = b[propKey];
|
|
1804
|
+
if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) return false;
|
|
1805
|
+
}
|
|
1806
|
+
return true;
|
|
1807
|
+
}
|
|
1808
|
+
default: return false;
|
|
1809
|
+
}
|
|
1810
|
+
} finally {
|
|
1811
|
+
stack.delete(a);
|
|
1812
|
+
stack.delete(b);
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
//#endregion
|
|
1817
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
|
|
1818
|
+
function isEqual(a, b) {
|
|
1819
|
+
return isEqualWith(a, b, noop);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
//#endregion
|
|
1823
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isError.mjs
|
|
1824
|
+
function isError(value) {
|
|
1825
|
+
return value instanceof Error;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
//#endregion
|
|
1829
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isFile.mjs
|
|
1830
|
+
function isFile(x) {
|
|
1831
|
+
if (typeof File === "undefined") return false;
|
|
1832
|
+
return isBlob(x) && x instanceof File;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
//#endregion
|
|
1836
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isFunction.mjs
|
|
1837
|
+
function isFunction(value) {
|
|
1838
|
+
return typeof value === "function";
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
//#endregion
|
|
1842
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isJSON.mjs
|
|
1843
|
+
function isJSON(value) {
|
|
1844
|
+
if (typeof value !== "string") return false;
|
|
1845
|
+
try {
|
|
1846
|
+
JSON.parse(value);
|
|
1847
|
+
return true;
|
|
1848
|
+
} catch {
|
|
1849
|
+
return false;
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
//#endregion
|
|
1854
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isJSONValue.mjs
|
|
1855
|
+
function isJSONValue(value) {
|
|
1856
|
+
switch (typeof value) {
|
|
1857
|
+
case "object": return value === null || isJSONArray(value) || isJSONObject(value);
|
|
1858
|
+
case "string":
|
|
1859
|
+
case "number":
|
|
1860
|
+
case "boolean": return true;
|
|
1861
|
+
default: return false;
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
function isJSONArray(value) {
|
|
1865
|
+
if (!Array.isArray(value)) return false;
|
|
1866
|
+
return value.every((item) => isJSONValue(item));
|
|
1867
|
+
}
|
|
1868
|
+
function isJSONObject(obj) {
|
|
1869
|
+
if (!isPlainObject(obj)) return false;
|
|
1870
|
+
const keys = Reflect.ownKeys(obj);
|
|
1871
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1872
|
+
const key = keys[i];
|
|
1873
|
+
const value = obj[key];
|
|
1874
|
+
if (typeof key !== "string") return false;
|
|
1875
|
+
if (!isJSONValue(value)) return false;
|
|
1876
|
+
}
|
|
1877
|
+
return true;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
//#endregion
|
|
1881
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
1882
|
+
function isLength(value) {
|
|
1883
|
+
return Number.isSafeInteger(value) && value >= 0;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
//#endregion
|
|
1887
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isMap.mjs
|
|
1888
|
+
function isMap(value) {
|
|
1889
|
+
return value instanceof Map;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
//#endregion
|
|
1893
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isNil.mjs
|
|
1894
|
+
function isNil(x) {
|
|
1895
|
+
return x == null;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
//#endregion
|
|
1899
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isNode.mjs
|
|
1900
|
+
function isNode() {
|
|
1901
|
+
return typeof process !== "undefined" && process?.versions?.node != null;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
//#endregion
|
|
1905
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isNotNil.mjs
|
|
1906
|
+
function isNotNil(x) {
|
|
1907
|
+
return x != null;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
//#endregion
|
|
1911
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isNull.mjs
|
|
1912
|
+
function isNull(x) {
|
|
1913
|
+
return x === null;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
//#endregion
|
|
1917
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isPromise.mjs
|
|
1918
|
+
function isPromise(value) {
|
|
1919
|
+
return value instanceof Promise;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
//#endregion
|
|
1923
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isRegExp.mjs
|
|
1924
|
+
function isRegExp(value) {
|
|
1925
|
+
return value instanceof RegExp;
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
//#endregion
|
|
1929
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isSet.mjs
|
|
1930
|
+
function isSet(value) {
|
|
1931
|
+
return value instanceof Set;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
//#endregion
|
|
1935
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isString.mjs
|
|
1936
|
+
function isString(value) {
|
|
1937
|
+
return typeof value === "string";
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
//#endregion
|
|
1941
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isSymbol.mjs
|
|
1942
|
+
function isSymbol(value) {
|
|
1943
|
+
return typeof value === "symbol";
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
//#endregion
|
|
1947
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isUndefined.mjs
|
|
1948
|
+
function isUndefined(x) {
|
|
1949
|
+
return x === void 0;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
//#endregion
|
|
1953
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isWeakMap.mjs
|
|
1954
|
+
function isWeakMap(value) {
|
|
1955
|
+
return value instanceof WeakMap;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
//#endregion
|
|
1959
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/predicate/isWeakSet.mjs
|
|
1960
|
+
function isWeakSet(value) {
|
|
1961
|
+
return value instanceof WeakSet;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
//#endregion
|
|
1965
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/promise/mutex.mjs
|
|
1966
|
+
var Mutex = class {
|
|
1967
|
+
semaphore = new Semaphore(1);
|
|
1968
|
+
get isLocked() {
|
|
1969
|
+
return this.semaphore.available === 0;
|
|
1970
|
+
}
|
|
1971
|
+
async acquire() {
|
|
1972
|
+
return this.semaphore.acquire();
|
|
1973
|
+
}
|
|
1974
|
+
release() {
|
|
1975
|
+
this.semaphore.release();
|
|
1976
|
+
}
|
|
1977
|
+
};
|
|
1978
|
+
|
|
1979
|
+
//#endregion
|
|
1980
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/promise/timeout.mjs
|
|
1981
|
+
async function timeout(ms) {
|
|
1982
|
+
await delay(ms);
|
|
1983
|
+
throw new TimeoutError();
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
//#endregion
|
|
1987
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/promise/withTimeout.mjs
|
|
1988
|
+
async function withTimeout(run, ms) {
|
|
1989
|
+
return Promise.race([run(), timeout(ms)]);
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
//#endregion
|
|
1993
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/constantCase.mjs
|
|
1994
|
+
function constantCase(str) {
|
|
1995
|
+
return words(str).map((word) => word.toUpperCase()).join("_");
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
//#endregion
|
|
1999
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/deburr.mjs
|
|
2000
|
+
const deburrMap = new Map([
|
|
2001
|
+
["Æ", "Ae"],
|
|
2002
|
+
["Ð", "D"],
|
|
2003
|
+
["Ø", "O"],
|
|
2004
|
+
["Þ", "Th"],
|
|
2005
|
+
["ß", "ss"],
|
|
2006
|
+
["æ", "ae"],
|
|
2007
|
+
["ð", "d"],
|
|
2008
|
+
["ø", "o"],
|
|
2009
|
+
["þ", "th"],
|
|
2010
|
+
["Đ", "D"],
|
|
2011
|
+
["đ", "d"],
|
|
2012
|
+
["Ħ", "H"],
|
|
2013
|
+
["ħ", "h"],
|
|
2014
|
+
["ı", "i"],
|
|
2015
|
+
["IJ", "IJ"],
|
|
2016
|
+
["ij", "ij"],
|
|
2017
|
+
["ĸ", "k"],
|
|
2018
|
+
["Ŀ", "L"],
|
|
2019
|
+
["ŀ", "l"],
|
|
2020
|
+
["Ł", "L"],
|
|
2021
|
+
["ł", "l"],
|
|
2022
|
+
["ʼn", "'n"],
|
|
2023
|
+
["Ŋ", "N"],
|
|
2024
|
+
["ŋ", "n"],
|
|
2025
|
+
["Œ", "Oe"],
|
|
2026
|
+
["œ", "oe"],
|
|
2027
|
+
["Ŧ", "T"],
|
|
2028
|
+
["ŧ", "t"],
|
|
2029
|
+
["ſ", "s"]
|
|
2030
|
+
]);
|
|
2031
|
+
function deburr(str) {
|
|
2032
|
+
str = str.normalize("NFD");
|
|
2033
|
+
let result = "";
|
|
2034
|
+
for (let i = 0; i < str.length; i++) {
|
|
2035
|
+
const char = str[i];
|
|
2036
|
+
if (char >= "̀" && char <= "ͯ" || char >= "︠" && char <= "︣") continue;
|
|
2037
|
+
result += deburrMap.get(char) ?? char;
|
|
2038
|
+
}
|
|
2039
|
+
return result;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
//#endregion
|
|
2043
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/escape.mjs
|
|
2044
|
+
const htmlEscapes = {
|
|
2045
|
+
"&": "&",
|
|
2046
|
+
"<": "<",
|
|
2047
|
+
">": ">",
|
|
2048
|
+
"\"": """,
|
|
2049
|
+
"'": "'"
|
|
2050
|
+
};
|
|
2051
|
+
function escape(str) {
|
|
2052
|
+
return str.replace(/[&<>"']/g, (match) => htmlEscapes[match]);
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
//#endregion
|
|
2056
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/escapeRegExp.mjs
|
|
2057
|
+
function escapeRegExp(str) {
|
|
2058
|
+
return str.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
//#endregion
|
|
2062
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/kebabCase.mjs
|
|
2063
|
+
function kebabCase(str) {
|
|
2064
|
+
return words(str).map((word) => word.toLowerCase()).join("-");
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
//#endregion
|
|
2068
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/lowerCase.mjs
|
|
2069
|
+
function lowerCase(str) {
|
|
2070
|
+
return words(str).map((word) => word.toLowerCase()).join(" ");
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
//#endregion
|
|
2074
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/lowerFirst.mjs
|
|
2075
|
+
function lowerFirst(str) {
|
|
2076
|
+
return str.substring(0, 1).toLowerCase() + str.substring(1);
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
//#endregion
|
|
2080
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/pad.mjs
|
|
2081
|
+
function pad(str, length, chars = " ") {
|
|
2082
|
+
return str.padStart(Math.floor((length - str.length) / 2) + str.length, chars).padEnd(length, chars);
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
//#endregion
|
|
2086
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/pascalCase.mjs
|
|
2087
|
+
function pascalCase(str) {
|
|
2088
|
+
return words(str).map((word) => capitalize(word)).join("");
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
//#endregion
|
|
2092
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/reverseString.mjs
|
|
2093
|
+
function reverseString(value) {
|
|
2094
|
+
return [...value].reverse().join("");
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
//#endregion
|
|
2098
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/startCase.mjs
|
|
2099
|
+
function startCase(str) {
|
|
2100
|
+
const words$1 = words(str.trim());
|
|
2101
|
+
let result = "";
|
|
2102
|
+
for (let i = 0; i < words$1.length; i++) {
|
|
2103
|
+
const word = words$1[i];
|
|
2104
|
+
if (result) result += " ";
|
|
2105
|
+
result += word[0].toUpperCase() + word.slice(1).toLowerCase();
|
|
2106
|
+
}
|
|
2107
|
+
return result;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
//#endregion
|
|
2111
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/trimEnd.mjs
|
|
2112
|
+
function trimEnd(str, chars) {
|
|
2113
|
+
if (chars === void 0) return str.trimEnd();
|
|
2114
|
+
let endIndex = str.length;
|
|
2115
|
+
switch (typeof chars) {
|
|
2116
|
+
case "string":
|
|
2117
|
+
if (chars.length !== 1) throw new Error(`The 'chars' parameter should be a single character string.`);
|
|
2118
|
+
while (endIndex > 0 && str[endIndex - 1] === chars) endIndex--;
|
|
2119
|
+
break;
|
|
2120
|
+
case "object": while (endIndex > 0 && chars.includes(str[endIndex - 1])) endIndex--;
|
|
2121
|
+
}
|
|
2122
|
+
return str.substring(0, endIndex);
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
//#endregion
|
|
2126
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/trimStart.mjs
|
|
2127
|
+
function trimStart(str, chars) {
|
|
2128
|
+
if (chars === void 0) return str.trimStart();
|
|
2129
|
+
let startIndex = 0;
|
|
2130
|
+
switch (typeof chars) {
|
|
2131
|
+
case "string":
|
|
2132
|
+
while (startIndex < str.length && str[startIndex] === chars) startIndex++;
|
|
2133
|
+
break;
|
|
2134
|
+
case "object": while (startIndex < str.length && chars.includes(str[startIndex])) startIndex++;
|
|
2135
|
+
}
|
|
2136
|
+
return str.substring(startIndex);
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
//#endregion
|
|
2140
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/trim.mjs
|
|
2141
|
+
function trim(str, chars) {
|
|
2142
|
+
if (chars === void 0) return str.trim();
|
|
2143
|
+
return trimStart(trimEnd(str, chars), chars);
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
//#endregion
|
|
2147
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/unescape.mjs
|
|
2148
|
+
const htmlUnescapes = {
|
|
2149
|
+
"&": "&",
|
|
2150
|
+
"<": "<",
|
|
2151
|
+
">": ">",
|
|
2152
|
+
""": "\"",
|
|
2153
|
+
"'": "'"
|
|
2154
|
+
};
|
|
2155
|
+
function unescape(str) {
|
|
2156
|
+
return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, (match) => htmlUnescapes[match] || "'");
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
//#endregion
|
|
2160
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/upperCase.mjs
|
|
2161
|
+
function upperCase(str) {
|
|
2162
|
+
const words$1 = words(str);
|
|
2163
|
+
let result = "";
|
|
2164
|
+
for (let i = 0; i < words$1.length; i++) {
|
|
2165
|
+
result += words$1[i].toUpperCase();
|
|
2166
|
+
if (i < words$1.length - 1) result += " ";
|
|
2167
|
+
}
|
|
2168
|
+
return result;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
//#endregion
|
|
2172
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/string/upperFirst.mjs
|
|
2173
|
+
function upperFirst(str) {
|
|
2174
|
+
return str.substring(0, 1).toUpperCase() + str.substring(1);
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
//#endregion
|
|
2178
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/util/attempt.mjs
|
|
2179
|
+
function attempt(func) {
|
|
2180
|
+
try {
|
|
2181
|
+
return [null, func()];
|
|
2182
|
+
} catch (error) {
|
|
2183
|
+
return [error, null];
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
//#endregion
|
|
2188
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/util/attemptAsync.mjs
|
|
2189
|
+
async function attemptAsync(func) {
|
|
2190
|
+
try {
|
|
2191
|
+
return [null, await func()];
|
|
2192
|
+
} catch (error) {
|
|
2193
|
+
return [error, null];
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
//#endregion
|
|
2198
|
+
//#region ../../node_modules/.bun/es-toolkit@1.43.0/node_modules/es-toolkit/dist/util/invariant.mjs
|
|
2199
|
+
function invariant(condition, message) {
|
|
2200
|
+
if (condition) return;
|
|
2201
|
+
if (typeof message === "string") throw new Error(message);
|
|
2202
|
+
throw message;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
//#endregion
|
|
2206
|
+
export { AbortError, Mutex, Semaphore, TimeoutError, after, ary, invariant as assert, invariant, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, chunk, clamp, clone, cloneDeep, cloneDeepWith, compact, constantCase, countBy, curry, curryRight, debounce, deburr, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEqual, isEqualWith, isError, isFile, isFunction, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapValues, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toFilled, toMerged, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|