@malloy-publisher/server 0.0.250 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/dist/app/api-doc.yaml +230 -35
  2. package/dist/app/assets/{EnvironmentPage-CiuWaYTk.js → EnvironmentPage-DiUgLuCH.js} +1 -1
  3. package/dist/app/assets/{HomePage-ZXsmEAjw.js → HomePage-MhhjhnFj.js} +1 -1
  4. package/dist/app/assets/{LightMode-10iLdX5H.js → LightMode-BEyvNUzT.js} +1 -1
  5. package/dist/app/assets/{MainPage-u-IAaBdE.js → MainPage-D4Cfee9o.js} +1 -1
  6. package/dist/app/assets/{MaterializationsPage-AcoL_Rnx.js → MaterializationsPage-nGgGqwSN.js} +1 -1
  7. package/dist/app/assets/{ModelPage-BjB-p4Qn.js → ModelPage-DLAcEw-F.js} +1 -1
  8. package/dist/app/assets/{PackagePage-le809jUO.js → PackagePage-Df0ikH7w.js} +1 -1
  9. package/dist/app/assets/{RouteError-DTlqmNQd.js → RouteError-BFQwtroH.js} +1 -1
  10. package/dist/app/assets/{ThemeEditorPage-DrmSzweH.js → ThemeEditorPage-OoskoQYN.js} +1 -1
  11. package/dist/app/assets/{WorkbookPage-CIRFZXlP.js → WorkbookPage-CpFgvUDC.js} +1 -1
  12. package/dist/app/assets/{core-Cr-9Wkp3.es-YhIv13au.js → core-lb28vQkR.es-BoVSOc75.js} +1 -1
  13. package/dist/app/assets/{index-CM5d1afN.js → index-6ypuFH6g.js} +435 -436
  14. package/dist/app/assets/{index-DP4bilgp.js → index-B8pnU_V_.js} +4 -4
  15. package/dist/app/assets/{index-CSFSsus4.js → index-BImcHmVP.js} +1 -1
  16. package/dist/app/assets/{index-DzaYbhnD.js → index-DSoCUF-f.js} +438 -439
  17. package/dist/app/assets/{index-DdUOWgW6.js → index-DfqzSItA.js} +1 -1
  18. package/dist/app/index.html +1 -1
  19. package/dist/package_load_worker.mjs +237 -392
  20. package/dist/server.mjs +3992 -3120
  21. package/package.json +15 -14
@@ -3188,21 +3188,69 @@ components:
3188
3188
  - bound
3189
3189
  - live_fallback
3190
3190
  description: >-
3191
- Server-computed, read-only: whether the configured build manifest
3192
- is currently bound to this package's served models. `unbound` = no
3193
- manifest configured, so the package serves live. `bound` = a manifest
3194
- was fetched and applied, so persist sources route to their
3195
- materialized physical tables. `live_fallback` = a `manifestLocation`
3196
- is configured but the fetch/bind failed or timed out, so the package
3197
- is serving live despite intending to be materialized-routed. Lets the
3198
- caller confirm the publisher actually bound the configured manifest
3199
- rather than inferring it from logs.
3191
+ Server-computed, read-only: whether the CONFIGURED build manifest is
3192
+ currently bound to this package's served models. `unbound` = no
3193
+ manifest configured, so the package serves live. `bound` = the
3194
+ configured manifest was fetched and applied. `live_fallback` = a
3195
+ `manifestLocation` is configured but its fetch/bind failed or timed
3196
+ out, so the configured manifest is NOT applied. Lets the caller
3197
+ confirm the publisher actually bound the configured manifest rather
3198
+ than inferring it from logs.
3199
+
3200
+ `bound` reports that the bind ran to completion, NOT that any query
3201
+ routes to a materialized table: an entry whose source fails the
3202
+ eligibility gate is dropped, and the storage tier serves live under a
3203
+ `PERSIST_STORAGE_MODE` that is not `on`. Read `manifestEntryCount`
3204
+ and `storageServeBindings` for what actually bound.
3205
+
3206
+ An EMPTY manifest is a bind like any other: it is fetched and applied,
3207
+ binds nothing, and reports `bound` with `manifestEntryCount` 0 and no
3208
+ `storageServeBindings`, while the package serves entirely live. That
3209
+ combination is the signature — `bound` with neither tier populated
3210
+ means the manifest carried nothing, not that the bind was missed.
3211
+
3212
+ `live_fallback` does NOT imply the package is serving live. It says
3213
+ the configured manifest was not applied — not that nothing is. A
3214
+ failed FIRST bind leaves nothing bound (`boundManifestUri` null), but
3215
+ a failed REBIND leaves the previously bound manifest in place: its
3216
+ colocated substitutions stay compiled in, its storage serve bindings
3217
+ stay installed, and `boundManifestUri`, `manifestEntryCount` and
3218
+ `storageServeBindings` all continue to describe it.
3219
+
3220
+ That rebind guarantee covers a failure BEFORE either tier applies —
3221
+ the manifest fetch failing or timing out, which is what produces
3222
+ `live_fallback` in practice. A failure partway through the recompile,
3223
+ after the new models are installed but before the binding is
3224
+ recorded, is out of scope: the new substitutions would be live while
3225
+ these fields still described the previous manifest.
3226
+
3227
+ So the invariant to hold, whatever the status says: a non-null
3228
+ `boundManifestUri` is a LIVE reference to the manifest whose tables
3229
+ this package is currently serving from. A caller reclaiming
3230
+ superseded physical tables must treat it as one regardless of
3231
+ `manifestBindingStatus` — reading `live_fallback` as "not serving
3232
+ from manifest tables" and reclaiming that generation would drop
3233
+ tables out from under a package actively serving them.
3234
+
3235
+ Note this value is not the `live_fallback` on a query result's
3236
+ `servedFrom`, which reports that ONE query degraded to the warehouse.
3237
+ This one is about the package's binding, and as above does not imply
3238
+ any query ran live.
3200
3239
  manifestEntryCount:
3201
3240
  type: integer
3202
3241
  readOnly: true
3203
3242
  description: >-
3204
3243
  Server-computed, read-only: number of sourceEntityId -> physical-table
