@makaio/framework 1.0.0-dev-1781081952714 → 1.0.0-dev-1781117225170
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/.makaio-build.json +2 -2
- package/dist/adapters/acp-client/index.d.mts +4 -4
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/index.d.mts +3 -3
- package/dist/adapters/index.mjs +1 -1
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/ajv-0JG5NFEd.mjs +8 -0
- package/dist/bus/index.d.mts +19 -19
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/common/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +3 -3
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/harness/index.d.mts +1 -1
- package/dist/contracts/host/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +237 -237
- package/dist/contracts/materialization/index.d.mts +3 -3
- package/dist/contracts/model-registry/index.d.mts +1 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
- package/dist/contracts/platform/index.d.mts +1 -1
- package/dist/contracts/provider/index.d.mts +2 -2
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/contracts/shared/index.d.mts +1 -1
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/telemetry/index.d.mts +1 -1
- package/dist/contracts/timeout/index.d.mts +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/{cursor-storage-C_WTAESV.mjs → cursor-storage-YikwAZR5.mjs} +1 -1
- package/dist/{definition-DqJOg6Lv.d.mts → definition-Cp-5xJp_.d.mts} +1 -1
- package/dist/{detached-extension-handle-CxEBQnSa.mjs → detached-extension-handle-oXbjv1tA.mjs} +1 -1
- package/dist/esm-CglYG5aA.mjs +1 -0
- package/dist/expression/index.d.mts +11 -2
- package/dist/expression/index.mjs +4 -4
- package/dist/{filesystem-service-DH9zlxyd.mjs → filesystem-service-CBJT7A5w.mjs} +1 -1
- package/dist/git/index.mjs +14 -14
- package/dist/{globby-4SrlyIlj.mjs → globby-C0lgTOUl.mjs} +1 -1
- package/dist/{index-IekAD8Gp.d.mts → index-BELri1Hy.d.mts} +8 -8
- package/dist/{index-jlQ4IhR5.d.mts → index-BY-fz0Jy.d.mts} +342 -342
- package/dist/{index-Bw_zL7Rs.d.mts → index-Bw8SkcWG.d.mts} +1 -1
- package/dist/{index-BmV60tMf.d.mts → index-C1uZLARQ.d.mts} +17 -17
- package/dist/{index-D6bw4qJp.d.mts → index-CXfWW8cP.d.mts} +98 -98
- package/dist/{index-fVgKVvta.d.mts → index-C_jIVT40.d.mts} +1 -1
- package/dist/{index-C3zfJg6s.d.mts → index-ClgVA8Rz.d.mts} +6 -6
- package/dist/{index-BheaEhyI.d.mts → index-CmGvjpUG.d.mts} +6 -6
- package/dist/{index-Bibt5jAX.d.mts → index-Dsu1tPHm.d.mts} +8 -8
- package/dist/{index-BYkOUd0x.d.mts → index-SFkbbDxs.d.mts} +1 -1
- package/dist/{index-DETxgKS2.d.mts → index-hWzUQtDn.d.mts} +8 -8
- package/dist/{index-YDfOv0GT.d.mts → index-i7o6FtS0.d.mts} +33 -7
- package/dist/{index-CwKzQuIX.d.mts → index-kLBWooVu.d.mts} +24 -24
- package/dist/{index-CNOTkyGw.d.mts → index-t9Vt4Jbb.d.mts} +306 -382
- package/dist/{index-BAhJKQLX.d.mts → index-uQl_1wQO.d.mts} +8 -8
- package/dist/{index-Db0uJ_Cg2.d.mts → index-v2kRZnfw2.d.mts} +3 -3
- package/dist/kernel/cli/index.d.mts +2 -2
- package/dist/kernel/cli/register.d.mts +1 -1
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/index.d.mts +5 -5
- package/dist/kernel/namespace/index.d.mts +1 -1
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/kernel/providers/index.d.mts +1 -1
- package/dist/kernel/window/index.d.mts +1 -1
- package/dist/{lib-B9kVK_1_.mjs → lib-CaOdTS9F.mjs} +1 -1
- package/dist/lib-IkUYa2Qs.mjs +2 -0
- package/dist/{lib-DPruLs5D.mjs → lib-zuQKc8ym.mjs} +19 -22
- package/dist/{load-extensions-C-TqCwzL.mjs → load-extensions-CwxilDj1.mjs} +1 -1
- package/dist/{load-extensions-D9nbDIiW.d.mts → load-extensions-DE8qDIqi.d.mts} +1 -1
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/{namespace-Ds6HkJEU.d.mts → namespace-13uMtVGj.d.mts} +134 -134
- package/dist/{namespace-ByyuIFpL.d.mts → namespace-CZPu_jvy.d.mts} +58 -58
- package/dist/{namespace-aBIAWxY3.d.mts → namespace-Da_dHfdm.d.mts} +10 -10
- package/dist/{namespace-BlS_i9KT.d.mts → namespace-ffepZB8Y.d.mts} +5 -5
- package/dist/node/bus-server/index.d.mts +1 -1
- package/dist/node/bus-server/index.mjs +1 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
- package/dist/node/bus-server/server-lifecycle.mjs +1 -1
- package/dist/{out-CvZYgczi.mjs → out-CiFds_ap.mjs} +1 -1
- package/dist/{package-1DS4bXg5.mjs → package-C9wOiMK9.mjs} +1 -1
- package/dist/package.json +1 -1
- package/dist/primitive-runtime-1Z3JbRUj.mjs +1 -0
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/rules/schemas.d.mts +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/extension-discovery.d.mts +1 -1
- package/dist/runtime-node/extension-validation.d.mts +1 -1
- package/dist/runtime-node/extension-validation.mjs +1 -1
- package/dist/runtime-node/index.d.mts +3 -3
- package/dist/runtime-node/index.mjs +3 -3
- package/dist/runtime-node/makaio-config.d.mts +1 -1
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-CDL_pyyM.d.mts → schema-CfuF2cXW.d.mts} +3 -3
- package/dist/{schemas-t1VR6_b_.d.mts → schemas-BiMxSTUx.d.mts} +3 -3
- package/dist/{schemas-on3_N5HP.d.mts → schemas-DdZwjeF0.d.mts} +134 -134
- package/dist/{schemas-Exixg77V2.d.mts → schemas-SPI-Y87l2.d.mts} +14 -14
- package/dist/services/adapter-runtime/index.d.mts +3 -3
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +1 -1
- package/dist/services/adapter-subsystem/index.d.mts +2 -2
- package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/capability/index.d.mts +1 -1
- package/dist/services/codebase/index.d.mts +2 -2
- package/dist/services/codebase/namespace.d.mts +1 -1
- package/dist/services/codebase/schemas.d.mts +1 -1
- package/dist/services/compression/index.d.mts +2 -2
- package/dist/services/compression/namespace.d.mts +1 -1
- package/dist/services/compression/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +4 -4
- package/dist/services/execution-target/index.d.mts +3 -3
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/filesystem/index.d.mts +1 -1
- package/dist/services/filesystem/index.mjs +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/harness/index.d.mts +3 -3
- package/dist/services/index.d.mts +120 -120
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/model-registry/index.d.mts +1 -1
- package/dist/services/preferences/index.d.mts +2 -2
- package/dist/services/preferences/schemas.d.mts +1 -1
- package/dist/services/preferences/storage-namespace.d.mts +2 -2
- package/dist/services/provider-context/index.d.mts +1 -1
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/index.d.mts +9 -9
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
- package/dist/services/session/turns/namespace.d.mts +1 -1
- package/dist/services/session-editor/index.d.mts +1 -1
- package/dist/services/settings/index.d.mts +3 -3
- package/dist/services/settings/namespace.d.mts +14 -14
- package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
- package/dist/services/settings/storage/index.d.mts +3 -3
- package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
- package/dist/services/subagent/index.d.mts +1 -1
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.d.mts +1 -1
- package/dist/services/tools/index.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/tray-menu/index.d.mts +3 -3
- package/dist/services/tray-menu/namespace.d.mts +1 -1
- package/dist/services/tray-menu/schemas.d.mts +1 -1
- package/dist/services/turn/index.d.mts +1 -1
- package/dist/services/turn/namespace.d.mts +1 -1
- package/dist/{src-Dvp41Cg2.mjs → src-DI5TcYUW.mjs} +1 -1
- package/dist/storage/drizzle/client.d.mts +1 -1
- package/dist/storage/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/index.d.mts +1 -1
- package/dist/style.css +540 -540
- package/dist/{tools-DC4KrqI1.mjs → tools-B8d8Iqqx.mjs} +1 -1
- package/dist/{types-CmMesAgR.d.mts → types-0u6hpELc.d.mts} +1 -1
- package/dist/{types-D0fPFh-D.d.mts → types-C5Uy3WEy.d.mts} +1 -1
- package/dist/{types-DiGqpZOD.d.mts → types-CZHV05Lu.d.mts} +219 -219
- package/dist/ui-components/index.d.mts +1 -1
- package/dist/ui-components/index.mjs +2 -2
- package/dist/ui-hooks/index.d.mts +6 -6
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/ui-views/index.mjs +2 -2
- package/dist/workflow-engine/index.d.mts +36 -36
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-worker-hDaQzTBl.mjs +1 -0
- package/package.json +1 -1
- package/dist/ajv-BJsabpMb.mjs +0 -8
- package/dist/esm-BdLRFEUy.mjs +0 -3
- package/dist/fast-uri-BF2Xuiop.mjs +0 -1
- package/dist/lib-aRogYLqg.mjs +0 -5
- package/dist/primitive-runtime-DcYYWy_6.mjs +0 -8
- package/dist/workflow-worker-DvP753UN.mjs +0 -1
- /package/dist/{await-trigger-DREnXCEJ.mjs → await-trigger-CHuOd5co.mjs} +0 -0
- /package/dist/{base-orchestrator-M5mAB5-w.d.mts → base-orchestrator-D-S9v5VY.d.mts} +0 -0
- /package/dist/{clients-namespace-SFk7OTop.d.mts → clients-namespace-E97p_GKF.d.mts} +0 -0
- /package/dist/{config-namespace-BzAvE2nY.d.mts → config-namespace-R_34Wfps.d.mts} +0 -0
- /package/dist/{create-static-mount-CFGo91CI.mjs → create-static-mount-B9Szo_7y.mjs} +0 -0
- /package/dist/{cross-spawn-BL6EvJBv.mjs → cross-spawn-CTptpCy4.mjs} +0 -0
- /package/dist/{definition-BSghHJpQ.d.mts → definition-CYzWS2eR.d.mts} +0 -0
- /package/dist/{definition-q6iLw11H.d.mts → definition-CvOuzWNT.d.mts} +0 -0
- /package/dist/{descriptor-to-package-CY8oc2gl.mjs → descriptor-to-package-9nrAH_D5.mjs} +0 -0
- /package/dist/{extension-discovery-CkV_VRdJ.d.mts → extension-discovery-BD1-oNU_.d.mts} +0 -0
- /package/dist/{filesystem-service-Ddngll0j.d.mts → filesystem-service-BcwRp4k1.d.mts} +0 -0
- /package/dist/{index-C6BhKRnH.d.mts → index--0CnhN0g.d.mts} +0 -0
- /package/dist/{index-BxFA1XcP.d.mts → index-9KnLzPYu.d.mts} +0 -0
- /package/dist/{index-C33Tq1ei2.d.mts → index-AZ4iLe7O2.d.mts} +0 -0
- /package/dist/{index-BnQSPC6c.d.mts → index-B6RGNugn.d.mts} +0 -0
- /package/dist/{index-CGJjA-hR2.d.mts → index-BDlpFEsp2.d.mts} +0 -0
- /package/dist/{index-BKKNWqkP2.d.mts → index-BFaeVdsn2.d.mts} +0 -0
- /package/dist/{index-CDU_s69P.d.mts → index-BV8rSmDZ.d.mts} +0 -0
- /package/dist/{index-DSV1aFgK.d.mts → index-BYxgW2i0.d.mts} +0 -0
- /package/dist/{index-D0SUjZmU.d.mts → index-C-YBGCCG.d.mts} +0 -0
- /package/dist/{index-Buo9H8RK.d.mts → index-CF7dnqQj.d.mts} +0 -0
- /package/dist/{index-BBvcP-P0.d.mts → index-CNYPKkyH.d.mts} +0 -0
- /package/dist/{index-Clut1ljB.d.mts → index-CT-zFurA.d.mts} +0 -0
- /package/dist/{index-BbCjtc3h.d.mts → index-CdNDnxXR.d.mts} +0 -0
- /package/dist/{index-Bsp0O_sI.d.mts → index-ChG8ZUNP.d.mts} +0 -0
- /package/dist/{index-9IDJUJ4X.d.mts → index-DJQew2k-.d.mts} +0 -0
- /package/dist/{index-Cz9JMjZK.d.mts → index-DNGUXQGC.d.mts} +0 -0
- /package/dist/{index-BpXX9WZJ.d.mts → index-DUPZKsd3.d.mts} +0 -0
- /package/dist/{index-BpniJgxu.d.mts → index-DUhXk_q6.d.mts} +0 -0
- /package/dist/{index-Dsq2zKvu.d.mts → index-Dbwm5Y-Q.d.mts} +0 -0
- /package/dist/{index-BCKRUuI2.d.mts → index-DfUBcVtG.d.mts} +0 -0
- /package/dist/{index-BMpRB6iE.d.mts → index-Dn9Uum3F.d.mts} +0 -0
- /package/dist/{index-D6Iyvz9T.d.mts → index-yNb7G73-.d.mts} +0 -0
- /package/dist/{index-DOfq0qqv.d.mts → index-ziQTLYUO.d.mts} +0 -0
- /package/dist/{jsonl-transport-BxNXizIm.mjs → jsonl-transport-DBHQgcIm.mjs} +0 -0
- /package/dist/{namespace-CHMszppN.d.mts → namespace-BaJJxBsI.d.mts} +0 -0
- /package/dist/{namespace-nlsvvMtD.d.mts → namespace-CTrNKkxY.d.mts} +0 -0
- /package/dist/{namespace-BBVtD1gu.d.mts → namespace-DfYutvMT.d.mts} +0 -0
- /package/dist/{namespace-D1Iw_d1P.d.mts → namespace-Dik_dNeE.d.mts} +0 -0
- /package/dist/{namespace-uuR0Fg5r.d.mts → namespace-DkDvQJhB.d.mts} +0 -0
- /package/dist/{namespace-B60mn8J-2.d.mts → namespace-DnZ4rS6T2.d.mts} +0 -0
- /package/dist/{namespace-DBKWNrk7.d.mts → namespace-DvHoeMUV.d.mts} +0 -0
- /package/dist/{namespace-XTGCaSXj.d.mts → namespace-QTFnJWHC.d.mts} +0 -0
- /package/dist/{namespace-DzVf1hVH.d.mts → namespace-TfZGCy7N.d.mts} +0 -0
- /package/dist/{namespace-CqUGzG53.d.mts → namespace-uGw5nK6d.d.mts} +0 -0
- /package/dist/{orchestrator-shared-D91Wk7z-.d.mts → orchestrator-shared-BZVeoRfr.d.mts} +0 -0
- /package/dist/{package-BSnp1zOR.d.mts → package-B2HkKyRz.d.mts} +0 -0
- /package/dist/{providers-namespace-BqWYkydw.d.mts → providers-namespace-Cc9FQ-Zt.d.mts} +0 -0
- /package/dist/{schemas-B5ToLwIs.d.mts → schemas-BD-1NGmS.d.mts} +0 -0
- /package/dist/{schemas-lqvZ6UpK.d.mts → schemas-BFeP62V4.d.mts} +0 -0
- /package/dist/{schemas-C792eVAZ.d.mts → schemas-BzK1I1eX.d.mts} +0 -0
- /package/dist/{schemas-Chyj6HuZ.d.mts → schemas-CYS6bkht.d.mts} +0 -0
- /package/dist/{schemas-Dyk7JuVl.d.mts → schemas-CsjB6gel.d.mts} +0 -0
- /package/dist/{schemas-Kq33MTPY.d.mts → schemas-DFWGb4uj.d.mts} +0 -0
- /package/dist/{schemas-DZUaRcYl.d.mts → schemas-DL_bGYyZ.d.mts} +0 -0
- /package/dist/{schemas-B77Gi8Xr.d.mts → schemas-Hy-lsBpg.d.mts} +0 -0
- /package/dist/{server-lifecycle-47mygK3E.d.mts → server-lifecycle-DVAbXQzg.d.mts} +0 -0
- /package/dist/{server-lifecycle-Cg47L59Q.mjs → server-lifecycle-JTFuSJhg.mjs} +0 -0
- /package/dist/{session-lineage-CKg6mErA.d.mts → session-lineage-CxHc3_bm.d.mts} +0 -0
- /package/dist/{src-Z3vAZJfw.mjs → src-4_2jBceX.mjs} +0 -0
- /package/dist/{storage-namespace-BXmMUd7a.d.mts → storage-namespace-I30TaZP7.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-C3XbpiP8.d.mts → storage-namespace-definition-ZNBL3v2h.d.mts} +0 -0
- /package/dist/{types-5Gw3iVpK.d.mts → types-11QnNmpW.d.mts} +0 -0
- /package/dist/{types-B0BtvVAq.d.mts → types-BKNpS4Xw.d.mts} +0 -0
- /package/dist/{types-D-bP8RRE.d.mts → types-BtMNh2FS.d.mts} +0 -0
- /package/dist/{types-BhXRffJ_.d.mts → types-yTKQTAok.d.mts} +0 -0
- /package/dist/{window-registry-CfEi_Ji4.d.mts → window-registry-QD1rTk_f.d.mts} +0 -0
package/dist/ajv-BJsabpMb.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./chunk-DTipWd-i.mjs";import{n as t,r as n,t as r}from"./fast-uri-BF2Xuiop.mjs";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;let a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=i();var n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var a=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=a;var o=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=o;let s=(0,t._)`\n`;e.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new o(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=i(),n=a();var r=i();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var o=a();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var s=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},c=class extends s{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=j(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},l=class extends s{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=j(this.rhs,e,n),this}get names(){return A(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},u=class extends l{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},d=class extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},f=class extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},p=class extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},m=class extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=j(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},h=class extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(M(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>k(e,t.names),{})}},g=class extends h{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},_=class extends h{},v=class extends g{};v.kind=`else`;var y=class e extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new v(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(N(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=j(this.condition,e,t),this}get names(){let e=super.names;return A(e,this.condition),this.else&&k(e,this.else.names),e}};y.kind=`if`;var b=class extends g{};b.kind=`for`;var x=class extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=j(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}},S=class extends b{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return A(A(super.names,this.from),this.to)}},C=class extends b{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=j(this.iterable,e,t),this}get names(){return k(super.names,this.iterable.names)}},w=class extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};w.kind=`func`;var T=class extends h{render(e){return`return `+super.render(e)}};T.kind=`return`;var E=class extends g{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}},D=class extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};D.kind=`catch`;var O=class extends g{render(e){return`finally`+super.render(e)}};O.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
2
|
-
`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new c(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new l(e,t,n))}add(t,n){return this._leafNode(new u(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new m(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new y(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new y(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new S(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new C(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new C(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new f(e))}return(e){let t=new T;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(T)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new E;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new D(e),t(e)}return n&&(this._currNode=r.finally=new O,this.code(n)),this._endBlockNode(D,O)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new w(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof y))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function k(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function A(e,n){return n instanceof t._CodeOrName?k(e,n.names):e}function j(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function M(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function N(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${z(e)}`}e.not=N;let P=R(e.operators.AND);function F(...e){return e.reduce(P)}e.and=F;let I=R(e.operators.OR);function L(...e){return e.reduce(I)}e.or=L;function R(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${z(n)} ${e} ${z(r)}`}function z(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),s=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let t=o(),n=i();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function a(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(s(e,t),!c(t,e.self.RULES.all))}e.alwaysValidSchema=a;function s(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||C(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=s;function c(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=c;function l(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=l;function u({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=u;function d(e){return m(decodeURIComponent(e))}e.unescapeFragment=d;function f(e){return encodeURIComponent(p(e))}e.escapeFragment=f;function p(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=p;function m(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=m;function h(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=h;function g({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:g({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),v(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:_}),items:g({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function _(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&v(e,r,n),r}e.evaluatedPropsToName=_;function v(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=v;let y={};function b(e,t){return e.scopeValue(`func`,{ref:t,code:y[t.code]||(y[t.code]=new n._Code(t.code))})}e.useFunc=b;var x;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(x||(e.Type=x={}));function S(e,n,r){if(e instanceof t.Name){let i=n===x.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+p(e)}e.getErrorPath=S;function C(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=C})),c=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),l=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=o(),n=s(),r=c();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:c,allErrors:l}=o,u=m(n,r,i);a??(c||l)?d(s,u):f(o,(0,t._)`[${u}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:c}=a;d(o,m(t,n,i)),s||c||f(a,r.default.vErrors)}e.reportExtraError=a;function l(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function u({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=u;function d(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function f(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}let p={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function m(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:h(e,n,r)}function h(e,t,n={}){let{gen:r,it:i}=e,a=[g(i,n),_(e,n)];return v(e,t,a),r.object(...a)}function g({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function _({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[p.schemaPath,o]}function v(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:u,propertyName:d,topSchemaRef:f,schemaPath:m}=l;a.push([p.keyword,o],[p.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),u.messages&&a.push([p.message,typeof i==`function`?i(e):i]),u.verbose&&a.push([p.schema,c],[p.parentSchema,(0,t._)`${f}${m}`],[r.default.data,s]),d&&a.push([p.propertyName,d])}})),u=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=l(),n=o(),r=c(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?u(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function s(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),u(e)):n.var(t,!0)}e.boolOrEmptySchema=s;function u(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),d=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),f=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),p=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=d(),n=f(),r=l(),i=o(),a=s();var c;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(c||(e.DataType=c={}));function u(e){let t=p(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=u;function p(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=p;function m(e,t){let{gen:r,data:i,opts:a}=e,o=g(t,a.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(s){let n=b(t,i,a.strictNumbers,c.Wrong);r.if(n,()=>{o.length?_(e,t,o):S(e)})}return s}e.coerceAndCheckDataType=m;let h=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function g(e,t){return t?e.filter(e=>h.has(e)||t===`array`&&e===`array`):[]}function _(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(b(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(h.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),S(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),v(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
|
|
3
|
-
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
4
|
-
|| (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
|
|
5
|
-
|| ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function v({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function y(e,t,n,r=c.Correct){let a=r===c.Correct?i.operators.EQ:i.operators.NEQ,o;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:o=(0,i._)`Array.isArray(${t})`;break;case`object`:o=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:o=s((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:o=s();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===c.Correct?o:(0,i.not)(o);function s(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=y;function b(e,t,n,r){if(e.length===1)return y(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,y(e,t,n,r));return o}e.checkDataTypes=b;let x={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function S(e){let t=C(e);(0,r.reportError)(t,x)}e.reportTypeError=S;function C(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),m=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assignDefaults=void 0;let t=o(),n=s();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),h=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=o(),n=s(),r=c(),i=s();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(m(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function l({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(m(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=l;function u(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=u;function d(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=d;function f(e,n,r){return(0,t._)`${d(e)}.call(${n}, ${r})`}e.isOwnProperty=f;function p(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${f(e,n,r)}`:a}e.propertyInData=p;function m(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(f(e,n,r))):a}e.noPropertyInData=m;function h(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=h;function g(e,t){return h(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=g;function _({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=_;let v=(0,t._)`new RegExp`;function y({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?v:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=y;function b(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=b;function x(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=x})),g=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=o(),n=c(),r=h(),i=l();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=p(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let u=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}e.macroKeywordCode=a;function s(e,i){let{gen:a,keyword:o,schema:s,parentSchema:c,$data:l,it:m}=e;f(m,i);let h=p(a,o,!l&&i.compile?i.compile.call(m.self,s,c,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&u(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&u(e),x(()=>d(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!l||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=s;function u(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function d(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function f({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function p(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function m(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=m;function g({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=g})),_=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=o(),n=s();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),v=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let r=s(),i=n(),a=t(),o=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function c(e,t=!0){return typeof e==`boolean`?!0:t===!0?!u(e):t?d(e)<=t:!1}e.inlineRef=c;let l=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function u(e){for(let t in e){if(l.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(u)||typeof n==`object`&&u(n))return!0}return!1}function d(e){let t=0;for(let n in e)if(n===`$ref`||(t++,!o.has(n)&&(typeof e[n]==`object`&&(0,r.eachItem)(e[n],e=>t+=d(e)),t===1/0)))return 1/0;return t}function f(e,t=``,n){return n!==!1&&(t=h(t)),p(e,e.parse(t))}e.getFullPath=f;function p(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=p;let m=/#\/?$/;function h(e){return e?e.replace(m,``):``}e.normalizeId=h;function g(e,t,n){return n=h(n),e.resolve(t,n)}e.resolveUrl=g;let _=/^[a-z_][-a-z0-9._]*$/i;function v(e,t){if(typeof e==`boolean`)return{};let{schemaId:n,uriResolver:r}=this.opts,o=h(e[n]||t),s={"":o},c=f(r,o,!1),l={},u=new Set;return a(e,{allKeys:!0},(e,t,r,i)=>{if(i===void 0)return;let a=c+t,o=s[i];typeof e[n]==`string`&&(o=f.call(this,e[n])),m.call(this,e.$anchor),m.call(this,e.$dynamicAnchor),s[t]=o;function f(t){let n=this.opts.uriResolver.resolve;if(t=h(o?n(o,t):t),u.has(t))throw p(t);u.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?d(e,r.schema,t):t!==h(a)&&(t[0]===`#`?(d(e,l[t],t),l[t]=e):this.refs[t]=a),t}function m(e){if(typeof e==`string`){if(!_.test(e))throw Error(`invalid anchor "${e}"`);f.call(this,`#${e}`)}}}),l;function d(e,t,n){if(t!==void 0&&!i(e,t))throw p(n)}function p(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=v})),y=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=u(),n=p(),r=f(),i=p(),a=m(),d=g(),h=_(),y=o(),b=c(),x=v(),S=s(),C=l();function w(e){if(N(e)&&(F(e),M(e))){O(e);return}T(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=w;function T({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,y._)`${b.default.data}, ${b.default.valCxt}`,r.$async,()=>{e.code((0,y._)`"use strict"; ${A(n,i)}`),D(e,i),e.code(a)}):e.func(t,(0,y._)`${b.default.data}, ${E(i)}`,r.$async,()=>e.code(A(n,i)).code(a))}function E(e){return(0,y._)`{${b.default.instancePath}="", ${b.default.parentData}, ${b.default.parentDataProperty}, ${b.default.rootData}=${b.default.data}${e.dynamicRef?(0,y._)`, ${b.default.dynamicAnchors}={}`:y.nil}}={}`}function D(e,t){e.if(b.default.valCxt,()=>{e.var(b.default.instancePath,(0,y._)`${b.default.valCxt}.${b.default.instancePath}`),e.var(b.default.parentData,(0,y._)`${b.default.valCxt}.${b.default.parentData}`),e.var(b.default.parentDataProperty,(0,y._)`${b.default.valCxt}.${b.default.parentDataProperty}`),e.var(b.default.rootData,(0,y._)`${b.default.valCxt}.${b.default.rootData}`),t.dynamicRef&&e.var(b.default.dynamicAnchors,(0,y._)`${b.default.valCxt}.${b.default.dynamicAnchors}`)},()=>{e.var(b.default.instancePath,(0,y._)`""`),e.var(b.default.parentData,(0,y._)`undefined`),e.var(b.default.parentDataProperty,(0,y._)`undefined`),e.var(b.default.rootData,b.default.data),t.dynamicRef&&e.var(b.default.dynamicAnchors,(0,y._)`{}`)})}function O(e){let{schema:t,opts:n,gen:r}=e;T(e,()=>{n.$comment&&t.$comment&&V(e),R(e),r.let(b.default.vErrors,null),r.let(b.default.errors,0),n.unevaluated&&k(e),I(e),H(e)})}function k(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,y._)`${n}.evaluated`),t.if((0,y._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,y._)`${e.evaluated}.props`,(0,y._)`undefined`)),t.if((0,y._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,y._)`${e.evaluated}.items`,(0,y._)`undefined`))}function A(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,y._)`/*# sourceURL=${n} */`:y.nil}function j(e,n){if(N(e)&&(F(e),M(e))){P(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function M({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function N(e){return typeof e.schema!=`boolean`}function P(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&V(e),z(e),B(e);let a=r.const(`_errs`,b.default.errors);I(e,a),r.var(t,(0,y._)`${a} === ${b.default.errors}`)}function F(e){(0,S.checkUnknownRules)(e),L(e)}function I(e,t){if(e.opts.jtd)return W(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);W(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function L(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,S.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function R(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,S.checkStrictMode)(e,`default is ignored in the schema root`)}function z(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,x.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function B(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function V({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,y._)`${b.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,y.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,y._)`${b.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function H(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,y._)`${b.default.errors} === 0`,()=>t.return(b.default.data),()=>t.throw((0,y._)`new ${i}(${b.default.vErrors})`)):(t.assign((0,y._)`${r}.errors`,b.default.vErrors),a.unevaluated&&U(e),t.return((0,y._)`${b.default.errors} === 0`))}function U({gen:e,evaluated:t,props:n,items:r}){n instanceof y.Name&&e.assign((0,y._)`${t}.props`,n),r instanceof y.Name&&e.assign((0,y._)`${t}.items`,r)}function W(e,t,n,a){let{gen:o,schema:s,data:c,allErrors:l,opts:u,self:d}=e,{RULES:f}=d;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,S.schemaHasRulesButRef)(s,f))){o.block(()=>Z(e,`$ref`,f.all.$ref.definition));return}u.jtd||ee(e,t),o.block(()=>{for(let e of f.rules)p(e);p(f.post)});function p(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,c,u.strictNumbers)),G(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):G(e,d),l||o.if((0,y._)`${b.default.errors} === ${a||0}`))}}function G(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&Z(e,n.keyword,n.definition,t.type)})}function ee(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(K(e,t),e.opts.allowUnionTypes||te(e,t),q(e,e.dataTypes))}function K(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{J(e.dataTypes,t)||Y(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),re(e,t)}}function te(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&Y(e,`use allowUnionTypes to allow union type keyword`)}function q(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>ne(t,e))&&Y(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function ne(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function J(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function re(e,t){let n=[];for(let r of e.dataTypes)J(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function Y(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,S.checkStrictMode)(e,t,e.opts.strictTypes)}var X=class{constructor(e,t,n){if((0,d.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,S.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,Q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,d.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,b.default.errors))}result(e,t,n){this.failResult((0,y.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,y.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,y._)`${t} !== undefined && (${(0,y.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?C.reportExtraError:C.reportError)(this,this.def.error,t)}$dataError(){(0,C.reportError)(this,this.def.$dataError||C.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,C.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=y.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=y.nil,t=y.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,y.or)((0,y._)`${r} === undefined`,t)),e!==y.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==y.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,y.or)(o(),s());function o(){if(n.length){if(!(t instanceof y.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,y._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return y.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,y._)`!${n}(${t})`}return y.nil}}subschema(e,t){let n=(0,h.getSubschema)(this.it,e);(0,h.extendSubschemaData)(n,this.it,e),(0,h.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return j(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=S.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=S.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,y.Name)),!0}};e.KeywordCxt=X;function Z(e,t,n,r){let i=new X(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,d.funcKeywordCode)(i,n):`macro`in n?(0,d.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,d.funcKeywordCode)(i,n)}let ie=/^\/(?:[^~]|~0|~1)*$/,ae=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Q(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return b.default.rootData;if(e[0]===`/`){if(!ie.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=b.default.rootData}else{let o=ae.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(c(`property/index`,s));return r[t-s]}if(s>t)throw Error(c(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,y._)`${a}${(0,y.getProperty)((0,S.unescapeJsonPointer)(e))}`,o=(0,y._)`${o} && ${a}`);return o;function c(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=Q})),b=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),x=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=v();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),S=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=o(),n=b(),r=c(),i=v(),a=s(),l=y();var u=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=u;function d(e){let a=m.call(this,e);if(a)return a;let o=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:u}=this.opts,d=new t.CodeGen(this.scope,{es5:s,lines:c,ownProperties:u}),f;e.$async&&(f=d.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let p=d.scopeName(`validate`);e.validateName=p;let h={gen:d,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:o,baseId:e.baseId||o,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,l.validateFunctionCode)(h),d.optimize(this.opts.code.optimize);let n=d.toString();g=`${d.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(p,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:p,validateCode:n,scopeValues:d._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=d;function f(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=g.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new u({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=p.call(this,a)}e.resolveRef=f;function p(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function m(e){for(let t of this._compilations)if(h(t,e))return t}e.getCompilingSchema=m;function h(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function g(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||_.call(this,e,t)}function _(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return S.call(this,n,e);let o=(0,i.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s==`string`){let t=_.call(this,e,s);return typeof t?.schema==`object`?S.call(this,n,t):void 0}if(typeof s?.schema==`object`){if(s.validate||d.call(this,s),o===(0,i.normalizeId)(t)){let{schema:t}=s,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new u({schema:t,schemaId:n,root:e,baseId:a})}return S.call(this,n,s)}}e.resolveSchema=_;let x=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function S(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!x.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=_.call(this,r,e)}let{schemaId:s}=this.opts;if(o||=new u({schema:n,schemaId:s,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),C=e(((e,t)=>{t.exports={$id:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,description:`Meta-schema for $data reference (JSON AnySchema extension proposal)`,type:`object`,required:[`$data`],properties:{$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},additionalProperties:!1}})),w=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=r();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),T=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=y();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return t.KeywordCxt}});var n=o();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return n.CodeGen}});let r=b(),i=x(),a=d(),c=S(),l=o(),u=v(),f=p(),m=s(),h=C(),g=w(),_=(e,t)=>new RegExp(e,t);_.code=`new RegExp`;let T=[`removeAdditional`,`useDefaults`,`coerceTypes`],E=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),D={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},O={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`};function k(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??_,a=e.uriResolver??g.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??200,loopEnum:e.loopEnum??200,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var A=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...k(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:E,es5:t,lines:n}),this.logger=R(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),j.call(this,D,e,`NOT SUPPORTED`),j.call(this,O,e,`DEPRECATED`,`warn`),this._metaOpts=I.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&F.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),N.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=h;n===`id`&&(r={...h},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=M.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new c.SchemaEnv({schema:{},schemaId:n});if(t=c.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=M.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(B.call(this,n,t),!t)return(0,m.eachItem)(n,e=>V.call(this,e)),this;U.call(this,t);let r={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,m.eachItem)(n,r.type.length===0?e=>V.call(this,e,r):e=>r.type.forEach(t=>V.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=G(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:o}=this.opts;if(typeof e==`object`)a=e[o];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let s=this._cache.get(e);if(s!==void 0)return s;n=(0,u.normalizeId)(a||n);let l=u.getSchemaRefs.call(this,e,n);return s=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:l}),this._cache.set(s.schema,s),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=s),r&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}};A.ValidationError=r.default,A.MissingRefError=i.default,e.default=A;function j(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function M(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function N(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function P(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function F(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function I(){let e={...this.opts};for(let t of T)delete e[t];return e}let L={log(){},warn(){},error(){}};function R(e){if(e===!1)return L;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}let z=/^[a-z_$][a-z0-9_$:-]*$/i;function B(e,t){let{RULES:n}=this;if((0,m.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!z.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function V(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?H.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function H(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function U(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=G(t)),e.validateSchema=this.compile(t,!0))}let W={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function G(e){return{anyOf:[e,W]}}})),E=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),D=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callRef=e.getValidate=void 0;let t=x(),n=h(),r=o(),i=c(),a=S(),l=s(),u={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:c,validateName:l,opts:u,self:p}=o,{root:m}=c;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(c===m)return f(e,l,c,c.$async);let t=n.scopeValue(`root`,{ref:m});return f(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){f(e,d(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,u.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function d(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=d;function f(e,t,a,o){let{gen:s,it:c}=e,{allErrors:u,schemaEnv:d,opts:f}=c,p=f.passContext?i.default.this:r.nil;o?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=s.let(`valid`);s.try(()=>{s.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||s.assign(i,!0)},e=>{s.if((0,r._)`!(${e} instanceof ${c.ValidationError})`,()=>s.throw(e)),g(e),u||s.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;s.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),s.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!c.opts.unevaluated)return;let t=a?.validate?.evaluated;if(c.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(c.props=l.mergeEvaluated.props(s,t.props,c.props));else{let t=s.var(`props`,(0,r._)`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,r.Name)}if(c.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(c.items=l.mergeEvaluated.items(s,t.items,c.items));else{let t=s.var(`items`,(0,r._)`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,r.Name)}}}e.callRef=f,e.default=u})),O=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=E(),n=D();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),k=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),A=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),j=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),M=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s(),r=j();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),N=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=h(),n=o();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,n.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,n._)`{pattern: ${e}}`},code(e){let{data:r,$data:i,schema:a,schemaCode:o,it:s}=e,c=s.opts.unicodeRegExp?`u`:``,l=i?(0,n._)`(new RegExp(${o}, ${c}))`:(0,t.usePattern)(e,a);e.fail$data((0,n._)`!${l}.test(${r})`)}}})),P=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),F=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=h(),n=o(),r=s();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),I=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),L=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=n();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),R=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=p(),n=o(),r=s(),i=L();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),z=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s(),r=L();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),B=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s(),r=L();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),V=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=k(),n=A(),r=M(),i=N(),a=P(),o=F(),s=I(),c=R(),l=z(),u=B();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),H=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateAdditionalItems=void 0;let t=o(),n=s(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),U=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTuple=void 0;let t=o(),n=s(),r=h(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),W=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=U();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),G=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s(),r=h(),i=H();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),ee=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),K=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=o(),n=s(),r=h();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
|
|
6
|
-
missingProperty: ${i},
|
|
7
|
-
depsCount: ${n},
|
|
8
|
-
deps: ${r}}`};let i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);c(e,t),l(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function c(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=c;function l(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=l,e.default=i})),te=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),q=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=h(),n=o(),r=c(),i=s();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),ne=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=y(),n=h(),r=s(),i=q();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),J=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=h(),n=o(),r=s(),i=s();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),re=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=s();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Y=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:h().validateUnion,error:{message:`must match a schema in anyOf`}}})),X=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Z=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=s();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),ie=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=s(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),ae=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=s();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Q=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=H(),n=W(),r=U(),i=G(),a=ee(),o=K(),s=te(),c=q(),l=ne(),u=J(),d=re(),f=Y(),p=X(),m=Z(),h=ie(),g=ae();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),oe=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),$=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=[oe().default]})),se=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),ce=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=O(),n=V(),r=Q(),i=$(),a=se();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),le=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),ue=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=o(),n=le(),r=S(),i=x(),a=s();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),de=e(((e,t)=>{t.exports={$schema:`http://json-schema.org/draft-07/schema#`,$id:`http://json-schema.org/draft-07/schema#`,title:`Core schema meta-schema`,definitions:{schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},type:[`object`,`boolean`],properties:{$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},default:!0}})),fe=e(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=T(),r=ce(),i=ue(),a=de(),s=[`/properties`],c=`http://json-schema.org/draft-07/schema`;var l=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,c,!1),this.refs[`http://json-schema.org/schema`]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv=l,t.exports=e=l,t.exports.Ajv=l,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=l;var u=y();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return u.KeywordCxt}});var d=o();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return d.CodeGen}});var f=b();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return f.default}});var p=x();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return p.default}})}));export{s as _,$ as a,V as c,T as d,S as f,c as g,y as h,se as i,O as l,b as m,ue as n,Q as o,x as p,ce as r,K as s,fe as t,D as u,o as v};
|
package/dist/esm-BdLRFEUy.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const e=(e,r,i)=>{let a=e instanceof RegExp?t(e,i):e,o=r instanceof RegExp?t(r,i):r,s=a!==null&&o!=null&&n(a,o,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+a.length,s[1]),post:i.slice(s[1]+o.length)}},t=(e,t)=>{let n=t.match(e);return n?n[0]:null},n=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},r=`\0SLASH`+Math.random()+`\0`,i=`\0OPEN`+Math.random()+`\0`,a=`\0CLOSE`+Math.random()+`\0`,o=`\0COMMA`+Math.random()+`\0`,s=`\0PERIOD`+Math.random()+`\0`,c=new RegExp(r,`g`),l=new RegExp(i,`g`),u=new RegExp(a,`g`),d=new RegExp(o,`g`),f=new RegExp(s,`g`),p=/\\\\/g,ee=/\\{/g,m=/\\}/g,h=/\\,/g,g=/\\./g;function _(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function te(e){return e.replace(p,r).replace(ee,i).replace(m,a).replace(h,o).replace(g,s)}function v(e){return e.replace(c,`\\`).replace(l,`{`).replace(u,`}`).replace(d,`,`).replace(f,`.`)}function y(t){if(!t)return[``];let n=[],r=e(`{`,`}`,t);if(!r)return t.split(`,`);let{pre:i,body:a,post:o}=r,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;let c=y(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),n.push.apply(n,s),n}function ne(e){return e?(e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),x(te(e),!0).map(v)):[]}function re(e){return`{`+e+`}`}function ie(e){return/^-?0\d/.test(e)}function ae(e,t){return e<=t}function b(e,t){return e>=t}function x(t,n){let r=[],i=e(`{`,`}`,t);if(!i)return[t];let o=i.pre,s=i.post.length?x(i.post,!1):[``];if(/\$$/.test(i.pre))for(let e=0;e<s.length;e++){let t=o+`{`+i.body+`}`+s[e];r.push(t)}else{let e=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=e||c,u=i.body.indexOf(`,`)>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(t=i.pre+`{`+i.body+a+i.post,x(t)):[t];let d;if(l)d=i.body.split(/\.\./);else if(d=y(i.body),d.length===1&&d[0]!==void 0&&(d=x(d[0],!1).map(re),d.length===1))return s.map(e=>i.pre+d[0]+e);let f;if(l&&d[0]!==void 0&&d[1]!==void 0){let e=_(d[0]),t=_(d[1]),n=Math.max(d[0].length,d[1].length),r=d.length===3&&d[2]!==void 0?Math.abs(_(d[2])):1,i=ae;t<e&&(r*=-1,i=b);let a=d.some(ie);f=[];for(let o=e;i(o,t);o+=r){let e;if(c)e=String.fromCharCode(o),e===`\\`&&(e=``);else if(e=String(o),a){let t=n-e.length;if(t>0){let n=Array(t+1).join(`0`);e=o<0?`-`+n+e.slice(1):n+e}}f.push(e)}}else{f=[];for(let e=0;e<d.length;e++)f.push.apply(f,x(d[e],!1))}for(let e=0;e<f.length;e++)for(let t=0;t<s.length;t++){let i=o+f[e]+s[t];(!n||l||i)&&r.push(i)}}return r}const S=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},oe={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},C=e=>e.replace(/[[\]\\-]/g,`\\$&`),w=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),T=e=>e.join(``),E=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(oe))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(C(d)+`-`+C(t)):t===d&&r.push(C(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(C(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(C(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[w(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+T(r)+`]`,p=`[`+(l?``:`^`)+T(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},D=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`):t?e.replace(/\[([^\/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,`$1$2`).replace(/\\([^\/{}])/g,`$1`),se=new Set([`!`,`?`,`+`,`*`,`@`]),O=e=>se.has(e),k=`(?!\\.)`,ce=new Set([`[`,`.`]),A=new Set([`..`,`.`]),j=new Set(`().*{}+?[]^$\\!`),M=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),N=`[^/]`,P=N+`*?`,F=N+`+?`;var I=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,i){let a=!1,o=!1,s=-1,c=!1;if(n.type===null){let l=r,u=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`){a=!a,u+=r;continue}if(o){l===s+1?(r===`^`||r===`!`)&&(c=!0):r===`]`&&!(l===s+2&&c)&&(o=!1),u+=r;continue}else if(r===`[`){o=!0,s=l,c=!1,u+=r;continue}if(!i.noext&&O(r)&&t.charAt(l)===`(`){n.push(u),u=``;let a=new e(r,n);l=e.#f(t,a,l,i),n.push(a);continue}u+=r}return n.push(u),l}let l=r+1,u=new e(null,n),d=[],f=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`){a=!a,f+=r;continue}if(o){l===s+1?(r===`^`||r===`!`)&&(c=!0):r===`]`&&!(l===s+2&&c)&&(o=!1),f+=r;continue}else if(r===`[`){o=!0,s=l,c=!1,f+=r;continue}if(O(r)&&t.charAt(l)===`(`){u.push(f),f=``;let n=new e(r,u);u.push(n),l=e.#f(t,n,l,i);continue}if(r===`|`){u.push(f),f=``,d.push(u),u=new e(null,n);continue}if(r===`)`)return f===``&&n.#r.length===0&&(n.#u=!0),u.push(f),f=``,n.push(...d,u),l;f+=r}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],l}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#f(t,r,0,n),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(t){let n=t??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){let r=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),i=this.#r.map(n=>{let[i,a,o,s]=typeof n==`string`?e.#m(n,this.#t,r):n.toRegExpSource(t);return this.#t=this.#t||o,this.#n=this.#n||s,i}).join(``),a=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&A.has(this.#r[0]))){let e=ce,r=n&&e.has(i.charAt(0))||i.startsWith(`\\.`)&&e.has(i.charAt(2))||i.startsWith(`\\.\\.`)&&e.has(i.charAt(4)),o=!n&&!t&&e.has(i.charAt(0));a=r?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?k:``}let o=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(o=`(?:$|\\/)`),[a+i+o,D(i),this.#t=!!this.#t,this.#n]}let r=this.type===`*`||this.type===`+`,i=this.type===`!`?`(?:(?!(?:`:`(?:`,a=this.#p(n);if(this.isStart()&&this.isEnd()&&!a&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#t=void 0,[e,D(this.toString()),!1,!1]}let o=!r||t||n?``:this.#p(!0);o===a&&(o=``),o&&(a=`(?:${a})(?:${o})*?`);let s=``;if(this.type===`!`&&this.#u)s=(this.isStart()&&!n?k:``)+F;else{let e=this.type===`!`?`))`+(this.isStart()&&!n&&!t?k:``)+P+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&o?`)`:this.type===`*`&&o?`)?`:`)${this.type}`;s=i+a+e}return[s,D(a),this.#t=!!this.#t,this.#n]}#p(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#m(e,t,n=!1){let r=!1,i=``,a=!1;for(let o=0;o<e.length;o++){let s=e.charAt(o);if(r){r=!1,i+=(j.has(s)?`\\`:``)+s;continue}if(s===`\\`){o===e.length-1?i+=`\\\\`:r=!0;continue}if(s===`[`){let[n,r,s,c]=E(e,o);if(s){i+=n,a||=r,o+=s-1,t||=c;continue}}if(s===`*`){i+=n&&e===`*`?F:P,t=!0;continue}if(s===`?`){i+=N,t=!0;continue}i+=M(s)}return[i,D(e),!!t,a]}};const L=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),R=(e,t,n={})=>(S(t),!n.nocomment&&t.charAt(0)===`#`?!1:new $(t,n).match(e)),z=/^\*+([^+@!?\*\[\(]*)$/,B=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),V=e=>t=>t.endsWith(e),H=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),U=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),W=/^\*+\.\*+$/,le=e=>!e.startsWith(`.`)&&e.includes(`.`),ue=e=>e!==`.`&&e!==`..`&&e.includes(`.`),de=/^\.\*+$/,fe=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),pe=/^\*+$/,me=e=>e.length!==0&&!e.startsWith(`.`),he=e=>e.length!==0&&e!==`.`&&e!==`..`,ge=/^\?+([^+@!?\*\[\(]*)?$/,_e=([e,t=``])=>{let n=G([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},ve=([e,t=``])=>{let n=K([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},ye=([e,t=``])=>{let n=K([e]);return t?e=>n(e)&&e.endsWith(t):n},be=([e,t=``])=>{let n=G([e]);return t?e=>n(e)&&e.endsWith(t):n},G=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},K=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},q=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,J={win32:{sep:`\\`},posix:{sep:`/`}};R.sep=q===`win32`?J.win32.sep:J.posix.sep;const Y=Symbol(`globstar **`);R.GLOBSTAR=Y,R.filter=(e,t={})=>n=>R(n,e,t);const X=(e,t={})=>Object.assign({},e,t);R.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return R;let t=R;return Object.assign((n,r,i={})=>t(n,r,X(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,X(e,n))}static defaults(n){return t.defaults(X(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,X(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,X(e,r))}},unescape:(n,r={})=>t.unescape(n,X(e,r)),escape:(n,r={})=>t.escape(n,X(e,r)),filter:(n,r={})=>t.filter(n,X(e,r)),defaults:n=>t.defaults(X(e,n)),makeRe:(n,r={})=>t.makeRe(n,X(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,X(e,r)),match:(n,r,i={})=>t.match(n,r,X(e,i)),sep:t.sep,GLOBSTAR:Y})};const Z=(e,t={})=>(S(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:ne(e));R.braceExpand=Z,R.makeRe=(e,t={})=>new $(e,t).makeRe(),R.match=(e,t,n={})=>{let r=new $(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const Q=/[?*]|[+@!]\(.*?\)|\[|\]/,xe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var $=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){S(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||q,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!Q.test(e[2]))&&!Q.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=this.options;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),r=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),i=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),a=!i&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),o=r?3:n?0:void 0,s=a?3:i?0:void 0;if(typeof o==`number`&&typeof s==`number`){let[n,r]=[e[o],t[s]];n.toLowerCase()===r.toLowerCase()&&(t[s]=n,s>o?t=t.slice(s):o>s&&(e=e.slice(o)))}}let{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(`matchOne`,this,{file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var a=0,o=0,s=e.length,c=t.length;a<s&&o<c;a++,o++){this.debug(`matchOne loop`);var l=t[o],u=e[a];if(this.debug(t,l,u),l===!1)return!1;if(l===Y){this.debug(`GLOBSTAR`,[t,l,u]);var d=a,f=o+1;if(f===c){for(this.debug(`** at the end`);a<s;a++)if(e[a]===`.`||e[a]===`..`||!r.dot&&e[a].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
2
|
-
globstar while`,e,d,t,f,p),this.matchOne(e.slice(d),t.slice(f),n))return this.debug(`globstar found match!`,d,s,p),!0;if(p===`.`||p===`..`||!r.dot&&p.charAt(0)===`.`){this.debug(`dot detected!`,e,d,t,f);break}this.debug(`globstar swallow a segment, and continue`),d++}return!!(n&&(this.debug(`
|
|
3
|
-
>>> no match, partial?`,e,d,t,f),d===s))}let i;if(typeof l==`string`?(i=u===l,this.debug(`string match`,l,u,i)):(i=l.test(u),this.debug(`pattern match`,l,u,i)),!i)return!1}if(a===s&&o===c)return!0;if(a===s)return n;if(o===c)return a===s-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return Z(this.pattern,this.options)}parse(e){S(e);let t=this.options;if(e===`**`)return Y;if(e===``)return``;let n,r=null;(n=e.match(pe))?r=t.dot?he:me:(n=e.match(z))?r=(t.nocase?t.dot?U:H:t.dot?V:B)(n[1]):(n=e.match(ge))?r=(t.nocase?t.dot?ve:_e:t.dot?ye:be)(n):(n=e.match(W))?r=t.dot?ue:le:(n=e.match(de))&&(r=fe);let i=I.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,`test`,{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?xe(e):e===Y?Y:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==Y||a===Y||(a===void 0?i!==void 0&&i!==Y?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==Y&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=Y))});let i=t.filter(e=>e!==Y);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return R.defaults(e).Minimatch}};R.AST=I,R.Minimatch=$,R.escape=L,R.unescape=D;export{R as n,$ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./chunk-DTipWd-i.mjs";var t=e(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),n=e(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),r=e(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function i(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}let a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){let r=i(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function c(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],c=!1,l=!1,u=s;for(let i=0;i<e.length;i++){let s=e[i];if(!(s===`[`||s===`]`))if(s===`:`){if(c===!0&&(l=!0),!u(a,r,n))break;if(++t>7){n.error=!0;break}i>0&&e[i-1]===`:`&&(c=!0),r.push(`:`);continue}else if(s===`%`){if(!u(a,r,n))break;u=o}else{a.push(s);continue}}return a.length&&(u===o?n.zone=a.join(``):l?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function l(e){if(u(e,`:`)<2)return{host:e,isIPV6:!1};let t=c(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function u(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function d(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}function f(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function p(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let t=l(n);n=t.isIPV6===!0?`[${t.escapedHost}]`:e.host}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:a,recomposeAuthority:p,normalizeComponentEncoding:f,removeDotSegments:d,isIPv4:r,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:i}})),i=e(((e,t)=>{let{isUUID:n}=r(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,a=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function o(e){return a.indexOf(e)!==-1}function s(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function c(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function l(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function u(e){return e.secure=s(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function d(e){if((e.port===(s(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function f(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(i);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=b(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function p(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=b(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function m(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function h(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}let g={scheme:`http`,domainHost:!0,parse:c,serialize:l},_={scheme:`https`,domainHost:g.domainHost,parse:c,serialize:l},v={scheme:`ws`,domainHost:!0,parse:u,serialize:d},y={http:g,https:_,ws:v,wss:{scheme:`wss`,domainHost:v.domainHost,parse:v.parse,serialize:v.serialize},urn:{scheme:`urn`,parse:f,serialize:p,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:m,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(y,null);function b(e){return e&&(y[e]||y[e.toLowerCase()])||void 0}t.exports={wsIsSecure:s,SCHEMES:y,isValidSchemeName:o,getSchemeHandler:b}})),a=e(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:a,recomposeAuthority:o,normalizeComponentEncoding:s,isIPv4:c,nonSimpleDomain:l}=r(),{SCHEMES:u,getSchemeHandler:d}=i();function f(e,t){return typeof e==`string`?e=g(v(e,t),t):typeof e==`object`&&(e=v(g(e,t),t)),e}function p(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=m(v(e,r),v(t,r),r,!0);return r.skipEscape=!0,g(i,r)}function m(e,t,n,r){let i={};return r||(e=v(g(e,n),n),t=v(g(t,n),n)),n||={},!n.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=a(t.path||``),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=a(t.path||``),i.query=t.query):(t.path?(t.path[0]===`/`?i.path=a(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path=`/`+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:i.path=t.path,i.path=a(i.path)),i.query=t.query):(i.path=e.path,t.query===void 0?i.query=e.query:i.query=t.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function h(e,t,n){return typeof e==`string`?(e=unescape(e),e=g(s(v(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=g(s(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=g(s(v(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=g(s(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function g(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},r=Object.assign({},t),i=[],s=d(r.scheme||n.scheme);s&&s.serialize&&s.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),r.reference!==`suffix`&&n.scheme&&i.push(n.scheme,`:`);let c=o(n);if(c!==void 0&&(r.reference!==`suffix`&&i.push(`//`),i.push(c),n.path&&n.path[0]!==`/`&&i.push(`/`)),n.path!==void 0){let e=n.path;!r.absolutePath&&(!s||!s.absolutePath)&&(e=a(e)),c===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),i.push(e)}return n.query!==void 0&&i.push(`?`,n.query),n.fragment!==void 0&&i.push(`#`,n.fragment),i.join(``)}let _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function v(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let o=e.match(_);if(o){if(i.scheme=o[1],i.userinfo=o[3],i.host=o[4],i.port=parseInt(o[5],10),i.path=o[6]||``,i.query=o[7],i.fragment=o[8],isNaN(i.port)&&(i.port=o[5]),i.host)if(c(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let t=d(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&a===!1&&l(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!t||t&&!t.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&=escape(unescape(i.path)),i.fragment&&=encodeURI(decodeURIComponent(i.fragment))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return i}let y={SCHEMES:u,normalize:f,resolve:p,resolveComponent:m,equal:h,serialize:g,parse:v};t.exports=y,t.exports.default=y,t.exports.fastUri=y}));export{n,t as r,a as t};
|