react-semaphor 0.1.398 → 0.1.400

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 (59) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +2 -2
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +2 -2
  5. package/dist/chunks/analyze-result-contract-BUgK3759.js +1833 -0
  6. package/dist/chunks/analyze-result-contract-S8u7CcPL.js +1 -0
  7. package/dist/chunks/{calendar-preferences-dialog-DwLeBLy2.js → calendar-preferences-dialog-Ci3rHHgA.js} +1 -1
  8. package/dist/chunks/{calendar-preferences-dialog-49fcEPXS.js → calendar-preferences-dialog-i3-jBIYS.js} +3 -3
  9. package/dist/chunks/{dashboard-briefing-launcher-cgPKz1yX.js → dashboard-briefing-launcher-BpwjeJsQ.js} +4 -4
  10. package/dist/chunks/{dashboard-briefing-launcher-CgkSKkZR.js → dashboard-briefing-launcher-DiEpMS9E.js} +1 -1
  11. package/dist/chunks/{dashboard-controls-D12ZSUP_.js → dashboard-controls-BaUUrvSI.js} +1 -1
  12. package/dist/chunks/{dashboard-controls-VMFm3OP4.js → dashboard-controls-Bkjpgr3d.js} +5 -5
  13. package/dist/chunks/{dashboard-json-CvK0oI24.js → dashboard-json-CxNyExRm.js} +1 -1
  14. package/dist/chunks/{dashboard-json-C-GG5yC7.js → dashboard-json-DvULhhN2.js} +3 -3
  15. package/dist/chunks/{edit-dashboard-visual-B5KB7dx4.js → edit-dashboard-visual-DBrsgEtL.js} +4 -4
  16. package/dist/chunks/{edit-dashboard-visual-ql99faTz.js → edit-dashboard-visual-DJRPiKdY.js} +1 -1
  17. package/dist/chunks/{index-DXCBPLDu.js → index-BepF6hoa.js} +2 -2
  18. package/dist/chunks/{index-CQmKDEbe.js → index-Drz04wqE.js} +5 -5
  19. package/dist/chunks/{switch-B79Hn4Qh.js → switch-D2oOmorN.js} +1 -1
  20. package/dist/chunks/{switch-BXQAlSuW.js → switch-qUw8u-gU.js} +1 -1
  21. package/dist/chunks/update-policy-BmtOqvbf.js +3 -0
  22. package/dist/chunks/update-policy-KImUg4Od.js +831 -0
  23. package/dist/chunks/{use-create-flow-overlay-state-Bw5LRkf9.js → use-create-flow-overlay-state-CFJIHt5D.js} +3 -3
  24. package/dist/chunks/{use-create-flow-overlay-state-7MFN3PWX.js → use-create-flow-overlay-state-DrkYiyQz.js} +1 -1
  25. package/dist/chunks/{validators-4EGCWWga.js → validators-B1Mgdr3T.js} +279 -242
  26. package/dist/chunks/{validators-CPtkrola.js → validators-DFOX0tYY.js} +1 -1
  27. package/dist/dashboard/index.cjs +1 -1
  28. package/dist/dashboard/index.js +1 -1
  29. package/dist/dashboard-authoring/index.cjs +1 -1
  30. package/dist/dashboard-authoring/index.js +2 -2
  31. package/dist/data-app-builder/index.cjs +1 -1
  32. package/dist/data-app-builder/index.js +2 -2
  33. package/dist/data-app-codegen/index.cjs +1 -0
  34. package/dist/data-app-codegen/index.js +22 -0
  35. package/dist/data-app-codegen-node/index.cjs +462 -0
  36. package/dist/data-app-codegen-node/index.js +1424 -0
  37. package/dist/data-app-sdk/index.cjs +2 -2
  38. package/dist/data-app-sdk/index.js +3 -2
  39. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  40. package/dist/data-app-sdk-adapters/index.js +20 -12
  41. package/dist/data-app-sdk-validation/index.cjs +1 -1
  42. package/dist/data-app-sdk-validation/index.js +2 -2
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.js +7 -7
  45. package/dist/surfboard/index.cjs +1 -1
  46. package/dist/surfboard/index.js +2 -2
  47. package/dist/types/analytics-protocol.d.ts +101 -2
  48. package/dist/types/dashboard-assistant.d.ts +14 -0
  49. package/dist/types/dashboard-authoring.d.ts +6 -0
  50. package/dist/types/data-app-builder.d.ts +6 -0
  51. package/dist/types/data-app-codegen-node.d.ts +1165 -0
  52. package/dist/types/data-app-codegen.d.ts +1137 -0
  53. package/dist/types/data-app-sdk-adapters.d.ts +7 -0
  54. package/dist/types/data-app-sdk-validation.d.ts +15 -0
  55. package/dist/types/data-app-sdk.d.ts +18 -0
  56. package/dist/types/main.d.ts +6 -0
  57. package/package.json +9 -1
  58. package/dist/chunks/analyze-result-contract-C9Gv2_qW.js +0 -1585
  59. package/dist/chunks/analyze-result-contract-Zgg-Bbpj.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const e=require("zod"),q={answerSummary:"string",responseDetail:"responseDetail",mode:"string",comparisonType:"string",executionResult:"executionResult",compiledQuery:"unknown",data:"unknown",resultSets:"record",analysisWarnings:"unknownArray",columns:"unknownArray",records:"recordArray",rowCount:"number",rowLimitExceeded:"boolean",output:"string",querySpec:"unknown",metadata:"record",validation:"validationResult",coverage:"coverage",diagnosticFeedback:"diagnosticFeedback",missingFields:"stringArray",warnings:"unknownArray",comparison:"unknown",population:"population",comparisons:"recordArray",fieldsUsed:"compactExecutionFieldArray",primary:"recordArray",contributors:"recordArray",segments:"recordArray",periodChanges:"recordArray",changes:"recordArray",largestNegativeChanges:"recordArray",largestPositiveChanges:"recordArray",drivers:"recordArray",absoluteDeltaDrivers:"recordArray",largestNegativeDrivers:"recordArray",largestPositiveDrivers:"recordArray",periodRows:"recordArray",sql:"unknown",omitted:"stringArray"},_="semaphor-data-app-codegen-summary/v1",Re="semaphor-data-app-codegen-summary-validator/v2",_e=new Set(["metric","records","matrix","analysis","sql_fallback"]),je=new Set(["semaphor.metric","semaphor.records","semaphor.matrix","semaphor.analysis","semaphor.sql"]),Ce=new Set(["absolute_delta","largest_negative","largest_positive","positive_and_negative","all"]),se=new Set(["source","id","label","measures","primaryMeasure","dateField","timeGrain","dimensions","comparison","orderBy","filters","relationshipHint","limit","derivedFields"]),qe=new Set([...se,"analysis","timeWindow","filters","driverMode","includePopulation","calendarContext","chartTitle","chartType"]),xe=new Set(["source","id","label","fields","dateField","timeGrain","timeWindow","filters","orderBy","relationshipHint","limit","pagination","totals","derivedFields"]),Ee=new Set(["source","id","label","filters","relationshipHint","rows","columns","values","totals","sort","expansion","layout","displayLimits"]),Fe=new Set(["source","id","label","sql","defaultParameters","pythonCode","fields","limit","pagination","rationale"]),Ne=new Set(["kpi","line_chart","bar_chart","stacked_bar_chart","pie_chart","donut_chart","area_chart","table","matrix","narrative","text_block","custom"]),De=new Set(["missing_measure","missing_dimension","missing_date","missing_relationship","missing_semantic_role","missing_current_app_state","unsupported_change_intent","ambiguous_field_grounding","invalid_ranker_output","latest_snapshot_selector_not_modeled","unsupported_grain","requires_sql_escape_hatch","unsupported_sdk_capability"]);function Te(i){return B(i).ok}function B(i){const o=[];if(!i||typeof i!="object")return{ok:!1,issues:["Summary must be an object."]};const t=i;return t.schemaVersion!==_&&o.push(`schemaVersion must be ${_}.`),(typeof t.title!="string"||!t.title.trim())&&o.push("title is required."),Array.isArray(t.sources)||o.push("sources must be an array."),Array.isArray(t.inputs)||o.push("inputs must be an array."),Array.isArray(t.views)||o.push("views must be an array."),Array.isArray(t.filterContracts)||o.push("filterContracts must be an array."),(!t.implementationChecklist||typeof t.implementationChecklist!="object")&&o.push("implementationChecklist must be an object."),t.implementationChecklist&&typeof t.implementationChecklist=="object"&&o.push(...Ke(t.implementationChecklist)),Array.isArray(t.sources)&&t.sources.forEach((s,r)=>{o.push(...$(s,`sources.${r}`))}),Array.isArray(t.inputs)&&t.inputs.forEach((s,r)=>{o.push(...Me(s,`inputs.${r}`))}),Array.isArray(t.views)&&t.views.forEach((s,r)=>{o.push(...Pe(s,`views.${r}`))}),Array.isArray(t.filterContracts)&&t.filterContracts.forEach((s,r)=>{o.push(...He(s,`filterContracts.${r}`))}),t.unsupportedInsights!==void 0&&(Array.isArray(t.unsupportedInsights)?t.unsupportedInsights.forEach((s,r)=>{o.push(...pt(s,`unsupportedInsights.${r}`))}):o.push("unsupportedInsights must be an array.")),o.push(...Oe(t)),{ok:o.length===0,issues:o}}function Oe(i){const o=Array.isArray(i.unsupportedInsights)&&i.unsupportedInsights.some(l=>{var u;return((u=a(l))==null?void 0:u.reason)==="missing_relationship"}),t=Array.isArray(i.views)&&i.views.some(l=>{var c;const u=a((c=a(l))==null?void 0:c.computation);return(u==null?void 0:u.kind)==="unsupported"&&u.reason==="missing_relationship"});if(!o&&!t)return[];const s=[],r=a(i.validation);(r==null?void 0:r.status)!=="blocked"&&s.push("validation.status must be blocked when missing_relationship gaps are present.");const n=a(i.nextRequiredTool);return(n==null?void 0:n.name)!=="semaphor_propose_semantic_model_change"&&s.push("nextRequiredTool.name must be semaphor_propose_semantic_model_change when missing_relationship gaps are present."),s}function $(i,o){const t=a(i);return t?t.kind==="semantic"?typeof t.domainId=="string"&&t.domainId.trim()&&typeof t.datasetName=="string"&&t.datasetName.trim()?[]:[`${o} must include sourceKey or a supported source identity.`]:typeof t.sourceKey=="string"&&t.sourceKey.trim()?[]:t.kind==="physical"&&typeof t.tableName=="string"&&t.tableName.trim()&&typeof t.connectionId=="string"&&t.connectionId.trim()?[]:t.kind==="sql"&&typeof t.connectionId=="string"&&t.connectionId.trim()?[]:[`${o} must include sourceKey or a supported source identity.`]:[`${o} must be an object.`]}function Ke(i){const o=a(i);if(!o)return["implementationChecklist must be an object."];const t=[],s=["requiredDevtools","requiredInputOptions","filterScopeByInput","bindingsByView","validationCommands","browserSmokeChecks"];for(const n of s)n in o||t.push(`implementationChecklist.${n} is required.`);const r=a(o.requiredDevtools);return r?typeof r.mountRootDevtools!="boolean"&&t.push("implementationChecklist.requiredDevtools.mountRootDevtools must be a boolean."):t.push("implementationChecklist.requiredDevtools must be an object."),Array.isArray(o.requiredInputOptions)||t.push("implementationChecklist.requiredInputOptions must be an array."),Array.isArray(o.filterScopeByInput)||t.push("implementationChecklist.filterScopeByInput must be an array."),a(o.bindingsByView)||t.push("implementationChecklist.bindingsByView must be an object."),g(o.validationCommands)||t.push("implementationChecklist.validationCommands must be an array of strings."),g(o.browserSmokeChecks)||t.push("implementationChecklist.browserSmokeChecks must be an array of strings."),t}function Me(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return(typeof t.id!="string"||!t.id.trim())&&s.push(`${o}.id is required.`),t.fieldRef&&s.push(...p(t.fieldRef,`${o}.fieldRef`)),s.push(...ie(t.optionQuery,`${o}.optionQuery`)),g(t.appliesToViewIds)||s.push(`${o}.appliesToViewIds must be an array of strings.`),t.bindings!==void 0&&!Array.isArray(t.bindings)&&s.push(`${o}.bindings must be an array.`),Array.isArray(t.bindings)&&t.bindings.forEach((r,n)=>{const l=a(r);if(!l){s.push(`${o}.bindings.${n} must be an object.`);return}g(l.appliesToViewIds)||s.push(`${o}.bindings.${n}.appliesToViewIds must be an array of strings.`),s.push(...p(l.fieldRef,`${o}.bindings.${n}.fieldRef`))}),s}function Pe(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];if((typeof t.id!="string"||!t.id.trim())&&s.push(`${o}.id is required.`),t.visualSpec!==void 0&&s.push(...rt(t.visualSpec,`${o}.visualSpec`)),t.computation!==void 0&&s.push(...ct(t.computation,`${o}.computation`)),it(t))return s.push(...T(t,`${o}`)),t.fields!==void 0&&(Array.isArray(t.fields)?t.fields.forEach((n,l)=>{s.push(...p(n,`${o}.fields.${l}`))}):s.push(`${o}.fields must be an array.`)),t.queryKind!==void 0&&s.push(`${o}.queryKind is not allowed for non-executable views.`),t.sdkBuilder!==void 0&&s.push(`${o}.sdkBuilder is not allowed for non-executable views.`),t.sdkSpec!==void 0&&s.push(`${o}.sdkSpec is not allowed for non-executable views.`),s;if(!Array.isArray(t.fields))return s.push(`${o}.fields must be an array.`),(t.sdkSpec!==void 0||t.sdkBuilder!==void 0)&&s.push(`${o}.fields must be an array for executable views.`),s.push(...T(t,`${o}`)),s;t.fields.forEach((n,l)=>{s.push(...p(n,`${o}.fields.${l}`))}),v(t.queryKind)||s.push(`${o}.queryKind must be a supported codegen query kind.`),t.sdkBuilder!==void 0&&!ne(t.sdkBuilder)&&s.push(`${o}.sdkBuilder must be a supported SDK builder.`);const r=a(t.computation);return(r==null?void 0:r.kind)==="server_query"&&v(t.queryKind)&&v(r.queryKind)&&r.queryKind!==t.queryKind&&s.push(`${o}.computation.queryKind must match queryKind.`),s.push(...Qe({value:t.sdkSpec,path:`${o}.sdkSpec`,queryKind:typeof t.queryKind=="string"?t.queryKind:void 0,sdkBuilder:typeof t.sdkBuilder=="string"?t.sdkBuilder:void 0}),...T(t,`${o}`)),s}function T(i,o){var Z;const t=a((Z=a(i.visualSpec))==null?void 0:Z.tableBehavior),s=a(i.sdkSpec),r=a(s==null?void 0:s.spec),n=typeof(s==null?void 0:s.builder)=="string"?s.builder:void 0,l=n==="semaphor.records"?a(r==null?void 0:r.totals):void 0,u=[];if(!t)return l&&u.push(`${o}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`),u;const c=a(t.totals);return c?(c.mode==="server"&&(n!=="semaphor.records"&&u.push(`${o}.visualSpec.tableBehavior.totals.mode server is only supported for semaphor.records views.`),!l||l.mode!=="server"?u.push(`${o}.sdkSpec.spec.totals.mode must be server when tableBehavior.totals.mode is server.`):u.push(...Be({left:c.measures,right:l.measures,leftPath:`${o}.visualSpec.tableBehavior.totals.measures`,rightPath:`${o}.sdkSpec.spec.totals.measures`}))),c.mode!=="server"&&l&&u.push(`${o}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`),n==="semaphor.sql"&&c.mode!=="none"&&u.push(`${o}.visualSpec.tableBehavior.totals.mode must be none for semaphor.sql views.`),n==="semaphor.sql"&&a(r==null?void 0:r.totals)&&u.push(`${o}.sdkSpec.spec.totals is not supported for semaphor.sql.`),u):(l&&u.push(`${o}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`),u)}function Be({left:i,right:o,leftPath:t,rightPath:s}){if(!Array.isArray(i)||!Array.isArray(o))return[`${s} must match ${t}.`];const r=[];return i.length!==o.length?(r.push(`${s} must match ${t}.`),r):(i.forEach((n,l)=>{Ve(a(n),a(o[l]))||r.push(`${s}.${l} must match ${t}.${l}.`)}),r)}function Ve(i,o){return!i||!o?!1:i.name===o.name&&(i.role||"measure")===(o.role||"measure")&&X(i)===X(o)&&Le(i,o)}function X(i){return typeof i.aggregate=="string"?i.aggregate.toUpperCase():"SUM"}function Le(i,o){const t=a(i.source),s=a(o.source);if(Ue(t,s))return!1;const r=J(i),n=J(o);if(r.size>0||n.size>0){for(const l of r)if(n.has(l))return!0;return!1}return!t||!s||t.kind!==s.kind?!1:t.kind==="semantic"?t.domainId===s.domainId&&t.datasetName===s.datasetName&&(t.datasetId===void 0||s.datasetId===void 0||t.datasetId===s.datasetId):t.kind==="physical"?t.connectionId===s.connectionId&&t.tableName===s.tableName:t.kind==="sql"?t.connectionId===s.connectionId:!1}function Ue(i,o){if(!i||!o||i.kind!=="semantic"||o.kind!=="semantic")return!1;const t=typeof i.datasetId=="string"?i.datasetId.trim():"",s=typeof o.datasetId=="string"?o.datasetId.trim():"";return!!(t&&s&&t!==s)}function J(i){const o=typeof i.sourceKey=="string"?i.sourceKey.trim():"";return o?new Set([o]):Ge(a(i.source))}function Ge(i){const o=new Set;if(!i)return o;const t=typeof i.sourceKey=="string"?i.sourceKey.trim():"";if(t&&o.add(t),i.kind==="semantic"){const s=typeof i.domainId=="string"?i.domainId:"",r=typeof i.datasetName=="string"?i.datasetName:"",n=typeof i.datasetId=="string"?i.datasetId:"";s&&n&&o.add(`semantic:${s}:datasetId:${n}`),s&&r&&o.add(`semantic:${s}:datasetName:${r}`)}if(i.kind==="physical"){const s=typeof i.connectionId=="string"?i.connectionId:"",r=typeof i.tableName=="string"?i.tableName:"",n=typeof i.databaseName=="string"?i.databaseName:"",l=typeof i.schemaName=="string"?i.schemaName:"";s&&r&&(o.add(["physical",s,n,l,r].join(":")),o.add(`physical:${s}:${r}`))}if(i.kind==="sql"){const s=typeof i.connectionId=="string"?i.connectionId:"",r=typeof i.dialect=="string"?i.dialect:"",n=typeof i.label=="string"?i.label:"";s&&(o.add(["sql",s,r,n].join(":")),o.add(`sql:${s}`))}return o}function He(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];if(t.fieldRef&&s.push(...p(t.fieldRef,`${o}.fieldRef`)),(typeof t.inputId!="string"||!t.inputId.trim())&&s.push(`${o}.inputId is required.`),s.push(...ie(t.optionQuery,`${o}.optionQuery`)),g(t.appliesToViewIds)||s.push(`${o}.appliesToViewIds must be an array of strings.`),g(t.notAppliedToViewIds)||s.push(`${o}.notAppliedToViewIds must be an array of strings.`),!Array.isArray(t.bindings))s.push(`${o}.bindings must be an array.`);else{const r=g(t.appliesToViewIds)?new Set(t.appliesToViewIds):void 0,n=g(t.notAppliedToViewIds)?new Set(t.notAppliedToViewIds):void 0;t.bindings.forEach((l,u)=>{const c=a(l);if(!c){s.push(`${o}.bindings.${u} must be an object.`);return}typeof c.viewId!="string"||!c.viewId?s.push(`${o}.bindings.${u}.viewId is required.`):(r&&!r.has(c.viewId)&&s.push(`${o}.bindings.${u}.viewId must be included in appliesToViewIds.`),n!=null&&n.has(c.viewId)&&s.push(`${o}.bindings.${u}.viewId must not be listed in notAppliedToViewIds.`)),s.push(...p(c.fieldRef,`${o}.bindings.${u}.fieldRef`))})}return s}function ie(i,o){if(i===void 0)return[];const t=a(i);if(!t)return[`${o} must be an object.`];const s=[...h(t.valueFieldRef,`${o}.valueFieldRef`),...h(t.labelFieldRef,`${o}.labelFieldRef`),...h(t.filterFieldRef,`${o}.filterFieldRef`)];return t.builder!=="semaphor.inputOptions"&&s.push(`${o}.builder must be semaphor.inputOptions.`),typeof t.sourceKey!="string"&&t.source===void 0&&s.push(`${o} must include source or sourceKey.`),t.source!==void 0&&s.push(...$(t.source,`${o}.source`)),a(t.valueFieldRef)||s.push(`${o}.valueFieldRef is required.`),a(t.labelFieldRef)||s.push(`${o}.labelFieldRef is required.`),t.limit!==void 0&&(typeof t.limit!="number"||!Number.isInteger(t.limit)||t.limit<=0)&&s.push(`${o}.limit must be a positive integer.`),s}function Qe(i){var r;const o=a(i.value);if(!o)return[`${i.path} is required for executable views.`];const t=[];if(!ne(o.builder))return t.push(`${i.path}.builder must be a supported SDK builder.`),t;i.sdkBuilder&&o.builder!==i.sdkBuilder&&t.push(`${i.path}.builder must match sdkBuilder.`),i.queryKind&&v(i.queryKind)&&o.builder!==st(i.queryKind)&&t.push(`${i.path}.builder must match queryKind.`);const s=a(o.spec);if(!s)return t.push(`${i.path}.spec must be an object.`),t;switch(o.builder){case"semaphor.metric":t.push(...S(s,se,`${i.path}.spec`),...A(s,i.path),...O(s.measures,`${i.path}.spec.measures`),...h(s.primaryMeasure,`${i.path}.spec.primaryMeasure`),...h(s.dateField,`${i.path}.spec.dateField`),...K(s.dimensions,`${i.path}.spec.dimensions`),...M(s.orderBy,`${i.path}.spec.orderBy`),...I(s.filters,`${i.path}.spec.filters`));break;case"semaphor.analysis":t.push(...S(s,qe,`${i.path}.spec`),...A(s,i.path),...O(s.measures,`${i.path}.spec.measures`),...h(s.primaryMeasure,`${i.path}.spec.primaryMeasure`),...h(s.dateField,`${i.path}.spec.dateField`),...K(s.dimensions,`${i.path}.spec.dimensions`),...M(s.orderBy,`${i.path}.spec.orderBy`),...I(s.filters,`${i.path}.spec.filters`),...Ye(s,`${i.path}.spec`));break;case"semaphor.records":t.push(...S(s,xe,`${i.path}.spec`),...A(s,i.path),...O(s.fields,`${i.path}.spec.fields`),...h(s.dateField,`${i.path}.spec.dateField`),...M(s.orderBy,`${i.path}.spec.orderBy`),...I(s.filters,`${i.path}.spec.filters`),...We(s.totals,`${i.path}.spec.totals`));break;case"semaphor.matrix":t.push(...S(s,Ee,`${i.path}.spec`),...Ze(s,i.path),...Xe(s.rows,`${i.path}.spec.rows`),...Je(s.columns,`${i.path}.spec.columns`),...et(s.values,`${i.path}.spec.values`),...tt(s.sort,`${i.path}.spec.sort`),...I(s.filters,`${i.path}.spec.filters`));break;case"semaphor.sql":t.push(...S(s,Fe,`${i.path}.spec`),...A(s,i.path)),((r=a(s.source))==null?void 0:r.kind)!=="sql"&&t.push(`${i.path}.spec.source.kind must be sql.`),(typeof s.sql!="string"||!s.sql.trim())&&t.push(`${i.path}.spec.sql is required.`),t.push(...K(s.fields,`${i.path}.spec.fields`));break}return t}function Ye(i,o){const t=[];if(i.driverMode!==void 0&&!Ce.has(i.driverMode)&&t.push(`${o}.driverMode must be a supported analysis driver mode.`),i.includePopulation!==void 0&&typeof i.includePopulation!="boolean"&&t.push(`${o}.includePopulation must be a boolean.`),i.calendarContext!==void 0){const s=a(i.calendarContext);if(!s)t.push(`${o}.calendarContext must be an object.`);else{s.tz!==void 0&&typeof s.tz!="string"&&t.push(`${o}.calendarContext.tz must be a string.`),s.weekStart!==void 0&&(typeof s.weekStart!="number"||!Number.isInteger(s.weekStart)||s.weekStart<0||s.weekStart>6)&&t.push(`${o}.calendarContext.weekStart must be an integer between 0 and 6.`);const r=s.anchor;if(r!==void 0&&r!=="now"){const n=a(r);(!n||typeof n.iso!="string"||!n.iso.trim())&&t.push(`${o}.calendarContext.anchor must be now or { iso }.`)}}}return t}function We(i,o){if(i===void 0)return[];const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return t.mode!=="server"&&s.push(`${o}.mode must be server.`),!Array.isArray(t.measures)||t.measures.length===0?s.push(`${o}.measures must include at least one measure.`):t.measures.forEach((r,n)=>{var l;s.push(...ae(r,`${o}.measures.${n}`)),((l=a(r))==null?void 0:l.role)!=="measure"&&s.push(`${o}.measures.${n}.role must be measure.`)}),s}function S(i,o,t){const s=[];return Object.keys(i).forEach(r=>{o.has(r)||s.push(`${t}.${r} is not supported for this SDK builder.`)}),s}function A(i,o){return a(i.source)?$(i.source,`${o}.spec.source`):[`${o}.spec.source must be an object.`]}function Ze(i,o){const t=a(i.source);if(!t)return[`${o}.spec.source must be an object.`];const s=$(i.source,`${o}.spec.source`);return t.kind!=="semantic"&&t.kind!=="physical"&&s.push(`${o}.spec.source.kind must be semantic or physical.`),s}function O(i,o){const t=V(i,o);return Array.isArray(i)&&i.forEach((s,r)=>{t.push(...p(s,`${o}.${r}`))}),t}function K(i,o){if(i===void 0)return[];if(!Array.isArray(i))return[`${o} must be an array.`];const t=[];return i.forEach((s,r)=>{t.push(...p(s,`${o}.${r}`))}),t}function M(i,o){if(i===void 0)return[];const t=a(i);return t?[...p(t.field,`${o}.field`),...re(t.direction,`${o}.direction`)]:[`${o} must be an object.`]}function Xe(i,o){const t=V(i,o);return Array.isArray(i)&&i.forEach((s,r)=>{const n=a(s);if(!n){t.push(`${o}.${r} must be an object.`);return}t.push(...p(n.field,`${o}.${r}.field`))}),t}function Je(i,o){if(i===void 0)return[];const t=[];return Array.isArray(i)?(i.forEach((s,r)=>{const n=a(s);if(!n){t.push(`${o}.${r} must be an object.`);return}t.push(...p(n.field,`${o}.${r}.field`))}),t):[`${o} must be an array.`]}function et(i,o){const t=V(i,o);return Array.isArray(i)&&i.forEach((s,r)=>{const n=a(s);if(!n){t.push(`${o}.${r} must be an object.`);return}t.push(...p(n.field,`${o}.${r}.field`))}),t}function tt(i,o){if(i===void 0)return[];if(!Array.isArray(i))return[`${o} must be an array.`];const t=[];return i.forEach((s,r)=>{const n=a(s);if(!n){t.push(`${o}.${r} must be an object.`);return}n.axis!=="row"&&n.axis!=="column"&&t.push(`${o}.${r}.axis must be row or column.`),t.push(...re(n.direction,`${o}.${r}.direction`),...ot(n.by,`${o}.${r}.by`))}),t}function ot(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];switch(t.kind){case"label":return[];case"field":return p(t.field,`${o}.field`);case"value":return typeof t.valueId!="string"||!t.valueId.trim()?[`${o}.valueId is required.`]:[];default:return[`${o}.kind must be label, field, or value.`]}}function re(i,o){return i==="asc"||i==="desc"?[]:[`${o} must be asc or desc.`]}function I(i,o){if(i===void 0)return[];if(!Array.isArray(i))return[`${o} must be an array.`];const t=[];return i.forEach((s,r)=>{const n=a(s);if(!n){t.push(`${o}.${r} must be an object.`);return}t.push(...p(n.field,`${o}.${r}.field`))}),t}function V(i,o){return!Array.isArray(i)||i.length===0?[`${o} must be a non-empty array.`]:[]}function st(i){switch(i){case"metric":return"semaphor.metric";case"records":return"semaphor.records";case"matrix":return"semaphor.matrix";case"analysis":return"semaphor.analysis";case"sql_fallback":return"semaphor.sql"}}function it(i){const o=a(i.computation),t=a(i.visualSpec);return(o==null?void 0:o.kind)==="presentation_only"||(o==null?void 0:o.kind)==="derived"||(o==null?void 0:o.kind)==="unsupported"||i.visual==="text_block"||(t==null?void 0:t.visualType)==="text_block"}function rt(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return Ne.has(t.visualType)||s.push(`${o}.visualType must be a supported visual type.`),t.limit!==void 0&&(typeof t.limit!="number"||!Number.isInteger(t.limit)||t.limit<=0)&&s.push(`${o}.limit must be a positive integer.`),t.tableBehavior!==void 0&&s.push(...nt(t.tableBehavior,`${o}.tableBehavior`)),s}function nt(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return t.tableMode!=="bounded"&&t.tableMode!=="server_paginated"&&t.tableMode!=="server_windowed"&&s.push(`${o}.tableMode must be a supported table mode.`),s.push(...at(t.height,`${o}.height`),...lt(t.pagination,`${o}.pagination`),...ut(t.sorting,`${o}.sorting`),...dt(t.totals,`${o}.totals`)),typeof t.serverSideRequired!="boolean"&&s.push(`${o}.serverSideRequired must be a boolean.`),s}function at(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return(typeof t.maxPx!="number"||!Number.isInteger(t.maxPx)||t.maxPx<=0)&&s.push(`${o}.maxPx must be a positive integer.`),t.scroll!=="vertical"&&t.scroll!=="both"&&s.push(`${o}.scroll must be vertical or both.`),typeof t.stickyHeader!="boolean"&&s.push(`${o}.stickyHeader must be a boolean.`),s}function lt(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return t.mode!=="none"&&t.mode!=="server"&&t.mode!=="client_for_bounded_rows"&&s.push(`${o}.mode must be a supported pagination mode.`),t.pageSize!==void 0&&(typeof t.pageSize!="number"||!Number.isInteger(t.pageSize)||t.pageSize<=0)&&s.push(`${o}.pageSize must be a positive integer.`),t.readsFrom!==void 0&&t.readsFrom!=="result.pagination"&&s.push(`${o}.readsFrom must be result.pagination.`),s}function ut(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return t.mode!=="server"&&t.mode!=="client_for_bounded_rows"&&s.push(`${o}.mode must be a supported sorting mode.`),t.defaultField!==void 0&&(typeof t.defaultField!="string"||!t.defaultField.trim())&&s.push(`${o}.defaultField must be a non-empty string.`),t.defaultDirection!==void 0&&t.defaultDirection!=="asc"&&t.defaultDirection!=="desc"&&s.push(`${o}.defaultDirection must be asc or desc.`),t.resetPageOnChange!==void 0&&typeof t.resetPageOnChange!="boolean"&&s.push(`${o}.resetPageOnChange must be a boolean.`),s}function dt(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return t.mode!=="none"&&t.mode!=="server"&&t.mode!=="local"?(s.push(`${o}.mode must be none, server, or local.`),s):t.mode==="none"?(t.measures!==void 0&&s.push(`${o}.measures is not allowed when mode is none.`),t.label!==void 0&&s.push(`${o}.label is not allowed when mode is none.`),s):t.mode==="server"?(!Array.isArray(t.measures)||t.measures.length===0?s.push(`${o}.measures must include at least one measure when mode is server.`):t.measures.forEach((r,n)=>{var l;s.push(...ae(r,`${o}.measures.${n}`)),((l=a(r))==null?void 0:l.role)!=="measure"&&s.push(`${o}.measures.${n}.role must be measure.`)}),t.label!==void 0&&s.push(`${o}.label is not allowed when mode is server.`),s):(t.mode==="local"&&(t.label!=="Displayed rows"&&t.label!=="Current page"&&s.push(`${o}.label must be Displayed rows or Current page when mode is local.`),t.measures!==void 0&&s.push(`${o}.measures is not allowed when mode is local.`)),s)}function ct(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];switch(t.kind){case"server_query":v(t.queryKind)||s.push(`${o}.queryKind must be a supported codegen query kind.`),t.queryOwnership!==void 0&&t.queryOwnership!=="view_owned"&&t.queryOwnership!=="shared_query"&&s.push(`${o}.queryOwnership must be view_owned or shared_query.`),t.sourceKeys!==void 0&&!g(t.sourceKeys)&&s.push(`${o}.sourceKeys must be an array of strings.`),t.fieldNames!==void 0&&!g(t.fieldNames)&&s.push(`${o}.fieldNames must be an array of strings.`);break;case"derived":(typeof t.upstreamViewId!="string"||!t.upstreamViewId.trim())&&s.push(`${o}.upstreamViewId is required.`),(typeof t.derivation!="string"||!t.derivation.trim())&&s.push(`${o}.derivation is required.`);break;case"presentation_only":break;case"unsupported":(typeof t.reason!="string"||!t.reason.trim())&&s.push(`${o}.reason is required.`),(typeof t.suggestedModelingFix!="string"||!t.suggestedModelingFix.trim())&&s.push(`${o}.suggestedModelingFix is required.`);break;default:s.push(`${o}.kind must be a supported computation kind.`)}return s}function pt(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];for(const n of["title","requestedQuestion","suggestedModelingFix"])(typeof t[n]!="string"||!t[n].trim())&&s.push(`${o}.${n} is required.`);return De.has(t.reason)||s.push(`${o}.reason must be a supported unsupported insight reason.`),(t.relationshipCandidate!==void 0||t.nextRepairAction!==void 0)&&t.reason!=="missing_relationship"&&s.push(`${o} relationship repair metadata is only valid for missing_relationship unsupported insights.`),t.relationshipCandidate!==void 0&&s.push(...gt(t.relationshipCandidate,`${o}.relationshipCandidate`)),t.nextRepairAction!==void 0&&s.push(...mt(t.nextRepairAction,`${o}.nextRepairAction`)),s}function mt(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[],r=new Set(["tool","reason"]);return Object.keys(t).forEach(n=>{r.has(n)||s.push(`${o}.${n} is not supported; repair actions support only tool and reason.`)}),t.tool!=="semaphor_propose_semantic_model_change"&&s.push(`${o}.tool must be semaphor_propose_semantic_model_change.`),t.reason!=="missing_relationship"&&s.push(`${o}.reason must be missing_relationship.`),s}function gt(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[],r=new Set(["source","sourceFields","target","targetFields"]);Object.keys(t).forEach(n=>{r.has(n)||s.push(`${o}.${n} is not supported; relationship candidates support only source, sourceFields, target, and targetFields.`)}),s.push(...ee(t.source,`${o}.source`)),s.push(...ee(t.target,`${o}.target`));for(const n of["sourceFields","targetFields"]){const l=t[n];if(!Array.isArray(l)||l.length===0){s.push(`${o}.${n} must be a non-empty endpoint field array.`);continue}l.forEach((u,c)=>{s.push(...ht(u,`${o}.${n}.${c}`))})}return s}function ht(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[],r=new Set(["name","label","role","dataType"]);return Object.keys(t).forEach(n=>{r.has(n)||s.push(`${o}.${n} is not supported; relationship candidate fields are scoped by their endpoint and support only name, label, role, and dataType.`)}),(typeof t.name!="string"||!t.name.trim())&&s.push(`${o}.name must be a non-empty string.`),t.role!==void 0&&(typeof t.role!="string"||!["dimension","measure","date","id","unknown"].includes(t.role))&&s.push(`${o}.role must be dimension, measure, date, id, or unknown.`),t.dataType!==void 0&&(typeof t.dataType!="string"||!["string","number","boolean","date","datetime","unknown"].includes(t.dataType))&&s.push(`${o}.dataType must be string, number, boolean, date, datetime, or unknown.`),s}function ee(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[],r=new Set(["kind","domainId","datasetName","datasetId","label","sourceKey"]);return Object.keys(t).forEach(n=>{r.has(n)||s.push(`${o}.${n} is not supported; relationship candidate sources support only semantic identity fields.`)}),t.kind!=="semantic"&&s.push(`${o} must use semantic source identity.`),(typeof t.domainId!="string"||!t.domainId.trim()||typeof t.datasetName!="string"||!t.datasetName.trim())&&s.push(`${o} must include semantic domainId and datasetName.`),s}function v(i){return _e.has(i)}function ne(i){return je.has(i)}function h(i,o){return i===void 0?[]:p(i,o)}function p(i,o){const t=a(i);if(!t)return[`${o} must be an object.`];const s=[];return(typeof t.name!="string"||!t.name.trim())&&s.push(`${o}.name is required.`),!t.source&&typeof t.sourceKey!="string"&&s.push(`${o} must include source or sourceKey.`),s}function ae(i,o){const t=a(i),s=p(i,o);if(!t||typeof t.sourceKey=="string"&&t.sourceKey.trim())return s;if(t.source!==void 0){const n=$(t.source,`${o}.source`);return n.length===0||s.push(...n),s}return s.includes(`${o} must include source or sourceKey.`)||s.push(`${o} must include source or sourceKey.`),s}function a(i){return i&&typeof i=="object"&&!Array.isArray(i)?i:void 0}function g(i){return Array.isArray(i)&&i.every(o=>typeof o=="string")}const m=e.z.record(e.z.string(),e.z.unknown()),x=e.z.array(m),d=e.z.enum(["SUM","COUNT","AVG","MIN","MAX","MEDIAN","DISTINCT"]),E=e.z.enum(["postgres","mysql","mssql","snowflake","clickhouse","bigquery","redshift","duckdb","sqlite","unknown"]),le=e.z.enum(["hour","day","week","month","quarter","year"]),F=e.z.enum(["dimension","measure","date","id","unknown"]),N=e.z.enum(["string","number","boolean","date","datetime","unknown"]),ue=e.z.enum(["semantic_model","caller_override","default_sum"]),R=e.z.union([e.z.number(),e.z.string(),e.z.null()]),P=e.z.enum(["millisecond","second","minute","hour","day"]),de=e.z.union([e.z.object({type:e.z.enum(["number","currency","percent","percentage","scientific"]),locale:e.z.string().optional(),minimumFractionDigits:e.z.number().optional(),maximumFractionDigits:e.z.number().optional(),useGrouping:e.z.boolean().optional(),prefix:e.z.string().optional(),suffix:e.z.string().optional(),negativeStyle:e.z.enum(["minus","parentheses"]).optional(),compact:e.z.boolean().optional(),scale:e.z.number().optional(),currency:e.z.string().optional(),percentValueMode:e.z.enum(["fraction","whole"]).optional()}).passthrough(),e.z.object({type:e.z.enum(["date","datetime"]),locale:e.z.string().optional(),pattern:e.z.string().optional(),relative:e.z.boolean().optional(),timezone:e.z.string().optional(),sourceTimezone:e.z.string().optional(),prefix:e.z.string().optional(),suffix:e.z.string().optional()}).passthrough(),e.z.object({type:e.z.literal("duration"),inputUnit:P.optional(),outputStyle:e.z.enum(["compact","digital","long"]).optional(),largestUnit:P.optional(),smallestUnit:P.optional(),maxUnits:e.z.number().optional(),prefix:e.z.string().optional(),suffix:e.z.string().optional(),negativeStyle:e.z.enum(["minus","parentheses"]).optional()}).passthrough(),e.z.object({type:e.z.literal("string"),prefix:e.z.string().optional(),suffix:e.z.string().optional()}).passthrough()]),ft=e.z.union([e.z.object({kind:e.z.literal("defaultAggregate")}).passthrough(),e.z.object({kind:e.z.literal("blank")}).passthrough(),e.z.object({kind:e.z.literal("labelOnly"),label:e.z.string().optional()}).passthrough(),e.z.object({kind:e.z.literal("customAggregate"),aggregate:d}).passthrough(),e.z.object({kind:e.z.literal("percentOfParent")}).passthrough(),e.z.object({kind:e.z.literal("percentOfGrandTotal")}).passthrough(),e.z.object({kind:e.z.literal("customExpression"),expressionId:e.z.string()}).passthrough()]);function w(i,o){return e.z.object(i).passthrough().superRefine((t,s)=>{for(const r of o)Object.prototype.hasOwnProperty.call(t,r)||s.addIssue({code:"custom",path:[r],message:`Required field "${r}" is missing.`})})}const L=e.z.object({kind:e.z.literal("semantic"),domainId:e.z.string(),datasetName:e.z.string(),datasetId:e.z.string().optional(),label:e.z.string().optional(),connectionId:e.z.string().optional()}).passthrough(),ce=e.z.object({kind:e.z.literal("physical"),connectionId:e.z.string(),connectionType:e.z.string().optional(),tableName:e.z.string(),databaseName:e.z.string().optional(),schemaName:e.z.string().optional(),label:e.z.string().optional(),dialect:E.optional()}).passthrough(),pe=e.z.object({kind:e.z.literal("sql"),connectionId:e.z.string(),dialect:E.optional(),label:e.z.string().optional()}).passthrough(),b=e.z.union([L,ce,pe]),z=e.z.object({name:e.z.string(),label:e.z.string().optional(),role:F.optional(),dataType:N.optional(),source:b.optional(),aggregate:d.optional()}).passthrough(),zt=e.z.object({kind:e.z.literal("field"),field:z,aggregate:d.optional()}).passthrough(),U=e.z.object({kind:e.z.literal("derived_field"),name:e.z.string(),label:e.z.string(),description:e.z.string().optional(),resultRole:F,dataType:N,computeStage:e.z.enum(["row","aggregate"]),expression:e.z.string(),expressionLanguage:e.z.literal("semaphor_sql_template").optional(),inputs:e.z.record(zt),defaultAggregate:d.optional(),aggregationBehavior:e.z.enum(["additive","non_additive","ratio_of_sums","weighted","pre_aggregated","snapshot"]).optional(),aggregationStrategy:e.z.enum(["default","symmetric_aggregate","aggregate_then_join","weighted"]).optional(),format:de.optional(),tags:e.z.array(e.z.string()).optional()}).passthrough(),D=z.and(e.z.object({semanticAggregate:d.optional(),effectiveAggregate:d.optional(),aggregateSource:ue.optional(),derivedField:U.optional()}).passthrough()),bt=L,yt=e.z.object({kind:e.z.literal("physical"),connectionId:e.z.string().optional(),connectionType:e.z.string().optional(),tableName:e.z.string(),databaseName:e.z.string().optional(),schemaName:e.z.string().optional(),label:e.z.string().optional(),dialect:E.optional()}).passthrough(),St=e.z.object({kind:e.z.literal("sql"),connectionId:e.z.string().optional(),dialect:E.optional(),label:e.z.string().optional()}).passthrough(),vt=e.z.union([bt,yt,St]),$t=e.z.object({key:e.z.string().optional(),name:e.z.string(),label:e.z.string().optional(),role:F.optional(),dataType:N.optional(),source:vt.optional(),aggregate:d.optional(),semanticAggregate:d.optional(),effectiveAggregate:d.optional(),aggregateSource:ue.optional(),derivedField:e.z.never().optional()}).passthrough(),j=e.z.object({key:e.z.string(),name:e.z.string(),label:e.z.string(),role:F.optional(),dataType:N.optional(),aggregate:d.optional(),source:b.optional(),derivedField:U.optional()}).passthrough(),me=e.z.object({code:e.z.string(),message:e.z.string().optional(),invalidField:e.z.string().optional(),fieldRole:e.z.enum(["measure","date","dimension","input","source","sql"]).optional(),validMeasureCandidates:e.z.array(e.z.string()).optional(),validDateCandidates:e.z.array(e.z.string()).optional(),validDimensionCandidates:e.z.array(e.z.string()).optional(),recommendedNextStep:e.z.string()}).passthrough(),C=e.z.object({code:e.z.string(),message:e.z.string(),path:e.z.string().optional(),fieldRole:e.z.enum(["measure","date","dimension","input","source","sql"]).optional(),repairHint:me.optional()}).passthrough(),G=e.z.object({ok:e.z.boolean(),errors:e.z.array(C),warnings:e.z.array(C),repairHints:e.z.array(me)}).passthrough(),wt=e.z.object({page:e.z.number(),pageSize:e.z.number(),pageCount:e.z.number(),totalCount:e.z.number(),hasNextPage:e.z.boolean(),hasPrevPage:e.z.boolean()}).passthrough(),k={intentId:e.z.string().optional(),queryPath:e.z.enum(["query_spec","sql","sql_python"]),warnings:e.z.array(e.z.string()).optional(),rowCount:e.z.number().optional(),rowLimitExceeded:e.z.boolean().optional(),limit:e.z.number().optional(),pagination:wt.optional()},ge=e.z.object({...k,kind:e.z.literal("metric"),value:R,measures:e.z.record(R).optional(),comparison:e.z.object({kind:e.z.enum(["previous_period","previous_year","target"]),value:R.optional(),delta:e.z.union([e.z.number(),e.z.null()]).optional(),deltaPercent:e.z.union([e.z.number(),e.z.null()]).optional()}).passthrough().optional(),records:x.optional()}).passthrough(),he=e.z.object({...k,kind:e.z.literal("records"),columns:e.z.array(j),records:x,totals:e.z.object({mode:e.z.literal("server"),scope:e.z.literal("filtered_result"),row:e.z.record(e.z.string(),e.z.unknown()),columns:e.z.array(j).optional()}).passthrough().optional()}).passthrough(),fe=e.z.object({...k,kind:e.z.literal("inputOptions"),options:e.z.array(w({label:e.z.string(),value:e.z.unknown(),count:e.z.number().optional(),disambiguation:e.z.array(e.z.string()).optional()},["value"]))}).passthrough(),ze=e.z.object({...k,kind:e.z.literal("sql"),columns:e.z.array(j),records:x,sqlShape:e.z.object({statementType:e.z.string().optional(),explicitLimit:e.z.number().optional(),hasPythonCode:e.z.boolean().optional()}).passthrough().optional()}).passthrough(),kt=e.z.object({enabled:e.z.boolean().optional(),position:e.z.enum(["before","after"]).optional(),label:e.z.string().optional()}).passthrough(),te=e.z.object({id:e.z.enum(["rows","columns"]),levels:e.z.array(e.z.object({instanceId:e.z.string(),fieldKey:e.z.string(),label:e.z.string(),field:z,grain:le.optional(),subtotal:kt.optional()}).passthrough()),nodeIds:e.z.array(e.z.string())}).passthrough(),y=w({instanceId:e.z.string(),fieldKey:e.z.string(),value:e.z.unknown(),label:e.z.string()},["value"]),At=e.z.union([e.z.object({kind:e.z.literal("label")}).passthrough(),e.z.object({kind:e.z.literal("field"),field:z,aggregate:d.optional()}).passthrough(),e.z.object({kind:e.z.literal("value"),valueId:e.z.string(),rowPath:e.z.array(y).optional(),columnPath:e.z.array(y).optional()}).passthrough()]),It=e.z.enum(["present","presentNull","missing","densified"]),Rt=e.z.enum(["value","rowSubtotal","columnSubtotal","subtotalIntersection","rowGrandTotal","columnGrandTotal","matrixGrandTotal"]),_t=e.z.object({instanceId:e.z.string(),fieldKey:e.z.string(),field:z,role:e.z.enum(["row","column","measure","sort","filter"]),label:e.z.string().optional()}).passthrough(),jt=e.z.union([e.z.object({kind:e.z.literal("additive"),aggregate:d.optional()}).passthrough(),e.z.object({kind:e.z.literal("semiAdditive"),aggregate:d.optional(),grain:le.optional()}).passthrough(),e.z.object({kind:e.z.literal("nonAdditive"),aggregate:d.optional()}).passthrough(),e.z.object({kind:e.z.literal("ratio"),numeratorMeasureInstanceId:e.z.string().optional(),denominatorMeasureInstanceId:e.z.string().optional()}).passthrough(),e.z.object({kind:e.z.literal("custom"),expressionId:e.z.string().optional()}).passthrough()]),Ct=e.z.object({instanceId:e.z.string(),fieldKey:e.z.string(),label:e.z.string(),field:z,aggregate:d.optional(),format:de.optional(),totalBehavior:ft.optional(),semantics:jt}).passthrough(),qt=e.z.object({id:e.z.string(),measureId:e.z.string(),aggregate:d.optional(),label:e.z.string().optional(),source:e.z.enum(["measureDefault","rowSubtotal","columnSubtotal","subtotalIntersection","rowGrandTotal","columnGrandTotal","matrixGrandTotal","custom"]),scope:e.z.object({rowLevelId:e.z.string().optional(),columnLevelId:e.z.string().optional(),rowNodeId:e.z.string().optional(),columnNodeId:e.z.string().optional()}).passthrough().optional()}).passthrough(),xt=e.z.object({kind:e.z.string(),label:e.z.string().optional(),payload:e.z.record(e.z.string(),e.z.unknown()).optional()}).passthrough(),Et=w({id:e.z.string(),axis:e.z.enum(["row","column"]),path:e.z.array(y),level:e.z.number(),label:e.z.string(),value:e.z.unknown(),parentId:e.z.string().optional(),hasChildren:e.z.boolean(),isExpanded:e.z.boolean().optional(),isSubtotal:e.z.boolean().optional(),isGrandTotal:e.z.boolean().optional(),subtotalFunction:d.optional(),childCount:e.z.number().optional(),actions:e.z.array(xt).optional()},["value"]),Ft=e.z.object({rowHeaderLevels:e.z.array(e.z.object({id:e.z.string(),label:e.z.string(),fieldInstanceId:e.z.string()}).passthrough()),columnHeaderRows:e.z.array(e.z.object({id:e.z.string(),cells:e.z.array(e.z.object({id:e.z.string(),label:e.z.string(),role:e.z.enum(["rowHeader","columnHeader","measureHeader","subtotal","grandTotal"]),colSpan:e.z.number(),rowSpan:e.z.number(),columnPath:e.z.array(y),measureInstanceId:e.z.string().optional()}).passthrough())}).passthrough()),columns:e.z.array(e.z.object({id:e.z.string(),label:e.z.string(),columnNodeId:e.z.string().optional(),columnPath:e.z.array(y),measureInstanceId:e.z.string(),role:e.z.enum(["value","columnSubtotal","columnGrandTotal"])}).passthrough())}).passthrough(),Nt=w({rowId:e.z.string(),columnId:e.z.string().optional(),measureId:e.z.string(),value:e.z.unknown(),formattedValue:e.z.string().optional(),presence:It,role:Rt,calculationId:e.z.string().optional()},["value"]),Dt=e.z.object({rows:e.z.boolean().optional(),columns:e.z.boolean().optional(),grandTotal:e.z.union([e.z.boolean(),e.z.object({rows:e.z.boolean().optional(),columns:e.z.boolean().optional()}).passthrough()]).optional()}).passthrough(),Tt=w({id:e.z.string(),axis:e.z.enum(["row","column"]),targetInstanceId:e.z.string().optional(),direction:e.z.enum(["asc","desc"]),nulls:e.z.enum(["warehouseDefault","first","last"]).optional(),scope:e.z.enum(["global","withinParent"]).optional(),by:At},["by"]),Ot=e.z.object({rowOffset:e.z.number().optional(),rowLimit:e.z.number().optional(),columnOffset:e.z.number().optional(),columnLimit:e.z.number().optional(),hasMoreRows:e.z.boolean().optional(),hasMoreColumns:e.z.boolean().optional()}).passthrough(),Kt=e.z.object({axis:e.z.enum(["row","column"]),path:e.z.array(y),depth:e.z.number().optional()}).passthrough(),Mt=e.z.object({rowLazyLoading:e.z.boolean().optional(),columnLazyLoading:e.z.boolean().optional(),expandableRowNodeIds:e.z.array(e.z.string()).optional(),expandableColumnNodeIds:e.z.array(e.z.string()).optional(),nextRequests:e.z.array(Kt).optional()}).passthrough(),Pt=e.z.object({domains:e.z.record(e.z.object({min:e.z.number().optional(),max:e.z.number().optional()}).passthrough()).optional(),rules:e.z.array(e.z.record(e.z.string(),e.z.unknown())).optional()}).passthrough(),be=e.z.object({...k,kind:e.z.literal("matrix"),schemaVersion:e.z.literal(1),shape:e.z.enum(["hierarchical","pivot"]),capabilities:e.z.array(e.z.string()),executionMetadata:e.z.record(e.z.string(),e.z.unknown()),fieldsById:e.z.record(e.z.string(),_t),measuresById:e.z.record(e.z.string(),Ct),calculationsById:e.z.record(e.z.string(),qt).optional(),axes:e.z.object({rows:te,columns:te}).passthrough(),nodesById:e.z.record(e.z.string(),Et),layout:Ft,cells:e.z.array(Nt),totals:Dt,sort:e.z.array(Tt),formattingContext:Pt,pageInfo:Ot.optional(),expansion:Mt.optional()}).passthrough(),ye=e.z.union([ge,he,fe,ze,be]),Se=e.z.object({status:e.z.enum(["not_required","resolved","missing","ambiguous","fanout_risk","unknown"]),requiredSources:e.z.array(b).optional(),relationshipsUsed:e.z.array(e.z.string()).optional(),missingSources:e.z.array(e.z.string()).optional(),warnings:e.z.array(e.z.string()).optional(),message:e.z.string().optional(),recommendedNextStep:e.z.string().optional(),joinPlanSummary:e.z.object({baseSource:b.optional(),joinedSources:e.z.array(b).optional(),joinCount:e.z.number().optional()}).passthrough().optional(),fanoutRisk:e.z.object({status:e.z.enum(["none","warning","error","unknown"]),message:e.z.string().optional()}).passthrough().optional()}).passthrough(),oe=e.z.enum(["ambiguous_fields","empty_result","missing_grounded_fields","missing_relationship","no_grounded_query","partial_result","presentation_incomplete","query_validation_failed","unsafe_join"]),H=e.z.object({version:e.z.literal(1),status:e.z.enum(["answered","partial","blocked"]),summary:e.z.string(),answered:e.z.array(e.z.object({slotId:e.z.string().optional(),queryId:e.z.string().optional(),summary:e.z.string(),evidenceIds:e.z.array(e.z.string()).optional(),fieldsUsed:e.z.array(D).optional()}).passthrough()),blocked:e.z.array(e.z.object({slotId:e.z.string().optional(),queryId:e.z.string().optional(),reasonCode:oe,message:e.z.string(),missingFields:e.z.array(e.z.string()).optional(),availableFields:e.z.array(e.z.string()).optional(),ambiguousFields:e.z.array(e.z.string()).optional(),missingRelationships:e.z.array(e.z.string()).optional(),evidenceIds:e.z.array(e.z.string()).optional(),neededFromUser:e.z.array(e.z.string()).optional(),recommendedNextStep:e.z.string().optional()}).passthrough()),semanticModelRecommendations:e.z.array(e.z.object({reasonCode:oe,message:e.z.string(),recommendedNextStep:e.z.string().optional()}).passthrough()).optional()}).passthrough(),Q=e.z.object({scope:e.z.literal("filtered_query"),measures:e.z.record(R)}).passthrough(),Y=e.z.object({answeredObligations:e.z.array(e.z.string()),missingObligations:e.z.array(e.z.string()),warnings:e.z.array(C).optional()}).passthrough(),ve=e.z.object({intentId:e.z.string().optional(),queryId:e.z.string().optional(),status:e.z.enum(["answered","partial","failed"]),resultShape:e.z.enum(["metric","records","inputOptions","sql","matrix","period_change","analysis"]).optional(),intent:e.z.unknown().optional(),compiledQuery:e.z.unknown().optional(),fieldsUsed:e.z.array(D).optional(),result:ye.optional(),validation:G,coverage:Y.optional(),missingFields:e.z.array(e.z.string()).optional(),warnings:e.z.array(e.z.string()).optional(),relationshipDiagnostics:Se.optional(),diagnosticFeedback:H.optional(),population:Q.optional(),metadata:e.z.record(e.z.string(),e.z.unknown()).optional()}).passthrough();function Bt(i){switch(i){case"boolean":return e.z.boolean().optional();case"compactExecutionFieldArray":return e.z.array($t).optional();case"coverage":return Y.optional();case"diagnosticFeedback":return H.optional();case"executionFieldArray":return e.z.array(D).optional();case"executionResult":return ve.optional();case"number":return e.z.number().finite().optional();case"population":return Q.optional();case"record":return m.optional();case"recordArray":return x.optional();case"responseDetail":return e.z.enum(["compact","standard","debug"]).optional();case"string":return e.z.string().optional();case"stringArray":return e.z.array(e.z.string()).optional();case"unknown":return e.z.unknown().optional();case"unknownArray":return e.z.array(e.z.unknown()).optional();case"validationResult":return G.optional()}}const $e=Object.fromEntries(Object.entries(q).map(([i,o])=>[i,Bt(o)])),we=e.z.object($e).strict(),W=e.z.object({sourceKey:e.z.string().optional(),kind:e.z.enum(["semantic","physical","sql"]).optional(),domainId:e.z.string().optional(),datasetName:e.z.string().optional(),datasetId:e.z.string().optional(),connectionId:e.z.string().optional(),tableName:e.z.string().optional(),label:e.z.string().optional()}).passthrough(),f=e.z.object({name:e.z.string(),label:e.z.string().optional(),role:e.z.enum(["dimension","measure","date","id","unknown"]).optional(),dataType:e.z.enum(["string","number","boolean","date","datetime","unknown"]).optional(),aggregate:d.optional(),sourceKey:e.z.string().optional(),source:W.optional()}).passthrough(),ke=e.z.object({id:e.z.string().optional(),builder:e.z.literal("semaphor.inputOptions"),source:W.optional(),sourceKey:e.z.string().optional(),valueFieldRef:f,labelFieldRef:f,filterFieldRef:f.optional(),population:e.z.unknown().optional(),dependencies:e.z.unknown().optional(),limit:e.z.number().int().positive().optional(),spec:m.optional()}).passthrough(),Ae=e.z.object({appliesToViewIds:e.z.array(e.z.string()).optional(),viewId:e.z.string().optional(),fieldRef:f,relationshipHint:e.z.unknown().optional(),relationshipsUsed:e.z.array(m).optional()}).passthrough(),Vt=e.z.object({id:e.z.string(),label:e.z.string().optional(),type:e.z.string().optional(),serverSide:e.z.boolean().optional(),fieldRef:f.optional(),optionQuery:ke.optional(),bindings:e.z.array(Ae).optional(),appliesToViewIds:e.z.array(e.z.string()),relationshipHint:e.z.unknown().optional(),relationshipsUsed:e.z.array(m).optional()}).passthrough(),Lt=e.z.object({builder:e.z.enum(["semaphor.metric","semaphor.records","semaphor.matrix","semaphor.analysis","semaphor.sql"]),spec:m,fallbackReason:m.optional()}).passthrough(),Ut=e.z.object({id:e.z.string(),title:e.z.string().optional(),purpose:e.z.string().optional(),sourcePresentation:e.z.object({sourceKeys:e.z.array(e.z.string()).optional(),sourceLabels:e.z.array(e.z.string()).optional()}).passthrough().optional(),visual:e.z.string().optional(),visualSpec:m.optional(),queryKind:e.z.enum(["metric","records","matrix","analysis","sql_fallback"]).optional(),sdkBuilder:e.z.enum(["semaphor.metric","semaphor.records","semaphor.matrix","semaphor.analysis","semaphor.sql"]).optional(),sdkSpec:Lt.optional(),fields:e.z.array(f).optional(),computation:m.optional(),uxExpectations:e.z.array(e.z.string()).optional(),validation:m.optional()}).passthrough(),Gt=e.z.object({inputId:e.z.string(),label:e.z.string().optional(),type:e.z.string().optional(),serverSide:e.z.boolean().optional(),fieldRef:f.optional(),optionQuery:ke.optional(),bindings:e.z.array(Ae),appliesToViewIds:e.z.array(e.z.string()),notAppliedToViewIds:e.z.array(e.z.string())}).passthrough(),Ht=e.z.object({schemaVersion:e.z.literal(_),title:e.z.string(),purpose:e.z.string().optional(),userGoal:e.z.string().optional(),nextStep:e.z.string().optional(),sources:e.z.array(W),inputs:e.z.array(Vt),views:e.z.array(Ut),filterContracts:e.z.array(Gt),implementationChecklist:e.z.object({schemaVersion:e.z.string().optional(),requiredDevtools:e.z.object({mountRootDevtools:e.z.boolean(),providerDebugBridge:e.z.string().optional(),panelPosition:e.z.string().optional(),forbidden:e.z.array(e.z.string()).optional()}).passthrough(),requiredInputOptions:e.z.array(m),filterScopeByInput:e.z.array(m),bindingsByView:e.z.record(e.z.string(),e.z.array(m)),validationCommands:e.z.array(e.z.string()),browserSmokeChecks:e.z.array(e.z.string())}).passthrough(),nextRequiredTool:e.z.object({name:e.z.string(),reason:e.z.string().optional()}).optional(),unsupportedInsights:e.z.array(e.z.object({title:e.z.string(),requestedQuestion:e.z.string(),reason:e.z.string(),suggestedModelingFix:e.z.string()}).passthrough()).optional(),assumptions:e.z.array(e.z.string()).optional(),validation:m.optional()}).passthrough().superRefine((i,o)=>{const t=B(i);for(const s of t.issues)o.addIssue({code:e.z.ZodIssueCode.custom,message:s})}),Qt=new Set(Object.keys(q));function Yt(){return Object.keys(q)}function Ie(i){return Qt.has(i)}function Wt(i){if(!i||typeof i!="object"||Array.isArray(i))throw new Error("Semaphor analyze result must be an object.");const t=Object.keys(i).filter(s=>!Ie(s));if(t.length)throw new Error(`Semaphor analyze result contains unsupported top-level field(s): ${t.join(", ")}.`);return we.parse(i)}exports.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT=q;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION=_;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION=Re;exports.getSemaphorAnalyzeResultFieldNames=Yt;exports.isSemaphorAnalyzeResultFieldName=Ie;exports.isSemaphorDataAppCodegenSummary=Te;exports.parseSemaphorAnalyzeResult=Wt;exports.semaphorAnalyticsCoverageSchema=Y;exports.semaphorAnalyticsDiagnosticFeedbackSchema=H;exports.semaphorAnalyticsExecutionResultSchema=ve;exports.semaphorAnalyticsPopulationSchema=Q;exports.semaphorAnalyticsResultSchema=ye;exports.semaphorAnalyticsValidationIssueSchema=C;exports.semaphorAnalyticsValidationResultSchema=G;exports.semaphorAnalyzeResultSchema=we;exports.semaphorAnalyzeResultShape=$e;exports.semaphorDataAppCodegenSummarySchema=Ht;exports.semaphorDerivedFieldDefinitionSchema=U;exports.semaphorExecutionFieldRefSchema=D;exports.semaphorFieldRefSchema=z;exports.semaphorInputOptionsResultSchema=fe;exports.semaphorMatrixResultSchema=be;exports.semaphorMetricResultSchema=ge;exports.semaphorPhysicalSourceRefSchema=ce;exports.semaphorRecordsResultSchema=he;exports.semaphorRelationshipDiagnosticsSchema=Se;exports.semaphorResultColumnSchema=j;exports.semaphorSemanticSourceRefSchema=L;exports.semaphorSourceRefSchema=b;exports.semaphorSqlResultSchema=ze;exports.semaphorSqlSourceRefSchema=pe;exports.validateSemaphorDataAppCodegenSummary=B;
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),l=require("react"),t=require("./index-DXCBPLDu.js"),o=require("./switch-B79Hn4Qh.js");require("./x-B6ghREd2.js");require("./analyze-result-contract-Zgg-Bbpj.js");function G(n={}){var y,P,z,A;const{authToken:d,tokenProps:a}=t.useSemaphorContext(),x=n.enabled??!0,m=(d==null?void 0:d.accessToken)??null,f=(a==null?void 0:a.apiServiceUrl)??null,[L,C]=l.useState(!1),[j,b]=l.useState(!1),[h,g]=l.useState(!1),[N,c]=l.useState(null),[v,S]=l.useState(null),k=v||{tz:((P=(y=a==null?void 0:a.params)==null?void 0:y.calendarContext)==null?void 0:P.tz)||null,weekStart:((A=(z=a==null?void 0:a.params)==null?void 0:z.calendarContext)==null?void 0:A.weekStart)??null},p=l.useCallback(async()=>{if(!(!x||!m||!f)){C(!0),c(null);try{const i=await fetch(`${f}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${m}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to fetch preferences")}const r=await i.json();S({tz:r.tz,weekStart:r.weekStart,source:r.source,isInherited:r.isInherited,userHasPrefs:r.userHasPrefs,inherited:r.inherited})}catch(i){const r=i instanceof Error?i.message:"Unknown error";c(r)}finally{C(!1)}}},[m,f,x]);l.useEffect(()=>{x&&p()},[x,p]);const T=l.useCallback(async i=>{if(!m||!f)return c("Not authenticated"),!1;b(!0),c(null);try{const r=await fetch(`${f}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${m}`},body:JSON.stringify(i)});if(!r.ok){const u=await r.json().catch(()=>({}));throw new Error(u.error||"Failed to update preferences")}return await p(),!0}catch(r){const u=r instanceof Error?r.message:"Unknown error";return c(u),!1}finally{b(!1)}},[m,f,p]),w=l.useCallback(async()=>{if(!m||!f)return c("Not authenticated"),!1;g(!0),c(null);try{const i=await fetch(`${f}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${m}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to clear preferences")}const r=await i.text();if(r)try{const u=JSON.parse(r);return S({tz:u.tz,weekStart:u.weekStart,source:u.source,isInherited:u.isInherited??!0,userHasPrefs:!1,inherited:u.inherited}),!0}catch{}return await p(),!0}catch(i){const r=i instanceof Error?i.message:"Unknown error";return c(r),!1}finally{g(!1)}},[m,f,p]);return{preferences:k,isLoading:L,isSaving:j,isClearing:h,error:N,updatePreferences:T,clearPreferences:w,refetch:p}}const E=[{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"America/Phoenix",label:"Arizona"},{value:"America/Anchorage",label:"Alaska"},{value:"Pacific/Honolulu",label:"Hawaii"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris, Berlin, Rome"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Asia/Shanghai",label:"Beijing, Shanghai"},{value:"Asia/Kolkata",label:"Mumbai, New Delhi"},{value:"Australia/Sydney",label:"Sydney"},{value:"UTC",label:"UTC"}],M=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}],H="text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";function W(){try{const n=Intl;if(n.supportedValuesOf)return n.supportedValuesOf("timeZone")}catch{}return E.map(n=>n.value)}function _(n){switch(n){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function O(n){const d=E.find(a=>a.value===n);return d?d.label:n}function q(n){const d=M.find(a=>a.value===n);return d?d.label:String(n)}function V({open:n,onOpenChange:d}){var D,U,F;const{preferences:a,isLoading:x,isSaving:m,isClearing:f,updatePreferences:L,clearPreferences:C}=G({enabled:n}),j=a.tz||((D=a.inherited)==null?void 0:D.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,b=a.weekStart??((U=a.inherited)==null?void 0:U.weekStart)??1,[h,g]=l.useState(!a.userHasPrefs),[N,c]=l.useState(!1),[v,S]=l.useState(j),[k,p]=l.useState(b),[T,w]=l.useState(!1),y=l.useMemo(()=>W(),[]),P=l.useMemo(()=>y.filter(s=>!E.some(R=>R.value===s)),[y]),z=l.useMemo(()=>O(v),[v]),A=a.inherited?O(a.inherited.tz):"UTC",i=a.inherited?q(a.inherited.weekStart):"Monday",r=_((F=a.inherited)==null?void 0:F.source);l.useEffect(()=>{if(!n){c(!1);return}N||(a.userHasPrefs!==void 0&&g(!a.userHasPrefs),S(j),p(b))},[n,N,a.userHasPrefs,j,b]);const u=async()=>{if(x){t.ue.error("Preferences are still loading. Please try again.");return}h?await C()?(t.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again."):await L({tz:v,weekStart:k})?(t.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again.")},$=()=>{d(!1)},I=m||f,B=I||x;return e.jsx(t.Dialog,{open:n,onOpenChange:d,children:e.jsxs(t.DialogContent,{className:"rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control",children:[e.jsxs(t.DialogHeader,{children:[e.jsx(t.DialogTitle,{className:"text-[15px]",children:"Calendar preferences"}),e.jsx(t.DialogDescription,{className:"text-[13px] leading-5",children:"Set your timezone and week-start for date calculations and displays."})]}),e.jsxs("div",{className:"space-y-4 py-1",children:[e.jsxs(t.RadioGroup,{value:h?"defaults":"custom",onValueChange:s=>{c(!0),g(s==="defaults")},className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:"mode-defaults",className:o.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",h&&"bg-muted/50"),onClick:()=>{c(!0),g(!0)},children:[e.jsx(t.RadioGroupItem,{value:"defaults",id:"mode-defaults",className:"mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-[13px] font-medium text-foreground",children:["Use ",r," defaults"]}),e.jsxs("p",{className:"text-[12px] text-muted-foreground",children:[A,", week starts ",i]})]})]}),e.jsxs("label",{htmlFor:"mode-custom",className:o.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",!h&&"bg-muted/50"),onClick:()=>{c(!0),g(!1)},children:[e.jsx(t.RadioGroupItem,{value:"custom",id:"mode-custom",className:"mt-0.5"}),e.jsx("p",{className:"flex-1 text-[13px] font-medium text-foreground",children:"Use custom settings"})]})]}),e.jsxs("div",{className:o.cn("space-y-4 border-t border-border/60 pt-4 transition-opacity",h&&"pointer-events-none opacity-50"),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(o.Label,{className:H,children:"Timezone"}),e.jsxs(o.Popover,{open:T,onOpenChange:w,modal:!0,children:[e.jsx(o.PopoverTrigger,{asChild:!0,children:e.jsxs(o.Button,{variant:"outline",size:"xs",role:"combobox","aria-expanded":T,className:"w-full justify-between text-[12px] font-normal",disabled:h,children:[e.jsx("span",{className:"truncate",children:z}),e.jsx(t.ChevronsUpDown,{className:"ml-2 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(o.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(t.Command,{className:"overflow-visible",children:[e.jsx(t.CommandInput,{placeholder:"Search timezones…"}),e.jsxs(t.CommandList,{children:[e.jsx(t.CommandEmpty,{children:"No timezone found."}),e.jsx(t.CommandGroup,{heading:"Common",children:E.map(s=>e.jsxs(t.CommandItem,{value:`${s.value} ${s.label}`,onSelect:()=>{c(!0),S(s.value),w(!1)},children:[e.jsx(o.Check,{className:o.cn("h-3.5 w-3.5",v===s.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:s.label}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:s.value})]},s.value))}),e.jsx(t.CommandSeparator,{}),e.jsx(t.CommandGroup,{heading:"All timezones",children:P.map(s=>e.jsxs(t.CommandItem,{value:s,onSelect:()=>{c(!0),S(s),w(!1)},children:[e.jsx(o.Check,{className:o.cn("h-3.5 w-3.5",v===s?"opacity-100":"opacity-0")}),s]},s))})]})]})})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(o.Label,{className:H,children:"Week starts on"}),e.jsx(t.RadioGroup,{value:String(k),onValueChange:s=>{c(!0),p(Number(s))},className:"flex gap-4",disabled:h,children:M.map(s=>e.jsxs("label",{htmlFor:`week-start-${s.value}`,className:o.cn("flex cursor-pointer items-center gap-2 text-[13px]",h&&"cursor-not-allowed"),children:[e.jsx(t.RadioGroupItem,{value:String(s.value),id:`week-start-${s.value}`,disabled:h}),s.label]},s.value))})]})]})]}),e.jsxs(t.DialogFooter,{children:[e.jsx(o.Button,{variant:"outline",size:"xs",onClick:$,disabled:I,children:"Cancel"}),e.jsx(o.Button,{size:"xs",onClick:u,disabled:B,children:I?e.jsxs(e.Fragment,{children:[e.jsx(o.LoaderCircle,{className:"h-3.5 w-3.5 animate-spin"}),"Saving…"]}):"Save"})]})]})})}exports.CalendarPreferencesDialog=V;
1
+ "use strict";const e=require("react/jsx-runtime"),l=require("react"),t=require("./index-BepF6hoa.js"),o=require("./switch-D2oOmorN.js");require("./x-B6ghREd2.js");require("./analyze-result-contract-S8u7CcPL.js");function G(n={}){var y,P,z,A;const{authToken:d,tokenProps:a}=t.useSemaphorContext(),x=n.enabled??!0,m=(d==null?void 0:d.accessToken)??null,f=(a==null?void 0:a.apiServiceUrl)??null,[L,C]=l.useState(!1),[j,b]=l.useState(!1),[h,g]=l.useState(!1),[N,c]=l.useState(null),[v,S]=l.useState(null),k=v||{tz:((P=(y=a==null?void 0:a.params)==null?void 0:y.calendarContext)==null?void 0:P.tz)||null,weekStart:((A=(z=a==null?void 0:a.params)==null?void 0:z.calendarContext)==null?void 0:A.weekStart)??null},p=l.useCallback(async()=>{if(!(!x||!m||!f)){C(!0),c(null);try{const i=await fetch(`${f}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${m}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to fetch preferences")}const r=await i.json();S({tz:r.tz,weekStart:r.weekStart,source:r.source,isInherited:r.isInherited,userHasPrefs:r.userHasPrefs,inherited:r.inherited})}catch(i){const r=i instanceof Error?i.message:"Unknown error";c(r)}finally{C(!1)}}},[m,f,x]);l.useEffect(()=>{x&&p()},[x,p]);const T=l.useCallback(async i=>{if(!m||!f)return c("Not authenticated"),!1;b(!0),c(null);try{const r=await fetch(`${f}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${m}`},body:JSON.stringify(i)});if(!r.ok){const u=await r.json().catch(()=>({}));throw new Error(u.error||"Failed to update preferences")}return await p(),!0}catch(r){const u=r instanceof Error?r.message:"Unknown error";return c(u),!1}finally{b(!1)}},[m,f,p]),w=l.useCallback(async()=>{if(!m||!f)return c("Not authenticated"),!1;g(!0),c(null);try{const i=await fetch(`${f}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${m}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to clear preferences")}const r=await i.text();if(r)try{const u=JSON.parse(r);return S({tz:u.tz,weekStart:u.weekStart,source:u.source,isInherited:u.isInherited??!0,userHasPrefs:!1,inherited:u.inherited}),!0}catch{}return await p(),!0}catch(i){const r=i instanceof Error?i.message:"Unknown error";return c(r),!1}finally{g(!1)}},[m,f,p]);return{preferences:k,isLoading:L,isSaving:j,isClearing:h,error:N,updatePreferences:T,clearPreferences:w,refetch:p}}const E=[{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"America/Phoenix",label:"Arizona"},{value:"America/Anchorage",label:"Alaska"},{value:"Pacific/Honolulu",label:"Hawaii"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris, Berlin, Rome"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Asia/Shanghai",label:"Beijing, Shanghai"},{value:"Asia/Kolkata",label:"Mumbai, New Delhi"},{value:"Australia/Sydney",label:"Sydney"},{value:"UTC",label:"UTC"}],M=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}],H="text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";function W(){try{const n=Intl;if(n.supportedValuesOf)return n.supportedValuesOf("timeZone")}catch{}return E.map(n=>n.value)}function _(n){switch(n){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function O(n){const d=E.find(a=>a.value===n);return d?d.label:n}function q(n){const d=M.find(a=>a.value===n);return d?d.label:String(n)}function V({open:n,onOpenChange:d}){var D,U,F;const{preferences:a,isLoading:x,isSaving:m,isClearing:f,updatePreferences:L,clearPreferences:C}=G({enabled:n}),j=a.tz||((D=a.inherited)==null?void 0:D.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,b=a.weekStart??((U=a.inherited)==null?void 0:U.weekStart)??1,[h,g]=l.useState(!a.userHasPrefs),[N,c]=l.useState(!1),[v,S]=l.useState(j),[k,p]=l.useState(b),[T,w]=l.useState(!1),y=l.useMemo(()=>W(),[]),P=l.useMemo(()=>y.filter(s=>!E.some(R=>R.value===s)),[y]),z=l.useMemo(()=>O(v),[v]),A=a.inherited?O(a.inherited.tz):"UTC",i=a.inherited?q(a.inherited.weekStart):"Monday",r=_((F=a.inherited)==null?void 0:F.source);l.useEffect(()=>{if(!n){c(!1);return}N||(a.userHasPrefs!==void 0&&g(!a.userHasPrefs),S(j),p(b))},[n,N,a.userHasPrefs,j,b]);const u=async()=>{if(x){t.ue.error("Preferences are still loading. Please try again.");return}h?await C()?(t.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again."):await L({tz:v,weekStart:k})?(t.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again.")},$=()=>{d(!1)},I=m||f,B=I||x;return e.jsx(t.Dialog,{open:n,onOpenChange:d,children:e.jsxs(t.DialogContent,{className:"rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control",children:[e.jsxs(t.DialogHeader,{children:[e.jsx(t.DialogTitle,{className:"text-[15px]",children:"Calendar preferences"}),e.jsx(t.DialogDescription,{className:"text-[13px] leading-5",children:"Set your timezone and week-start for date calculations and displays."})]}),e.jsxs("div",{className:"space-y-4 py-1",children:[e.jsxs(t.RadioGroup,{value:h?"defaults":"custom",onValueChange:s=>{c(!0),g(s==="defaults")},className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:"mode-defaults",className:o.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",h&&"bg-muted/50"),onClick:()=>{c(!0),g(!0)},children:[e.jsx(t.RadioGroupItem,{value:"defaults",id:"mode-defaults",className:"mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-[13px] font-medium text-foreground",children:["Use ",r," defaults"]}),e.jsxs("p",{className:"text-[12px] text-muted-foreground",children:[A,", week starts ",i]})]})]}),e.jsxs("label",{htmlFor:"mode-custom",className:o.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",!h&&"bg-muted/50"),onClick:()=>{c(!0),g(!1)},children:[e.jsx(t.RadioGroupItem,{value:"custom",id:"mode-custom",className:"mt-0.5"}),e.jsx("p",{className:"flex-1 text-[13px] font-medium text-foreground",children:"Use custom settings"})]})]}),e.jsxs("div",{className:o.cn("space-y-4 border-t border-border/60 pt-4 transition-opacity",h&&"pointer-events-none opacity-50"),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(o.Label,{className:H,children:"Timezone"}),e.jsxs(o.Popover,{open:T,onOpenChange:w,modal:!0,children:[e.jsx(o.PopoverTrigger,{asChild:!0,children:e.jsxs(o.Button,{variant:"outline",size:"xs",role:"combobox","aria-expanded":T,className:"w-full justify-between text-[12px] font-normal",disabled:h,children:[e.jsx("span",{className:"truncate",children:z}),e.jsx(t.ChevronsUpDown,{className:"ml-2 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(o.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(t.Command,{className:"overflow-visible",children:[e.jsx(t.CommandInput,{placeholder:"Search timezones…"}),e.jsxs(t.CommandList,{children:[e.jsx(t.CommandEmpty,{children:"No timezone found."}),e.jsx(t.CommandGroup,{heading:"Common",children:E.map(s=>e.jsxs(t.CommandItem,{value:`${s.value} ${s.label}`,onSelect:()=>{c(!0),S(s.value),w(!1)},children:[e.jsx(o.Check,{className:o.cn("h-3.5 w-3.5",v===s.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:s.label}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:s.value})]},s.value))}),e.jsx(t.CommandSeparator,{}),e.jsx(t.CommandGroup,{heading:"All timezones",children:P.map(s=>e.jsxs(t.CommandItem,{value:s,onSelect:()=>{c(!0),S(s),w(!1)},children:[e.jsx(o.Check,{className:o.cn("h-3.5 w-3.5",v===s?"opacity-100":"opacity-0")}),s]},s))})]})]})})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(o.Label,{className:H,children:"Week starts on"}),e.jsx(t.RadioGroup,{value:String(k),onValueChange:s=>{c(!0),p(Number(s))},className:"flex gap-4",disabled:h,children:M.map(s=>e.jsxs("label",{htmlFor:`week-start-${s.value}`,className:o.cn("flex cursor-pointer items-center gap-2 text-[13px]",h&&"cursor-not-allowed"),children:[e.jsx(t.RadioGroupItem,{value:String(s.value),id:`week-start-${s.value}`,disabled:h}),s.label]},s.value))})]})]})]}),e.jsxs(t.DialogFooter,{children:[e.jsx(o.Button,{variant:"outline",size:"xs",onClick:$,disabled:I,children:"Cancel"}),e.jsx(o.Button,{size:"xs",onClick:u,disabled:B,children:I?e.jsxs(e.Fragment,{children:[e.jsx(o.LoaderCircle,{className:"h-3.5 w-3.5 animate-spin"}),"Saving…"]}):"Save"})]})]})})}exports.CalendarPreferencesDialog=V;
@@ -1,9 +1,9 @@
1
1
  import { jsx as r, jsxs as s, Fragment as X } from "react/jsx-runtime";
