react-semaphor 0.1.399 → 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 (48) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +1 -1
  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-CUO5QmqV.js → analyze-result-contract-BUgK3759.js} +675 -639
  6. package/dist/chunks/analyze-result-contract-S8u7CcPL.js +1 -0
  7. package/dist/chunks/{calendar-preferences-dialog-B3fnFtJt.js → calendar-preferences-dialog-Ci3rHHgA.js} +1 -1
  8. package/dist/chunks/{calendar-preferences-dialog-9SvYDLp6.js → calendar-preferences-dialog-i3-jBIYS.js} +3 -3
  9. package/dist/chunks/{dashboard-briefing-launcher-APVyc9al.js → dashboard-briefing-launcher-BpwjeJsQ.js} +4 -4
  10. package/dist/chunks/{dashboard-briefing-launcher-D3R4R7ww.js → dashboard-briefing-launcher-DiEpMS9E.js} +1 -1
  11. package/dist/chunks/{dashboard-controls-v7jslCXR.js → dashboard-controls-BaUUrvSI.js} +1 -1
  12. package/dist/chunks/{dashboard-controls-CHDQlMZ9.js → dashboard-controls-Bkjpgr3d.js} +5 -5
  13. package/dist/chunks/{dashboard-json-L1Qo5xcX.js → dashboard-json-CxNyExRm.js} +1 -1
  14. package/dist/chunks/{dashboard-json-DF_syvRu.js → dashboard-json-DvULhhN2.js} +3 -3
  15. package/dist/chunks/{edit-dashboard-visual-DwfIWUe-.js → edit-dashboard-visual-DBrsgEtL.js} +4 -4
  16. package/dist/chunks/{edit-dashboard-visual-qdruQruO.js → edit-dashboard-visual-DJRPiKdY.js} +1 -1
  17. package/dist/chunks/{index-DH7hOGQl.js → index-BepF6hoa.js} +2 -2
  18. package/dist/chunks/{index-BdVymLVq.js → index-Drz04wqE.js} +5 -5
  19. package/dist/chunks/{switch-CYG3dY8r.js → switch-D2oOmorN.js} +1 -1
  20. package/dist/chunks/{switch-BiU6-YSY.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-CwUkhLBL.js → use-create-flow-overlay-state-CFJIHt5D.js} +3 -3
  24. package/dist/chunks/{use-create-flow-overlay-state-qe7DHQKr.js → use-create-flow-overlay-state-DrkYiyQz.js} +1 -1
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.cjs +1 -1
  28. package/dist/dashboard-authoring/index.js +1 -1
  29. package/dist/data-app-builder/index.cjs +1 -1
  30. package/dist/data-app-builder/index.js +2 -2
  31. package/dist/data-app-codegen/index.cjs +1 -0
  32. package/dist/data-app-codegen/index.js +22 -0
  33. package/dist/data-app-codegen-node/index.cjs +462 -0
  34. package/dist/data-app-codegen-node/index.js +1424 -0
  35. package/dist/data-app-sdk/index.cjs +1 -1
  36. package/dist/data-app-sdk/index.js +1 -1
  37. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  38. package/dist/data-app-sdk-adapters/index.js +1 -1
  39. package/dist/data-app-sdk-validation/index.cjs +1 -1
  40. package/dist/data-app-sdk-validation/index.js +1 -1
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.js +7 -7
  43. package/dist/surfboard/index.cjs +1 -1
  44. package/dist/surfboard/index.js +2 -2
  45. package/dist/types/data-app-codegen-node.d.ts +1165 -0
  46. package/dist/types/data-app-codegen.d.ts +1137 -0
  47. package/package.json +9 -1
  48. package/dist/chunks/analyze-result-contract-OqFtOCpZ.js +0 -1
@@ -19,9 +19,9 @@ import * as J from "react";
19
19
  import ae, { createContext as Sr, useContext as Fn, useState as ee, useMemo as Q, useEffect as we, useCallback as pe, useRef as Pe, forwardRef as Ii, isValidElement as sg, memo as ds, useLayoutEffect as la, Component as LY, createElement as Lo, Suspense as rc, cloneElement as kO, Fragment as Qx, useId as Ic, useSyncExternalStore as _S, useTransition as Ppe, useReducer as Fpe, Children as Ope, startTransition as $Y, useImperativeHandle as zY, lazy as Vk } from "react";
20
20
  import * as PA from "react-dom";
21
21
  import Jx, { flushSync as au, createPortal as Bm, unstable_batchedUpdates as T1 } from "react-dom";
