react-semaphor 0.1.424 → 0.1.426

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 (107) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +246 -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-C-gN-vlq.js +1 -0
  12. package/dist/chunks/{calendar-preferences-dialog-D5mABNDT.js → calendar-preferences-dialog-tBSngRN-.js} +4 -4
  13. package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-AOGwWu0K.js} +11 -11
  14. package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Pod1s6SK.js} +9927 -9098
  15. package/dist/chunks/code-editor-tfzm8LWW.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-BJH1idOd.js +414 -0
  18. package/dist/chunks/comparison-document-migration-b6c3xiWh.js +1 -0
  19. package/dist/chunks/dashboard-JNK2ly_e.js +1402 -0
  20. package/dist/chunks/{index-Dzz6jXSY.js → dashboard-ZoKNg47G.js} +67158 -65267
  21. package/dist/chunks/{dashboard-briefing-launcher-DuWgwtxX.js → dashboard-briefing-launcher-0kR-QThz.js} +11 -6
  22. package/dist/chunks/{dashboard-briefing-launcher-BNDzMjjt.js → dashboard-briefing-launcher-BE-sNAzW.js} +226 -209
  23. package/dist/chunks/dashboard-controls-BUYTVauu.js +36 -0
  24. package/dist/chunks/dashboard-controls-Ce_Bps8f.js +2196 -0
  25. package/dist/chunks/dashboard-date-comparison-definition-BaYxjLi5.js +167 -0
  26. package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +1 -0
  27. package/dist/chunks/dashboard-input-contract-BFpERluO.js +18 -0
  28. package/dist/chunks/dashboard-input-contract-DV3cshjz.js +1 -0
  29. package/dist/chunks/{dashboard-json-CkTEDNtH.js → dashboard-json-4quaFoSw.js} +16 -15
  30. package/dist/chunks/dashboard-json-81uc8aVR.js +1 -0
  31. package/dist/chunks/date-formatter-BTTYdAik.js +1 -0
  32. package/dist/chunks/date-formatter-D-89jTjG.js +514 -0
  33. package/dist/chunks/{edit-dashboard-visual-CRjVRZLk.js → edit-dashboard-visual-DqQsH7rN.js} +8470 -8520
  34. package/dist/chunks/edit-dashboard-visual-nVRXv1Lq.js +182 -0
  35. package/dist/chunks/{index-CjzRe2su.js → index-CnujJ3fa.js} +3 -3
  36. package/dist/chunks/{index-DRlMUglg.js → index-Dpm_VET4.js} +2 -2
  37. package/dist/chunks/{index-CJdxSyQq.js → index-If0wlXGi.js} +308 -308
  38. package/dist/chunks/index-jSrCwPQz.js +31 -0
  39. package/dist/chunks/{x-CXDkqdur.js → index-xHCrHprY.js} +59 -59
  40. package/dist/chunks/{layout-grid-C0OI-MRn.js → layout-grid-B08pP7v6.js} +1 -1
  41. package/dist/chunks/{layout-grid-CiubineE.js → layout-grid-D5tYJg1-.js} +1 -1
  42. package/dist/chunks/metric-comparison-BKgkMy9r.js +1 -0
  43. package/dist/chunks/metric-comparison-CWweq9RG.js +387 -0
  44. package/dist/chunks/{palette-C4KTXOug.js → palette-C0yjT5Tv.js} +1 -1
  45. package/dist/chunks/{palette-Cp1hqZtm.js → palette-jqaAcwiQ.js} +1 -1
  46. package/dist/chunks/{save-DgMfP0j8.js → save-HCJjjzdX.js} +1 -1
  47. package/dist/chunks/{save-C__QggEE.js → save-Xdc4pnys.js} +1 -1
  48. package/dist/chunks/{search-BHsQIWBV.js → search-DHZCro8B.js} +1 -1
  49. package/dist/chunks/{search-DNCejM7Z.js → search-Dcud9ajy.js} +1 -1
  50. package/dist/chunks/{update-policy-C1pmhLz9.js → update-policy-BgONreNd.js} +1 -1
  51. package/dist/chunks/{update-policy-BCJc0oI5.js → update-policy-CY2k-pJP.js} +9 -9
  52. package/dist/chunks/{use-create-flow-overlay-state-B-bYbtix.js → use-create-flow-overlay-state-CoANTEXS.js} +2 -2
  53. package/dist/chunks/{use-create-flow-overlay-state-B9vArrvr.js → use-create-flow-overlay-state-DUVIsF0y.js} +62 -62
  54. package/dist/chunks/validators-B4VMLX3_.js +1 -0
  55. package/dist/chunks/{validators-PXkij33j.js → validators-Cz-XuORM.js} +123 -119
  56. package/dist/dashboard/index.cjs +1 -1
  57. package/dist/dashboard/index.js +2 -2
  58. package/dist/dashboard-authoring/index.cjs +2 -2
  59. package/dist/dashboard-authoring/index.js +6 -4
  60. package/dist/data-app-builder/index.cjs +6 -6
  61. package/dist/data-app-builder/index.js +5 -5
  62. package/dist/data-app-codegen/index.cjs +1 -1
  63. package/dist/data-app-codegen/index.js +2 -2
  64. package/dist/data-app-codegen-node/index.cjs +1 -1
  65. package/dist/data-app-codegen-node/index.js +3 -3
  66. package/dist/data-app-sdk/index.cjs +1 -1
  67. package/dist/data-app-sdk/index.js +6 -6
  68. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  69. package/dist/data-app-sdk-adapters/index.js +1 -1
  70. package/dist/data-app-sdk-validation/index.cjs +1 -1
  71. package/dist/data-app-sdk-validation/index.js +65 -68
  72. package/dist/format-utils/index.cjs +2 -2
  73. package/dist/format-utils/index.js +59 -58
  74. package/dist/index.cjs +1 -1
  75. package/dist/index.js +19 -19
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.cjs +1 -1
  78. package/dist/surfboard/index.js +3 -3
  79. package/dist/types/analytics-protocol.d.ts +337 -3
  80. package/dist/types/brand-studio.d.ts +2 -2
  81. package/dist/types/briefings.d.ts +65 -41
  82. package/dist/types/dashboard-assistant.d.ts +28 -7
  83. package/dist/types/dashboard-authoring.d.ts +123 -43
  84. package/dist/types/dashboard.d.ts +122 -48
  85. package/dist/types/data-app-builder.d.ts +2 -2
  86. package/dist/types/data-app-sdk.d.ts +1 -1
  87. package/dist/types/format-utils.d.ts +98 -10
  88. package/dist/types/index.js +1 -1
  89. package/dist/types/main.d.ts +264 -100
  90. package/dist/types/shared.d.ts +84 -43
  91. package/dist/types/surfboard.d.ts +124 -49
  92. package/dist/types/types.d.ts +135 -50
  93. package/package.json +2 -1
  94. package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
  95. package/dist/chunks/calendar-preferences-dialog-iokD3HbE.js +0 -1
  96. package/dist/chunks/contracts-CoCOpd_i.js +0 -11
  97. package/dist/chunks/contracts-CtB2VONT.js +0 -1
  98. package/dist/chunks/dashboard-controls-bbEF-AbK.js +0 -52
  99. package/dist/chunks/dashboard-controls-id39vb7G.js +0 -2322
  100. package/dist/chunks/dashboard-json-DVoqS1ks.js +0 -1
  101. package/dist/chunks/date-formatter-B4EBSe9C.js +0 -1
  102. package/dist/chunks/date-formatter-BlhBftA9.js +0 -416
  103. package/dist/chunks/edit-dashboard-visual-CkrxZCcp.js +0 -178
  104. package/dist/chunks/index-S1CGUcSz.js +0 -1406
  105. package/dist/chunks/switch-DMT7qf_R.js +0 -138
  106. package/dist/chunks/validators-DMlVbd1p.js +0 -1
  107. 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 b=require("../chunks/operators-DrTQsJXv.js"),m=require("../chunks/validators-B4VMLX3_.js"),a=require("../chunks/analyze-result-contract-ege_u6Nl.js"),n=require("../chunks/catalog-field-grounding-Bnx-3tE0.js"),l=require("../chunks/metric-comparison-BKgkMy9r.js"),p=require("../chunks/dashboard-date-comparison-definition-DGZr3m-b.js"),h=require("../chunks/dashboard-input-contract-DV3cshjz.js");function A(e,t={}){const i=C(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=C(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 v(e){const t=e.quoteIdentifier??I;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 I(e,t){return t==="mysql"||t==="bigquery"||t==="clickhouse"||t==="duckdb"?`\`${e.replace(/`/g,"``")}\``:t==="mssql"?`[${e.replace(/]/g,"]]")}]`:`"${e.replace(/"/g,'""')}"`}function C(e){if(typeof e!="string")return"";const t=[];for(const i of e.trim().toLowerCase())_(i)&&t.push(i);return t.join("")}function _(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"},D={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 f(e){return!!(e.name.trim()&&a.hasCompleteSemaphorSourceIdentity(e.source)&&(e.role==="date"||e.dataType==="date"||e.dataType==="datetime"))}function S(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 M(e){const t=S(e.candidates.filter(s=>s.kind==="visible_axis")),i=S(e.candidates.filter(s=>s.kind==="explicit_hidden"));if([...t,...i].some(s=>!f(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=S(e.candidates.filter(s=>s.kind==="semantic_primary"));return c.some(s=>!f(s.field))?"invalid":c.length>1?"ambiguous":c[0]??"missing"}function E(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 O(e){const t=e.ranges??[];if(e.rawSql)return{status:"unavailable",reason:"unsupported_raw_sql",constraints:t};if((e.querySources??[]).some(o=>!a.hasCompleteSemaphorSourceIdentity(o))||t.some(o=>!f(o.field)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const i=M(e);if(typeof i=="string")return{status:"unavailable",reason:`temporal_binding_${i}`,constraints:t};const r=t.filter(o=>a.semaphorFieldRefsMatch(o.field,i.field));if(r.some(o=>!E(o.window)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const d=r.filter(o=>o.source==="global_date"),c=r.filter(o=>o.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(o=>o.id!==(s==null?void 0:s.id))}}exports.normalizeSemaphorAnalyticsFilterOperator=b.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=b.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=n.buildAnalyticsCatalogFieldSummary;exports.getAnalyticsCatalogFieldCandidates=n.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=n.getAnalyticsCatalogFieldName;exports.isAnalyticsCatalogDateField=n.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=n.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=n.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=n.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=n.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=n.isAnalyticsTechnicalIdentifierField;exports.normalizeAnalyticsCatalogDataType=n.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=n.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.isComparisonCapableDashboardDateInputDefinition=p.isComparisonCapableDashboardDateInputDefinition;exports.resolveDashboardDateComparisonFilterDefinition=p.resolveDashboardDateComparisonFilterDefinition;exports.resolveDashboardDateComparisonInputDefinition=p.resolveDashboardDateComparisonInputDefinition;exports.semanticDatasetMatchesFieldCoordinates=p.semanticDatasetMatchesFieldCoordinates;exports.getCardControlCompatInputId=h.getCardControlCompatInputId;exports.getCardInlineFilterCompatInputId=h.getCardInlineFilterCompatInputId;exports.getDashboardControlCompatInputId=h.getDashboardControlCompatInputId;exports.getDashboardFilterCompatInputId=h.getDashboardFilterCompatInputId;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=D;exports.TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES=T;exports.buildSemaphorQualifiedSourcePath=v;exports.getSemaphorConnectionCapabilities=A;exports.normalizeSemaphorDialect=y;exports.resolveTemporalContext=O;exports.semaphorSourceHasRequiredCoordinates=R;
@@ -1,9 +1,13 @@
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 q, 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 c, 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 Ae, c as Re, M as _e, N as Ie, v as Te } from "../chunks/analyze-result-contract-DnfF8kBb.js";
5
+ import { b as Fe, g as ke, c as Me, i as qe, d as Ee, e as xe, f as Oe, h as Ne, j as Le, n as Pe, a as we } from "../chunks/catalog-field-grounding-AOGwWu0K.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-CWweq9RG.js";
7
+ import { i as Je, r as Ze, a as ea, s as aa } from "../chunks/dashboard-date-comparison-definition-BaYxjLi5.js";
8
+ import { g as ra, a as ta, b as ia, c as na } from "../chunks/dashboard-input-contract-BFpERluO.js";
9
+ function A(e, a = {}) {
10
+ const s = f(e), r = {
7
11
  connectionId: a.connectionId,
8
12
  connectionType: e,
9
13
  path: ["database", "schema", "table"],
@@ -87,8 +91,8 @@ function m(e, a = {}) {
87
91
  supportsFilterClause: !1
88
92
  } : r;
89
93
  }
90
- function d(e) {
91
- const a = n(e);
94
+ function R(e) {
95
+ const a = f(e);
92
96
  switch (a) {
93
97
  case "mysql":
94
98
  case "bigquery":
@@ -108,46 +112,46 @@ function d(e) {
108
112
  return "unknown";
109
113
  }
110
114
  }
111
- function c(e) {
115
+ function _(e) {
112
116
  return e.capabilities.prefixLevels.every(
113
- (a) => !!t(e.source, a)
117
+ (a) => !!p(e.source, a)
114
118
  );
115
119
  }
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(".");
120
+ function I(e) {
121
+ const a = e.quoteIdentifier ?? b;
122
+ return e.capabilities.prefixLevels.map((s) => p(e.source, s)).filter((s) => !!s).map((s) => a(s, e.capabilities.dialect)).join(".");
119
123
  }
120
- function t(e, a) {
124
+ function p(e, a) {
121
125
  return a === "database" ? e.databaseName : a === "schema" ? e.schemaName : e.tableName;
122
126
  }
123
- function o(e, a) {
127
+ function b(e, a) {
124
128
  return a === "mysql" || a === "bigquery" || a === "clickhouse" || a === "duckdb" ? `\`${e.replace(/`/g, "``")}\`` : a === "mssql" ? `[${e.replace(/]/g, "]]")}]` : `"${e.replace(/"/g, '""')}"`;
125
129
  }
126
- function n(e) {
130
+ function f(e) {
127
131
  if (typeof e != "string")
128
132
  return "";
129
133
  const a = [];
130
134
  for (const s of e.trim().toLowerCase())
131
- l(s) && a.push(s);
135
+ g(s) && a.push(s);
132
136
  return a.join("");
133
137
  }
134
- function l(e) {
138
+ function g(e) {
135
139
  const a = e.charCodeAt(0);
136
140
  return a >= 48 && a <= 57 || a >= 97 && a <= 122;
137
141
  }
138
- const i = {
142
+ const l = {
139
143
  kind: "semantic",
140
144
  domainId: "domain_sales",
141
145
  datasetName: "orders",
142
146
  connectionId: "conn_sales",
143
147
  label: "Orders"
144
- }, p = {
148
+ }, T = {
145
149
  revenueKpi: {
146
150
  version: 1,
147
151
  kind: "metric",
148
152
  id: "revenue-kpi",
149
153
  label: "Revenue",
150
- source: i,
154
+ source: l,
151
155
  measures: [{ name: "revenue", role: "measure" }],
152
156
  primaryMeasure: { name: "revenue", role: "measure" },
153
157
  comparison: { kind: "previous_period" },
@@ -158,7 +162,7 @@ const i = {
158
162
  kind: "records",
159
163
  id: "revenue-trend",
160
164
  label: "Revenue trend",
161
- source: i,
165
+ source: l,
162
166
  fields: [
163
167
  { name: "order_date", role: "date", dataType: "date", label: "Order Date" },
164
168
  { name: "revenue", role: "measure", dataType: "number" }
@@ -172,7 +176,7 @@ const i = {
172
176
  kind: "records",
173
177
  id: "top-customers",
174
178
  label: "Top customers",
175
- source: i,
179
+ source: l,
176
180
  fields: [
177
181
  { name: "customer_name", role: "dimension", dataType: "string" },
178
182
  { name: "segment", role: "dimension", dataType: "string" },
@@ -187,7 +191,7 @@ const i = {
187
191
  id: "region-options",
188
192
  label: "Region options",
189
193
  inputId: "region",
190
- source: i,
194
+ source: l,
191
195
  labelField: { name: "region", role: "dimension", dataType: "string" },
192
196
  valueField: { name: "region", role: "dimension", dataType: "string" },
193
197
  limit: 100
@@ -197,7 +201,7 @@ const i = {
197
201
  kind: "metric",
198
202
  id: "revenue-previous-period",
199
203
  label: "Revenue previous period comparison",
200
- source: i,
204
+ source: l,
201
205
  measures: [{ name: "revenue", role: "measure" }],
202
206
  primaryMeasure: { name: "revenue", role: "measure" },
203
207
  dateField: { name: "order_date", role: "date", dataType: "date" },
@@ -210,7 +214,7 @@ const i = {
210
214
  kind: "metric",
211
215
  id: "inbound-supplier-concentration",
212
216
  label: "Inbound supplier concentration",
213
- source: i,
217
+ source: l,
214
218
  measures: [
215
219
  { name: "net_tons", role: "measure" },
216
220
  { name: "ticket_value", role: "measure" }
@@ -246,71 +250,222 @@ const i = {
246
250
  { name: "revenue", role: "measure", dataType: "number" }
247
251
  ]
248
252
  }
253
+ }, D = {
254
+ visibleAxis: {
255
+ source: {
256
+ kind: "semantic",
257
+ domainId: "commerce",
258
+ datasetName: "orders"
259
+ },
260
+ field: {
261
+ name: "order_date",
262
+ label: "Order date",
263
+ dataType: "timestamp with time zone"
264
+ },
265
+ expected: {
266
+ status: "resolved",
267
+ bindingSource: "visible_axis",
268
+ name: "order_date",
269
+ dataType: "datetime"
270
+ }
271
+ },
272
+ invalidSource: {
273
+ source: {
274
+ kind: "semantic",
275
+ datasetName: "orders"
276
+ },
277
+ field: {
278
+ name: "order_date",
279
+ label: "Order date",
280
+ dataType: "date"
281
+ },
282
+ expected: {
283
+ status: "unavailable",
284
+ reason: "temporal_binding_invalid"
285
+ }
286
+ }
249
287
  };
288
+ function m(e) {
289
+ return !!(e.name.trim() && u(e.source) && (e.role === "date" || e.dataType === "date" || e.dataType === "datetime"));
290
+ }
291
+ function d(e) {
292
+ return e.filter(
293
+ (a, s) => e.findIndex(
294
+ (r) => c(a.field, r.field)
295
+ ) === s
296
+ );
297
+ }
298
+ function S(e) {
299
+ return new Set(e.map(h).filter(Boolean)).size;
300
+ }
301
+ function v(e) {
302
+ const a = d(
303
+ e.candidates.filter((t) => t.kind === "visible_axis")
304
+ ), s = d(
305
+ e.candidates.filter((t) => t.kind === "explicit_hidden")
306
+ );
307
+ if ([...a, ...s].some(
308
+ (t) => !m(t.field)
309
+ ))
310
+ return "invalid";
311
+ if (a.length > 1 || s.length > 1)
312
+ return "ambiguous";
313
+ const r = a[0], n = s[0];
314
+ if (r)
315
+ return n && !c(r.field, n.field) ? "invalid" : r;
316
+ if (n) return n;
317
+ if (S(e.querySources ?? []) > 1)
318
+ return "ambiguous";
319
+ const o = d(
320
+ e.candidates.filter((t) => t.kind === "semantic_primary")
321
+ );
322
+ return o.some((t) => !m(t.field)) ? "invalid" : o.length > 1 ? "ambiguous" : o[0] ?? "missing";
323
+ }
324
+ function y(e) {
325
+ const a = new Date(e.startInclusive), s = new Date(e.endExclusive);
326
+ return e.timezone.trim() ? Number.isFinite(a.getTime()) && Number.isFinite(s.getTime()) && a.getTime() < s.getTime() : !1;
327
+ }
328
+ function F(e) {
329
+ const a = e.ranges ?? [];
330
+ if (e.rawSql)
331
+ return {
332
+ status: "unavailable",
333
+ reason: "unsupported_raw_sql",
334
+ constraints: a
335
+ };
336
+ if ((e.querySources ?? []).some(
337
+ (i) => !u(i)
338
+ ) || a.some((i) => !m(i.field)))
339
+ return {
340
+ status: "unavailable",
341
+ reason: "temporal_binding_invalid",
342
+ constraints: a
343
+ };
344
+ const s = v(e);
345
+ if (typeof s == "string")
346
+ return {
347
+ status: "unavailable",
348
+ reason: `temporal_binding_${s}`,
349
+ constraints: a
350
+ };
351
+ const r = a.filter(
352
+ (i) => c(i.field, s.field)
353
+ );
354
+ if (r.some((i) => !y(i.window)))
355
+ return {
356
+ status: "unavailable",
357
+ reason: "temporal_binding_invalid",
358
+ constraints: a
359
+ };
360
+ const n = r.filter(
361
+ (i) => i.source === "global_date"
362
+ ), o = r.filter((i) => i.source === "card");
363
+ if (n.length > 1 || n.length === 0 && o.length > 1)
364
+ return {
365
+ status: "unavailable",
366
+ reason: "temporal_binding_ambiguous",
367
+ constraints: a
368
+ };
369
+ const t = n[0] ?? o[0];
370
+ return {
371
+ status: "resolved",
372
+ field: s.field,
373
+ bindingSource: s.kind,
374
+ ...t ? {
375
+ currentWindow: t.window,
376
+ governingWindowSource: t.source,
377
+ governingRangeId: t.id
378
+ } : {},
379
+ constraints: a.filter((i) => i.id !== (t == null ? void 0 : t.id))
380
+ };
381
+ }
250
382
  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
383
+ Be as COMPARISON_PRESENTATION_DEFAULTS,
384
+ Ue as DEFAULT_METRIC_COMPARISON_POLARITY,
385
+ T as SEMAPHOR_ANALYTICS_INTENT_FIXTURES,
386
+ Y as SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT,
387
+ H as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,
388
+ V as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,
389
+ D as TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES,
390
+ Fe as buildAnalyticsCatalogFieldSummary,
391
+ I as buildSemaphorQualifiedSourcePath,
392
+ Ge as evaluateMetricComparison,
393
+ ke as getAnalyticsCatalogFieldCandidates,
394
+ Me as getAnalyticsCatalogFieldName,
395
+ ra as getCardControlCompatInputId,
396
+ ta as getCardInlineFilterCompatInputId,
397
+ ia as getDashboardControlCompatInputId,
398
+ na as getDashboardFilterCompatInputId,
399
+ j as getSemaphorAnalyzeResultFieldNames,
400
+ A as getSemaphorConnectionCapabilities,
401
+ u as hasCompleteSemaphorSourceIdentity,
402
+ qe as isAnalyticsCatalogDateField,
403
+ Ee as isAnalyticsCatalogDimensionField,
404
+ xe as isAnalyticsCatalogMetricField,
405
+ Oe as isAnalyticsDateLikeDataType,
406
+ Ne as isAnalyticsMetricIdentifierField,
407
+ Le as isAnalyticsTechnicalIdentifierField,
408
+ Je as isComparisonCapableDashboardDateInputDefinition,
409
+ W as isSemaphorAnalyzeResultFieldName,
410
+ K as isSemaphorDataAppCodegenSummary,
411
+ Q as mergeSemaphorSourcesByIdentity,
412
+ Pe as normalizeAnalyticsCatalogDataType,
413
+ we as normalizeAnalyticsCatalogName,
414
+ q as normalizeSemaphorAnalyticsFilterOperator,
415
+ R 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
+ Ze as resolveDashboardDateComparisonFilterDefinition,
423
+ ea as resolveDashboardDateComparisonInputDefinition,
424
+ Ye as resolveMetricComparisonRequest,
425
+ He as resolveMetricResultAlias,
426
+ F as resolveTemporalContext,
427
+ aa as semanticDatasetMatchesFieldCoordinates,
428
+ Z as semaphorAnalyticsCoverageSchema,
429
+ ee as semaphorAnalyticsDiagnosticFeedbackSchema,
430
+ ae as semaphorAnalyticsExecutionResultSchema,
431
+ se as semaphorAnalyticsPopulationSchema,
432
+ re as semaphorAnalyticsResultSchema,
433
+ te as semaphorAnalyticsValidationIssueSchema,
434
+ ie as semaphorAnalyticsValidationResultSchema,
435
+ ne as semaphorAnalyzeResultSchema,
436
+ oe as semaphorAnalyzeResultShape,
437
+ le as semaphorDataAppCodegenSummarySchema,
438
+ de as semaphorDerivedFieldDefinitionSchema,
439
+ me as semaphorExecutionFieldRefSchema,
440
+ ce as semaphorFieldRefSchema,
441
+ c as semaphorFieldRefsMatch,
442
+ ue as semaphorInputOptionsResultSchema,
443
+ pe as semaphorMatrixResultSchema,
444
+ fe as semaphorMetricAggregate,
445
+ he as semaphorMetricMeasureBindingKey,
446
+ be as semaphorMetricResultSchema,
447
+ ge as semaphorPhysicalSourceRefSchema,
448
+ Se as semaphorRecordsResultSchema,
449
+ ve as semaphorRelationshipDiagnosticsSchema,
450
+ ye as semaphorResultColumnSchema,
451
+ Ce as semaphorSemanticSourceRefSchema,
452
+ _ as semaphorSourceHasRequiredCoordinates,
453
+ h as semaphorSourceIdentityKey,
454
+ Ae as semaphorSourceRefSchema,
455
+ Re as semaphorSourcesReferToSameDataset,
456
+ _e as semaphorSqlResultSchema,
457
+ Ie as semaphorSqlSourceRefSchema,
458
+ Ve as validateComparisonPresentationSpec,
459
+ je as validateGlobalDateComparisonContext,
460
+ We as validateGlobalDateComparisonSelection,
461
+ Ke as validateMetricComparisonConfig,
462
+ Qe as validateMetricComparisonPolarity,
463
+ $e as validateMetricComparisonSpec,
464
+ L as validateSemaphorAnalyticsIntent,
465
+ P as validateSemaphorAnalyticsRecoveryPlan,
466
+ w as validateSemaphorDashboardIntent,
467
+ Te as validateSemaphorDataAppCodegenSummary,
468
+ z as validateSemaphorDerivedFieldDefinition,
469
+ B as validateSemaphorOperationIntent,
470
+ U as validateSemaphorResultCalculation
316
471
  };
@@ -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,