3205
- entries currently bound (0 when unbound or on live fallback).
3244
+ entries currently bound for the COLOCATED (same-connection tableName
3245
+ substitution) tier only. 0 when unbound, or when the bound manifest
3246
+ carried no colocated entries — so a fully bound `storage=`-only
3247
+ manifest reports `bound` with a count of 0. Corroborate a
3248
+ cross-connection bind with `storageServeBindings`, not this count.
3249
+
3250
+ Describes whatever is CURRENTLY bound, not the configured manifest: on
3251
+ a failed rebind this keeps the previously bound manifest's count (as
3252
+ `boundManifestUri` keeps its URI), because those entries really are
3253
+ still bound.
3206
3254
  boundManifestUri:
3207
3255
  type: ["string", "null"]
3208
3256
  readOnly: true
@@ -3211,6 +3259,13 @@ components:
3211
3259
  served models. Usually equals `manifestLocation`, but can differ
3212
3260
  after an in-memory auto-load following a materialization build (no
3213
3261
  URI), in which case it is null. Null whenever the package is unbound.
3262
+
3263
+ It also diverges after a FAILED REBIND: `manifestLocation` then names
3264
+ the configured manifest that did not apply, while this names the
3265
+ manifest still bound and still served from. So a non-null value here
3266
+ is a live reference regardless of `manifestBindingStatus` — see that
3267
+ field for the invariant a caller reclaiming superseded physical
3268
+ tables has to hold.
3214
3269
  storageServeBindings:
3215
3270
  type: array
3216
3271
  readOnly: true
@@ -3223,6 +3278,11 @@ components:
3223
3278
  query actually routes to these tables additionally depends on
3224
3279
  `PERSIST_STORAGE_MODE=on`; under `off`/`write-only` the bindings may
3225
3280
  be present but the serve path still runs live (see `warnings`).
3281
+
3282
+ Like `boundManifestUri`, this describes whatever is CURRENTLY bound
3283
+ rather than the configured manifest: after a failed rebind it goes on
3284
+ listing the previously bound manifest's sources, which are still
3285
+ serving.
3226
3286
  items:
3227
3287
  type: object
3228
3288
  properties:
@@ -3675,6 +3735,16 @@ components:
3675
3735
  `given:` keyword
3676
3736
  items:
3677
3737
  $ref: "#/components/schemas/Given"
3738
+ sourceText:
3739
+ type: string
3740
+ description: >-
3741
+ The model file's Malloy text, verbatim, so a client can show the
3742
+ code beside the compiled view of the same file without a second,
3743
+ differently-shaped fetch. Named `sourceText`, not `source`, because
3744
+ `sources` on this same object are the model's Malloy sources.
3745
+ Optional twice over: absent from servers that predate it, and
3746
+ omitted (with a server-side warning) when the file cannot be read,
3747
+ so a compiled model is never withheld for want of its text.
3678
3748
 
3679
3749
  View:
3680
3750
  type: object
@@ -3908,30 +3978,35 @@ components:
3908
3978
  authorize:
3909
3979
  type: array
3910
3980
  description: >-
3911
- Effective authorize expressions gating this source, declared with a
3912
- source-level `#(authorize)` annotation the source's own, or, when it
3913
- declares none, the nearest source it extends that does. (File-level
3914
- `##(authorize)` is deprecated and fails the model load, so no
3915
- expression here ever comes from one.) Each is a Malloy boolean
3916
- expression over declared givens, evaluated as a disjunction (OR) and
3917
- enforced at query time. An empty or absent list means unrestricted.
3918
-
3919
- How a denial surfaces depends on what the expression reads. An
3920
- expression referencing only givens is a whole-source gate: the request
3921
- is denied with HTTP 403 unless at least one expression evaluates true.
3922
- An expression that also references a row field of the source is a
3923
- row-level gate, applied as a filter instead such a request succeeds
3924
- with HTTP 200 and returns only the rows the expression admits, which
3925
- may be none. Do not treat a 200 with zero rows as "no gate applied".
3926
-
3927
- IMPORTANT for anything re-implementing the decision: this flat list
3928
- cannot always express the predicate. Expressions from one source are
3929
- OR-ed, but when more than one source gates the entry point (its own
3930
- gate plus one carried from the source it derives from) those sources
3931
- are AND-ed, and both sets appear here as one list. So a list of two
3932
- expressions may mean "either" or "both". Treat it as "at least these
3933
- constraints apply" use it to decide THAT a source is gated, not to
3934
- recompute WHETHER a given caller passes. Reading it as a pure
3981
+ Effective authorize expression gating this source: normally the
3982
+ author's `#(authorize)` expression as written, whether declared on
3983
+ this source itself or carried in from elsewhere (the source it
3984
+ extends, a query-source base, a composite member). Enforced at
3985
+ query time as a row filter grafted onto the source the query
3986
+ enters through. An empty or absent list means unrestricted. Where
3987
+ the gate registry cannot attribute an expression to a declaring
3988
+ source it reports `"false"` instead — a fail-closed placeholder,
3989
+ not something the author wrote, and one more reason to read this
3990
+ list only as "gated" rather than as a predicate.
3991
+
3992
+ Every gate is enforced as a row filter, whether or not its
3993
+ expression reads a row field. A caller the gate admits nowhere
3994
+ therefore gets HTTP 200 with zero rows, not a 403. Do not treat a
3995
+ 200 with zero rows as "no gate applied". A 403 means the gate
3996
+ could not be applied at all: the entry point renamed or dropped a
3997
+ field the gate reads, or a given the gate names was not supplied.
3998
+ Both are denials, but only one is visible as a status code.
3999
+
4000
+ IMPORTANT for anything re-implementing the decision: this flat
4001
+ list is not a predicate you can evaluate, and it is not a count of
4002
+ one. A source may declare at most one gate of its OWN, but the
4003
+ list flattens every gate carried in, so several elements are
4004
+ normal a query source over a composite reports the same
4005
+ authored gate twice, once from its base and once from the resolved
4006
+ member. Expressions that came from different declaring sources are
4007
+ AND-ed rather than OR-ed. Treat the list as "at least these
4008
+ constraints apply": use it to decide THAT a source is gated, not
4009
+ to recompute WHETHER a given caller passes. Reading it as a pure
3935
4010
  disjunction grants where Publisher denies.
3936
4011
 
3937
4012
  Givens are caller-asserted, so this is a boundary only behind a
@@ -4366,7 +4441,12 @@ components:
4366
4441
  actually changes; consumers should treat it as an opaque token and
4367
4442
  use the supplied value verbatim rather than deriving their own. This
4368
4443
  field is optional — when omitted, a connection identity is derived
