semiotic 3.8.6 → 3.8.7

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 (213) hide show
  1. package/CLAUDE.md +33 -7
  2. package/README.md +82 -55
  3. package/ai/behaviorContracts.cjs +86 -1
  4. package/ai/componentMetadata.cjs +4 -9
  5. package/ai/dist/mcp-server.js +97 -10
  6. package/ai/examples.md +154 -7
  7. package/ai/schema.json +1611 -145
  8. package/ai/surface-manifest.json +12 -10
  9. package/ai/system-prompt.md +9 -3
  10. package/dist/{chunk-chartContainerDataAudit-FEOD5GTQ.module.min.js → chunk-chartContainerDataAudit-JDSVSKGM.module.min.js} +1 -1
  11. package/dist/chunk-chunk-2YAZHXL4.module.min.js +2 -0
  12. package/dist/{chunk-chunk-G7WFWHAD.module.min.js → chunk-chunk-4ITOQRXM.module.min.js} +1 -1
  13. package/dist/chunk-chunk-5SD6BHVW.module.min.js +2 -0
  14. package/dist/chunk-chunk-6V5VQVCT.module.min.js +2 -0
  15. package/dist/chunk-chunk-7TTBHSAG.module.min.js +2 -0
  16. package/dist/chunk-chunk-7ZDJSYKI.module.min.js +2 -0
  17. package/dist/chunk-chunk-BGHPD3RA.module.min.js +1 -0
  18. package/dist/chunk-chunk-BMRZ2SPU.module.min.js +2 -0
  19. package/dist/chunk-chunk-BNGBEY7N.module.min.js +2 -0
  20. package/dist/chunk-chunk-C7APLVQD.module.min.js +2 -0
  21. package/dist/chunk-chunk-DGWFBOGB.module.min.js +1 -0
  22. package/dist/{chunk-chunk-Q2BS46W2.module.min.js → chunk-chunk-DIVE2DRA.module.min.js} +1 -1
  23. package/dist/chunk-chunk-FBUNUIPV.module.min.js +2 -0
  24. package/dist/chunk-chunk-FQPKOAIH.module.min.js +2 -0
  25. package/dist/chunk-chunk-FRO4TRXK.module.min.js +2 -0
  26. package/dist/chunk-chunk-G7QVPZUD.module.min.js +2 -0
  27. package/dist/chunk-chunk-GBPYV4FP.module.min.js +2 -0
  28. package/dist/chunk-chunk-GU2EJIDJ.module.min.js +2 -0
  29. package/dist/chunk-chunk-J5QD4RAM.module.min.js +2 -0
  30. package/dist/{chunk-chunk-RA7JCG7D.module.min.js → chunk-chunk-JWXLNZSM.module.min.js} +1 -1
  31. package/dist/chunk-chunk-KXAFCCDB.module.min.js +2 -0
  32. package/dist/chunk-chunk-LG7YKJAK.module.min.js +2 -0
  33. package/dist/{chunk-chunk-XP3OHHFX.module.min.js → chunk-chunk-LVHDZAT3.module.min.js} +1 -1
  34. package/dist/chunk-chunk-LWITSR2O.module.min.js +2 -0
  35. package/dist/{chunk-chunk-SMVD3EQJ.module.min.js → chunk-chunk-MX35T6RX.module.min.js} +1 -1
  36. package/dist/chunk-chunk-NH4MEAKP.module.min.js +2 -0
  37. package/dist/chunk-chunk-NJETWX42.module.min.js +2 -0
  38. package/dist/chunk-chunk-NW25WGLS.module.min.js +2 -0
  39. package/dist/{chunk-chunk-GFTVACTO.module.min.js → chunk-chunk-OI7R7EJB.module.min.js} +1 -1
  40. package/dist/{chunk-chunk-OM6NWS4H.module.min.js → chunk-chunk-ONMLEXHR.module.min.js} +1 -1
  41. package/dist/chunk-chunk-OY66GCE6.module.min.js +1 -0
  42. package/dist/chunk-chunk-PZFT457G.module.min.js +1 -0
  43. package/dist/chunk-chunk-Q3WW6JGR.module.min.js +1 -0
  44. package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +1 -0
  45. package/dist/chunk-chunk-RJRM2E6P.module.min.js +1 -0
  46. package/dist/chunk-chunk-RPL7WYXI.module.min.js +1 -0
  47. package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
  48. package/dist/chunk-chunk-TSCFL235.module.min.js +1 -0
  49. package/dist/chunk-chunk-UOQRPGPK.module.min.js +2 -0
  50. package/dist/chunk-chunk-V3OAKG32.module.min.js +1 -0
  51. package/dist/chunk-chunk-WLOIUMWG.module.min.js +2 -0
  52. package/dist/chunk-chunk-XEGXX4F7.module.min.js +1 -0
  53. package/dist/chunk-chunk-XFRBLXYM.module.min.js +1 -0
  54. package/dist/chunk-chunk-Z2AJERX5.module.min.js +2 -0
  55. package/dist/chunk-chunk-ZXYDYAB7.module.min.js +2 -0
  56. package/dist/components/ai/SemioticVACPBridge.d.ts +22 -0
  57. package/dist/components/ai/chartCapabilities.d.ts +4 -3
  58. package/dist/components/ai/conversationArc.d.ts +2 -176
  59. package/dist/components/ai/conversationArcTypes.d.ts +202 -0
  60. package/dist/components/ai/readerGrounding.d.ts +12 -0
  61. package/dist/components/ai/vacpAdapter.d.ts +13 -0
  62. package/dist/components/ai/vacpAdapterActions.d.ts +2 -0
  63. package/dist/components/ai/vacpAdapterModel.d.ts +7 -0
  64. package/dist/components/ai/vacpAdapterRuntime.d.ts +26 -0
  65. package/dist/components/ai/vacpAdapterState.d.ts +3 -0
  66. package/dist/components/ai/vacpAdapterTypes.d.ts +169 -0
  67. package/dist/components/ai/vacpTypes.d.ts +160 -0
  68. package/dist/components/charts/index.d.ts +4 -4
  69. package/dist/components/charts/physics/ChainReactionChart.capability.d.ts +9 -0
  70. package/dist/components/charts/physics/ChainReactionChart.d.ts +29 -0
  71. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
  72. package/dist/components/charts/physics/EventDropChart.d.ts +7 -2
  73. package/dist/components/charts/physics/GaltonBoardChart.d.ts +1 -1
  74. package/dist/components/charts/physics/{PhysicsPileChart.capability.d.ts → PacketFlowChart.capability.d.ts} +1 -1
  75. package/dist/components/charts/physics/{PhysicalFlowChart.d.ts → PacketFlowChart.d.ts} +22 -6
  76. package/dist/components/charts/physics/PhysicsCustomChart.d.ts +1 -1
  77. package/dist/components/charts/physics/ProcessFlowChart.d.ts +7 -4
  78. package/dist/components/charts/physics/{PhysicalFlowChart.capability.d.ts → UnitPileChart.capability.d.ts} +1 -1
  79. package/dist/components/charts/physics/{PhysicsPileChart.d.ts → UnitPileChart.d.ts} +19 -6
  80. package/dist/components/charts/physics/crucibleChartProps.d.ts +1 -1
  81. package/dist/components/charts/physics/crucibleChartUtils.d.ts +9 -0
  82. package/dist/components/charts/physics/gauntletChartProps.d.ts +6 -1
  83. package/dist/components/charts/physics/gauntletTerminal.d.ts +61 -0
  84. package/dist/components/charts/physics/packetFlowSemantics.d.ts +6 -0
  85. package/dist/components/charts/physics/physicsHocUtils.d.ts +45 -2
  86. package/dist/components/charts/shared/auditAccessibilityStyles.d.ts +9 -0
  87. package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
  88. package/dist/components/charts/shared/useChartLegend.d.ts +8 -1
  89. package/dist/components/charts/shared/useChartSetup.d.ts +7 -0
  90. package/dist/components/data/portability/capabilityBinding.d.ts +41 -0
  91. package/dist/components/data/portability/index.d.ts +2 -0
  92. package/dist/components/legendLayout.d.ts +56 -0
  93. package/dist/components/recipes/geographicDotGrid.d.ts +82 -0
  94. package/dist/components/recipes/geographicGrid.d.ts +100 -0
  95. package/dist/components/recipes/physics.d.ts +2 -0
  96. package/dist/components/recipes/physicsStageGeography.d.ts +137 -0
  97. package/dist/components/semiotic-ai.d.ts +4 -3
  98. package/dist/components/semiotic-experimental-vacp.d.ts +11 -0
  99. package/dist/components/semiotic-experimental.d.ts +6 -3
  100. package/dist/components/semiotic-geo.d.ts +4 -0
  101. package/dist/components/semiotic-physics.d.ts +9 -6
  102. package/dist/components/semiotic-recipes-core.d.ts +6 -1
  103. package/dist/components/server/renderEvidence.d.ts +1 -1
  104. package/dist/components/server/renderToStaticSVG.d.ts +2 -1
  105. package/dist/components/server/serverChartConfigHeatmap.d.ts +6 -0
  106. package/dist/components/server/serverChartConfigNetworkStyles.d.ts +12 -0
  107. package/dist/components/server/serverChartConfigShared.d.ts +16 -0
  108. package/dist/components/server/serverChartConfigs.d.ts +2 -2
  109. package/dist/components/server/serverChartConfigsPhysics.d.ts +2 -2
  110. package/dist/components/server/serverChartConfigsXY.d.ts +0 -1
  111. package/dist/components/server/staticLegend.d.ts +6 -0
  112. package/dist/components/server/staticSVGChrome.d.ts +10 -2
  113. package/dist/components/server/staticValue.d.ts +8 -0
  114. package/dist/components/stream/geoPipelineConfig.d.ts +10 -0
  115. package/dist/components/stream/legendRenderer.d.ts +8 -0
  116. package/dist/components/stream/physics/PhysicsEvidence.d.ts +37 -0
  117. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +9 -0
  118. package/dist/components/stream/physics/PhysicsSettledScene.d.ts +5 -0
  119. package/dist/components/stream/physics/physicsFramePipelineConfig.d.ts +19 -0
  120. package/dist/components/stream/physics/physicsPipelineSettle.d.ts +52 -0
  121. package/dist/components/stream/physics/physicsRegionRuntime.d.ts +23 -0
  122. package/dist/components/stream/types.d.ts +2 -0
  123. package/dist/components/types/legendTypes.d.ts +17 -1
  124. package/dist/controls.min.js +1 -1
  125. package/dist/controls.module.min.js +1 -1
  126. package/dist/geo.min.js +1 -1
  127. package/dist/geo.module.min.js +1 -1
  128. package/dist/network.min.js +1 -1
  129. package/dist/network.module.min.js +1 -1
  130. package/dist/ordinal.min.js +1 -1
  131. package/dist/ordinal.module.min.js +1 -1
  132. package/dist/physics.min.js +1 -1
  133. package/dist/physics.module.min.js +1 -1
  134. package/dist/physicsWorker.js +1 -1
  135. package/dist/realtime.min.js +1 -1
  136. package/dist/realtime.module.min.js +1 -1
  137. package/dist/semiotic-ai-core.min.js +1 -1
  138. package/dist/semiotic-ai-core.module.min.js +1 -1
  139. package/dist/semiotic-ai.d.ts +4 -3
  140. package/dist/semiotic-ai.min.js +1 -1
  141. package/dist/semiotic-ai.module.min.js +1 -1
  142. package/dist/semiotic-data.module.min.js +1 -1
  143. package/dist/semiotic-experimental-vacp.d.ts +11 -0
  144. package/dist/semiotic-experimental-vacp.min.js +1 -0
  145. package/dist/semiotic-experimental-vacp.module.min.js +1 -0
  146. package/dist/semiotic-experimental.d.ts +6 -3
  147. package/dist/semiotic-experimental.min.js +2 -1
  148. package/dist/semiotic-experimental.module.min.js +2 -1
  149. package/dist/semiotic-geo.d.ts +4 -0
  150. package/dist/semiotic-physics.d.ts +9 -6
  151. package/dist/semiotic-realtime-core.min.js +1 -1
  152. package/dist/semiotic-realtime-core.module.min.js +1 -1
  153. package/dist/semiotic-recipes-core.d.ts +6 -1
  154. package/dist/semiotic-recipes-core.min.js +1 -1
  155. package/dist/semiotic-recipes-core.module.min.js +1 -1
  156. package/dist/semiotic-recipes.min.js +1 -1
  157. package/dist/semiotic-recipes.module.min.js +1 -1
  158. package/dist/semiotic-server-edge.min.js +1 -1
  159. package/dist/semiotic-server-edge.module.min.js +1 -1
  160. package/dist/semiotic-server-node.min.js +1 -1
  161. package/dist/semiotic-server-node.module.min.js +1 -1
  162. package/dist/semiotic-utils-core.min.js +1 -1
  163. package/dist/semiotic-utils-core.module.min.js +1 -1
  164. package/dist/semiotic-utils.min.js +1 -1
  165. package/dist/semiotic-utils.module.min.js +1 -1
  166. package/dist/semiotic.min.js +1 -1
  167. package/dist/semiotic.module.min.js +1 -1
  168. package/dist/server.min.js +1 -1
  169. package/dist/server.module.min.js +1 -1
  170. package/dist/xy.min.js +1 -1
  171. package/dist/xy.module.min.js +1 -1
  172. package/package.json +18 -2
  173. package/spec/README.md +94 -2
  174. package/spec/bindings/README.md +14 -3
  175. package/spec/v0.1/examples/annotation-provenance-reviewed-revision.json +27 -0
  176. package/spec/v0.1/examples/annotation-provenance-watcher-threshold.json +21 -0
  177. package/spec/v0.1/examples/audience-profile-executive-review.json +24 -0
  178. package/spec/v0.1/examples/audience-profile-incident-operators.json +42 -0
  179. package/spec/v0.1/examples/chart-capability-bar-comparison.json +48 -0
  180. package/spec/v0.1/examples/chart-capability-service-flow.json +54 -0
  181. package/dist/chunk-chunk-2CHN2TA3.module.min.js +0 -1
  182. package/dist/chunk-chunk-3SHB24AG.module.min.js +0 -1
  183. package/dist/chunk-chunk-4MMOOYTX.module.min.js +0 -2
  184. package/dist/chunk-chunk-5RKXZQ2P.module.min.js +0 -1
  185. package/dist/chunk-chunk-75OTQSXS.module.min.js +0 -1
  186. package/dist/chunk-chunk-7ALTGHK6.module.min.js +0 -1
  187. package/dist/chunk-chunk-A5GRQUOF.module.min.js +0 -1
  188. package/dist/chunk-chunk-AAF5LZAU.module.min.js +0 -2
  189. package/dist/chunk-chunk-ARZGA4LJ.module.min.js +0 -2
  190. package/dist/chunk-chunk-C4YA6TDR.module.min.js +0 -1
  191. package/dist/chunk-chunk-CAFLML4L.module.min.js +0 -2
  192. package/dist/chunk-chunk-CO5KQMGH.module.min.js +0 -1
  193. package/dist/chunk-chunk-FHBN7OEB.module.min.js +0 -2
  194. package/dist/chunk-chunk-GMQ5AYTD.module.min.js +0 -1
  195. package/dist/chunk-chunk-IP2UE74X.module.min.js +0 -1
  196. package/dist/chunk-chunk-ITDWLZXV.module.min.js +0 -2
  197. package/dist/chunk-chunk-JCG72SGW.module.min.js +0 -2
  198. package/dist/chunk-chunk-LPSPATPC.module.min.js +0 -1
  199. package/dist/chunk-chunk-PX5YQGDP.module.min.js +0 -2
  200. package/dist/chunk-chunk-QSQVBIJA.module.min.js +0 -1
  201. package/dist/chunk-chunk-RCF52Z42.module.min.js +0 -2
  202. package/dist/chunk-chunk-RNUHEXZA.module.min.js +0 -2
  203. package/dist/chunk-chunk-ROZWKEUG.module.min.js +0 -1
  204. package/dist/chunk-chunk-T2FKJD4O.module.min.js +0 -2
  205. package/dist/chunk-chunk-UDREYOLV.module.min.js +0 -1
  206. package/dist/chunk-chunk-VOWE3SAP.module.min.js +0 -2
  207. package/dist/chunk-chunk-VQPNBUSW.module.min.js +0 -2
  208. package/dist/chunk-chunk-WAWCIHFJ.module.min.js +0 -1
  209. package/dist/chunk-chunk-WYARAXHR.module.min.js +0 -2
  210. package/dist/chunk-chunk-XV3KGYTR.module.min.js +0 -2
  211. package/dist/chunk-chunk-YC2IVEPX.module.min.js +0 -1
  212. package/dist/chunk-chunk-ZOAQDIJO.module.min.js +0 -1
  213. package/dist/chunk-chunk-ZXIXAPRE.module.min.js +0 -2