2
2
  import ee, { useState as h, useCallback as F, useEffect as ae, useMemo as H } from "react";
3
- import { u as re, b as te, c as se, d as ne, e as le, f as oe, R as W, g as O, C as ie, h as ce, i as de, j as ue, k as me, l as _, m as R, n as fe, o as he, p as N } from "./index-CQmKDEbe.js";
4
- import { c as S, L as G, P as pe, a as ge, B as j, b as ve, d as V, e as be } from "./switch-BXQAlSuW.js";
3
+ import { u as re, b as te, c as se, d as ne, e as le, f as oe, R as W, g as O, C as ie, h as ce, i as de, j as ue, k as me, l as _, m as R, n as fe, o as he, p as N } from "./index-Drz04wqE.js";
4
+ import { c as S, L as G, P as pe, a as ge, B as j, b as ve, d as V, e as be } from "./switch-qUw8u-gU.js";
5
5
  import "./x-CXDkqdur.js";
6
- import "./analyze-result-contract-C9Gv2_qW.js";
6
+ import "./analyze-result-contract-BUgK3759.js";
7
7
  function we(n = {}) {
8
8
  var C, A, E, L;
9
9
  const { authToken: c, tokenProps: e } = re(), p = n.enabled ?? !0, d = (c == null ? void 0 : c.accessToken) ?? null, u = (e == null ? void 0 : e.apiServiceUrl) ?? null, [I, k] = h(!1), [y, b] = h(!1), [m, g] = h(!1), [T, o] = h(null), [v, w] = h(null), P = v || {
@@ -1,11 +1,11 @@
1
1
  import { jsx as t, jsxs as s, Fragment as le } from "react/jsx-runtime";
2
2
  import bo, { useState as S, useEffect as fe, useMemo as O, useContext as xo, useRef as Me, useCallback as ye } from "react";
3
- import { b as rt, c as at, e as st, aF as ka, bs as yo, bO as vo, bP as No, ar as Rt, bC as Sa, aW as gt, J as wo, A as Co, bQ as ko, ah as Jt, ak as Qt, al as Xt, am as Yt, an as Zt, ao as en, ap as tn, aq as Yn, aV as nn, p as be, bR as So, bS as Do, bT as In, bD as rn, bE as an, bU as Zn, bF as sn, bG as De, av as Eo, b8 as jt, bV as Da, br as $n, d as bt, f as xt, bW as Ao, o as Ea, aE as Io, aT as Aa, bX as To, aU as _n, y as Lo, ae as Fo, ax as Ro, u as Pt, a0 as mt, ab as er, a7 as Ia, a8 as tr, a1 as Ta, a6 as Po, ad as Bo, bJ as Mo, bY as Vo, b4 as Oo, a9 as qr, x as zt, a3 as Uo, bZ as $o, b_ as _o, b$ as jo, c0 as zo, c1 as Ko, c2 as qo, c3 as Ho, c4 as Go, c5 as La, c6 as Wo, c7 as Jo, c8 as Qo, c9 as Xo, ca as Yo, ay as yt, cb as Zo, bH as Fa, cc as ei, cd as ti, ce as ni, cf as ri, cg as ai, ch as si, ci as oi, cj as Ra, ck as ii, cl as li, cm as Pa, cn as Ba, co as Ma, cp as di, cq as ci, be as Va, bp as ui, bm as mi, cr as hi, aw as Oa, cs as pi, ct as fi, cu as gi, cv as bi, cw as jn, cx as xi, cy as yi, cz as Ua, cA as nr, cB as vi, cC as Ni, cD as $a, cE as wi, cF as Ci, cG as ki, cH as _a, as as Si, cI as Di, cJ as Ei, cK as Ai, cL as Ii, cM as Ti, cN as Li, cO as Fi } from "./index-CQmKDEbe.js";
4
- import { B as Z, L as Lt, Z as zn, e as se, N as ja, d as je, c as v, M as za, E as vt, u as Q, A as Nt, aF as Hr, a6 as Ka, F as qa, S as rr, P as $e, a as ot, b as it, aG as Ri, aH as Pi, aD as Ha, aI as Ga, _ as Ye, $ as Ze, a0 as et, a1 as tt, a2 as xe, aJ as Wa, aK as Ja, X as nt, T as Bi, G as Mi, H as Gr, aL as Vi } from "./switch-BXQAlSuW.js";
3
+ import { b as rt, c as at, e as st, aF as ka, bs as yo, bO as vo, bP as No, ar as Rt, bC as Sa, aW as gt, J as wo, A as Co, bQ as ko, ah as Jt, ak as Qt, al as Xt, am as Yt, an as Zt, ao as en, ap as tn, aq as Yn, aV as nn, p as be, bR as So, bS as Do, bT as In, bD as rn, bE as an, bU as Zn, bF as sn, bG as De, av as Eo, b8 as jt, bV as Da, br as $n, d as bt, f as xt, bW as Ao, o as Ea, aE as Io, aT as Aa, bX as To, aU as _n, y as Lo, ae as Fo, ax as Ro, u as Pt, a0 as mt, ab as er, a7 as Ia, a8 as tr, a1 as Ta, a6 as Po, ad as Bo, bJ as Mo, bY as Vo, b4 as Oo, a9 as qr, x as zt, a3 as Uo, bZ as $o, b_ as _o, b$ as jo, c0 as zo, c1 as Ko, c2 as qo, c3 as Ho, c4 as Go, c5 as La, c6 as Wo, c7 as Jo, c8 as Qo, c9 as Xo, ca as Yo, ay as yt, cb as Zo, bH as Fa, cc as ei, cd as ti, ce as ni, cf as ri, cg as ai, ch as si, ci as oi, cj as Ra, ck as ii, cl as li, cm as Pa, cn as Ba, co as Ma, cp as di, cq as ci, be as Va, bp as ui, bm as mi, cr as hi, aw as Oa, cs as pi, ct as fi, cu as gi, cv as bi, cw as jn, cx as xi, cy as yi, cz as Ua, cA as nr, cB as vi, cC as Ni, cD as $a, cE as wi, cF as Ci, cG as ki, cH as _a, as as Si, cI as Di, cJ as Ei, cK as Ai, cL as Ii, cM as Ti, cN as Li, cO as Fi } from "./index-Drz04wqE.js";
4
+ import { B as Z, L as Lt, Z as zn, e as se, N as ja, d as je, c as v, M as za, E as vt, u as Q, A as Nt, aF as Hr, a6 as Ka, F as qa, S as rr, P as $e, a as ot, b as it, aG as Ri, aH as Pi, aD as Ha, aI as Ga, _ as Ye, $ as Ze, a0 as et, a1 as tt, a2 as xe, aJ as Wa, aK as Ja, X as nt, T as Bi, G as Mi, H as Gr, aL as Vi } from "./switch-qUw8u-gU.js";
5
5
  import { L as ar } from "./layout-grid-CiubineE.js";
6
6
  import { c as Pe, X as Ae, C as Ge } from "./x-CXDkqdur.js";
7
- import { u as sr, V as Oi, E as Wr, a as Jr, b as Ui, c as $i, L as _i, d as ji, e as Qa, C as Xa, f as zi, R as Ki, S as qi } from "./use-create-flow-overlay-state-Bw5LRkf9.js";
8
- import "./analyze-result-contract-C9Gv2_qW.js";
7
+ import { u as sr, V as Oi, E as Wr, a as Jr, b as Ui, c as $i, L as _i, d as ji, e as Qa, C as Xa, f as zi, R as Ki, S as qi } from "./use-create-flow-overlay-state-CFJIHt5D.js";
8
+ import "./analyze-result-contract-BUgK3759.js";
9
9
  import { S as Hi, M as Gi, a as Bt, C as Kn } from "./search-BHsQIWBV.js";
10
10
  import { l as Qr } from "./date-formatter-CzcPZx39.js";
11
11
  import "./index-CJdxSyQq.js";
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),h=require("react"),i=require("./index-DXCBPLDu.js"),o=require("./switch-B79Hn4Qh.js"),ss=require("./layout-grid-C0OI-MRn.js"),K=require("./x-B6ghREd2.js"),me=require("./use-create-flow-overlay-state-7MFN3PWX.js");require("./analyze-result-contract-Zgg-Bbpj.js");const Ae=require("./search-DNCejM7Z.js"),Gs=require("./date-formatter-B4EBSe9C.js");require("./index-DRlMUglg.js");require("react-dom");/**
1
+ "use strict";const e=require("react/jsx-runtime"),h=require("react"),i=require("./index-BepF6hoa.js"),o=require("./switch-D2oOmorN.js"),ss=require("./layout-grid-C0OI-MRn.js"),K=require("./x-B6ghREd2.js"),me=require("./use-create-flow-overlay-state-DrkYiyQz.js");require("./analyze-result-contract-S8u7CcPL.js");const Ae=require("./search-DNCejM7Z.js"),Gs=require("./date-formatter-B4EBSe9C.js");require("./index-DRlMUglg.js");require("react-dom");/**
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"),p=require("./switch-B79Hn4Qh.js"),s=require("./index-DXCBPLDu.js"),R=require("./x-B6ghREd2.js");require("./analyze-result-contract-Zgg-Bbpj.js");const v=require("react");require("./index-DRlMUglg.js");const ss=require("react-dom"),P=require("./dashboard-briefing-launcher-CgkSKkZR.js"),ft=require("./search-DNCejM7Z.js"),gt=require("./index-D7KJindZ.js"),rs=require("./calendar-preferences-dialog-DwLeBLy2.js"),ns=require("./use-debounced-dirty-check-XHSwAefL.js"),Ue=require("./normalize-dashboard-for-dirty-check-BXRUMVb2.js"),lt=require("./save-C__QggEE.js"),as=require("./palette-C4KTXOug.js"),os=require("./braces-D2tStQjF.js");function is(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const L=is(v);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("./switch-D2oOmorN.js"),s=require("./index-BepF6hoa.js"),R=require("./x-B6ghREd2.js");require("./analyze-result-contract-S8u7CcPL.js");const v=require("react");require("./index-DRlMUglg.js");const ss=require("react-dom"),P=require("./dashboard-briefing-launcher-DiEpMS9E.js"),ft=require("./search-DNCejM7Z.js"),gt=require("./index-D7KJindZ.js"),rs=require("./calendar-preferences-dialog-Ci3rHHgA.js"),ns=require("./use-debounced-dirty-check-XHSwAefL.js"),Ue=require("./normalize-dashboard-for-dirty-check-BXRUMVb2.js"),lt=require("./save-C__QggEE.js"),as=require("./palette-C4KTXOug.js"),os=require("./braces-D2tStQjF.js");function is(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const L=is(v);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,16 +1,16 @@
1
1
  import { jsx as e, jsxs as o, Fragment as R } from "react/jsx-runtime";
2
- import { u as D, B as O, av as dt, A as Wt, L as jr, Z as Kr, c as he, aw as Qr, ax as Wr, ay as rt, az as fe, aA as ct, aB as Jt, e as Ge, aC as Yt, aD as Jr, E as _t, Q as Yr, V as Xr, W as Zr, Y as en, i as tn, aE as rn } from "./switch-BXQAlSuW.js";
3
- import { b5 as nn, u as G, b as Xt, b6 as an, ar as j, c as Zt, d as sn, e as nt, f as at, o as on, b7 as pe, b8 as $e, b9 as dn, ba as Rt, bb as er, bc as tr, bd as cn, be as lt, bf as ln, bg as un, bh as mn, bi as pn, bj as hn, bk as fn, aC as ge, bl as be, p as E, bm as gn, bn as rr, aW as ut, bo as bn, bp as xn, bq as nr, br as ar, bs as vn, bt as yn, bu as wn, z as Nn, y as Te, K as Sn, A as Xe, bv as Dn, bw as Cn, bx as kn, $ as En, by as Ln, I as Ut, bz as An, bA as In, bB as Mn, bC as Pn, bD as Tt, bE as Ft, bF as $t, bG as T, bH as On, bI as _n, bJ as Rn, av as Gt, bK as Un, bL as Tn, bM as Fn, J as $n, bN as Gn, ah as Bn, ak as zn, al as qn, am as Hn, an as Vn, ao as jn, ap as Kn, aq as Bt, w as st } from "./index-CQmKDEbe.js";
2
+ import { u as D, B as O, av as dt, A as Wt, L as jr, Z as Kr, c as he, aw as Qr, ax as Wr, ay as rt, az as fe, aA as ct, aB as Jt, e as Ge, aC as Yt, aD as Jr, E as _t, Q as Yr, V as Xr, W as Zr, Y as en, i as tn, aE as rn } from "./switch-qUw8u-gU.js";
3
+ import { b5 as nn, u as G, b as Xt, b6 as an, ar as j, c as Zt, d as sn, e as nt, f as at, o as on, b7 as pe, b8 as $e, b9 as dn, ba as Rt, bb as er, bc as tr, bd as cn, be as lt, bf as ln, bg as un, bh as mn, bi as pn, bj as hn, bk as fn, aC as ge, bl as be, p as E, bm as gn, bn as rr, aW as ut, bo as bn, bp as xn, bq as nr, br as ar, bs as vn, bt as yn, bu as wn, z as Nn, y as Te, K as Sn, A as Xe, bv as Dn, bw as Cn, bx as kn, $ as En, by as Ln, I as Ut, bz as An, bA as In, bB as Mn, bC as Pn, bD as Tt, bE as Ft, bF as $t, bG as T, bH as On, bI as _n, bJ as Rn, av as Gt, bK as Un, bL as Tn, bM as Fn, J as $n, bN as Gn, ah as Bn, ak as zn, al as qn, am as Hn, an as Vn, ao as jn, ap as Kn, aq as Bt, w as st } from "./index-Drz04wqE.js";
4
4
  import { c as Q, X as sr, C as Qn } from "./x-CXDkqdur.js";
5
- import "./analyze-result-contract-C9Gv2_qW.js";
5
+ import "./analyze-result-contract-BUgK3759.js";
6
6
  import * as I from "react";
7
7
  import or, { useState as w, useMemo as K, useEffect as Be, useRef as zt, useLayoutEffect as Wn, useCallback as Jn } from "react";
8
8
  import "./index-CJdxSyQq.js";
9
9
  import { createPortal as Yn } from "react-dom";
10
- import { O as Xn, c as Zn, u as ea, A as ta, a as ra, M as na, f as aa, V as sa, P as oa, N as ia, U as da } from "./dashboard-briefing-launcher-cgPKz1yX.js";
10
+ import { O as Xn, c as Zn, u as ea, A as ta, a as ra, M as na, f as aa, V as sa, P as oa, N as ia, U as da } from "./dashboard-briefing-launcher-BpwjeJsQ.js";
11
11
  import { S as ca, C as la } from "./search-BHsQIWBV.js";
12
12
  import { d as ir } from "./index-DFOb_6HB.js";
13
- import { C as ua } from "./calendar-preferences-dialog-49fcEPXS.js";
13
+ import { C as ua } from "./calendar-preferences-dialog-i3-jBIYS.js";
14
14
  import { u as ma } from "./use-debounced-dirty-check-BwAbnX_5.js";
15
15
  import { s as Ze } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
16
16
  import { S as qt } from "./save-DgMfP0j8.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react"),b=require("./x-B6ghREd2.js"),s=require("./switch-B79Hn4Qh.js");require("./analyze-result-contract-Zgg-Bbpj.js");require("./index-DXCBPLDu.js");require("./index-DRlMUglg.js");require("react-dom");function S(){const t=s.useDashboardStore(e=>e.dashboard),c=s.useDashboardStore(e=>e.actions.setDashboard),u=s.useDashboardStore(e=>e.showDashboardJSON),h=s.useDashboardStore(e=>e.actions.setShowDashboardJSON),r=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,i]=o.useState(r),n=o.useRef(r);return o.useEffect(()=>{r!==n.current&&(i(r),n.current=r)},[r]),a.jsxs("div",{className:s.cn("relative p-2",{hidden:!u}),children:[a.jsxs(s.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[a.jsx(b.X,{className:"mr-2 h-4 w-4"}),"Close"]}),a.jsx("div",{className:"h-[550px] overflow-hidden",children:a.jsx(s.CodeEditor,{value:l,onValueChange:e=>{i(e);try{const d=JSON.parse(e);n.current=JSON.stringify(d,null,2),c(d)}catch{}},language:"json"})})]})}exports.default=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react"),b=require("./x-B6ghREd2.js"),s=require("./switch-D2oOmorN.js");require("./analyze-result-contract-S8u7CcPL.js");require("./index-BepF6hoa.js");require("./index-DRlMUglg.js");require("react-dom");function S(){const t=s.useDashboardStore(e=>e.dashboard),c=s.useDashboardStore(e=>e.actions.setDashboard),u=s.useDashboardStore(e=>e.showDashboardJSON),h=s.useDashboardStore(e=>e.actions.setShowDashboardJSON),r=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,i]=o.useState(r),n=o.useRef(r);return o.useEffect(()=>{r!==n.current&&(i(r),n.current=r)},[r]),a.jsxs("div",{className:s.cn("relative p-2",{hidden:!u}),children:[a.jsxs(s.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[a.jsx(b.X,{className:"mr-2 h-4 w-4"}),"Close"]}),a.jsx("div",{className:"h-[550px] overflow-hidden",children:a.jsx(s.CodeEditor,{value:l,onValueChange:e=>{i(e);try{const d=JSON.parse(e);n.current=JSON.stringify(d,null,2),c(d)}catch{}},language:"json"})})]})}exports.default=S;
@@ -1,9 +1,9 @@
1
1
  import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
2
  import { useMemo as m, useState as f, useRef as b, useEffect as p } from "react";
3
3
  import { X as S } from "./x-CXDkqdur.js";
4
- import { u as o, c as N, B as D, C as J } from "./switch-BXQAlSuW.js";
5
- import "./analyze-result-contract-C9Gv2_qW.js";
6
- import "./index-CQmKDEbe.js";
4
+ import { u as o, c as N, B as D, C as J } from "./switch-qUw8u-gU.js";
5
+ import "./analyze-result-contract-BUgK3759.js";
6
+ import "./index-Drz04wqE.js";
7
7
  import "./index-CJdxSyQq.js";
8
8
  import "react-dom";
9
9
  function j() {
@@ -1,12 +1,12 @@
1
1
  import { jsx as e, jsxs as a, Fragment as De } from "react/jsx-runtime";
2
2
  import * as Sc from "react";
3
3
  import ea, { useState as K, useEffect as Se, useRef as Me, useCallback as Ee, useMemo as de, useContext as wr, Suspense as Tc } from "react";
4
- import { cP as Ei, b as Aa, c as Oa, d as Ma, e as Fa, f as Ya, o as hs, aQ as kt, aV as wt, cQ as Ai, cR as is, p as Ze, cS as Oi, cC as os, ay as In, ar as vt, bH as Sr, aw as nn, aW as qn, aR as Nt, cT as ps, cG as Tr, cU as kc, cV as Mi, cW as Dc, aC as Ns, cX as Ic, cY as Ec, cZ as mr, c_ as cs, u as xa, z as Fi, c$ as Ac, d0 as Oc, d1 as Ri, d2 as Li, d3 as Mc, d4 as Fc, d5 as Rc, aK as Va, aL as ba, aM as ya, aN as jn, aO as ta, aP as Qa, d6 as hr, bz as Sn, d7 as Pi, af as na, ag as ft, d8 as Lc, d9 as Vi, c5 as ma, cH as Bi, da as kr, db as _i, dc as Pc, dd as Vc, de as Bc, C as zi, df as _c, dg as zc, dh as $c, di as qc, dj as jc, dk as Kc, dl as zs, dm as Uc, dn as zl, dp as Gc, dq as $l, dr as Hc, ds as Wc, bD as sn, bE as rn, bF as ln, bG as ct, dt as En, az as $i, du as Qc, a_ as Qt, b0 as Jt, dv as Dr, be as Ir, ae as Er, dw as Jc, dx as Yc, dy as Ar, dz as Xc, dA as qi, dB as ji, dC as Ki, dD as Ht, dE as Zc, dF as ed, dG as td, dH as ad, dI as Ui, dJ as Gi, X as Hi, dK as Wi, dL as nd, dM as sd, dN as rd, dO as An, M as ld, dP as id, dQ as od, dR as ql, dS as cd, E as Cs, t as Or, dT as dd, dU as Mr, b6 as ud, dV as jl, I as gt, dW as md, dX as hd, dY as Qi, dZ as Ji, d_ as pd, d$ as Fr, e0 as Rr, e1 as Yi, e2 as Xi, e3 as Kl, e4 as Kn, e5 as fd, e6 as gd, e7 as xd, e8 as bd, e9 as yd, ea as fs, eb as vd, ec as Nd, ed as Zi, ee as eo, ef as Cd, eg as wd, bR as Sd, eh as Td, ei as to, ej as kd, ek as Dd, bS as ws, el as Ss, b7 as On, b8 as Wt, em as oa, en as Ra, eo as La, ep as ha, eq as Xa, er as Id, es as Ed, et as Ad, eu as Od, ev as Md, ew as Fd, ex as Rd, ey as Ld, ez as Ul, a$ as aa, eA as Pd, eB as Vd, eC as Bd, eD as _d, eE as ao, eF as zd, eG as $d, eH as qd, eI as jd, eJ as Kd, eK as pr, eL as Ud, eM as Gd, eN as fr, eO as Hd, eP as Wd, eQ as Qd, eR as Jd, eS as Gl, ax as gr, at as pa, ah as Yd, ai as Xd, ak as Zd, al as eu, am as tu, an as au, ao as nu, ap as su, aq as ru, bs as lu, eT as iu, eU as Za, eV as en, eW as tn, bI as Lr, bJ as ou, av as cu, eX as du, eY as uu, eZ as mu, e_ as Ts, e$ as st, f0 as rt, f1 as lt, cE as hu, cF as pu, f2 as no, f3 as so, cD as fu, f4 as gu, f5 as xu, f6 as bu, f7 as yu, f8 as vu, f9 as Nu, fa as Cu, fb as wu, fc as Su, fd as Tu, fe as ku, ff as Du, fg as Ta, fh as vn, fi as Ja, fj as Iu, fk as Hl, fl as Eu, fm as Au, fn as $s, fo as Wl, fp as Ou, fq as Mu, fr as Fu, fs as Ru, ft as Lu, R as Pr, g as Mn, fu as qs, fv as ro, aA as Pu, fw as gs, fx as Vu, fy as lo, fz as Bu, fA as io, co as _u, fB as zu, a4 as $u, fC as ns, fD as qu, fE as Ql, fF as ju, fG as Ku, fH as Jl, fI as Uu, fJ as Gu, fK as Hu, fL as Wu, fM as Qu, aj as oo, fN as Ju, fO as Yu, fP as Xu, fQ as Zu, fR as em, fS as tm, fT as am, fU as nm, fV as sm, fW as co, fX as rm, fY as ks, c6 as Ds, fZ as uo, f_ as lm, f$ as im, g0 as mo, g1 as om, g2 as cm, g3 as Is, g4 as js, g5 as dm, g6 as um, g7 as mm, g8 as hm, g9 as pm, ga as Yl, gb as an, gc as ho, gd as fm, bU as gm, ge as po, gf as fo, gg as ds, gh as go, gi as xo, gj as Xl, gk as xm, gl as bm, gm as us, gn as ym, go as Vr, gp as vm, gq as xs, h as Fn, i as Rn, k as Ln, j as Pn, l as Vn, m as Bn, gr as Nm, gs as _n, gt as ca, gu as xr, gv as br, gw as zn, gx as bo, gy as Cm, gz as Ks, gA as Us, gB as wm, gC as Gs, gD as Sm, gE as Zl, gF as ei, cJ as Tm, gG as km, cK as Dm, cM as Im, cN as Em, y as Am, gH as Om, gI as Mm, gJ as Fm, bK as Rm, bL as Lm, bM as Pm, br as Es, cA as As, gK as ti, gL as yo, cc as Hs, gM as Vm, gN as Bm, gO as _m, F as zm, aT as $m, gP as qm, gQ as jm, aU as Km } from "./index-CQmKDEbe.js";
4
+ import { cP as Ei, b as Aa, c as Oa, d as Ma, e as Fa, f as Ya, o as hs, aQ as kt, aV as wt, cQ as Ai, cR as is, p as Ze, cS as Oi, cC as os, ay as In, ar as vt, bH as Sr, aw as nn, aW as qn, aR as Nt, cT as ps, cG as Tr, cU as kc, cV as Mi, cW as Dc, aC as Ns, cX as Ic, cY as Ec, cZ as mr, c_ as cs, u as xa, z as Fi, c$ as Ac, d0 as Oc, d1 as Ri, d2 as Li, d3 as Mc, d4 as Fc, d5 as Rc, aK as Va, aL as ba, aM as ya, aN as jn, aO as ta, aP as Qa, d6 as hr, bz as Sn, d7 as Pi, af as na, ag as ft, d8 as Lc, d9 as Vi, c5 as ma, cH as Bi, da as kr, db as _i, dc as Pc, dd as Vc, de as Bc, C as zi, df as _c, dg as zc, dh as $c, di as qc, dj as jc, dk as Kc, dl as zs, dm as Uc, dn as zl, dp as Gc, dq as $l, dr as Hc, ds as Wc, bD as sn, bE as rn, bF as ln, bG as ct, dt as En, az as $i, du as Qc, a_ as Qt, b0 as Jt, dv as Dr, be as Ir, ae as Er, dw as Jc, dx as Yc, dy as Ar, dz as Xc, dA as qi, dB as ji, dC as Ki, dD as Ht, dE as Zc, dF as ed, dG as td, dH as ad, dI as Ui, dJ as Gi, X as Hi, dK as Wi, dL as nd, dM as sd, dN as rd, dO as An, M as ld, dP as id, dQ as od, dR as ql, dS as cd, E as Cs, t as Or, dT as dd, dU as Mr, b6 as ud, dV as jl, I as gt, dW as md, dX as hd, dY as Qi, dZ as Ji, d_ as pd, d$ as Fr, e0 as Rr, e1 as Yi, e2 as Xi, e3 as Kl, e4 as Kn, e5 as fd, e6 as gd, e7 as xd, e8 as bd, e9 as yd, ea as fs, eb as vd, ec as Nd, ed as Zi, ee as eo, ef as Cd, eg as wd, bR as Sd, eh as Td, ei as to, ej as kd, ek as Dd, bS as ws, el as Ss, b7 as On, b8 as Wt, em as oa, en as Ra, eo as La, ep as ha, eq as Xa, er as Id, es as Ed, et as Ad, eu as Od, ev as Md, ew as Fd, ex as Rd, ey as Ld, ez as Ul, a$ as aa, eA as Pd, eB as Vd, eC as Bd, eD as _d, eE as ao, eF as zd, eG as $d, eH as qd, eI as jd, eJ as Kd, eK as pr, eL as Ud, eM as Gd, eN as fr, eO as Hd, eP as Wd, eQ as Qd, eR as Jd, eS as Gl, ax as gr, at as pa, ah as Yd, ai as Xd, ak as Zd, al as eu, am as tu, an as au, ao as nu, ap as su, aq as ru, bs as lu, eT as iu, eU as Za, eV as en, eW as tn, bI as Lr, bJ as ou, av as cu, eX as du, eY as uu, eZ as mu, e_ as Ts, e$ as st, f0 as rt, f1 as lt, cE as hu, cF as pu, f2 as no, f3 as so, cD as fu, f4 as gu, f5 as xu, f6 as bu, f7 as yu, f8 as vu, f9 as Nu, fa as Cu, fb as wu, fc as Su, fd as Tu, fe as ku, ff as Du, fg as Ta, fh as vn, fi as Ja, fj as Iu, fk as Hl, fl as Eu, fm as Au, fn as $s, fo as Wl, fp as Ou, fq as Mu, fr as Fu, fs as Ru, ft as Lu, R as Pr, g as Mn, fu as qs, fv as ro, aA as Pu, fw as gs, fx as Vu, fy as lo, fz as Bu, fA as io, co as _u, fB as zu, a4 as $u, fC as ns, fD as qu, fE as Ql, fF as ju, fG as Ku, fH as Jl, fI as Uu, fJ as Gu, fK as Hu, fL as Wu, fM as Qu, aj as oo, fN as Ju, fO as Yu, fP as Xu, fQ as Zu, fR as em, fS as tm, fT as am, fU as nm, fV as sm, fW as co, fX as rm, fY as ks, c6 as Ds, fZ as uo, f_ as lm, f$ as im, g0 as mo, g1 as om, g2 as cm, g3 as Is, g4 as js, g5 as dm, g6 as um, g7 as mm, g8 as hm, g9 as pm, ga as Yl, gb as an, gc as ho, gd as fm, bU as gm, ge as po, gf as fo, gg as ds, gh as go, gi as xo, gj as Xl, gk as xm, gl as bm, gm as us, gn as ym, go as Vr, gp as vm, gq as xs, h as Fn, i as Rn, k as Ln, j as Pn, l as Vn, m as Bn, gr as Nm, gs as _n, gt as ca, gu as xr, gv as br, gw as zn, gx as bo, gy as Cm, gz as Ks, gA as Us, gB as wm, gC as Gs, gD as Sm, gE as Zl, gF as ei, cJ as Tm, gG as km, cK as Dm, cM as Im, cN as Em, y as Am, gH as Om, gI as Mm, gJ as Fm, bK as Rm, bL as Lm, bM as Pm, br as Es, cA as As, gK as ti, gL as yo, cc as Hs, gM as Vm, gN as Bm, gO as _m, F as zm, aT as $m, gP as qm, gQ as jm, aU as Km } from "./index-Drz04wqE.js";
5
5
  import { c as $e, C as At, X as et } from "./x-CXDkqdur.js";
6
- import { F as Ne, B as Z, O as bs, I as Un, c as J, aM as Um, L as $, _ as ae, $ as ne, a0 as se, a1 as re, a2 as j, E as O, Y as Dt, Q as Vt, V as It, W as Et, P as Ot, a as Rt, b as Mt, C as fa, aN as Gm, aE as Tn, aO as Br, aP as vo, aB as _r, az as Hm, Z as Fe, aQ as Wm, e as ga, u as Ie, d as va, aR as zr, aS as Gn, X as Xt, A as No, T as Hn, G as Wn, H as Yt, J as Ia, N as Os, S as Pa, h as Qm, aF as Ea, aT as Jm, aU as Ym, aV as Co, ae as Xm, aH as Zm, aW as eh, aX as th, aY as ai, aZ as ah, a_ as nh, a$ as sh, b0 as rh, aL as lh, b1 as ih, b2 as ni, b3 as oh, b4 as si, R as yr, b5 as on, b6 as ch, a3 as Je, b7 as dh, b8 as $r, b9 as $n, ba as ys, bb as da, bc as ss, bd as ri, be as uh, bf as Pt, bg as mh, M as wo, bh as nt, bi as So, s as li, bj as hh, bk as ph, bl as fh, bm as gh, bn as xh, bo as bh, bp as yh, bq as vh, br as Nh, bs as Ch, bt as wh, bu as Sh, bv as ii, bw as Th, bx as kh, by as Dh, K as Ms } from "./switch-BXQAlSuW.js";
7
- import "./analyze-result-contract-C9Gv2_qW.js";
6
+ import { F as Ne, B as Z, O as bs, I as Un, c as J, aM as Um, L as $, _ as ae, $ as ne, a0 as se, a1 as re, a2 as j, E as O, Y as Dt, Q as Vt, V as It, W as Et, P as Ot, a as Rt, b as Mt, C as fa, aN as Gm, aE as Tn, aO as Br, aP as vo, aB as _r, az as Hm, Z as Fe, aQ as Wm, e as ga, u as Ie, d as va, aR as zr, aS as Gn, X as Xt, A as No, T as Hn, G as Wn, H as Yt, J as Ia, N as Os, S as Pa, h as Qm, aF as Ea, aT as Jm, aU as Ym, aV as Co, ae as Xm, aH as Zm, aW as eh, aX as th, aY as ai, aZ as ah, a_ as nh, a$ as sh, b0 as rh, aL as lh, b1 as ih, b2 as ni, b3 as oh, b4 as si, R as yr, b5 as on, b6 as ch, a3 as Je, b7 as dh, b8 as $r, b9 as $n, ba as ys, bb as da, bc as ss, bd as ri, be as uh, bf as Pt, bg as mh, M as wo, bh as nt, bi as So, s as li, bj as hh, bk as ph, bl as fh, bm as gh, bn as xh, bo as bh, bp as yh, bq as vh, br as Nh, bs as Ch, bt as wh, bu as Sh, bv as ii, bw as Th, bx as kh, by as Dh, K as Ms } from "./switch-qUw8u-gU.js";
7
+ import "./analyze-result-contract-BUgK3759.js";
8
8
  import { C as $t, E as vr, S as Fs, M as Ih, a as Eh } from "./search-BHsQIWBV.js";
9
- import { f as Ah, g as xt, r as To, h as Qn, S as Oh, i as ko, V as Do, e as Mh, C as Fh, R as Rs } from "./use-create-flow-overlay-state-Bw5LRkf9.js";
9
+ import { f as Ah, g as xt, r as To, h as Qn, S as Oh, i as ko, V as Do, e as Mh, C as Fh, R as Rs } from "./use-create-flow-overlay-state-CFJIHt5D.js";
10
10
  import { createPortal as Rh } from "react-dom";
11
11
  import "./index-CJdxSyQq.js";
12
12
  import { P as Lh } from "./palette-Cp1hqZtm.js";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("react"),n=require("./index-DXCBPLDu.js"),re=require("./x-B6ghREd2.js"),t=require("./switch-B79Hn4Qh.js");require("./analyze-result-contract-Zgg-Bbpj.js");const ze=require("./search-DNCejM7Z.js"),Ne=require("./use-create-flow-overlay-state-7MFN3PWX.js"),Ua=require("react-dom");require("./index-DRlMUglg.js");const Ga=require("./palette-C4KTXOug.js"),Ha=require("./common-types-C73-Ud1-.js");function Qa(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>s[r]})}}return a.default=s,Object.freeze(a)}const Wa=Qa(v);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("react"),n=require("./index-BepF6hoa.js"),re=require("./x-B6ghREd2.js"),t=require("./switch-D2oOmorN.js");require("./analyze-result-contract-S8u7CcPL.js");const ze=require("./search-DNCejM7Z.js"),Ne=require("./use-create-flow-overlay-state-DrkYiyQz.js"),Ua=require("react-dom");require("./index-DRlMUglg.js");const Ga=require("./palette-C4KTXOug.js"),Ha=require("./common-types-C73-Ud1-.js");function Qa(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>s[r]})}}return a.default=s,Object.freeze(a)}const Wa=Qa(v);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.