4369
- locally instead.
4444
+ locally instead. Because the fingerprint replaces the derived digest
4445
+ verbatim, it must vary with anything that changes which data the
4446
+ connection can reach — including the impersonated identity: two
4447
+ environments on the same project with different
4448
+ impersonateServiceAccount values but the same fingerprint would
4449
+ share persisted-table ids.
4370
4450
  queryMetadata:
4371
4451
  $ref: "#/components/schemas/QueryMetadata"
4372
4452
  description: >-
@@ -4730,6 +4810,19 @@ components:
4730
4810
  serviceAccountKeyJson:
4731
4811
  type: string
4732
4812
  description: JSON string containing Google Cloud service account credentials
4813
+ impersonateServiceAccount:
4814
+ type: string
4815
+ description: >-
4816
+ Email of a Google Cloud service account this connection impersonates
4817
+ for every BigQuery call, via short-lived tokens from the IAM Service
4818
+ Account Credentials API. The publisher's own credential (ADC) must
4819
+ hold roles/iam.serviceAccountTokenCreator on the target service
4820
+ account, and iamcredentials.googleapis.com must be enabled in the
4821
+ calling project. Mutually exclusive with serviceAccountKeyJson; set
4822
+ billingProjectId explicitly, since project auto-detection resolves
4823
+ through the impersonated credential. Not supported on DuckDB
4824
+ attachedDatabases entries or federated builds from a BigQuery
4825
+ source through DuckDB, which require a service account key.
4733
4826
  maximumBytesBilled:
4734
4827
  type: string
4735
4828
  description: Maximum bytes to bill for query execution (prevents runaway costs)
@@ -5296,6 +5389,90 @@ components:
5296
5389
  description: Map of sourceID ("sourceName@modelURL") to per-source plan.
5297
5390
  additionalProperties:
5298
5391
  $ref: "#/components/schemas/PersistSourcePlan"
5392
+ refusedSources:
5393
+ type: object
5394
+ description: >-
5395
+ Map of sourceID ("sourceName@modelURL") to the sources the package
5396
+ declared `#@ persist` on but that are ineligible to build, so they
5397
+ carry no entry in `sources`. A SEPARATE collection rather than a
5398
+ field on `PersistSourcePlan`: constructing that plan entry requires
5399
+ the source's SQL and content address, and a free-parameter or
5400
+ given-referencing source cannot produce either, so a refused
5401
+ source needs a wire shape that requires neither. Lets a host
5402
+ distinguish "this package declares no persist source" (both maps
5403
+ empty) from "every persist source was refused" (empty `sources`,
5404
+ populated `refusedSources`) — silence otherwise reads as the
5405
+ former.
5406
+ additionalProperties:
5407
+ $ref: "#/components/schemas/RefusedSource"
5408
+
5409
+ RefusedSource:
5410
+ type: object
5411
+ description: >-
5412
+ One `#@ persist` source refused at compile time, and why. Computed
5413
+ from the SAME tier-appropriate eligibility assert the build path
5414
+ itself enforces (the colocated tier's post-relaxation admission for a
5415
+ proven row-level, fully-attributed `#(authorize)` gate applies here
5416
+ too), so a source this reports as refused is refused for the tier it
5417
+ would actually build under — never the unconditional
5418
+ `storage=`-destination check applied to a source that declares no
5419
+ `storage=`. A `preaggregate`-tier entry can coexist with an entry of
5420
+ the same sourceID in `BuildPlan.sources` — the one tier where
5421
+ refused-and-present-in-sources is the correct, intended state, unlike
5422
+ `storage`/`colocated` where a refusal means absence from `sources`.
5423
+ required: [name, sourceID, tier, reason, message]
5424
+ properties:
5425
+ name:
5426
+ type: string
5427
+ description: The source's declared name.
5428
+ sourceID:
5429
+ type: string
5430
+ description: "sourceName@modelURL — matches this entry's map key."
5431
+ modelPath:
5432
+ type: string
5433
+ description: >-
5434
+ Package-relative path of the `.malloy` model that declares this
5435
+ source, mirroring `PersistSourcePlan.modelPath`. Absent if the
5436
+ model path could not be resolved.
5437
+ tier:
5438
+ type: string
5439
+ enum: [storage, colocated, preaggregate]
5440
+ description: >-
5441
+ Which build path this source was evaluated against: `storage` for
5442
+ a source declaring `#@ persist storage=<ref>` (evaluated against
5443
+ the full storage-destination eligibility gate, which never
5444
+ admits an `#(authorize)`-gated source); `colocated` for a plain
5445
+ `#@ persist` (evaluated against the colocated gate, which admits
5446
+ a proven row-level, fully-attributed gate); `preaggregate` for a
5447
+ `#@ preaggregate` rollup (evaluated against the pre-aggregation
5448
+ gate, which refuses unconditionally when the rollup's base is
5449
+ `#(authorize)`-gated — rollups group away the gate column, so
5450
+ there is no row-level admission the way colocated has).
5451
+ reason:
5452
+ type: string
5453
+ enum:
5454
+ [
5455
+ free_parameter,
5456
+ given,
5457
+ authorize,
5458
+ not_duckdb_portable,
5459
+ public_surface_unknown,
5460
+ ]
5461
+ description: >-
5462
+ The bounded refusal reason. Only `free_parameter`, `given` and
5463
+ `authorize` can appear here — those are the only reasons the two
5464
+ compile-time eligibility asserts this collection is computed from
5465
+ produce. `not_duckdb_portable` is decided against the post-build
5466
+ captured schema, which does not exist at compile time, and
5467
+ `public_surface_unknown` is raised by the build-time narrowing of a
5468
+ stored table to the source's public columns; both are listed only
5469
+ because they share the enum the runtime eligibility metric uses.
5470
+ message:
5471
+ type: string
5472
+ description: >-
5473
+ The full, human-readable refusal message the eligibility assert
5474
+ produced — the same text a build attempting this source would 422
5475
+ with.
5299
5476
 
5300
5477
  BuildGraph:
5301
5478
  type: object
@@ -5937,6 +6114,24 @@ components:
5937
6114
  generation's table in place under this same name, so resolving it
5938
6115
  serves stale data rather than missing. Present for correlating the
5939
6116
  failure with the request; a consumer must never resolve or read it.