@@ -1 +1 @@
1
- import{bin as e,fromVegaLite as o,groupBy as n,pivot as t,rollup as r}from"./chunk-chunk-QSQVBIJA.module.min.js";import"./chunk-chunk-JJ2OOIET.module.min.js";function s(e,o={}){if(!e||"number"!=typeof e.numRows||!e.schema)return console.warn("[semiotic/fromArrow] Expected an Arrow table with `numRows` and `schema`. Returning []."),[];const n=!1!==o.coerceBigInt,t=e.schema.fields.map(e=>e.name),r=o.fields??t,s=[];for(const o of r){const n=e.getChild(o);n?s.push({name:o,column:n}):console.warn(`[semiotic/fromArrow] Column "${o}" is not in the table schema; skipping it.`)}let i=!1;const c=Array(e.numRows);for(let o=0;e.numRows>o;o++){const e={};for(const{name:t,column:r}of s){let s=r.get(o);n&&"bigint"==typeof s&&(s<BigInt(Number.MIN_SAFE_INTEGER)||s>BigInt(Number.MAX_SAFE_INTEGER)?i||(i=!0,console.warn("[semiotic/fromArrow] A 64-bit integer exceeds Number.MAX_SAFE_INTEGER; left as bigint to avoid precision loss.")):s=Number(s)),e[t]=s}c[o]=e}return c}function i(e,o,n){const{featureKey:t,dataKey:r}=n,s=new Map;for(const e of o)s.set(e[r]+"",e);return e.map(e=>{const o=(e=>{const o=t.split(".");let n=e;for(const e of o)n=null!==n&&"object"==typeof n?n[e]:void 0;return(n??"")+""})(e),n=s.get(o);return n?{...e,properties:{...e.properties,...n}}:e})}export{e as bin,s as fromArrow,o as fromVegaLite,n as groupBy,i as mergeData,t as pivot,r as rollup};
1
+ import{bin as e,fromVegaLite as o,groupBy as n,pivot as t,rollup as r}from"./chunk-chunk-TSCFL235.module.min.js";import"./chunk-chunk-JJ2OOIET.module.min.js";function s(e,o={}){if(!e||"number"!=typeof e.numRows||!e.schema)return console.warn("[semiotic/fromArrow] Expected an Arrow table with `numRows` and `schema`. Returning []."),[];const n=!1!==o.coerceBigInt,t=e.schema.fields.map(e=>e.name),r=o.fields??t,s=[];for(const o of r){const n=e.getChild(o);n?s.push({name:o,column:n}):console.warn(`[semiotic/fromArrow] Column "${o}" is not in the table schema; skipping it.`)}let i=!1;const c=Array(e.numRows);for(let o=0;e.numRows>o;o++){const e={};for(const{name:t,column:r}of s){let s=r.get(o);n&&"bigint"==typeof s&&(s<BigInt(Number.MIN_SAFE_INTEGER)||s>BigInt(Number.MAX_SAFE_INTEGER)?i||(i=!0,console.warn("[semiotic/fromArrow] A 64-bit integer exceeds Number.MAX_SAFE_INTEGER; left as bigint to avoid precision loss.")):s=Number(s)),e[t]=s}c[o]=e}return c}function i(e,o,n){const{featureKey:t,dataKey:r}=n,s=new Map;for(const e of o)s.set(e[r]+"",e);return e.map(e=>{const o=(e=>{const o=t.split(".");let n=e;for(const e of o)n=null!==n&&"object"==typeof n?n[e]:void 0;return(n??"")+""})(e),n=s.get(o);return n?{...e,properties:{...e.properties,...n}}:e})}export{e as bin,s as fromArrow,o as fromVegaLite,n as groupBy,i as mergeData,t as pivot,r as rollup};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Pure experimental VACP 0.1.0 entry point.
3
+ *
4
+ * This subpath contains no React component or client directive, so server,
5
+ * headless, and non-React hosts can construct the semantic bridge without
6
+ * pulling in the browser-only experimental facade.
7
+ */
8
+ export { SEMIOTIC_VACP_ACTIVATE_NAVIGATION_ACTION as unstable_SEMIOTIC_VACP_ACTIVATE_NAVIGATION_ACTION, SEMIOTIC_VACP_CLEAR_SELECTION_ACTION as unstable_SEMIOTIC_VACP_CLEAR_SELECTION_ACTION, SEMIOTIC_VACP_INSPECT_DATA_ACTION as unstable_SEMIOTIC_VACP_INSPECT_DATA_ACTION, SEMIOTIC_VACP_SET_INTERVAL_SELECTION_ACTION as unstable_SEMIOTIC_VACP_SET_INTERVAL_SELECTION_ACTION, SEMIOTIC_VACP_SET_POINT_SELECTION_ACTION as unstable_SEMIOTIC_VACP_SET_POINT_SELECTION_ACTION, createSemioticVACPBridge as unstable_createSemioticVACPBridge, installSemioticVACPBridge as unstable_installSemioticVACPBridge } from "./components/ai/vacpAdapter";
9
+ export { VACP_DATA_SCHEMA_ACTION as unstable_VACP_DATA_SCHEMA_ACTION, VACP_SCHEMA_VERSION as unstable_VACP_SCHEMA_VERSION } from "./components/ai/vacpTypes";
10
+ export type { CreateSemioticVACPBridgeOptions as UnstableCreateSemioticVACPBridgeOptions, InstallSemioticVACPBridgeOptions as UnstableInstallSemioticVACPBridgeOptions, SemioticVACPBridge as UnstableSemioticVACPBridge, SemioticVACPBridgeInstallation as UnstableSemioticVACPBridgeInstallation, SemioticVACPChart as UnstableSemioticVACPChart, SemioticVACPCustomAction as UnstableSemioticVACPCustomAction, SemioticVACPDataAccess as UnstableSemioticVACPDataAccess, SemioticVACPNavigationBinding as UnstableSemioticVACPNavigationBinding, SemioticVACPRefs as UnstableSemioticVACPRefs, SemioticVACPSelectionActions as UnstableSemioticVACPSelectionActions, SemioticVACPSelectionBinding as UnstableSemioticVACPSelectionBinding, SemioticVACPSelectionMode as UnstableSemioticVACPSelectionMode } from "./components/ai/vacpAdapter";
11
+ export type { VacpActionCall as UnstableVacpActionCall, VacpActionDescriptor as UnstableVacpActionDescriptor, VacpActionResult as UnstableVacpActionResult, VacpCapabilitiesRequest as UnstableVacpCapabilitiesRequest, VacpCapabilitiesSnapshot as UnstableVacpCapabilitiesSnapshot, VacpDataSchemaColumn as UnstableVacpDataSchemaColumn, VacpDataSchemaDetail as UnstableVacpDataSchemaDetail, VacpDataSchemaParams as UnstableVacpDataSchemaParams, VacpDataSchemaResult as UnstableVacpDataSchemaResult, VacpEdge as UnstableVacpEdge, VacpEdgeKind as UnstableVacpEdgeKind, VacpGraph as UnstableVacpGraph, VacpLayer as UnstableVacpLayer, VacpNode as UnstableVacpNode, VacpNodeKind as UnstableVacpNodeKind, VacpRef as UnstableVacpRef, VacpSchemaVersion as UnstableVacpSchemaVersion, VacpStateDeltaPayload as UnstableVacpStateDeltaPayload, VacpStateRequest as UnstableVacpStateRequest, VacpStateSnapshot as UnstableVacpStateSnapshot, VacpStateUpdate as UnstableVacpStateUpdate, VacpWindowBridge as UnstableVacpWindowBridge } from "./components/ai/vacpTypes";
@@ -0,0 +1 @@
1
+ var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a={};function i(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function s(e,t={}){const n="number"==typeof t.maxDepth&&Number.isFinite(t.maxDepth)?Math.max(1,Math.floor(t.maxDepth)):10,r="number"==typeof t.maxArrayLength&&Number.isFinite(t.maxArrayLength)?Math.max(1,Math.floor(t.maxArrayLength)):1e3,o=new WeakSet,a=(e,t)=>{if(null==e||"string"==typeof e||"boolean"==typeof e)return e;if("number"==typeof e)return Number.isFinite(e)?e:e+"";if("bigint"==typeof e)return""+e;if("function"==typeof e||"symbol"==typeof e||void 0===e)return;if(e instanceof Date)return e.toISOString();if(t>=n)return"[depth limit]";if("object"!=typeof e)return e+"";if("$$typeof"in e)return;if(o.has(e))return"[circular]";if(o.add(e),Array.isArray(e)){const n=e.slice(0,r).map(e=>a(e,t+1)).filter(e=>void 0!==e);return o.delete(e),n}if(e instanceof Set){const n=Array.from(e).slice(0,r).map(e=>a(e,t+1)).filter(e=>void 0!==e);return o.delete(e),n}if(e instanceof Map){const n=Object.create(null);let i=0;for(const[o,s]of e){if(i++>=r)break;const e=a(s,t+1);void 0!==e&&(n[o+""]=e)}return o.delete(e),n}const i=Object.create(null);for(const n of Object.keys(e).sort()){const r=a(e[n],t+1);void 0!==r&&(i[n]=r)}return o.delete(e),i};return a(e,0)}function l(e){const t=s(e);return i(t)?t:{}}function c(e){if(Array.isArray(e))return e.map(c);if(!i(e))return e;const t=Object.create(null);for(const n of Object.keys(e).sort())t[n]=c(e[n]);return t}function u(e){return JSON.stringify(c(s(e)))}function d(e){return function(e){let t=BigInt("14695981039346656037");const n=BigInt("1099511628211"),r=BigInt("0xffffffffffffffff");for(let o=0;e.length>o;o++)t^=BigInt(e.charCodeAt(o)),t=t*n&r;return t.toString(16).padStart(16,"0")}(u(e))}function f(e){if(!e?.length)return;const t=Array.from(new Set(e.filter(e=>"string"==typeof e&&e.length))).sort();return t.length?t:void 0}function h(e,t){return t.some(t=>e===t||e.startsWith(t+"/"))}function m(e,t){const n=f(t.refs),r=!1!==t.includeSummary;if(!n)return{snapshot:{version:e.version,createdAt:e.createdAt,state:e.state,...r&&e.summary?{summary:e.summary}:{}}};const o={};for(const[t,r]of Object.entries(e.state))h(t,n)&&(o[t]=r);const a={};if(r&&e.summary)for(const[t,r]of Object.entries(e.summary))h(t,n)&&(a[t]=r);return{snapshot:{version:e.version,createdAt:e.createdAt,state:o,...Object.keys(a).length?{summary:a}:{}},refs:n}}function p(e,t){const n={},r=[];for(const[r,o]of Object.entries(t.state))Object.prototype.hasOwnProperty.call(e.state,r)&&u(e.state[r])===u(o)||(n[r]=o);for(const n of Object.keys(e.state))Object.prototype.hasOwnProperty.call(t.state,n)||r.push(n);const o={},a=[],i=e.summary??{},s=t.summary??{};for(const[e,t]of Object.entries(s))Object.prototype.hasOwnProperty.call(i,e)&&u(i[e])===u(t)||(o[e]=t);for(const e of Object.keys(i))Object.prototype.hasOwnProperty.call(s,e)||a.push(e);return{changed:n,removed:r.sort(),...Object.keys(o).length?{summaryChanged:o}:{},...a.length?{summaryRemoved:a.sort()}:{}}}function g(e){return null==e?"NULL":"number"==typeof e?"DOUBLE":"string"==typeof e?"VARCHAR":"boolean"==typeof e?"BOOLEAN":e instanceof Date?"TIMESTAMP":Array.isArray(e)?"ARRAY":"OBJECT"}((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(a,{unstable_SEMIOTIC_VACP_ACTIVATE_NAVIGATION_ACTION:()=>$,unstable_SEMIOTIC_VACP_CLEAR_SELECTION_ACTION:()=>v,unstable_SEMIOTIC_VACP_INSPECT_DATA_ACTION:()=>w,unstable_SEMIOTIC_VACP_SET_INTERVAL_SELECTION_ACTION:()=>b,unstable_SEMIOTIC_VACP_SET_POINT_SELECTION_ACTION:()=>y,unstable_VACP_DATA_SCHEMA_ACTION:()=>A,unstable_VACP_SCHEMA_VERSION:()=>C,unstable_createSemioticVACPBridge:()=>lt,unstable_installSemioticVACPBridge:()=>ct}),module.exports=(e=a,((e,a,i,s)=>{if(a)for(let i of r(a))o.call(e,i)||void 0===i||t(e,i,{get:()=>a[i],enumerable:!(s=n(a,i))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var y="semiotic.set_point_selection",b="semiotic.set_interval_selection",v="semiotic.clear_selection",$="semiotic.activate_navigation_node",w="semiotic.inspect_data",C="0.1.0",A="vacp.data_schema";function S(e,t){if(!t.descriptor.name.trim())throw Error("VACP action names must be non-empty.");if(e.some(e=>e.descriptor.name===t.descriptor.name))throw Error(`Duplicate VACP action "${t.descriptor.name}".`);e.push(t)}function x(e,t){if(!i(e))throw Error(t+" expects an object parameter payload.");return e}function k(e,t){return"number"==typeof e&&Number.isFinite(e)?Math.max(1,Math.floor(e)):t}function j(e,t,n){if("string"!=typeof e.selectionRef)throw Error("params.selectionRef must be a VACP selection ref.");const r=t.find(t=>t.ref===e.selectionRef);if(!r)throw Error(`Unknown selection ref "${e.selectionRef}".`);if(n&&!r.modes.has(n))throw Error(`Selection "${r.name}" does not accept ${n} state.`);return r}function I(e){return null==e||"string"==typeof e||"number"==typeof e&&Number.isFinite(e)||"boolean"==typeof e||e instanceof Date&&Number.isFinite(e.getTime())}function O(e,t,n){const r=[],o=e.dataHandles.map(e=>e.ref);o.length&&S(r,{descriptor:{name:A,title:"Describe Semiotic data",description:"Return columns, types, row count, and optional bounded summaries for a chart DataHandle.",targetRef:n.view,parameters:{type:"object",properties:{handleRef:{type:"string",enum:o},detail:{type:"string",enum:["columns","full"]},sampleRows:{type:"number",minimum:1}},required:["handleRef"]}},execute(n){const r=x(n,A);if("string"!=typeof r.handleRef)throw Error("params.handleRef must be a DataHandle ref.");const o=e.dataHandles.find(e=>e.ref===r.handleRef);if(!o)throw Error(`Unknown DataHandle "${r.handleRef}".`);const a=void 0===r.detail||"columns"===r.detail?"columns":"full"===r.detail?"full":(()=>{throw Error('params.detail must be "columns" or "full".')})(),s="number"==typeof r.sampleRows&&Number.isFinite(r.sampleRows)?Math.max(1,Math.floor(r.sampleRows)):"full"===a?1e3:Math.min(o.rows.length,1e3),l=k(t.dataAccess?.maxSchemaRows,5e3);return function(e){const t=e.rows.slice(0,Math.max(0,e.sampleRows)),n=function(e){const t=new Map;for(const n of e)if(i(n))for(const[e,r]of Object.entries(n)){const n=t.get(e)??new Set;n.add(g(r)),t.set(e,n)}return Array.from(t).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>{const n=Array.from(t).filter(e=>"NULL"!==e);return{name:e,type:0===n.length?"NULL":1===new Set(n).size?n[0]:"MIXED"}})}(e.rows),r=n.map(e=>e.name);if("columns"===e.detail)return{handleRef:e.handleRef,detail:e.detail,table:null,rowCount:e.rows.length,columns:n};const o=function(e,t){const n=Object.create(null);for(const r of t){const t=[];for(const n of e){if(!i(n))continue;const e=n[r];"number"==typeof e&&Number.isFinite(e)&&t.push(e)}if(!t.length)continue;let o=t[0],a=t[0],s=0;for(const e of t)o=Math.min(o,e),a=Math.max(a,e),s+=e;n[r]={min:o,max:a,avg:s/t.length}}return Object.keys(n).length?n:void 0}(t,r),a=function(e,t){const n=Object.create(null);for(const r of t){const t=[];for(const n of e){if(!i(n))continue;const e=n[r];e instanceof Date&&Number.isFinite(e.getTime())&&t.push(e.getTime())}if(!t.length)continue;const o=Math.min(...t),a=Math.max(...t);n[r]={minIso:new Date(o).toISOString(),maxIso:new Date(a).toISOString(),minEpochMs:o,maxEpochMs:a}}return Object.keys(n).length?n:void 0}(t,r),s=function(e,t){const n=Object.create(null);for(const r of t){const t=new Map;for(const n of e){if(!i(n))continue;const e=n[r];if("string"!=typeof e&&"boolean"!=typeof e)continue;const o=e+"";t.set(o,(t.get(o)??0)+1)}t.size&&(n[r]=Array.from(t).sort(([e,t],[n,r])=>r-t||e.localeCompare(n)).slice(0,10).map(([e,t])=>({value:e,n:t})))}return Object.keys(n).length?n:void 0}(t,r);return{handleRef:e.handleRef,detail:e.detail,table:null,rowCount:e.rows.length,columns:n,...o?{numeric:o}:{},...a?{temporal:a}:{},...s?{categoricalTopValues:s}:{},sampledRows:t.length}}({handleRef:o.ref,rows:o.rows,detail:a,sampleRows:Math.min(s,l)})}}),o.length&&t.dataAccess?.sample&&S(r,{descriptor:{name:w,title:"Inspect bounded Semiotic rows",description:"Return a bounded JSON sample from a chart DataHandle. This action is opt-in.",targetRef:n.view,parameters:{type:"object",properties:{handleRef:{type:"string",enum:o},offset:{type:"number",minimum:0},limit:{type:"number",minimum:1}},required:["handleRef"]}},execute(n){const r=x(n,w);if("string"!=typeof r.handleRef)throw Error("params.handleRef must be a DataHandle ref.");const o=e.dataHandles.find(e=>e.ref===r.handleRef);if(!o)throw Error(`Unknown DataHandle "${r.handleRef}".`);const a="number"==typeof r.offset&&Number.isFinite(r.offset)?Math.max(0,Math.floor(r.offset)):0,i=k(t.dataAccess?.maxSampleRows,50),l="number"==typeof r.limit&&Number.isFinite(r.limit)?Math.max(1,Math.floor(r.limit)):Math.min(20,i),c=Math.min(l,i),u=o.rows.slice(a,a+c);return{handleRef:o.ref,offset:a,limit:c,rowCount:o.rows.length,rows:s(u,{maxArrayLength:i}),truncated:o.rows.length>a+u.length}}});const a=e.selections.map(e=>e.ref),c=e.selections.filter(e=>e.modes.has("point"));c.length&&t.selectionActions?.setPointSelection&&S(r,{descriptor:{name:y,title:"Set point selection",description:"Set a named LinkedCharts point-selection clause with allowlisted fields.",targetRef:n.view,parameters:{type:"object",properties:{selectionRef:{type:"string",enum:c.map(e=>e.ref)},fields:{type:"object"}},required:["selectionRef","fields"]}},async execute(n){const r=x(n,y),o=j(r,e.selections,"point"),a=function(e,t){if(!i(e)||!Object.keys(e).length)throw Error("params.fields must be a non-empty object.");const n=Object.create(null);for(const[r,o]of Object.entries(e)){if(!t.includes(r))throw Error(`Field "${r}" is not allowed for this selection.`);if(!Array.isArray(o)||!o.length)throw Error(`Point selection field "${r}" requires values[].`);for(const e of o)if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&("number"!=typeof e||!Number.isFinite(e)))throw Error(`Point selection field "${r}" only accepts JSON primitive values.`);n[r]=[...o]}return n}(r.fields,o.fields);return await(t.selectionActions?.setPointSelection?.(o.name,o.clientId,a)),{selectionRef:o.ref,fields:a}}});const u=e.selections.filter(e=>e.modes.has("interval"));u.length&&t.selectionActions?.setIntervalSelection&&S(r,{descriptor:{name:b,title:"Set interval selection",description:"Set a named LinkedCharts interval-selection clause in data units.",targetRef:n.view,parameters:{type:"object",properties:{selectionRef:{type:"string",enum:u.map(e=>e.ref)},fields:{type:"object"}},required:["selectionRef","fields"]}},async execute(n){const r=x(n,b),o=j(r,e.selections,"interval"),a=function(e,t){if(!i(e)||!Object.keys(e).length)throw Error("params.fields must be a non-empty object.");const n=Object.create(null);for(const[r,o]of Object.entries(e)){if(!t.includes(r))throw Error(`Field "${r}" is not allowed for this selection.`);if(!Array.isArray(o)||2!==o.length||"number"!=typeof o[0]||"number"!=typeof o[1]||!Number.isFinite(o[0])||!Number.isFinite(o[1]))throw Error(`Interval selection field "${r}" requires [min,max].`);n[r]=[Math.min(o[0],o[1]),Math.max(o[0],o[1])]}return n}(r.fields,o.fields);return await(t.selectionActions?.setIntervalSelection?.(o.name,o.clientId,a)),{selectionRef:o.ref,fields:a}}}),a.length&&t.selectionActions?.clearSelection&&S(r,{descriptor:{name:v,title:"Clear selection",description:"Clear every active clause from one named LinkedCharts selection.",targetRef:n.view,parameters:{type:"object",properties:{selectionRef:{type:"string",enum:a}},required:["selectionRef"]}},async execute(n){const r=j(x(n,v),e.selections);return await(t.selectionActions?.clearSelection?.(r.name)),{selectionRef:r.ref,cleared:!0}}});const f=e.charts.map(e=>e.navigation).filter(e=>!!e&&e.index.valid&&!!e.binding.onActiveChange);f.length&&S(r,{descriptor:{name:$,title:"Activate chart navigation target",description:"Move an accessible chart navigation tree to a uniquely identified datum.",targetRef:n.view,parameters:{type:"object",properties:{navigationRef:{type:"string",enum:f.map(e=>e.ref)},match:{type:"object"}},required:["navigationRef","match"]}},execute(e){const t=x(e,$);if("string"!=typeof t.navigationRef)throw Error("params.navigationRef must be a navigation ref.");const n=f.find(e=>e.ref===t.navigationRef);if(!n)throw Error(`Unknown navigation ref "${t.navigationRef}".`);const r=function(e,t){if(!i(e))throw Error("params.match must be an object.");for(const n of Object.keys(e))if(!t.includes(n))throw Error(`params.match includes undeclared field "${n}".`);const n=Object.create(null);for(const r of t){if(!Object.prototype.hasOwnProperty.call(e,r)||!I(e[r]))throw Error(`params.match requires a primitive value for "${r}".`);n[r]=e[r]instanceof Date?e[r].toISOString():e[r]}return n}(t.match,n.index.matchFields),o=n.index.byKey.get(d(r));if(!o)throw Error("No navigation datum matches params.match.");return n.binding.onActiveChange?.(o),{navigationRef:n.ref,targetRef:n.index.targetRef(r),match:r}}});const h="function"==typeof t.actions?t.actions():t.actions;for(const e of h??[])e.available&&!e.available()||S(r,{descriptor:{...e.descriptor,...e.descriptor.parameters?{parameters:l(e.descriptor.parameters)}:{}},async execute(t){const n=e.validate?.(t);if("string"==typeof n&&n)throw Error(n);return e.execute(t)}});return r}var P=["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","RidgelinePlot","DotPlot","PieChart","DonutChart","GaugeChart","FunnelChart","SwimlaneChart","LikertChart","LineChart","BumpChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","BubbleChart","Heatmap","QuadrantChart","MultiAxisLineChart","CandlestickChart","ConnectedScatterplot","ScatterplotMatrix","MinimapChart","ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram","TreeDiagram","Treemap","CirclePack","OrbitDiagram","ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram","RealtimeLineChart","RealtimeHistogram","TemporalHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","GauntletChart","CrucibleChart","ProcessFlowChart","PacketFlowChart","ChainReactionChart","BigNumber"],R=new Set(P);function F(e,t=new Set){if(null===e)return!0;const n=typeof e;if("string"===n||"boolean"===n)return!0;if("number"===n)return Number.isFinite(e);if("object"!==n)return!1;if(t.has(e))return!1;t.add(e);const r=Array.isArray(e)?e.every(e=>F(e,t)):Object.entries(e).every(([,e])=>F(e,t));return t.delete(e),r}var D=Symbol.for("semiotic.chartRecipeRegistry");function N(e){return function(){const e=globalThis;return e[D]||(e[D]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[D]}().recipes.get(e)}function L(e){return"string"==typeof e?N(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}function M(e){return"string"==typeof e?e:e.id??e.name}function E(e){return e.layoutConfig&&"object"==typeof e.layoutConfig?e.layoutConfig:{}}function T(e){return Array.isArray(e.data)?e.data:Array.isArray(e.nodes)?e.nodes:Array.isArray(e.points)?e.points:Array.isArray(e.areas)?e.areas:[]}function B(e,t,n){return n??L(t.recipe)??L(t.recipeId)??N(e)}function _(e,t,n=[]){const r=e.accessor?t[e.accessor]:void 0;if("string"==typeof r&&r)return r;if(e.field)return e.field;const o=n.find(e=>e&&"object"==typeof e);if(!o)return;const a=Object.entries(o).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?a.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>e in o):a.find(([,e])=>"string"==typeof e)?.[0]}function V(e,t){return e.dataRoles.find(e=>e.role===t)}function z(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function H(e,t,n,r,o,a={}){const i={...a};if(t)for(const[e,n]of Object.entries(t))i[e]=n;for(const e of n.dataRoles){const n=_(e,r,o),a=t&&n?t[n]:n;void 0!==a&&(i[e.role]=a)}return e.replace(/\{([^}]+)\}/g,(e,t)=>{const n=i[t];return null==n?`{${t}}`:n+""})}var q="1",G=new Set(["tooltip","onObservation","xFormat","yFormat","valueFormat","svgAnnotationRules","tooltipContent","onHover","tickFormatTime","tickFormatValue","edgeSort","sortGroups","centerContent","frameProps","controls","oFormat","rFormat","oSort","pieceStyle","summaryStyle","nodeStyle","edgeStyle","customHoverBehavior","customClickBehavior","customDoubleClickBehavior","onBrush","onTopologyChange","backgroundGraphics","foregroundGraphics","legend","recipe","layout"]),U=new Set(["data","nodes","edges","points","areas","lines","flows"]);function K(e){if(null==e)return e;if("function"==typeof e)return;if("object"!=typeof e)return e;if(e.$$typeof)return;if(Array.isArray(e))return e.map(K).filter(e=>void 0!==e);if(e instanceof Date)return e;const t={};for(const[n,r]of Object.entries(e)){if("function"==typeof r)continue;if(r&&"object"==typeof r&&r.$$typeof)continue;const e=K(r);void 0!==e&&(t[n]=e)}return t}function J(e,t){return!!U.has(e)&&("areas"!==e||"string"!=typeof t)}var W="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e));function Q(e,t){if("function"==typeof e)return t=>+e(t);const n=e||t;return e=>+e[n]}function X(e,t){if("function"==typeof e)return e;const n=e||t;return e=>e[n]}var Y=new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),Z=new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),ee=new Set(["PieChart","DonutChart","FunnelChart"]),te=new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]);function ne(e,t){return Z.has(e)||ee.has(e)||"SwimlaneChart"===e||"GaugeChart"===e?{measure:t.valueAccessor,measureFallback:"value",dimension:t.categoryAccessor??t.stepAccessor,dimensionFallback:"category"}:{measure:t.yAccessor??t.valueAccessor,measureFallback:"y",dimension:t.xAccessor,dimensionFallback:"x"}}function re(e){for(const t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){const n=e[t];if("string"==typeof n&&n)return n}}function oe(e,t){return null==e?"—":e instanceof Date?e.toISOString().slice(0,10):"number"==typeof e?t(e):e+""}function ae(e,t={}){const n=!0===t.showRetractedAnnotations,r=!0===t.showSupersededAnnotations,o=new Set;for(const t of e){const e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&o.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!n)return!1;const t=e?.provenance?.stableId;return!(t&&o.has(t)&&!r)})}var ie={LineChart:"line chart",AreaChart:"area chart",StackedAreaChart:"stacked area chart",DifferenceChart:"difference chart",Scatterplot:"scatter plot",BubbleChart:"bubble chart",ConnectedScatterplot:"connected scatter plot",QuadrantChart:"quadrant chart",MultiAxisLineChart:"dual-axis line chart",CandlestickChart:"candlestick chart",Heatmap:"heatmap",MinimapChart:"line chart",BarChart:"bar chart",StackedBarChart:"stacked bar chart",GroupedBarChart:"grouped bar chart",DotPlot:"dot plot",Histogram:"histogram",BoxPlot:"box plot",ViolinPlot:"violin plot",RidgelinePlot:"ridgeline plot",SwarmPlot:"swarm plot",PieChart:"pie chart",DonutChart:"donut chart",FunnelChart:"funnel chart",GaugeChart:"gauge",LikertChart:"Likert chart",SwimlaneChart:"swimlane chart",ForceDirectedGraph:"network graph",SankeyDiagram:"Sankey diagram",ProcessSankey:"temporal Sankey diagram",ChordDiagram:"chord diagram",TreeDiagram:"tree diagram",Treemap:"treemap",CirclePack:"circle-packing chart",OrbitDiagram:"orbit diagram",ChoroplethMap:"choropleth map",ProportionalSymbolMap:"proportional-symbol map",FlowMap:"flow map",DistanceCartogram:"distance cartogram",BigNumber:"single value",StreamPhysicsFrame:"physics stream frame",EventDropChart:"event-drop physics chart",GaltonBoardChart:"Galton board chart",UnitPileChart:"physics pile chart",CollisionSwarmChart:"collision swarm chart",PacketFlowChart:"physical flow chart",ProcessFlowChart:"process flow physics chart",CrucibleChart:"crucible physics chart",PhysicsCustomChart:"custom physics chart"},se=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),le=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]);function ce(e){return ie[e]||e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()+" chart"}function ue(e){const t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}var de=new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),fe={"outlier-detection":"alerting","change-detection":"alerting",trend:"tracking","composition-over-time":"apportioning","compare-series":"comparing","compare-categories":"comparing",rank:"ranking","part-to-whole":"apportioning",distribution:"characterizing",correlation:"relating",flow:"tracing",hierarchy:"nesting",geo:"locating"},he={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},me=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],pe={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"};function ge(e,t){const n=function(e){if(e){if("fits"in e||"buildProps"in e){const t=e,n={};for(const[e,r]of Object.entries(t.intentScores))"number"==typeof r&&Number.isFinite(r)&&(n[e]=r);return{family:t.family,intentScores:Object.keys(n).length?n:void 0}}return e}}(t);if(n?.act)return n.act;if(n?.intentScores){const e=function(e){let t,n=0;for(const[r,o]of Object.entries(e))if("number"==typeof o&&o>0)if(o>n)t=r,n=o;else if(o===n&&void 0!==t){const e=me.indexOf(r),n=me.indexOf(t);-1===e||-1!==n&&e>=n||(t=r)}return t}(n.intentScores);if(e&&fe[e]&&(n.intentScores[e]??0)>=3)return fe[e]}return n?.family?he[n.family]:function(e){return ee.has(e)||"StackedAreaChart"===e?"apportioning":de.has(e)?"relating":Z.has(e)?"comparing":te.has(e)?"characterizing":Y.has(e)?"tracking":se.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}var ye=new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),be=new Set(["system","agent","watcher"]),ve=new Set(["ai","agent","system","computed","dbt","great-expectations"]),$e=new Set(["rule","statistical-test","llm-inference","computed"]);function we(e){const t=e.annotations;return!!Array.isArray(t)&&t.some(e=>{if(!e||"object"!=typeof e)return!1;const t=e;if("string"!=typeof t.type||!ye.has(t.type))return!1;const n=t.provenance;return!(!n||"object"!=typeof n)&&(be.has(n.authorKind)||ve.has(n.source)||$e.has(n.basis))})}function Ce(e="en"){let t,n;try{t=new Intl.NumberFormat(e,{notation:"compact",maximumFractionDigits:1}),n=new Intl.NumberFormat(e,{maximumFractionDigits:2})}catch{t=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),n=new Intl.NumberFormat("en",{maximumFractionDigits:2})}return e=>Number.isFinite(e)?1e4>Math.abs(e)?n.format(e):t.format(e):e+""}var Ae={"y-threshold":"a threshold line","x-threshold":"a threshold line",band:"a highlighted band","x-band":"a highlighted band",label:"a label",callout:"a callout","callout-circle":"a callout","callout-rect":"a callout",text:"a text note",bracket:"a bracket",enclose:"an enclosure","rect-enclose":"an enclosure",highlight:"a highlight",widget:"a widget",trend:"a trend line",envelope:"an envelope","anomaly-band":"an anomaly band",forecast:"a forecast","category-highlight":"a category highlight"};function Se(e){const t=Ae["string"==typeof e.type?e.type:"annotation"]||"an annotation",n=function(e){const t=e.provenance&&"object"==typeof e.provenance?e.provenance:null,n=t?.authorKind??t?.source??t?.basis;return"watcher"===n?"a watcher-flagged ":"agent"===n||"ai"===n||"llm-inference"===n?"an AI-suggested ":""}(e),r=n?n+t.replace(/^an? /,""):t,o="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return o?`${r} labeled "${o}"`:r}function xe(e){const t=Array.isArray(e.annotations)?e.annotations:null;if(!t||0===t.length)return;const n=ae(t.filter(e=>!!e&&"object"==typeof e));if(0===n.length)return;const r=n.map(Se),o=r.slice(0,5),a=r.length-o.length,i=function(e){return e.length>1?2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`:e[0]??""}(o)+(a>0?`, and ${a} more`:""),s=n.length;return`The author has marked ${1===s?"one feature":s+" features"} on this chart: ${i}.`}function ke(e,t,n={}){const r=void 0!==n.levels,o=new Set(n.levels??["l1","l2","l3"]);r||!n.capability&&!we(t)||o.add("l4");const a=B(e,t,n.recipe);if(a){const e=["l1","l2","l3","l4"].filter(e=>o.has(e));r||e.includes("l4")||e.push("l4");const i=function(e,t,n={}){const r=T(t),o=E(t),a=n.locale??"en",i="function"==typeof e.description?e.description({data:r,config:o,locale:a}):void 0,s=i?.levels??function(e,t,n,r){const o=z(e,["nominal","ordinal"]),a=z(e,["quantitative"]),i=o?_(o,n,t):void 0,s=a?_(a,n,t):void 0,l=o?.role??i??"category",c=a?.role??s??"value",u=e.encodings??[],d=u.length?u.slice(0,3).map(e=>e.meaning.replace(/\.$/,"")).join("; "):`${l} and ${c} are mapped through the recipe's declared visual semantics`,{number:f,percent:h}=function(e){try{return{number:new Intl.NumberFormat(e,{maximumFractionDigits:2}),percent:new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1})}}catch{return{number:new Intl.NumberFormat("en",{maximumFractionDigits:2}),percent:new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:1})}}}(r),m=new Map;if(i&&s)for(const e of t){const t=(e[i]??"Uncategorized")+"",n=Number(e[s]);Number.isFinite(n)&&m.set(t,(m.get(t)??0)+n)}const p=[...m].sort((e,t)=>t[1]-e[1]),g=p.reduce((e,[,t])=>e+t,0),y=p[0],b=p[1],v=g>0?((y?.[1]??0)+(b?.[1]??0))/g:0,$=e.intents.map(e=>({id:M(e),strength:"string"==typeof e?void 0:e.strength})).sort((e,t)=>"primary"===e.strength?-1:"primary"===t.strength?1:0)[0]?.id,w=e.audience?.primary??e.audienceFit?.find(e=>"strong"===e.fit)?.audience;return{l1:`A ${e.name.toLowerCase()} encodes ${l} and ${c}. ${C=d,C?C.charAt(0).toUpperCase()+C.slice(1):C}.`,l2:p.length>0?`${p.length} categories total ${f.format(g)}. ${y[0]} accounts for ${f.format(y[1])}${g>0?` (${h.format(y[1]/g)})`:""}${b?`, followed by ${b[0]} at ${f.format(b[1])}`:""}.`:`${t.length} data ${1===t.length?"item is":"items are"} represented.`,l3:2>p.length?y?y[0]+" is the only represented category.":"No quantitative pattern can be derived from the available data.":.5>v?`The total is distributed across ${p.length} categories without the first two forming a majority.`:`Most of the total is concentrated in ${y[0]} and ${b[0]}, which together account for ${h.format(v)}.`,l4:`The chart is intended for ${$??"explanation"}${w?` with a ${w} audience`:""}: ${e.designContract.whyCustom}`};var C}(e,r,o,a),l=n.levels??["l1","l2","l3","l4"],c={};for(const e of l)s[e]&&(c[e]=s[e]);const u=["l1","l2","l3","l4"].map(e=>c[e]).filter(e=>!!e).join(" "),d=n.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>"Misuse: "+e)]:void 0;return{text:u,levels:c,...d?.length?{caveats:d}:{}}}(a,t,{levels:e,locale:n.locale,audience:n.audience,includeCaveats:n.includeCaveats}),s=xe(t);return{...i,text:s?`${s} ${i.text}`.trim():i.text,...s?{annotations:s}:{}}}const i=Ce(n.locale??"en"),s=ce(e),l=Array.isArray(t.data)?t.data:null,c=re(t),u=le.has(e)?function(e,t){const n=e.physics&&"object"==typeof e.physics?e.physics:null,r=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,o=[e.settledProjectionRows,e.projectionRows,r?.rows,n?.settledProjectionRows,n?.projectionRows,n?.settledProjection&&"object"==typeof n.settledProjection?n.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(o)?o.map((e,n)=>{if(!e||"object"!=typeof e)return null;const r=e,o=ue(r.count??r.value??r.total??r.bodies??r.events);if(null==o)return null;const a=r.label??r.id??r.name??"container "+(n+1),i=ue(r.secondary??r.secondaryCount),s=ue(r.observed??r.observedCount);return{label:oe(a,t),count:o,...null!=i?{secondary:i}:{},..."string"==typeof r.secondaryLabel&&r.secondaryLabel?{secondaryLabel:r.secondaryLabel}:{},...null!=s?{observed:s}:{}}}).filter(e=>null!=e):null}(t,i):null,{measure:d,measureFallback:f,dimension:h,dimensionFallback:m}=ne(e,t),p="string"==typeof d&&d?d:f,g="string"==typeof h&&h?h:m,y={};if(le.has(e)&&function(e,t,n,r,o,a){const i=function(e){return"EventDropChart"===e?"time window":"GaltonBoardChart"===e?"bin":"CollisionSwarmChart"===e?"group lane":"PacketFlowChart"===e?"flow node":"CrucibleChart"===e?"result group":"container"}(e),s=function(e){return"EventDropChart"===e?"event":"GaltonBoardChart"===e?"sample":"CollisionSwarmChart"===e?"point":"PacketFlowChart"===e?"packet":"CrucibleChart"===e?"settled item":"body"}(e);if(o.has("l1")&&(r.l1=function(e,t){return"EventDropChart"===e?"An event-drop physics chart that collapses moving events into a settled projection by event-time window.":"GaltonBoardChart"===e?"A Galton board chart that collapses falling samples into a settled histogram projection.":"UnitPileChart"===e?"A physics pile chart that collapses moving bodies into a settled bar-style projection by container.":"CollisionSwarmChart"===e?"A collision swarm chart that separates overlapping points while preserving their quantitative axis position.":"PacketFlowChart"===e?"A physical flow chart that keeps authored routes visible while packet bodies show throughput and proximity events.":"CrucibleChart"===e?"A crucible physics chart that replays authored phases and events into declared products and outlets; the settled ledger, not collisions, determines the result.":`A ${t} whose accessible reading is the settled projection rather than individual trajectories.`}(e,t)),!o.has("l2")&&!o.has("l3"))return;if(!n||0===n.length)return void(o.has("l2")&&(r.l2="No settled projection is loaded yet."));const l=n.reduce((e,t)=>e+t.count,0),c=n.filter(e=>e.count>0).sort((e,t)=>t.count-e.count),u=c[0]??n.slice().sort((e,t)=>t.count-e.count)[0];if(!u)return;const d=n.reduce((e,t)=>e+(t.secondary??0),0),f=n.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(o.has("l2"))if(0===c.length)r.l2=`The settled projection contains ${a(l)} ${Ie(l,s)} across ${n.length} ${Ie(n.length,i)}; no ${Ie(2,i)} are non-empty yet.`;else{const e=d>0?` ${a(d)} ${Ie(d,s)} ${1===d?"is":"are"} marked ${f}.`:"";r.l2=`The settled projection contains ${a(l)} ${Ie(l,s)} across ${n.length} ${Ie(n.length,i)}; ${c.length} ${Ie(c.length,i)} ${1===c.length?"is":"are"} non-empty. The largest ${i} is ${u.label} with ${a(u.count)} ${Ie(u.count,s)}.${e}`}if(o.has("l3")&&l>0&&c.length>0){const e=c.find(e=>e!==u),t=function(e,t){if(0>=t)return"0%";const n=e/t*100;return(10>n?Math.round(10*n)/10:Math.round(n))+"%"}(u.count,l);r.l3=e?`The settled projection is most concentrated in ${u.label}, which holds ${a(u.count)} ${Ie(u.count,s)} (${t}); ${e.label} follows with ${a(e.count)} ${Ie(e.count,s)}.`:`The settled projection is concentrated in ${u.label}, which holds all ${a(u.count)} ${Ie(u.count,s)}.`}}(e,s,u,y,o,i),o.has("l1")&&!le.has(e))if(Y.has(e)||Z.has(e))y.l1=`A ${s} of ${p} by ${g}`+(c?`, split by ${c}.`:".");else if(ee.has(e))y.l1=`A ${s} showing ${p} across ${g} categories.`;else if(te.has(e))y.l1=`A ${s} of the distribution of ${p}`+(c?` by ${c}.`:".");else if(se.has(e)){const e=Array.isArray(t.nodes)?t.nodes.length:void 0,n=Array.isArray(t.edges)?t.edges.length:void 0,r=[null!=e?`${e} ${Ie(e,"node")}`:null,null!=n?`${n} ${Ie(n,"edge")}`:null].filter(Boolean);y.l1=`A ${s}${r.length?" with "+r.join(" and "):""}.`}else if("BigNumber"===e){const e="string"==typeof t.label?t.label:p;y.l1=`A single value${e?" for "+e:""}.`}else y.l1=`A ${s}.`;const b=Y.has(e)||Z.has(e)||ee.has(e)||te.has(e);let v=null;if((o.has("l2")||o.has("l3")||o.has("l4"))&&b&&l&&l.length>0&&(v=function(e,t,n,r){let o=0,a=0,i=1/0,s=-1/0,l=null,c=null,u=0,d=0,f=null,h=null,m=NaN,p=NaN;for(const n of e){const e=t(n);Number.isFinite(e)&&(0===o&&(m=e,f=n),p=e,h=n,i>e&&(i=e,l=n,u=o),e>s&&(s=e,c=n,d=o),o++,a+=e)}return 0===o?null:{count:o,min:i,max:s,mean:a/o,minLabel:oe(null!=l?n(l):null,r),maxLabel:oe(null!=c?n(c):null,r),first:m,last:p,firstLabel:oe(null!=f?n(f):null,r),lastLabel:oe(null!=h?n(h):null,r),minIndex:u,maxIndex:d}}(l,Q(d,f),X(h,m),i)),o.has("l2")&&b&&(l&&0!==l.length?v&&(y.l2=ee.has(e)?`${v.count} segments totaling ${i(function(e){return e.mean*e.count}(v))}. Largest is ${v.maxLabel} at ${i(v.max)}; smallest is ${v.minLabel} at ${i(v.min)}.`:`${p} ranges from ${i(v.min)} (${v.minLabel}) to ${i(v.max)} (${v.maxLabel}), with a mean of ${i(v.mean)} across ${v.count} points.`):y.l2="No data is loaded yet."),o.has("l3")&&v&&!c&&Y.has(e)?y.l3=function(e,t,n){const{first:r,last:o,min:a,max:i,maxLabel:s,minLabel:l,firstLabel:c,lastLabel:u,minIndex:d,maxIndex:f,count:h}=e,m=i-a,p=o-r;if(0===m)return`${je(t)} is constant at ${n(r)} across the series.`;if(.04>m/(Math.abs(e.mean)||1))return`${je(t)} ends roughly where it started (${n(r)} at ${c} to ${n(o)} at ${u}), ranging between ${n(a)} and ${n(i)}.`;const g=f>0&&h-1>f,y=d>0&&h-1>d,b=(i-Math.max(r,o))/m,v=(Math.min(r,o)-a)/m;return g&&b>.15?`Overall ${t} climbs to a peak of ${n(i)} (${s}), then falls to ${n(o)} (${u}).`:y&&v>.15?`Overall ${t} drops to a low of ${n(a)} (${l}), then recovers to ${n(o)} (${u}).`:.05>Math.abs(p)/m?`${je(t)} ends roughly where it started (${n(r)} at ${c} to ${n(o)} at ${u}), ranging between ${n(a)} and ${n(i)}.`:p>0?f===h-1?`Overall ${t} rises from ${n(r)} (${c}) to a peak of ${n(o)} (${u}).`:`Overall ${t} rises from ${n(r)} (${c}) to ${n(o)} (${u}), after peaking at ${n(i)} (${s}).`:d===h-1?`Overall ${t} falls from ${n(r)} (${c}) to a low of ${n(o)} (${u}).`:`Overall ${t} falls from ${n(r)} (${c}) to ${n(o)} (${u}), after dipping to ${n(a)} (${l}).`}(v,p,i):o.has("l3")&&v&&!c&&Z.has(e)&&(y.l3=`The highest ${g} is ${v.maxLabel} and the lowest is ${v.minLabel}.`),o.has("l4")){const r=we(t)?"alerting":ge(e,n.capability);r&&(y.l4=function(e,t,n,r,o,a,i,s){const l=pe[e],c=/^[aeiou]/i.test(l)?"an":"a";let u,d;switch(e){case"locating":u="This is a map",d="read values by location";break;case"presenting":u="This is a single-value display",d=`read ${"string"==typeof n.label&&n.label?n.label:o} as the headline number`;break;case"tracing":u=`This is ${c} ${l} chart`,d="follow the movement between states";break;case"nesting":u=`This is ${c} ${l} chart`,d="read it for nested structure and how children sum into their parents";break;case"relating":u=`This is ${c} ${l} chart`,d=`read it for whether ${a} and ${o} move together`;break;default:u=`This is ${c} ${l} chart`,d=function(e,t,n,r,o,a){if(!t)switch(e){case"alerting":return"watch for points that break from the rest";case"tracking":return"read it for the overall direction of "+n;case"comparing":return`compare ${n} across ${r}`;case"ranking":return"read it top to bottom by "+n;case"apportioning":return`read each ${r}'s share of the whole`;case"characterizing":return"read it for the spread and shape of "+n;default:return"read the highlighted features"}switch(e){case"alerting":return function(e,t,n){if(Z.has(n)||ee.has(n))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;const{first:r,last:o,min:a,max:i,minLabel:s,maxLabel:l,lastLabel:c,minIndex:u,maxIndex:d,count:f}=e,h=i-a;if(h>0){const e=d>0&&f-1>d,n=u>0&&f-1>u,m=(i-Math.max(r,o))/h,p=(Math.min(r,o)-a)/h;if(e&&m>.15)return`the peak of ${t(i)} at ${l} is the point to investigate`;if(n&&p>.15)return`the dip to ${t(a)} at ${s} is the point to investigate`;if(o>=i)return`the climb to ${t(o)} at ${c} warrants a closer look`;if(a>=o)return`the drop to ${t(o)} at ${c} warrants a closer look`}return`the extremes — ${l} (${t(i)}) and ${s} (${t(a)}) — are the points to check`}(t,o,a);case"tracking":return`read it for the trajectory of ${n}, which ${function(e){const t=e.max-e.min,n=e.last-e.first;return 0===t||.05>Math.abs(n)/t?"holds roughly steady":n>0?"rises":"falls"}(t)} from ${o(t.first)} (${t.firstLabel}) to ${o(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${n} across ${r}; ${t.maxLabel} leads at ${o(t.max)}`;case"ranking":return`read it top to bottom by ${n}; ${t.maxLabel} ranks highest at ${o(t.max)}`;case"apportioning":{const e=t.mean*t.count,n=e>0?Math.round(t.max/e*100):null;return`read each ${r}'s share of the ${o(e)} total; ${t.maxLabel} is the largest at ${o(t.max)}${null!=n?` (${n}%)`:""}`}case"characterizing":return`read it for the spread of ${n}, from ${o(t.min)} to ${o(t.max)}`;default:return"read the highlighted features"}}(e,r,o,a,i,t)}return`${u}; ${d}.${function(e,t){if(!t)return"";const n=t.familiarity?.[e];return"number"!=typeof n||n>2?"":` This ${ce(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`}(t,s)}`}(r,e,t,c?null:v,p,g,i,n.audience))}const $=["l1","l2","l3","l4"].filter(e=>o.has(e)&&y[e]).map(e=>y[e]).join(" "),w=xe(t);return{text:w?`${w} ${$}`.trim():$,levels:y,...w?{annotations:w}:{}}}function je(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function Ie(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function Oe(e){return((e??"unknown")+"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function Pe(e,t,n={}){const r=n.locale??"en",o=Math.max(1,n.maxLeaves??200),a=Ce(r),i=B(e,t,n.recipe);if(i)return function(e,t,n={}){const r=T(t),o=E(t),a=Math.max(1,n.maxLeaves??200);if("function"==typeof e.navigation)return e.navigation({data:r,config:o,locale:n.locale??"en"});const i=(s=e.navigation)&&"object"==typeof s?e.navigation:void 0;var s;const l=(i?.groupByRole?V(e,i.groupByRole):void 0)??(i?.groupBy?.[0]?V(e,i.groupBy[0])??e.dataRoles.find(e=>e.field===i.groupBy?.[0]):void 0)??z(e,["nominal","ordinal"]),c=l?_(l,o,r):void 0,u=(i?.idRole?V(e,i.idRole):void 0)??z(e,["identifier"]),d=u?_(u,o,r):void 0,f={id:"root",role:"chart",label:i?.summaryTemplate?H(i.summaryTemplate,void 0,e,o,r,{count:r.length}):`${e.name}: ${r.length} ${1===r.length?"item":"items"} represented.`,level:1,children:[]};let h=0;const m=(t,n,a)=>{const s=d?t[d]:void 0,l=i?.itemLabelTemplate?H(i.itemLabelTemplate,t,e,o,r,{count:r.length}):function(e,t,n,r){const o=z(t,["nominal","ordinal"]),a=t.dataRoles.filter(e=>"quantitative"===e.semanticType),i=o?_(o,n,r):void 0,s=[];i&&null!=e[i]&&s.push(e[i]+"");for(const t of a){const o=_(t,n,r);o&&null!=e[o]&&s.push(`${t.role}: ${e[o]+""}`)}return s.length>0?s.join(", "):"Data item"}(t,e,o,r);return{id:"datum-"+Oe(s??n),role:"datum",label:l,level:a,datum:t}};if(c){const e=new Map;for(const t of r){const n=(t[c]??"Uncategorized")+"",r=e.get(n);r?r.push(t):e.set(n,[t])}f.children=[...e].map(([e,t],n)=>{const r=t.slice(0,Math.max(0,a-h));h+=r.length;const o=r.map((e,t)=>m(e,1e5*n+t,3));return t.length>r.length&&o.push({id:"more-"+Oe(e),role:"datum",label:`…and ${t.length-r.length} more items`,level:3}),{id:"group-"+Oe(e),role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:o}})}else{const e=r.slice(0,a);f.children=e.map((e,t)=>m(e,t,2)),r.length>e.length&&f.children.push({id:"more",role:"datum",label:`…and ${r.length-e.length} more items`,level:2})}return f}(i,t,{maxLeaves:o,locale:r});const s={id:"root",role:"chart",label:ke(e,t,{locale:r}).text||"Chart.",level:1,children:[]},l=function(e,t){const n=Array.isArray(e.annotations)?e.annotations:null;if(!n)return null;const r=ae(n.filter(e=>!!e&&"object"==typeof e));if(0===r.length)return null;let o=0;const a=r.slice(0,t).map(e=>{const t=e.lifecycle?.status,n=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+o++,role:"annotation",level:3,label:`${r=Se(e),r?r.charAt(0).toUpperCase()+r.slice(1):r}${n}.`,datum:e};var r});r.length>t&&a.push({id:"annotation-"+o++,role:"annotation",level:3,label:`…and ${r.length-t} more annotations.`});const i=r.length;return{id:"annotations",role:"annotation",level:2,label:`Annotations: ${1===i?"one marked feature":i+" marked features"}.`,children:a}}(t,o),c=Array.isArray(t.data)?t.data:null,u=Y.has(e)||Z.has(e)||ee.has(e)||te.has(e);if(!c||0===c.length||!u)return l&&(s.children=[l]),s;const{measure:d,measureFallback:f,dimension:h,dimensionFallback:m}=ne(e,t),p=Q(d,f),g=X(h,m),y="string"==typeof d&&d?d:f,b="string"==typeof h&&h?h:m,v=re(t);let $=0;const w=e=>`${e}-${$++}`,C=(e,t)=>{const n=e.slice(0,o).map(e=>((e,t)=>{const n=p(e),r=oe(g(e),a);return{id:w("datum"),role:"datum",level:t,label:`${r}: ${Number.isFinite(n)?a(n):"—"}`,value:Number.isFinite(n)?n:void 0,datum:e}})(e,t));return e.length>o&&n.push({id:w("more"),role:"datum",level:t,label:`…and ${e.length-o} more points`}),n},A=[];if(Y.has(e)||Z.has(e)){let t=1/0,n=-1/0,r=1/0,o=-1/0;const i=[];let s=!0;for(const e of c){const a=p(e);Number.isFinite(a)&&(t>a&&(t=a),a>n&&(n=a));const l=g(e);i.push(l),"number"==typeof l&&Number.isFinite(l)?(r>l&&(r=l),l>o&&(o=l)):s=!1}const l=new Set,u=[];for(const e of i){const t=e+"";l.has(t)||(l.add(t),u.push(e))}const d=s?`${a(r)} to ${a(o)}`:`${oe(u[0],a)} to ${oe(u[u.length-1],a)} (${Z.has(e)?u.length+" categories":c.length+" points"})`;A.push({id:w("axis"),role:"axis",level:2,label:`${Z.has(e)?"Category axis":"X axis"}: ${b}, ${d}.`}),t>n||A.push({id:w("axis"),role:"axis",level:2,label:`Value axis: ${y}, ${a(t)} to ${a(n)}.`})}if(v){const n=X(v,v),o=new Map;for(const e of c){const t=(n(e)??"—")+"",r=o.get(t);r?r.push(e):o.set(t,[e])}const a=[];for(const[n,i]of o){const o=ke(e,{...t,data:i},{levels:["l2","l3"],locale:r}).text;a.push({id:w("series"),role:"series",level:2,label:`Series ${n}: ${o}`,children:C(i,3)})}s.children=[...A,...a]}else s.children=[...A,...C(c,2)];return l&&s.children.push(l),s}var Re=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function Fe(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function De(e){return Fe(e)?e:void 0}function Ne(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function Le(e){const t=Ne(e);return null==t?void 0:Math.max(0,Math.floor(t))}function Me(...e){return e.map(De).find(Boolean)}function Ee(...e){return e.find(Array.isArray)}function Te(e){const t={};for(const[n,r]of Object.entries(e))void 0!==r&&(t[n]=r);return t}function Be(e,t,n){return e["string"==typeof t&&t?t:n]}function _e(e){return e instanceof Date?e.toISOString():"number"==typeof e?Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+"":(e??"—")+""}function Ve(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function ze(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function He(e,t,n){const r=e?.filter(e=>!0===De(e)?.sensor).length,o=De(t?.observation),a=De(o?.sensors),i=Ee(n?.activeSensors);return Math.max(r??0,a?Object.keys(a).length:0,i?.length??0)||void 0}function qe(e,t,n={}){const{capability:r,audience:o,locale:a}=n,i=n.levels??["l1","l2","l3"],s=!1!==n.includeStructure,l=ge(e,r),c=ke(e,t,{levels:l?[...i,"l4"]:i,locale:a,capability:r,audience:o}),{l4:u,...d}=c.levels,f=["l1","l2","l3"].map(e=>c.levels[e]).filter(Boolean).join(" "),h={levels:d,text:c.annotations?`${c.annotations} ${f}`.trim():f,...c.annotations?{annotations:c.annotations}:{}};let m;if(l&&u){const e=(p=r)?"fits"in p||"buildProps"in p?{family:p.family}:{family:p.family,intentScores:p.intentScores}:{};m={act:l,sentence:u,family:e.family,intentScores:e.intentScores}}var p;const g=s?Pe(e,t,{maxLeaves:n.maxLeaves,locale:a}):void 0,y=function(e,t,n){if(!1===n)return;const r=Fe(n)?n:void 0,o=De(t.physics),a=Me(r?.snapshot,o?.snapshot,t.physicsSnapshot,function(e){const t=De(e);return!!t&&(Fe(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),i=Me(r?.evidence,o?.evidence,t.physicsEvidence,t.settledEvidence),s=Me(r?.config,o?.config,a?.config,t.config),l=Me(De(a?.world),De(o?.world)),c=Me(De(s?.kernel),De(l?.options)),u=Ee(l?.bodies),d=Ee(l?.colliders,s?.colliders),f=Ee(a?.queue,o?.queue),h=Ee(a?.liveBodyOrder),m=Ee(l?.springs),p=Ee(a?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const n=De(e);if(!n)return;const r=Ne(n.count??n.value??n.total??n.bodies??n.events);if(null==r)return;const o=(n.label??n.id??n.name??"container "+(t+1))+"",a=null==n.id?void 0:n.id+"",i=Ne(n.secondary??n.secondaryCount),s=Ne(n.observed??n.observedCount);return Te({id:a,label:o,count:r,secondary:i,secondaryLabel:"string"==typeof n.secondaryLabel?n.secondaryLabel:void 0,observed:s})}).filter(e=>null!=e);if(0===t.length)return;const n=t.reduce((e,t)=>e+t.count,0),r=t.filter(e=>e.count>0).length,o=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:n,populatedCount:r,...o?{leader:o}:{}}}(function(e,t,n,r){const o=De(e.settledProjection),a=De(t?.settledProjection);return Ee(n?.projectionRows,n?.aggregates,e.settledProjectionRows,e.projectionRows,o?.rows,t?.settledProjectionRows,t?.projectionRows,a?.rows,r?.binCounts)}(t,o,r,i)),y=function(e,t){const n=e?.map((e,t)=>{const n=De(e);if(!n)return;const r=Ne(n.count)??0,o=Ne(n.total),a={label:(n.label??n.id??"sediment "+(t+1))+"",count:r};return null!=n.id&&(a.id=n.id+""),null!=o&&(a.total=o),a}).filter(e=>null!=e),r=Le(t?.bins)??n?.length??0,o=Ne(t?.count)??n?.reduce((e,t)=>e+t.count,0)??0,a=Ne(t?.total)??n?.reduce((e,t)=>e+(t.total??0),0),i=n?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==r||0!==o||a)return{bins:r,count:o,...null!=a&&a>0?{total:a}:{},...i?{leader:i}:{}}}(Ee(r?.sediment,o?.sediment,a?.sediment),Me(r?.sedimentTotals,o?.sedimentTotals)),b=h?.length??u?.length??Le(i?.bodyCount),v=function(e){if(e)return e.filter(e=>!0===De(e)?.sleeping).length}(u)??Le(i?.sleepingCount),$=f?.length,w="string"==typeof a?.simulationState?a.simulationState:void 0,C="boolean"==typeof i?.settled?i.settled:w?"settled"===w:null!=b||null!=v||null!=$?null!=b&&v===b&&0===($??0):void 0,A=De(c?.gravity),S=Ne(A?.x),x=Ne(A?.y),k=Te({state:w,settled:C,elapsedSeconds:Ne(a?.elapsedSeconds),paused:"boolean"==typeof a?.paused?a.paused:void 0,visible:"boolean"==typeof a?.visible?a.visible:void 0,seed:Ne(c?.seed),gravity:null!=S&&null!=x?{x:S,y:x}:void 0,fixedDt:Ne(s?.fixedDt??c?.fixedDt),timeScale:Ne(s?.timeScale),maxSubsteps:Le(s?.maxSubsteps),liveBodies:b,sleepingBodies:v,queued:$,bodyLimit:Ne(s?.bodyLimit),eviction:"string"==typeof s?.eviction?s.eviction:void 0}),j=Te({colliders:d?.length,sensors:He(d,s,l),springs:m?.length,activeSensorPairs:p?.length}),I=Object.keys(j).length>0,O=Re.has(e);if(!(Object.keys(k).length>0||I||g||y)||!O&&null==n)return;const P={simulation:k,...I?{geometry:j}:{},...g?{aggregates:g}:{},...y?{sediment:y}:{}},R=function(e){const t=[],n=e.simulation,r=[n.state??(n.settled?"settled":void 0),null!=n.liveBodies?`${n.liveBodies} live ${Ve(n.liveBodies,"body")}`:void 0,null!=n.sleepingBodies?n.sleepingBodies+" sleeping":void 0,null!=n.queued?n.queued+" queued":void 0,null!=n.seed?"seed "+ze(n.seed):void 0,n.gravity?`gravity (${ze(n.gravity.x)}, ${ze(n.gravity.y)})`:void 0,null!=n.fixedDt?`fixed step ${ze(n.fixedDt)}s`:void 0,null!=n.timeScale?ze(n.timeScale)+"x time":void 0].filter(Boolean);r.length>0&&t.push(`Physics simulation: ${r.join("; ")}.`);const o=e.geometry;if(o){const e=[null!=o.colliders?`${o.colliders} ${Ve(o.colliders,"collider")}`:void 0,null!=o.sensors?`${o.sensors} ${Ve(o.sensors,"sensor")}`:void 0,null!=o.springs?`${o.springs} ${Ve(o.springs,"spring")}`:void 0,null!=o.activeSensorPairs?`${o.activeSensorPairs} active sensor ${Ve(o.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const a=e.aggregates;if(a){const e=a.leader,n=e?` Largest is ${e.label} with ${ze(e.count)}.`:"";t.push(`Physics aggregates: ${ze(a.totalCount)} settled ${Ve(a.totalCount,"body")} across ${a.rows.length} ${Ve(a.rows.length,"container")}; ${a.populatedCount} populated.${n}`)}const i=e.sediment;if(i){const e=null!=i.total?", value total "+ze(i.total):"",n=i.leader?`; largest sediment bin is ${i.leader.label} with ${ze(i.leader.count)}`:"";t.push(`Physics sediment: ${i.count} retained ${Ve(i.count,"body")} in ${i.bins} ${Ve(i.bins,"bin")}${e}${n}.`)}return t.join(" ")}(P);return{...P,text:R}}(e,t,n.physics),b=function(e,t,n){const r=[];if("GaugeChart"===e){"number"==typeof t.value&&Number.isFinite(t.value)&&r.push(`Current value is ${_e(t.value)}.`);const e="number"==typeof t.min&&Number.isFinite(t.min)?t.min:0,n="number"==typeof t.max&&Number.isFinite(t.max)?t.max:100;r.push(`The gauge scale runs from ${_e(e)} to ${_e(n)}.`)}if("SankeyDiagram"===e||"ProcessSankey"===e){const e=Array.isArray(t.edges)?t.edges:[];if(e.length>0){r.push(`${e.length} source flow${1===e.length?"":"s"} are supplied.`);for(const o of e.slice(0,n)){const e=Be(o,t.sourceAccessor,"source"),n=Be(o,t.targetAccessor,"target"),a=Be(o,t.valueAccessor,"value");r.push(`${_e(e)} to ${_e(n)} has value ${_e(a)}.`)}}}if("Treemap"===e||"CirclePack"===e||"TreeDiagram"===e||"OrbitDiagram"===e){const e=De(t.data),o="string"==typeof t.childrenAccessor&&t.childrenAccessor?t.childrenAccessor:"children",a="string"==typeof t.valueAccessor&&t.valueAccessor?t.valueAccessor:"value",i="string"==typeof t.nodeIdAccessor&&t.nodeIdAccessor?t.nodeIdAccessor:"string"==typeof t.nodeIDAccessor&&t.nodeIDAccessor?t.nodeIDAccessor:"name",s=[],l=e=>{const t=Array.isArray(e[o])?e[o]:[];if(0!==t.length)for(const e of t){const t=De(e);t&&l(t)}else s.push(e)};if(e&&l(e),s.length>0){r.push(s.length+" hierarchy leaves are supplied.");for(const e of s.slice(0,n))r.push(`${_e(e[i])} has value ${_e(e[a])}.`)}}if(Re.has(e)&&Array.isArray(t.data)){const n=t.data;r.push(`${n.length} observed source row${1===n.length?"":"s"} are supplied.`);const o="CollisionSwarmChart"===e?t.xAccessor:t.valueAccessor,a="CollisionSwarmChart"===e?"x":"value",i=n.map(e=>Ne(Be(e,o,a))).filter(e=>null!=e);i.length>0&&r.push(`Observed ${"string"==typeof o?o:a} ranges from ${_e(Math.min(...i))} to ${_e(Math.max(...i))}.`)}if(0!==r.length)return{source:"chart-props",statements:r,text:"Exact chart-prop facts: "+r.join(" ")}}(e,t,Math.max(1,n.maxLeaves??200)),v=[h.text,m?.sentence,y?.text,b?.text].filter(Boolean).join(" ");return{component:e,description:h,intent:m,structure:g,physics:y,facts:b,text:v}}var Ge=["data","nodes","edges","points","areas","lines","flows"],Ue=[["xAccessor","x"],["yAccessor","y"],["categoryAccessor","category"],["valueAccessor","value"],["colorBy","color"],["sizeAccessor","size"],["lineBy","series"],["groupAccessor","group"],["oAccessor","ordinal"],["rAccessor","radial"],["sourceAccessor","source"],["targetAccessor","target"],["nodeIDAccessor","id"]],Ke=1;function Je(e,t){const n=e.trim();if(!n)throw Error(t+" must be a non-empty string.");return encodeURIComponent(n)}function We(e,...t){return`${e}/${t.map(e=>Je(e,"VACP ref segment")).join("/")}`}function Qe(e){const t=e.now?.()??new Date,n=t instanceof Date?t:new Date(t);if(!Number.isFinite(n.getTime()))throw Error("VACP bridge clock returned an invalid date.");return n.toISOString()}function Xe(e){try{const{createdAt:t,...n}=function(e,t,n){const r=N(e)??L(t.recipe)??L(t.recipeId);if(r)return function(e,t,n){const r=function(e,t,n){const r={};for(const[o,a]of Object.entries(e))if(null!=a&&!G.has(o)&&"recipeId"!==o&&(t||!J(o,a)))if("function"==typeof a||a?.$$typeof){if(n)throw Error(`Portable recipe prop "${o}" is not JSON-safe.`)}else if(F(a))r[o]=W(a);else if(n)throw Error(`Portable recipe prop "${o}" is not JSON-safe.`);return r}(t,!1!==n?.includeData,"portable"===e.portability),o=e.intents.map(M).filter(e=>!!e),a={name:e.name,intents:o,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily};if("portable"===e.portability){if(!F(r))throw Error(`Portable recipe "${e.id}" contains non-JSON-safe props or layoutConfig.`);return{component:"ChartRecipe",recipeId:e.id,portable:!0,props:r,manifest:a,version:q,createdAt:(new Date).toISOString(),...n?.selections?{selections:n.selections}:{}}}return{component:"ChartRecipe",recipeId:e.id,portable:!1,reason:"Recipe contains or may depend on non-serializable local layout callbacks.",warnings:["This config is inspectable but cannot be rendered remotely by CLI or MCP."],props:r,manifest:a,version:q,createdAt:(new Date).toISOString(),...n?.selections?{selections:n.selections}:{}}}(r,t,n);if(!function(e){return R.has(e)}(e))throw Error(`Unknown component "${e}". Known components: ${P.join(", ")}`);const o=!1!==n?.includeData,a={};for(const[e,n]of Object.entries(t))if(null!=n&&!G.has(e)&&(o||!J(e,n))&&"function"!=typeof n&&!n?.$$typeof)try{a[e]=W(K(n))}catch{}return{component:e,props:a,version:q,createdAt:(new Date).toISOString(),...n?.selections?{selections:n.selections}:{}}}(e.component,e.props,{includeData:!1});return l(n)}catch(t){const n=Object.create(null);for(const[t,r]of Object.entries(e.props)){if(Ge.includes(t)||"function"==typeof r)continue;const e=s(r);void 0!==e&&(n[t]=e)}return{component:e.component,props:n,version:"unregistered",warning:t instanceof Error?t.message:"Chart config could not be serialized by toConfig."}}}function Ye(e){return qe(e.component,e.props,{...e.grounding,audience:e.audience,includeStructure:!0,maxLeaves:Ke})}function Ze(e,t){const n=[];for(const r of Ge){const o=e.props[r];Array.isArray(o)&&n.push({ref:t.data(e.chartId,r),chartId:e.chartId,collection:r,rows:o})}return n}function et(e,t){t(e);for(const n of e.children??[])et(n,t)}function tt(e,t){if(!t)return;let n;return et(e,e=>{n||e.id!==t||(n=e)}),n}function nt(e){return null==e||"string"==typeof e||"number"==typeof e&&Number.isFinite(e)||"boolean"==typeof e||e instanceof Date&&Number.isFinite(e.getTime())}function rt(e,t){if("datum"!==e.role||!e.datum)return;const n=Object.create(null);for(const r of t){if(!Object.prototype.hasOwnProperty.call(e.datum,r)||!nt(e.datum[r]))return;n[r]=e.datum[r]instanceof Date?e.datum[r].toISOString():e.datum[r]}return n}function ot(e,t){const n=Array.from(new Set(e.matchFields.map(e=>e.trim()).filter(Boolean))),r=new Map;if(!n.length)return{valid:!1,diagnostic:"Navigation actions require at least one durable match field.",byKey:r,matchFields:n,targetRef:()=>We(t,"target","invalid")};let o,a=0,i=0,s=!1;return et(e.tree,e=>{if("datum"!==e.role)return;a++;const t=rt(e,n);if(!t)return void i++;const o=d(t);r.has(o)?s=!0:r.set(o,e)}),a?i?o=i+" navigation leaves lack durable primitive match-field values.":s&&(o="Navigation match fields do not uniquely identify every datum leaf."):o="Navigation tree has no datum leaves.",{valid:!o,...o?{diagnostic:o}:{},byKey:r,matchFields:n,targetRef:e=>We(t,"target",d(e))}}function at(e,t){const{chart:n,ref:r,configRef:o,grounding:a}=e,s=[{ref:r,kind:"Visualization",layer:"VisualizationLayer",title:n.title??(n.props.title??n.component)+"",description:n.description??a.text,data:l({component:n.component,grounding:{description:a.description,intent:a.intent,physics:a.physics,text:a.text},audience:n.audience})},{ref:o,kind:"Param",layer:"ConfigLayer",title:n.component+" configuration",description:"Serializable Semiotic chart configuration with raw data collections omitted.",data:e.config}],c=[{from:e.ref,to:o,kind:"contains"}],u=(a.structure?.children??[]).filter(e=>"axis"===e.role).map(e=>e.label);let d=0;for(const[e,t]of Ue){const o=n.props[e];if("string"!=typeof o||!o.trim())continue;const a=We(r,"encoding",t);if(s.push({ref:a,kind:"EncodingChannel",layer:"VisualizationLayer",title:`${t} → ${o}`,data:{channel:t,field:o,accessorProp:e}}),c.push({from:r,to:a,kind:"contains"}),"x"===t||"y"===t||"category"===t||"value"===t||"ordinal"===t||"radial"===t){const e=We(r,"axis",t);s.push({ref:e,kind:"Axis",layer:"VisualizationLayer",title:u[d++]??`${t} axis: ${o}`,data:{channel:t,field:o}}),c.push({from:r,to:e,kind:"contains"}),c.push({from:e,to:a,kind:"derivedFrom"})}}for(const o of e.dataHandles)s.push({ref:o.ref,kind:"DataHandle",layer:"DataLayer",title:`${n.chartId}.${o.collection}`,description:"Bounded details-on-demand handle. Use vacp.data_schema before requesting an opt-in sample.",data:{collection:o.collection,rowCount:o.rows.length,schemaAction:A,...t.dataAccess?.sample?{inspectAction:w}:{}}}),c.push({from:r,to:o.ref,kind:"contains"});if(e.navigation){const{navigation:t}=e;s.push({ref:t.ref,kind:"Selection",layer:"InteractionFeedbackLayer",title:(n.title??n.component)+" structured navigation",description:t.index.diagnostic??"Active accessible-navigation target identified by durable datum fields.",data:{matchFields:t.index.matchFields,targetCount:t.index.byKey.size,status:t.index.valid?t.binding.onActiveChange?"actionable":"read-only":"ambiguous"}}),c.push({from:r,to:t.ref,kind:"contains"})}if(t.getObservations){const e=We(r,"interaction","latest-observation");s.push({ref:e,kind:"InteractionTarget",layer:"InteractionFeedbackLayer",title:(n.title??n.component)+" latest observation",description:"Latest semantic hover, focus, selection, brush, activation, or control observation."}),c.push({from:r,to:e,kind:"contains"})}const f=Array.isArray(n.props.annotations)?n.props.annotations:[],h=new Set;for(const e of f){if(!i(e))continue;const t=i(e.provenance)?e.provenance:void 0,o=e.id??e.stableId??t?.stableId,a=null==o||""===o?void 0:o+"";if(!a)continue;const u=i(e.note)?e.note:void 0,d=i(e.noteData)?e.noteData:void 0,f=We(r,"annotation",a);if(h.has(f))throw Error(`Duplicate stable annotation id "${a.trim()}" in VACP chart "${n.chartId}".`);h.add(f),s.push({ref:f,kind:"InteractionTarget",layer:"VisualizationLayer",title:(e.label??u?.label??d?.label??"Annotation "+a)+"",description:"string"==typeof e.note?e.note:"string"==typeof e.description?e.description:void 0,data:l({id:a,provenance:t,lifecycle:e.lifecycle})}),c.push({from:r,to:f,kind:"contains"})}return{nodes:s,edges:c}}function it(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.chartId===t)return r}}function st(e,t){const n=function(e,t){const n=function(e){const t="function"==typeof e?e():e,n=new Set;for(const e of t){const t=e.chartId.trim();if(!t)throw Error("Every VACP chart requires a non-empty chartId.");if(n.has(t))throw Error(`Duplicate VACP chartId "${t}".`);n.add(t)}return t}(e.charts),r=n.map(e=>{const n=t.visualization(e.chartId),r=e.navigation?{ref:t.navigation(e.chartId),chartRef:n,chartId:e.chartId,binding:e.navigation,index:ot(e.navigation,t.navigation(e.chartId))}:void 0;return{chart:e,ref:n,configRef:t.config(e.chartId),grounding:Ye(e),config:Xe(e),dataHandles:Ze(e,t),...r?{navigation:r}:{}}}),o=function(e,t){const n=new Map;for(const t of e)for(const e of t.chart.selections??[]){const r=e.name.trim();if(!r)throw Error("VACP selection names must be non-empty.");const o=n.get(r)??{fields:new Set,modes:new Set,chartRefs:new Set};for(const t of e.fields.map(e=>e.trim()))t&&o.fields.add(t);if("interval"!==e.mode&&o.modes.add("point"),"point"!==e.mode&&o.modes.add("interval"),e.clientId){if(o.clientId&&o.clientId!==e.clientId)throw Error(`Selection "${r}" declares conflicting VACP clientIds.`);o.clientId=e.clientId}o.chartRefs.add(t.ref),n.set(r,o)}return Array.from(n).sort(([e],[t])=>e.localeCompare(t)).map(([e,n])=>{if(0===n.fields.size)throw Error(`Selection "${e}" requires at least one allowlisted field.`);return{ref:t.selection(e),name:e,fields:Array.from(n.fields).sort(),modes:n.modes,clientId:n.clientId??"__semiotic-vacp__:"+e,chartRefs:Array.from(n.chartRefs)}})}(r,t),a=r.flatMap(e=>e.dataHandles),i=[{ref:t.app,kind:"App",layer:"ViewLayer",title:e.title??e.appId,description:"Semiotic application state exposed through the experimental VACP 0.1.0 bridge.",data:{provider:"semiotic",protocol:C}},{ref:t.view,kind:"View",layer:"ViewLayer",title:e.title??e.viewId??"Semiotic charts"}],s=[{from:t.app,to:t.view,kind:"contains"}];for(const n of r){const r=at(n,e);i.push(...r.nodes),s.push(...r.edges),s.push({from:t.view,to:n.ref,kind:"contains"})}for(const e of o){i.push({ref:e.ref,kind:"Selection",layer:"InteractionFeedbackLayer",title:"Selection: "+e.name,description:"Named LinkedCharts selection. Agent mutations are restricted to declared fields and modes.",data:{name:e.name,fields:e.fields,modes:Array.from(e.modes).sort()}}),s.push({from:t.view,to:e.ref,kind:"contains"});for(const t of e.chartRefs)s.push({from:e.ref,to:t,kind:"controls"})}return{charts:r,selections:o,dataHandles:a,nodes:i,edges:s}}(e,t);return{...n,actions:O(n,e,t)}}function lt(e){const t=e.viewId?.trim()||"main",n=function(e,t){const n="vacp://"+Je(e,"appId"),r=We(n,"view",t),o=e=>We(r,"visualization",e);return{app:n,view:r,visualization:o,config:e=>We(o(e),"config"),data:(e,t="data")=>We(o(e),"data",t),selection:e=>We(r,"selection",e),navigation:e=>We(o(e),"navigation"),observation:e=>We(o(e),"interaction","latest-observation")}}(e.appId,t),r="number"==typeof e.stateCacheSize&&Number.isFinite(e.stateCacheSize)?Math.max(1,Math.floor(e.stateCacheSize)):64,o=new Map;return{version:C,refs:n,getCapabilities:t=>{const r=st(e,n),o={version:C,createdAt:Qe(e),graph:{version:C,nodes:r.nodes,edges:r.edges,actions:r.actions.map(e=>e.descriptor)}};return t?function(e,t){const n=function(e){return{refs:f(e.refs),prefixes:f(e.prefixes),kinds:e.kinds?.length?new Set(e.kinds):void 0,layers:e.layers?.length?new Set(e.layers):void 0,includeActions:!1!==e.includeActions,includeEdges:!1!==e.includeEdges,includeNodeData:!1!==e.includeNodeData}}(t),r=e.graph.nodes.filter(e=>function(e,t){return!((t.refs?.length||t.prefixes?.length)&&!t.refs?.includes(e.ref)&&!t.prefixes?.some(t=>e.ref===t||e.ref.startsWith(t+"/")))&&(!t.kinds||t.kinds.has(e.kind))&&(!t.layers||t.layers.has(e.layer))}(e,n)).map(e=>{if(n.includeNodeData)return e;const{data:t,...r}=e;return r}),o=new Set(r.map(e=>e.ref)),a=n.includeActions?e.graph.actions.filter(e=>{if(!e.targetRef)return!0;if(o.has(e.targetRef))return!0;for(const t of o)if(t.startsWith(e.targetRef+"/"))return!0;return!1}):[];return{version:e.version,createdAt:e.createdAt,graph:{version:e.graph.version,nodes:r,edges:n.includeEdges?e.graph.edges.filter(e=>o.has(e.from)&&o.has(e.to)):[],actions:a}}}(o,t):o},getState:async function(t){const a=function(e,t,n){const r={},o={},a=t.getSelections?.()??{},i=t.getObservations?.()??[];for(const a of e.charts){r[a.ref]=l({component:a.chart.component,description:a.grounding.description,intent:a.grounding.intent,physics:a.grounding.physics,audience:a.chart.audience}),r[a.configRef]=a.config,o[a.ref]={component:a.chart.component,dataHandles:a.dataHandles.length};for(const e of a.dataHandles)r[e.ref]={kind:"DataHandle",collection:e.collection,rowCount:e.rows.length},o[e.ref]={rowCount:e.rows.length};if(a.navigation){const e=tt(a.navigation.binding.tree,a.navigation.binding.activeId),t=e?rt(e,a.navigation.index.matchFields):void 0;r[a.navigation.ref]=l({kind:"Selection",status:a.navigation.index.valid?"ready":"ambiguous",activeRole:e?.role,activeLabel:e?.label,activeMatch:t,activeTargetRef:t?a.navigation.index.targetRef(t):void 0,diagnostic:a.navigation.index.diagnostic}),o[a.navigation.ref]={targetCount:a.navigation.index.byKey.size}}if(t.getObservations){const e=it(i,a.chart.chartId);r[n.observation(a.chart.chartId)]=e?l(e):null,e&&(o[n.observation(a.chart.chartId)]={type:e.type,timestamp:e.timestamp})}}for(const t of e.selections){const e=a[t.name];r[t.ref]=(e?l(e):void 0)??{name:t.name,resolution:"union",clauses:[]},o[t.ref]={active:!!e?.clauses.length,clauseCount:e?.clauses.length??0,fields:t.fields}}return{version:C,createdAt:Qe(t),state:r,...Object.keys(o).length?{summary:o}:{}}}(st(e,n),e,n);if(!t)return a;const{snapshot:i,refs:s}=m(a,t),c="st_"+d({state:(u=i).state,...u.summary?{summary:u.summary}:{}});var u;const f=t.since?o.get(t.since):void 0;let h;if("full"!==t.mode&&t.since&&f){const e=m(f,t).snapshot;h={version:C,createdAt:i.createdAt,mode:"delta",token:c,baseToken:t.since,...s?{scope:{refs:s}}:{},delta:p(e,i)}}else h={version:C,createdAt:i.createdAt,mode:"full",token:c,...s?{scope:{refs:s}}:{},snapshot:i};return((e,t)=>{for(o.has(e)&&o.delete(e),o.set(e,t);o.size>r;){const e=o.keys().next().value;if("string"!=typeof e)break;o.delete(e)}})(c,a),h},execute:async t=>{const r=t&&"string"==typeof t.callId?t.callId:"";try{if(!t||"string"!=typeof t.name||!t.name.trim())throw Error("VACP action call requires a non-empty name.");if(!r)throw Error("VACP action call requires a callId.");const o=st(e,n),a=o.actions.find(e=>e.descriptor.name===t.name);if(!a)return{callId:r,ok:!1,error:{message:`Unknown or currently unavailable VACP action "${t.name}".`,details:{available:o.actions.map(e=>e.descriptor.name)}}};const i=s(await a.execute(t.params));return{callId:r,ok:!0,...void 0!==i?{result:i}:{}}}catch(e){return{callId:r,ok:!1,error:{message:e instanceof Error?e.message:"VACP action failed."}}}}}}function ct(e,t={}){const n=t.globalKey?.trim()||"__vacp",r=t.target??("undefined"!=typeof window?window:void 0);if(!r)return{installed:!1,globalKey:n,bridge:e,reason:`Refused to install "${n}" without a browser window or an explicit target.`,cleanup:()=>!1};if("__proto__"===n||"prototype"===n||"constructor"===n)return{installed:!1,globalKey:n,bridge:e,reason:`Refused unsafe global key "${n}".`,cleanup:()=>!1};const o=r[n];if(void 0!==o&&o!==e)return{installed:!1,globalKey:n,bridge:e,reason:`Refused to replace existing global "${n}".`,cleanup:()=>!1};try{r[n]=e}catch(t){return{installed:!1,globalKey:n,bridge:e,reason:t instanceof Error?`Could not install "${n}": ${t.message}`:`Could not install "${n}".`,cleanup:()=>!1}}return{installed:!0,globalKey:n,bridge:e,cleanup:()=>{if(r[n]!==e)return!1;try{return delete r[n]}catch{return!1}}}}
@@ -0,0 +1 @@
1
+ import{buildReaderGrounding as e,toConfig as t}from"./chunk-chunk-XEGXX4F7.module.min.js";import"./chunk-chunk-XFRBLXYM.module.min.js";function n(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function r(e,t={}){const n="number"==typeof t.maxDepth&&Number.isFinite(t.maxDepth)?Math.max(1,Math.floor(t.maxDepth)):10,r="number"==typeof t.maxArrayLength&&Number.isFinite(t.maxArrayLength)?Math.max(1,Math.floor(t.maxArrayLength)):1e3,o=new WeakSet,i=(e,t)=>{if(null==e||"string"==typeof e||"boolean"==typeof e)return e;if("number"==typeof e)return Number.isFinite(e)?e:e+"";if("bigint"==typeof e)return""+e;if("function"==typeof e||"symbol"==typeof e||void 0===e)return;if(e instanceof Date)return e.toISOString();if(t>=n)return"[depth limit]";if("object"!=typeof e)return e+"";if("$$typeof"in e)return;if(o.has(e))return"[circular]";if(o.add(e),Array.isArray(e)){const n=e.slice(0,r).map(e=>i(e,t+1)).filter(e=>void 0!==e);return o.delete(e),n}if(e instanceof Set){const n=Array.from(e).slice(0,r).map(e=>i(e,t+1)).filter(e=>void 0!==e);return o.delete(e),n}if(e instanceof Map){const n=Object.create(null);let a=0;for(const[o,s]of e){if(a++>=r)break;const e=i(s,t+1);void 0!==e&&(n[o+""]=e)}return o.delete(e),n}const a=Object.create(null);for(const n of Object.keys(e).sort()){const r=i(e[n],t+1);void 0!==r&&(a[n]=r)}return o.delete(e),a};return i(e,0)}function o(e){const t=r(e);return n(t)?t:{}}function i(e){if(Array.isArray(e))return e.map(i);if(!n(e))return e;const t=Object.create(null);for(const n of Object.keys(e).sort())t[n]=i(e[n]);return t}function a(e){return JSON.stringify(i(r(e)))}function s(e){return function(e){let t=BigInt("14695981039346656037");const n=BigInt("1099511628211"),r=BigInt("0xffffffffffffffff");for(let o=0;e.length>o;o++)t^=BigInt(e.charCodeAt(o)),t=t*n&r;return t.toString(16).padStart(16,"0")}(a(e))}function c(e){if(!e?.length)return;const t=Array.from(new Set(e.filter(e=>"string"==typeof e&&e.length))).sort();return t.length?t:void 0}function l(e,t){return t.some(t=>e===t||e.startsWith(t+"/"))}function f(e,t){const n=c(t.refs),r=!1!==t.includeSummary;if(!n)return{snapshot:{version:e.version,createdAt:e.createdAt,state:e.state,...r&&e.summary?{summary:e.summary}:{}}};const o={};for(const[t,r]of Object.entries(e.state))l(t,n)&&(o[t]=r);const i={};if(r&&e.summary)for(const[t,r]of Object.entries(e.summary))l(t,n)&&(i[t]=r);return{snapshot:{version:e.version,createdAt:e.createdAt,state:o,...Object.keys(i).length?{summary:i}:{}},refs:n}}function d(e,t){const n={},r=[];for(const[r,o]of Object.entries(t.state))Object.prototype.hasOwnProperty.call(e.state,r)&&a(e.state[r])===a(o)||(n[r]=o);for(const n of Object.keys(e.state))Object.prototype.hasOwnProperty.call(t.state,n)||r.push(n);const o={},i=[],s=e.summary??{},c=t.summary??{};for(const[e,t]of Object.entries(c))Object.prototype.hasOwnProperty.call(s,e)&&a(s[e])===a(t)||(o[e]=t);for(const e of Object.keys(s))Object.prototype.hasOwnProperty.call(c,e)||i.push(e);return{changed:n,removed:r.sort(),...Object.keys(o).length?{summaryChanged:o}:{},...i.length?{summaryRemoved:i.sort()}:{}}}function u(e){return null==e?"NULL":"number"==typeof e?"DOUBLE":"string"==typeof e?"VARCHAR":"boolean"==typeof e?"BOOLEAN":e instanceof Date?"TIMESTAMP":Array.isArray(e)?"ARRAY":"OBJECT"}var m="semiotic.set_point_selection",p="semiotic.set_interval_selection",h="semiotic.clear_selection",g="semiotic.activate_navigation_node",y="semiotic.inspect_data",b="0.1.0",v="vacp.data_schema";function w(e,t){if(!t.descriptor.name.trim())throw Error("VACP action names must be non-empty.");if(e.some(e=>e.descriptor.name===t.descriptor.name))throw Error(`Duplicate VACP action "${t.descriptor.name}".`);e.push(t)}function A(e,t){if(!n(e))throw Error(t+" expects an object parameter payload.");return e}function I(e,t){return"number"==typeof e&&Number.isFinite(e)?Math.max(1,Math.floor(e)):t}function R(e,t,n){if("string"!=typeof e.selectionRef)throw Error("params.selectionRef must be a VACP selection ref.");const r=t.find(t=>t.ref===e.selectionRef);if(!r)throw Error(`Unknown selection ref "${e.selectionRef}".`);if(n&&!r.modes.has(n))throw Error(`Selection "${r.name}" does not accept ${n} state.`);return r}function S(e){return null==e||"string"==typeof e||"number"==typeof e&&Number.isFinite(e)||"boolean"==typeof e||e instanceof Date&&Number.isFinite(e.getTime())}function C(e,t,i){const a=[],c=e.dataHandles.map(e=>e.ref);c.length&&w(a,{descriptor:{name:v,title:"Describe Semiotic data",description:"Return columns, types, row count, and optional bounded summaries for a chart DataHandle.",targetRef:i.view,parameters:{type:"object",properties:{handleRef:{type:"string",enum:c},detail:{type:"string",enum:["columns","full"]},sampleRows:{type:"number",minimum:1}},required:["handleRef"]}},execute(r){const o=A(r,v);if("string"!=typeof o.handleRef)throw Error("params.handleRef must be a DataHandle ref.");const i=e.dataHandles.find(e=>e.ref===o.handleRef);if(!i)throw Error(`Unknown DataHandle "${o.handleRef}".`);const a=void 0===o.detail||"columns"===o.detail?"columns":"full"===o.detail?"full":(()=>{throw Error('params.detail must be "columns" or "full".')})(),s="number"==typeof o.sampleRows&&Number.isFinite(o.sampleRows)?Math.max(1,Math.floor(o.sampleRows)):"full"===a?1e3:Math.min(i.rows.length,1e3),c=I(t.dataAccess?.maxSchemaRows,5e3);return function(e){const t=e.rows.slice(0,Math.max(0,e.sampleRows)),r=function(e){const t=new Map;for(const r of e)if(n(r))for(const[e,n]of Object.entries(r)){const r=t.get(e)??new Set;r.add(u(n)),t.set(e,r)}return Array.from(t).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>{const n=Array.from(t).filter(e=>"NULL"!==e);return{name:e,type:0===n.length?"NULL":1===new Set(n).size?n[0]:"MIXED"}})}(e.rows),o=r.map(e=>e.name);if("columns"===e.detail)return{handleRef:e.handleRef,detail:e.detail,table:null,rowCount:e.rows.length,columns:r};const i=function(e,t){const r=Object.create(null);for(const o of t){const t=[];for(const r of e){if(!n(r))continue;const e=r[o];"number"==typeof e&&Number.isFinite(e)&&t.push(e)}if(!t.length)continue;let i=t[0],a=t[0],s=0;for(const e of t)i=Math.min(i,e),a=Math.max(a,e),s+=e;r[o]={min:i,max:a,avg:s/t.length}}return Object.keys(r).length?r:void 0}(t,o),a=function(e,t){const r=Object.create(null);for(const o of t){const t=[];for(const r of e){if(!n(r))continue;const e=r[o];e instanceof Date&&Number.isFinite(e.getTime())&&t.push(e.getTime())}if(!t.length)continue;const i=Math.min(...t),a=Math.max(...t);r[o]={minIso:new Date(i).toISOString(),maxIso:new Date(a).toISOString(),minEpochMs:i,maxEpochMs:a}}return Object.keys(r).length?r:void 0}(t,o),s=function(e,t){const r=Object.create(null);for(const o of t){const t=new Map;for(const r of e){if(!n(r))continue;const e=r[o];if("string"!=typeof e&&"boolean"!=typeof e)continue;const i=e+"";t.set(i,(t.get(i)??0)+1)}t.size&&(r[o]=Array.from(t).sort(([e,t],[n,r])=>r-t||e.localeCompare(n)).slice(0,10).map(([e,t])=>({value:e,n:t})))}return Object.keys(r).length?r:void 0}(t,o);return{handleRef:e.handleRef,detail:e.detail,table:null,rowCount:e.rows.length,columns:r,...i?{numeric:i}:{},...a?{temporal:a}:{},...s?{categoricalTopValues:s}:{},sampledRows:t.length}}({handleRef:i.ref,rows:i.rows,detail:a,sampleRows:Math.min(s,c)})}}),c.length&&t.dataAccess?.sample&&w(a,{descriptor:{name:y,title:"Inspect bounded Semiotic rows",description:"Return a bounded JSON sample from a chart DataHandle. This action is opt-in.",targetRef:i.view,parameters:{type:"object",properties:{handleRef:{type:"string",enum:c},offset:{type:"number",minimum:0},limit:{type:"number",minimum:1}},required:["handleRef"]}},execute(n){const o=A(n,y);if("string"!=typeof o.handleRef)throw Error("params.handleRef must be a DataHandle ref.");const i=e.dataHandles.find(e=>e.ref===o.handleRef);if(!i)throw Error(`Unknown DataHandle "${o.handleRef}".`);const a="number"==typeof o.offset&&Number.isFinite(o.offset)?Math.max(0,Math.floor(o.offset)):0,s=I(t.dataAccess?.maxSampleRows,50),c="number"==typeof o.limit&&Number.isFinite(o.limit)?Math.max(1,Math.floor(o.limit)):Math.min(20,s),l=Math.min(c,s),f=i.rows.slice(a,a+l);return{handleRef:i.ref,offset:a,limit:l,rowCount:i.rows.length,rows:r(f,{maxArrayLength:s}),truncated:i.rows.length>a+f.length}}});const l=e.selections.map(e=>e.ref),f=e.selections.filter(e=>e.modes.has("point"));f.length&&t.selectionActions?.setPointSelection&&w(a,{descriptor:{name:m,title:"Set point selection",description:"Set a named LinkedCharts point-selection clause with allowlisted fields.",targetRef:i.view,parameters:{type:"object",properties:{selectionRef:{type:"string",enum:f.map(e=>e.ref)},fields:{type:"object"}},required:["selectionRef","fields"]}},async execute(r){const o=A(r,m),i=R(o,e.selections,"point"),a=function(e,t){if(!n(e)||!Object.keys(e).length)throw Error("params.fields must be a non-empty object.");const r=Object.create(null);for(const[n,o]of Object.entries(e)){if(!t.includes(n))throw Error(`Field "${n}" is not allowed for this selection.`);if(!Array.isArray(o)||!o.length)throw Error(`Point selection field "${n}" requires values[].`);for(const e of o)if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&("number"!=typeof e||!Number.isFinite(e)))throw Error(`Point selection field "${n}" only accepts JSON primitive values.`);r[n]=[...o]}return r}(o.fields,i.fields);return await(t.selectionActions?.setPointSelection?.(i.name,i.clientId,a)),{selectionRef:i.ref,fields:a}}});const d=e.selections.filter(e=>e.modes.has("interval"));d.length&&t.selectionActions?.setIntervalSelection&&w(a,{descriptor:{name:p,title:"Set interval selection",description:"Set a named LinkedCharts interval-selection clause in data units.",targetRef:i.view,parameters:{type:"object",properties:{selectionRef:{type:"string",enum:d.map(e=>e.ref)},fields:{type:"object"}},required:["selectionRef","fields"]}},async execute(r){const o=A(r,p),i=R(o,e.selections,"interval"),a=function(e,t){if(!n(e)||!Object.keys(e).length)throw Error("params.fields must be a non-empty object.");const r=Object.create(null);for(const[n,o]of Object.entries(e)){if(!t.includes(n))throw Error(`Field "${n}" is not allowed for this selection.`);if(!Array.isArray(o)||2!==o.length||"number"!=typeof o[0]||"number"!=typeof o[1]||!Number.isFinite(o[0])||!Number.isFinite(o[1]))throw Error(`Interval selection field "${n}" requires [min,max].`);r[n]=[Math.min(o[0],o[1]),Math.max(o[0],o[1])]}return r}(o.fields,i.fields);return await(t.selectionActions?.setIntervalSelection?.(i.name,i.clientId,a)),{selectionRef:i.ref,fields:a}}}),l.length&&t.selectionActions?.clearSelection&&w(a,{descriptor:{name:h,title:"Clear selection",description:"Clear every active clause from one named LinkedCharts selection.",targetRef:i.view,parameters:{type:"object",properties:{selectionRef:{type:"string",enum:l}},required:["selectionRef"]}},async execute(n){const r=R(A(n,h),e.selections);return await(t.selectionActions?.clearSelection?.(r.name)),{selectionRef:r.ref,cleared:!0}}});const b=e.charts.map(e=>e.navigation).filter(e=>!!e&&e.index.valid&&!!e.binding.onActiveChange);b.length&&w(a,{descriptor:{name:g,title:"Activate chart navigation target",description:"Move an accessible chart navigation tree to a uniquely identified datum.",targetRef:i.view,parameters:{type:"object",properties:{navigationRef:{type:"string",enum:b.map(e=>e.ref)},match:{type:"object"}},required:["navigationRef","match"]}},execute(e){const t=A(e,g);if("string"!=typeof t.navigationRef)throw Error("params.navigationRef must be a navigation ref.");const r=b.find(e=>e.ref===t.navigationRef);if(!r)throw Error(`Unknown navigation ref "${t.navigationRef}".`);const o=function(e,t){if(!n(e))throw Error("params.match must be an object.");for(const n of Object.keys(e))if(!t.includes(n))throw Error(`params.match includes undeclared field "${n}".`);const r=Object.create(null);for(const n of t){if(!Object.prototype.hasOwnProperty.call(e,n)||!S(e[n]))throw Error(`params.match requires a primitive value for "${n}".`);r[n]=e[n]instanceof Date?e[n].toISOString():e[n]}return r}(t.match,r.index.matchFields),i=r.index.byKey.get(s(o));if(!i)throw Error("No navigation datum matches params.match.");return r.binding.onActiveChange?.(i),{navigationRef:r.ref,targetRef:r.index.targetRef(o),match:o}}});const C="function"==typeof t.actions?t.actions():t.actions;for(const e of C??[])e.available&&!e.available()||w(a,{descriptor:{...e.descriptor,...e.descriptor.parameters?{parameters:o(e.descriptor.parameters)}:{}},async execute(t){const n=e.validate?.(t);if("string"==typeof n&&n)throw Error(n);return e.execute(t)}});return a}var O=["data","nodes","edges","points","areas","lines","flows"],k=[["xAccessor","x"],["yAccessor","y"],["categoryAccessor","category"],["valueAccessor","value"],["colorBy","color"],["sizeAccessor","size"],["lineBy","series"],["groupAccessor","group"],["oAccessor","ordinal"],["rAccessor","radial"],["sourceAccessor","source"],["targetAccessor","target"],["nodeIDAccessor","id"]];function x(e,t){const n=e.trim();if(!n)throw Error(t+" must be a non-empty string.");return encodeURIComponent(n)}function E(e,...t){return`${e}/${t.map(e=>x(e,"VACP ref segment")).join("/")}`}function _(e){const t=e.now?.()??new Date,n=t instanceof Date?t:new Date(t);if(!Number.isFinite(n.getTime()))throw Error("VACP bridge clock returned an invalid date.");return n.toISOString()}function j(e){try{const{createdAt:n,...r}=t(e.component,e.props,{includeData:!1});return o(r)}catch(t){const n=Object.create(null);for(const[t,o]of Object.entries(e.props)){if(O.includes(t)||"function"==typeof o)continue;const e=r(o);void 0!==e&&(n[t]=e)}return{component:e.component,props:n,version:"unregistered",warning:t instanceof Error?t.message:"Chart config could not be serialized by toConfig."}}}function N(t){return e(t.component,t.props,{...t.grounding,audience:t.audience,includeStructure:!0,maxLeaves:1})}function M(e,t){const n=[];for(const r of O){const o=e.props[r];Array.isArray(o)&&n.push({ref:t.data(e.chartId,r),chartId:e.chartId,collection:r,rows:o})}return n}function D(e,t){t(e);for(const n of e.children??[])D(n,t)}function P(e,t){if(!t)return;let n;return D(e,e=>{n||e.id!==t||(n=e)}),n}function T(e){return null==e||"string"==typeof e||"number"==typeof e&&Number.isFinite(e)||"boolean"==typeof e||e instanceof Date&&Number.isFinite(e.getTime())}function V(e,t){if("datum"!==e.role||!e.datum)return;const n=Object.create(null);for(const r of t){if(!Object.prototype.hasOwnProperty.call(e.datum,r)||!T(e.datum[r]))return;n[r]=e.datum[r]instanceof Date?e.datum[r].toISOString():e.datum[r]}return n}function L(e,t){const n=Array.from(new Set(e.matchFields.map(e=>e.trim()).filter(Boolean))),r=new Map;if(!n.length)return{valid:!1,diagnostic:"Navigation actions require at least one durable match field.",byKey:r,matchFields:n,targetRef:()=>E(t,"target","invalid")};let o,i=0,a=0,c=!1;return D(e.tree,e=>{if("datum"!==e.role)return;i++;const t=V(e,n);if(!t)return void a++;const o=s(t);r.has(o)?c=!0:r.set(o,e)}),i?a?o=a+" navigation leaves lack durable primitive match-field values.":c&&(o="Navigation match fields do not uniquely identify every datum leaf."):o="Navigation tree has no datum leaves.",{valid:!o,...o?{diagnostic:o}:{},byKey:r,matchFields:n,targetRef:e=>E(t,"target",s(e))}}function $(e,t){const{chart:r,ref:i,configRef:a,grounding:s}=e,c=[{ref:i,kind:"Visualization",layer:"VisualizationLayer",title:r.title??(r.props.title??r.component)+"",description:r.description??s.text,data:o({component:r.component,grounding:{description:s.description,intent:s.intent,physics:s.physics,text:s.text},audience:r.audience})},{ref:a,kind:"Param",layer:"ConfigLayer",title:r.component+" configuration",description:"Serializable Semiotic chart configuration with raw data collections omitted.",data:e.config}],l=[{from:e.ref,to:a,kind:"contains"}],f=(s.structure?.children??[]).filter(e=>"axis"===e.role).map(e=>e.label);let d=0;for(const[e,t]of k){const n=r.props[e];if("string"!=typeof n||!n.trim())continue;const o=E(i,"encoding",t);if(c.push({ref:o,kind:"EncodingChannel",layer:"VisualizationLayer",title:`${t} → ${n}`,data:{channel:t,field:n,accessorProp:e}}),l.push({from:i,to:o,kind:"contains"}),"x"===t||"y"===t||"category"===t||"value"===t||"ordinal"===t||"radial"===t){const e=E(i,"axis",t);c.push({ref:e,kind:"Axis",layer:"VisualizationLayer",title:f[d++]??`${t} axis: ${n}`,data:{channel:t,field:n}}),l.push({from:i,to:e,kind:"contains"}),l.push({from:e,to:o,kind:"derivedFrom"})}}for(const n of e.dataHandles)c.push({ref:n.ref,kind:"DataHandle",layer:"DataLayer",title:`${r.chartId}.${n.collection}`,description:"Bounded details-on-demand handle. Use vacp.data_schema before requesting an opt-in sample.",data:{collection:n.collection,rowCount:n.rows.length,schemaAction:v,...t.dataAccess?.sample?{inspectAction:y}:{}}}),l.push({from:i,to:n.ref,kind:"contains"});if(e.navigation){const{navigation:t}=e;c.push({ref:t.ref,kind:"Selection",layer:"InteractionFeedbackLayer",title:(r.title??r.component)+" structured navigation",description:t.index.diagnostic??"Active accessible-navigation target identified by durable datum fields.",data:{matchFields:t.index.matchFields,targetCount:t.index.byKey.size,status:t.index.valid?t.binding.onActiveChange?"actionable":"read-only":"ambiguous"}}),l.push({from:i,to:t.ref,kind:"contains"})}if(t.getObservations){const e=E(i,"interaction","latest-observation");c.push({ref:e,kind:"InteractionTarget",layer:"InteractionFeedbackLayer",title:(r.title??r.component)+" latest observation",description:"Latest semantic hover, focus, selection, brush, activation, or control observation."}),l.push({from:i,to:e,kind:"contains"})}const u=Array.isArray(r.props.annotations)?r.props.annotations:[],m=new Set;for(const e of u){if(!n(e))continue;const t=n(e.provenance)?e.provenance:void 0,a=e.id??e.stableId??t?.stableId,s=null==a||""===a?void 0:a+"";if(!s)continue;const f=n(e.note)?e.note:void 0,d=n(e.noteData)?e.noteData:void 0,u=E(i,"annotation",s);if(m.has(u))throw Error(`Duplicate stable annotation id "${s.trim()}" in VACP chart "${r.chartId}".`);m.add(u),c.push({ref:u,kind:"InteractionTarget",layer:"VisualizationLayer",title:(e.label??f?.label??d?.label??"Annotation "+s)+"",description:"string"==typeof e.note?e.note:"string"==typeof e.description?e.description:void 0,data:o({id:s,provenance:t,lifecycle:e.lifecycle})}),l.push({from:i,to:u,kind:"contains"})}return{nodes:c,edges:l}}function F(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.chartId===t)return r}}function z(e,t){const n=function(e,t){const n=function(e){const t="function"==typeof e?e():e,n=new Set;for(const e of t){const t=e.chartId.trim();if(!t)throw Error("Every VACP chart requires a non-empty chartId.");if(n.has(t))throw Error(`Duplicate VACP chartId "${t}".`);n.add(t)}return t}(e.charts),r=n.map(e=>{const n=t.visualization(e.chartId),r=e.navigation?{ref:t.navigation(e.chartId),chartRef:n,chartId:e.chartId,binding:e.navigation,index:L(e.navigation,t.navigation(e.chartId))}:void 0;return{chart:e,ref:n,configRef:t.config(e.chartId),grounding:N(e),config:j(e),dataHandles:M(e,t),...r?{navigation:r}:{}}}),o=function(e,t){const n=new Map;for(const t of e)for(const e of t.chart.selections??[]){const r=e.name.trim();if(!r)throw Error("VACP selection names must be non-empty.");const o=n.get(r)??{fields:new Set,modes:new Set,chartRefs:new Set};for(const t of e.fields.map(e=>e.trim()))t&&o.fields.add(t);if("interval"!==e.mode&&o.modes.add("point"),"point"!==e.mode&&o.modes.add("interval"),e.clientId){if(o.clientId&&o.clientId!==e.clientId)throw Error(`Selection "${r}" declares conflicting VACP clientIds.`);o.clientId=e.clientId}o.chartRefs.add(t.ref),n.set(r,o)}return Array.from(n).sort(([e],[t])=>e.localeCompare(t)).map(([e,n])=>{if(0===n.fields.size)throw Error(`Selection "${e}" requires at least one allowlisted field.`);return{ref:t.selection(e),name:e,fields:Array.from(n.fields).sort(),modes:n.modes,clientId:n.clientId??"__semiotic-vacp__:"+e,chartRefs:Array.from(n.chartRefs)}})}(r,t),i=r.flatMap(e=>e.dataHandles),a=[{ref:t.app,kind:"App",layer:"ViewLayer",title:e.title??e.appId,description:"Semiotic application state exposed through the experimental VACP 0.1.0 bridge.",data:{provider:"semiotic",protocol:b}},{ref:t.view,kind:"View",layer:"ViewLayer",title:e.title??e.viewId??"Semiotic charts"}],s=[{from:t.app,to:t.view,kind:"contains"}];for(const n of r){const r=$(n,e);a.push(...r.nodes),s.push(...r.edges),s.push({from:t.view,to:n.ref,kind:"contains"})}for(const e of o){a.push({ref:e.ref,kind:"Selection",layer:"InteractionFeedbackLayer",title:"Selection: "+e.name,description:"Named LinkedCharts selection. Agent mutations are restricted to declared fields and modes.",data:{name:e.name,fields:e.fields,modes:Array.from(e.modes).sort()}}),s.push({from:t.view,to:e.ref,kind:"contains"});for(const t of e.chartRefs)s.push({from:e.ref,to:t,kind:"controls"})}return{charts:r,selections:o,dataHandles:i,nodes:a,edges:s}}(e,t);return{...n,actions:C(n,e,t)}}function H(e){const t=e.viewId?.trim()||"main",n=function(e,t){const n="vacp://"+x(e,"appId"),r=E(n,"view",t),o=e=>E(r,"visualization",e);return{app:n,view:r,visualization:o,config:e=>E(o(e),"config"),data:(e,t="data")=>E(o(e),"data",t),selection:e=>E(r,"selection",e),navigation:e=>E(o(e),"navigation"),observation:e=>E(o(e),"interaction","latest-observation")}}(e.appId,t),i="number"==typeof e.stateCacheSize&&Number.isFinite(e.stateCacheSize)?Math.max(1,Math.floor(e.stateCacheSize)):64,a=new Map;return{version:b,refs:n,getCapabilities:t=>{const r=z(e,n),o={version:b,createdAt:_(e),graph:{version:b,nodes:r.nodes,edges:r.edges,actions:r.actions.map(e=>e.descriptor)}};return t?function(e,t){const n=function(e){return{refs:c(e.refs),prefixes:c(e.prefixes),kinds:e.kinds?.length?new Set(e.kinds):void 0,layers:e.layers?.length?new Set(e.layers):void 0,includeActions:!1!==e.includeActions,includeEdges:!1!==e.includeEdges,includeNodeData:!1!==e.includeNodeData}}(t),r=e.graph.nodes.filter(e=>function(e,t){return!((t.refs?.length||t.prefixes?.length)&&!t.refs?.includes(e.ref)&&!t.prefixes?.some(t=>e.ref===t||e.ref.startsWith(t+"/")))&&(!t.kinds||t.kinds.has(e.kind))&&(!t.layers||t.layers.has(e.layer))}(e,n)).map(e=>{if(n.includeNodeData)return e;const{data:t,...r}=e;return r}),o=new Set(r.map(e=>e.ref)),i=n.includeActions?e.graph.actions.filter(e=>{if(!e.targetRef)return!0;if(o.has(e.targetRef))return!0;for(const t of o)if(t.startsWith(e.targetRef+"/"))return!0;return!1}):[];return{version:e.version,createdAt:e.createdAt,graph:{version:e.graph.version,nodes:r,edges:n.includeEdges?e.graph.edges.filter(e=>o.has(e.from)&&o.has(e.to)):[],actions:i}}}(o,t):o},getState:async function(t){const r=function(e,t,n){const r={},i={},a=t.getSelections?.()??{},s=t.getObservations?.()??[];for(const a of e.charts){r[a.ref]=o({component:a.chart.component,description:a.grounding.description,intent:a.grounding.intent,physics:a.grounding.physics,audience:a.chart.audience}),r[a.configRef]=a.config,i[a.ref]={component:a.chart.component,dataHandles:a.dataHandles.length};for(const e of a.dataHandles)r[e.ref]={kind:"DataHandle",collection:e.collection,rowCount:e.rows.length},i[e.ref]={rowCount:e.rows.length};if(a.navigation){const e=P(a.navigation.binding.tree,a.navigation.binding.activeId),t=e?V(e,a.navigation.index.matchFields):void 0;r[a.navigation.ref]=o({kind:"Selection",status:a.navigation.index.valid?"ready":"ambiguous",activeRole:e?.role,activeLabel:e?.label,activeMatch:t,activeTargetRef:t?a.navigation.index.targetRef(t):void 0,diagnostic:a.navigation.index.diagnostic}),i[a.navigation.ref]={targetCount:a.navigation.index.byKey.size}}if(t.getObservations){const e=F(s,a.chart.chartId);r[n.observation(a.chart.chartId)]=e?o(e):null,e&&(i[n.observation(a.chart.chartId)]={type:e.type,timestamp:e.timestamp})}}for(const t of e.selections){const e=a[t.name];r[t.ref]=(e?o(e):void 0)??{name:t.name,resolution:"union",clauses:[]},i[t.ref]={active:!!e?.clauses.length,clauseCount:e?.clauses.length??0,fields:t.fields}}return{version:b,createdAt:_(t),state:r,...Object.keys(i).length?{summary:i}:{}}}(z(e,n),e,n);if(!t)return r;const{snapshot:c,refs:l}=f(r,t),u="st_"+s({state:(m=c).state,...m.summary?{summary:m.summary}:{}});var m;const p=t.since?a.get(t.since):void 0;let h;if("full"!==t.mode&&t.since&&p){const e=f(p,t).snapshot;h={version:b,createdAt:c.createdAt,mode:"delta",token:u,baseToken:t.since,...l?{scope:{refs:l}}:{},delta:d(e,c)}}else h={version:b,createdAt:c.createdAt,mode:"full",token:u,...l?{scope:{refs:l}}:{},snapshot:c};return((e,t)=>{for(a.has(e)&&a.delete(e),a.set(e,t);a.size>i;){const e=a.keys().next().value;if("string"!=typeof e)break;a.delete(e)}})(u,r),h},execute:async t=>{const o=t&&"string"==typeof t.callId?t.callId:"";try{if(!t||"string"!=typeof t.name||!t.name.trim())throw Error("VACP action call requires a non-empty name.");if(!o)throw Error("VACP action call requires a callId.");const i=z(e,n),a=i.actions.find(e=>e.descriptor.name===t.name);if(!a)return{callId:o,ok:!1,error:{message:`Unknown or currently unavailable VACP action "${t.name}".`,details:{available:i.actions.map(e=>e.descriptor.name)}}};const s=r(await a.execute(t.params));return{callId:o,ok:!0,...void 0!==s?{result:s}:{}}}catch(e){return{callId:o,ok:!1,error:{message:e instanceof Error?e.message:"VACP action failed."}}}}}}function q(e,t={}){const n=t.globalKey?.trim()||"__vacp",r=t.target??("undefined"!=typeof window?window:void 0);if(!r)return{installed:!1,globalKey:n,bridge:e,reason:`Refused to install "${n}" without a browser window or an explicit target.`,cleanup:()=>!1};if("__proto__"===n||"prototype"===n||"constructor"===n)return{installed:!1,globalKey:n,bridge:e,reason:`Refused unsafe global key "${n}".`,cleanup:()=>!1};const o=r[n];if(void 0!==o&&o!==e)return{installed:!1,globalKey:n,bridge:e,reason:`Refused to replace existing global "${n}".`,cleanup:()=>!1};try{r[n]=e}catch(t){return{installed:!1,globalKey:n,bridge:e,reason:t instanceof Error?`Could not install "${n}": ${t.message}`:`Could not install "${n}".`,cleanup:()=>!1}}return{installed:!0,globalKey:n,bridge:e,cleanup:()=>{if(r[n]!==e)return!1;try{return delete r[n]}catch{return!1}}}}export{g as unstable_SEMIOTIC_VACP_ACTIVATE_NAVIGATION_ACTION,h as unstable_SEMIOTIC_VACP_CLEAR_SELECTION_ACTION,y as unstable_SEMIOTIC_VACP_INSPECT_DATA_ACTION,p as unstable_SEMIOTIC_VACP_SET_INTERVAL_SELECTION_ACTION,m as unstable_SEMIOTIC_VACP_SET_POINT_SELECTION_ACTION,v as unstable_VACP_DATA_SCHEMA_ACTION,b as unstable_VACP_SCHEMA_VERSION,H as unstable_createSemioticVACPBridge,q as unstable_installSemioticVACPBridge};
@@ -12,7 +12,10 @@ export { gofishIRExamples as unstable_gofishIRExamples, flowerIR as unstable_gof
12
12
  export type { GofishIRExample as UnstableGofishIRExample } from "./components/recipes/gofishIRExamples";
13
13
  export { DEFAULT_DATA_PITFALLS_ANNOTATION_PALETTE as unstable_DEFAULT_DATA_PITFALLS_ANNOTATION_PALETTE, buildDataPitfallsAnnotationBridge as unstable_buildDataPitfallsAnnotationBridge, buildDataPitfallsBridge as unstable_buildDataPitfallsBridge, buildDataPitfallsNotificationBridge as unstable_buildDataPitfallsNotificationBridge, dataPitfallsFindingToAnnotation as unstable_dataPitfallsFindingToAnnotation, dataPitfallsFindingToNotification as unstable_dataPitfallsFindingToNotification, toDataPitfallsAnnotations as unstable_toDataPitfallsAnnotations, toDataPitfallsChain as unstable_toDataPitfallsChain, toDataPitfallsNotifications as unstable_toDataPitfallsNotifications } from "./components/ai/dataPitfallsBridge";
14
14
  export type { DataPitfallsAnnotationBridge as UnstableDataPitfallsAnnotationBridge, DataPitfallsAnnotationBridgeOptions as UnstableDataPitfallsAnnotationBridgeOptions, DataPitfallsAnnotationType as UnstableDataPitfallsAnnotationType, DataPitfallsBridgeOptions as UnstableDataPitfallsBridgeOptions, DataPitfallsBridgeResult as UnstableDataPitfallsBridgeResult, DataPitfallsChainInput as UnstableDataPitfallsChainInput, DataPitfallsChainStage as UnstableDataPitfallsChainStage, DataPitfallsChartNotification as UnstableDataPitfallsChartNotification, DataPitfallsDocumentInput as UnstableDataPitfallsDocumentInput, DataPitfallsFinding as UnstableDataPitfallsFinding, DataPitfallsImageInput as UnstableDataPitfallsImageInput, DataPitfallsImageMediaType as UnstableDataPitfallsImageMediaType, DataPitfallsImageSource as UnstableDataPitfallsImageSource, DataPitfallsInputKind as UnstableDataPitfallsInputKind, DataPitfallsNotificationBridge as UnstableDataPitfallsNotificationBridge, DataPitfallsNotificationBridgeOptions as UnstableDataPitfallsNotificationBridgeOptions, DataPitfallsNotificationLevel as UnstableDataPitfallsNotificationLevel, DataPitfallsNotificationMessage as UnstableDataPitfallsNotificationMessage, DataPitfallsRenderedChart as UnstableDataPitfallsRenderedChart, DataPitfallsReport as UnstableDataPitfallsReport, DataPitfallsSemioticAnnotation as UnstableDataPitfallsSemioticAnnotation, DataPitfallsSeverity as UnstableDataPitfallsSeverity, DataPitfallsSlideContent as UnstableDataPitfallsSlideContent, DataPitfallsSlidesInput as UnstableDataPitfallsSlidesInput, DataPitfallsSingleArtifactInput as UnstableDataPitfallsSingleArtifactInput, DataPitfallsTextInput as UnstableDataPitfallsTextInput } from "./components/ai/dataPitfallsBridge";
15
- export { IDID_SPEC_VERSION, BUILTIN_INTENT_IDS as unstable_BUILTIN_INTENT_IDS, validatePortableCapability as unstable_validatePortableCapability, validatePortableAudienceProfile as unstable_validatePortableAudienceProfile, validatePortableAnnotation as unstable_validatePortableAnnotation, toVegaLite as unstable_toVegaLite, toVegaLiteResult as unstable_toVegaLiteResult, fromVegaLiteResult as unstable_fromVegaLiteResult, unwrapIDIDEnrichedVegaLiteSpec as unstable_unwrapIDIDEnrichedVegaLiteSpec, attachIDID as unstable_attachIDID, readIDID as unstable_readIDID, attachIDIDAnnotations as unstable_attachIDIDAnnotations, readIDIDAnnotations as unstable_readIDIDAnnotations } from "./components/data/portability";
15
+ export * from "./components/semiotic-experimental-vacp";
16
+ export { SemioticVACPBridge as unstable_SemioticVACPBridge } from "./components/ai/SemioticVACPBridge";
17
+ export type { SemioticVACPBridgeProps as UnstableSemioticVACPBridgeProps } from "./components/ai/SemioticVACPBridge";
18
+ export { IDID_SPEC_VERSION, BUILTIN_INTENT_IDS as unstable_BUILTIN_INTENT_IDS, validatePortableCapability as unstable_validatePortableCapability, validatePortableAudienceProfile as unstable_validatePortableAudienceProfile, validatePortableAnnotation as unstable_validatePortableAnnotation, bindPortableCapability as unstable_bindPortableCapability, toVegaLite as unstable_toVegaLite, toVegaLiteResult as unstable_toVegaLiteResult, fromVegaLiteResult as unstable_fromVegaLiteResult, unwrapIDIDEnrichedVegaLiteSpec as unstable_unwrapIDIDEnrichedVegaLiteSpec, attachIDID as unstable_attachIDID, readIDID as unstable_readIDID, attachIDIDAnnotations as unstable_attachIDIDAnnotations, readIDIDAnnotations as unstable_readIDIDAnnotations } from "./components/data/portability";
16
19
  export type { FromVegaLiteOptions as UnstableFromVegaLiteOptions, PortabilityDiagnostic as UnstablePortabilityDiagnostic, PortabilityDiagnosticSeverity as UnstablePortabilityDiagnosticSeverity, PortabilityExportResult as UnstablePortabilityExportResult, PortabilityImportResult as UnstablePortabilityImportResult, PortabilityLoss as UnstablePortabilityLoss, PortabilityProvenance as UnstablePortabilityProvenance, PortabilityResult as UnstablePortabilityResult, PortabilityStatus as UnstablePortabilityStatus, ToVegaLiteOptions as UnstableToVegaLiteOptions, VegaLiteExportResult as UnstableVegaLiteExportResult, VegaLiteImportResult as UnstableVegaLiteImportResult, } from "./components/data/portability";
17
20
  export { fromObservablePlot as unstable_fromObservablePlot } from "./components/data/fromObservablePlot";
18
21
  export { fromMermaid as unstable_fromMermaid } from "./components/data/fromMermaid";
@@ -42,8 +45,8 @@ export type { PhysicsBodySelection as UnstablePhysicsBodySelection, PhysicsBodyS
42
45
  export type { PhysicsCustomChartProps as UnstablePhysicsCustomChartProps, PhysicsCustomLayout as UnstablePhysicsCustomLayout, PhysicsCustomLayoutContext as UnstablePhysicsCustomLayoutContext, PhysicsCustomLayoutResult as UnstablePhysicsCustomLayoutResult, PhysicsCustomSpawnDatumResult as UnstablePhysicsCustomSpawnDatumResult } from "./components/charts/physics/PhysicsCustomChart";
43
46
  export type { PhysicsExecution as UnstablePhysicsExecution } from "./components/stream/physics/PhysicsWorkerProtocol";
44
47
  export type { PhysicsAnnotationAxis as UnstablePhysicsAnnotationAxis, PhysicsAnnotationColliderOptions as UnstablePhysicsAnnotationColliderOptions, PhysicsAnnotationRole as UnstablePhysicsAnnotationRole, PhysicsAnnotationSummary as UnstablePhysicsAnnotationSummary, PhysicsBodyAnnotation as UnstablePhysicsBodyAnnotation, PhysicsResolvedBodyAnnotation as UnstablePhysicsResolvedBodyAnnotation, PhysicsStaticAnnotation as UnstablePhysicsStaticAnnotation } from "./components/stream/physics/PhysicsAnnotations";
45
- export type { PhysicsEvidenceBinCount as UnstablePhysicsEvidenceBinCount, PhysicsSettledEvidence as UnstablePhysicsSettledEvidence, PhysicsSettledEvidenceOptions as UnstablePhysicsSettledEvidenceOptions } from "./components/stream/physics/PhysicsEvidence";
48
+ export type { PhysicsEvidenceBinCount as UnstablePhysicsEvidenceBinCount, PhysicsSettledEvidence as UnstablePhysicsSettledEvidence, PhysicsSettledEvidenceOptions as UnstablePhysicsSettledEvidenceOptions, PhysicsSettledLedger as UnstablePhysicsSettledLedger } from "./components/stream/physics/PhysicsEvidence";
46
49
  export type { PhysicsSettledScene as UnstablePhysicsSettledScene, PhysicsSettledSceneOptions as UnstablePhysicsSettledSceneOptions } from "./components/stream/physics/PhysicsSettledScene";
47
50
  export type { PhysicsSettledSVGOptions as UnstablePhysicsSettledSVGOptions, PhysicsSettledSVGRender as UnstablePhysicsSettledSVGRender } from "./components/stream/physics/PhysicsSettledSVG";
48
51
  export type { PhysicsNavigationTreeOptions as UnstablePhysicsNavigationTreeOptions, PhysicsObservationAnnouncementOptions as UnstablePhysicsObservationAnnouncementOptions, PhysicsProjectionBodySummary as UnstablePhysicsProjectionBodySummary, PhysicsProjectionContainerSpec as UnstablePhysicsProjectionContainerSpec, PhysicsSettledProjectionOptions as UnstablePhysicsSettledProjectionOptions, PhysicsSettledProjectionRow as UnstablePhysicsSettledProjectionRow } from "./components/stream/physics/PhysicsAccessibility";
49
- export type { BuiltInIntentId as UnstableBuiltInIntentId, PortableIntentId as UnstablePortableIntentId, PortableChartRubric as UnstablePortableChartRubric, PortableChartVariant as UnstablePortableChartVariant, PortableMobileInteractionCapability as UnstablePortableMobileInteractionCapability, PortableMobileLabelCapability as UnstablePortableMobileLabelCapability, PortableMobileCustomCapability as UnstablePortableMobileCustomCapability, PortableMobileCapability as UnstablePortableMobileCapability, PortableChartCapability as UnstablePortableChartCapability, PortableReceptionModality as UnstablePortableReceptionModality, PortableAudienceTarget as UnstablePortableAudienceTarget, PortableAudienceProfile as UnstablePortableAudienceProfile, PortableAnnotationProvenance as UnstablePortableAnnotationProvenance, PortableAnnotationLifecycle as UnstablePortableAnnotationLifecycle, PortableAnnotated as UnstablePortableAnnotated, ValidationResult as UnstablePortabilityValidationResult, IDIDVegaLiteMeta as UnstableIDIDVegaLiteMeta } from "./components/data/portability";
52
+ export type { BuiltInIntentId as UnstableBuiltInIntentId, PortableIntentId as UnstablePortableIntentId, PortableChartRubric as UnstablePortableChartRubric, PortableChartVariant as UnstablePortableChartVariant, BoundPortableChartCapability as UnstableBoundPortableChartCapability, PortableCapabilityBindingResult as UnstablePortableCapabilityBindingResult, PortableMobileInteractionCapability as UnstablePortableMobileInteractionCapability, PortableMobileLabelCapability as UnstablePortableMobileLabelCapability, PortableMobileCustomCapability as UnstablePortableMobileCustomCapability, PortableMobileCapability as UnstablePortableMobileCapability, PortableChartCapability as UnstablePortableChartCapability, PortableReceptionModality as UnstablePortableReceptionModality, PortableAudienceTarget as UnstablePortableAudienceTarget, PortableAudienceProfile as UnstablePortableAudienceProfile, PortableAnnotationProvenance as UnstablePortableAnnotationProvenance, PortableAnnotationLifecycle as UnstablePortableAnnotationLifecycle, PortableAnnotated as UnstablePortableAnnotated, ValidationResult as UnstablePortabilityValidationResult, IDIDVegaLiteMeta as UnstableIDIDVegaLiteMeta } from "./components/data/portability";