react-semaphor 0.1.453 → 0.1.455

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 (115) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +100 -99
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{analyze-result-contract-GHKFwThg.js → analyze-result-contract-BbRJ-C06.js} +1 -1
  8. package/dist/chunks/{analyze-result-contract-Dxw66nUG.cjs → analyze-result-contract-LPDNldic.cjs} +1 -1
  9. package/dist/chunks/canonical-result-keys-BA0HCP4e.cjs +1 -0
  10. package/dist/chunks/{canonical-result-keys-KLk__J_O.js → canonical-result-keys-D6avdjpA.js} +14 -13
  11. package/dist/chunks/{common-types-Ci66eflG.cjs → common-types-C57kJ59w.cjs} +1 -1
  12. package/dist/chunks/{common-types-F6qk6PPS.js → common-types-H51FLKB7.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-CFpX0WX3.js → dashboard-briefing-launcher-BgBMjAVe.js} +10 -10
  14. package/dist/chunks/{dashboard-briefing-launcher-mUXWuiOZ.cjs → dashboard-briefing-launcher-BmEHYblf.cjs} +1 -1
  15. package/dist/chunks/{dashboard-controls-SoNubIu1.cjs → dashboard-controls-BLNG_zHC.cjs} +1 -1
  16. package/dist/chunks/{dashboard-controls-BeYAmOJc.js → dashboard-controls-C-23EDdr.js} +10 -10
  17. package/dist/chunks/dashboard-date-comparison-definition-Ces4alFm.cjs +1 -0
  18. package/dist/chunks/{dashboard-date-comparison-definition-Ba-clViK.js → dashboard-date-comparison-definition-DC3ekV2S.js} +1 -1
  19. package/dist/chunks/{dashboard-json-BublPnQ4.cjs → dashboard-json-BJ_Z9EaL.cjs} +1 -1
  20. package/dist/chunks/{dashboard-json-DeLUagVV.js → dashboard-json-BTF-1Iwa.js} +8 -8
  21. package/dist/chunks/{edit-dashboard-visual-CrvPcO7A.cjs → edit-dashboard-visual-CR832BJc.cjs} +1 -1
  22. package/dist/chunks/{edit-dashboard-visual-Go0h82DR.js → edit-dashboard-visual-Mw-ZE7P7.js} +12 -12
  23. package/dist/chunks/{editor-action-buttons-1Lo0fIh7.cjs → editor-action-buttons-BVigIMg0.cjs} +1 -1
  24. package/dist/chunks/{editor-action-buttons-BFNtjFzO.js → editor-action-buttons-BxbFCerU.js} +6 -6
  25. package/dist/chunks/{index-BsH32bn1.js → index-B5Oy1eLv.js} +35305 -34883
  26. package/dist/chunks/index-C99Ow35Y.cjs +4 -0
  27. package/dist/chunks/{index-q12_nNUS.cjs → index-DIWJALWL.cjs} +231 -231
  28. package/dist/chunks/{index-B3ZugihZ.js → index-DrYILnh0.js} +799 -808
  29. package/dist/chunks/matrix-result-contract-CofATICL.js +437 -0
  30. package/dist/chunks/matrix-result-contract-zamd9euI.cjs +1 -0
  31. package/dist/chunks/{pivot-header-presentation-DcfPaCiy.cjs → pivot-header-presentation-DhyQXxKq.cjs} +1 -1
  32. package/dist/chunks/{pivot-header-presentation-nk604qc1.js → pivot-header-presentation-ckYOQ4aZ.js} +2 -2
  33. package/dist/chunks/{pivot-result-identity-CRUokNgm.cjs → pivot-result-identity-Bb4EixVN.cjs} +1 -1
  34. package/dist/chunks/{pivot-result-identity-C43Ai5Kr.js → pivot-result-identity-DU1v-5Xk.js} +1 -1
  35. package/dist/chunks/pivot-result-lifecycle-DmcF1ris.cjs +1 -0
  36. package/dist/chunks/{pivot-result-lifecycle-4kSe0Hk1.js → pivot-result-lifecycle-sjzIOpvp.js} +57 -58
  37. package/dist/chunks/{raw-temporal-contract-CxbRFwnd.cjs → raw-temporal-contract-BtjH_G-d.cjs} +1 -1
  38. package/dist/chunks/{raw-temporal-contract-BF7PjBY9.js → raw-temporal-contract-CxncLze5.js} +1 -1
  39. package/dist/chunks/{report-preferences-dialog-BEVZAE3m.cjs → report-preferences-dialog-BgE3Gzsp.cjs} +1 -1
  40. package/dist/chunks/{report-preferences-dialog-BNV7qXYH.js → report-preferences-dialog-CFenWkcH.js} +6 -6
  41. package/dist/chunks/{report-runtime-context-DjYqLV-c.cjs → report-runtime-context-DqxS4wbi.cjs} +1 -1
  42. package/dist/chunks/{report-runtime-context-BJQDu2fV.js → report-runtime-context-SM6YO61_.js} +5 -5
  43. package/dist/chunks/saved-temporal-bucket-format-CFfWXRl9.cjs +1 -0
  44. package/dist/chunks/{saved-temporal-bucket-format-DiZdQXOL.js → saved-temporal-bucket-format-SGAV0ivR.js} +33 -35
  45. package/dist/chunks/{switch-DgLwr7O-.js → switch-BeZW-HnS.js} +367 -369
  46. package/dist/chunks/{switch-CjJ6FHYJ.cjs → switch-D-CCcfhc.cjs} +28 -28
  47. package/dist/chunks/temporal-bucket-5UYEotyQ.js +810 -0
  48. package/dist/chunks/temporal-bucket-DHY1y9lq.cjs +1 -0
  49. package/dist/chunks/{temporal-bucket-authoring-FIRnJz0e.js → temporal-bucket-authoring-K1kE6R_z.js} +28 -27
  50. package/dist/chunks/temporal-bucket-authoring-o3Emn05L.cjs +1 -0
  51. package/dist/chunks/{temporal-bucket-contract-anl4h-vg.cjs → temporal-bucket-contract-D2-93DGr.cjs} +1 -1
  52. package/dist/chunks/{temporal-bucket-contract-BQOj6Frl.js → temporal-bucket-contract-D5d-xEl3.js} +1 -1
  53. package/dist/chunks/{token-types-D0i0IUX3.cjs → token-types-D7CaaI80.cjs} +1 -1
  54. package/dist/chunks/{token-types-CRpQJ4kv.js → token-types-GbxRUozo.js} +1 -1
  55. package/dist/chunks/{update-policy-C1i9bgsy.cjs → update-policy-BmiOd0PB.cjs} +1 -1
  56. package/dist/chunks/{update-policy-CaJz9aPG.js → update-policy-hednMF-0.js} +1 -1
  57. package/dist/chunks/validators-BDYprKI9.cjs +1 -0
  58. package/dist/chunks/{validators-DeMXwRON.js → validators-DEmd8Sin.js} +1544 -1200
  59. package/dist/dashboard/index.cjs +1 -1
  60. package/dist/dashboard/index.js +2 -2
  61. package/dist/dashboard-authoring/index.cjs +3 -3
  62. package/dist/dashboard-authoring/index.js +7 -7
  63. package/dist/data-app-builder/index.cjs +1 -1
  64. package/dist/data-app-builder/index.js +2 -2
  65. package/dist/data-app-codegen/index.cjs +1 -1
  66. package/dist/data-app-codegen/index.js +2 -2
  67. package/dist/data-app-codegen-node/index.cjs +1 -1
  68. package/dist/data-app-codegen-node/index.js +3 -3
  69. package/dist/data-app-sdk/index.cjs +1 -1
  70. package/dist/data-app-sdk/index.js +78 -77
  71. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  72. package/dist/data-app-sdk-adapters/index.js +29 -30
  73. package/dist/data-app-sdk-validation/index.cjs +1 -1
  74. package/dist/data-app-sdk-validation/index.js +21 -21
  75. package/dist/format-utils/index.cjs +3 -3
  76. package/dist/format-utils/index.js +39 -40
  77. package/dist/index.cjs +1 -1
  78. package/dist/index.js +15 -15
  79. package/dist/report-runtime-context/index.cjs +1 -1
  80. package/dist/report-runtime-context/index.js +2 -2
  81. package/dist/surfboard/index.cjs +1 -1
  82. package/dist/surfboard/index.js +3 -3
  83. package/dist/types/analytics-protocol.d.ts +44 -11
  84. package/dist/types/briefings.d.ts +9 -17
  85. package/dist/types/dashboard-assistant.d.ts +19 -22
  86. package/dist/types/dashboard-authoring.d.ts +9 -17
  87. package/dist/types/dashboard.d.ts +9 -17
  88. package/dist/types/data-app-builder.d.ts +28 -2
  89. package/dist/types/data-app-codegen-node.d.ts +29 -3
  90. package/dist/types/data-app-codegen.d.ts +29 -3
  91. package/dist/types/data-app-sdk-adapters.d.ts +28 -2
  92. package/dist/types/data-app-sdk-validation.d.ts +38 -7
  93. package/dist/types/data-app-sdk.d.ts +42 -10
  94. package/dist/types/index.cjs +1 -1
  95. package/dist/types/index.js +4 -4
  96. package/dist/types/main.d.ts +25 -26
  97. package/dist/types/shared.d.ts +9 -17
  98. package/dist/types/surfboard.d.ts +9 -17
  99. package/dist/types/types.d.ts +19 -22
  100. package/package.json +1 -1
  101. package/dist/chunks/canonical-result-keys-Drc2x-lf.cjs +0 -1
  102. package/dist/chunks/catalog-field-grounding-Bnx-3tE0.cjs +0 -1
  103. package/dist/chunks/catalog-field-grounding-S2jKwKGD.js +0 -100
  104. package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +0 -1
  105. package/dist/chunks/dashboard-input-contract-DSt8dGzP.js +0 -18
  106. package/dist/chunks/dashboard-input-contract-DV3cshjz.cjs +0 -1
  107. package/dist/chunks/index-DjiIh_9n.cjs +0 -4
  108. package/dist/chunks/metric-comparison-D0T0MKRK.js +0 -387
  109. package/dist/chunks/metric-comparison-DYR3RXam.cjs +0 -1
  110. package/dist/chunks/pivot-result-lifecycle-BiJepH5S.cjs +0 -1
  111. package/dist/chunks/saved-temporal-bucket-format-Gfbh4IiP.cjs +0 -1
  112. package/dist/chunks/temporal-bucket-Dnj8qT9l.cjs +0 -1
  113. package/dist/chunks/temporal-bucket-FBZGrDCe.js +0 -560
  114. package/dist/chunks/temporal-bucket-authoring-7hv2laOG.cjs +0 -1
  115. package/dist/chunks/validators-Dm7Kpz6p.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/validators-Dm7Kpz6p.cjs"),f=require("../chunks/operators-DrTQsJXv.cjs"),R=require("../chunks/analyze-result-contract-Dxw66nUG.cjs"),n=require("../chunks/catalog-field-grounding-Bnx-3tE0.cjs"),l=require("../chunks/metric-comparison-DYR3RXam.cjs"),u=require("../chunks/dashboard-date-comparison-definition-DZq0htjG.cjs"),p=require("../chunks/dashboard-input-contract-DV3cshjz.cjs"),C=require("../chunks/temporal-bucket-contract-anl4h-vg.cjs"),A=require("../chunks/raw-temporal-contract-CxbRFwnd.cjs");function g(a,t={}){const r=T(a),i={connectionId:t.connectionId,connectionType:a,path:["database","schema","table"],labels:{database:"Database",schema:"Schema",table:"Table"},prefixLevels:["database","schema","table"],dialect:"postgres",supportsFilterClause:!0};return r.includes("postgres")?{...i,prefixLevels:["schema","table"],dialect:"postgres"}:r.includes("mysql")?{...i,prefixLevels:["database","table"],dialect:"mysql",supportsFilterClause:!1}:r.includes("mssql")||r.includes("sqlserver")?{...i,dialect:"mssql",supportsFilterClause:!1}:r.includes("redshift")?{...i,prefixLevels:["schema","table"],dialect:"redshift"}:r.includes("snowflake")?{...i,dialect:"snowflake"}:r.includes("clickhouse")?{connectionId:t.connectionId,connectionType:a,path:["database","table"],labels:{database:"Database",table:"Table"},prefixLevels:["database","table"],dialect:"clickhouse",supportsFilterClause:!1}:r==="s3"||r==="api"?{connectionId:t.connectionId,connectionType:a,path:["table"],labels:{table:r==="api"?"API Table":"File Table"},prefixLevels:["table"],dialect:"duckdb",supportsFilterClause:!0}:r==="googlesheets"||r==="fileupload"?{connectionId:t.connectionId,connectionType:a,path:["table"],labels:{table:"Table"},prefixLevels:["table"],dialect:"postgres",supportsFilterClause:!0}:r==="s3tables"?{...i,labels:{database:"Database",schema:"Namespace",table:"Table"},dialect:"duckdb"}:r==="bigquery"?{...i,labels:{database:"Project",schema:"Dataset",table:"Table"},prefixLevels:["schema","table"],dialect:"bigquery",supportsFilterClause:!1}:i}function y(a){const t=T(a);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 _(a){return a.capabilities.prefixLevels.every(t=>!!b(a.source,t))}function v(a){const t=a.quoteIdentifier??I;return a.capabilities.prefixLevels.map(r=>b(a.source,r)).filter(r=>!!r).map(r=>t(r,a.capabilities.dialect)).join(".")}function b(a,t){return t==="database"?a.databaseName:t==="schema"?a.schemaName:a.tableName}function I(a,t){return t==="mysql"||t==="bigquery"||t==="clickhouse"||t==="duckdb"?`\`${a.replace(/`/g,"``")}\``:t==="mssql"?`[${a.replace(/]/g,"]]")}]`:`"${a.replace(/"/g,'""')}"`}function T(a){if(typeof a!="string")return"";const t=[];for(const r of a.trim().toLowerCase())D(r)&&t.push(r);return t.join("")}function D(a){const t=a.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122}const c={kind:"semantic",domainId:"domain_sales",datasetName:"orders",connectionId:"conn_sales",label:"Orders"},M={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:c,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:c,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:c,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:c,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:c,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:c,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"}]}},E={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(a){return!!(a.name.trim()&&e.hasCompleteSemaphorSourceIdentity(a.source)&&(a.role==="date"||a.dataType==="date"||a.dataType==="datetime"))}function h(a){return a.filter((t,r)=>a.findIndex(i=>e.semaphorFieldRefsMatch(t.field,i.field))===r)}function F(a){return new Set(a.map(e.semaphorSourceIdentityKey).filter(Boolean)).size}function O(a){const t=h(a.candidates.filter(o=>o.kind==="visible_axis")),r=h(a.candidates.filter(o=>o.kind==="explicit_hidden"));if([...t,...r].some(o=>!S(o.field)))return"invalid";if(t.length>1||r.length>1)return"ambiguous";const i=t[0],m=r[0];if(i)return m&&!e.semaphorFieldRefsMatch(i.field,m.field)?"invalid":i;if(m)return m;if(F(a.querySources??[])>1)return"ambiguous";const d=h(a.candidates.filter(o=>o.kind==="semantic_primary"));return d.some(o=>!S(o.field))?"invalid":d.length>1?"ambiguous":d[0]??"missing"}function P(a){const t=new Date(a.startInclusive),r=new Date(a.endExclusive);return a.timezone.trim()?Number.isFinite(t.getTime())&&Number.isFinite(r.getTime())&&t.getTime()<r.getTime():!1}function N(a){const t=a.ranges??[];if(a.rawSql)return{status:"unavailable",reason:"unsupported_raw_sql",constraints:t};if((a.querySources??[]).some(s=>!e.hasCompleteSemaphorSourceIdentity(s))||t.some(s=>!S(s.field)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const r=O(a);if(typeof r=="string")return{status:"unavailable",reason:`temporal_binding_${r}`,constraints:t};const i=t.filter(s=>e.semaphorFieldRefsMatch(s.field,r.field));if(i.some(s=>!P(s.window)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const m=i.filter(s=>s.source==="global_date"),d=i.filter(s=>s.source==="card");if(m.length>1||m.length===0&&d.length>1)return{status:"unavailable",reason:"temporal_binding_ambiguous",constraints:t};const o=m[0]??d[0];return{status:"resolved",field:r.field,bindingSource:r.kind,...o?{currentWindow:o.window,governingWindowSource:o.source,governingRangeId:o.id}:{},constraints:t.filter(s=>s.id!==(o==null?void 0:o.id))}}exports.RAW_TEMPORAL_CONTRACT_ERROR_CODES=e.RAW_TEMPORAL_CONTRACT_ERROR_CODES;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.SEMAPHOR_GENERATED_COUNT_METRIC_ID=e.SEMAPHOR_GENERATED_COUNT_METRIC_ID;exports.SEMAPHOR_MATRIX_TIME_GRAINS=e.SEMAPHOR_MATRIX_TIME_GRAINS;exports.SEMAPHOR_TIME_GRAINS=e.SEMAPHOR_TIME_GRAINS;exports.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES=e.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES;exports.TEMPORAL_BUCKET_PRESETS=e.TEMPORAL_BUCKET_PRESETS;exports.canonicalDashboardRecordsPayloadSchema=e.canonicalDashboardRecordsPayloadSchema;exports.dashboardRecordsPayloadSchema=e.dashboardRecordsPayloadSchema;exports.hasCompleteSemaphorSourceIdentity=e.hasCompleteSemaphorSourceIdentity;exports.isSemaphorDataAppCodegenSummary=e.isSemaphorDataAppCodegenSummary;exports.isSemaphorMatrixTimeGrain=e.isSemaphorMatrixTimeGrain;exports.isSemaphorTimeGrain=e.isSemaphorTimeGrain;exports.mergeSemaphorSourcesByIdentity=e.mergeSemaphorSourcesByIdentity;exports.parseSemaphorIsoInstant=e.parseSemaphorIsoInstant;exports.parseSemaphorIsoTimeWindowBoundary=e.parseSemaphorIsoTimeWindowBoundary;exports.preferSemaphorFieldRefMetadata=e.preferSemaphorFieldRefMetadata;exports.preferSemaphorSourceMetadata=e.preferSemaphorSourceMetadata;exports.rawTemporalValueMetadataSchema=e.rawTemporalValueMetadataSchema;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.semaphorTimeGrainSchema=e.semaphorTimeGrainSchema;exports.temporalBucketDataTypeForGrain=e.temporalBucketDataTypeForGrain;exports.temporalBucketFormatSchema=e.temporalBucketFormatSchema;exports.temporalBucketMetadataSchema=e.temporalBucketMetadataSchema;exports.validateSemaphorAnalyticsIntent=e.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=e.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=e.validateSemaphorDashboardIntent;exports.validateSemaphorDataAppCodegenSummary=e.validateSemaphorDataAppCodegenSummary;exports.validateSemaphorDerivedFieldDefinition=e.validateSemaphorDerivedFieldDefinition;exports.validateSemaphorOperationIntent=e.validateSemaphorOperationIntent;exports.validateSemaphorResultCalculation=e.validateSemaphorResultCalculation;exports.normalizeSemaphorAnalyticsFilterOperator=f.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=f.normalizeSemaphorInputOperator;exports.getSemaphorAnalyzeResultFieldNames=R.getSemaphorAnalyzeResultFieldNames;exports.isSemaphorAnalyzeResultFieldName=R.isSemaphorAnalyzeResultFieldName;exports.parseSemaphorAnalyzeResult=R.parseSemaphorAnalyzeResult;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=u.isComparisonCapableDashboardDateInputDefinition;exports.resolveDashboardDateComparisonFilterDefinition=u.resolveDashboardDateComparisonFilterDefinition;exports.resolveDashboardDateComparisonInputDefinition=u.resolveDashboardDateComparisonInputDefinition;exports.semanticDatasetMatchesFieldCoordinates=u.semanticDatasetMatchesFieldCoordinates;exports.getCardControlCompatInputId=p.getCardControlCompatInputId;exports.getCardInlineFilterCompatInputId=p.getCardInlineFilterCompatInputId;exports.getDashboardControlCompatInputId=p.getDashboardControlCompatInputId;exports.getDashboardFilterCompatInputId=p.getDashboardFilterCompatInputId;exports.validateActivatedTemporalBucketResultColumns=C.validateActivatedTemporalBucketResultColumns;exports.validateTemporalBucketMetadata=C.validateTemporalBucketMetadata;exports.validateTemporalBucketResultColumn=C.validateTemporalBucketResultColumn;exports.RawTemporalMetadataContractError=A.RawTemporalMetadataContractError;exports.parseRawTemporalValueMetadata=A.parseRawTemporalValueMetadata;exports.validateRawTemporalResultColumn=A.validateRawTemporalResultColumn;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=M;exports.TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES=E;exports.buildSemaphorQualifiedSourcePath=v;exports.getSemaphorConnectionCapabilities=g;exports.normalizeSemaphorDialect=y;exports.resolveTemporalContext=N;exports.semaphorSourceHasRequiredCoordinates=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/validators-BDYprKI9.cjs"),A=require("../chunks/operators-DrTQsJXv.cjs"),S=require("../chunks/analyze-result-contract-LPDNldic.cjs"),n=require("../chunks/temporal-bucket-DHY1y9lq.cjs"),u=require("../chunks/dashboard-date-comparison-definition-Ces4alFm.cjs"),c=require("../chunks/matrix-result-contract-zamd9euI.cjs"),R=require("../chunks/temporal-bucket-contract-D2-93DGr.cjs"),C=require("../chunks/raw-temporal-contract-BtjH_G-d.cjs");function T(a,t={}){const r=b(a),i={connectionId:t.connectionId,connectionType:a,path:["database","schema","table"],labels:{database:"Database",schema:"Schema",table:"Table"},prefixLevels:["database","schema","table"],dialect:"postgres",supportsFilterClause:!0};return r.includes("postgres")?{...i,prefixLevels:["schema","table"],dialect:"postgres"}:r.includes("mysql")?{...i,prefixLevels:["database","table"],dialect:"mysql",supportsFilterClause:!1}:r.includes("mssql")||r.includes("sqlserver")?{...i,dialect:"mssql",supportsFilterClause:!1}:r.includes("redshift")?{...i,prefixLevels:["schema","table"],dialect:"redshift"}:r.includes("snowflake")?{...i,dialect:"snowflake"}:r.includes("clickhouse")?{connectionId:t.connectionId,connectionType:a,path:["database","table"],labels:{database:"Database",table:"Table"},prefixLevels:["database","table"],dialect:"clickhouse",supportsFilterClause:!1}:r==="s3"||r==="api"?{connectionId:t.connectionId,connectionType:a,path:["table"],labels:{table:r==="api"?"API Table":"File Table"},prefixLevels:["table"],dialect:"duckdb",supportsFilterClause:!0}:r==="googlesheets"||r==="fileupload"?{connectionId:t.connectionId,connectionType:a,path:["table"],labels:{table:"Table"},prefixLevels:["table"],dialect:"postgres",supportsFilterClause:!0}:r==="s3tables"?{...i,labels:{database:"Database",schema:"Namespace",table:"Table"},dialect:"duckdb"}:r==="bigquery"?{...i,labels:{database:"Project",schema:"Dataset",table:"Table"},prefixLevels:["schema","table"],dialect:"bigquery",supportsFilterClause:!1}:i}function g(a){const t=b(a);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 y(a){return a.capabilities.prefixLevels.every(t=>!!f(a.source,t))}function _(a){const t=a.quoteIdentifier??v;return a.capabilities.prefixLevels.map(r=>f(a.source,r)).filter(r=>!!r).map(r=>t(r,a.capabilities.dialect)).join(".")}function f(a,t){return t==="database"?a.databaseName:t==="schema"?a.schemaName:a.tableName}function v(a,t){return t==="mysql"||t==="bigquery"||t==="clickhouse"||t==="duckdb"?`\`${a.replace(/`/g,"``")}\``:t==="mssql"?`[${a.replace(/]/g,"]]")}]`:`"${a.replace(/"/g,'""')}"`}function b(a){if(typeof a!="string")return"";const t=[];for(const r of a.trim().toLowerCase())I(r)&&t.push(r);return t.join("")}function I(a){const t=a.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122}const d={kind:"semantic",domainId:"domain_sales",datasetName:"orders",connectionId:"conn_sales",label:"Orders"},M={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:d,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:d,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:d,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:d,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:d,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:d,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"}]}},D={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 h(a){return!!(a.name.trim()&&e.hasCompleteSemaphorSourceIdentity(a.source)&&(a.role==="date"||a.dataType==="date"||a.dataType==="datetime"))}function p(a){return a.filter((t,r)=>a.findIndex(i=>e.semaphorFieldRefsMatch(t.field,i.field))===r)}function E(a){return new Set(a.map(e.semaphorSourceIdentityKey).filter(Boolean)).size}function O(a){const t=p(a.candidates.filter(o=>o.kind==="visible_axis")),r=p(a.candidates.filter(o=>o.kind==="explicit_hidden"));if([...t,...r].some(o=>!h(o.field)))return"invalid";if(t.length>1||r.length>1)return"ambiguous";const i=t[0],l=r[0];if(i)return l&&!e.semaphorFieldRefsMatch(i.field,l.field)?"invalid":i;if(l)return l;if(E(a.querySources??[])>1)return"ambiguous";const m=p(a.candidates.filter(o=>o.kind==="semantic_primary"));return m.some(o=>!h(o.field))?"invalid":m.length>1?"ambiguous":m[0]??"missing"}function F(a){const t=new Date(a.startInclusive),r=new Date(a.endExclusive);return a.timezone.trim()?Number.isFinite(t.getTime())&&Number.isFinite(r.getTime())&&t.getTime()<r.getTime():!1}function P(a){const t=a.ranges??[];if(a.rawSql)return{status:"unavailable",reason:"unsupported_raw_sql",constraints:t};if((a.querySources??[]).some(s=>!e.hasCompleteSemaphorSourceIdentity(s))||t.some(s=>!h(s.field)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const r=O(a);if(typeof r=="string")return{status:"unavailable",reason:`temporal_binding_${r}`,constraints:t};const i=t.filter(s=>e.semaphorFieldRefsMatch(s.field,r.field));if(i.some(s=>!F(s.window)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const l=i.filter(s=>s.source==="global_date"),m=i.filter(s=>s.source==="card");if(l.length>1||l.length===0&&m.length>1)return{status:"unavailable",reason:"temporal_binding_ambiguous",constraints:t};const o=l[0]??m[0];return{status:"resolved",field:r.field,bindingSource:r.kind,...o?{currentWindow:o.window,governingWindowSource:o.source,governingRangeId:o.id}:{},constraints:t.filter(s=>s.id!==(o==null?void 0:o.id))}}exports.RAW_TEMPORAL_CONTRACT_ERROR_CODES=e.RAW_TEMPORAL_CONTRACT_ERROR_CODES;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.SEMAPHOR_GENERATED_COUNT_METRIC_ID=e.SEMAPHOR_GENERATED_COUNT_METRIC_ID;exports.SEMAPHOR_MATRIX_TIME_GRAINS=e.SEMAPHOR_MATRIX_TIME_GRAINS;exports.SEMAPHOR_TIME_GRAINS=e.SEMAPHOR_TIME_GRAINS;exports.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES=e.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES;exports.TEMPORAL_BUCKET_PRESETS=e.TEMPORAL_BUCKET_PRESETS;exports.buildAnalyticsCatalogFieldSummary=e.buildAnalyticsCatalogFieldSummary;exports.canonicalDashboardRecordsPayloadSchema=e.canonicalDashboardRecordsPayloadSchema;exports.dashboardRecordsPayloadSchema=e.dashboardRecordsPayloadSchema;exports.getAnalyticsCatalogFieldCandidates=e.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=e.getAnalyticsCatalogFieldName;exports.hasCompleteSemaphorSourceIdentity=e.hasCompleteSemaphorSourceIdentity;exports.isAnalyticsCatalogDateField=e.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=e.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=e.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=e.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=e.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=e.isAnalyticsTechnicalIdentifierField;exports.isSemaphorDataAppCodegenSummary=e.isSemaphorDataAppCodegenSummary;exports.isSemaphorMatrixTimeGrain=e.isSemaphorMatrixTimeGrain;exports.isSemaphorTimeGrain=e.isSemaphorTimeGrain;exports.mergeSemaphorSourcesByIdentity=e.mergeSemaphorSourcesByIdentity;exports.normalizeAnalyticsCatalogDataType=e.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=e.normalizeAnalyticsCatalogName;exports.parseSemaphorIsoInstant=e.parseSemaphorIsoInstant;exports.parseSemaphorIsoTimeWindowBoundary=e.parseSemaphorIsoTimeWindowBoundary;exports.preferSemaphorFieldRefMetadata=e.preferSemaphorFieldRefMetadata;exports.preferSemaphorSourceMetadata=e.preferSemaphorSourceMetadata;exports.rawTemporalValueMetadataSchema=e.rawTemporalValueMetadataSchema;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.semaphorTimeGrainSchema=e.semaphorTimeGrainSchema;exports.temporalBucketDataTypeForGrain=e.temporalBucketDataTypeForGrain;exports.temporalBucketFormatSchema=e.temporalBucketFormatSchema;exports.temporalBucketMetadataSchema=e.temporalBucketMetadataSchema;exports.validateSemaphorAnalyticsIntent=e.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=e.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=e.validateSemaphorDashboardIntent;exports.validateSemaphorDataAppCodegenSummary=e.validateSemaphorDataAppCodegenSummary;exports.validateSemaphorDerivedFieldDefinition=e.validateSemaphorDerivedFieldDefinition;exports.validateSemaphorOperationIntent=e.validateSemaphorOperationIntent;exports.validateSemaphorResultCalculation=e.validateSemaphorResultCalculation;exports.normalizeSemaphorAnalyticsFilterOperator=A.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=A.normalizeSemaphorInputOperator;exports.getSemaphorAnalyzeResultFieldNames=S.getSemaphorAnalyzeResultFieldNames;exports.isSemaphorAnalyzeResultFieldName=S.isSemaphorAnalyzeResultFieldName;exports.parseSemaphorAnalyzeResult=S.parseSemaphorAnalyzeResult;exports.COMPARISON_PRESENTATION_DEFAULTS=n.COMPARISON_PRESENTATION_DEFAULTS;exports.DEFAULT_METRIC_COMPARISON_POLARITY=n.DEFAULT_METRIC_COMPARISON_POLARITY;exports.evaluateMetricComparison=n.evaluateMetricComparison;exports.resolveMetricComparisonRequest=n.resolveMetricComparisonRequest;exports.resolveMetricResultAlias=n.resolveMetricResultAlias;exports.validateComparisonPresentationSpec=n.validateComparisonPresentationSpec;exports.validateGlobalDateComparisonContext=n.validateGlobalDateComparisonContext;exports.validateGlobalDateComparisonSelection=n.validateGlobalDateComparisonSelection;exports.validateMetricComparisonConfig=n.validateMetricComparisonConfig;exports.validateMetricComparisonPolarity=n.validateMetricComparisonPolarity;exports.validateMetricComparisonSpec=n.validateMetricComparisonSpec;exports.isComparisonCapableDashboardDateInputDefinition=u.isComparisonCapableDashboardDateInputDefinition;exports.resolveDashboardDateComparisonFilterDefinition=u.resolveDashboardDateComparisonFilterDefinition;exports.resolveDashboardDateComparisonInputDefinition=u.resolveDashboardDateComparisonInputDefinition;exports.semanticDatasetMatchesFieldCoordinates=u.semanticDatasetMatchesFieldCoordinates;exports.MatrixResultContractError=c.MatrixResultContractError;exports.getCardControlCompatInputId=c.getCardControlCompatInputId;exports.getCardInlineFilterCompatInputId=c.getCardInlineFilterCompatInputId;exports.getDashboardControlCompatInputId=c.getDashboardControlCompatInputId;exports.getDashboardFilterCompatInputId=c.getDashboardFilterCompatInputId;exports.parseCanonicalMatrixResult=c.parseCanonicalMatrixResult;exports.validateActivatedTemporalBucketResultColumns=R.validateActivatedTemporalBucketResultColumns;exports.validateTemporalBucketMetadata=R.validateTemporalBucketMetadata;exports.validateTemporalBucketResultColumn=R.validateTemporalBucketResultColumn;exports.RawTemporalMetadataContractError=C.RawTemporalMetadataContractError;exports.parseRawTemporalValueMetadata=C.parseRawTemporalValueMetadata;exports.validateRawTemporalResultColumn=C.validateRawTemporalResultColumn;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=M;exports.TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES=D;exports.buildSemaphorQualifiedSourcePath=_;exports.getSemaphorConnectionCapabilities=T;exports.normalizeSemaphorDialect=g;exports.resolveTemporalContext=P;exports.semaphorSourceHasRequiredCoordinates=y;
@@ -1,13 +1,12 @@
1
- import { h as u, s as c, j as f } from "../chunks/validators-DeMXwRON.js";
2
- import { R as k, f as O, S as q, a as N, q as x, m as P, k as L, T as w, o as B, N as z, M as G, i as U, n as H, l as V, a6 as Y, e as W, r as K, p as j, a5 as Q, D as X, a0 as $, _ as Z, a1 as J, $ as ee, Y as ae, O as se, P as re, g as te, a2 as ie, a3 as ne, J as oe, K as le, I as de, V as me, X as ce, c as ue, a7 as pe, Q as he, F as fe, U as be, Z as Se, L as ge, E as ve, H as Re, a4 as Ce, W as Te, G as _e, B as ye, d as Ae, C as Ie, t as De, x as Ee, z as Me, A as Fe, v as ke, u as Oe, y as qe, w as Ne } from "../chunks/validators-DeMXwRON.js";
3
- import { a as Pe, n as Le } from "../chunks/operators-C8TxpM4C.js";
4
- import { g as Be, i as ze, p as Ge } from "../chunks/analyze-result-contract-GHKFwThg.js";
5
- import { j as He, b as Ve, g as Ye, c as We, h as Ke, f as je, i as Qe, e as Xe, d as $e, n as Ze, a as Je } from "../chunks/catalog-field-grounding-S2jKwKGD.js";
6
- import { C as aa, D as sa, g as ra, r as ta, a as ia, f as na, d as oa, c as la, b as da, e as ma, v as ca } from "../chunks/metric-comparison-D0T0MKRK.js";
7
- import { i as pa, r as ha, a as fa, s as ba } from "../chunks/dashboard-date-comparison-definition-Ba-clViK.js";
8
- import { c as ga, b as va, a as Ra, g as Ca } from "../chunks/dashboard-input-contract-DSt8dGzP.js";
9
- import { b as _a, v as ya, a as Aa } from "../chunks/temporal-bucket-contract-BQOj6Frl.js";
10
- import { R as Da, p as Ea, v as Ma } from "../chunks/raw-temporal-contract-BF7PjBY9.js";
1
+ import { l as u, s as c, m as f } from "../chunks/validators-DEmd8Sin.js";
2
+ import { R as k, g as O, S as q, a as x, x as N, r as P, o as L, T as w, w as B, O as z, a2 as G, a1 as U, H, G as V, J as Y, N as W, M as K, I as j, L as Q, K as X, i as $, u as Z, q as J, aj as ee, n as ae, F as se, j as re, y as te, p as ie, ai as ne, U as oe, ad as le, ab as de, ae as me, ac as ce, a9 as ue, a3 as pe, a4 as he, h as fe, af as be, ag as Se, _ as ge, $ as ve, Z as Re, a7 as Ce, k as Te, c as _e, ak as ye, a5 as Ae, W as Ie, a6 as De, aa as Me, a0 as Ee, V as Fe, Y as ke, ah as Oe, a8 as qe, X as xe, P as Ne, f as Pe, Q as Le, t as we, B as Be, D as ze, E as Ge, v as Ue, z as He, C as Ve, A as Ye } from "../chunks/validators-DEmd8Sin.js";
3
+ import { a as Ke, n as je } from "../chunks/operators-C8TxpM4C.js";
4
+ import { g as Xe, i as $e, p as Ze } from "../chunks/analyze-result-contract-BbRJ-C06.js";
5
+ import { C as ea, D as aa, h as sa, r as ra, a as ta, g as ia, d as na, c as oa, b as la, e as da, v as ma } from "../chunks/temporal-bucket-5UYEotyQ.js";
6
+ import { i as ua, r as pa, a as ha, s as fa } from "../chunks/dashboard-date-comparison-definition-DC3ekV2S.js";
7
+ import { M as Sa, c as ga, b as va, a as Ra, g as Ca, p as Ta } from "../chunks/matrix-result-contract-CofATICL.js";
8
+ import { b as ya, v as Aa, a as Ia } from "../chunks/temporal-bucket-contract-D5d-xEl3.js";
9
+ import { R as Ma, p as Ea, v as Fa } from "../chunks/raw-temporal-contract-CxncLze5.js";
11
10
  function T(e, a = {}) {
12
11
  const s = h(e), r = {
13
12
  connectionId: a.connectionId,
@@ -327,7 +326,7 @@ function R(e) {
327
326
  const a = new Date(e.startInclusive), s = new Date(e.endExclusive);
328
327
  return e.timezone.trim() ? Number.isFinite(a.getTime()) && Number.isFinite(s.getTime()) && a.getTime() < s.getTime() : !1;
329
328
  }
330
- function E(e) {
329
+ function M(e) {
331
330
  const a = e.ranges ?? [];
332
331
  if (e.rawSql)
333
332
  return {
@@ -382,113 +381,115 @@ function E(e) {
382
381
  };
383
382
  }
384
383
  export {
385
- aa as COMPARISON_PRESENTATION_DEFAULTS,
386
- sa as DEFAULT_METRIC_COMPARISON_POLARITY,
384
+ ea as COMPARISON_PRESENTATION_DEFAULTS,
385
+ aa as DEFAULT_METRIC_COMPARISON_POLARITY,
386
+ Sa as MatrixResultContractError,
387
387
  k as RAW_TEMPORAL_CONTRACT_ERROR_CODES,
388
- Da as RawTemporalMetadataContractError,
388
+ Ma as RawTemporalMetadataContractError,
389
389
  I as SEMAPHOR_ANALYTICS_INTENT_FIXTURES,
390
390
  O as SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT,
391
391
  q as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,
392
- N as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,
393
- x as SEMAPHOR_GENERATED_COUNT_METRIC_ID,
392
+ x as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,
393
+ N as SEMAPHOR_GENERATED_COUNT_METRIC_ID,
394
394
  P as SEMAPHOR_MATRIX_TIME_GRAINS,
395
395
  L as SEMAPHOR_TIME_GRAINS,
396
396
  w as TEMPORAL_BUCKET_CONTRACT_ERROR_CODES,
397
397
  B as TEMPORAL_BUCKET_PRESETS,
398
398
  D as TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES,
399
- He as buildAnalyticsCatalogFieldSummary,
399
+ z as buildAnalyticsCatalogFieldSummary,
400
400
  A as buildSemaphorQualifiedSourcePath,
401
- z as canonicalDashboardRecordsPayloadSchema,
402
- G as dashboardRecordsPayloadSchema,
403
- ra as evaluateMetricComparison,
404
- Ve as getAnalyticsCatalogFieldCandidates,
405
- Ye as getAnalyticsCatalogFieldName,
401
+ G as canonicalDashboardRecordsPayloadSchema,
402
+ U as dashboardRecordsPayloadSchema,
403
+ sa as evaluateMetricComparison,
404
+ H as getAnalyticsCatalogFieldCandidates,
405
+ V as getAnalyticsCatalogFieldName,
406
406
  ga as getCardControlCompatInputId,
407
407
  va as getCardInlineFilterCompatInputId,
408
408
  Ra as getDashboardControlCompatInputId,
409
409
  Ca as getDashboardFilterCompatInputId,
410
- Be as getSemaphorAnalyzeResultFieldNames,
410
+ Xe as getSemaphorAnalyzeResultFieldNames,
411
411
  T as getSemaphorConnectionCapabilities,
412
412
  u as hasCompleteSemaphorSourceIdentity,
413
- We as isAnalyticsCatalogDateField,
414
- Ke as isAnalyticsCatalogDimensionField,
415
- je as isAnalyticsCatalogMetricField,
416
- Qe as isAnalyticsDateLikeDataType,
417
- Xe as isAnalyticsMetricIdentifierField,
418
- $e as isAnalyticsTechnicalIdentifierField,
419
- pa as isComparisonCapableDashboardDateInputDefinition,
420
- ze as isSemaphorAnalyzeResultFieldName,
421
- U as isSemaphorDataAppCodegenSummary,
422
- H as isSemaphorMatrixTimeGrain,
423
- V as isSemaphorTimeGrain,
424
- Y as mergeSemaphorSourcesByIdentity,
425
- Ze as normalizeAnalyticsCatalogDataType,
426
- Je as normalizeAnalyticsCatalogName,
427
- Pe as normalizeSemaphorAnalyticsFilterOperator,
413
+ Y as isAnalyticsCatalogDateField,
414
+ W as isAnalyticsCatalogDimensionField,
415
+ K as isAnalyticsCatalogMetricField,
416
+ j as isAnalyticsDateLikeDataType,
417
+ Q as isAnalyticsMetricIdentifierField,
418
+ X as isAnalyticsTechnicalIdentifierField,
419
+ ua as isComparisonCapableDashboardDateInputDefinition,
420
+ $e as isSemaphorAnalyzeResultFieldName,
421
+ $ as isSemaphorDataAppCodegenSummary,
422
+ Z as isSemaphorMatrixTimeGrain,
423
+ J as isSemaphorTimeGrain,
424
+ ee as mergeSemaphorSourcesByIdentity,
425
+ ae as normalizeAnalyticsCatalogDataType,
426
+ se as normalizeAnalyticsCatalogName,
427
+ Ke as normalizeSemaphorAnalyticsFilterOperator,
428
428
  _ as normalizeSemaphorDialect,
429
- Le as normalizeSemaphorInputOperator,
429
+ je as normalizeSemaphorInputOperator,
430
+ Ta as parseCanonicalMatrixResult,
430
431
  Ea as parseRawTemporalValueMetadata,
431
- Ge as parseSemaphorAnalyzeResult,
432
- W as parseSemaphorIsoInstant,
433
- K as parseSemaphorIsoTimeWindowBoundary,
434
- j as preferSemaphorFieldRefMetadata,
435
- Q as preferSemaphorSourceMetadata,
436
- X as rawTemporalValueMetadataSchema,
437
- ha as resolveDashboardDateComparisonFilterDefinition,
438
- fa as resolveDashboardDateComparisonInputDefinition,
439
- ta as resolveMetricComparisonRequest,
440
- ia as resolveMetricResultAlias,
441
- E as resolveTemporalContext,
442
- ba as semanticDatasetMatchesFieldCoordinates,
443
- $ as semaphorAnalyticsCoverageSchema,
444
- Z as semaphorAnalyticsDiagnosticFeedbackSchema,
445
- J as semaphorAnalyticsExecutionResultSchema,
446
- ee as semaphorAnalyticsPopulationSchema,
447
- ae as semaphorAnalyticsResultSchema,
448
- se as semaphorAnalyticsValidationIssueSchema,
449
- re as semaphorAnalyticsValidationResultSchema,
450
- te as semaphorAnalyzeResultSchema,
451
- ie as semaphorAnalyzeResultShape,
452
- ne as semaphorDataAppCodegenSummarySchema,
453
- oe as semaphorDerivedFieldDefinitionSchema,
454
- le as semaphorExecutionFieldRefSchema,
455
- de as semaphorFieldRefSchema,
432
+ Ze as parseSemaphorAnalyzeResult,
433
+ re as parseSemaphorIsoInstant,
434
+ te as parseSemaphorIsoTimeWindowBoundary,
435
+ ie as preferSemaphorFieldRefMetadata,
436
+ ne as preferSemaphorSourceMetadata,
437
+ oe as rawTemporalValueMetadataSchema,
438
+ pa as resolveDashboardDateComparisonFilterDefinition,
439
+ ha as resolveDashboardDateComparisonInputDefinition,
440
+ ra as resolveMetricComparisonRequest,
441
+ ta as resolveMetricResultAlias,
442
+ M as resolveTemporalContext,
443
+ fa as semanticDatasetMatchesFieldCoordinates,
444
+ le as semaphorAnalyticsCoverageSchema,
445
+ de as semaphorAnalyticsDiagnosticFeedbackSchema,
446
+ me as semaphorAnalyticsExecutionResultSchema,
447
+ ce as semaphorAnalyticsPopulationSchema,
448
+ ue as semaphorAnalyticsResultSchema,
449
+ pe as semaphorAnalyticsValidationIssueSchema,
450
+ he as semaphorAnalyticsValidationResultSchema,
451
+ fe as semaphorAnalyzeResultSchema,
452
+ be as semaphorAnalyzeResultShape,
453
+ Se as semaphorDataAppCodegenSummarySchema,
454
+ ge as semaphorDerivedFieldDefinitionSchema,
455
+ ve as semaphorExecutionFieldRefSchema,
456
+ Re as semaphorFieldRefSchema,
456
457
  c as semaphorFieldRefsMatch,
457
- me as semaphorInputOptionsResultSchema,
458
- ce as semaphorMatrixResultSchema,
459
- ue as semaphorMetricAggregate,
460
- pe as semaphorMetricMeasureBindingKey,
461
- he as semaphorMetricResultSchema,
462
- fe as semaphorPhysicalSourceRefSchema,
463
- be as semaphorRecordsResultSchema,
464
- Se as semaphorRelationshipDiagnosticsSchema,
465
- ge as semaphorResultColumnSchema,
466
- ve as semaphorSemanticSourceRefSchema,
458
+ Ce as semaphorInputOptionsResultSchema,
459
+ Te as semaphorMatrixResultSchema,
460
+ _e as semaphorMetricAggregate,
461
+ ye as semaphorMetricMeasureBindingKey,
462
+ Ae as semaphorMetricResultSchema,
463
+ Ie as semaphorPhysicalSourceRefSchema,
464
+ De as semaphorRecordsResultSchema,
465
+ Me as semaphorRelationshipDiagnosticsSchema,
466
+ Ee as semaphorResultColumnSchema,
467
+ Fe as semaphorSemanticSourceRefSchema,
467
468
  y as semaphorSourceHasRequiredCoordinates,
468
469
  f as semaphorSourceIdentityKey,
469
- Re as semaphorSourceRefSchema,
470
- Ce as semaphorSourcesReferToSameDataset,
471
- Te as semaphorSqlResultSchema,
472
- _e as semaphorSqlSourceRefSchema,
473
- ye as semaphorTimeGrainSchema,
474
- Ae as temporalBucketDataTypeForGrain,
475
- Ie as temporalBucketFormatSchema,
476
- De as temporalBucketMetadataSchema,
477
- _a as validateActivatedTemporalBucketResultColumns,
478
- na as validateComparisonPresentationSpec,
479
- oa as validateGlobalDateComparisonContext,
480
- la as validateGlobalDateComparisonSelection,
481
- da as validateMetricComparisonConfig,
482
- ma as validateMetricComparisonPolarity,
483
- ca as validateMetricComparisonSpec,
484
- Ma as validateRawTemporalResultColumn,
485
- Ee as validateSemaphorAnalyticsIntent,
486
- Me as validateSemaphorAnalyticsRecoveryPlan,
487
- Fe as validateSemaphorDashboardIntent,
488
- ke as validateSemaphorDataAppCodegenSummary,
489
- Oe as validateSemaphorDerivedFieldDefinition,
490
- qe as validateSemaphorOperationIntent,
491
- Ne as validateSemaphorResultCalculation,
492
- ya as validateTemporalBucketMetadata,
493
- Aa as validateTemporalBucketResultColumn
470
+ ke as semaphorSourceRefSchema,
471
+ Oe as semaphorSourcesReferToSameDataset,
472
+ qe as semaphorSqlResultSchema,
473
+ xe as semaphorSqlSourceRefSchema,
474
+ Ne as semaphorTimeGrainSchema,
475
+ Pe as temporalBucketDataTypeForGrain,
476
+ Le as temporalBucketFormatSchema,
477
+ we as temporalBucketMetadataSchema,
478
+ ya as validateActivatedTemporalBucketResultColumns,
479
+ ia as validateComparisonPresentationSpec,
480
+ na as validateGlobalDateComparisonContext,
481
+ oa as validateGlobalDateComparisonSelection,
482
+ la as validateMetricComparisonConfig,
483
+ da as validateMetricComparisonPolarity,
484
+ ma as validateMetricComparisonSpec,
485
+ Fa as validateRawTemporalResultColumn,
486
+ Be as validateSemaphorAnalyticsIntent,
487
+ ze as validateSemaphorAnalyticsRecoveryPlan,
488
+ Ge as validateSemaphorDashboardIntent,
489
+ Ue as validateSemaphorDataAppCodegenSummary,
490
+ He as validateSemaphorDerivedFieldDefinition,
491
+ Ve as validateSemaphorOperationIntent,
492
+ Ye as validateSemaphorResultCalculation,
493
+ Aa as validateTemporalBucketMetadata,
494
+ Ia as validateTemporalBucketResultColumn
494
495
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),d=require("../chunks/switch-CjJ6FHYJ.cjs"),oe=require("../chunks/color-CyB5o13F.cjs"),L=require("../chunks/x-B6ghREd2.cjs");require("../chunks/saved-temporal-bucket-format-Gfbh4IiP.cjs");require("../chunks/validators-Dm7Kpz6p.cjs");require("../chunks/analyze-result-contract-Dxw66nUG.cjs");require("../value-format-preferences/index.cjs");const W=require("../chunks/index-ByFbacH7.cjs"),_=require("../chunks/palette-BN-jYtaK.cjs"),fe=require("../chunks/braces-v55uLCAK.cjs"),me=require("../chunks/save-3dYRmehL.cjs"),xe=require("../chunks/layout-grid-xm8pqtx0.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),d=require("../chunks/switch-D-CCcfhc.cjs"),oe=require("../chunks/color-CyB5o13F.cjs"),L=require("../chunks/x-B6ghREd2.cjs");require("../chunks/saved-temporal-bucket-format-CFfWXRl9.cjs");require("../chunks/validators-BDYprKI9.cjs");require("../chunks/analyze-result-contract-LPDNldic.cjs");require("../value-format-preferences/index.cjs");const W=require("../chunks/index-ByFbacH7.cjs"),_=require("../chunks/palette-BN-jYtaK.cjs"),fe=require("../chunks/braces-v55uLCAK.cjs"),me=require("../chunks/save-3dYRmehL.cjs"),xe=require("../chunks/layout-grid-xm8pqtx0.cjs");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,11 +1,11 @@
1
1
  import { jsxs as d, jsx as r, Fragment as ce } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { c as q, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as le, S as se, d as Je, T as je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q as K, V as Q, W as ee, X as he, Y as re, Z as oe, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-DgLwr7O-.js";
3
+ import { c as q, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as le, S as se, d as Je, T as je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q as K, V as Q, W as ee, X as he, Y as re, Z as oe, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-BeZW-HnS.js";
4
4
  import { A as We, p as He } from "../chunks/color-CJvdlFM_.js";
5
5
  import { c as ae, X as Xe } from "../chunks/x-CXDkqdur.js";
6
- import "../chunks/saved-temporal-bucket-format-DiZdQXOL.js";
7
- import "../chunks/validators-DeMXwRON.js";
8
- import "../chunks/analyze-result-contract-GHKFwThg.js";
6
+ import "../chunks/saved-temporal-bucket-format-SGAV0ivR.js";
7
+ import "../chunks/validators-DEmd8Sin.js";
8
+ import "../chunks/analyze-result-contract-BbRJ-C06.js";
9
9
  import "../value-format-preferences/index.js";
10
10
  import { r as Ye, v as Ze, A as qe } from "../chunks/index-DSKR3nKn.js";
11
11
  import { P as G } from "../chunks/palette-Cp1hqZtm.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/pivot-result-lifecycle-BiJepH5S.cjs");require("../value-format-preferences/index.cjs");require("../chunks/validators-Dm7Kpz6p.cjs");require("../chunks/analyze-result-contract-Dxw66nUG.cjs");const e=require("../chunks/index-DjiIh_9n.cjs");exports.BRIEFING_ARTIFACT_FORMATS=e.BRIEFING_ARTIFACT_FORMATS;exports.BRIEFING_CONTENT_LIMITS=e.BRIEFING_CONTENT_LIMITS;exports.BRIEFING_KIND=e.BRIEFING_KIND;exports.BRIEFING_TEXT_LIMITS=e.BRIEFING_TEXT_LIMITS;exports.BriefingContractError=e.BriefingContractError;exports.DEFAULT_BRIEFING_ARTIFACT_FORMATS=e.DEFAULT_BRIEFING_ARTIFACT_FORMATS;exports.DEFAULT_BRIEFING_SCHEDULE=e.DEFAULT_BRIEFING_SCHEDULE;exports.MAX_BRIEFING_ATTACHMENTS=e.MAX_BRIEFING_ATTACHMENTS;exports.buildBriefingJobConfig=e.buildBriefingJobConfig;exports.buildBriefingScheduleExpr=e.buildBriefingScheduleExpr;exports.buildCreateBriefingRequest=e.buildCreateBriefingRequest;exports.buildDashboardTemporalSnapshotEntries=e.buildDashboardTemporalSnapshotEntries;exports.buildUpdateBriefingRequest=e.buildUpdateBriefingRequest;exports.canCreateBriefingForUser=e.canCreateBriefingForUser;exports.describeBriefingSchedule=e.describeBriefingSchedule;exports.formatBriefingComparisonValues=e.formatBriefingComparisonValues;exports.formatBriefingDisplayValue=e.formatBriefingDisplayValue;exports.getBriefingCardAttachmentCapability=e.getBriefingCardAttachmentCapability;exports.getBriefingCardAttachmentFormats=e.getBriefingCardAttachmentFormats;exports.getBriefingCreationIntents=e.getBriefingCreationIntents;exports.getBriefingDisplayTypeLabel=e.getBriefingDisplayTypeLabel;exports.getBriefingPresentation=e.getBriefingPresentation;exports.getDefaultBriefingCardAttachmentFormat=e.getDefaultBriefingCardAttachmentFormat;exports.isBriefingArtifactFormat=e.isBriefingArtifactFormat;exports.isBriefingDeliveryChannel=e.isBriefingDeliveryChannel;exports.isBriefingNumericValue=e.isBriefingNumericValue;exports.isEmailOnlyBriefingDelivery=e.isEmailOnlyBriefingDelivery;exports.isValidBriefingTimezone=e.isValidBriefingTimezone;exports.normalizeBriefingContentDocument=e.normalizeBriefingContentDocument;exports.normalizeBriefingDraft=e.normalizeBriefingDraft;exports.normalizeBriefingJobConfig=e.normalizeBriefingJobConfig;exports.parseBriefingScheduleExpr=e.parseBriefingScheduleExpr;exports.validateBriefingContentDocument=e.validateBriefingContentDocument;exports.validateBriefingDraft=e.validateBriefingDraft;exports.validateBriefingJobConfig=e.validateBriefingJobConfig;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/pivot-result-lifecycle-DmcF1ris.cjs");require("../value-format-preferences/index.cjs");require("../chunks/validators-BDYprKI9.cjs");require("../chunks/analyze-result-contract-LPDNldic.cjs");const e=require("../chunks/index-C99Ow35Y.cjs");exports.BRIEFING_ARTIFACT_FORMATS=e.BRIEFING_ARTIFACT_FORMATS;exports.BRIEFING_CONTENT_LIMITS=e.BRIEFING_CONTENT_LIMITS;exports.BRIEFING_KIND=e.BRIEFING_KIND;exports.BRIEFING_TEXT_LIMITS=e.BRIEFING_TEXT_LIMITS;exports.BriefingContractError=e.BriefingContractError;exports.DEFAULT_BRIEFING_ARTIFACT_FORMATS=e.DEFAULT_BRIEFING_ARTIFACT_FORMATS;exports.DEFAULT_BRIEFING_SCHEDULE=e.DEFAULT_BRIEFING_SCHEDULE;exports.MAX_BRIEFING_ATTACHMENTS=e.MAX_BRIEFING_ATTACHMENTS;exports.buildBriefingJobConfig=e.buildBriefingJobConfig;exports.buildBriefingScheduleExpr=e.buildBriefingScheduleExpr;exports.buildCreateBriefingRequest=e.buildCreateBriefingRequest;exports.buildDashboardTemporalSnapshotEntries=e.buildDashboardTemporalSnapshotEntries;exports.buildUpdateBriefingRequest=e.buildUpdateBriefingRequest;exports.canCreateBriefingForUser=e.canCreateBriefingForUser;exports.describeBriefingSchedule=e.describeBriefingSchedule;exports.formatBriefingComparisonValues=e.formatBriefingComparisonValues;exports.formatBriefingDisplayValue=e.formatBriefingDisplayValue;exports.getBriefingCardAttachmentCapability=e.getBriefingCardAttachmentCapability;exports.getBriefingCardAttachmentFormats=e.getBriefingCardAttachmentFormats;exports.getBriefingCreationIntents=e.getBriefingCreationIntents;exports.getBriefingDisplayTypeLabel=e.getBriefingDisplayTypeLabel;exports.getBriefingPresentation=e.getBriefingPresentation;exports.getDefaultBriefingCardAttachmentFormat=e.getDefaultBriefingCardAttachmentFormat;exports.isBriefingArtifactFormat=e.isBriefingArtifactFormat;exports.isBriefingDeliveryChannel=e.isBriefingDeliveryChannel;exports.isBriefingNumericValue=e.isBriefingNumericValue;exports.isEmailOnlyBriefingDelivery=e.isEmailOnlyBriefingDelivery;exports.isValidBriefingTimezone=e.isValidBriefingTimezone;exports.normalizeBriefingContentDocument=e.normalizeBriefingContentDocument;exports.normalizeBriefingDraft=e.normalizeBriefingDraft;exports.normalizeBriefingJobConfig=e.normalizeBriefingJobConfig;exports.parseBriefingScheduleExpr=e.parseBriefingScheduleExpr;exports.validateBriefingContentDocument=e.validateBriefingContentDocument;exports.validateBriefingDraft=e.validateBriefingDraft;exports.validateBriefingJobConfig=e.validateBriefingJobConfig;
@@ -1,8 +1,8 @@
1
- import "../chunks/pivot-result-lifecycle-4kSe0Hk1.js";
1
+ import "../chunks/pivot-result-lifecycle-sjzIOpvp.js";
2
2
  import "../value-format-preferences/index.js";
3
- import "../chunks/validators-DeMXwRON.js";
4
- import "../chunks/analyze-result-contract-GHKFwThg.js";
5
- import { a3 as t, a7 as f, a2 as g, a6 as o, ab as B, a4 as l, X as m, a5 as I, af as T, W as d, ah as C, A as E, ai as u, Z as F, d as p, aa as A, a9 as c, S as D, T as _, a as b, ao as R, g as N, an as S, al as h, am as y, a8 as G, Y as L, U as M, ac as U, ag as v, ae as V, V as z, ad as O, aj as x, ak as J } from "../chunks/index-B3ZugihZ.js";
3
+ import "../chunks/validators-DEmd8Sin.js";
4
+ import "../chunks/analyze-result-contract-BbRJ-C06.js";
5
+ import { a3 as t, a7 as f, a2 as g, a6 as o, ab as B, a4 as l, X as m, a5 as I, af as T, W as d, ah as C, A as E, ai as u, Z as F, d as p, aa as A, a9 as c, S as D, T as _, a as b, ao as R, g as N, an as S, al as h, am as y, a8 as G, Y as L, U as M, ac as U, ag as v, ae as V, V as z, ad as O, aj as x, ak as J } from "../chunks/index-DrYILnh0.js";
6
6
  export {
7
7
  t as BRIEFING_ARTIFACT_FORMATS,
8
8
  f as BRIEFING_CONTENT_LIMITS,
@@ -1,4 +1,4 @@
1
- import { f as t, g as n } from "./validators-DeMXwRON.js";
1
+ import { g as t, h as n } from "./validators-DEmd8Sin.js";
2
2
  const o = new Set(
3
3
  Object.keys(t)
4
4
  );
@@ -1 +1 @@
1
- "use strict";const t=require("./validators-Dm7Kpz6p.cjs"),a=new Set(Object.keys(t.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT));function o(){return Object.keys(t.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT)}function s(e){return a.has(e)}function l(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Semaphor analyze result must be an object.");const r=Object.keys(e).filter(n=>!s(n));if(r.length)throw new Error(`Semaphor analyze result contains unsupported top-level field(s): ${r.join(", ")}.`);return t.semaphorAnalyzeResultSchema.parse(e)}exports.getSemaphorAnalyzeResultFieldNames=o;exports.isSemaphorAnalyzeResultFieldName=s;exports.parseSemaphorAnalyzeResult=l;
1
+ "use strict";const t=require("./validators-BDYprKI9.cjs"),a=new Set(Object.keys(t.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT));function o(){return Object.keys(t.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT)}function s(e){return a.has(e)}function l(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Semaphor analyze result must be an object.");const r=Object.keys(e).filter(n=>!s(n));if(r.length)throw new Error(`Semaphor analyze result contains unsupported top-level field(s): ${r.join(", ")}.`);return t.semaphorAnalyzeResultSchema.parse(e)}exports.getSemaphorAnalyzeResultFieldNames=o;exports.isSemaphorAnalyzeResultFieldName=s;exports.parseSemaphorAnalyzeResult=l;
@@ -0,0 +1 @@
1
+ "use strict";require("./validators-BDYprKI9.cjs");require("./analyze-result-contract-LPDNldic.cjs");const E=require("./temporal-bucket-DHY1y9lq.cjs");require("../value-format-preferences/index.cjs");const _=new Set(["previous_period","same_period_last_year","start_vs_end","target"]),R=new Set([..._,"none",""]);function l(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function L(e){const o=l(e.preferences)?e.preferences:void 0,r=o&&l(o.kpiVisualOptions)?o.kpiVisualOptions:void 0,i=o&&l(o.tableVisualOptions)?o.tableVisualOptions:void 0;return{preferences:o,kpiOptions:r,kpiComparison:r&&l(r.metricComparison)?r.metricComparison:void 0,kpiComparisonPresent:!!r&&"metricComparison"in r,tableOptions:i,tableComparison:i&&l(i.metricComparison)?i.metricComparison:void 0,tableComparisonPresent:!!i&&"metricComparison"in i}}function O(e){const o=[],r=(i,a)=>{if(Array.isArray(i)){i.forEach((n,c)=>r(n,`${a}[${c}]`));return}if(!l(i))return;const m=i.config;if(l(m)){const n=L(i),c=!!(n.kpiComparisonPresent||n.tableComparisonPresent),g=m.metricColumns,p=Array.isArray(g)?g.flatMap((s,t)=>l(s)?[{index:t,metric:s}]:[]):[];if((p.some(({metric:s})=>"comparisonType"in s)||c)&&o.push({path:a,card:i,metrics:p,malformedMetricIndexes:Array.isArray(g)?g.flatMap((s,t)=>l(s)?[]:[t]):[],malformedMetricColumns:"metricColumns"in m&&!Array.isArray(g),hasLegacyPresentation:c}),"metricColumns"in m||c)return}Object.entries(i).forEach(([n,c])=>r(c,a?`${a}.${n}`:n))};return r(e,"$"),o}const I={difference:"difference",change:"percent_change",change_difference:"both",ratio:"ratio"};function w(e,o){if(!e)return;const r=Object.fromEntries(o.flatMap(i=>typeof e[i]=="string"?[[i,e[i]]]:[]));return Object.keys(r).length?r:void 0}function M(e,o,r){if(e!==void 0){if(!l(e)){r.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:o,message:"Legacy comparison formatOptions must be an object."});return}Object.entries(e).forEach(([i,a])=>{if(i==="decimalPlaces"){(typeof a!="number"||!Number.isInteger(a)||a<0||a>6)&&r.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${o}.decimalPlaces`,message:"Legacy comparison decimalPlaces must be an integer from 0 through 6."});return}i==="type"&&(a===void 0||a==="auto")||a!==void 0&&r.push({severity:"error",code:"unsupported_comparison_format",path:`${o}.${i}`,message:`Legacy comparison format option "${i}" has no canonical presentation mapping.`})})}}function v(e,o){const r=o==="kpi"?e.calculationType:e.calculatedAs,i=o==="table"&&r===void 0?"both":I[String(r)],a=l(e.formatOptions)?e.formatOptions:void 0,m=l(e.conditionalLabels)?e.conditionalLabels:void 0,n=l(o==="kpi"?e.colorConfig:e.colors)?o==="kpi"?e.colorConfig:e.colors:void 0,c={};if(i&&(c.displayMode=i),typeof(a==null?void 0:a.decimalPlaces)=="number"&&(c.precision=a.decimalPlaces),o==="kpi"){const s=e.showArrow!==!1,t=e.showColor!==!1;c.indicatorStyle=s?t?"arrow_badge":"arrow":t?"badge":"none",c.showColor=t,(e.position==="left"||e.position==="right"||e.position==="top")&&(c.position=e.position),typeof e.conditionalLabel=="boolean"&&(c.conditionalLabel=e.conditionalLabel),typeof e.labelName=="string"&&(c.labelName=e.labelName)}else(e.indicatorStyle==="arrow_badge"||e.indicatorStyle==="arrow"||e.indicatorStyle==="badge"||e.indicatorStyle==="none")&&(c.indicatorStyle=e.indicatorStyle);const g=m?{...w(m,["increase","decrease"]),...typeof m.noChange=="string"?{neutral:m.noChange}:typeof m.neutral=="string"?{neutral:m.neutral}:{}}:void 0;g&&Object.keys(g).length&&(c.conditionalLabels=g);const p=n?{...w(n,["increase","decrease"]),...typeof n.noChange=="string"?{neutral:n.noChange}:typeof n.neutral=="string"?{neutral:n.neutral}:{}}:void 0;return p&&Object.keys(p).length&&(c.colors=p),c}function $(e){return{...E.COMPARISON_PRESENTATION_DEFAULTS,...e}}function T(e){return e.some(({metric:o})=>o.comparisonType==="previous_period"||o.comparisonType==="same_period_last_year"||o.comparisonType==="target"?!0:l(o.comparison)&&o.comparison.mode==="explicit")}function C(e){const o=e.card.config;return e.metrics.length===2&&(o.groupByColumns===void 0||Array.isArray(o.groupByColumns)&&o.groupByColumns.length===0)}function P(e,o,r,i){const a=o==="kpi"?["enabled","calculationType","formatOptions","showArrow","showColor","conditionalLabel","labelName","position","conditionalLabels","colorConfig","lowerIsBetter"]:["calculatedAs","indicatorStyle","formatOptions","colors","lowerIsBetter"];Object.keys(e).forEach(s=>{a.includes(s)||i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.${s}`,message:`Unknown legacy comparison presentation field "${s}" cannot be dropped automatically.`})});const m=o==="kpi"?"calculationType":"calculatedAs";e[m]!==void 0&&!I[String(e[m])]&&i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.${m}`,message:`Legacy comparison ${m} is unsupported.`}),o==="kpi"&&e.position!==void 0&&!["left","right","top"].includes(String(e.position))&&i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.position`,message:"Legacy comparison position is unsupported."}),o==="kpi"&&e.labelName!==void 0&&typeof e.labelName!="string"&&i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.labelName`,message:"Legacy comparison labelName must be a string."}),(o==="kpi"?[["conditionalLabels",["increase","decrease","noChange"]],["colorConfig",["increase","decrease","noChange"]]]:[["colors",["increase","decrease","neutral"]]]).forEach(([s,t])=>{if(e[s]!==void 0){if(!l(e[s])){i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.${s}`,message:`Legacy comparison ${s} must be an object.`});return}Object.entries(e[s]).forEach(([f,u])=>{t.includes(f)?typeof u!="string"&&i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.${s}.${f}`,message:`Legacy comparison ${s}.${f} must be a string.`}):i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.${s}.${f}`,message:`Unknown legacy comparison ${s} field "${f}" cannot be dropped automatically.`})})}}),(o==="kpi"?["enabled","showArrow","showColor","conditionalLabel","lowerIsBetter"]:["lowerIsBetter"]).forEach(s=>{e[s]!==void 0&&typeof e[s]!="boolean"&&i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.${s}`,message:`Legacy comparison ${s} must be a boolean.`})}),o==="table"&&e.indicatorStyle!==void 0&&!["arrow_badge","arrow","badge","none"].includes(String(e.indicatorStyle))&&i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${r}.indicatorStyle`,message:"Legacy comparison indicatorStyle is unsupported."}),M(e.formatOptions,`${r}.formatOptions`,i);const g=v(e,o);E.validateComparisonPresentationSpec(g,r).errors.forEach(s=>{i.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:s.path||r,message:s.message})})}function S(e){const o=L(e.card),r=o.kpiComparison?v(o.kpiComparison,"kpi"):void 0,i=o.tableComparison?v(o.tableComparison,"table"):void 0;return{namespaces:o,kpi:r,table:i,presentation:r||i}}function B(e){const o=l(e.preferences)?e.preferences:{},r=l(o.kpiVisualOptions)?o.kpiVisualOptions:{},i=l(r.metricComparison)?r.metricComparison:{},a=l(o.tableVisualOptions)?o.tableVisualOptions:{},m=l(a.metricComparison)?a.metricComparison:{};return r.lowerIsBetter===!0||i.lowerIsBetter===!0||m.lowerIsBetter===!0?"lower_is_better":"higher_is_better"}function D(e){switch(e.comparisonType){case"previous_period":return{mode:"explicit",spec:{kind:"previous_period"}};case"same_period_last_year":return{mode:"explicit",spec:{kind:"previous_year"}};case"target":return{mode:"explicit",spec:{kind:"target",targetValue:e.targetValue}};default:return}}function j(e){const o=l(e.preferences)?e.preferences:void 0;if(!o)return;const r=l(o.kpiVisualOptions)?o.kpiVisualOptions:void 0;r&&delete r.lowerIsBetter;const i=l(o.tableVisualOptions)?o.tableVisualOptions:void 0,a=i&&l(i.metricComparison)?i.metricComparison:void 0;a&&delete a.lowerIsBetter}function x(e){const o=O(e);if(!o.length)return{document:e,changed:!1,changes:[],diagnostics:[]};const r=[];if(o.forEach(n=>{var c,g,p,s;if(n.malformedMetricColumns&&r.push({severity:"error",code:"malformed_metric_columns",path:`${n.path}.config.metricColumns`,message:"Metric columns must be an array before comparison migration."}),n.malformedMetricIndexes.forEach(t=>{r.push({severity:"error",code:"malformed_metric_columns",path:`${n.path}.config.metricColumns[${t}]`,message:"Metric columns must contain objects before comparison migration."})}),n.metrics.forEach(({metric:t,index:f})=>{if(!("comparisonType"in t))return;const u=`${n.path}.config.metricColumns[${f}]`,d=String(t.comparisonType||"");"comparison"in t&&r.push({severity:"error",code:"conflicting_comparison_contracts",path:u,message:"Metric contains both legacy and canonical comparison configuration; resolve the conflict before migration."});const h=l(t.parameters)?t.parameters:void 0,b=h&&l(h.windowTransform)?h.windowTransform:void 0;_.has(d)&&(b==null?void 0:b.function)==="previous_period_delta"&&r.push({severity:"error",code:"conflicting_comparison_window_transform",path:u,message:"A metric cannot combine baseline comparison with previous_period_delta; resolve the authoring intent before migration."}),R.has(d)||r.push({severity:"error",code:"unsupported_comparison_type",path:`${u}.comparisonType`,message:`Unsupported legacy metric comparison type "${d}".`}),t.comparisonType==="target"&&(typeof t.targetValue!="number"||!Number.isFinite(t.targetValue))&&r.push({severity:"error",code:"invalid_target_value",path:`${u}.targetValue`,message:"Legacy target comparison requires a finite metric targetValue."}),t.comparisonType==="start_vs_end"&&r.push({severity:"error",code:"unsupported_start_vs_end",path:`${u}.comparisonType`,message:"start_vs_end is retired and cannot be migrated automatically."}),t.targetValue!==void 0&&t.comparisonType!=="target"&&r.push({severity:"warning",code:"stray_target_value",path:`${u}.targetValue`,message:"Dead non-target targetValue will be removed without changing the baseline."})}),n.hasLegacyPresentation){const{namespaces:t,kpi:f,table:u}=S(n),d=[(c=t.kpiOptions)==null?void 0:c.lowerIsBetter,(g=t.kpiComparison)==null?void 0:g.lowerIsBetter,(p=t.tableComparison)==null?void 0:p.lowerIsBetter].filter(h=>typeof h=="boolean");new Set(d).size>1&&r.push({severity:"error",code:"conflicting_legacy_polarity",path:`${n.path}.preferences`,message:"Legacy comparison polarity values disagree; resolve the conflict before migration."}),((s=t.kpiOptions)==null?void 0:s.lowerIsBetter)!==void 0&&typeof t.kpiOptions.lowerIsBetter!="boolean"&&r.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${n.path}.preferences.kpiVisualOptions.lowerIsBetter`,message:"Legacy comparison lowerIsBetter must be a boolean."}),t.kpiComparisonPresent&&!t.kpiComparison&&r.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${n.path}.preferences.kpiVisualOptions.metricComparison`,message:"Legacy KPI comparison presentation must be an object."}),t.tableComparisonPresent&&!t.tableComparison&&r.push({severity:"error",code:"invalid_legacy_comparison_presentation",path:`${n.path}.preferences.tableVisualOptions.metricComparison`,message:"Legacy table comparison presentation must be an object."}),"comparisonPresentation"in(t.preferences||{})&&r.push({severity:"error",code:"conflicting_comparison_presentation_contracts",path:`${n.path}.preferences.comparisonPresentation`,message:"Card contains both legacy and canonical comparison presentation; resolve the conflict before migration."}),t.kpiComparison&&typeof t.kpiComparison.enabled=="boolean"&&"metricPairComparisonEnabled"in(t.preferences||{})&&C(n)&&r.push({severity:"error",code:"conflicting_comparison_presentation_contracts",path:`${n.path}.preferences.metricPairComparisonEnabled`,message:"Card contains both legacy and canonical metric-pair enablement; resolve the conflict before migration."}),t.kpiComparison&&P(t.kpiComparison,"kpi",`${n.path}.preferences.kpiVisualOptions.metricComparison`,r),t.tableComparison&&P(t.tableComparison,"table",`${n.path}.preferences.tableVisualOptions.metricComparison`,r),f&&u&&JSON.stringify($(f))!==JSON.stringify($(u))&&r.push({severity:"error",code:"conflicting_legacy_presentation_namespaces",path:`${n.path}.preferences`,message:"KPI and table comparison presentation values disagree; resolve the conflict before migration."})}}),r.some(n=>n.severity==="error"))return{document:e,changed:!1,changes:[],diagnostics:r};const i=JSON.parse(JSON.stringify(e)),a=O(i),m=[];return a.forEach(n=>{var g;const c=B(n.card);if(n.metrics.forEach(({metric:p,index:s})=>{if(!("comparisonType"in p))return;const t=String(p.comparisonType||""),f=`${n.path}.config.metricColumns[${s}]`,u=D(p),d=["comparisonType"];delete p.comparisonType,"targetValue"in p&&(delete p.targetValue,d.push("targetValue")),"comparisonDisplay"in p&&(delete p.comparisonDisplay,d.push("comparisonDisplay")),u?p.comparison=u:delete p.comparison,_.has(t)&&(p.comparisonPolarity=c),m.push({kind:"metric",path:f,metricId:typeof p.id=="string"?p.id:void 0,legacyType:t,comparison:u,comparisonPolarity:_.has(t)?c:void 0,removedFields:d})}),j(n.card),n.hasLegacyPresentation){const{namespaces:p,presentation:s}=S(n),t=(g=p.kpiComparison)==null?void 0:g.enabled,f={...s};typeof t=="boolean"&&T(n.metrics)&&(f.showComparison=t);const u=typeof t=="boolean"&&C(n)?t:void 0,d=typeof t=="boolean"&&!T(n.metrics)&&!C(n)?["kpiVisualOptions.metricComparison.enabled"]:void 0,h=p.preferences,b=[];n.metrics.forEach(({metric:y})=>{"comparisonPolarity"in y||(y.comparisonPolarity=c,typeof y.id=="string"&&b.push(y.id))}),Object.keys(f).length&&(h.comparisonPresentation=f),u!==void 0&&(h.metricPairComparisonEnabled=u),p.kpiOptions&&delete p.kpiOptions.metricComparison,p.tableOptions&&delete p.tableOptions.metricComparison,m.push({kind:"presentation",path:`${n.path}.preferences`,comparisonPresentation:Object.keys(f).length?f:void 0,metricPairComparisonEnabled:u,comparisonPolarityMetricIds:b,intentionallyDiscardedFields:d,removedFields:[...p.kpiComparison?["kpiVisualOptions.metricComparison"]:[],...p.tableComparison?["tableVisualOptions.metricComparison"]:[]]})}}),{document:i,changed:!0,changes:m,diagnostics:r}}const k=["bar","horizontalBar","line","area","stackedArea","combo","stackedBar","stackedLine"],K=new Set(k);function V(e){return typeof e=="string"&&K.has(e)}function Y(e){return e==="detailTable"||e==="table"||e==="aggregateTable"||e==="pivotTable"||e==="custom"||V(e)}function A(e){return!!(e!=null&&e.trim())}function F(e){return A(e.sql)||A(e.normalizedPython)?"freeform":e.hasExecutableConfig?"config":"none"}const U="SEMAPHOR_CALCULATED_FIELD";function N(e,o,r){if(r&&(o==="groupby"||o==="pivotby"))return r;if(o==="metric"&&e.name==="*"&&!e.expression)return e.alias||"count";if(e.alias)return e.alias;const i=e.entityName&&e.entityName!==U?e.entityName:void 0;if(e.role==="metric"){let a=e.aggregate||"metric";if(e.expression){const m=e.expression.match(/^(COUNT|SUM|AVG|MIN|MAX|MEDIAN|DISTINCT)\s*\(/i);a=m?m[1].toLowerCase():"expr"}else a=a.toLowerCase();return i&&i!==e.name?`${i}_${e.name}_${a}`:`${e.name}_${a}`}return i&&i!==e.name?`${i}_${e.name}`:e.name}function H(e){return N(e,"detail")}function q(e){const o=e.label;return o&&e.labelCount===1&&(o===e.rawKey||!e.rawKeys.has(o))?o:e.rawKey}exports.SEMAPHOR_CARTESIAN_CHART_TYPES=k;exports.isSemaphorCartesianChartType=V;exports.resolveCanonicalDetailResultRawKey=H;exports.resolveCanonicalResultOutputKey=q;exports.resolveCanonicalResultRawKey=N;exports.resolveTemporalResultOwner=F;exports.supportsCanonicalDashboardTemporalResult=Y;exports.transformComparisonDocument=x;
@@ -1,6 +1,7 @@
1
- import "./validators-DeMXwRON.js";
2
- import "./analyze-result-contract-GHKFwThg.js";
3
- import { f as I, C as k } from "./metric-comparison-D0T0MKRK.js";
1
+ import "./validators-DEmd8Sin.js";
2
+ import "./analyze-result-contract-BbRJ-C06.js";
3
+ import { g as I, C as k } from "./temporal-bucket-5UYEotyQ.js";
4
+ import "../value-format-preferences/index.js";
4
5
  const _ = /* @__PURE__ */ new Set([
5
6
  "previous_period",
6
7
  "same_period_last_year",
@@ -253,7 +254,7 @@ function R(e) {
253
254
  const i = l(o.tableVisualOptions) ? o.tableVisualOptions : void 0, a = i && l(i.metricComparison) ? i.metricComparison : void 0;
254
255
  a && delete a.lowerIsBetter;
255
256
  }
256
- function z(e) {
257
+ function G(e) {
257
258
  const o = $(e);
258
259
  if (!o.length)
259
260
  return { document: e, changed: !1, changes: [], diagnostics: [] };
@@ -417,13 +418,13 @@ const D = [
417
418
  function j(e) {
418
419
  return typeof e == "string" && x.has(e);
419
420
  }
420
- function G(e) {
421
+ function J(e) {
421
422
  return e === "detailTable" || e === "table" || e === "aggregateTable" || e === "pivotTable" || e === "custom" || j(e);
422
423
  }
423
424
  function S(e) {
424
425
  return !!(e != null && e.trim());
425
426
  }
426
- function J(e) {
427
+ function q(e) {
427
428
  return S(e.sql) || S(e.normalizedPython) ? "freeform" : e.hasExecutableConfig ? "config" : "none";
428
429
  }
429
430
  const F = "SEMAPHOR_CALCULATED_FIELD";
@@ -447,20 +448,20 @@ function K(e, o, r) {
447
448
  }
448
449
  return i && i !== e.name ? `${i}_${e.name}` : e.name;
449
450
  }
450
- function q(e) {
451
+ function W(e) {
451
452
  return K(e, "detail");
452
453
  }
453
- function W(e) {
454
+ function X(e) {
454
455
  const o = e.label;
455
456
  return o && e.labelCount === 1 && (o === e.rawKey || !e.rawKeys.has(o)) ? o : e.rawKey;
456
457
  }
457
458
  export {
458
459
  D as S,
459
460
  K as a,
460
- q as b,
461
- W as c,
461
+ W as b,
462
+ X as c,
462
463
  j as i,
463
- J as r,
464
- G as s,
465
- z as t
464
+ q as r,
465
+ J as s,
466
+ G as t
466
467
  };
@@ -1 +1 @@
1
- "use strict";require("./validators-Dm7Kpz6p.cjs");const e="SEMAPHOR_CALCULATED_FIELD";function u(Y){return(Y==null?void 0:Y.sourceField)||(Y==null?void 0:Y.name)||""}const s=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm Z","YYYY-MM-DD HH:mm:ss Z","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];function D(Y){return Y.role==="metric"&&"expression"in Y&&!!Y.expression}function r(Y){return!!Y.expression}function _(Y){return!!Y.expression}function l(Y){var t,n;const M=Y;return!!(M!=null&&M.expression&&((n=(t=M.calculatedFormula)==null?void 0:t.inputFields)!=null&&n.length))}function o(Y){return!!(Y&&(Y.entityName===e||Y.entityId===e))}var a=(Y=>(Y.SUBTOTAL="__SUBTOTAL__",Y.TOTAL="__TOTAL__",Y.ALL="__ALL__",Y))(a||{});const c={database:null,schema:null,table:null},A="__card_default__";exports.CALCULATED_FIELD_ENTITY_MARKER=e;exports.CONTROL_CARD_DEFAULT_VALUE=A;exports.DATE_FORMAT_VALUES=s;exports.EMPTY_SELECTION=c;exports.PivotMarkerEnum=a;exports.getFieldRuntimeColumnName=u;exports.hasCalculatedFieldMarker=o;exports.hasCalculatedFormulaInputs=l;exports.isCalculatedDimension=r;exports.isCalculatedField=_;exports.isCalculatedMetric=D;
1
+ "use strict";require("./validators-BDYprKI9.cjs");const e="SEMAPHOR_CALCULATED_FIELD";function u(Y){return(Y==null?void 0:Y.sourceField)||(Y==null?void 0:Y.name)||""}const s=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm Z","YYYY-MM-DD HH:mm:ss Z","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];function D(Y){return Y.role==="metric"&&"expression"in Y&&!!Y.expression}function r(Y){return!!Y.expression}function _(Y){return!!Y.expression}function l(Y){var t,n;const M=Y;return!!(M!=null&&M.expression&&((n=(t=M.calculatedFormula)==null?void 0:t.inputFields)!=null&&n.length))}function o(Y){return!!(Y&&(Y.entityName===e||Y.entityId===e))}var a=(Y=>(Y.SUBTOTAL="__SUBTOTAL__",Y.TOTAL="__TOTAL__",Y.ALL="__ALL__",Y))(a||{});const c={database:null,schema:null,table:null},A="__card_default__";exports.CALCULATED_FIELD_ENTITY_MARKER=e;exports.CONTROL_CARD_DEFAULT_VALUE=A;exports.DATE_FORMAT_VALUES=s;exports.EMPTY_SELECTION=c;exports.PivotMarkerEnum=a;exports.getFieldRuntimeColumnName=u;exports.hasCalculatedFieldMarker=o;exports.hasCalculatedFormulaInputs=l;exports.isCalculatedDimension=r;exports.isCalculatedField=_;exports.isCalculatedMetric=D;
@@ -1,4 +1,4 @@
1
- import "./validators-DeMXwRON.js";
1
+ import "./validators-DEmd8Sin.js";
2
2
  const t = "SEMAPHOR_CALCULATED_FIELD";
3
3
  function D(Y) {
4
4
  return (Y == null ? void 0 : Y.sourceField) || (Y == null ? void 0 : Y.name) || "";
@@ -1,23 +1,23 @@
1
1
  import { jsx as e, jsxs as r, Fragment as W } from "react/jsx-runtime";
2
2
  import jt, { useState as E, useEffect as J, useMemo as ee, useContext as Wt, useRef as he, useCallback as q } from "react";
3
- import { aH as Se, aI as De, aK as ke, bb as yt, bZ as Ht, cn as Gt, co as Kt, aZ as fe, cb as Ct, bl as Ve, s as qt, o as Xt, cp as Zt, aP as Je, aS as et, aT as tt, aU as rt, aV as at, aW as nt, aX as st, aY as wt, bk as ot, aG as O, cq as Qt, cr as Yt, cs as Ke, cc as Oe, cd as ze, ct as Nt, ce as _e, bX as K, b1 as Jt, bC as Re, cu as er, bW as tr, aJ as it, aL as lt, cv as rr, aF as ar, ba as nr, bx as St, cw as sr, b_ as or, u as ir, aM as lr, b3 as cr, az as $e, O as ue, aw as ct, as as Dt, at as dt, P as kt, ar as dr, ay as ur, ci as hr, cx as mr, bv as pr, au as pt, R as fr, T as gr, cy as br, cz as xr, cA as vr, cB as yr, cC as Cr, cD as wr, cE as Nr, cF as Sr, cG as At, cH as Dr, b4 as kr, cI as Ar, cf as Et, cJ as Er, cK as Ir, cL as Be, cM as Fr, cN as Lr, cO as Br, an as Tr, ap as Vr, a3 as Rr, a2 as Ur, a1 as Pr, a0 as Mr, Z as Or, X as zr, cP as _r, cQ as $r, cR as jr, cS as Wr, cT as Hr, al as Gr, cU as Kr, cV as qr, a9 as Xr, cW as Zr, cX as Qr, cY as Yr } from "./index-BsH32bn1.js";
4
- import { B, O as Ne, Z as Qe, L as te, M as It, d as Ft, c as X, K as Jr, D as ge, u as P, z as be, av as Lt, au as Ye, E as Bt, P as Ue, a as Pe, b as Me, aG as ea, aH as ta, S as Tt, aI as ra, aJ as aa, aK as na, aE as sa } from "./switch-DgLwr7O-.js";
3
+ import { aH as Se, aI as De, aK as ke, bb as yt, bZ as Ht, cn as Gt, co as Kt, aZ as fe, cb as Ct, bl as Ve, s as qt, o as Xt, cp as Zt, aP as Je, aS as et, aT as tt, aU as rt, aV as at, aW as nt, aX as st, aY as wt, bk as ot, aG as O, cq as Qt, cr as Yt, cs as Ke, cc as Oe, cd as ze, ct as Nt, ce as _e, bX as K, b1 as Jt, bC as Re, cu as er, bW as tr, aJ as it, aL as lt, cv as rr, aF as ar, ba as nr, bx as St, cw as sr, b_ as or, u as ir, aM as lr, b3 as cr, az as $e, O as ue, aw as ct, as as Dt, at as dt, P as kt, ar as dr, ay as ur, ci as hr, cx as mr, bv as pr, au as pt, R as fr, T as gr, cy as br, cz as xr, cA as vr, cB as yr, cC as Cr, cD as wr, cE as Nr, cF as Sr, cG as At, cH as Dr, b4 as kr, cI as Ar, cf as Et, cJ as Er, cK as Ir, cL as Be, cM as Fr, cN as Lr, cO as Br, an as Tr, ap as Vr, a3 as Rr, a2 as Ur, a1 as Pr, a0 as Mr, Z as Or, X as zr, cP as _r, cQ as $r, cR as jr, cS as Wr, cT as Hr, al as Gr, cU as Kr, cV as qr, a9 as Xr, cW as Zr, cX as Qr, cY as Yr } from "./index-B5Oy1eLv.js";
4
+ import { B, O as Ne, Z as Qe, L as te, M as It, d as Ft, c as X, K as Jr, D as ge, u as P, z as be, av as Lt, au as Ye, E as Bt, P as Ue, a as Pe, b as Me, aG as ea, aH as ta, S as Tt, aI as ra, aJ as aa, aK as na, aE as sa } from "./switch-BeZW-HnS.js";
5
5
  import { L as ut } from "./layout-grid-CiubineE.js";
6
6
  import { c as Ae, X as je, C as Vt } from "./x-CXDkqdur.js";
7
- import { u as ht, V as oa, E as qe, a as Xe, b as ia, c as la, L as ca, d as da, e as Rt, C as Ut, F as ua, f as ha } from "./editor-action-buttons-BFNtjFzO.js";
8
- import { v as ft } from "./saved-temporal-bucket-format-DiZdQXOL.js";
9
- import "./validators-DeMXwRON.js";
10
- import "./analyze-result-contract-GHKFwThg.js";
7
+ import { u as ht, V as oa, E as qe, a as Xe, b as ia, c as la, L as ca, d as da, e as Rt, C as Ut, F as ua, f as ha } from "./editor-action-buttons-BxbFCerU.js";
8
+ import { v as ft } from "./saved-temporal-bucket-format-SGAV0ivR.js";
9
+ import "./validators-DEmd8Sin.js";
10
+ import "./analyze-result-contract-BbRJ-C06.js";
11
11
  import "../value-format-preferences/index.js";
12
12
  import { S as ma } from "./search-BHsQIWBV.js";
13
13
  import { M as pa } from "./mouse-pointer-2-BZvGk45-.js";
14
- import { u as gt } from "./pivot-header-presentation-nk604qc1.js";
14
+ import { u as gt } from "./pivot-header-presentation-ckYOQ4aZ.js";
15
15
  import "./index-DSKR3nKn.js";
16
- import "./temporal-bucket-authoring-FIRnJz0e.js";
17
- import "./canonical-result-keys-KLk__J_O.js";
16
+ import "./temporal-bucket-authoring-K1kE6R_z.js";
17
+ import "./canonical-result-keys-D6avdjpA.js";
18
18
  import "./color-CJvdlFM_.js";
19
19
  import "react-dom";
20
- import { g as se, d as fa, a as ga } from "./index-B3ZugihZ.js";
20
+ import { g as se, d as fa, a as ga } from "./index-DrYILnh0.js";
21
21
  /**
22
22
  * @license lucide-react v0.453.0 - ISC
23
23
  *
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),x=require("react"),s=require("./index-q12_nNUS.cjs"),n=require("./switch-CjJ6FHYJ.cjs"),je=require("./layout-grid-xm8pqtx0.cjs"),K=require("./x-B6ghREd2.cjs"),V=require("./editor-action-buttons-1Lo0fIh7.cjs"),ye=require("./saved-temporal-bucket-format-Gfbh4IiP.cjs");require("./validators-Dm7Kpz6p.cjs");require("./analyze-result-contract-Dxw66nUG.cjs");require("../value-format-preferences/index.cjs");const Ue=require("./search-BqqhaMx9.cjs"),Oe=require("./mouse-pointer-2-DX4A_XZw.cjs"),we=require("./pivot-header-presentation-DcfPaCiy.cjs");require("./index-ByFbacH7.cjs");require("./temporal-bucket-authoring-7hv2laOG.cjs");require("./canonical-result-keys-Drc2x-lf.cjs");require("./color-CyB5o13F.cjs");require("react-dom");const X=require("./index-DjiIh_9n.cjs");/**
1
+ "use strict";const e=require("react/jsx-runtime"),x=require("react"),s=require("./index-DIWJALWL.cjs"),n=require("./switch-D-CCcfhc.cjs"),je=require("./layout-grid-xm8pqtx0.cjs"),K=require("./x-B6ghREd2.cjs"),V=require("./editor-action-buttons-BVigIMg0.cjs"),ye=require("./saved-temporal-bucket-format-CFfWXRl9.cjs");require("./validators-BDYprKI9.cjs");require("./analyze-result-contract-LPDNldic.cjs");require("../value-format-preferences/index.cjs");const Ue=require("./search-BqqhaMx9.cjs"),Oe=require("./mouse-pointer-2-DX4A_XZw.cjs"),we=require("./pivot-header-presentation-DhyQXxKq.cjs");require("./index-ByFbacH7.cjs");require("./temporal-bucket-authoring-o3Emn05L.cjs");require("./canonical-result-keys-BA0HCP4e.cjs");require("./color-CyB5o13F.cjs");require("react-dom");const X=require("./index-C99Ow35Y.cjs");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./switch-CjJ6FHYJ.cjs"),s=require("./index-q12_nNUS.cjs"),U=require("./x-B6ghREd2.cjs");require("./saved-temporal-bucket-format-Gfbh4IiP.cjs");require("./validators-Dm7Kpz6p.cjs");require("./analyze-result-contract-Dxw66nUG.cjs");require("../value-format-preferences/index.cjs");const y=require("react");require("./index-ByFbacH7.cjs");require("./temporal-bucket-authoring-7hv2laOG.cjs");require("./canonical-result-keys-Drc2x-lf.cjs");require("./color-CyB5o13F.cjs");const cs=require("react-dom");require("./index-DjiIh_9n.cjs");const $=require("./dashboard-briefing-launcher-mUXWuiOZ.cjs"),wt=require("./search-BqqhaMx9.cjs"),St=require("./format-types-PSZZ7hG8.cjs"),us=require("./report-preferences-dialog-BEVZAE3m.cjs"),ms=require("./use-debounced-dirty-check-XHSwAefL.cjs"),qe=require("./normalize-dashboard-for-dirty-check-BXRUMVb2.cjs"),xt=require("./save-3dYRmehL.cjs"),hs=require("./palette-BN-jYtaK.cjs"),ps=require("./braces-v55uLCAK.cjs");function fs(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const M=fs(y);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./switch-D-CCcfhc.cjs"),s=require("./index-DIWJALWL.cjs"),U=require("./x-B6ghREd2.cjs");require("./saved-temporal-bucket-format-CFfWXRl9.cjs");require("./validators-BDYprKI9.cjs");require("./analyze-result-contract-LPDNldic.cjs");require("../value-format-preferences/index.cjs");const y=require("react");require("./index-ByFbacH7.cjs");require("./temporal-bucket-authoring-o3Emn05L.cjs");require("./canonical-result-keys-BA0HCP4e.cjs");require("./color-CyB5o13F.cjs");const cs=require("react-dom");require("./index-C99Ow35Y.cjs");const $=require("./dashboard-briefing-launcher-BmEHYblf.cjs"),wt=require("./search-BqqhaMx9.cjs"),St=require("./format-types-PSZZ7hG8.cjs"),us=require("./report-preferences-dialog-BgE3Gzsp.cjs"),ms=require("./use-debounced-dirty-check-XHSwAefL.cjs"),qe=require("./normalize-dashboard-for-dirty-check-BXRUMVb2.cjs"),xt=require("./save-3dYRmehL.cjs"),hs=require("./palette-BN-jYtaK.cjs"),ps=require("./braces-v55uLCAK.cjs");function fs(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const M=fs(y);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.