6117
+ connectionName:
6118
+ type: string
6119
+ description: >-
6120
+ The persist source's own connection (the source warehouse),
6121
+ mirroring `ManifestEntry.connectionName`. Without this a failure-only
6122
+ source carries no destination discriminator at all, so a consumer
6123
+ cannot tell a colocated failure from a `storage=` one and, lacking
6124
+ `storageDestinationName`, would resolve a destination-scoped claim
6125
+ against the wrong key.
6126
+ storageDestinationName:
6127
+ type: string
6128
+ description: >-
6129
+ When the source was instructed to build into a `storage=`
6130
+ destination, the destination name, mirroring
6131
+ `ManifestEntry.storageDestinationName`. Absent for a colocated
6132
+ failure. A consumer computes the same destination key a successful
6133
+ build would (`storageDestinationName ?? connectionName`) whether the
6134
+ source built or failed.
5940
6135
 
5941
6136
  ManifestEntry:
5942
6137
  type: object
@@ -1 +1 @@
1
- import{C as r,J as t,j as e,a3 as i,ad as o}from"./index-DP4bilgp.js";function m(){const s=r(),{environmentName:n}=t();if(n){const a=i({environmentName:n});return e.jsx(o,{onSelectPackage:s,resourceUri:a})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{m as default};
1
+ import{C as r,J as t,j as e,a3 as i,ad as o}from"./index-B8pnU_V_.js";function m(){const s=r(),{environmentName:n}=t();if(n){const a=i({environmentName:n});return e.jsx(o,{onSelectPackage:s,resourceUri:a})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{m as default};
@@ -1 +1 @@
1
- import{C as t,j as o,g as a}from"./index-DP4bilgp.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
1
+ import{C as t,j as o,g as a}from"./index-B8pnU_V_.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
@@ -1 +1 @@
1
- import{c,j as s}from"./index-DP4bilgp.js";const t=c(s.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),a=c(s.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}));export{t as D,a as L};
1
+ import{c,j as s}from"./index-B8pnU_V_.js";const t=c(s.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),a=c(s.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}));export{t as D,a as L};
@@ -1,2 +1,2 @@
1
- import{u as Pe,a as Ee,r as u,R as Ce,b as Ie,c as S,j as t,s as M,B as Me,m as J,e as oe,d as le,f as ce,h as de,i as ze,k as O,l as pe,T as U,n as Z,o as Te,p as De,q as Re,t as ue,v as Be,w as se,x as Le,y as He,z as $e,A,D as $,M as Ne,P as Ae,E as We,F as Oe,S as Ve,G as Ue,H as F,I as V,J as he,C as q,K as f,L as Fe,N as xe,O as Q,Q as Qe,U as Xe,V as ae,W as fe,X as me,Y as ge,Z as Ye,_ as _e,$ as Ke}from"./index-DP4bilgp.js";import{D as Ge,L as Je}from"./LightMode-10iLdX5H.js";function Ze(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ie(()=>{if(!n)return;const c=n(e),h=()=>{i(c.matches)};return h(),c.addEventListener("change",h),()=>{c.removeEventListener("change",h)}},[e,n]),a}const qe={...Ce},ye=qe.useSyncExternalStore;function et(e,r,n,o,s){const a=u.useCallback(()=>r,[r]),i=u.useMemo(()=>{if(s&&n)return()=>n(e).matches;if(o!==null){const{matches:p}=o(e);return()=>p}return a},[a,e,o,s,n]),[c,h]=u.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const p=n(e);return[()=>p.matches,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[a,n,e]);return ye(h,c,i)}function be(e={}){const{themeId:r}=e;return function(o,s={}){let a=Pe();a&&r&&(a=a[r]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:h=i?window.matchMedia:null,ssrMatchMedia:x=null,noSsr:p=!1}=Ee({name:"MuiUseMediaQuery",props:s,theme:a});let m=typeof o=="function"?o(a):o;return m=m.replace(/^@media( ?)/m,""),m.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
1
+ import{u as Pe,a as Ee,r as u,R as Ce,b as Ie,c as S,j as t,s as M,B as Me,m as J,e as oe,d as le,f as ce,h as de,i as ze,k as O,l as pe,T as U,n as Z,o as Te,p as De,q as Re,t as ue,v as Be,w as se,x as Le,y as He,z as $e,A,D as $,M as Ne,P as Ae,E as We,F as Oe,S as Ve,G as Ue,H as F,I as V,J as he,C as q,K as f,L as Fe,N as xe,O as Q,Q as Qe,U as Xe,V as ae,W as fe,X as me,Y as ge,Z as Ye,_ as _e,$ as Ke}from"./index-B8pnU_V_.js";import{D as Ge,L as Je}from"./LightMode-BEyvNUzT.js";function Ze(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ie(()=>{if(!n)return;const c=n(e),h=()=>{i(c.matches)};return h(),c.addEventListener("change",h),()=>{c.removeEventListener("change",h)}},[e,n]),a}const qe={...Ce},ye=qe.useSyncExternalStore;function et(e,r,n,o,s){const a=u.useCallback(()=>r,[r]),i=u.useMemo(()=>{if(s&&n)return()=>n(e).matches;if(o!==null){const{matches:p}=o(e);return()=>p}return a},[a,e,o,s,n]),[c,h]=u.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const p=n(e);return[()=>p.matches,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[a,n,e]);return ye(h,c,i)}function be(e={}){const{themeId:r}=e;return function(o,s={}){let a=Pe();a&&r&&(a=a[r]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:h=i?window.matchMedia:null,ssrMatchMedia:x=null,noSsr:p=!1}=Ee({name:"MuiUseMediaQuery",props:s,theme:a});let m=typeof o=="function"?o(a):o;return m=m.replace(/^@media( ?)/m,""),m.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
2
2
  `)),(ye!==void 0?et:Ze)(m,c,h,x,p)}}be();const tt=S(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),rt=M(Me,{name:"MuiBreadcrumbCollapsed"})(J(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:oe(e.palette.grey[200],.12)}:{backgroundColor:oe(e.palette.grey[600],.12)}}}))),nt=M(tt)({width:24,height:16});function ot(e){const{slots:r={},slotProps:n={},...o}=e,s=e;return t.jsx("li",{children:t.jsx(rt,{focusRipple:!0,...o,ownerState:s,children:t.jsx(nt,{as:r.CollapsedIcon,ownerState:s,...n.collapsedIcon})})})}function st(e){return ce("MuiBreadcrumbs",e)}const at=le("MuiBreadcrumbs",["root","ol","li","separator"]),it=e=>{const{classes:r}=e;return pe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,r)},lt=M(U,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${at.li}`]:r.li},r.root]})({}),ct=M("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),dt=M("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,r,n,o){return e.reduce((s,a,i)=>(i<e.length-1?s=s.concat(a,t.jsx(dt,{"aria-hidden":!0,className:r,ownerState:o,children:n},`separator-${i}`)):s.push(a),s),[])}const ut=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiBreadcrumbs"}),{children:s,className:a,component:i="nav",slots:c={},slotProps:h={},expandText:x="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:m=1,maxItems:y=8,separator:P="/",...H}=o,[z,E]=u.useState(!1),v={...o,component:i,expanded:z,expandText:x,itemsAfterCollapse:p,itemsBeforeCollapse:m,maxItems:y,separator:P},C=it(v),T=ze({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:v}),j=u.useRef(null),k=d=>{const w=()=>{E(!0);const b=j.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return m+p>=d.length?d:[...d.slice(0,m),t.jsx(ot,{"aria-label":x,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:T},onClick:w},"ellipsis"),...d.slice(d.length-p,d.length)]},D=u.Children.toArray(s).filter(d=>u.isValidElement(d)).map((d,w)=>t.jsx("li",{className:C.li,children:d},`child-${w}`));return t.jsx(lt,{ref:n,component:i,color:"textSecondary",className:O(C.root,a),ownerState:v,...H,children:t.jsx(ct,{className:C.ol,ref:j,ownerState:v,children:pt(z||y&&D.length<=y?D:k(D),C.separator,P,v)})})});function ht(e,r,n){const o=r.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),a=ue(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const x=a.getComputedStyle(r);i=x.getPropertyValue("-webkit-transform")||x.getPropertyValue("transform")}let c=0,h=0;if(i&&i!=="none"&&typeof i=="string"){const x=i.split("(")[1].split(")")[0].split(",");c=parseInt(x[4],10),h=parseInt(x[5],10)}return e==="left"?s?`translateX(${s.right+c-o.left}px)`:`translateX(${a.innerWidth+c-o.left}px)`:e==="right"?s?`translateX(-${o.right-s.left-c}px)`:`translateX(-${o.left+o.width-c}px)`:e==="up"?s?`translateY(${s.bottom+h-o.top}px)`:`translateY(${a.innerHeight+h-o.top}px)`:s?`translateY(-${o.top-s.top+o.height-h}px)`:`translateY(-${o.top+o.height-h}px)`}function xt(e){return typeof e=="function"?e():e}function W(e,r,n){const o=xt(n),s=ht(e,r,o);s&&(r.style.webkitTransform=s,r.style.transform=s)}const ft=u.forwardRef(function(r,n){const o=Z(),s={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:c=!0,children:h,container:x,direction:p="down",easing:m=s,in:y,onEnter:P,onEntered:H,onEntering:z,onExit:E,onExited:v,onExiting:C,style:T,timeout:j=a,TransitionComponent:k=Te,...D}=r,d=u.useRef(null),w=De(Re(h),d,n),b=l=>g=>{l&&(g===void 0?l(d.current):l(d.current,g))},X=b((l,g)=>{W(p,l,x),Le(l),P&&P(l,g)}),te=b((l,g)=>{const L=se({timeout:j,style:T,easing:m},{mode:"enter"});l.style.webkitTransition=o.transitions.create("-webkit-transform",{...L}),l.style.transition=o.transitions.create("transform",{...L}),l.style.webkitTransform="none",l.style.transform="none",z&&z(l,g)}),R=b(H),B=b(C),I=b(l=>{const g=se({timeout:j,style:T,easing:m},{mode:"exit"});l.style.webkitTransition=o.transitions.create("-webkit-transform",g),l.style.transition=o.transitions.create("transform",g),W(p,l,x),E&&E(l)}),Y=b(l=>{l.style.webkitTransition="",l.style.transition="",v&&v(l)}),_=l=>{i&&i(d.current,l)},N=u.useCallback(()=>{d.current&&W(p,d.current,x)},[p,x]);return u.useEffect(()=>{if(y||p==="down"||p==="right")return;const l=Be(()=>{d.current&&W(p,d.current,x)}),g=ue(d.current);return g.addEventListener("resize",l),()=>{l.clear(),g.removeEventListener("resize",l)}},[p,y,x]),u.useEffect(()=>{y||N()},[y,N]),t.jsx(k,{nodeRef:d,onEnter:X,onEntered:R,onEntering:te,onExit:I,onExited:Y,onExiting:B,addEndListener:_,appear:c,in:y,timeout:j,...D,children:(l,{ownerState:g,...L})=>u.cloneElement(h,{ref:w,style:{visibility:l==="exited"&&!y?"hidden":void 0,...T,...h.props.style},...L})})});function mt(e){return ce("MuiDrawer",e)}le("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ve=(e,r)=>{const{ownerState:n}=e;return[r.root,(n.variant==="permanent"||n.variant==="persistent")&&r.docked,r.modal]},gt=e=>{const{classes:r,anchor:n,variant:o}=e,s={root:["root",`anchor${$(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(n)}`,o!=="temporary"&&`paperAnchorDocked${$(n)}`]};return pe(s,mt,r)},yt=M(Ne,{name:"MuiDrawer",slot:"Root",overridesResolver:ve})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),bt=M("div",{shouldForwardProp:We,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ve})({flex:"0 0 auto"}),vt=M(Ae,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.paper,r[`paperAnchor${$(n.anchor)}`],n.variant!=="temporary"&&r[`paperAnchorDocked${$(n.anchor)}`]]}})(J(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:r})=>r.anchor==="left"&&r.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="top"&&r.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="right"&&r.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="bottom"&&r.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),je={left:"right",right:"left",top:"down",bottom:"up"};function jt(e){return["left","right"].includes(e)}function kt({direction:e},r){return e==="rtl"&&jt(r)?je[r]:r}const wt=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiDrawer"}),s=Z(),a=He(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:h,children:x,className:p,elevation:m=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:P,...H}={},onClose:z,open:E=!1,PaperProps:v={},SlideProps:C,TransitionComponent:T,transitionDuration:j=i,variant:k="temporary",slots:D={},slotProps:d={},...w}=o,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const X=kt({direction:a?"rtl":"ltr"},c),R={...o,anchor:c,elevation:m,open:E,variant:k,...w},B=gt(R),I={slots:{transition:T,...D},slotProps:{paper:v,transition:C,...d,backdrop:$e(d.backdrop||{...h,...P},{transitionDuration:j})}},[Y,_]=A("root",{ref:n,elementType:yt,className:O(B.root,B.modal,p),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...I,...w,...H},additionalProps:{open:E,onClose:z,hideBackdrop:y,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[N,l]=A("paper",{elementType:vt,shouldForwardComponentProp:!0,className:O(B.paper,v.className),ownerState:R,externalForwardedProps:I,additionalProps:{elevation:k==="temporary"?m:0,square:!0,...k==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[g,L]=A("docked",{elementType:bt,ref:n,className:O(B.root,B.docked,p),ownerState:R,externalForwardedProps:I,additionalProps:w}),[we,Se]=A("transition",{elementType:ft,ownerState:R,externalForwardedProps:I,additionalProps:{in:E,direction:je[X],timeout:j,appear:b.current}}),re=t.jsx(N,{...l,children:x});if(k==="permanent")return t.jsx(g,{...L,children:re});const ne=t.jsx(we,{...Se,children:re});return k==="persistent"?t.jsx(g,{...L,children:ne}):t.jsx(Y,{..._,children:ne})}),St=be({themeId:Oe}),Pt=S([t.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),t.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Et=S(t.jsx("path",{d:"M10.85 12.65h2.3L12 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9z"})),Ct=S(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),It=S(t.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),Mt=S(t.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),zt=S(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Tt=S(t.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),Dt=S([t.jsx("path",{d:"M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67 0 1.38-1.12 2.5-2.5 2.5m0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5 0-.16-.08-.28-.14-.35-.41-.46-.63-1.05-.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7"},"0"),t.jsx("circle",{cx:"6.5",cy:"11.5",r:"1.5"},"1"),t.jsx("circle",{cx:"9.5",cy:"7.5",r:"1.5"},"2"),t.jsx("circle",{cx:"14.5",cy:"7.5",r:"1.5"},"3"),t.jsx("circle",{cx:"17.5",cy:"11.5",r:"1.5"},"4")]);function G(e){return t.jsxs(Ve,{...e,viewBox:"0 0 24 24",sx:{fill:"none",...e.sx},children:[t.jsx("rect",{x:"3.25",y:"4.75",width:"17.5",height:"14.5",rx:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("line",{x1:"8.5",y1:"5",x2:"8.5",y2:"19",stroke:"currentColor",strokeWidth:"1.5"})]})}const Rt={light:"dark",dark:"auto",auto:"light"},ie={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Bt(){const{mode:e,userChoice:r,setMode:n,allowUserToggle:o}=Ue();if(!o)return null;const s=r??e,a=Rt[s],i=s==="auto"?Et:s==="dark"?Ge:Je;return t.jsx(F,{title:ie[s],children:t.jsx(V,{"aria-label":ie[s],onClick:()=>n(a),size:"small",children:t.jsx(i,{fontSize:"small"})})})}function K({label:e,onClick:r}){return t.jsx(Fe,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:n=>({backgroundColor:"background.paper",color:"text.primary",fontWeight:500,fontSize:"0.875rem",height:32,cursor:"pointer",borderRadius:"4px",maxWidth:320,"& .MuiChip-label":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&:hover":{backgroundColor:n.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Lt(){const e=he(),r=e["*"],n=q();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(f,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(ut,{"aria-label":"breadcrumb",separator:t.jsx(Ct,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(K,{label:e.environmentName,onClick:o=>n(`/${e.environmentName}/`,o)}),e.packageName&&t.jsx(K,{label:e.packageName,onClick:o=>n(`/${e.environmentName}/${e.packageName}/`,o)}),r&&t.jsx(K,{label:r,onClick:o=>n(`/${e.environmentName}/${e.packageName}/${r}`,o)})]})})}const Ht=260,$t=64;function ke({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){return t.jsxs(f,{sx:{height:"100dvh",width:e?$t:Ht,flexShrink:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",transition:"width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[t.jsx(Nt,{isCollapsed:e,onToggleCollapse:r,logoHeader:n}),t.jsxs(f,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx(At,{isCollapsed:e}),t.jsx(Wt,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Vt,{isCollapsed:e})]})}function Nt({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){const o=q();return n?t.jsxs(f,{sx:{height:56,display:"flex",alignItems:"center",justifyContent:"space-between",px:e?0:2,flexShrink:0},children:[n,t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(G,{fontSize:"small"})})]}):t.jsxs(f,{sx:{minHeight:56,display:"flex",flexDirection:e?"column":"row",alignItems:"center",justifyContent:e?"center":"space-between",gap:e?.5:0,py:e?1:0,px:e?0:2,flexShrink:0},children:[t.jsxs(f,{onClick:s=>o("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(f,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(U,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(F,{title:e?"Expand sidebar":"Collapse sidebar",placement:"right",children:t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(G,{fontSize:"small"})})})]})}function At({isCollapsed:e}){const n=xe().pathname==="/";return t.jsx(Q,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(zt,{fontSize:"small"}),label:"Home",to:"/",selected:n,isCollapsed:e})})}function Wt({isCollapsed:e}){const{apiClients:r}=Qe(),n=he(),{data:o}=Xe({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=o?.data??[];return s.length===0?null:t.jsxs(f,{sx:{mt:1},children:[!e&&t.jsx(U,{variant:"caption",sx:{display:"block",px:3,py:1,color:"text.secondary",fontWeight:500,textTransform:"uppercase",fontSize:"0.6875rem",letterSpacing:"0.5px"},children:"Environments"}),t.jsx(Q,{sx:{py:0},children:s.map(a=>{const i=a.name??"";return t.jsx(ee,{icon:t.jsx(Mt,{fontSize:"small"}),label:i,to:`/${i}`,selected:n.environmentName===i,isCollapsed:e},i)})})]})}function Ot({isCollapsed:e}){const n=xe().pathname.startsWith("/settings/theme");return t.jsxs(f,{sx:{mt:1},children:[!e&&t.jsx(U,{variant:"caption",sx:{display:"block",px:3,py:1,color:"text.secondary",fontWeight:500,textTransform:"uppercase",fontSize:"0.6875rem",letterSpacing:"0.5px"},children:"Settings"}),t.jsx(Q,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(Dt,{fontSize:"small"}),label:"Visualization theme",to:"/settings/theme",selected:n,isCollapsed:e})})]})}function Vt({isCollapsed:e}){const r=[{label:"Malloy Docs",href:ae.docsHome,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:ae.publishing,icon:t.jsx(Tt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(It,{fontSize:"small"}),external:!1}];return t.jsx(Q,{sx:{py:1},children:r.map(n=>t.jsx(Ut,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))})}function ee({icon:e,label:r,to:n,selected:o,isCollapsed:s}){const a=q(),i=t.jsxs(fe,{selected:o,onClick:c=>a(n,c),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:o?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ge,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(F,{title:r,placement:"right",children:t.jsx(f,{children:i})}):i}function Ut({label:e,href:r,icon:n,external:o,isCollapsed:s}){const a=t.jsxs(fe,{component:"a",href:r,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:n}),!s&&t.jsx(ge,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(F,{title:e,placement:"right",children:t.jsx(f,{children:a})}):a}function Ft({open:e,onClose:r,logoHeader:n}){return t.jsx(wt,{anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:260}},children:t.jsx(ke,{isCollapsed:!1,onToggleCollapse:r,logoHeader:n})})}function Yt({headerProps:e}){const r=Z(),n=St(r.breakpoints.up("md")),[o,s]=u.useState(!1),[a,i]=u.useState(!1);return u.useEffect(()=>{n&&o&&s(!1)},[n,o]),t.jsxs(f,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[n&&t.jsx(ke,{isCollapsed:a,onToggleCollapse:()=>i(c=>!c),logoHeader:e?.logoHeader}),t.jsxs(f,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(f,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:Ye.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(f,{sx:{display:{xs:"flex",md:"none"},alignItems:"center",mr:1},children:t.jsx(V,{size:"small",onClick:()=>s(!0),"aria-label":"Open navigation",children:t.jsx(G,{fontSize:"small"})})}),t.jsx(f,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Lt,{})}),t.jsxs(f,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Bt,{}),e?.endCap]})]}),t.jsx(f,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Ke,{}),children:t.jsx(_e,{})})})]}),t.jsx(Ft,{open:o,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
@@ -1 +1 @@
1
- import{J as r,C as t,j as e,a3 as c,ac as o}from"./index-DP4bilgp.js";function m(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{m as default};
1
+ import{J as r,C as t,j as e,a3 as c,ac as o}from"./index-B8pnU_V_.js";function m(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{m as default};
@@ -1 +1 @@
1
- import{a0 as U,C as S,a1 as C,N as k,r as p,j as e,K as r,a2 as P,a3 as N,a4 as $,J as w,Q as W,a5 as O,a6 as I,a7 as F,a8 as L,T as b,a9 as j,aa as R}from"./index-DP4bilgp.js";function M({environmentName:a,packageName:n,dashboardName:v}){const[u]=U(),h=S(),d=C(),i=k(),y=p.useMemo(()=>Object.fromEntries(u.entries()),[u]),c=p.useRef(new Set),x=p.useCallback((s,m)=>{const l=new Set([...m,...c.current]);c.current=new Set([...c.current,...Object.keys(s),...m]);const o=new URLSearchParams(i.search);for(const t of l)Object.prototype.hasOwnProperty.call(s,t)||o.delete(t);for(const[t,f]of Object.entries(s))o.set(t,f);d({search:o.toString(),hash:i.hash},{replace:!0})},[d,i]),g=p.useCallback((s,m)=>{const l=new URLSearchParams(s.givens).toString(),o=encodeURIComponent(a),t=encodeURIComponent(n),f=encodeURIComponent(s.dashboard);h(`/${o}/${t}/dashboards/${f}`+(l?`?${l}`:""),m)},[h,a,n]);return e.jsx(r,{sx:{p:3,maxWidth:1600,mx:"auto"},children:e.jsx(P,{resourceUri:N({environmentName:a,packageName:n}),dashboard:v,givens:y,onGivensChange:x,onNavigate:g,maxResultSize:1024*1024})})}function A({environmentName:a,packageName:n,notebookPath:v}){const[u]=U(),h=S(),d=C(),i=k(),y=p.useMemo(()=>Object.fromEntries(u.entries()),[u]),c=p.useRef(new Set),x=p.useCallback((s,m)=>{const l=new Set([...m,...c.current]);c.current=new Set([...c.current,...Object.keys(s),...m]);const o=new URLSearchParams(i.search);for(const t of l)Object.prototype.hasOwnProperty.call(s,t)||o.delete(t);for(const[t,f]of Object.entries(s))o.set(t,f);d({search:o.toString(),hash:i.hash},{replace:!0})},[d,i]),g=p.useCallback((s,m)=>{const l=new URLSearchParams(s.givens).toString(),o=encodeURIComponent(a),t=encodeURIComponent(n),f=encodeURIComponent(s.dashboard);h(`/${o}/${t}/dashboards/${f}`+(l?`?${l}`:""),m)},[h,a,n]);return e.jsx(r,{sx:{p:3,maxWidth:1200,mx:"auto"},children:e.jsx($,{resourceUri:N({environmentName:a,packageName:n,modelPath:v}),maxResultSize:1024*1024,givens:y,onGivensChange:x,onNavigate:h,onDrillNavigate:g})})}function T(){const a=w(),n=a["*"],{search:v,hash:u}=k(),{server:h}=W();if(!a.environmentName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})});if(!a.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});if(n?.startsWith("pages/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const x=`data-apps/${n.slice(6)}`,g=encodeURIComponent(a.environmentName),s=encodeURIComponent(a.packageName);return e.jsx(O,{to:`/${g}/${s}/${x}${v}${u}`,replace:!0})}const d={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("dashboards/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb"))return e.jsx(M,{environmentName:a.environmentName,packageName:a.packageName,dashboardName:n.slice(11)});if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const x=n.slice(10),g=N({environmentName:a.environmentName,packageName:a.packageName,modelPath:x});return e.jsx(I,{resourceUri:g})}const i=N({environmentName:a.environmentName,packageName:a.packageName,modelPath:n});if(n?.endsWith(".malloy"))return e.jsx(r,{sx:d,children:e.jsx(F,{resourceUri:i,runOnDemand:!0,maxResultSize:512*1024})});if(n?.endsWith(".malloynb"))return e.jsx(A,{environmentName:a.environmentName,packageName:a.packageName,notebookPath:n});const y=/\.[^./]+$/.test(n??""),c=L({server:h,environmentName:a.environmentName,packageName:a.packageName,path:n??""});return e.jsxs(r,{sx:d,children:[e.jsx(b,{variant:"h6",sx:{fontWeight:600},children:"Nothing to open at this path"}),e.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsx(r,{component:"span",sx:{fontFamily:j},children:n})," ","does not name a"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloy"})," ","or"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloynb"})," ","file in package"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:a.packageName}),". This address opens"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloy"})," ","and"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloynb"})," ","files."]}),y&&e.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:"public/"})," ","directory is served at ",e.jsx(R,{href:c,children:c}),"."]}),e.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsxs(R,{href:`/${encodeURIComponent(a.environmentName)}/${encodeURIComponent(a.packageName)}`,children:["Back to ",a.packageName]})," ","lists this package's models, notebooks, and data apps."]})]})}export{T as default};
1
+ import{a0 as U,C as S,a1 as C,N as k,r as p,j as e,K as r,a2 as P,a3 as N,a4 as $,J as w,Q as W,a5 as O,a6 as I,a7 as F,a8 as L,T as b,a9 as j,aa as R}from"./index-B8pnU_V_.js";function M({environmentName:a,packageName:n,dashboardName:v}){const[u]=U(),h=S(),d=C(),i=k(),y=p.useMemo(()=>Object.fromEntries(u.entries()),[u]),c=p.useRef(new Set),x=p.useCallback((s,m)=>{const l=new Set([...m,...c.current]);c.current=new Set([...c.current,...Object.keys(s),...m]);const o=new URLSearchParams(i.search);for(const t of l)Object.prototype.hasOwnProperty.call(s,t)||o.delete(t);for(const[t,f]of Object.entries(s))o.set(t,f);d({search:o.toString(),hash:i.hash},{replace:!0})},[d,i]),g=p.useCallback((s,m)=>{const l=new URLSearchParams(s.givens).toString(),o=encodeURIComponent(a),t=encodeURIComponent(n),f=encodeURIComponent(s.dashboard);h(`/${o}/${t}/dashboards/${f}`+(l?`?${l}`:""),m)},[h,a,n]);return e.jsx(r,{sx:{p:3,maxWidth:1600,mx:"auto"},children:e.jsx(P,{resourceUri:N({environmentName:a,packageName:n}),dashboard:v,givens:y,onGivensChange:x,onNavigate:g,maxResultSize:1024*1024})})}function A({environmentName:a,packageName:n,notebookPath:v}){const[u]=U(),h=S(),d=C(),i=k(),y=p.useMemo(()=>Object.fromEntries(u.entries()),[u]),c=p.useRef(new Set),x=p.useCallback((s,m)=>{const l=new Set([...m,...c.current]);c.current=new Set([...c.current,...Object.keys(s),...m]);const o=new URLSearchParams(i.search);for(const t of l)Object.prototype.hasOwnProperty.call(s,t)||o.delete(t);for(const[t,f]of Object.entries(s))o.set(t,f);d({search:o.toString(),hash:i.hash},{replace:!0})},[d,i]),g=p.useCallback((s,m)=>{const l=new URLSearchParams(s.givens).toString(),o=encodeURIComponent(a),t=encodeURIComponent(n),f=encodeURIComponent(s.dashboard);h(`/${o}/${t}/dashboards/${f}`+(l?`?${l}`:""),m)},[h,a,n]);return e.jsx(r,{sx:{p:3,maxWidth:1200,mx:"auto"},children:e.jsx($,{resourceUri:N({environmentName:a,packageName:n,modelPath:v}),maxResultSize:1024*1024,givens:y,onGivensChange:x,onNavigate:h,onDrillNavigate:g})})}function T(){const a=w(),n=a["*"],{search:v,hash:u}=k(),{server:h}=W();if(!a.environmentName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})});if(!a.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});if(n?.startsWith("pages/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const x=`data-apps/${n.slice(6)}`,g=encodeURIComponent(a.environmentName),s=encodeURIComponent(a.packageName);return e.jsx(O,{to:`/${g}/${s}/${x}${v}${u}`,replace:!0})}const d={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("dashboards/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb"))return e.jsx(M,{environmentName:a.environmentName,packageName:a.packageName,dashboardName:n.slice(11)});if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const x=n.slice(10),g=N({environmentName:a.environmentName,packageName:a.packageName,modelPath:x});return e.jsx(I,{resourceUri:g})}const i=N({environmentName:a.environmentName,packageName:a.packageName,modelPath:n});if(n?.endsWith(".malloy"))return e.jsx(r,{sx:d,children:e.jsx(F,{resourceUri:i,runOnDemand:!0,maxResultSize:512*1024})});if(n?.endsWith(".malloynb"))return e.jsx(A,{environmentName:a.environmentName,packageName:a.packageName,notebookPath:n});const y=/\.[^./]+$/.test(n??""),c=L({server:h,environmentName:a.environmentName,packageName:a.packageName,path:n??""});return e.jsxs(r,{sx:d,children:[e.jsx(b,{variant:"h6",sx:{fontWeight:600},children:"Nothing to open at this path"}),e.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsx(r,{component:"span",sx:{fontFamily:j},children:n})," ","does not name a"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloy"})," ","or"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloynb"})," ","file in package"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:a.packageName}),". This address opens"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloy"})," ","and"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:".malloynb"})," ","files."]}),y&&e.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",e.jsx(r,{component:"span",sx:{fontFamily:j},children:"public/"})," ","directory is served at ",e.jsx(R,{href:c,children:c}),"."]}),e.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsxs(R,{href:`/${encodeURIComponent(a.environmentName)}/${encodeURIComponent(a.packageName)}`,children:["Back to ",a.packageName]})," ","lists this package's models, notebooks, and data apps."]})]})}export{T as default};
@@ -1 +1 @@
1
- import{J as r,C as t,j as e,a3 as c,ab as o}from"./index-DP4bilgp.js";function l(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{l as default};
1
+ import{J as r,C as t,j as e,a3 as c,ab as o}from"./index-B8pnU_V_.js";function l(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{l as default};
@@ -1 +1 @@
1
- import{ae as o,j as r,af as s,ag as n,K as t,T as a}from"./index-DP4bilgp.js";function x(){const e=o();return console.error(e),r.jsx(s,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:r.jsxs(n,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(t,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(a,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};
1
+ import{ae as o,j as r,af as s,ag as n,K as t,T as a}from"./index-B8pnU_V_.js";function x(){const e=o();return console.error(e),r.jsx(s,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:r.jsxs(n,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(t,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(a,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};