22
- import { bz as su, bA as ew, bB as FA, A as Sn, bC as Bk, bD as VY, u as te, bE as Lpe, bh as Gn, b0 as Pa, bF as Yz, bG as $pe, bH as zpe, bI as Vpe, aC as Bpe, bJ as jpe, p as Is, c as X, bK as Tu, bL as _l, bM as en, bN as lo, bO as IO, bP as Hs, bQ as TO, bR as $n, bS as jk, bT as Hk, bU as BY, bV as jY, bW as HY, bX as UY, bY as EO, bZ as DO, b_ as qY, b$ as WY, c0 as YY, c1 as Hpe, ax as MO, c2 as Uk, c3 as AO, c4 as ca, c5 as GY, c6 as kl, c7 as bc, d as ur, B as Ae, e as Gr, c8 as RO, bv as Ou, c9 as tw, aA as qk, aB as si, ca as Qr, cb as Upe, N as Ja, az as Wd, cc as bN, P as dr, a as vr, b as xr, aJ as qpe, cd as Wpe, aK as Ype, ce as nw, L as ct, Z as Bt, aF as go, be as Gpe, cf as Kpe, cg as KY, ch as Zpe, ci as yN, cj as OA, ck as bb, cl as yb, cm as Gz, cn as Xpe, co as ZY, cp as XY, cq as Qpe, cr as Jpe, cs as ege, ct as tge, aS as Eu, aG as rw, bq as PO, E as ot, aL as or, av as FO, cu as LA, bg as QY, bo as Rs, bp as al, cv as nge, cw as rge, F as yo, cx as JY, cy as vN, cz as eG, cA as tG, aD as Wk, cB as Yk, cC as OO, cD as LO, bs as Lu, cE as nG, br as $u, cF as oge, cG as $O, bt as zO, cH as ige, bc as FE, aM as es, cI as bh, cJ as im, w as age, O as Ga, _ as qt, $ as Wt, a0 as Gt, a1 as Yt, a2 as Ye, cK as rG, cL as sge, aR as jm, cM as lge, cN as Di, bb as qo, b9 as cge, ba as uge, S as Lg, cO as VO, cP as oG, cQ as iG, cR as aG, cS as xN, Q as bo, V as kr, W as Ir, X as io, Y as qr, cT as dge, b1 as sG, cU as lG, cV as fge, cW as hge, cX as mge, T as zu, G as Vu, H as Ci, J as Od, I as Du, bx as xd, by as lu, cY as Y0, cZ as kS, c_ as IS, c$ as G0, d0 as Xf, d1 as Qf, d2 as Js, d3 as TS, d4 as ES, d5 as K0, d6 as $A, d7 as zA, d8 as VA, d9 as cG, l as yl, k as Yd, da as pge, db as m0, dc as gge, dd as uG, de as OE, df as LE, dg as bge, dh as yge, di as vge, dj as xge, dk as wge, dl as Cge, dm as BO, aI as Sge, dn as Nge, dp as _ge, dq as dG, dr as fG, C as Gk, aT as hG, ds as kge, dt as Ige, a$ as mG, du as Tge, ay as Ege, dv as Dge, dw as pG, b2 as gG, dx as Mge, b5 as wd, dy as Mv, b6 as jO, dz as bG, dA as Sy, bf as Kz, dB as yG, dC as Age, dD as Rge, dE as Pge, dF as vG, dG as Zz, dH as xG, dI as ld, dJ as wG, dK as CG, dL as HO, a3 as yc, dM as Fge, dN as Oge, bk as Kk, aE as Z0, aO as UO, K as qO, y as Lge, dO as $ge, dP as zge, M as BA, dQ as Vge, dR as Xz, dS as Qz, dT as SG, dU as Bge, dV as jge, dW as Hge, dX as Uge, dY as qge, dZ as Wge, d_ as Yge, d$ as Gge, e0 as Kge, t as jA, o as NG, n as _G, j as Zge, h as Jz, e1 as HA, e2 as Xge, e3 as Qge, e4 as Jge, e5 as ebe, e6 as tbe, e7 as Ld, e8 as WO, e9 as Xl, bu as nbe, ea as rbe, eb as kG, ec as obe, aj as YO, ed as GO, ae as Zk, af as ibe, ah as IG, ee as abe, ai as $E, ef as sbe, eg as lbe, eh as cbe, aW as ube, aX as dbe, ap as fbe, a7 as TG, ei as Pl, aa as hbe, ac as EG, ab as zE, ao as DG, ak as MG, aq as UA, at as e6, as as mbe, ad as AG, ej as qA, ek as Cd, R as t6, el as RG, em as E1, en as pbe, eo as KO, ep as WA, eq as gbe, er as Av, aP as bbe, es as ybe, a5 as vbe, aw as xbe, U as ZO, et as wbe, bl as vb, bm as PG, bn as FG, eu as OG, ev as XO, ew as QO, bj as LG, b3 as Cbe, ex as Sbe, ey as Nbe, ez as _be, eA as kbe, eB as Ibe, eC as $G } from "./switch-BiU6-YSY.js";
22
+ import { bz as su, bA as ew, bB as FA, A as Sn, bC as Bk, bD as VY, u as te, bE as Lpe, bh as Gn, b0 as Pa, bF as Yz, bG as $pe, bH as zpe, bI as Vpe, aC as Bpe, bJ as jpe, p as Is, c as X, bK as Tu, bL as _l, bM as en, bN as lo, bO as IO, bP as Hs, bQ as TO, bR as $n, bS as jk, bT as Hk, bU as BY, bV as jY, bW as HY, bX as UY, bY as EO, bZ as DO, b_ as qY, b$ as WY, c0 as YY, c1 as Hpe, ax as MO, c2 as Uk, c3 as AO, c4 as ca, c5 as GY, c6 as kl, c7 as bc, d as ur, B as Ae, e as Gr, c8 as RO, bv as Ou, c9 as tw, aA as qk, aB as si, ca as Qr, cb as Upe, N as Ja, az as Wd, cc as bN, P as dr, a as vr, b as xr, aJ as qpe, cd as Wpe, aK as Ype, ce as nw, L as ct, Z as Bt, aF as go, be as Gpe, cf as Kpe, cg as KY, ch as Zpe, ci as yN, cj as OA, ck as bb, cl as yb, cm as Gz, cn as Xpe, co as ZY, cp as XY, cq as Qpe, cr as Jpe, cs as ege, ct as tge, aS as Eu, aG as rw, bq as PO, E as ot, aL as or, av as FO, cu as LA, bg as QY, bo as Rs, bp as al, cv as nge, cw as rge, F as yo, cx as JY, cy as vN, cz as eG, cA as tG, aD as Wk, cB as Yk, cC as OO, cD as LO, bs as Lu, cE as nG, br as $u, cF as oge, cG as $O, bt as zO, cH as ige, bc as FE, aM as es, cI as bh, cJ as im, w as age, O as Ga, _ as qt, $ as Wt, a0 as Gt, a1 as Yt, a2 as Ye, cK as rG, cL as sge, aR as jm, cM as lge, cN as Di, bb as qo, b9 as cge, ba as uge, S as Lg, cO as VO, cP as oG, cQ as iG, cR as aG, cS as xN, Q as bo, V as kr, W as Ir, X as io, Y as qr, cT as dge, b1 as sG, cU as lG, cV as fge, cW as hge, cX as mge, T as zu, G as Vu, H as Ci, J as Od, I as Du, bx as xd, by as lu, cY as Y0, cZ as kS, c_ as IS, c$ as G0, d0 as Xf, d1 as Qf, d2 as Js, d3 as TS, d4 as ES, d5 as K0, d6 as $A, d7 as zA, d8 as VA, d9 as cG, l as yl, k as Yd, da as pge, db as m0, dc as gge, dd as uG, de as OE, df as LE, dg as bge, dh as yge, di as vge, dj as xge, dk as wge, dl as Cge, dm as BO, aI as Sge, dn as Nge, dp as _ge, dq as dG, dr as fG, C as Gk, aT as hG, ds as kge, dt as Ige, a$ as mG, du as Tge, ay as Ege, dv as Dge, dw as pG, b2 as gG, dx as Mge, b5 as wd, dy as Mv, b6 as jO, dz as bG, dA as Sy, bf as Kz, dB as yG, dC as Age, dD as Rge, dE as Pge, dF as vG, dG as Zz, dH as xG, dI as ld, dJ as wG, dK as CG, dL as HO, a3 as yc, dM as Fge, dN as Oge, bk as Kk, aE as Z0, aO as UO, K as qO, y as Lge, dO as $ge, dP as zge, M as BA, dQ as Vge, dR as Xz, dS as Qz, dT as SG, dU as Bge, dV as jge, dW as Hge, dX as Uge, dY as qge, dZ as Wge, d_ as Yge, d$ as Gge, e0 as Kge, t as jA, o as NG, n as _G, j as Zge, h as Jz, e1 as HA, e2 as Xge, e3 as Qge, e4 as Jge, e5 as ebe, e6 as tbe, e7 as Ld, e8 as WO, e9 as Xl, bu as nbe, ea as rbe, eb as kG, ec as obe, aj as YO, ed as GO, ae as Zk, af as ibe, ah as IG, ee as abe, ai as $E, ef as sbe, eg as lbe, eh as cbe, aW as ube, aX as dbe, ap as fbe, a7 as TG, ei as Pl, aa as hbe, ac as EG, ab as zE, ao as DG, ak as MG, aq as UA, at as e6, as as mbe, ad as AG, ej as qA, ek as Cd, R as t6, el as RG, em as E1, en as pbe, eo as KO, ep as WA, eq as gbe, er as Av, aP as bbe, es as ybe, a5 as vbe, aw as xbe, U as ZO, et as wbe, bl as vb, bm as PG, bn as FG, eu as OG, ev as XO, ew as QO, bj as LG, b3 as Cbe, ex as Sbe, ey as Nbe, ez as _be, eA as kbe, eB as Ibe, eC as $G } from "./switch-qUw8u-gU.js";
23
23
  import { j as Tbe, c as it, X as dn, C as fa } from "./x-CXDkqdur.js";
24
- import "./analyze-result-contract-CUO5QmqV.js";
24
+ import "./analyze-result-contract-BUgK3759.js";
25
25
  import { c as ow, d as Ebe, A as Dbe, r as zG } from "./index-CJdxSyQq.js";
26
26
  import { createRoot as Mbe } from "react-dom/client";
27
27
  import { S as qi, C as wr, E as Xk, a as JO, M as VG } from "./search-BHsQIWBV.js";
@@ -142600,9 +142600,9 @@ function p_t() {
142600
142600
  }
142601
142601
  );
142602
142602
  }
