react-semaphor 0.1.423 → 0.1.425

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 (105) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +243 -91
  3. package/dist/appearance/index.cjs +1 -1
  4. package/dist/appearance/index.js +1 -1
  5. package/dist/brand-studio/index.cjs +2 -2
  6. package/dist/brand-studio/index.js +8 -8
  7. package/dist/chunks/{analyze-result-contract-D7pjjYPy.js → analyze-result-contract-DnfF8kBb.js} +434 -427
  8. package/dist/chunks/analyze-result-contract-ege_u6Nl.js +1 -0
  9. package/dist/chunks/{braces-8TRlDwDw.js → braces-BdbUk_r9.js} +1 -1
  10. package/dist/chunks/{braces-D2tStQjF.js → braces-CbO-aIwH.js} +1 -1
  11. package/dist/chunks/calendar-preferences-dialog-BLaSWhLl.js +1 -0
  12. package/dist/chunks/{calendar-preferences-dialog-t5ET6MON.js → calendar-preferences-dialog-DJwV0aqn.js} +4 -4
  13. package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-DcxPLns0.js} +10 -10
  14. package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Bkk7s8hI.js} +7382 -6809
  15. package/dist/chunks/code-editor-CkXyNgYc.js +138 -0
  16. package/dist/chunks/{common-types-4bjoIgvm.js → common-types-ClkOI-3O.js} +4 -4
  17. package/dist/chunks/comparison-document-migration-CQJ0DZlL.js +414 -0
  18. package/dist/chunks/comparison-document-migration-Db64RWYD.js +1 -0
  19. package/dist/chunks/{index-yHe0SeLO.js → dashboard-5agU0G_D.js} +56752 -55440
  20. package/dist/chunks/dashboard-MKIqgGDp.js +1402 -0
  21. package/dist/chunks/{dashboard-briefing-launcher-S2akO-ub.js → dashboard-briefing-launcher-CII8-4qo.js} +11 -6
  22. package/dist/chunks/{dashboard-briefing-launcher-Cavd0QJb.js → dashboard-briefing-launcher-qyEVfuOm.js} +226 -209
  23. package/dist/chunks/dashboard-controls-PJpeYZHw.js +36 -0
  24. package/dist/chunks/dashboard-controls-aJY0FNPP.js +2196 -0
  25. package/dist/chunks/dashboard-input-contract-BFpERluO.js +18 -0
  26. package/dist/chunks/dashboard-input-contract-DV3cshjz.js +1 -0
  27. package/dist/chunks/{dashboard-json-Do2-pdPZ.js → dashboard-json-CzHSP6Fa.js} +16 -15
  28. package/dist/chunks/dashboard-json-DtmR5yCf.js +1 -0
  29. package/dist/chunks/date-formatter-BTTYdAik.js +1 -0
  30. package/dist/chunks/date-formatter-D-89jTjG.js +514 -0
  31. package/dist/chunks/{edit-dashboard-visual-Cw6bq4_w.js → edit-dashboard-visual-AkZzwBCV.js} +8892 -8996
  32. package/dist/chunks/edit-dashboard-visual-Cif6uDqN.js +182 -0
  33. package/dist/chunks/{index-CjzRe2su.js → index-CnujJ3fa.js} +3 -3
  34. package/dist/chunks/{index-DRlMUglg.js → index-Dpm_VET4.js} +2 -2
  35. package/dist/chunks/{index-CJdxSyQq.js → index-If0wlXGi.js} +308 -308
  36. package/dist/chunks/index-jSrCwPQz.js +31 -0
  37. package/dist/chunks/{x-CXDkqdur.js → index-xHCrHprY.js} +59 -59
  38. package/dist/chunks/{layout-grid-C0OI-MRn.js → layout-grid-B08pP7v6.js} +1 -1
  39. package/dist/chunks/{layout-grid-CiubineE.js → layout-grid-D5tYJg1-.js} +1 -1
  40. package/dist/chunks/metric-comparison-4oA4ouU9.js +354 -0
  41. package/dist/chunks/metric-comparison-nQKquVnx.js +1 -0
  42. package/dist/chunks/{palette-C4KTXOug.js → palette-C0yjT5Tv.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-jqaAcwiQ.js} +1 -1
  44. package/dist/chunks/{save-DgMfP0j8.js → save-HCJjjzdX.js} +1 -1
  45. package/dist/chunks/{save-C__QggEE.js → save-Xdc4pnys.js} +1 -1
  46. package/dist/chunks/{search-BHsQIWBV.js → search-DHZCro8B.js} +1 -1
  47. package/dist/chunks/{search-DNCejM7Z.js → search-Dcud9ajy.js} +1 -1
  48. package/dist/chunks/{update-policy-C1pmhLz9.js → update-policy-BgONreNd.js} +1 -1
  49. package/dist/chunks/{update-policy-BCJc0oI5.js → update-policy-CY2k-pJP.js} +9 -9
  50. package/dist/chunks/{use-create-flow-overlay-state-5MDbZcs1.js → use-create-flow-overlay-state-ByOKVV2K.js} +62 -62
  51. package/dist/chunks/{use-create-flow-overlay-state-BNczg9Gj.js → use-create-flow-overlay-state-DmuReEnk.js} +2 -2
  52. package/dist/chunks/validators-B4VMLX3_.js +1 -0
  53. package/dist/chunks/{validators-PXkij33j.js → validators-Cz-XuORM.js} +123 -119
  54. package/dist/dashboard/index.cjs +1 -1
  55. package/dist/dashboard/index.js +2 -2
  56. package/dist/dashboard-authoring/index.cjs +2 -2
  57. package/dist/dashboard-authoring/index.js +6 -4
  58. package/dist/data-app-builder/index.cjs +6 -6
  59. package/dist/data-app-builder/index.js +5 -5
  60. package/dist/data-app-codegen/index.cjs +1 -1
  61. package/dist/data-app-codegen/index.js +2 -2
  62. package/dist/data-app-codegen-node/index.cjs +1 -1
  63. package/dist/data-app-codegen-node/index.js +3 -3
  64. package/dist/data-app-sdk/index.cjs +1 -1
  65. package/dist/data-app-sdk/index.js +6 -6
  66. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  67. package/dist/data-app-sdk-adapters/index.js +1 -1
  68. package/dist/data-app-sdk-validation/index.cjs +1 -1
  69. package/dist/data-app-sdk-validation/index.js +65 -68
  70. package/dist/format-utils/index.cjs +2 -2
  71. package/dist/format-utils/index.js +59 -58
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.js +19 -19
  74. package/dist/style.css +1 -1
  75. package/dist/surfboard/index.cjs +1 -1
  76. package/dist/surfboard/index.js +3 -3
  77. package/dist/types/analytics-protocol.d.ts +299 -3
  78. package/dist/types/brand-studio.d.ts +2 -2
  79. package/dist/types/briefings.d.ts +65 -41
  80. package/dist/types/dashboard-assistant.d.ts +28 -7
  81. package/dist/types/dashboard-authoring.d.ts +123 -43
  82. package/dist/types/dashboard.d.ts +97 -48
  83. package/dist/types/data-app-builder.d.ts +2 -2
  84. package/dist/types/data-app-sdk.d.ts +1 -1
  85. package/dist/types/format-utils.d.ts +98 -10
  86. package/dist/types/index.js +1 -1
  87. package/dist/types/main.d.ts +229 -95
  88. package/dist/types/shared.d.ts +84 -43
  89. package/dist/types/surfboard.d.ts +99 -49
  90. package/dist/types/types.d.ts +110 -50
  91. package/package.json +2 -1
  92. package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
  93. package/dist/chunks/calendar-preferences-dialog-CTmeASaM.js +0 -1
  94. package/dist/chunks/contracts-CoCOpd_i.js +0 -11
  95. package/dist/chunks/contracts-CtB2VONT.js +0 -1
  96. package/dist/chunks/dashboard-controls-BJLrErjW.js +0 -2322
  97. package/dist/chunks/dashboard-controls-DzbP8AXA.js +0 -52
  98. package/dist/chunks/dashboard-json-5tWb5KD6.js +0 -1
  99. package/dist/chunks/date-formatter-B4EBSe9C.js +0 -1
  100. package/dist/chunks/date-formatter-BlhBftA9.js +0 -416
  101. package/dist/chunks/edit-dashboard-visual-Yh5YFgMF.js +0 -178
  102. package/dist/chunks/index-BPM3gDRw.js +0 -1406
  103. package/dist/chunks/switch-DMT7qf_R.js +0 -138
  104. package/dist/chunks/validators-DMlVbd1p.js +0 -1
  105. package/dist/chunks/x-B6ghREd2.js +0 -31
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/operators-DrTQsJXv.js"),o=require("../chunks/validators-DMlVbd1p.js"),e=require("../chunks/analyze-result-contract-DpDcImgk.js"),t=require("../chunks/catalog-field-grounding-Bnx-3tE0.js");function d(a,r={}){const i=c(a),s={connectionId:r.connectionId,connectionType:a,path:["database","schema","table"],labels:{database:"Database",schema:"Schema",table:"Table"},prefixLevels:["database","schema","table"],dialect:"postgres",supportsFilterClause:!0};return i.includes("postgres")?{...s,prefixLevels:["schema","table"],dialect:"postgres"}:i.includes("mysql")?{...s,prefixLevels:["database","table"],dialect:"mysql",supportsFilterClause:!1}:i.includes("mssql")||i.includes("sqlserver")?{...s,dialect:"mssql",supportsFilterClause:!1}:i.includes("redshift")?{...s,prefixLevels:["schema","table"],dialect:"redshift"}:i.includes("snowflake")?{...s,dialect:"snowflake"}:i.includes("clickhouse")?{connectionId:r.connectionId,connectionType:a,path:["database","table"],labels:{database:"Database",table:"Table"},prefixLevels:["database","table"],dialect:"clickhouse",supportsFilterClause:!1}:i==="s3"||i==="api"?{connectionId:r.connectionId,connectionType:a,path:["table"],labels:{table:i==="api"?"API Table":"File Table"},prefixLevels:["table"],dialect:"duckdb",supportsFilterClause:!0}:i==="googlesheets"||i==="fileupload"?{connectionId:r.connectionId,connectionType:a,path:["table"],labels:{table:"Table"},prefixLevels:["table"],dialect:"postgres",supportsFilterClause:!0}:i==="s3tables"?{...s,labels:{database:"Database",schema:"Namespace",table:"Table"},dialect:"duckdb"}:i==="bigquery"?{...s,labels:{database:"Project",schema:"Dataset",table:"Table"},prefixLevels:["schema","table"],dialect:"bigquery",supportsFilterClause:!1}:s}function u(a){const r=c(a);switch(r){case"mysql":case"bigquery":case"redshift":case"snowflake":case"clickhouse":case"duckdb":case"sqlite":return r;case"mssql":case"sqlserver":return"mssql";case"postgres":case"postgresql":return"postgres";default:return"unknown"}}function p(a){return a.capabilities.prefixLevels.every(r=>!!m(a.source,r))}function h(a){const r=a.quoteIdentifier??S;return a.capabilities.prefixLevels.map(i=>m(a.source,i)).filter(i=>!!i).map(i=>r(i,a.capabilities.dialect)).join(".")}function m(a,r){return r==="database"?a.databaseName:r==="schema"?a.schemaName:a.tableName}function S(a,r){return r==="mysql"||r==="bigquery"||r==="clickhouse"||r==="duckdb"?`\`${a.replace(/`/g,"``")}\``:r==="mssql"?`[${a.replace(/]/g,"]]")}]`:`"${a.replace(/"/g,'""')}"`}function c(a){if(typeof a!="string")return"";const r=[];for(const i of a.trim().toLowerCase())y(i)&&r.push(i);return r.join("")}function y(a){const r=a.charCodeAt(0);return r>=48&&r<=57||r>=97&&r<=122}const n={kind:"semantic",domainId:"domain_sales",datasetName:"orders",connectionId:"conn_sales",label:"Orders"},A={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:n,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{name:"revenue",role:"measure"},comparison:{kind:"previous_period"},limit:1},revenueTrend:{version:1,kind:"records",id:"revenue-trend",label:"Revenue trend",source:n,fields:[{name:"order_date",role:"date",dataType:"date",label:"Order Date"},{name:"revenue",role:"measure",dataType:"number"}],dateField:{name:"order_date",role:"date",dataType:"date"},timeGrain:"month",limit:100},topCustomersRecords:{version:1,kind:"records",id:"top-customers",label:"Top customers",source:n,fields:[{name:"customer_name",role:"dimension",dataType:"string"},{name:"segment",role:"dimension",dataType:"string"},{name:"revenue",role:"measure",dataType:"number"}],orderBy:{field:{name:"revenue",role:"measure"},direction:"desc"},limit:20},regionInputOptions:{version:1,kind:"inputOptions",id:"region-options",label:"Region options",inputId:"region",source:n,labelField:{name:"region",role:"dimension",dataType:"string"},valueField:{name:"region",role:"dimension",dataType:"string"},limit:100},previousPeriodRevenueComparison:{version:1,kind:"metric",id:"revenue-previous-period",label:"Revenue previous period comparison",source:n,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{name:"revenue",role:"measure"},dateField:{name:"order_date",role:"date",dataType:"date"},timeGrain:"week",comparison:{kind:"previous_period"},limit:100},inboundSupplierConcentration:{version:1,kind:"metric",id:"inbound-supplier-concentration",label:"Inbound supplier concentration",source:n,measures:[{name:"net_tons",role:"measure"},{name:"ticket_value",role:"measure"}],primaryMeasure:{name:"net_tons",role:"measure"},dateField:{name:"ticket_date",role:"date",dataType:"date"},timeWindow:{unit:"month",value:6,anchor:"latest_available"},dimensions:[{name:"supplier_id",role:"dimension",dataType:"number"}],filters:[{field:{name:"direction",role:"dimension",dataType:"string"},operator:"=",values:["Inbound"]}],limit:15},boundedSqlRanking:{version:1,kind:"sql",id:"top-customer-ranking-sql",label:"Top customer ranking SQL",source:{kind:"sql",connectionId:"conn_sales",dialect:"postgres"},sql:"SELECT customer_name, SUM(revenue) AS revenue FROM public.orders GROUP BY customer_name ORDER BY revenue DESC LIMIT 20",limit:20,rationale:"Ranking is SQL-natural because it requires ordering grouped aggregate rows.",fields:[{name:"customer_name",role:"dimension",dataType:"string"},{name:"revenue",role:"measure",dataType:"number"}]}};exports.normalizeSemaphorAnalyticsFilterOperator=l.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=l.normalizeSemaphorInputOperator;exports.parseSemaphorIsoTimeWindowBoundary=o.parseSemaphorIsoTimeWindowBoundary;exports.validateSemaphorAnalyticsIntent=o.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=o.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=o.validateSemaphorDashboardIntent;exports.validateSemaphorDerivedFieldDefinition=o.validateSemaphorDerivedFieldDefinition;exports.validateSemaphorOperationIntent=o.validateSemaphorOperationIntent;exports.validateSemaphorResultCalculation=o.validateSemaphorResultCalculation;exports.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT=e.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION=e.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION=e.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.getSemaphorAnalyzeResultFieldNames=e.getSemaphorAnalyzeResultFieldNames;exports.isSemaphorAnalyzeResultFieldName=e.isSemaphorAnalyzeResultFieldName;exports.isSemaphorDataAppCodegenSummary=e.isSemaphorDataAppCodegenSummary;exports.mergeSemaphorSourcesByIdentity=e.mergeSemaphorSourcesByIdentity;exports.parseSemaphorAnalyzeResult=e.parseSemaphorAnalyzeResult;exports.preferSemaphorFieldRefMetadata=e.preferSemaphorFieldRefMetadata;exports.preferSemaphorSourceMetadata=e.preferSemaphorSourceMetadata;exports.semaphorAnalyticsCoverageSchema=e.semaphorAnalyticsCoverageSchema;exports.semaphorAnalyticsDiagnosticFeedbackSchema=e.semaphorAnalyticsDiagnosticFeedbackSchema;exports.semaphorAnalyticsExecutionResultSchema=e.semaphorAnalyticsExecutionResultSchema;exports.semaphorAnalyticsPopulationSchema=e.semaphorAnalyticsPopulationSchema;exports.semaphorAnalyticsResultSchema=e.semaphorAnalyticsResultSchema;exports.semaphorAnalyticsValidationIssueSchema=e.semaphorAnalyticsValidationIssueSchema;exports.semaphorAnalyticsValidationResultSchema=e.semaphorAnalyticsValidationResultSchema;exports.semaphorAnalyzeResultSchema=e.semaphorAnalyzeResultSchema;exports.semaphorAnalyzeResultShape=e.semaphorAnalyzeResultShape;exports.semaphorDataAppCodegenSummarySchema=e.semaphorDataAppCodegenSummarySchema;exports.semaphorDerivedFieldDefinitionSchema=e.semaphorDerivedFieldDefinitionSchema;exports.semaphorExecutionFieldRefSchema=e.semaphorExecutionFieldRefSchema;exports.semaphorFieldRefSchema=e.semaphorFieldRefSchema;exports.semaphorFieldRefsMatch=e.semaphorFieldRefsMatch;exports.semaphorInputOptionsResultSchema=e.semaphorInputOptionsResultSchema;exports.semaphorMatrixResultSchema=e.semaphorMatrixResultSchema;exports.semaphorMetricAggregate=e.semaphorMetricAggregate;exports.semaphorMetricMeasureBindingKey=e.semaphorMetricMeasureBindingKey;exports.semaphorMetricResultSchema=e.semaphorMetricResultSchema;exports.semaphorPhysicalSourceRefSchema=e.semaphorPhysicalSourceRefSchema;exports.semaphorRecordsResultSchema=e.semaphorRecordsResultSchema;exports.semaphorRelationshipDiagnosticsSchema=e.semaphorRelationshipDiagnosticsSchema;exports.semaphorResultColumnSchema=e.semaphorResultColumnSchema;exports.semaphorSemanticSourceRefSchema=e.semaphorSemanticSourceRefSchema;exports.semaphorSourceIdentityKey=e.semaphorSourceIdentityKey;exports.semaphorSourceRefSchema=e.semaphorSourceRefSchema;exports.semaphorSourcesReferToSameDataset=e.semaphorSourcesReferToSameDataset;exports.semaphorSqlResultSchema=e.semaphorSqlResultSchema;exports.semaphorSqlSourceRefSchema=e.semaphorSqlSourceRefSchema;exports.validateSemaphorDataAppCodegenSummary=e.validateSemaphorDataAppCodegenSummary;exports.buildAnalyticsCatalogFieldSummary=t.buildAnalyticsCatalogFieldSummary;exports.getAnalyticsCatalogFieldCandidates=t.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=t.getAnalyticsCatalogFieldName;exports.isAnalyticsCatalogDateField=t.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=t.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=t.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=t.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=t.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=t.isAnalyticsTechnicalIdentifierField;exports.normalizeAnalyticsCatalogDataType=t.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=t.normalizeAnalyticsCatalogName;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=A;exports.buildSemaphorQualifiedSourcePath=h;exports.getSemaphorConnectionCapabilities=d;exports.normalizeSemaphorDialect=u;exports.semaphorSourceHasRequiredCoordinates=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../chunks/operators-DrTQsJXv.js"),m=require("../chunks/validators-B4VMLX3_.js"),a=require("../chunks/analyze-result-contract-ege_u6Nl.js"),o=require("../chunks/catalog-field-grounding-Bnx-3tE0.js"),l=require("../chunks/metric-comparison-nQKquVnx.js"),p=require("../chunks/dashboard-input-contract-DV3cshjz.js");function A(e,t={}){const i=b(e),r={connectionId:t.connectionId,connectionType:e,path:["database","schema","table"],labels:{database:"Database",schema:"Schema",table:"Table"},prefixLevels:["database","schema","table"],dialect:"postgres",supportsFilterClause:!0};return i.includes("postgres")?{...r,prefixLevels:["schema","table"],dialect:"postgres"}:i.includes("mysql")?{...r,prefixLevels:["database","table"],dialect:"mysql",supportsFilterClause:!1}:i.includes("mssql")||i.includes("sqlserver")?{...r,dialect:"mssql",supportsFilterClause:!1}:i.includes("redshift")?{...r,prefixLevels:["schema","table"],dialect:"redshift"}:i.includes("snowflake")?{...r,dialect:"snowflake"}:i.includes("clickhouse")?{connectionId:t.connectionId,connectionType:e,path:["database","table"],labels:{database:"Database",table:"Table"},prefixLevels:["database","table"],dialect:"clickhouse",supportsFilterClause:!1}:i==="s3"||i==="api"?{connectionId:t.connectionId,connectionType:e,path:["table"],labels:{table:i==="api"?"API Table":"File Table"},prefixLevels:["table"],dialect:"duckdb",supportsFilterClause:!0}:i==="googlesheets"||i==="fileupload"?{connectionId:t.connectionId,connectionType:e,path:["table"],labels:{table:"Table"},prefixLevels:["table"],dialect:"postgres",supportsFilterClause:!0}:i==="s3tables"?{...r,labels:{database:"Database",schema:"Namespace",table:"Table"},dialect:"duckdb"}:i==="bigquery"?{...r,labels:{database:"Project",schema:"Dataset",table:"Table"},prefixLevels:["schema","table"],dialect:"bigquery",supportsFilterClause:!1}:r}function y(e){const t=b(e);switch(t){case"mysql":case"bigquery":case"redshift":case"snowflake":case"clickhouse":case"duckdb":case"sqlite":return t;case"mssql":case"sqlserver":return"mssql";case"postgres":case"postgresql":return"postgres";default:return"unknown"}}function R(e){return e.capabilities.prefixLevels.every(t=>!!g(e.source,t))}function C(e){const t=e.quoteIdentifier??v;return e.capabilities.prefixLevels.map(i=>g(e.source,i)).filter(i=>!!i).map(i=>t(i,e.capabilities.dialect)).join(".")}function g(e,t){return t==="database"?e.databaseName:t==="schema"?e.schemaName:e.tableName}function v(e,t){return t==="mysql"||t==="bigquery"||t==="clickhouse"||t==="duckdb"?`\`${e.replace(/`/g,"``")}\``:t==="mssql"?`[${e.replace(/]/g,"]]")}]`:`"${e.replace(/"/g,'""')}"`}function b(e){if(typeof e!="string")return"";const t=[];for(const i of e.trim().toLowerCase())I(i)&&t.push(i);return t.join("")}function I(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122}const u={kind:"semantic",domainId:"domain_sales",datasetName:"orders",connectionId:"conn_sales",label:"Orders"},_={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:u,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{name:"revenue",role:"measure"},comparison:{kind:"previous_period"},limit:1},revenueTrend:{version:1,kind:"records",id:"revenue-trend",label:"Revenue trend",source:u,fields:[{name:"order_date",role:"date",dataType:"date",label:"Order Date"},{name:"revenue",role:"measure",dataType:"number"}],dateField:{name:"order_date",role:"date",dataType:"date"},timeGrain:"month",limit:100},topCustomersRecords:{version:1,kind:"records",id:"top-customers",label:"Top customers",source:u,fields:[{name:"customer_name",role:"dimension",dataType:"string"},{name:"segment",role:"dimension",dataType:"string"},{name:"revenue",role:"measure",dataType:"number"}],orderBy:{field:{name:"revenue",role:"measure"},direction:"desc"},limit:20},regionInputOptions:{version:1,kind:"inputOptions",id:"region-options",label:"Region options",inputId:"region",source:u,labelField:{name:"region",role:"dimension",dataType:"string"},valueField:{name:"region",role:"dimension",dataType:"string"},limit:100},previousPeriodRevenueComparison:{version:1,kind:"metric",id:"revenue-previous-period",label:"Revenue previous period comparison",source:u,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{name:"revenue",role:"measure"},dateField:{name:"order_date",role:"date",dataType:"date"},timeGrain:"week",comparison:{kind:"previous_period"},limit:100},inboundSupplierConcentration:{version:1,kind:"metric",id:"inbound-supplier-concentration",label:"Inbound supplier concentration",source:u,measures:[{name:"net_tons",role:"measure"},{name:"ticket_value",role:"measure"}],primaryMeasure:{name:"net_tons",role:"measure"},dateField:{name:"ticket_date",role:"date",dataType:"date"},timeWindow:{unit:"month",value:6,anchor:"latest_available"},dimensions:[{name:"supplier_id",role:"dimension",dataType:"number"}],filters:[{field:{name:"direction",role:"dimension",dataType:"string"},operator:"=",values:["Inbound"]}],limit:15},boundedSqlRanking:{version:1,kind:"sql",id:"top-customer-ranking-sql",label:"Top customer ranking SQL",source:{kind:"sql",connectionId:"conn_sales",dialect:"postgres"},sql:"SELECT customer_name, SUM(revenue) AS revenue FROM public.orders GROUP BY customer_name ORDER BY revenue DESC LIMIT 20",limit:20,rationale:"Ranking is SQL-natural because it requires ordering grouped aggregate rows.",fields:[{name:"customer_name",role:"dimension",dataType:"string"},{name:"revenue",role:"measure",dataType:"number"}]}},T={visibleAxis:{source:{kind:"semantic",domainId:"commerce",datasetName:"orders"},field:{name:"order_date",label:"Order date",dataType:"timestamp with time zone"},expected:{status:"resolved",bindingSource:"visible_axis",name:"order_date",dataType:"datetime"}},invalidSource:{source:{kind:"semantic",datasetName:"orders"},field:{name:"order_date",label:"Order date",dataType:"date"},expected:{status:"unavailable",reason:"temporal_binding_invalid"}}};function S(e){return!!(e.name.trim()&&a.hasCompleteSemaphorSourceIdentity(e.source)&&(e.role==="date"||e.dataType==="date"||e.dataType==="datetime"))}function h(e){return e.filter((t,i)=>e.findIndex(r=>a.semaphorFieldRefsMatch(t.field,r.field))===i)}function F(e){return new Set(e.map(a.semaphorSourceIdentityKey).filter(Boolean)).size}function D(e){const t=h(e.candidates.filter(s=>s.kind==="visible_axis")),i=h(e.candidates.filter(s=>s.kind==="explicit_hidden"));if([...t,...i].some(s=>!S(s.field)))return"invalid";if(t.length>1||i.length>1)return"ambiguous";const r=t[0],d=i[0];if(r)return d&&!a.semaphorFieldRefsMatch(r.field,d.field)?"invalid":r;if(d)return d;if(F(e.querySources??[])>1)return"ambiguous";const c=h(e.candidates.filter(s=>s.kind==="semantic_primary"));return c.some(s=>!S(s.field))?"invalid":c.length>1?"ambiguous":c[0]??"missing"}function M(e){const t=new Date(e.startInclusive),i=new Date(e.endExclusive);return e.timezone.trim()?Number.isFinite(t.getTime())&&Number.isFinite(i.getTime())&&t.getTime()<i.getTime():!1}function E(e){const t=e.ranges??[];if(e.rawSql)return{status:"unavailable",reason:"unsupported_raw_sql",constraints:t};if((e.querySources??[]).some(n=>!a.hasCompleteSemaphorSourceIdentity(n))||t.some(n=>!S(n.field)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const i=D(e);if(typeof i=="string")return{status:"unavailable",reason:`temporal_binding_${i}`,constraints:t};const r=t.filter(n=>a.semaphorFieldRefsMatch(n.field,i.field));if(r.some(n=>!M(n.window)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const d=r.filter(n=>n.source==="global_date"),c=r.filter(n=>n.source==="card");if(d.length>1||d.length===0&&c.length>1)return{status:"unavailable",reason:"temporal_binding_ambiguous",constraints:t};const s=d[0]??c[0];return{status:"resolved",field:i.field,bindingSource:i.kind,...s?{currentWindow:s.window,governingWindowSource:s.source,governingRangeId:s.id}:{},constraints:t.filter(n=>!a.semaphorFieldRefsMatch(n.field,i.field))}}exports.normalizeSemaphorAnalyticsFilterOperator=f.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=f.normalizeSemaphorInputOperator;exports.parseSemaphorIsoInstant=m.parseSemaphorIsoInstant;exports.parseSemaphorIsoTimeWindowBoundary=m.parseSemaphorIsoTimeWindowBoundary;exports.validateSemaphorAnalyticsIntent=m.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=m.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=m.validateSemaphorDashboardIntent;exports.validateSemaphorDerivedFieldDefinition=m.validateSemaphorDerivedFieldDefinition;exports.validateSemaphorOperationIntent=m.validateSemaphorOperationIntent;exports.validateSemaphorResultCalculation=m.validateSemaphorResultCalculation;exports.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT=a.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION=a.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION=a.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.getSemaphorAnalyzeResultFieldNames=a.getSemaphorAnalyzeResultFieldNames;exports.hasCompleteSemaphorSourceIdentity=a.hasCompleteSemaphorSourceIdentity;exports.isSemaphorAnalyzeResultFieldName=a.isSemaphorAnalyzeResultFieldName;exports.isSemaphorDataAppCodegenSummary=a.isSemaphorDataAppCodegenSummary;exports.mergeSemaphorSourcesByIdentity=a.mergeSemaphorSourcesByIdentity;exports.parseSemaphorAnalyzeResult=a.parseSemaphorAnalyzeResult;exports.preferSemaphorFieldRefMetadata=a.preferSemaphorFieldRefMetadata;exports.preferSemaphorSourceMetadata=a.preferSemaphorSourceMetadata;exports.semaphorAnalyticsCoverageSchema=a.semaphorAnalyticsCoverageSchema;exports.semaphorAnalyticsDiagnosticFeedbackSchema=a.semaphorAnalyticsDiagnosticFeedbackSchema;exports.semaphorAnalyticsExecutionResultSchema=a.semaphorAnalyticsExecutionResultSchema;exports.semaphorAnalyticsPopulationSchema=a.semaphorAnalyticsPopulationSchema;exports.semaphorAnalyticsResultSchema=a.semaphorAnalyticsResultSchema;exports.semaphorAnalyticsValidationIssueSchema=a.semaphorAnalyticsValidationIssueSchema;exports.semaphorAnalyticsValidationResultSchema=a.semaphorAnalyticsValidationResultSchema;exports.semaphorAnalyzeResultSchema=a.semaphorAnalyzeResultSchema;exports.semaphorAnalyzeResultShape=a.semaphorAnalyzeResultShape;exports.semaphorDataAppCodegenSummarySchema=a.semaphorDataAppCodegenSummarySchema;exports.semaphorDerivedFieldDefinitionSchema=a.semaphorDerivedFieldDefinitionSchema;exports.semaphorExecutionFieldRefSchema=a.semaphorExecutionFieldRefSchema;exports.semaphorFieldRefSchema=a.semaphorFieldRefSchema;exports.semaphorFieldRefsMatch=a.semaphorFieldRefsMatch;exports.semaphorInputOptionsResultSchema=a.semaphorInputOptionsResultSchema;exports.semaphorMatrixResultSchema=a.semaphorMatrixResultSchema;exports.semaphorMetricAggregate=a.semaphorMetricAggregate;exports.semaphorMetricMeasureBindingKey=a.semaphorMetricMeasureBindingKey;exports.semaphorMetricResultSchema=a.semaphorMetricResultSchema;exports.semaphorPhysicalSourceRefSchema=a.semaphorPhysicalSourceRefSchema;exports.semaphorRecordsResultSchema=a.semaphorRecordsResultSchema;exports.semaphorRelationshipDiagnosticsSchema=a.semaphorRelationshipDiagnosticsSchema;exports.semaphorResultColumnSchema=a.semaphorResultColumnSchema;exports.semaphorSemanticSourceRefSchema=a.semaphorSemanticSourceRefSchema;exports.semaphorSourceIdentityKey=a.semaphorSourceIdentityKey;exports.semaphorSourceRefSchema=a.semaphorSourceRefSchema;exports.semaphorSourcesReferToSameDataset=a.semaphorSourcesReferToSameDataset;exports.semaphorSqlResultSchema=a.semaphorSqlResultSchema;exports.semaphorSqlSourceRefSchema=a.semaphorSqlSourceRefSchema;exports.validateSemaphorDataAppCodegenSummary=a.validateSemaphorDataAppCodegenSummary;exports.buildAnalyticsCatalogFieldSummary=o.buildAnalyticsCatalogFieldSummary;exports.getAnalyticsCatalogFieldCandidates=o.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=o.getAnalyticsCatalogFieldName;exports.isAnalyticsCatalogDateField=o.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=o.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=o.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=o.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=o.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=o.isAnalyticsTechnicalIdentifierField;exports.normalizeAnalyticsCatalogDataType=o.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=o.normalizeAnalyticsCatalogName;exports.COMPARISON_PRESENTATION_DEFAULTS=l.COMPARISON_PRESENTATION_DEFAULTS;exports.DEFAULT_METRIC_COMPARISON_POLARITY=l.DEFAULT_METRIC_COMPARISON_POLARITY;exports.evaluateMetricComparison=l.evaluateMetricComparison;exports.resolveMetricComparisonRequest=l.resolveMetricComparisonRequest;exports.resolveMetricResultAlias=l.resolveMetricResultAlias;exports.validateComparisonPresentationSpec=l.validateComparisonPresentationSpec;exports.validateGlobalDateComparisonContext=l.validateGlobalDateComparisonContext;exports.validateGlobalDateComparisonSelection=l.validateGlobalDateComparisonSelection;exports.validateMetricComparisonConfig=l.validateMetricComparisonConfig;exports.validateMetricComparisonPolarity=l.validateMetricComparisonPolarity;exports.validateMetricComparisonSpec=l.validateMetricComparisonSpec;exports.getCardControlCompatInputId=p.getCardControlCompatInputId;exports.getCardInlineFilterCompatInputId=p.getCardInlineFilterCompatInputId;exports.getDashboardControlCompatInputId=p.getDashboardControlCompatInputId;exports.getDashboardFilterCompatInputId=p.getDashboardFilterCompatInputId;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=_;exports.TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES=T;exports.buildSemaphorQualifiedSourcePath=C;exports.getSemaphorConnectionCapabilities=A;exports.normalizeSemaphorDialect=y;exports.resolveTemporalContext=E;exports.semaphorSourceHasRequiredCoordinates=R;
@@ -1,9 +1,12 @@
1
- import { a as S, n as f } from "../chunks/operators-C8TxpM4C.js";
2
- import { p as g, b as v, d as A, e as R, v as C, c as I, a as T } from "../chunks/validators-PXkij33j.js";
3
- import { e as F, S as k, a as D, g as q, c as M, i as E, L, d as O, p as N, K as x, D as P, B as z, E as w, C as B, z as H, q as G, r as U, G as Y, F as j, H as V, m as K, n as Q, l as $, s as W, w as J, y as X, b as Z, M as ee, t as ae, h as se, u as re, A as ie, o as te, f as ne, I as oe, k as le, J as me, x as de, j as ce, v as ue } from "../chunks/analyze-result-contract-D7pjjYPy.js";
4
- import { j as he, a as be, g as Se, c as fe, h as ye, f as ge, i as ve, e as Ae, d as Re, b as Ce, n as Ie } from "../chunks/catalog-field-grounding-CJKAqtiC.js";
5
- function m(e, a = {}) {
6
- const s = n(e), r = {
1
+ import { a as M, n as E } from "../chunks/operators-C8TxpM4C.js";
2
+ import { p as O, a as N, v as L, b as P, c as w, d as z, e as B, f as U } from "../chunks/validators-Cz-XuORM.js";
3
+ import { h as u, s as d, d as h } from "../chunks/analyze-result-contract-DnfF8kBb.js";
4
+ import { e as Y, S as H, a as V, g as j, f as W, i as K, m as Q, j as $, p as X, k as J, l as Z, n as ee, o as ae, q as se, r as re, t as te, u as ie, w as ne, x as oe, y as le, z as de, A as me, B as ce, C as ue, D as pe, b as fe, E as he, F as be, G as ge, H as Se, I as ve, J as ye, K as Ce, L as Re, c as Ae, M as _e, N as Ie, v as Te } from "../chunks/analyze-result-contract-DnfF8kBb.js";
5
+ import { b as De, g as ke, c as qe, i as Me, d as Ee, e as xe, f as Oe, h as Ne, j as Le, a as Pe, n as we } from "../chunks/catalog-field-grounding-DcxPLns0.js";
6
+ import { C as Be, D as Ue, e as Ge, r as Ye, a as He, v as Ve, b as je, c as We, d as Ke, f as Qe, g as $e } from "../chunks/metric-comparison-4oA4ouU9.js";
7
+ import { g as Je, a as Ze, b as ea, c as aa } from "../chunks/dashboard-input-contract-BFpERluO.js";
8
+ function R(e, a = {}) {
9
+ const s = f(e), r = {
7
10
  connectionId: a.connectionId,
8
11
  connectionType: e,
9
12
  path: ["database", "schema", "table"],
@@ -87,8 +90,8 @@ function m(e, a = {}) {
87
90
  supportsFilterClause: !1
88
91
  } : r;
89
92
  }
90
- function d(e) {
91
- const a = n(e);
93
+ function A(e) {
94
+ const a = f(e);
92
95
  switch (a) {
93
96
  case "mysql":
94
97
  case "bigquery":
@@ -108,46 +111,46 @@ function d(e) {
108
111
  return "unknown";
109
112
  }
110
113
  }
111
- function c(e) {
114
+ function _(e) {
112
115
  return e.capabilities.prefixLevels.every(
113
- (a) => !!t(e.source, a)
116
+ (a) => !!p(e.source, a)
114
117
  );
115
118
  }
116
- function u(e) {
117
- const a = e.quoteIdentifier ?? o;
118
- return e.capabilities.prefixLevels.map((s) => t(e.source, s)).filter((s) => !!s).map((s) => a(s, e.capabilities.dialect)).join(".");
119
+ function I(e) {
120
+ const a = e.quoteIdentifier ?? b;
121
+ return e.capabilities.prefixLevels.map((s) => p(e.source, s)).filter((s) => !!s).map((s) => a(s, e.capabilities.dialect)).join(".");
119
122
  }
120
- function t(e, a) {
123
+ function p(e, a) {
121
124
  return a === "database" ? e.databaseName : a === "schema" ? e.schemaName : e.tableName;
122
125
  }
123
- function o(e, a) {
126
+ function b(e, a) {
124
127
  return a === "mysql" || a === "bigquery" || a === "clickhouse" || a === "duckdb" ? `\`${e.replace(/`/g, "``")}\`` : a === "mssql" ? `[${e.replace(/]/g, "]]")}]` : `"${e.replace(/"/g, '""')}"`;
125
128
  }
126
- function n(e) {
129
+ function f(e) {
127
130
  if (typeof e != "string")
128
131
  return "";
129
132
  const a = [];
130
133
  for (const s of e.trim().toLowerCase())
131
- l(s) && a.push(s);
134
+ g(s) && a.push(s);
132
135
  return a.join("");
133
136
  }
134
- function l(e) {
137
+ function g(e) {
135
138
  const a = e.charCodeAt(0);
136
139
  return a >= 48 && a <= 57 || a >= 97 && a <= 122;
137
140
  }
138
- const i = {
141
+ const l = {
139
142
  kind: "semantic",
140
143
  domainId: "domain_sales",
141
144
  datasetName: "orders",
142
145
  connectionId: "conn_sales",
143
146
  label: "Orders"
144
- }, p = {
147
+ }, T = {
145
148
  revenueKpi: {
146
149
  version: 1,
147
150
  kind: "metric",
148
151
  id: "revenue-kpi",
149
152
  label: "Revenue",
150
- source: i,
153
+ source: l,
151
154
  measures: [{ name: "revenue", role: "measure" }],
152
155
  primaryMeasure: { name: "revenue", role: "measure" },
153
156
  comparison: { kind: "previous_period" },
@@ -158,7 +161,7 @@ const i = {
158
161
  kind: "records",
159
162
  id: "revenue-trend",
160
163
  label: "Revenue trend",
161
- source: i,
164
+ source: l,
162
165
  fields: [
163
166
  { name: "order_date", role: "date", dataType: "date", label: "Order Date" },
164
167
  { name: "revenue", role: "measure", dataType: "number" }
@@ -172,7 +175,7 @@ const i = {
172
175
  kind: "records",
173
176
  id: "top-customers",
174
177
  label: "Top customers",
175
- source: i,
178
+ source: l,
176
179
  fields: [
177
180
  { name: "customer_name", role: "dimension", dataType: "string" },
178
181
  { name: "segment", role: "dimension", dataType: "string" },
@@ -187,7 +190,7 @@ const i = {
187
190
  id: "region-options",
188
191
  label: "Region options",
189
192
  inputId: "region",
190
- source: i,
193
+ source: l,
191
194
  labelField: { name: "region", role: "dimension", dataType: "string" },
192
195
  valueField: { name: "region", role: "dimension", dataType: "string" },
193
196
  limit: 100
@@ -197,7 +200,7 @@ const i = {
197
200
  kind: "metric",
198
201
  id: "revenue-previous-period",
199
202
  label: "Revenue previous period comparison",
200
- source: i,
203
+ source: l,
201
204
  measures: [{ name: "revenue", role: "measure" }],
202
205
  primaryMeasure: { name: "revenue", role: "measure" },
203
206
  dateField: { name: "order_date", role: "date", dataType: "date" },
@@ -210,7 +213,7 @@ const i = {
210
213
  kind: "metric",
211
214
  id: "inbound-supplier-concentration",
212
215
  label: "Inbound supplier concentration",
213
- source: i,
216
+ source: l,
214
217
  measures: [
215
218
  { name: "net_tons", role: "measure" },
216
219
  { name: "ticket_value", role: "measure" }
@@ -246,71 +249,220 @@ const i = {
246
249
  { name: "revenue", role: "measure", dataType: "number" }
247
250
  ]
248
251
  }
252
+ }, F = {
253
+ visibleAxis: {
254
+ source: {
255
+ kind: "semantic",
256
+ domainId: "commerce",
257
+ datasetName: "orders"
258
+ },
259
+ field: {
260
+ name: "order_date",
261
+ label: "Order date",
262
+ dataType: "timestamp with time zone"
263
+ },
264
+ expected: {
265
+ status: "resolved",
266
+ bindingSource: "visible_axis",
267
+ name: "order_date",
268
+ dataType: "datetime"
269
+ }
270
+ },
271
+ invalidSource: {
272
+ source: {
273
+ kind: "semantic",
274
+ datasetName: "orders"
275
+ },
276
+ field: {
277
+ name: "order_date",
278
+ label: "Order date",
279
+ dataType: "date"
280
+ },
281
+ expected: {
282
+ status: "unavailable",
283
+ reason: "temporal_binding_invalid"
284
+ }
285
+ }
249
286
  };
287
+ function c(e) {
288
+ return !!(e.name.trim() && u(e.source) && (e.role === "date" || e.dataType === "date" || e.dataType === "datetime"));
289
+ }
290
+ function m(e) {
291
+ return e.filter(
292
+ (a, s) => e.findIndex(
293
+ (r) => d(a.field, r.field)
294
+ ) === s
295
+ );
296
+ }
297
+ function S(e) {
298
+ return new Set(e.map(h).filter(Boolean)).size;
299
+ }
300
+ function v(e) {
301
+ const a = m(
302
+ e.candidates.filter((t) => t.kind === "visible_axis")
303
+ ), s = m(
304
+ e.candidates.filter((t) => t.kind === "explicit_hidden")
305
+ );
306
+ if ([...a, ...s].some(
307
+ (t) => !c(t.field)
308
+ ))
309
+ return "invalid";
310
+ if (a.length > 1 || s.length > 1)
311
+ return "ambiguous";
312
+ const r = a[0], n = s[0];
313
+ if (r)
314
+ return n && !d(r.field, n.field) ? "invalid" : r;
315
+ if (n) return n;
316
+ if (S(e.querySources ?? []) > 1)
317
+ return "ambiguous";
318
+ const o = m(
319
+ e.candidates.filter((t) => t.kind === "semantic_primary")
320
+ );
321
+ return o.some((t) => !c(t.field)) ? "invalid" : o.length > 1 ? "ambiguous" : o[0] ?? "missing";
322
+ }
323
+ function y(e) {
324
+ const a = new Date(e.startInclusive), s = new Date(e.endExclusive);
325
+ return e.timezone.trim() ? Number.isFinite(a.getTime()) && Number.isFinite(s.getTime()) && a.getTime() < s.getTime() : !1;
326
+ }
327
+ function D(e) {
328
+ const a = e.ranges ?? [];
329
+ if (e.rawSql)
330
+ return {
331
+ status: "unavailable",
332
+ reason: "unsupported_raw_sql",
333
+ constraints: a
334
+ };
335
+ if ((e.querySources ?? []).some(
336
+ (i) => !u(i)
337
+ ) || a.some((i) => !c(i.field)))
338
+ return {
339
+ status: "unavailable",
340
+ reason: "temporal_binding_invalid",
341
+ constraints: a
342
+ };
343
+ const s = v(e);
344
+ if (typeof s == "string")
345
+ return {
346
+ status: "unavailable",
347
+ reason: `temporal_binding_${s}`,
348
+ constraints: a
349
+ };
350
+ const r = a.filter(
351
+ (i) => d(i.field, s.field)
352
+ );
353
+ if (r.some((i) => !y(i.window)))
354
+ return {
355
+ status: "unavailable",
356
+ reason: "temporal_binding_invalid",
357
+ constraints: a
358
+ };
359
+ const n = r.filter(
360
+ (i) => i.source === "global_date"
361
+ ), o = r.filter((i) => i.source === "card");
362
+ if (n.length > 1 || n.length === 0 && o.length > 1)
363
+ return {
364
+ status: "unavailable",
365
+ reason: "temporal_binding_ambiguous",
366
+ constraints: a
367
+ };
368
+ const t = n[0] ?? o[0];
369
+ return {
370
+ status: "resolved",
371
+ field: s.field,
372
+ bindingSource: s.kind,
373
+ ...t ? {
374
+ currentWindow: t.window,
375
+ governingWindowSource: t.source,
376
+ governingRangeId: t.id
377
+ } : {},
378
+ constraints: a.filter(
379
+ (i) => !d(i.field, s.field)
380
+ )
381
+ };
382
+ }
250
383
  export {
251
- p as SEMAPHOR_ANALYTICS_INTENT_FIXTURES,
252
- F as SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT,
253
- k as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,
254
- D as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,
255
- he as buildAnalyticsCatalogFieldSummary,
256
- u as buildSemaphorQualifiedSourcePath,
257
- be as getAnalyticsCatalogFieldCandidates,
258
- Se as getAnalyticsCatalogFieldName,
259
- q as getSemaphorAnalyzeResultFieldNames,
260
- m as getSemaphorConnectionCapabilities,
261
- fe as isAnalyticsCatalogDateField,
262
- ye as isAnalyticsCatalogDimensionField,
263
- ge as isAnalyticsCatalogMetricField,
264
- ve as isAnalyticsDateLikeDataType,
265
- Ae as isAnalyticsMetricIdentifierField,
266
- Re as isAnalyticsTechnicalIdentifierField,
267
- M as isSemaphorAnalyzeResultFieldName,
268
- E as isSemaphorDataAppCodegenSummary,
269
- L as mergeSemaphorSourcesByIdentity,
270
- Ce as normalizeAnalyticsCatalogDataType,
271
- Ie as normalizeAnalyticsCatalogName,
272
- S as normalizeSemaphorAnalyticsFilterOperator,
273
- d as normalizeSemaphorDialect,
274
- f as normalizeSemaphorInputOperator,
275
- O as parseSemaphorAnalyzeResult,
276
- g as parseSemaphorIsoTimeWindowBoundary,
277
- N as preferSemaphorFieldRefMetadata,
278
- x as preferSemaphorSourceMetadata,
279
- P as semaphorAnalyticsCoverageSchema,
280
- z as semaphorAnalyticsDiagnosticFeedbackSchema,
281
- w as semaphorAnalyticsExecutionResultSchema,
282
- B as semaphorAnalyticsPopulationSchema,
283
- H as semaphorAnalyticsResultSchema,
284
- G as semaphorAnalyticsValidationIssueSchema,
285
- U as semaphorAnalyticsValidationResultSchema,
286
- Y as semaphorAnalyzeResultSchema,
287
- j as semaphorAnalyzeResultShape,
288
- V as semaphorDataAppCodegenSummarySchema,
289
- K as semaphorDerivedFieldDefinitionSchema,
290
- Q as semaphorExecutionFieldRefSchema,
291
- $ as semaphorFieldRefSchema,
292
- W as semaphorFieldRefsMatch,
293
- J as semaphorInputOptionsResultSchema,
294
- X as semaphorMatrixResultSchema,
295
- Z as semaphorMetricAggregate,
296
- ee as semaphorMetricMeasureBindingKey,
297
- ae as semaphorMetricResultSchema,
298
- se as semaphorPhysicalSourceRefSchema,
299
- re as semaphorRecordsResultSchema,
300
- ie as semaphorRelationshipDiagnosticsSchema,
301
- te as semaphorResultColumnSchema,
302
- ne as semaphorSemanticSourceRefSchema,
303
- c as semaphorSourceHasRequiredCoordinates,
304
- oe as semaphorSourceIdentityKey,
305
- le as semaphorSourceRefSchema,
306
- me as semaphorSourcesReferToSameDataset,
307
- de as semaphorSqlResultSchema,
308
- ce as semaphorSqlSourceRefSchema,
309
- v as validateSemaphorAnalyticsIntent,
310
- A as validateSemaphorAnalyticsRecoveryPlan,
311
- R as validateSemaphorDashboardIntent,
312
- ue as validateSemaphorDataAppCodegenSummary,
313
- C as validateSemaphorDerivedFieldDefinition,
314
- I as validateSemaphorOperationIntent,
315
- T as validateSemaphorResultCalculation
384
+ Be as COMPARISON_PRESENTATION_DEFAULTS,
385
+ Ue as DEFAULT_METRIC_COMPARISON_POLARITY,
386
+ T as SEMAPHOR_ANALYTICS_INTENT_FIXTURES,
387
+ Y as SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT,
388
+ H as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,
389
+ V as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,
390
+ F as TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES,
391
+ De as buildAnalyticsCatalogFieldSummary,
392
+ I as buildSemaphorQualifiedSourcePath,
393
+ Ge as evaluateMetricComparison,
394
+ ke as getAnalyticsCatalogFieldCandidates,
395
+ qe as getAnalyticsCatalogFieldName,
396
+ Je as getCardControlCompatInputId,
397
+ Ze as getCardInlineFilterCompatInputId,
398
+ ea as getDashboardControlCompatInputId,
399
+ aa as getDashboardFilterCompatInputId,
400
+ j as getSemaphorAnalyzeResultFieldNames,
401
+ R as getSemaphorConnectionCapabilities,
402
+ u as hasCompleteSemaphorSourceIdentity,
403
+ Me as isAnalyticsCatalogDateField,
404
+ Ee as isAnalyticsCatalogDimensionField,
405
+ xe as isAnalyticsCatalogMetricField,
406
+ Oe as isAnalyticsDateLikeDataType,
407
+ Ne as isAnalyticsMetricIdentifierField,
408
+ Le as isAnalyticsTechnicalIdentifierField,
409
+ W as isSemaphorAnalyzeResultFieldName,
410
+ K as isSemaphorDataAppCodegenSummary,
411
+ Q as mergeSemaphorSourcesByIdentity,
412
+ Pe as normalizeAnalyticsCatalogDataType,
413
+ we as normalizeAnalyticsCatalogName,
414
+ M as normalizeSemaphorAnalyticsFilterOperator,
415
+ A as normalizeSemaphorDialect,
416
+ E as normalizeSemaphorInputOperator,
417
+ $ as parseSemaphorAnalyzeResult,
418
+ O as parseSemaphorIsoInstant,
419
+ N as parseSemaphorIsoTimeWindowBoundary,
420
+ X as preferSemaphorFieldRefMetadata,
421
+ J as preferSemaphorSourceMetadata,
422
+ Ye as resolveMetricComparisonRequest,
423
+ He as resolveMetricResultAlias,
424
+ D as resolveTemporalContext,
425
+ Z as semaphorAnalyticsCoverageSchema,
426
+ ee as semaphorAnalyticsDiagnosticFeedbackSchema,
427
+ ae as semaphorAnalyticsExecutionResultSchema,
428
+ se as semaphorAnalyticsPopulationSchema,
429
+ re as semaphorAnalyticsResultSchema,
430
+ te as semaphorAnalyticsValidationIssueSchema,
431
+ ie as semaphorAnalyticsValidationResultSchema,
432
+ ne as semaphorAnalyzeResultSchema,
433
+ oe as semaphorAnalyzeResultShape,
434
+ le as semaphorDataAppCodegenSummarySchema,
435
+ de as semaphorDerivedFieldDefinitionSchema,
436
+ me as semaphorExecutionFieldRefSchema,
437
+ ce as semaphorFieldRefSchema,
438
+ d as semaphorFieldRefsMatch,
439
+ ue as semaphorInputOptionsResultSchema,
440
+ pe as semaphorMatrixResultSchema,
441
+ fe as semaphorMetricAggregate,
442
+ he as semaphorMetricMeasureBindingKey,
443
+ be as semaphorMetricResultSchema,
444
+ ge as semaphorPhysicalSourceRefSchema,
445
+ Se as semaphorRecordsResultSchema,
446
+ ve as semaphorRelationshipDiagnosticsSchema,
447
+ ye as semaphorResultColumnSchema,
448
+ Ce as semaphorSemanticSourceRefSchema,
449
+ _ as semaphorSourceHasRequiredCoordinates,
450
+ h as semaphorSourceIdentityKey,
451
+ Re as semaphorSourceRefSchema,
452
+ Ae as semaphorSourcesReferToSameDataset,
453
+ _e as semaphorSqlResultSchema,
454
+ Ie as semaphorSqlSourceRefSchema,
455
+ Ve as validateComparisonPresentationSpec,
456
+ je as validateGlobalDateComparisonContext,
457
+ We as validateGlobalDateComparisonSelection,
458
+ Ke as validateMetricComparisonConfig,
459
+ Qe as validateMetricComparisonPolarity,
460
+ $e as validateMetricComparisonSpec,
461
+ L as validateSemaphorAnalyticsIntent,
462
+ P as validateSemaphorAnalyticsRecoveryPlan,
463
+ w as validateSemaphorDashboardIntent,
464
+ Te as validateSemaphorDataAppCodegenSummary,
465
+ z as validateSemaphorDerivedFieldDefinition,
466
+ B as validateSemaphorOperationIntent,
467
+ U as validateSemaphorResultCalculation
316
468
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DRlMUglg.js");exports.APPEARANCE_SPEC_VERSION=e.APPEARANCE_SPEC_VERSION;exports.assertValidAppearanceSpec=e.assertValidAppearanceSpec;exports.mergeAppearanceSpecs=e.mergeAppearanceSpecs;exports.normalizeAppearanceSpec=e.normalizeAppearanceSpec;exports.resolveAppearance=e.resolveAppearance;exports.validateAppearanceSpec=e.validateAppearanceSpec;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-Dpm_VET4.js");exports.APPEARANCE_SPEC_VERSION=e.APPEARANCE_SPEC_VERSION;exports.assertValidAppearanceSpec=e.assertValidAppearanceSpec;exports.mergeAppearanceSpecs=e.mergeAppearanceSpecs;exports.normalizeAppearanceSpec=e.normalizeAppearanceSpec;exports.resolveAppearance=e.resolveAppearance;exports.validateAppearanceSpec=e.validateAppearanceSpec;
@@ -1,4 +1,4 @@
1
- import { A as p, f as r, m as s, n as c, r as A, v as n } from "../chunks/index-CJdxSyQq.js";
1
+ import { A as p, f as r, m as s, n as c, r as A, v as n } from "../chunks/index-If0wlXGi.js";
2
2
  export {
3
3
  p as APPEARANCE_SPEC_VERSION,
4
4
  r as assertValidAppearanceSpec,