142603
- const g_t = Vk(() => import("./dashboard-controls-CHDQlMZ9.js")), b_t = Vk(
142604
- () => import("./edit-dashboard-visual-DwfIWUe-.js")
142605
- ), y_t = Vk(() => import("./dashboard-json-DF_syvRu.js"));
142603
+ const g_t = Vk(() => import("./dashboard-controls-Bkjpgr3d.js")), b_t = Vk(
142604
+ () => import("./edit-dashboard-visual-DBrsgEtL.js")
142605
+ ), y_t = Vk(() => import("./dashboard-json-DvULhhN2.js"));
142606
142606
  function HIt({
142607
142607
  showControls: e = !1,
142608
142608
  showFooter: t = !0,
@@ -1,4 +1,4 @@
1
- "use strict";const be=require("./x-B6ghREd2.js"),x=require("react/jsx-runtime"),le=require("react");require("./analyze-result-contract-OqFtOCpZ.js");const ml=require("react-dom"),ut=require("./index-DRlMUglg.js");require("react-dom/client");const _i=require("./catalog-field-grounding-Bnx-3tE0.js"),pp=require("../layouts/index.cjs"),we=require("./index-D7KJindZ.js"),xn=require("./common-types-C73-Ud1-.js");function hl(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const f=hl(le),Bn=hl(ml),Ya=e=>{let r;const t=new Set,n=(c,u)=>{const d=typeof c=="function"?c(r):c;if(!Object.is(d,r)){const p=r;r=u??(typeof d!="object"||d===null)?d:Object.assign({},r,d),t.forEach(h=>h(r,p))}},o=()=>r,s={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=r=e(n,o,s);return s},mp=e=>e?Ya(e):Ya,hp=e=>e;function gp(e,r=hp){const t=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>r(e.getState()),[e,r]),le.useCallback(()=>r(e.getInitialState()),[e,r]));return le.useDebugValue(t),t}const Ka=e=>{const r=mp(e),t=n=>gp(r,n);return Object.assign(t,r),t},_t=e=>e?Ka(e):Ka;var gl=Symbol.for("immer-nothing"),Xa=Symbol.for("immer-draftable"),Q=Symbol.for("immer-state"),yp=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ye(e,...r){if(process.env.NODE_ENV!=="production"){const t=yp[e],n=typeof t=="function"?t.apply(null,r):t;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fr=Object.getPrototypeOf;function Qt(e){return!!e&&!!e[Q]}function Ze(e){var r;return e?yl(e)||Array.isArray(e)||!!e[Xa]||!!((r=e.constructor)!=null&&r[Xa])||Br(e)||$n(e):!1}var bp=Object.prototype.constructor.toString(),Za=new WeakMap;function yl(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(t===Object)return!0;if(typeof t!="function")return!1;let n=Za.get(t);return n===void 0&&(n=Function.toString.call(t),Za.set(t,n)),n===bp}function Dr(e,r,t=!0){jn(e)===0?(t?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{r(o,e[o],e)}):e.forEach((n,o)=>r(o,n,e))}function jn(e){const r=e[Q];return r?r.type_:Array.isArray(e)?1:Br(e)?2:$n(e)?3:0}function ei(e,r){return jn(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function bl(e,r,t){const n=jn(e);n===2?e.set(r,t):n===3?e.add(t):e[r]=t}function vp(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function Br(e){return e instanceof Map}function $n(e){return e instanceof Set}function ue(e){return e.copy_||e.base_}function ti(e,r){if(Br(e))return new Map(e);if($n(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=yl(e);if(r===!0||r==="class_only"&&!t){const n=Object.getOwnPropertyDescriptors(e);delete n[Q];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Fr(e),n)}else{const n=Fr(e);if(n!==null&&t)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Oi(e,r=!1){return Un(e)||Qt(e)||!Ze(e)||(jn(e)>1&&Object.defineProperties(e,{set:tn,add:tn,clear:tn,delete:tn}),Object.freeze(e),r&&Object.values(e).forEach(t=>Oi(t,!0))),e}function Cp(){ye(2)}var tn={value:Cp};function Un(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var ri={};function Tt(e){const r=ri[e];return r||ye(0,e),r}function Sp(e,r){ri[e]||(ri[e]=r)}var Rr;function wn(){return Rr}function xp(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qa(e,r){r&&(Tt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function ni(e){oi(e),e.drafts_.forEach(wp),e.drafts_=null}function oi(e){e===Rr&&(Rr=e.parent_)}function Ja(e){return Rr=xp(Rr,e)}function wp(e){const r=e[Q];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function es(e,r){r.unfinalizedDrafts_=r.drafts_.length;const t=r.drafts_[0];return e!==void 0&&e!==t?(t[Q].modified_&&(ni(r),ye(4)),Ze(e)&&(e=In(r,e),r.parent_||En(r,e)),r.patches_&&Tt("Patches").generateReplacementPatches_(t[Q].base_,e,r.patches_,r.inversePatches_)):e=In(r,t,[]),ni(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==gl?e:void 0}function In(e,r,t){if(Un(r))return r;const n=e.immer_.shouldUseStrictIteration(),o=r[Q];if(!o)return Dr(r,(i,a)=>ts(e,o,r,i,a,t),n),r;if(o.scope_!==e)return r;if(!o.modified_)return En(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let a=i,s=!1;o.type_===3&&(a=new Set(i),i.clear(),s=!0),Dr(a,(l,c)=>ts(e,o,i,l,c,t,s),n),En(e,i,!1),t&&e.patches_&&Tt("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function ts(e,r,t,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=Un(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===t&&ye(5),Qt(o)){const l=i&&r&&r.type_!==3&&!ei(r.assigned_,n)?i.concat(n):void 0,c=In(e,o,l);if(bl(t,n,c),Qt(c))e.canAutoFreeze_=!1;else return}else a&&t.add(o);if(Ze(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[n]===o&&s)return;In(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&(Br(t)?t.has(n):Object.prototype.propertyIsEnumerable.call(t,n))&&En(e,o)}}}function En(e,r,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oi(r,t)}function Ip(e,r){const t=Array.isArray(e),n={type_:t?1:0,scope_:r?r.scope_:wn(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Mi;t&&(o=[n],i=Pr);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var Mi={get(e,r){if(r===Q)return e;const t=ue(e);if(!ei(t,r))return Ep(e,t,r);const n=t[r];return e.finalized_||!Ze(n)?n:n===Eo(e.base_,r)?(To(e),e.copy_[r]=_r(n,e)):n},has(e,r){return r in ue(e)},ownKeys(e){return Reflect.ownKeys(ue(e))},set(e,r,t){const n=vl(ue(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,t),!0;if(!e.modified_){const o=Eo(ue(e),r),i=o==null?void 0:o[Q];if(i&&i.base_===t)return e.copy_[r]=t,e.assigned_[r]=!1,!0;if(vp(t,o)&&(t!==void 0||ei(e.base_,r)))return!0;To(e),Ye(e)}return e.copy_[r]===t&&(t!==void 0||r in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=t,e.assigned_[r]=!0),!0},deleteProperty(e,r){return Eo(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,To(e),Ye(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const t=ue(e),n=Reflect.getOwnPropertyDescriptor(t,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:t[r]}},defineProperty(){ye(11)},getPrototypeOf(e){return Fr(e.base_)},setPrototypeOf(){ye(12)}},Pr={};Dr(Mi,(e,r)=>{Pr[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Pr.deleteProperty=function(e,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&ye(13),Pr.set.call(this,e,r,void 0)};Pr.set=function(e,r,t){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&ye(14),Mi.set.call(this,e[0],r,t,e[0])};function Eo(e,r){const t=e[Q];return(t?ue(t):e)[r]}function Ep(e,r,t){var o;const n=vl(r,t);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function vl(e,r){if(!(r in e))return;let t=Fr(e);for(;t;){const n=Object.getOwnPropertyDescriptor(t,r);if(n)return n;t=Fr(t)}}function Ye(e){e.modified_||(e.modified_=!0,e.parent_&&Ye(e.parent_))}function To(e){e.copy_||(e.copy_=ti(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Tp=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(r,t,n)=>{if(typeof r=="function"&&typeof t!="function"){const i=t;t=r;const a=this;return function(l=i,...c){return a.produce(l,u=>t.call(this,u,...c))}}typeof t!="function"&&ye(6),n!==void 0&&typeof n!="function"&&ye(7);let o;if(Ze(r)){const i=Ja(this),a=_r(r,void 0);let s=!0;try{o=t(a),s=!1}finally{s?ni(i):oi(i)}return Qa(i,n),es(o,i)}else if(!r||typeof r!="object"){if(o=t(r),o===void 0&&(o=r),o===gl&&(o=void 0),this.autoFreeze_&&Oi(o,!0),n){const i=[],a=[];Tt("Patches").generateReplacementPatches_(r,o,i,a),n(i,a)}return o}else ye(1,r)},this.produceWithPatches=(r,t)=>{if(typeof r=="function")return(a,...s)=>this.produceWithPatches(a,l=>r(l,...s));let n,o;return[this.produce(r,t,(a,s)=>{n=a,o=s}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ze(e)||ye(8),Qt(e)&&(e=Ap(e));const r=Ja(this),t=_r(e,void 0);return t[Q].isManual_=!0,oi(r),t}finishDraft(e,r){const t=e&&e[Q];(!t||!t.isManual_)&&ye(9);const{scope_:n}=t;return Qa(n,r),es(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,r){let t;for(t=r.length-1;t>=0;t--){const o=r[t];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}t>-1&&(r=r.slice(t+1));const n=Tt("Patches").applyPatches_;return Qt(e)?n(e,r):this.produce(e,o=>n(o,r))}};function _r(e,r){const t=Br(e)?Tt("MapSet").proxyMap_(e,r):$n(e)?Tt("MapSet").proxySet_(e,r):Ip(e,r);return(r?r.scope_:wn()).drafts_.push(t),t}function Ap(e){return Qt(e)||ye(10,e),Cl(e)}function Cl(e){if(!Ze(e)||Un(e))return e;const r=e[Q];let t,n=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=ti(e,r.scope_.immer_.useStrictShallowCopy_),n=r.scope_.immer_.shouldUseStrictIteration()}else t=ti(e,!0);return Dr(t,(o,i)=>{bl(t,o,Cl(i))},n),r&&(r.finalized_=!1),t}function Fp(){class e extends Map{constructor(l,c){super(),this[Q]={type_:2,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return ue(this[Q]).size}has(l){return ue(this[Q]).has(l)}set(l,c){const u=this[Q];return a(u),(!ue(u).has(l)||ue(u).get(l)!==c)&&(t(u),Ye(u),u.assigned_.set(l,!0),u.copy_.set(l,c),u.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),t(c),Ye(c),c.base_.has(l)?c.assigned_.set(l,!1):c.assigned_.delete(l),c.copy_.delete(l),!0}clear(){const l=this[Q];a(l),ue(l).size&&(t(l),Ye(l),l.assigned_=new Map,Dr(l.base_,c=>{l.assigned_.set(c,!1)}),l.copy_.clear())}forEach(l,c){const u=this[Q];ue(u).forEach((d,p,h)=>{l.call(c,this.get(p),p,this)})}get(l){const c=this[Q];a(c);const u=ue(c).get(l);if(c.finalized_||!Ze(u)||u!==c.base_.get(l))return u;const d=_r(u,c);return t(c),c.copy_.set(l,d),d}keys(){return ue(this[Q]).keys()}values(){const l=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const c=l.next();return c.done?c:{done:!1,value:this.get(c.value)}}}}entries(){const l=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const c=l.next();if(c.done)return c;const u=this.get(c.value);return{done:!1,value:[c.value,u]}}}}[Symbol.iterator](){return this.entries()}}function r(s,l){return new e(s,l)}function t(s){s.copy_||(s.assigned_=new Map,s.copy_=new Map(s.base_))}class n extends Set{constructor(l,c){super(),this[Q]={type_:3,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return ue(this[Q]).size}has(l){const c=this[Q];return a(c),c.copy_?!!(c.copy_.has(l)||c.drafts_.has(l)&&c.copy_.has(c.drafts_.get(l))):c.base_.has(l)}add(l){const c=this[Q];return a(c),this.has(l)||(i(c),Ye(c),c.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),i(c),Ye(c),c.copy_.delete(l)||(c.drafts_.has(l)?c.copy_.delete(c.drafts_.get(l)):!1)}clear(){const l=this[Q];a(l),ue(l).size&&(i(l),Ye(l),l.copy_.clear())}values(){const l=this[Q];return a(l),i(l),l.copy_.values()}entries(){const l=this[Q];return a(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,c){const u=this.values();let d=u.next();for(;!d.done;)l.call(c,d.value,d.value,this),d=u.next()}}function o(s,l){return new n(s,l)}function i(s){s.copy_||(s.copy_=new Set,s.base_.forEach(l=>{if(Ze(l)){const c=_r(l,s);s.drafts_.set(l,c),s.copy_.add(c)}else s.copy_.add(l)}))}function a(s){s.revoked_&&ye(3,JSON.stringify(ue(s)))}Sp("MapSet",{proxyMap_:r,proxySet_:o})}var Dp=new Tp,Rp=Dp.produce;const Pp=e=>(r,t,n)=>(n.setState=(o,i,...a)=>{const s=typeof o=="function"?Rp(o):o;return r(s,i,...a)},e(n.setState,t,n)),zn=Pp;var Te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _p(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t}var Op=function e(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var n,o,i;if(Array.isArray(r)){if(n=r.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!e(r[o],t[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(i=Object.keys(r),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!(a==="_owner"&&r.$$typeof)&&!e(r[a],t[a]))return!1}return!0}return r!==r&&t!==t};const ii=qn(Op),xt=new Map;function Mp(e,r){return xt.has(e)||xt.set(e,new Set),xt.get(e).add(r),()=>{var t;(t=xt.get(e))==null||t.delete(r)}}function Ni(e){const r=xt.get(e);r&&r.forEach(t=>{try{t()}catch(n){console.error(`Error in store event callback for '${e}':`,n)}})}function Np(e){e?xt.delete(e):xt.clear()}const et={subscribe:Mp,emit:Ni,clear:Np},kp=()=>Ni("dashboard:load"),Lp=()=>Ni("dashboard:unload"),rs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Or=new Map,rn=e=>{const r=Or.get(e);return r?Object.fromEntries(Object.entries(r.stores).map(([t,n])=>[t,n.getState()])):{}},Vp=(e,r,t)=>{if(e===void 0)return{type:"untracked",connection:r.connect(t)};const n=Or.get(t.name);if(n)return{type:"tracked",store:e,...n};const o={connection:r.connect(t),stores:{}};return Or.set(t.name,o),{type:"tracked",store:e,...o}},Bp=(e,r)=>{if(r===void 0)return;const t=Or.get(e);t&&(delete t.stores[r],Object.keys(t.stores).length===0&&Or.delete(e))},jp=e=>{var r,t;if(!e)return;const n=e.split(`
1
+ "use strict";const be=require("./x-B6ghREd2.js"),x=require("react/jsx-runtime"),le=require("react");require("./analyze-result-contract-S8u7CcPL.js");const ml=require("react-dom"),ut=require("./index-DRlMUglg.js");require("react-dom/client");const _i=require("./catalog-field-grounding-Bnx-3tE0.js"),pp=require("../layouts/index.cjs"),we=require("./index-D7KJindZ.js"),xn=require("./common-types-C73-Ud1-.js");function hl(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const f=hl(le),Bn=hl(ml),Ya=e=>{let r;const t=new Set,n=(c,u)=>{const d=typeof c=="function"?c(r):c;if(!Object.is(d,r)){const p=r;r=u??(typeof d!="object"||d===null)?d:Object.assign({},r,d),t.forEach(h=>h(r,p))}},o=()=>r,s={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=r=e(n,o,s);return s},mp=e=>e?Ya(e):Ya,hp=e=>e;function gp(e,r=hp){const t=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>r(e.getState()),[e,r]),le.useCallback(()=>r(e.getInitialState()),[e,r]));return le.useDebugValue(t),t}const Ka=e=>{const r=mp(e),t=n=>gp(r,n);return Object.assign(t,r),t},_t=e=>e?Ka(e):Ka;var gl=Symbol.for("immer-nothing"),Xa=Symbol.for("immer-draftable"),Q=Symbol.for("immer-state"),yp=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ye(e,...r){if(process.env.NODE_ENV!=="production"){const t=yp[e],n=typeof t=="function"?t.apply(null,r):t;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fr=Object.getPrototypeOf;function Qt(e){return!!e&&!!e[Q]}function Ze(e){var r;return e?yl(e)||Array.isArray(e)||!!e[Xa]||!!((r=e.constructor)!=null&&r[Xa])||Br(e)||$n(e):!1}var bp=Object.prototype.constructor.toString(),Za=new WeakMap;function yl(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(t===Object)return!0;if(typeof t!="function")return!1;let n=Za.get(t);return n===void 0&&(n=Function.toString.call(t),Za.set(t,n)),n===bp}function Dr(e,r,t=!0){jn(e)===0?(t?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{r(o,e[o],e)}):e.forEach((n,o)=>r(o,n,e))}function jn(e){const r=e[Q];return r?r.type_:Array.isArray(e)?1:Br(e)?2:$n(e)?3:0}function ei(e,r){return jn(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function bl(e,r,t){const n=jn(e);n===2?e.set(r,t):n===3?e.add(t):e[r]=t}function vp(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function Br(e){return e instanceof Map}function $n(e){return e instanceof Set}function ue(e){return e.copy_||e.base_}function ti(e,r){if(Br(e))return new Map(e);if($n(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=yl(e);if(r===!0||r==="class_only"&&!t){const n=Object.getOwnPropertyDescriptors(e);delete n[Q];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Fr(e),n)}else{const n=Fr(e);if(n!==null&&t)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Oi(e,r=!1){return Un(e)||Qt(e)||!Ze(e)||(jn(e)>1&&Object.defineProperties(e,{set:tn,add:tn,clear:tn,delete:tn}),Object.freeze(e),r&&Object.values(e).forEach(t=>Oi(t,!0))),e}function Cp(){ye(2)}var tn={value:Cp};function Un(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var ri={};function Tt(e){const r=ri[e];return r||ye(0,e),r}function Sp(e,r){ri[e]||(ri[e]=r)}var Rr;function wn(){return Rr}function xp(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qa(e,r){r&&(Tt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function ni(e){oi(e),e.drafts_.forEach(wp),e.drafts_=null}function oi(e){e===Rr&&(Rr=e.parent_)}function Ja(e){return Rr=xp(Rr,e)}function wp(e){const r=e[Q];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function es(e,r){r.unfinalizedDrafts_=r.drafts_.length;const t=r.drafts_[0];return e!==void 0&&e!==t?(t[Q].modified_&&(ni(r),ye(4)),Ze(e)&&(e=In(r,e),r.parent_||En(r,e)),r.patches_&&Tt("Patches").generateReplacementPatches_(t[Q].base_,e,r.patches_,r.inversePatches_)):e=In(r,t,[]),ni(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==gl?e:void 0}function In(e,r,t){if(Un(r))return r;const n=e.immer_.shouldUseStrictIteration(),o=r[Q];if(!o)return Dr(r,(i,a)=>ts(e,o,r,i,a,t),n),r;if(o.scope_!==e)return r;if(!o.modified_)return En(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let a=i,s=!1;o.type_===3&&(a=new Set(i),i.clear(),s=!0),Dr(a,(l,c)=>ts(e,o,i,l,c,t,s),n),En(e,i,!1),t&&e.patches_&&Tt("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function ts(e,r,t,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=Un(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===t&&ye(5),Qt(o)){const l=i&&r&&r.type_!==3&&!ei(r.assigned_,n)?i.concat(n):void 0,c=In(e,o,l);if(bl(t,n,c),Qt(c))e.canAutoFreeze_=!1;else return}else a&&t.add(o);if(Ze(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[n]===o&&s)return;In(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&(Br(t)?t.has(n):Object.prototype.propertyIsEnumerable.call(t,n))&&En(e,o)}}}function En(e,r,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oi(r,t)}function Ip(e,r){const t=Array.isArray(e),n={type_:t?1:0,scope_:r?r.scope_:wn(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Mi;t&&(o=[n],i=Pr);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var Mi={get(e,r){if(r===Q)return e;const t=ue(e);if(!ei(t,r))return Ep(e,t,r);const n=t[r];return e.finalized_||!Ze(n)?n:n===Eo(e.base_,r)?(To(e),e.copy_[r]=_r(n,e)):n},has(e,r){return r in ue(e)},ownKeys(e){return Reflect.ownKeys(ue(e))},set(e,r,t){const n=vl(ue(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,t),!0;if(!e.modified_){const o=Eo(ue(e),r),i=o==null?void 0:o[Q];if(i&&i.base_===t)return e.copy_[r]=t,e.assigned_[r]=!1,!0;if(vp(t,o)&&(t!==void 0||ei(e.base_,r)))return!0;To(e),Ye(e)}return e.copy_[r]===t&&(t!==void 0||r in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=t,e.assigned_[r]=!0),!0},deleteProperty(e,r){return Eo(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,To(e),Ye(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const t=ue(e),n=Reflect.getOwnPropertyDescriptor(t,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:t[r]}},defineProperty(){ye(11)},getPrototypeOf(e){return Fr(e.base_)},setPrototypeOf(){ye(12)}},Pr={};Dr(Mi,(e,r)=>{Pr[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Pr.deleteProperty=function(e,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&ye(13),Pr.set.call(this,e,r,void 0)};Pr.set=function(e,r,t){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&ye(14),Mi.set.call(this,e[0],r,t,e[0])};function Eo(e,r){const t=e[Q];return(t?ue(t):e)[r]}function Ep(e,r,t){var o;const n=vl(r,t);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function vl(e,r){if(!(r in e))return;let t=Fr(e);for(;t;){const n=Object.getOwnPropertyDescriptor(t,r);if(n)return n;t=Fr(t)}}function Ye(e){e.modified_||(e.modified_=!0,e.parent_&&Ye(e.parent_))}function To(e){e.copy_||(e.copy_=ti(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Tp=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(r,t,n)=>{if(typeof r=="function"&&typeof t!="function"){const i=t;t=r;const a=this;return function(l=i,...c){return a.produce(l,u=>t.call(this,u,...c))}}typeof t!="function"&&ye(6),n!==void 0&&typeof n!="function"&&ye(7);let o;if(Ze(r)){const i=Ja(this),a=_r(r,void 0);let s=!0;try{o=t(a),s=!1}finally{s?ni(i):oi(i)}return Qa(i,n),es(o,i)}else if(!r||typeof r!="object"){if(o=t(r),o===void 0&&(o=r),o===gl&&(o=void 0),this.autoFreeze_&&Oi(o,!0),n){const i=[],a=[];Tt("Patches").generateReplacementPatches_(r,o,i,a),n(i,a)}return o}else ye(1,r)},this.produceWithPatches=(r,t)=>{if(typeof r=="function")return(a,...s)=>this.produceWithPatches(a,l=>r(l,...s));let n,o;return[this.produce(r,t,(a,s)=>{n=a,o=s}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ze(e)||ye(8),Qt(e)&&(e=Ap(e));const r=Ja(this),t=_r(e,void 0);return t[Q].isManual_=!0,oi(r),t}finishDraft(e,r){const t=e&&e[Q];(!t||!t.isManual_)&&ye(9);const{scope_:n}=t;return Qa(n,r),es(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,r){let t;for(t=r.length-1;t>=0;t--){const o=r[t];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}t>-1&&(r=r.slice(t+1));const n=Tt("Patches").applyPatches_;return Qt(e)?n(e,r):this.produce(e,o=>n(o,r))}};function _r(e,r){const t=Br(e)?Tt("MapSet").proxyMap_(e,r):$n(e)?Tt("MapSet").proxySet_(e,r):Ip(e,r);return(r?r.scope_:wn()).drafts_.push(t),t}function Ap(e){return Qt(e)||ye(10,e),Cl(e)}function Cl(e){if(!Ze(e)||Un(e))return e;const r=e[Q];let t,n=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=ti(e,r.scope_.immer_.useStrictShallowCopy_),n=r.scope_.immer_.shouldUseStrictIteration()}else t=ti(e,!0);return Dr(t,(o,i)=>{bl(t,o,Cl(i))},n),r&&(r.finalized_=!1),t}function Fp(){class e extends Map{constructor(l,c){super(),this[Q]={type_:2,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return ue(this[Q]).size}has(l){return ue(this[Q]).has(l)}set(l,c){const u=this[Q];return a(u),(!ue(u).has(l)||ue(u).get(l)!==c)&&(t(u),Ye(u),u.assigned_.set(l,!0),u.copy_.set(l,c),u.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),t(c),Ye(c),c.base_.has(l)?c.assigned_.set(l,!1):c.assigned_.delete(l),c.copy_.delete(l),!0}clear(){const l=this[Q];a(l),ue(l).size&&(t(l),Ye(l),l.assigned_=new Map,Dr(l.base_,c=>{l.assigned_.set(c,!1)}),l.copy_.clear())}forEach(l,c){const u=this[Q];ue(u).forEach((d,p,h)=>{l.call(c,this.get(p),p,this)})}get(l){const c=this[Q];a(c);const u=ue(c).get(l);if(c.finalized_||!Ze(u)||u!==c.base_.get(l))return u;const d=_r(u,c);return t(c),c.copy_.set(l,d),d}keys(){return ue(this[Q]).keys()}values(){const l=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const c=l.next();return c.done?c:{done:!1,value:this.get(c.value)}}}}entries(){const l=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const c=l.next();if(c.done)return c;const u=this.get(c.value);return{done:!1,value:[c.value,u]}}}}[Symbol.iterator](){return this.entries()}}function r(s,l){return new e(s,l)}function t(s){s.copy_||(s.assigned_=new Map,s.copy_=new Map(s.base_))}class n extends Set{constructor(l,c){super(),this[Q]={type_:3,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return ue(this[Q]).size}has(l){const c=this[Q];return a(c),c.copy_?!!(c.copy_.has(l)||c.drafts_.has(l)&&c.copy_.has(c.drafts_.get(l))):c.base_.has(l)}add(l){const c=this[Q];return a(c),this.has(l)||(i(c),Ye(c),c.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),i(c),Ye(c),c.copy_.delete(l)||(c.drafts_.has(l)?c.copy_.delete(c.drafts_.get(l)):!1)}clear(){const l=this[Q];a(l),ue(l).size&&(i(l),Ye(l),l.copy_.clear())}values(){const l=this[Q];return a(l),i(l),l.copy_.values()}entries(){const l=this[Q];return a(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,c){const u=this.values();let d=u.next();for(;!d.done;)l.call(c,d.value,d.value,this),d=u.next()}}function o(s,l){return new n(s,l)}function i(s){s.copy_||(s.copy_=new Set,s.base_.forEach(l=>{if(Ze(l)){const c=_r(l,s);s.drafts_.set(l,c),s.copy_.add(c)}else s.copy_.add(l)}))}function a(s){s.revoked_&&ye(3,JSON.stringify(ue(s)))}Sp("MapSet",{proxyMap_:r,proxySet_:o})}var Dp=new Tp,Rp=Dp.produce;const Pp=e=>(r,t,n)=>(n.setState=(o,i,...a)=>{const s=typeof o=="function"?Rp(o):o;return r(s,i,...a)},e(n.setState,t,n)),zn=Pp;var Te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _p(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t}var Op=function e(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var n,o,i;if(Array.isArray(r)){if(n=r.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!e(r[o],t[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(i=Object.keys(r),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!(a==="_owner"&&r.$$typeof)&&!e(r[a],t[a]))return!1}return!0}return r!==r&&t!==t};const ii=qn(Op),xt=new Map;function Mp(e,r){return xt.has(e)||xt.set(e,new Set),xt.get(e).add(r),()=>{var t;(t=xt.get(e))==null||t.delete(r)}}function Ni(e){const r=xt.get(e);r&&r.forEach(t=>{try{t()}catch(n){console.error(`Error in store event callback for '${e}':`,n)}})}function Np(e){e?xt.delete(e):xt.clear()}const et={subscribe:Mp,emit:Ni,clear:Np},kp=()=>Ni("dashboard:load"),Lp=()=>Ni("dashboard:unload"),rs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Or=new Map,rn=e=>{const r=Or.get(e);return r?Object.fromEntries(Object.entries(r.stores).map(([t,n])=>[t,n.getState()])):{}},Vp=(e,r,t)=>{if(e===void 0)return{type:"untracked",connection:r.connect(t)};const n=Or.get(t.name);if(n)return{type:"tracked",store:e,...n};const o={connection:r.connect(t),stores:{}};return Or.set(t.name,o),{type:"tracked",store:e,...o}},Bp=(e,r)=>{if(r===void 0)return;const t=Or.get(e);t&&(delete t.stores[r],Object.keys(t.stores).length===0&&Or.delete(e))},jp=e=>{var r,t;if(!e)return;const n=e.split(`
2
2
  `),o=n.findIndex(a=>a.includes("api.setState"));if(o<0)return;const i=((r=n[o+1])==null?void 0:r.trim())||"";return(t=/.+ (.+) .+/.exec(i))==null?void 0:t[1]},$p=(e,r={})=>(t,n,o)=>{const{enabled:i,anonymousActionType:a,store:s,...l}=r;let c;try{c=(i??(rs?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(t,n,o);const{connection:u,...d}=Vp(s,c,l);let p=!0;o.setState=(m,b,S)=>{const g=t(m,b);if(!p)return g;const y=S===void 0?{type:a||jp(new Error().stack)||"anonymous"}:typeof S=="string"?{type:S}:S;return s===void 0?(u==null||u.send(y,n()),g):(u==null||u.send({...y,type:`${s}/${y.type}`},{...rn(l.name),[s]:o.getState()}),g)},o.devtools={cleanup:()=>{u&&typeof u.unsubscribe=="function"&&u.unsubscribe(),Bp(l.name,s)}};const h=(...m)=>{const b=p;p=!1,t(...m),p=b},v=e(o.setState,n,o);if(d.type==="untracked"?u==null||u.init(v):(d.stores[d.store]=o,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([m,b])=>[m,m===d.store?v:b.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let m=!1;const b=o.dispatch;o.dispatch=(...S)=>{(rs?"production":void 0)!=="production"&&S[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),b(...S)}}return u.subscribe(m=>{var b;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ao(m.payload,S=>{if(S.type==="__setState"){if(s===void 0){h(S.state);return}Object.keys(S.state).length!==1&&console.error(`
3
3
  [zustand devtools middleware] Unsupported __setState action format.
4
4
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
@@ -2,7 +2,7 @@ import { j as di, c as Be, C as Vs } from "./x-CXDkqdur.js";
2
2
  import { jsx as x, jsxs as be, Fragment as Dr } from "react/jsx-runtime";
3
3
  import * as f from "react";
4
4
  import Ce, { createContext as Zu, useContext as Qu, useLayoutEffect as Ju, useState as ef, useMemo as tf, useId as rf } from "react";
5
- import "./analyze-result-contract-CUO5QmqV.js";
5
+ import "./analyze-result-contract-BUgK3759.js";
6
6
  import * as Tn from "react-dom";
7
7
  import nf from "react-dom";
8
8
  import { S as of, b as da, c as Bs, d as af, e as sf, r as lf } from "./index-CJdxSyQq.js";
@@ -0,0 +1,3 @@
1
+ "use strict";const k=require("./analyze-result-contract-S8u7CcPL.js"),S=require("../data-app-sdk-adapters/index.cjs"),ee=k.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,H=k.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,T="semaphor-generated-data-app-contract/v1",M="semaphor-generated-data-app-contract-manifest/v1";function K(e){return R(e)?[...k.validateSemaphorDataAppCodegenSummary(e).issues,...re(e)]:["Plan artifact must be a Semaphor codegenSummary object."]}function te(e){const t=K(e);if(t.length>0)throw new Error(`Invalid Semaphor codegenSummary:
2
+ - ${t.join(`
3
+ - `)}`)}function re(e){var r;const t=R(e);if(!t)return[];const n=[];return((r=R(t.validation))==null?void 0:r.status)==="blocked"&&n.push("validation.status blocked cannot be generated. Resolve blocked semantic model gaps and replan before generating contract files."),Array.isArray(t.unsupportedInsights)&&t.unsupportedInsights.forEach((i,a)=>{var s;((s=R(i))==null?void 0:s.reason)==="missing_relationship"&&n.push(`unsupportedInsights.${a}.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`)}),Array.isArray(t.views)&&t.views.forEach((i,a)=>{var o;const s=R((o=R(i))==null?void 0:o.computation);(s==null?void 0:s.kind)==="unsupported"&&s.reason==="missing_relationship"&&n.push(`views.${a}.computation.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`)}),n}function R(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}async function ne({manifest:e,generatedFiles:t}){const n=[],r=y(e);if(!r)return{issues:[{message:"Generated contract manifest must be an object.",repairHint:"Regenerate the generated contract instead of hand-editing the manifest."}]};r.schemaVersion!==M&&n.push({path:"schemaVersion",message:`schemaVersion must be ${M}. Regenerate the contract with semaphor_create_data_app_contract.`,repairHint:"Regenerate the contract with semaphor_create_data_app_contract."}),r.generatedContractSchemaVersion!==T&&n.push({path:"generatedContractSchemaVersion",message:`generatedContractSchemaVersion must be ${T}. Regenerate the contract with semaphor_generate_data_app_contract.`,repairHint:"Regenerate the contract with semaphor_generate_data_app_contract."});const i=y(r.generator);A(i==null?void 0:i.name)||n.push({path:"generator.name",message:"generator.name is required.",repairHint:"Regenerate the generated contract so manifest generator metadata is written deterministically."}),A(i==null?void 0:i.version)||n.push({path:"generator.version",message:"generator.version is required.",repairHint:"Regenerate the generated contract so manifest generator metadata is written deterministically."});for(const a of K(r.codegenSummary))n.push({path:`codegenSummary.${a}`,message:`codegenSummary.${a}`,repairHint:"Regenerate the generated contract from a valid Data App codegenSummary."});if(r.codegenSummaryValidatorVersion!==H&&n.push({path:"codegenSummaryValidatorVersion",message:`codegenSummaryValidatorVersion must be ${H}. Regenerate the contract with semaphor_generate_data_app_contract.`,repairHint:"Regenerate the contract with semaphor_generate_data_app_contract."}),typeof r.codegenSummaryHash!="string")n.push({path:"codegenSummaryHash",message:"codegenSummaryHash is required.",repairHint:"Regenerate the generated contract so manifest hashes are written deterministically."});else if(y(r.codegenSummary)){const a=await se(r.codegenSummary);r.codegenSummaryHash!==a&&n.push({path:"codegenSummaryHash",message:"codegenSummaryHash does not match codegenSummary. Regenerate the contract instead of editing the manifest.",repairHint:"Regenerate the generated contract instead of editing the manifest."})}if(n.push(...ae(r.codegenSummary)),typeof r.generatedContentHash!="string")n.push({path:"generatedContentHash",message:"generatedContentHash is required.",repairHint:"Regenerate the generated contract so manifest hashes are written deterministically."});else if(t){const a=await ie(t);r.generatedContentHash!==a&&n.push({path:"generatedContentHash",message:"generatedContentHash does not match generated TypeScript files. Regenerate the contract instead of hand-editing generated files.",repairHint:"Regenerate the contract instead of hand-editing generated files."})}return{issues:n}}function ae(e){const t=y(e);if(!t)return[];const n=[],r=new Set(V(t.inputs).map(a=>{var s;return(s=y(a))==null?void 0:s.id}).filter(A)),i=new Set(V(t.views).map(a=>{var s;return(s=y(a))==null?void 0:s.id}).filter(A));return V(t.filterContracts).forEach((a,s)=>{const o=y(a),c=o==null?void 0:o.inputId;(!A(c)||!r.has(c))&&n.push({path:`codegenSummary.filterContracts.${s}.inputId`,message:`codegenSummary.filterContracts.${s}.inputId must reference a generated input.`,repairHint:"Regenerate the generated contract from a valid planner output."}),Array.isArray(o==null?void 0:o.bindings)&&o.bindings.forEach((u,f)=>{const p=y(u),l=p==null?void 0:p.viewId;(!A(l)||!i.has(l))&&n.push({path:`codegenSummary.filterContracts.${s}.bindings.${f}.viewId`,message:`codegenSummary.filterContracts.${s}.bindings.${f}.viewId must reference a generated view.`,repairHint:"Regenerate the generated contract from a valid planner output."});const h=y(p==null?void 0:p.fieldRef);A(h==null?void 0:h.name)||n.push({path:`codegenSummary.filterContracts.${s}.bindings.${f}.fieldRef`,message:`codegenSummary.filterContracts.${s}.bindings.${f}.fieldRef is required.`,repairHint:"Regenerate the generated contract from a valid planner output."})})}),n}async function ie(e){const t=Object.keys(e).filter(r=>r.endsWith(".ts")).sort();let n="";for(const r of t)n+=`${r}\0${e[r]}\0`;return`sha256:${await z(n)}`}async function se(e){return`sha256:${await z(F(e))}`}function F(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>F(r)).join(",")}]`;const t=e;return`{${Object.keys(t).sort().filter(r=>t[r]!==void 0).map(r=>`${JSON.stringify(r)}:${F(t[r])}`).join(",")}}`}async function z(e){var r;if(!((r=globalThis.crypto)!=null&&r.subtle))throw new Error("SHA-256 digest support is required for generated contract validation.");const t=new TextEncoder().encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(i=>i.toString(16).padStart(2,"0")).join("")}function y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function V(e){return Array.isArray(e)?e:[]}function A(e){return typeof e=="string"&&e.length>0}const J=["sources.ts","fields.ts","inputs.ts","queries.ts","bindings.ts","accessors.ts","metadata.ts","index.ts"],oe=[...J,"contract.manifest.json"];function ce(e){const t=d(e),n=v(t),r=[],i=[];return I(t==null?void 0:t.views).filter(a=>{var o;const s=d((o=d(a))==null?void 0:o.sdkSpec);return!!(s!=null&&s.builder&&(s!=null&&s.spec))}).forEach((a,s)=>{var u;const o=String(((u=d(a))==null?void 0:u.id)||`view_${s}`),c=Y(a,n);if(c){r.push({viewId:o,...c});return}i.push({viewId:o,path:`views.${o}.sdkSpec`,message:`Generated view execution validation could not build intent for "${o}".`})}),{requests:r,issues:i}}function Y(e,t){const n=d(e),r=d(n==null?void 0:n.sdkSpec),i=d(r==null?void 0:r.spec);if(!n||!(r!=null&&r.builder)||!i)return null;const a=fe(t)?t:v(d(t)),s=ve(r.builder),o=d(w(i,a))||{},c=ge({view:n,builder:s,rawSpec:i,spec:{...o,id:n.id,label:$e(n,i)},context:a});try{if(s==="analysis"){const u=c;return{intent:S.toSemaphorAnalysisIntent(u),resultShape:"analysis",analysisOptions:S.toSemaphorAnalysisQueryOptions(u)}}if(s==="metric")return{intent:S.toSemaphorMetricIntent(c),resultShape:"metric"};if(s==="records")return{intent:S.toSemaphorRecordsIntent(c),resultShape:"records"};if(s==="matrix")return{intent:S.toSemaphorMatrixIntent(c),resultShape:"matrix"};if(s==="sql")return{intent:S.toSemaphorSqlIntent(c),resultShape:"sql"}}catch{return null}return null}function de({input:e,filterContract:t,codegenSummary:n}){const r=d(e),i=d(t),a=d(r==null?void 0:r.optionQuery)||d(i==null?void 0:i.optionQuery);if(!r||!a)return null;const s=v(d(n)),o=d(a.spec),c=pe(a,o,s),u=a.valueFieldRef||a.valueField||(o==null?void 0:o.valueField),f=a.labelFieldRef||a.labelField||(o==null?void 0:o.labelField);if(!c||!u||!f)return null;const l={...d(w(o||{},s))||{},id:a.id||(o==null?void 0:o.id)||`${r.id}-options`,inputId:r.id,source:c,valueField:u,labelField:f,population:a.population||(o==null?void 0:o.population),dependencies:a.dependencies||(o==null?void 0:o.dependencies),limit:a.limit||(o==null?void 0:o.limit)||100};try{return S.toSemaphorInputOptionsIntent(w(l,s))}catch{return null}}function ue({input:e,filterContract:t,binding:n,option:r,codegenSummary:i}){const a=v(d(i)),s=d(e),o=d(t),c=d(n),u=w((c==null?void 0:c.fieldRef)||(o==null?void 0:o.fieldRef)||(s==null?void 0:s.fieldRef),a),f=String((o==null?void 0:o.operator)||(s==null?void 0:s.operator)||"in"),p=Oe(c);return{inputId:String((o==null?void 0:o.inputId)||(s==null?void 0:s.id)||""),kind:"filter",operator:f,value:Ve(f,r.value),isActive:!0,...u?{field:u}:{},...p?{relationshipHint:p}:{}}}function v(e){return{sourcesByKey:new Map(I(e==null?void 0:e.sources).map(d).filter(Te).filter(t=>typeof t.sourceKey=="string").map(t=>[String(t.sourceKey),W(t)]))}}function fe(e){var t;return e instanceof Object&&((t=d(e))==null?void 0:t.sourcesByKey)instanceof Map}function pe(e,t,n){if(typeof e.sourceKey=="string")return n.sourcesByKey.get(e.sourceKey)||{sourceKey:e.sourceKey};if(e.source)return e.source;if(t!=null&&t.source)return t.source;if(typeof(t==null?void 0:t.sourceKey)=="string")return n.sourcesByKey.get(t.sourceKey)||{sourceKey:t.sourceKey}}function ge({view:e,builder:t,rawSpec:n,spec:r,context:i}){var o;if(t!=="records"&&t!=="sql")return r;const a=d((o=d(e.visualSpec))==null?void 0:o.tableBehavior);if(!a)return r;const s={...r};if(Ie(a)==="server"&&(s.pagination={page:1,pageSize:me({tableBehavior:a,spec:r})}),t==="records"&&Ce(a)==="server"){const c=le({view:e,rawSpec:n,tableBehavior:a,context:i});c&&(s.orderBy=c)}return s}function me({tableBehavior:e,spec:t}){const n=d(e.pagination),r=d(t.pagination);return N(n==null?void 0:n.pageSize)||N(r==null?void 0:r.pageSize)||N(t.limit)||100}function le({view:e,rawSpec:t,tableBehavior:n,context:r}){const i=d(n.sorting),a=g(i==null?void 0:i.defaultField);if(!a)return;const o=he({view:e,rawSpec:t,context:r}).filter(c=>ye(c.lookup).includes(a));if(o.length===1)return{field:o[0].field,direction:(i==null?void 0:i.defaultDirection)==="desc"?"desc":"asc"}}function he({view:e,rawSpec:t,context:n}){var i;const r=[];for(const a of I(t.fields))C(r,a,n);C(r,t.dateField,n),C(r,(i=d(t.orderBy))==null?void 0:i.field,n);for(const a of I(e.fields))C(r,a,n);return Ne(r,a=>Se(a.lookup))}function C(e,t,n){const r=d(t);if(typeof(r==null?void 0:r.name)!="string"||r.name.length===0)return;const i=d(w(r,n))||r;e.push({lookup:r,field:i})}function ye(e){return be([g(e.name),Q(e),_e(e)])}function Se(e){return[Q(e),g(e.name),g(e.role),g(e.aggregate)].join("|")}function Q(e){return[g(e.sourceKey)||Ae(e.source),g(e.name),g(e.aggregate)].filter(Boolean).join(":")}function Ae(e){const t=d(e);if(!t)return"";if(typeof t.kind=="string"&&typeof t.domainId=="string"){if(typeof t.datasetId=="string")return`${t.kind}:${t.domainId}:datasetId:${t.datasetId}`;if(typeof t.datasetName=="string")return`${t.kind}:${t.domainId}:datasetName:${t.datasetName}`}return JSON.stringify(t)}function _e(e){return He([we(e),g(e.aggregate).toLowerCase(),g(e.label)||g(e.name)].filter(Boolean))}function we(e){return typeof e.sourceKey=="string"?Ee(e.sourceKey):Re(e.source)}function Re(e){const t=d(e);return t?g(t.datasetName)||g(t.datasetId)||g(t.name)||g(t.kind):""}function Ee(e){const t=String(e).split(":");return t[t.length-1]||String(e)}function Ie(e){var t;return g((t=d(e.pagination))==null?void 0:t.mode)}function Ce(e){var t;return g((t=d(e.sorting))==null?void 0:t.mode)}function w(e,t){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(i=>w(i,t));const n=e;if(typeof n.sourceKey=="string"&&typeof n.kind=="string"&&(typeof n.datasetName=="string"||typeof n.datasetId=="string"))return W(n);const r={};for(const[i,a]of Object.entries(n))i!=="sourceKey"&&(r[i]=w(a,t));if(typeof n.sourceKey=="string"){const i=t.sourcesByKey.get(n.sourceKey);i&&!r.source&&(r.source=i)}return r}function W(e){const{sourceKey:t,...n}=e;return n}function $e(e,t){const n=d(e.visualSpec);return(n==null?void 0:n.title)||e.title||t.label}function ve(e){const t=String(e||"").replace(/^semaphor\./,"");return["metric","records","analysis","matrix","sql"].includes(t)?t:""}function Oe(e){if(e!=null&&e.relationshipHint)return e.relationshipHint;const t=I(e==null?void 0:e.relationshipsUsed).map(n=>{var r;return(r=d(n))==null?void 0:r.id}).filter(n=>typeof n=="string"&&n.length>0);return t.length>0?{relationshipIds:t}:void 0}function Ve(e,t){return e==="in"||e==="not_in"?[t]:e==="between"?Array.isArray(t)?t:[t,t]:t}function N(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function g(e){return typeof e=="string"?e:""}function Ne(e,t){const n=new Set,r=[];for(const i of e){const a=t(i);!a||n.has(a)||(n.add(a),r.push(i))}return r}function be(e){return Array.from(new Set(e.filter(Boolean)))}function He(e){return(Array.isArray(e)?e.join(" "):e).replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean).map((n,r)=>{const i=n.toLowerCase();return r===0?i:i.charAt(0).toUpperCase()+i.slice(1)}).join("")}function d(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function I(e){return Array.isArray(e)?e:[]}function Te(e){return e!==void 0}const Me=new Set(["diagnostic_fix","fix_diagnostics","fix_inspector_warnings","fix_runtime_warnings","fix_warnings"]),q=new Set(["fields","sdkSpec"]);function Fe({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:r,preferences:i}){const a=m(r),s=typeof(a==null?void 0:a.kind)=="string"?a.kind.trim():"add";return De(i)?{ok:!1,policy:{kind:s,mode:"invalid_update_preferences",reason:"Metric aggregate override updates must use operationIntent.measureAggregateOverrides so deterministic update policy can guard the targeted edit."},violations:[{path:"preferences.measureAggregateOverrides",reason:"Move measureAggregateOverrides to operationIntent.measureAggregateOverrides for update calls."}]}:Me.has(s)?B({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:a,mode:"diagnostic_warning_fix",allowedViewChangeReasons:q,label:"Diagnostic warning fixes",reason:"Diagnostic warning fixes are preserve-by-default and may not add/remove views, inputs, or filter contracts."}):s==="edit"&&Array.isArray(a==null?void 0:a.measureAggregateOverrides)&&a.measureAggregateOverrides.length>0?B({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:a,mode:"metric_aggregate_override_edit",allowedViewChangeReasons:q,label:"Metric aggregate override edits",reason:"Metric aggregate override edits are preserve-by-default and may only adjust fields/sdkSpec on targeted views."}):{ok:!0,policy:{kind:s,mode:"general_iterative_update",reason:"General generated-contract edits are allowed to change the requested contract shape. Review the migration report for expected UI work."},violations:[]}}function De(e){var t;return Array.isArray((t=m(e))==null?void 0:t.measureAggregateOverrides)}function B({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:r,mode:i,allowedViewChangeReasons:a,label:s,reason:o}){const c=[],u=ke(r==null?void 0:r.targetViewIds),f=m(n)||{};u.size===0&&c.push({path:"operationIntent.targetViewIds",reason:`${s} must declare targetViewIds so the update cannot broaden to unrelated views.`}),b({bucket:m(f.views),label:"views",operationLabel:s,violations:c}),b({bucket:m(f.inputs),label:"inputs",operationLabel:s,violations:c}),P({bucket:m(f.inputs),label:"inputs",operationLabel:s,violations:c}),b({bucket:m(f.filterContracts),label:"filterContracts",operationLabel:s,violations:c}),P({bucket:m(f.filterContracts),label:"filterContracts",operationLabel:s,violations:c});for(const l of X(m(f.views))){u.size>0&&!u.has(_(l.id))&&c.push({path:`views.${_(l.id)||"<unknown>"}`,reason:`${s} may only change explicitly targeted views.`});const h=Array.isArray(l.reasons)?l.reasons.filter(E=>typeof E!="string"||!a.has(E)):[];h.length>0&&c.push({path:`views.${_(l.id)||"<unknown>"}`,reason:`${s} may only adjust fields/sdkSpec; changed ${h.join(", ")}.`})}const p=Ge({beforeSummary:e,afterSummary:t,targetViewIds:u,label:s});return p&&c.push(p),{ok:c.length===0,policy:{kind:_(r==null?void 0:r.kind)||"diagnostic_fix",mode:i,allowedViewChangeReasons:Array.from(a).sort(),targetViewIds:Array.from(u).sort(),reason:o},violations:c}}function Ge({beforeSummary:e,afterSummary:t,targetViewIds:n,label:r}){const i=m(e),a=m(t);if(!i||!a)return{path:"codegenSummary",reason:`${r} require before/after codegen summaries for full-scope verification.`};const s=L(i),o=L(a),c=U(i.views),u=U(a.views),f=Array.isArray(s.views)?s.views:[];s.views=f;for(const p of n){const l=c.get(p),h=u.get(p);if(!l||!h)continue;const E=f.find(Z=>{var x;return((x=m(Z))==null?void 0:x.id)===p}),O=m(h);if(!E||!O)continue;const j=E;j.fields=G(O.fields),j.sdkSpec=G(O.sdkSpec)}return $(s)===$(o)?null:{path:"codegenSummary",reason:`${r} may only change fields/sdkSpec on targetViewIds; another generated contract section changed.`}}function L(e){const t=G(e);for(const n of["implementationChecklist","assumptions","nextStep","nextRequiredTool","validation"])delete t[n];return je(t.unsupportedInsights)&&delete t.unsupportedInsights,t}function b({bucket:e,label:t,operationLabel:n,violations:r}){for(const i of D(e==null?void 0:e.added))r.push({path:`${t}.${_(i.id)||"<unknown>"}`,reason:`${n} may not add ${t}.`});for(const i of D(e==null?void 0:e.removed))r.push({path:`${t}.${_(i.id)||"<unknown>"}`,reason:`${n} may not remove ${t}.`})}function P({bucket:e,label:t,operationLabel:n,violations:r}){for(const i of X(e))r.push({path:`${t}.${_(i.id)||"<unknown>"}`,reason:`${n} may not change ${t}.`})}function X(e){return D(e==null?void 0:e.changed)}function D(e){return Array.isArray(e)?e.map(m).filter(Ke):[]}function ke(e){return Array.isArray(e)?new Set(e.filter(t=>typeof t=="string"&&t.trim().length>0).map(t=>t.trim())):new Set}function U(e){var n;const t=new Map;for(const r of Array.isArray(e)?e:[]){const i=(n=m(r))==null?void 0:n.id;typeof i=="string"&&i.trim()&&t.set(i,r)}return t}function G(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function $(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>$(n)).join(",")}]`;const t=e;return`{${Object.keys(t).sort().filter(n=>t[n]!==void 0).map(n=>`${JSON.stringify(n)}:${$(t[n])}`).join(",")}}`}function m(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function Ke(e){return e!==void 0}function je(e){return Array.isArray(e)&&e.length===0}function _(e){return typeof e=="string"?e:""}exports.CODEGEN_SUMMARY_SCHEMA_VERSION=ee;exports.CODEGEN_SUMMARY_VALIDATOR_VERSION=H;exports.CONTRACT_MANIFEST_SCHEMA_VERSION=M;exports.GENERATED_CONTRACT_SCHEMA_VERSION=T;exports.GENERATED_CONTRACT_TYPESCRIPT_FILES=J;exports.REQUIRED_GENERATED_CONTRACT_FILES=oe;exports.assertValidCodegenSummary=te;exports.buildSemaphorGeneratedActiveInput=ue;exports.buildSemaphorGeneratedInputOptionIntent=de;exports.buildSemaphorGeneratedViewExecutionRequest=Y;exports.buildSemaphorGeneratedViewExecutionRequests=ce;exports.evaluateSemaphorDataAppContractUpdatePolicy=Fe;exports.validateCodegenSummary=K;exports.validateSemaphorGeneratedContract=ne;