@kosdev-code/kos-ddk-model-components 0.1.0-dev.5840 → 0.1.0-dev.5856
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.
- package/components/holders/holder-card.d.ts +1 -0
- package/components/holders/holder-card.d.ts.map +1 -1
- package/components/holders/macro-holder-card.d.ts +1 -1
- package/components/holders/macro-holder-card.d.ts.map +1 -1
- package/components/localization-settings/localization-settings.d.ts.map +1 -1
- package/extensions/dashboard-macro-summary-extension.d.ts +41 -0
- package/extensions/dashboard-macro-summary-extension.d.ts.map +1 -0
- package/extensions/index.d.ts +1 -0
- package/extensions/index.d.ts.map +1 -1
- package/index.cjs +63 -61
- package/index.js +2350 -2287
- package/package.json +7 -7
package/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var To=Object.defineProperty;var Io=(t,e,n)=>e in t?To(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var F=(t,e,n)=>(Io(t,typeof e!="symbol"?e+"":e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@kosdev-code/kos-ui-sdk"),r=require("@emotion/react/jsx-runtime"),k=require("@emotion/styled"),l=require("@kosdev-code/kos-ddk-components"),p=require("react"),j=require("@kosdev-code/kos-ddk-models"),_e=require("@kosdev-code/kos-ddk-styles"),Ae=require("@kosdev-code/kos-dispense-sdk"),$=require("@kosdev-code/kos-freestyle-sdk"),se=require("@kosdev-code/kos-ui-plugin"),I=require("@kosdev-code/kos-ui-plugin/utilities"),rs=require("react-router-dom");class X{constructor(e,n){F(this,"future");F(this,"intentContainer");F(this,"title");F(this,"intent");F(this,"namespace");F(this,"successMessage");F(this,"failureMessage");F(this,"actionLabel");this.intentContainer=e,this.title=n.title,this.namespace=n.namespace,this.intent=n.intent,this.successMessage=n.successMessage,this.failureMessage=n.failureMessage,this.actionLabel=n.actionLabel}get type(){return"intentContainer"}async performAction(){const e=await this.intentContainer.performIntent(this.intent);e!=null&&e.tracker&&(this.future=u.FutureManager.getFuture(e.tracker))}}class as extends X{constructor(e){super(e,{title:"Calibrate",intent:"CALIBRATE",successMessage:"Calibrate Complete",failureMessage:"Calibrate Failed"})}enabled(){return!0}}class is extends X{constructor(e){super(e,{title:"45ml Flow Test",intent:"FIXED_45",successMessage:"45ml Flow Test Complete",failureMessage:"45ml Flow Test Failed"})}enabled(){return!0}}class cs extends X{constructor(e){super(e,{title:"Flush",intent:"FLUSH",successMessage:"Flush Complete",failureMessage:"Flush Failed"})}enabled(){return!0}}class ls extends X{constructor(e){super(e,{title:"High Flow Test",intent:"HIGH_FLOW_TEST",successMessage:"High Flow Test Complete",failureMessage:"High Flow Test Failed"})}enabled(){return!0}}class ds extends X{constructor(e){super(e,{title:"Hold to Pour",intent:"HOLD_TO_POUR",successMessage:"Pour Complete",failureMessage:"Pour Failed"})}enabled(){return!0}}class us extends X{constructor(e){super(e,{title:"Low Flow Test",intent:"LOW_FLOW_TEST",successMessage:"Low Flow Test Complete",failureMessage:"Low Flow Test Failed"})}enabled(){return!0}}class ms extends X{constructor(e){super(e,{title:"Manual Override",intent:"SOFT_START",successMessage:"Manual Override Complete",failureMessage:"Manual Override Failed"})}enabled(){return!0}}class ps extends X{constructor(e){super(e,{title:"Reset",intent:"MSV_RESET",successMessage:"Reset Complete",failureMessage:"Reset Failed"})}enabled(){return!0}}class hs extends X{constructor(e){super(e,{title:"Prime",intent:"PRIME",successMessage:"Prime Complete",failureMessage:"Prime Failed"})}enabled(){return!0}}class fs extends X{constructor(e){super(e,{title:"Purge",intent:"PURGE",successMessage:"Purge Complete",failureMessage:"Purge Failed"})}enabled(){return!0}}class gs{constructor(e,n){F(this,"future");F(this,"troubleAware");F(this,"title");F(this,"troubleKey");F(this,"namespace");F(this,"successMessage");F(this,"failureMessage");F(this,"actionLabel");this.troubleAware=e,this.troubleKey=n.trouble,this.namespace=n.namespace||"troubles",this.title=n.title||`${this.namespace}:troubles.${this.troubleKey}.progress`,this.successMessage=n.successMessage||`${this.namespace}:troubles.${this.troubleKey}.success`,this.failureMessage=n.failureMessage||`${this.namespace}:troubles.${this.troubleKey}.error`,this.actionLabel=n.action||`${this.namespace}:troubles.${this.troubleKey}.action`}get type(){return"troubleAware"}async performAction(){const e=this.troubleAware.troublesByType[this.troubleKey];if(!e)return;const s=await e[0].resolve();s!=null&&s.tracker&&(this.future=u.FutureManager.getFuture(s.tracker))}}class xs extends gs{constructor(e,n){super(e,{trouble:n})}enabled(){return!0}}const jo="PrimeTrouble",Eo="PurgeTrouble",Po=k.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
overflow-y: auto;
|
|
5
5
|
overflow-x: hidden;
|
|
6
6
|
gap: 32px;
|
|
7
7
|
height: 100%;
|
|
8
|
-
`,
|
|
8
|
+
`,ys=u.kosComponent(({holder:t,onComplete:e})=>{const[n,s]=p.useState(!1),{t:o}=u.useKosTranslation("common"),{componentModeOverride:a}=l.useComponentConfigurationContext(),c=t.data.agitated;return r.jsx(l.Modal,{contain:a!=="compact",onClosed:e,show:!n,children:r.jsxs(Po,{children:[r.jsx(l.Header,{contain:a==="compact",showCloseButton:!0,title:o("shelf-agitator"),showOpenButton:!1,onClose:()=>s(!0),CloseButton:a==="compact"?l.BackButton:void 0}),r.jsx(l.Content,{align:"top",children:r.jsx(l.InfoCard,{label:o("agitating"),padding:"x-large",value:o(c?"no":"yes")})}),r.jsx(l.Footer,{children:r.jsx(l.Button,{mode:"primary",disabled:c,onPointerDown:()=>console.log("agitate!"),children:o("test-shelf-agitator")})})]})})}),$t=()=>{const t=j.AgitationControl.type;return u.useKosModel({modelId:t,modelType:j.AgitationControl.type,options:{}})},J=t=>{var c,i;const[e,n]=p.useState(t==null?void 0:t.futureHandler.future),[s,o]=p.useState((i=(c=t==null?void 0:t.futureHandler)==null?void 0:c.future)==null?void 0:i.endState);p.useEffect(()=>{const d=u.kosAutoEffect(()=>{const m=t==null?void 0:t.futureHandler.future;n(m),o(m==null?void 0:m.endState)});return()=>{d(),t==null||t.futureHandler.removeFuture()}},[t==null?void 0:t.futureHandler]);const a=p.useCallback(()=>{t==null||t.futureHandler.removeFuture()},[t==null?void 0:t.futureHandler]);return{future:e,clearFuture:a,success:s===u.FutureEndState.Success,failure:s&&s!==u.FutureEndState.Success}},Ao=u.KosLog.createLogger({name:"future-progress-bar"}),bs=k(l.CloseButton)`
|
|
9
9
|
--ddk-component-icon-button-icon-color-active: var(
|
|
10
10
|
--ddk-component-progress-bar-close-button-color-active
|
|
11
11
|
);
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
--ddk-component-icon-button-icon-color-hover: var(
|
|
19
19
|
--ddk-component-progress-bar-close-button-color-hover
|
|
20
20
|
);
|
|
21
|
-
`,
|
|
21
|
+
`,No=k.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
width: 100%;
|
|
25
25
|
gap: 8px;
|
|
26
|
-
`,
|
|
26
|
+
`,vs=k.div`
|
|
27
27
|
align-items: var(--ddk-component-progress-bar-message-align-items);
|
|
28
28
|
color: var(--ddk-component-progress-bar-message-color);
|
|
29
29
|
display: flex;
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
gap: var(--ddk-component-progress-bar-message-gap);
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
width: 100%;
|
|
34
|
-
`,
|
|
34
|
+
`,Cs=k.div`
|
|
35
35
|
display: flex;
|
|
36
36
|
gap: var(--ddk-component-status-bar-gap);
|
|
37
37
|
align-items: center;
|
|
38
|
-
`,
|
|
38
|
+
`,Do=k.div`
|
|
39
39
|
border-top: solid 1px #888888;
|
|
40
40
|
padding-top: 8px;
|
|
41
41
|
width: calc(100% - 10px);
|
|
42
|
-
`,Ne=({children:t,onPointerDown:e,title:n,subtitle:s})=>{const{componentModeOverride:o}=l.useComponentConfigurationContext(),{t:a}=u.useKosTranslation("common"),c=n??t;return r.jsxs(
|
|
42
|
+
`,Ne=({children:t,onPointerDown:e,title:n,subtitle:s})=>{const{componentModeOverride:o}=l.useComponentConfigurationContext(),{t:a}=u.useKosTranslation("common"),c=n??t;return r.jsxs(vs,{children:[r.jsxs(No,{children:[r.jsxs(Cs,{style:{fontSize:"var(--ddk-component-progress-bar-message-font-size)"},children:[r.jsx(_e.MessageErrorIcon,{style:{color:"var(--ddk-component-progress-bar-icon-color-failure)",fontSize:"var(--ddk-component-progress-bar-icon-size)"}}),c]}),s&&r.jsx(Do,{children:s})]}),o==="compact"?r.jsx(l.Button,{mode:"primary",onPointerDown:e,children:a("close","Close")}):r.jsx(bs,{label:!1,size:"large",onPointerDown:e})]})},st=({children:t,onPointerDown:e})=>{const{componentModeOverride:n}=l.useComponentConfigurationContext(),{t:s}=u.useKosTranslation("common");return r.jsxs(vs,{children:[r.jsxs(Cs,{children:[r.jsx(_e.SuccessIcon,{style:{color:"var(--ddk-semantic-color-system-green)",fontSize:"var(--ddk-component-progress-bar-icon-size)"}}),t]}),n==="compact"?r.jsx(l.Button,{mode:"primary",onPointerDown:e,children:s("close","Close")}):r.jsx(bs,{label:!1,size:"large",onPointerDown:e})]})},Pn=t=>(t==null?void 0:t.title)&&(t==null?void 0:t.subtitle),K=u.kosComponent(({title:t,future:e,failureMessage:n,successMessage:s,cancelMessage:o,isCancelable:a=!0,onSuccess:c,onClose:i})=>{const{t:d}=u.useKosTranslation("common"),[m,h]=p.useState(!0),[f,g]=p.useState(),v=`${e==null?void 0:e.timeRemaining} ${d("remaining","remaining")}`,b=p.useCallback(()=>{f!=="in-progress"&&(i==null||i(),h(!1))},[i,f]),x=p.useCallback(()=>{b(),c==null||c()},[b,c]);p.useEffect(()=>{(e==null?void 0:e.status)==="IN_PROGRESS"||(e==null?void 0:e.status)==="NOT_ACTIVE"?(g("in-progress"),h(!0)):(e==null?void 0:e.status)==="SUCCESS"?(g("success"),h(!!s),s||(b(),c==null||c())):(e==null?void 0:e.status)==="FAIL"||(e==null?void 0:e.status)==="ABORT"?(g("failure"),h(!!n)):(e==null?void 0:e.status)==="CANCEL"?(g("cancelled"),h(!!o)):e&&Ao.error("unknown status",e==null?void 0:e.status)},[n,e,e==null?void 0:e.status,s,o,b,c]);const T=Pn(n)?n.subtitle:void 0,R=Pn(n)?n.title:n??d("something-went-wrong","Something went wrong");return e&&r.jsx(l.ProgressBar,{isCancelable:a,onCancel:()=>{e.cancelFuture()},blocked:f==="in-progress",onClose:b,renderFailure:n&&r.jsx(Ne,{subtitle:T,onPointerDown:b,children:R}),renderCancel:o&&r.jsx(Ne,{onPointerDown:b,children:o}),renderSuccess:s&&r.jsx(st,{onPointerDown:x,children:s}),show:m,status:f,subtitle:v,title:t,value:e.progress})}),Oo=u.KosLog.createLogger({name:"agitation-control-view"});Oo.debug("agitation-control-view component loaded");const Ro=k.div``,Mo=u.kosComponent(()=>{const{model:t}=$t(),{t:e,i18n:n}=u.useKosTranslation("troubles"),{future:s,failure:o}=J(t),a=p.useCallback(()=>{t&&t.clearAll()},[t]),c=s==null?void 0:s.reason,i=c?`__troubles.errors.${c}__`:void 0,d="troubles.agitation.error",m=n.exists(`troubles.errors.${c}`);return r.jsx(Ro,{children:r.jsx(K,{title:e("troubles.agitation.title"),future:s,isCancelable:!0,onClose:a,failureMessage:e(d,{context:i&&m?"reason":void 0,data:{reason:i}})})})}),_s=u.kosComponent(({pump:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"fcm-calibration"}),[s,o]=p.useState("high-flow-test-idle"),[a,c]=p.useState(),[i,d]=p.useState(),[m,h]=p.useState(),{future:f}=J(t);p.useEffect(()=>{switch(f==null?void 0:f.endState){case"CANCEL":switch(s){case"high-flow-test-in-progress":o("high-flow-test-idle");break;default:c("calibration-canceled"),o("failure")}break;case"SUCCESS":switch(s){case"high-flow-test-in-progress":o("high-flow-test-success");break;case"calibration-in-progress":o("calibration-input");break;case"verification-in-progress":o("verification-input");break}break;case"FAIL":c(f==null?void 0:f.reason),o("failure");break}},[f==null?void 0:f.endState,f==null?void 0:f.reason,s]);const g=p.useMemo(()=>({"high-flow-test-idle":{information:r.jsx(l.LabelInformation,{children:n("high-flow-test-idle-information")}),footer:r.jsx(l.Button,{onPointerDown:()=>{t.performPreCalibrate(),o("high-flow-test-in-progress")},children:n("initiate-high-flow-test")}),status:"information"},"high-flow-test-in-progress":{information:r.jsx(l.LabelInformation,{children:n("high-flow-test-in-progress-information")}),footer:r.jsx(l.Button,{disabled:!0,children:n("initiate-high-flow-test")}),status:"loading"},"high-flow-test-success":{information:r.jsx(l.LabelInformation,{children:n("high-flow-test-success-information")}),footer:r.jsx(l.Button,{onPointerDown:()=>o("calibration-idle"),children:n("proceed")}),status:"success"},"calibration-idle":{information:r.jsx(l.BodyMediumInformation,{children:n("calibration-idle-information")}),footer:r.jsx(l.Button,{onPointerDown:()=>{t.performCalibrate(),o("calibration-in-progress")},children:n("calibrate")}),status:"information"},"calibration-in-progress":{information:r.jsx(l.LabelInformation,{children:n("calibration-in-progress-information")}),status:"loading"},"calibration-input":{information:r.jsxs(r.Fragment,{children:[r.jsx(l.BodyMediumInformation,{children:n("calibration-input-information")}),r.jsx(l.InputCard,{label:"Volume",unitValue:"ml",layout:"num",onChange:v=>{v!==void 0&&d(v)},value:i!==void 0?i:""})]}),footer:r.jsx(l.Button,{disabled:i===void 0,onPointerDown:()=>{i!==void 0&&o("verification-idle")},children:n("proceed")}),status:"information"},"calibration-input-confirmation":{},"verification-idle":{information:r.jsx(l.BodyMediumInformation,{children:n("verification-idle-information")}),footer:r.jsx(l.Button,{onPointerDown:async()=>{i!==void 0&&(t.performVerify(i),o("verification-in-progress"))},children:n("initiate-verification-pour")}),status:"information"},"verification-in-progress":{information:r.jsx(l.LabelInformation,{children:n("verification-in-progress-information")}),status:"loading"},"verification-input":{information:r.jsxs(r.Fragment,{children:[r.jsx(l.BodyMediumInformation,{children:n("verification-input-information")}),r.jsx(l.InputCard,{label:"Volume",unitValue:"ml",layout:"num",onChange:v=>{v!==void 0&&h(v)},value:m!==void 0?m:""})]}),footer:r.jsx(l.Button,{disabled:m===void 0,onPointerDown:async()=>{if(i===void 0||m===void 0)return;const v=await t.performComplete(i,m);v==="success"?o("verification-success"):(c(v),o(v==="errBadPump"?"verification-failure":"failure"))},children:n("proceed")}),status:"information"},"verification-input-confirmation":{},"verification-success":{information:r.jsx(l.LabelInformation,{children:n("verification-success-information")}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"success"},"verification-failure":{information:r.jsx(l.LabelInformation,{children:n(`error.${a}`)}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"error"},failure:{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("calibration-failed")}),r.jsx(l.BodyMediumInformation,{children:n(`error.${a||"unknownError"}`)})]}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"error"}}),[a,e,t,n,i,m]);return r.jsxs(r.Fragment,{children:[r.jsx(l.WorkflowModal,{title:n(t.name),...g[s],onClose:()=>e()}),f&&r.jsx(K,{title:n("initiating"),future:f})]})}),Kt=u.kosComponent(({probeAware:t})=>{if(!t)return null;const e=t.highProbeWet.value,n=t.lowProbeWet.value,s=t.filling.value;return r.jsxs(Lo,{children:[r.jsxs(Et,{children:[r.jsx(Pt,{children:"High Probe"}),r.jsx(At,{children:e?"Wet":"Dry"})]}),r.jsxs(Et,{children:[r.jsx(Pt,{children:"Low Probe"}),r.jsx(At,{children:n?"Wet":"Dry"})]}),r.jsxs(Et,{children:[r.jsx(Pt,{children:"Filling"}),r.jsx(At,{children:s?"Yes":"No"})]})]})}),Lo=k.div`
|
|
43
43
|
display: grid;
|
|
44
44
|
grid-template-columns: repeat(3, 1fr);
|
|
45
45
|
gap: 16px;
|
|
46
46
|
width: 100%;
|
|
47
|
-
`,
|
|
47
|
+
`,Et=k.div`
|
|
48
48
|
border-radius: 16px;
|
|
49
49
|
border: 1px solid var(--ddk-generic-color-grey-20, #c5c5c5);
|
|
50
50
|
display: flex;
|
|
@@ -53,21 +53,21 @@
|
|
|
53
53
|
align-items: center;
|
|
54
54
|
gap: 16px;
|
|
55
55
|
flex: 1;
|
|
56
|
-
`,
|
|
56
|
+
`,Pt=k.div`
|
|
57
57
|
color: var(--ddk-generic-color-grey-50);
|
|
58
58
|
text-align: center;
|
|
59
59
|
font-size: var(--ddk-generic-font-size-small);
|
|
60
|
-
`,
|
|
60
|
+
`,At=k.div`
|
|
61
61
|
color: var(--ddk-generic-color-grey-90);
|
|
62
62
|
text-align: center;
|
|
63
63
|
font-size: var(--ddk-generic-font-size-large);
|
|
64
|
-
`,
|
|
64
|
+
`,Fo=u.kosComponent(({cardModel:t})=>{u.KosLog.debug("Agitator",t.path);const{t:e}=u.useKosTranslation("carb-tank",{keyPrefix:"dashboard.detail"}),{future:n}=J(t),s=p.useCallback(o=>{o==="agitate"?t==null||t.handleTestCarbTank():o==="activate"&&(t==null||t.toggleCarbTank())},[t]);return r.jsxs(r.Fragment,{children:[r.jsx(l.Content,{children:r.jsx(Kt,{probeAware:t})}),r.jsxs(l.Footer,{children:[r.jsx(l.Button,{onPointerDown:()=>s("agitate"),disabled:!t.isCarbInitialized,children:e("action.test")}),r.jsx(l.Button,{onPointerDown:()=>s("activate"),children:e("action.activate",{context:t.isCarbInitialized?"enabled":"disabled"})})]}),n&&r.jsx(K,{title:e("testing"),future:n})]})}),Vo=k.div`
|
|
65
65
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
66
66
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
67
|
-
`,
|
|
67
|
+
`,Bo=u.kosComponent(t=>{u.KosLog.debug(`summary component loaded for holder ${t}`),u.KosLog.info(`render agitator summary for holder ${t.cardModel.path}`);const{t:e}=u.useKosTranslation("common");return r.jsxs(r.Fragment,{children:[r.jsx(l.StatusIndicator,{size:"small",status:t.cardModel.isCarbInitialized?"completed":"incomplete"}),t.cardModel.isFilling&&r.jsx(Vo,{children:e("agitating")})]})}),$o=u.kosComponent(({cardModel:t})=>{u.KosLog.debug("Agitator",t.path);const{t:e}=u.useKosTranslation(["agitator","common"]),{future:n}=J(t),s=p.useCallback(o=>{o==="agitate"&&(t==null||t.testAgitate())},[t]);return r.jsxs(r.Fragment,{children:[r.jsx(l.Content,{children:r.jsx(l.InfoCard,{label:"Agitating",value:t.isAgitating?e("common:yes"):e("common:no")})}),r.jsx(l.Footer,{children:r.jsx(l.Button,{onPointerDown:()=>s("agitate"),children:e("action.label",{context:"agitator"})})}),n&&r.jsx(K,{title:e("testing"),future:n})]})}),Ko=k.div`
|
|
68
68
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
69
69
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
70
|
-
`,
|
|
70
|
+
`,Uo=u.kosComponent(t=>{u.KosLog.debug(`summary component loaded for holder ${t}`),u.KosLog.info(`render agitator summary for holder ${t.cardModel.path}`);const{t:e}=u.useKosTranslation("common");return r.jsxs(r.Fragment,{children:[r.jsx(l.StatusIndicator,{size:"small",status:"completed"}),t.cardModel.isAgitating&&r.jsx(Ko,{children:e("agitating")})]})}),zo={getStagedChange:void 0,updateStagedChange:void 0,saveChanges:void 0,clearStagedChanges:void 0},ws=p.createContext(zo),ks=({children:t})=>{const[e,n]=p.useState({}),s=i=>e[i],o=(i,d)=>{n(m=>({...m,[i]:d}))},a=()=>n({}),c=async()=>{for(const i in e)e[i].configProperty.updateProperty(e[i].value);a()};return r.jsx(ws.Provider,{value:{getStagedChange:s,updateStagedChange:o,saveChanges:c,clearStagedChanges:a},children:t})},Ut=()=>p.useContext(ws),Ho=t=>e=>r.jsx(ks,{children:r.jsx(t,{...e})}),Ss=({label:t,configProperty:e})=>{const{value:n}=u.useConfigProperty({configProperty:e});return r.jsx(l.InfoCard,{label:t,value:n})},ot=({configProperty:t,hideUnits:e,isValid:n,...s})=>{var h,f;const{t:o}=u.useKosTranslation("common",{keyPrefix:"validation"}),{significantValue:a}=u.useConfigProperty({configProperty:t}),c=g=>{g||(g=""),t.updateProperty(g)},i=(h=t.displayOptions)==null?void 0:h.max,d=(f=t.displayOptions)==null?void 0:f.min,m=p.useCallback(g=>{const v=n==null?void 0:n(g);return v||(Number(g)<d?o("minValue",{data:{minValue:d}}):Number(g)>i?o("maxValue",{data:{maxValue:i}}):void 0)},[n,i,d,o]);return r.jsx(l.InputCard,{...s,isValid:m,onChange:c,unitValue:e?void 0:t.unit,value:a})},ge=({configProperty:t,label:e,onChange:n,...s})=>{var c,i;const{t:o}=u.useKosTranslation(["config-properties","common"]),a=u.useConfigProperty({configProperty:t});return r.jsx(l.InputRangeCard,{...s,label:e??o(t.id),layout:"num",maxValue:(c=a.displayOptions)==null?void 0:c.max,minValue:(i=a.displayOptions)==null?void 0:i.min,onChange:d=>t.updateProperty(d),unitValue:a.unit,value:a.significantValue})},De=({configProperty:t,overrideChecked:e,...n})=>{var d;const{getStagedChange:s,updateStagedChange:o}=Ut(),{value:a}=u.useConfigProperty({configProperty:t}),c=((d=s==null?void 0:s(t.id))==null?void 0:d.value)??a,i=m=>{o?o(t.id,{configProperty:t,value:m}):t.updateProperty(m)};return r.jsx(l.ToggleCard,{toggleLabel:c==="true"?"Enabled":"Disabled",...n,onChange:i,checked:e!==void 0?e:c==="true"})},Zo=t=>(t==null?void 0:t.map(e=>({id:e.value,label:e.label})))||[],rt=({collapse:t,cancelButtonLabel:e,configProperty:n,displayMode:s="raw",displayValue:o,float:a,items:c,label:i,onChange:d,onSave:m,proceedButtonLabel:h,selectedItemId:f,unitValue:g,...v})=>{const{t:b}=u.useKosTranslation(["config-properties","common"]),x=u.useConfigProperty({configProperty:n,optionsTransformer:Zo});return r.jsx(l.PickerCard,{...v,cancelButtonLabel:e??(b("discard-changes",{defaultValue:"Discard Changes",ns:"common"})||void 0),collapse:t,displayValue:o??s==="raw"?x.value:x.displayValue,float:a,items:c??x.mappedOptions,label:i??b(n.id),onSave:T=>m?m(T):n.updateProperty(T),proceedButtonLabel:h??(b("save",{defaultValue:"Save",ns:"common"})||void 0),selectedItemId:f??x.value,unitValue:g??x.unit})},Wo=k(ot)`
|
|
71
71
|
border-top: var(--ddk-component-input-enable-card-input-container-border);
|
|
72
72
|
border-radius: 0;
|
|
73
73
|
cursor: pointer;
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
--ddk-component-input-enable-card-input-font-weight
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,Xo=k(rt)`
|
|
107
107
|
border-top: var(--ddk-component-input-enable-card-input-container-border);
|
|
108
108
|
border-radius: 0;
|
|
109
109
|
cursor: pointer;
|
|
@@ -140,14 +140,14 @@
|
|
|
140
140
|
--ddk-component-input-enable-card-input-font-weight
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
`,qo=(t,e,n,s,o)=>{let a;const c=o==="compact"?Wo:ot,i=o==="compact"?Xo:rt,d=s.label??n(t.id);switch(t.schemaType){case"boolean":a=r.jsx(De,{configProperty:t,...s,label:d});break;case"double":a=r.jsx(ge,{configProperty:t,...s,label:d});break;case"int":a=r.jsx(ge,{configProperty:t,...s,label:d});break;case"String":a=r.jsx(c,{configProperty:t,...s,label:d});break;case"enum":a=r.jsx(i,{configProperty:t,...s,label:d});break}return a},Yo=t=>(t==null?void 0:t.map(e=>({id:e.value,label:e.label})))||[],Ts=({configProperty:t,factory:e,mappedOptions:n,t:s,...o})=>{const{t:a}=u.useKosTranslation(["config-properties","common"]),{componentModeOverride:c}=l.useComponentConfigurationContext(),i=u.useConfigProperty({configProperty:t,optionsTransformer:Yo});return e=e??qo,e(t,{...i,mappedOptions:n??i.mappedOptions},s??a,o,c)},Go=k(l.Card)`
|
|
144
144
|
align-items: ${t=>t.mode==="compact"?"flex-start":void 0};
|
|
145
145
|
flex-direction: var(
|
|
146
146
|
--ddk-component-input-enable-card-container-flex-direction
|
|
147
147
|
);
|
|
148
148
|
padding: var(--ddk-component-input-enable-card-container-padding);
|
|
149
149
|
gap: var(--ddk-component-input-enable-card-container-gap);
|
|
150
|
-
`,
|
|
150
|
+
`,Jo=k.div`
|
|
151
151
|
box-sizing: border-box;
|
|
152
152
|
display: flex;
|
|
153
153
|
flex-direction: var(
|
|
@@ -155,27 +155,27 @@
|
|
|
155
155
|
);
|
|
156
156
|
gap: var(--ddk-component-input-enable-card-input-container-gap);
|
|
157
157
|
width: 100%;
|
|
158
|
-
`,
|
|
158
|
+
`,Qo=k(Ts)`
|
|
159
159
|
width: 100%;
|
|
160
|
-
`,
|
|
160
|
+
`,er=k.div`
|
|
161
161
|
box-sizing: border-box;
|
|
162
162
|
padding: ${t=>t.compact?"var(--ddk-component-input-enable-card-toggle-container-padding)":"0"};
|
|
163
163
|
width: var(--ddk-component-input-enable-card-toggle-container-width);
|
|
164
|
-
`,ws=({configProperties:t,disabled:e,enabledConfigProperty:n})=>{const{value:s}=u.useConfigProperty({configProperty:n}),o=s==="true",{componentModeOverride:a}=l.useComponentConfigurationContext(),c=t.length===1,i=c?Zo:Cs;return r.jsxs(Uo,{disabled:!o||e,mode:a,children:[r.jsx(zo,{children:t.map(d=>r.jsx(i,{disabled:!o||e,label:d.options?d.options.label:void 0,configProperty:d.configProperty,collapse:!c&&a==="standard",layout:d.options?d.options.layout:void 0,float:!0,hideUnits:d.options?d.options.hideUnits:void 0},d.configProperty.id))}),r.jsx(Ho,{compact:!c||a==="compact",children:r.jsx(De,{alwaysShowLabel:!0,collapse:!0,configProperty:n,disabled:e,stretch:a==="compact"})})]})},Wo=({configProperty:t,disabled:e,enabledConfigProperty:n,options:s})=>{const o=p.useMemo(()=>[{configProperty:t,options:s}],[t,s]);return r.jsx(ws,{configProperties:o,disabled:e,enabledConfigProperty:n})},_s=({configProperty:t,...e})=>{const{value:n}=u.useConfigProperty({configProperty:t}),s=o=>{o!==void 0&&(t==null||t.updateProperty(String(o)))};return r.jsx(l.SwitchCard,{...e,onChange:s,value:n})},ks=({description:t,float:e,label:n,modalTitle:s,onSave:o,time:a,...c})=>{const{regionModel:i}=u.useKosRegions(),{t:d}=u.useKosTranslation("common",{keyPrefix:"schedule"}),{amPmOptions:m,formattedTime:f,hourOptions:h,minuteOptions:g,setTime:v,time:b}=u.useRegionTimeProps({initialDate:a}),y=b.getHours(),_=p.useMemo(()=>[{id:"hr",items:h,selectedItemId:y<12?y:y-12,loop:!0},{id:"min",items:g,selectedItemId:b.getMinutes(),loop:!0},{id:"ampm",items:m,selectedItemId:y<12?"AM":"PM"}],[m,h,g,b,y]),O=p.useMemo(()=>[{id:"hr",items:h,selectedItemId:y,loop:!0},{id:"min",items:g,selectedItemId:b.getMinutes(),loop:!0}],[h,g,b,y]);return r.jsx(l.MultiPickerCard,{...c,cancelButtonLabel:d("discard-changes","Discard Changes")||void 0,closeButtonLabel:d("close","Close")||void 0,data:i!=null&&i.is12HourTimeFormat?_:O,description:t,displayValue:f,float:e,icon:we.TimeIcon,label:n,modalTitle:s,proceedButtonLabel:d("save","Save")||void 0,onSave:D=>{const E=i!=null&&i.is12HourTimeFormat?D.ampm==="AM"?D.hr:D.hr+12:D.hr,T=D.min,C=new Date(b);C.setHours(E),C.setMinutes(T),v(C),o==null||o({hours:E,minutes:T})}})},Ss=({configProperty:t,...e})=>{var f;const{getStagedChange:n,updateStagedChange:s}=Mt(),{value:o}=u.useConfigProperty({configProperty:t}),a=((f=n==null?void 0:n(t.id))==null?void 0:f.value)??o,{hours:c,minutes:i}=j.toTimeComponents(Number(a)),d=new Date;d.setHours(c),d.setMinutes(i);const m=h=>{const g=j.toSeconds(h.hours,h.minutes);s?s(t.id,{configProperty:t,value:g}):t.updateProperty(g)};return r.jsx(ks,{...e,onSave:m,time:d})},Xo=[0,6],Ts=({day:t=new Date().getDate(),month:e=new Date().getMonth(),onSave:n,year:s=new Date().getFullYear(),...o})=>{var v,b,y,_,O,D;const{t:a}=u.useKosTranslation("region"),{regionModel:c}=u.useKosRegions(),i=u.useDateProps({date:{year:s,month:e,day:t},formatOptions:{dayFormat:"short",yearFormat:"long",monthFormat:"long",formatString:(c==null?void 0:c.selectedDateFormat)||"yyyy/MM/dd"},filterOptions:{daysOfWeekFilter:Xo,yearsRange:[s-10,s+10]}}),d=p.useMemo(()=>{var E,T;return(T=(E=i==null?void 0:i.dateState)==null?void 0:E.yearsOptionsArray)==null?void 0:T.map(C=>({id:C.value,label:C.label}))},[(v=i==null?void 0:i.dateState)==null?void 0:v.yearsOptionsArray]),m=p.useMemo(()=>{var E,T;return(T=(E=i==null?void 0:i.dateState)==null?void 0:E.daysOptionsArray)==null?void 0:T.map(C=>({id:C.value,label:C.label}))},[(b=i==null?void 0:i.dateState)==null?void 0:b.daysOptionsArray]),f=p.useMemo(()=>{var E,T;return(T=(E=i==null?void 0:i.dateState)==null?void 0:E.monthsOptionsArray)==null?void 0:T.map(C=>({id:C.value,label:String(C.label)}))},[(y=i==null?void 0:i.dateState)==null?void 0:y.monthsOptionsArray]),h=p.useMemo(()=>{const E=[];return c==null||c.selectedDateOrder.split("").forEach(T=>{var C,K,z;T==="y"?E.push({id:"year",items:d,selectedItemId:(C=i==null?void 0:i.dateState)==null?void 0:C.year,loop:!1}):T==="m"?E.push({id:"month",items:f,selectedItemId:(K=i==null?void 0:i.dateState)==null?void 0:K.month}):T==="d"&&E.push({id:"day",items:m,selectedItemId:(z=i==null?void 0:i.dateState)==null?void 0:z.day,loop:!1})}),E},[(_=i==null?void 0:i.dateState)==null?void 0:_.day,(O=i==null?void 0:i.dateState)==null?void 0:O.month,(D=i==null?void 0:i.dateState)==null?void 0:D.year,m,f,c==null?void 0:c.selectedDateOrder,d]),g=p.useCallback(async E=>{const C=new Date(E.year,E.month+1,0).getDate(),K=E.day>C?1:E.day;n({day:K,month:E.month,year:E.year})},[n]);return r.jsx(l.MultiPickerCard,{cancelButtonLabel:a("discard-changes","Discard Changes")||void 0,closeButtonLabel:a("close","Close")||void 0,data:h,displayValue:i.dateState.formattedDate,icon:we.CalendarIcon,label:a("todays-date","Today's Date"),onSave:g,proceedButtonLabel:a("save","Save")||void 0,...o})},Is=u.kosComponent(({pump:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"fcm-diagnostics"}),[s,o]=p.useState("idle"),[a,c]=p.useState(),i=p.useCallback(async()=>{o("test"),c(void 0);const m=await t.performElectricalTest();m.error?(c(m.error),o("failure")):m.result==="errEEPROM"?(c("errEEPROM"),o("failure")):o("success")},[t]),d=p.useMemo(()=>({idle:{information:r.jsx(l.LabelInformation,{children:n("perform-electrical-test")}),footer:r.jsx(l.Button,{onPointerDown:i,children:n("electrical-test")})},test:{information:r.jsx(l.LabelInformation,{children:n("testing")}),footer:r.jsx(l.Button,{disabled:!0,children:n("electrical-test")}),status:"loading"},success:{information:r.jsx(l.LabelInformation,{children:n("electrical-test-success-header")}),footer:r.jsx(l.Button,{onPointerDown:i,children:n("electrical-test")}),status:"success"},failure:{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("electrical-test-failure-header")}),r.jsx(l.BodyMediumInformation,{children:n(`error.${a}`)})]}),footer:r.jsx(l.Button,{onPointerDown:i,children:n("electrical-test")}),status:"information"}}),[a,n,i]);return r.jsx(l.WorkflowModal,{title:n(t.name),...d[s],onClose:()=>e()})}),Et={title:"",summary:"",successMessage:"",failureMessage:"",actionLabel:""},qo=t=>{const[e,n]=p.useState(null),[s,o]=p.useState(Et),a=t.map(c=>{const[i,,d]=c;return[i==null?void 0:i.future,i,d]}).flat();return p.useEffect(()=>{const c=t.find(i=>{const[d]=i;return!!(d!=null&&d.future)});c?(n(c[0]),o(c[2])):(n(null),o(Et))},[...a,t]),[e,s]},Go=t=>{switch(t){case"calibrate":return ts;case"fixed-45":return ns;case"flush":return ss;case"high-flow-test":return os;case"hold-to-pour":return rs;case"low-flow-test":return as;case"manual-override":return is;case"msv-reset":return cs;case"prime":return ls;case"purge":return ds;default:return}},Yo=t=>(e,n="intents")=>({title:t(`${n}:troubles.${e}.progress`),summary:t(`${n}:troubles.${e}.summary`),successMessage:t(`${n}:troubles.${e}.success`),failureMessage:t(`${n}:troubles.${e}.error`),actionLabel:t(`${n}:troubles.${e}.action`)}),le=(t,e=Go)=>{const{t:n}=u.useKosTranslation("troubles"),[s,o]=p.useState(null),[a,c]=p.useState(Et),i=p.useCallback(async d=>{const m=e(d);if(m){const f=Yo(n)(d);if(c(f),t){const h=new m(t);await h.performAction(),o(h)}}},[e,t,n]);return t?[s,i,a]:[null,i,a]},Jo=t=>(u.KosLog.debug(`pumpActionFactory: actionId=${t}`),ms),Qo=t=>(e,n="troubles")=>({title:t(`${n}:troubles.${e}.progress`),summary:t(`${n}:troubles.${e}.summary`),successMessage:t(`${n}:troubles.${e}.success`),failureMessage:t(`${n}:troubles.${e}.error`),actionLabel:t(`${n}:troubles.${e}.action`)}),er=(t,e,n=Jo)=>{const{t:s}=u.useKosTranslation("troubles"),[o,a]=p.useState(null),[c]=p.useState(Qo(s)(e)),i=p.useCallback(async()=>{const d=n(e);if(d){const m=new d(t,e);await m.performAction(),a(m)}},[n,t,e]);return[o,i,c]};function tr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Lt();return r.jsx(o,{...s,children:r.jsx(t,{...e,agitationControl:n})})}}const Vt=()=>{const t=j.Animation.type;return u.useKosModel({modelId:t,modelType:j.Animation.type,options:{}})};function js(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Vt();return r.jsx(o,{...s,children:r.jsx(t,{...e,animation:n})})}}const Fe=()=>{const t=j.Application.type;return u.useKosModel({modelId:t,modelType:j.Application.type,options:{}})};function nr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Fe();return r.jsx(o,{...s,children:r.jsx(t,{...e,application:n})})}}const Es=()=>{const t=j.CarbWater.type;return u.useKosModel({modelId:t,modelType:j.CarbWater.type,options:{}})};function sr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Es();return r.jsx(o,{...s,children:r.jsx(t,{...e,carbWater:n})})}}const Ps=()=>{const t=j.CopyLogs.type;return u.useKosModel({modelId:t,modelType:j.CopyLogs.type,options:{},activate:!0,destroyOnUnmount:!0})};function or(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Ps();return r.jsx(o,{...s,children:r.jsx(t,{...e,copyLogs:n})})}}const Bt=()=>{const t=j.DashboardOperations.type;return u.useKosModel({modelId:t,modelType:j.DashboardOperations.type,options:{}})};function rr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Bt();return r.jsx(o,{...s,children:r.jsx(t,{...e,dashboardOperations:n})})}}const $t=()=>{const t=j.DispenserInfo.type;return u.useKosModel({modelId:t,modelType:j.DispenserInfo.type,options:{}})};function As(t){return e=>{const{model:n,status:s,KosModelLoader:o}=$t();return r.jsx(o,{...s,children:r.jsx(t,{...e,dispenserInfo:n})})}}const Ns=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.Door.type,options:{}})};function ar(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Ns(e.id);return r.jsx(o,{...s,children:r.jsx(t,{...e,door:n})})}}var F;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const a={};for(const c of o)a[c]=c;return a},t.getValidEnumValues=o=>{const a=t.objectKeys(o).filter(i=>typeof o[o[i]]!="number"),c={};for(const i of a)c[i]=o[i];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(a){return o[a]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const a=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&a.push(c);return a},t.find=(o,a)=>{for(const c of o)if(a(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function s(o,a=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}t.joinValues=s,t.jsonStringifyReplacer=(o,a)=>typeof a=="bigint"?a.toString():a})(F||(F={}));var Tn;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Tn||(Tn={}));const k=F.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),J=t=>{switch(typeof t){case"undefined":return k.undefined;case"string":return k.string;case"number":return Number.isNaN(t)?k.nan:k.number;case"boolean":return k.boolean;case"function":return k.function;case"bigint":return k.bigint;case"symbol":return k.symbol;case"object":return Array.isArray(t)?k.array:t===null?k.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?k.promise:typeof Map<"u"&&t instanceof Map?k.map:typeof Set<"u"&&t instanceof Set?k.set:typeof Date<"u"&&t instanceof Date?k.date:k.object;default:return k.unknown}},x=F.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class q extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},s={_errors:[]},o=a=>{for(const c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)s._errors.push(n(c));else{let i=s,d=0;for(;d<c.path.length;){const m=c.path[d];d===c.path.length-1?(i[m]=i[m]||{_errors:[]},i[m]._errors.push(n(c))):i[m]=i[m]||{_errors:[]},i=i[m],d++}}};return o(this),s}static assert(e){if(!(e instanceof q))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,F.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},s=[];for(const o of this.issues)if(o.path.length>0){const a=o.path[0];n[a]=n[a]||[],n[a].push(e(o))}else s.push(e(o));return{formErrors:s,fieldErrors:n}}get formErrors(){return this.flatten()}}q.create=t=>new q(t);const Pt=(t,e)=>{let n;switch(t.code){case x.invalid_type:t.received===k.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case x.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,F.jsonStringifyReplacer)}`;break;case x.unrecognized_keys:n=`Unrecognized key(s) in object: ${F.joinValues(t.keys,", ")}`;break;case x.invalid_union:n="Invalid input";break;case x.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${F.joinValues(t.options)}`;break;case x.invalid_enum_value:n=`Invalid enum value. Expected ${F.joinValues(t.options)}, received '${t.received}'`;break;case x.invalid_arguments:n="Invalid function arguments";break;case x.invalid_return_type:n="Invalid function return type";break;case x.invalid_date:n="Invalid date";break;case x.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:F.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case x.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case x.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case x.custom:n="Invalid input";break;case x.invalid_intersection_types:n="Intersection results could not be merged";break;case x.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case x.not_finite:n="Number must be finite";break;default:n=e.defaultError,F.assertNever(t)}return{message:n}};let ir=Pt;function cr(){return ir}const lr=t=>{const{data:e,path:n,errorMaps:s,issueData:o}=t,a=[...n,...o.path||[]],c={...o,path:a};if(o.message!==void 0)return{...o,path:a,message:o.message};let i="";const d=s.filter(m=>!!m).slice().reverse();for(const m of d)i=m(c,{data:e,defaultError:i}).message;return{...o,path:a,message:i}};function w(t,e){const n=cr(),s=lr({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Pt?void 0:Pt].filter(o=>!!o)});t.common.issues.push(s)}class U{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const s=[];for(const o of n){if(o.status==="aborted")return A;o.status==="dirty"&&e.dirty(),s.push(o.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,n){const s=[];for(const o of n){const a=await o.key,c=await o.value;s.push({key:a,value:c})}return U.mergeObjectSync(e,s)}static mergeObjectSync(e,n){const s={};for(const o of n){const{key:a,value:c}=o;if(a.status==="aborted"||c.status==="aborted")return A;a.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(s[a.value]=c.value)}return{status:e.value,value:s}}}const A=Object.freeze({status:"aborted"}),Pe=t=>({status:"dirty",value:t}),Z=t=>({status:"valid",value:t}),In=t=>t.status==="aborted",jn=t=>t.status==="dirty",xe=t=>t.status==="valid",Ye=t=>typeof Promise<"u"&&t instanceof Promise;var I;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(I||(I={}));class ne{constructor(e,n,s,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=s,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const En=(t,e)=>{if(xe(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new q(t.common.issues);return this._error=n,this._error}}};function R(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:s,description:o}=t;if(e&&(n||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,i)=>{const{message:d}=t;return c.code==="invalid_enum_value"?{message:d??i.defaultError}:typeof i.data>"u"?{message:d??s??i.defaultError}:c.code!=="invalid_type"?{message:i.defaultError}:{message:d??n??i.defaultError}},description:o}}class L{get description(){return this._def.description}_getType(e){return J(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:J(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new U,ctx:{common:e.parent.common,data:e.data,parsedType:J(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Ye(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const s=this.safeParse(e,n);if(s.success)return s.data;throw s.error}safeParse(e,n){const s={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:J(e)},o=this._parseSync({data:e,path:s.path,parent:s});return En(s,o)}"~validate"(e){var s,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:J(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return xe(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(o=(s=a==null?void 0:a.message)==null?void 0:s.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>xe(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,n){const s=await this.safeParseAsync(e,n);if(s.success)return s.data;throw s.error}async safeParseAsync(e,n){const s={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:J(e)},o=this._parse({data:e,path:s.path,parent:s}),a=await(Ye(o)?o:Promise.resolve(o));return En(s,a)}refine(e,n){const s=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,a)=>{const c=e(o),i=()=>a.addIssue({code:x.custom,...s(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(d=>d?!0:(i(),!1)):c?!0:(i(),!1)})}refinement(e,n){return this._refinement((s,o)=>e(s)?!0:(o.addIssue(typeof n=="function"?n(s,o):n),!1))}_refinement(e){return new ve({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return te.create(this,this._def)}nullable(){return be.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return W.create(this)}promise(){return tt.create(this,this._def)}or(e){return Qe.create([this,e],this._def)}and(e){return et.create(this,e,this._def)}transform(e){return new ve({...R(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Dt({...R(this._def),innerType:this,defaultValue:n,typeName:N.ZodDefault})}brand(){return new Nr({typeName:N.ZodBranded,type:this,...R(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Ot({...R(this._def),innerType:this,catchValue:n,typeName:N.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Kt.create(this,e)}readonly(){return Rt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dr=/^c[^\s-]{8,}$/i,ur=/^[0-9a-z]+$/,mr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,hr=/^[a-z0-9_-]{21}$/i,fr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let It;const vr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,br=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Cr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_r=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ds="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sr=new RegExp(`^${Ds}$`);function Os(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Tr(t){return new RegExp(`^${Os(t)}$`)}function Ir(t){let e=`${Ds}T${Os(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function jr(t,e){return!!((e==="v4"||!e)&&vr.test(t)||(e==="v6"||!e)&&Cr.test(t))}function Er(t,e){if(!fr.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const s=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(s));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Pr(t,e){return!!((e==="v4"||!e)&&br.test(t)||(e==="v6"||!e)&&wr.test(t))}class Q extends L{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==k.string){const a=this._getOrReturnCtx(e);return w(a,{code:x.invalid_type,expected:k.string,received:a.parsedType}),A}const s=new U;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),w(o,{code:x.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(o=this._getOrReturnCtx(e,o),w(o,{code:x.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const c=e.data.length>a.value,i=e.data.length<a.value;(c||i)&&(o=this._getOrReturnCtx(e,o),c?w(o,{code:x.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):i&&w(o,{code:x.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")xr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"email",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")It||(It=new RegExp(yr,"u")),It.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"emoji",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")pr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"uuid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")hr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"nanoid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")dr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"cuid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")ur.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"cuid2",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")mr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"ulid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),w(o,{validation:"url",code:x.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"regex",code:x.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(e,o),w(o,{code:x.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(o=this._getOrReturnCtx(e,o),w(o,{code:x.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),w(o,{code:x.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ir(a).test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{code:x.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Sr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{code:x.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Tr(a).test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{code:x.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?gr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"duration",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?jr(e.data,a.version)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"ip",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?Er(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"jwt",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?Pr(e.data,a.version)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"cidr",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?_r.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"base64",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?kr.test(e.data)||(o=this._getOrReturnCtx(e,o),w(o,{validation:"base64url",code:x.invalid_string,message:a.message}),s.dirty()):F.assertNever(a);return{status:s.value,value:e.data}}_regex(e,n,s){return this.refinement(o=>e.test(o),{validation:n,code:x.invalid_string,...I.errToObj(s)})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...I.errToObj(e)})}url(e){return this._addCheck({kind:"url",...I.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...I.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...I.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...I.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...I.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...I.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...I.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...I.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...I.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...I.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...I.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...I.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...I.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...I.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...I.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...I.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...I.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...I.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...I.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...I.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...I.errToObj(n)})}nonempty(e){return this.min(1,I.errToObj(e))}trim(){return new Q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Q.create=t=>new Q({checks:[],typeName:N.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...R(t)});function Ar(t,e){const n=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,o=n>s?n:s,a=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return a%c/10**o}class Oe extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==k.number){const a=this._getOrReturnCtx(e);return w(a,{code:x.invalid_type,expected:k.number,received:a.parsedType}),A}let s;const o=new U;for(const a of this._def.checks)a.kind==="int"?F.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),w(s,{code:x.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),w(s,{code:x.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),w(s,{code:x.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?Ar(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),w(s,{code:x.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),w(s,{code:x.not_finite,message:a.message}),o.dirty()):F.assertNever(a);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,I.toString(n))}gt(e,n){return this.setLimit("min",e,!1,I.toString(n))}lte(e,n){return this.setLimit("max",e,!0,I.toString(n))}lt(e,n){return this.setLimit("max",e,!1,I.toString(n))}setLimit(e,n,s,o){return new Oe({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:I.toString(o)}]})}_addCheck(e){return new Oe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:I.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:I.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&F.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(n===null||s.value>n)&&(n=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Oe.create=t=>new Oe({checks:[],typeName:N.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...R(t)});class Re extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==k.bigint)return this._getInvalidInput(e);let s;const o=new U;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),w(s,{code:x.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),w(s,{code:x.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),w(s,{code:x.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):F.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return w(n,{code:x.invalid_type,expected:k.bigint,received:n.parsedType}),A}gte(e,n){return this.setLimit("min",e,!0,I.toString(n))}gt(e,n){return this.setLimit("min",e,!1,I.toString(n))}lte(e,n){return this.setLimit("max",e,!0,I.toString(n))}lt(e,n){return this.setLimit("max",e,!1,I.toString(n))}setLimit(e,n,s,o){return new Re({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:I.toString(o)}]})}_addCheck(e){return new Re({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Re.create=t=>new Re({checks:[],typeName:N.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...R(t)});class Pn extends L{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==k.boolean){const s=this._getOrReturnCtx(e);return w(s,{code:x.invalid_type,expected:k.boolean,received:s.parsedType}),A}return Z(e.data)}}Pn.create=t=>new Pn({typeName:N.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...R(t)});class Je extends L{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==k.date){const a=this._getOrReturnCtx(e);return w(a,{code:x.invalid_type,expected:k.date,received:a.parsedType}),A}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return w(a,{code:x.invalid_date}),A}const s=new U;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),w(o,{code:x.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(o=this._getOrReturnCtx(e,o),w(o,{code:x.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):F.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Je({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:I.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:I.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Je.create=t=>new Je({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:N.ZodDate,...R(t)});class An extends L{_parse(e){if(this._getType(e)!==k.symbol){const s=this._getOrReturnCtx(e);return w(s,{code:x.invalid_type,expected:k.symbol,received:s.parsedType}),A}return Z(e.data)}}An.create=t=>new An({typeName:N.ZodSymbol,...R(t)});class Nn extends L{_parse(e){if(this._getType(e)!==k.undefined){const s=this._getOrReturnCtx(e);return w(s,{code:x.invalid_type,expected:k.undefined,received:s.parsedType}),A}return Z(e.data)}}Nn.create=t=>new Nn({typeName:N.ZodUndefined,...R(t)});class Dn extends L{_parse(e){if(this._getType(e)!==k.null){const s=this._getOrReturnCtx(e);return w(s,{code:x.invalid_type,expected:k.null,received:s.parsedType}),A}return Z(e.data)}}Dn.create=t=>new Dn({typeName:N.ZodNull,...R(t)});class On extends L{constructor(){super(...arguments),this._any=!0}_parse(e){return Z(e.data)}}On.create=t=>new On({typeName:N.ZodAny,...R(t)});class Rn extends L{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Z(e.data)}}Rn.create=t=>new Rn({typeName:N.ZodUnknown,...R(t)});class se extends L{_parse(e){const n=this._getOrReturnCtx(e);return w(n,{code:x.invalid_type,expected:k.never,received:n.parsedType}),A}}se.create=t=>new se({typeName:N.ZodNever,...R(t)});class Ln extends L{_parse(e){if(this._getType(e)!==k.undefined){const s=this._getOrReturnCtx(e);return w(s,{code:x.invalid_type,expected:k.void,received:s.parsedType}),A}return Z(e.data)}}Ln.create=t=>new Ln({typeName:N.ZodVoid,...R(t)});class W extends L{_parse(e){const{ctx:n,status:s}=this._processInputParams(e),o=this._def;if(n.parsedType!==k.array)return w(n,{code:x.invalid_type,expected:k.array,received:n.parsedType}),A;if(o.exactLength!==null){const c=n.data.length>o.exactLength.value,i=n.data.length<o.exactLength.value;(c||i)&&(w(n,{code:c?x.too_big:x.too_small,minimum:i?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),s.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(w(n,{code:x.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),s.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(w(n,{code:x.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),n.common.async)return Promise.all([...n.data].map((c,i)=>o.type._parseAsync(new ne(n,c,n.path,i)))).then(c=>U.mergeArray(s,c));const a=[...n.data].map((c,i)=>o.type._parseSync(new ne(n,c,n.path,i)));return U.mergeArray(s,a)}get element(){return this._def.type}min(e,n){return new W({...this._def,minLength:{value:e,message:I.toString(n)}})}max(e,n){return new W({...this._def,maxLength:{value:e,message:I.toString(n)}})}length(e,n){return new W({...this._def,exactLength:{value:e,message:I.toString(n)}})}nonempty(e){return this.min(1,e)}}W.create=(t,e)=>new W({type:t,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...R(e)});function fe(t){if(t instanceof V){const e={};for(const n in t.shape){const s=t.shape[n];e[n]=te.create(fe(s))}return new V({...t._def,shape:()=>e})}else return t instanceof W?new W({...t._def,type:fe(t.element)}):t instanceof te?te.create(fe(t.unwrap())):t instanceof be?be.create(fe(t.unwrap())):t instanceof ie?ie.create(t.items.map(e=>fe(e))):t}class V extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=F.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==k.object){const m=this._getOrReturnCtx(e);return w(m,{code:x.invalid_type,expected:k.object,received:m.parsedType}),A}const{status:s,ctx:o}=this._processInputParams(e),{shape:a,keys:c}=this._getCached(),i=[];if(!(this._def.catchall instanceof se&&this._def.unknownKeys==="strip"))for(const m in o.data)c.includes(m)||i.push(m);const d=[];for(const m of c){const f=a[m],h=o.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new ne(o,h,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof se){const m=this._def.unknownKeys;if(m==="passthrough")for(const f of i)d.push({key:{status:"valid",value:f},value:{status:"valid",value:o.data[f]}});else if(m==="strict")i.length>0&&(w(o,{code:x.unrecognized_keys,keys:i}),s.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const f of i){const h=o.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new ne(o,h,o.path,f)),alwaysSet:f in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const m=[];for(const f of d){const h=await f.key,g=await f.value;m.push({key:h,value:g,alwaysSet:f.alwaysSet})}return m}).then(m=>U.mergeObjectSync(s,m)):U.mergeObjectSync(s,d)}get shape(){return this._def.shape()}strict(e){return I.errToObj,new V({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,s)=>{var a,c;const o=((c=(a=this._def).errorMap)==null?void 0:c.call(a,n,s).message)??s.defaultError;return n.code==="unrecognized_keys"?{message:I.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new V({...this._def,unknownKeys:"strip"})}passthrough(){return new V({...this._def,unknownKeys:"passthrough"})}extend(e){return new V({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new V({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:N.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new V({...this._def,catchall:e})}pick(e){const n={};for(const s of F.objectKeys(e))e[s]&&this.shape[s]&&(n[s]=this.shape[s]);return new V({...this._def,shape:()=>n})}omit(e){const n={};for(const s of F.objectKeys(this.shape))e[s]||(n[s]=this.shape[s]);return new V({...this._def,shape:()=>n})}deepPartial(){return fe(this)}partial(e){const n={};for(const s of F.objectKeys(this.shape)){const o=this.shape[s];e&&!e[s]?n[s]=o:n[s]=o.optional()}return new V({...this._def,shape:()=>n})}required(e){const n={};for(const s of F.objectKeys(this.shape))if(e&&!e[s])n[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof te;)a=a._def.innerType;n[s]=a}return new V({...this._def,shape:()=>n})}keyof(){return Rs(F.objectKeys(this.shape))}}V.create=(t,e)=>new V({shape:()=>t,unknownKeys:"strip",catchall:se.create(),typeName:N.ZodObject,...R(e)});V.strictCreate=(t,e)=>new V({shape:()=>t,unknownKeys:"strict",catchall:se.create(),typeName:N.ZodObject,...R(e)});V.lazycreate=(t,e)=>new V({shape:t,unknownKeys:"strip",catchall:se.create(),typeName:N.ZodObject,...R(e)});class Qe extends L{_parse(e){const{ctx:n}=this._processInputParams(e),s=this._def.options;function o(a){for(const i of a)if(i.result.status==="valid")return i.result;for(const i of a)if(i.result.status==="dirty")return n.common.issues.push(...i.ctx.common.issues),i.result;const c=a.map(i=>new q(i.ctx.common.issues));return w(n,{code:x.invalid_union,unionErrors:c}),A}if(n.common.async)return Promise.all(s.map(async a=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(o);{let a;const c=[];for(const d of s){const m={...n,common:{...n.common,issues:[]},parent:null},f=d._parseSync({data:n.data,path:n.path,parent:m});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:m}),m.common.issues.length&&c.push(m.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const i=c.map(d=>new q(d));return w(n,{code:x.invalid_union,unionErrors:i}),A}}get options(){return this._def.options}}Qe.create=(t,e)=>new Qe({options:t,typeName:N.ZodUnion,...R(e)});function At(t,e){const n=J(t),s=J(e);if(t===e)return{valid:!0,data:t};if(n===k.object&&s===k.object){const o=F.objectKeys(e),a=F.objectKeys(t).filter(i=>o.indexOf(i)!==-1),c={...t,...e};for(const i of a){const d=At(t[i],e[i]);if(!d.valid)return{valid:!1};c[i]=d.data}return{valid:!0,data:c}}else if(n===k.array&&s===k.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let a=0;a<t.length;a++){const c=t[a],i=e[a],d=At(c,i);if(!d.valid)return{valid:!1};o.push(d.data)}return{valid:!0,data:o}}else return n===k.date&&s===k.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class et extends L{_parse(e){const{status:n,ctx:s}=this._processInputParams(e),o=(a,c)=>{if(In(a)||In(c))return A;const i=At(a.value,c.value);return i.valid?((jn(a)||jn(c))&&n.dirty(),{status:n.value,value:i.data}):(w(s,{code:x.invalid_intersection_types}),A)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,c])=>o(a,c)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}et.create=(t,e,n)=>new et({left:t,right:e,typeName:N.ZodIntersection,...R(n)});class ie extends L{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==k.array)return w(s,{code:x.invalid_type,expected:k.array,received:s.parsedType}),A;if(s.data.length<this._def.items.length)return w(s,{code:x.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&s.data.length>this._def.items.length&&(w(s,{code:x.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...s.data].map((c,i)=>{const d=this._def.items[i]||this._def.rest;return d?d._parse(new ne(s,c,s.path,i)):null}).filter(c=>!!c);return s.common.async?Promise.all(a).then(c=>U.mergeArray(n,c)):U.mergeArray(n,a)}get items(){return this._def.items}rest(e){return new ie({...this._def,rest:e})}}ie.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ie({items:t,typeName:N.ZodTuple,rest:null,...R(e)})};class Fn extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==k.map)return w(s,{code:x.invalid_type,expected:k.map,received:s.parsedType}),A;const o=this._def.keyType,a=this._def.valueType,c=[...s.data.entries()].map(([i,d],m)=>({key:o._parse(new ne(s,i,s.path,[m,"key"])),value:a._parse(new ne(s,d,s.path,[m,"value"]))}));if(s.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const d of c){const m=await d.key,f=await d.value;if(m.status==="aborted"||f.status==="aborted")return A;(m.status==="dirty"||f.status==="dirty")&&n.dirty(),i.set(m.value,f.value)}return{status:n.value,value:i}})}else{const i=new Map;for(const d of c){const m=d.key,f=d.value;if(m.status==="aborted"||f.status==="aborted")return A;(m.status==="dirty"||f.status==="dirty")&&n.dirty(),i.set(m.value,f.value)}return{status:n.value,value:i}}}}Fn.create=(t,e,n)=>new Fn({valueType:e,keyType:t,typeName:N.ZodMap,...R(n)});class Le extends L{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==k.set)return w(s,{code:x.invalid_type,expected:k.set,received:s.parsedType}),A;const o=this._def;o.minSize!==null&&s.data.size<o.minSize.value&&(w(s,{code:x.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&s.data.size>o.maxSize.value&&(w(s,{code:x.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const a=this._def.valueType;function c(d){const m=new Set;for(const f of d){if(f.status==="aborted")return A;f.status==="dirty"&&n.dirty(),m.add(f.value)}return{status:n.value,value:m}}const i=[...s.data.values()].map((d,m)=>a._parse(new ne(s,d,s.path,m)));return s.common.async?Promise.all(i).then(d=>c(d)):c(i)}min(e,n){return new Le({...this._def,minSize:{value:e,message:I.toString(n)}})}max(e,n){return new Le({...this._def,maxSize:{value:e,message:I.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Le.create=(t,e)=>new Le({valueType:t,minSize:null,maxSize:null,typeName:N.ZodSet,...R(e)});class Mn extends L{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Mn.create=(t,e)=>new Mn({getter:t,typeName:N.ZodLazy,...R(e)});class Nt extends L{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return w(n,{received:n.data,code:x.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}Nt.create=(t,e)=>new Nt({value:t,typeName:N.ZodLiteral,...R(e)});function Rs(t,e){return new ye({values:t,typeName:N.ZodEnum,...R(e)})}class ye extends L{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),s=this._def.values;return w(n,{expected:F.joinValues(s),received:n.parsedType,code:x.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),s=this._def.values;return w(n,{received:n.data,code:x.invalid_enum_value,options:s}),A}return Z(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ye.create(e,{...this._def,...n})}exclude(e,n=this._def){return ye.create(this.options.filter(s=>!e.includes(s)),{...this._def,...n})}}ye.create=Rs;class Vn extends L{_parse(e){const n=F.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==k.string&&s.parsedType!==k.number){const o=F.objectValues(n);return w(s,{expected:F.joinValues(o),received:s.parsedType,code:x.invalid_type}),A}if(this._cache||(this._cache=new Set(F.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=F.objectValues(n);return w(s,{received:s.data,code:x.invalid_enum_value,options:o}),A}return Z(e.data)}get enum(){return this._def.values}}Vn.create=(t,e)=>new Vn({values:t,typeName:N.ZodNativeEnum,...R(e)});class tt extends L{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==k.promise&&n.common.async===!1)return w(n,{code:x.invalid_type,expected:k.promise,received:n.parsedType}),A;const s=n.parsedType===k.promise?n.data:Promise.resolve(n.data);return Z(s.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}tt.create=(t,e)=>new tt({type:t,typeName:N.ZodPromise,...R(e)});class ve extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:s}=this._processInputParams(e),o=this._def.effect||null,a={addIssue:c=>{w(s,c),c.fatal?n.abort():n.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="preprocess"){const c=o.transform(s.data,a);if(s.common.async)return Promise.resolve(c).then(async i=>{if(n.value==="aborted")return A;const d=await this._def.schema._parseAsync({data:i,path:s.path,parent:s});return d.status==="aborted"?A:d.status==="dirty"||n.value==="dirty"?Pe(d.value):d});{if(n.value==="aborted")return A;const i=this._def.schema._parseSync({data:c,path:s.path,parent:s});return i.status==="aborted"?A:i.status==="dirty"||n.value==="dirty"?Pe(i.value):i}}if(o.type==="refinement"){const c=i=>{const d=o.refinement(i,a);if(s.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?A:(i.status==="dirty"&&n.dirty(),c(i.value),{status:n.value,value:i.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>i.status==="aborted"?A:(i.status==="dirty"&&n.dirty(),c(i.value).then(()=>({status:n.value,value:i.value}))))}if(o.type==="transform")if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!xe(c))return A;const i=o.transform(c.value,a);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:i}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>xe(c)?Promise.resolve(o.transform(c.value,a)).then(i=>({status:n.value,value:i})):A);F.assertNever(o)}}ve.create=(t,e,n)=>new ve({schema:t,typeName:N.ZodEffects,effect:e,...R(n)});ve.createWithPreprocess=(t,e,n)=>new ve({schema:e,effect:{type:"preprocess",transform:t},typeName:N.ZodEffects,...R(n)});class te extends L{_parse(e){return this._getType(e)===k.undefined?Z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}te.create=(t,e)=>new te({innerType:t,typeName:N.ZodOptional,...R(e)});class be extends L{_parse(e){return this._getType(e)===k.null?Z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}be.create=(t,e)=>new be({innerType:t,typeName:N.ZodNullable,...R(e)});class Dt extends L{_parse(e){const{ctx:n}=this._processInputParams(e);let s=n.data;return n.parsedType===k.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Dt.create=(t,e)=>new Dt({innerType:t,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...R(e)});class Ot extends L{_parse(e){const{ctx:n}=this._processInputParams(e),s={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Ye(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new q(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new q(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Ot.create=(t,e)=>new Ot({innerType:t,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...R(e)});class Bn extends L{_parse(e){if(this._getType(e)!==k.nan){const s=this._getOrReturnCtx(e);return w(s,{code:x.invalid_type,expected:k.nan,received:s.parsedType}),A}return{status:"valid",value:e.data}}}Bn.create=t=>new Bn({typeName:N.ZodNaN,...R(t)});class Nr extends L{_parse(e){const{ctx:n}=this._processInputParams(e),s=n.data;return this._def.type._parse({data:s,path:n.path,parent:n})}unwrap(){return this._def.type}}class Kt extends L{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?A:a.status==="dirty"?(n.dirty(),Pe(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?A:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(e,n){return new Kt({in:e,out:n,typeName:N.ZodPipeline})}}class Rt extends L{_parse(e){const n=this._def.innerType._parse(e),s=o=>(xe(o)&&(o.value=Object.freeze(o.value)),o);return Ye(n)?n.then(o=>s(o)):s(n)}unwrap(){return this._def.innerType}}Rt.create=(t,e)=>new Rt({innerType:t,typeName:N.ZodReadonly,...R(e)});var N;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(N||(N={}));const X=Q.create;se.create;W.create;Qe.create;et.create;ie.create;const rt=Nt.create,Dr=ye.create;tt.create;te.create;be.create;const $n=P.createExtensionSchema({type:rt("dashboard.summary").describe("Extension type, must be 'dashboard.summary'"),dashboardKey:X().min(1,"Dashboard key is required").describe("Key used to identify which dashboard this summary belongs to")},{rankable:!0}),at=P.extensionPointId("ddk","dashboard","summary"),Ut=P.defineExtensionPoint({id:at,contributionKey:"dashboardSummary",displayName:"Dashboard Summary",description:"Extension point for dashboard summary plugin configurations with view support",hasView:!0,isRankable:!0,schema:$n,metadata:{exportName:"DashboardSummaryExtension",category:"Dashboard",tags:["dashboard","summary","visualization"]},validate:(t,e)=>{P.validateWithSchema($n,t,e)&&P.validateRankIfPresent(t,e)},transform:P.createViewAwareTransform()}),Or=at,Rr=`${at}.def`,Lr=`${at}.view`,Kn=P.createExtensionSchema({type:rt("dashboard.detail").describe("Extension type, must be 'dashboard.detail'"),dashboardKey:X().min(1,"Dashboard key is required").describe("Key used to identify which dashboard this detail belongs to")},{rankable:!0}),it=P.extensionPointId("ddk","dashboard","detail"),zt=P.defineExtensionPoint({id:it,contributionKey:"dashboardDetail",displayName:"Dashboard Detail",description:"Extension point for dashboard detail plugin configurations with view support",hasView:!0,isRankable:!0,schema:Kn,metadata:{exportName:"DashboardDetailExtension",category:"Dashboard",tags:["dashboard","detail","visualization"]},validate:(t,e)=>{P.validateWithSchema(Kn,t,e)&&P.validateRankIfPresent(t,e)},transform:P.createViewAwareTransform()}),Fr=it,Mr=`${it}.def`,Vr=`${it}.view`,Un=P.createExtensionSchema({type:rt("dashboard.detail.pump").describe("Extension type, must be 'dashboard.detail.pump'"),dashboardKey:X().min(1,"Dashboard key is required").describe("Key used to match this extension with specific dashboard pumps")},{rankable:!0}),ct=P.extensionPointId("ddk","dashboard","pump-detail"),ce=P.defineExtensionPoint({id:ct,contributionKey:"dashboardPumpDetail",displayName:"Dashboard Pump Detail",description:"Extension point for dashboard pump detail plugin configurations with view support",hasView:!0,isRankable:!0,schema:Un,metadata:{exportName:"DashboardPumpDetailExtension"},validate:(t,e)=>{P.validateWithSchema(Un,t,e)&&P.validateRankIfPresent(t,e)},transform:P.createViewAwareTransform()}),Br=ct,$r=`${ct}.def`,Kr=`${ct}.view`,zn=P.createExtensionSchema({cuiDescriptor:X().min(1,"CUI descriptor is required").describe("Descriptor used to identify and categorize the CUI functionality"),modalMode:Dr(["fullscreen","maximized"]).optional().describe("Modal display mode for the CUI interface")}),lt=P.extensionPointId("ddk","cui"),dt=P.defineExtensionPoint({id:lt,contributionKey:"cui",displayName:"CUI (Consumer User Interface)",description:"Extension point for CUI plugin configurations with view support",hasView:!0,isRankable:!1,schema:zn,metadata:{exportName:"CuiExtension",category:"Interface",tags:["cui","user-interface","consumer"]},validate:(t,e)=>{P.validateWithSchema(zn,t,e)&&P.validateDescriptorFormat("CUI descriptor",t.cuiDescriptor,e)},transform:P.createViewAwareTransform()}),Ur=lt,zr=`${lt}.def`,Zr=`${lt}.view`,Zn=P.createExtensionSchema({navDescriptor:X().min(1,"Navigation descriptor is required").describe("Descriptor used to identify and map the navigation functionality")}),ut=P.extensionPointId("ddk","nav","view"),Zt=P.defineExtensionPoint({id:ut,contributionKey:"navViews",displayName:"Navigation Views",description:"Extension point for navigation view plugin configurations with view support",hasView:!0,isRankable:!1,schema:Zn,metadata:{exportName:"NavViewExtension",category:"Navigation",tags:["navigation","nav","views","routing"]},validate:(t,e)=>{P.validateWithSchema(Zn,t,e)&&P.validateDescriptorFormat("Navigation descriptor",t.navDescriptor,e)},transform:P.createViewAwareTransform()}),Hr=ut,Wr=`${ut}.def`,Xr=`${ut}.view`,Hn=P.createExtensionSchema({setupDescriptor:X().min(1,"Setup descriptor is required").describe("Descriptor used to identify and categorize the setup step")},{rankable:!0}),mt=P.extensionPointId("ddk","setup"),Me=P.defineExtensionPoint({id:mt,contributionKey:"setupStep",displayName:"Setup Steps",description:"Extension point for setup step plugin configurations with view support",hasView:!0,isRankable:!0,schema:Hn,metadata:{exportName:"SetupExtension",category:"Setup",tags:["setup","configuration","steps","wizard"]},validate:(t,e)=>{P.validateWithSchema(Hn,t,e)&&(P.validateDescriptorFormat("Setup descriptor",t.setupDescriptor,e),P.validateRankIfPresent(t,e))},transform:P.createViewAwareTransform()}),qr=mt,Gr=`${mt}.def`,Yr=`${mt}.view`,Wn=P.createExtensionSchema({type:rt("trouble.action").describe("Extension type, must be 'trouble.action'"),troubleType:X().min(1,"Trouble type is required").describe("Specific trouble type from TroubleContainer that triggers this action (e.g., 'pump-motor-fault', 'sensor-calibration-error'). This must match the exact trouble type string emitted by the device/system."),stateKey:X().min(1,"State key is required").describe("Normalized state key for grouping related troubles under a common UI experience (e.g., 'pumpProblem', 'sensorIssue'). Multiple troubleTypes can share the same stateKey to show the same troubleshooting component. If not provided, defaults to troubleType for 1:1 mapping."),stateValue:X().min(1,"State value is required").describe("Value set in the reactive state when this trouble becomes active (e.g., 'pump-failure', 'needs-calibration'). Used by other components to detect trouble categories and trigger appropriate responses. If not provided, defaults to troubleType.")},{rankable:!0}),pt=P.extensionPointId("ddk","trouble","action"),Ce=P.defineExtensionPoint({id:pt,contributionKey:"troubleActions",displayName:"Trouble Actions",description:"Extension point for trouble action plugin configurations with view support",hasView:!0,isRankable:!0,schema:Wn,metadata:{exportName:"TroubleActionExtension",category:"Trouble Management",tags:["trouble","action","state","error-handling"]},validate:(t,e)=>{P.validateWithSchema(Wn,t,e)&&P.validateRankIfPresent(t,e)},transform:P.createViewAwareTransform()}),Jr=pt,Qr=`${pt}.def`,ea=`${pt}.view`,Xn=P.createExtensionSchema({viewKey:X().min(1,"View key is required").describe("Key identifying the UI region where this component should be rendered (e.g., 'settings.config', 'dashboard.sidebar'). Multiple plugins can contribute to the same viewKey, and all will be rendered in the designated region.")},{rankable:!0}),ht=P.extensionPointId("ddk","view"),Ht=P.defineExtensionPoint({id:ht,contributionKey:"views",displayName:"Views",description:"Extension point for view plugin configurations with regional rendering support",hasView:!0,isRankable:!0,schema:Xn,metadata:{exportName:"ViewExtension",category:"UI Layout",tags:["views","ui","rendering","layout","regions"]},validate:(t,e)=>{P.validateWithSchema(Xn,t,e)&&(t.viewKey&&(t.viewKey.includes(".")||e.addInfo(`ViewKey '${t.viewKey}' might benefit from dot notation (e.g., 'settings.config', 'dashboard.sidebar') for better organization`),["view","content","main"].includes(t.viewKey)&&e.addWarning(`ViewKey '${t.viewKey}' is very generic - consider using more specific keys like 'settings.main' or 'dashboard.content'`)),P.validateRankIfPresent(t,e))},transform:P.createViewAwareTransform()}),ta=ht,na=`${ht}.def`,sa=`${ht}.view`,oa="ddk.ncui.utilities",qn={[Me.id]:"setupDescriptor",[dt.id]:"cuiDescriptor",[oa]:"utilDescriptor"},Ls=({defaultNamespace:t,extensionPoint:e})=>{const{getExtensions:n}=ae.useKosPluginsContext(),s=n(e),o=s.map(d=>d.data.namespace)||[],{t:a}=u.useKosTranslation([t,...new Set(o)]),c=s.reduce((d,m)=>{const f=m,h=f.data;return d[h[qn[e]]]={extension:e,module:f.id,namespace:h.namespace,title:h.title},d},{}),i=s.reduce((d,m)=>{const h=m.data;return d[h[qn[e]]]=`${h.namespace}:${h.title}`,d},{});return{namespaces:o,t:a,labelMap:i,contributionMap:c}},_e=(t,e)=>{const n=p.useMemo(()=>({agitate:ps,calibrate:({holder:c,pump:i,onComplete:d})=>{const m=u.getKosCompanionModel(i??c.pumps.data[0],B.FcmPump.type);return r.jsx(xs,{pump:m,onComplete:d})},calibrateSPM:({holder:c,pump:i,onComplete:d})=>{const m=u.getKosCompanionModel(i??c.pumps.data[0],B.SpmPump.type);return r.jsx(lo,{pump:m,onComplete:d})},diagnostics:({holder:c,pump:i,onComplete:d})=>{const m=u.getKosCompanionModel(i??c.pumps.data[0],B.FcmPump.type);return r.jsx(Is,{pump:m,onComplete:d})},"replace-pump":({holder:c,pump:i,onComplete:d})=>r.jsx(oo,{pump:i??c.pumps.data[0],onComplete:d}),"rfid-override":ro,"replace-line":({holder:c,onComplete:i})=>r.jsx(so,{holder:c,onComplete:i})}),[]),[s,o]=p.useState(void 0),a=s?n[s]:void 0;return{holderExperience:a?r.jsx(a,{holder:t,pump:e,onComplete:()=>{o(void 0)}}):void 0,setHolderExperience:o,currentExperienceId:s}},Wt=p.createContext(void 0),ra=({children:t,value:e})=>r.jsx(Wt.Provider,{value:e,children:t}),aa=t=>({HolderContent:void 0}),Xt=(t,e=aa)=>{const n=p.useContext(Wt);return e=(n==null?void 0:n.actionFactory)||e,e(t)},qt=()=>{const t=j.IngredientSummary.type;return u.useKosModel({modelId:t,modelType:j.IngredientSummary.type,options:{}})};function ia(t){return()=>e=>{const{model:n,status:s,KosModelLoader:o}=qt();return r.jsx(o,{...s,children:r.jsx(t,{...e,ingredientSummary:n})})}}const Gt=()=>{const t=j.MacroAssignment.type;return u.useKosModel({modelId:t,modelType:j.MacroAssignment.type,options:{}})};function Fs(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Gt();return r.jsx(o,{...s,children:r.jsx(t,{...e,macroAssignment:n})})}}const Yt=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.NetworkTest.type,options:{}})};function ca(t){return e=>n=>{const{model:s,status:o,KosModelLoader:a}=Yt(e);return r.jsx(a,{...o,children:r.jsx(t,{...n,networkTest:s})})}}const Jt=()=>{const t=j.NetworkTestContainer.type;return u.useKosModel({modelId:t,modelType:j.NetworkTestContainer.type,options:{}})};function Ms(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Jt();return r.jsx(o,{...s,children:r.jsx(t,{...e,networkTestContainer:n})})}}const Vs=()=>{const t=j.NutritiveSweetener.type;return u.useKosModel({modelId:t,modelType:j.NutritiveSweetener.type,options:{}})};function la(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Vs();return r.jsx(o,{...s,children:r.jsx(t,{...e,nutritiveSweetener:n})})}}const Bs=()=>{const t=j.PlainWater.type;return u.useKosModel({modelId:t,modelType:j.PlainWater.type,options:{},destroyOnUnmount:!0})};function da(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Bs();return r.jsx(o,{...s,children:r.jsx(t,{...e,plainWater:n})})}}const $s=t=>{switch(t.type){case"fcm":return B.FcmPump.type;case"lfcv":return B.LfcvPump.type;case"micro":return B.SpmPump.type;case"cgp":return B.CgpPump.type;default:return}},ee="pluginVisibility",Ge=new Map;u.registerExtensionPoint(ee,{register:(t,e)=>{var n;Ge.has(t)||Ge.set(t,[]),(n=Ge.get(t))==null||n.push(e)},execute:(t,e,n)=>{const s=Ge.get(t);if(!s)return!0;const o=s.map(a=>a(e,n));return o.length===0?!0:!o.includes(!1)}});class Ks{constructor(e,n){M(this,"core");M(this,"dispense");this.core=e,this.dispense=n}registerDashboardVisibilityFilter(e){return u.ExtensionManager[ee].register(ee,e),this}registerNavVisibilityFilter(e){return u.ExtensionManager[ee].register(ee,e),this}}class Us{constructor(){M(this,"dispense");M(this,"core");M(this,"plugin");this.dispense=new Ae.DispenseExtensionManager,this.core=new u.CoreExtensionManager,this.plugin=new Ks(this.core,this.dispense)}}const ua={UTILITIES:"ddk.ncui.utilities"},ma=ua.UTILITIES;Ut.register();zt.register();ce.register();dt.register();Zt.register();Me.register();Ce.register();Ht.register();console.log("JSON-defined UtilitiesExtension ID:",ma);console.log("Registered DashboardSummaryExtension:",Ut.id);console.log("Registered DashboardDetailExtension:",zt.id);console.log("Registered DashboardPumpDetailExtension:",ce.id);console.log("Registered CuiExtension:",dt.id);console.log("Registered NavViewExtension:",Zt.id);console.log("Registered SetupExtension:",Me.id);console.log("Registered TroubleActionExtension:",Ce.id);console.log("Registered ViewExtension:",Ht.id);const pa=()=>{B.KosModelRegistry.freestyle.models().model(j.Lockout).model(u.Device).model(j.TroubleActionManager).model(j.CopyLogs).model(j.Door).model(j.AgitationControl).companion(Ae.Assembly.type,()=>{if(u.KosFeatureFlags.isFeatureEnabled("carbTank"))return B.CarbAgitator.type}).companion(Ae.Pump.type,$s).companion(u.TroubleContainer.type,j.AgitationControl.type).preload(j.Application.type),Object.keys(j.DDKModels).forEach(c=>{const i=j.DDKModels[c];u.registerLegacyModel(B.KosModelRegistry)(c,i)}),new B.KosExtensionManager().freestyle.initializeFreestyleExtension();const{KosCoreContextProvider:e}=u.initKosProvider(),n={rank:999,factory:c=>{var i;return(i=c.pumps.data[0])==null?void 0:i.type}};u.ExtensionManager.registerDashboardKeyFactory(n);const s=(c,i)=>{if(c!=="settings.ice"||!i)return!0;const{assembly:d}=i;return!!(d!=null&&d.supportsIce)},o=(c,i)=>{if(c!=="settings.remoteNNS"&&c!=="dashboard.remoteNNS"||!i)return!0;const{assembly:d}=i;if(!d)return!0;const m=u.getKosCompanionModel(d,B.FreestyleAssembly.type);return!!(m!=null&&m.supportsRemoteTrays)};return new Us().plugin.registerNavVisibilityFilter(s).registerNavVisibilityFilter(o),{KosCoreContextProvider:e}},Ve=t=>t?zs(t.type):{action:"",label:"",progress:"",summary:""},zs=t=>{const e=`troubles:troubles.${t}`;return{action:`${e}.action`,label:`${e}.label`,progress:`${e}.progress`,summary:`${e}.summary`}},Be=t=>{const e=ae.useReactiveExtensionRegistry(),[,n]=p.useState({}),[s]=p.useState(new Set);return p.useEffect(()=>{const a=[];return s.forEach(c=>{const i=e.subscribe(c,()=>{n({})});a.push(i)}),()=>{a.forEach(c=>c())}},[e,s]),{getExtensions:p.useCallback(a=>(s.add(a),Object.values(e.getExtensions(a,!1)).filter(d=>{const m=d.id;return u.ExtensionManager[ee].execute(ee,m,t)})),[e,t,s])}},ft=()=>{const t=j.Reboot.type;return u.useKosModel({modelId:t,modelType:j.Reboot.type,options:{}})};function ha(t){return()=>e=>{const{model:n,status:s,KosModelLoader:o}=ft();return r.jsx(o,{...s,children:r.jsx(t,{...e,reboot:n})})}}const gt=()=>{const t=j.Settings.type;return u.useKosModel({modelId:t,modelType:j.Settings.type,options:{}})};function Qt(t){return e=>{const{model:n,status:s,KosModelLoader:o}=gt();return r.jsx(o,{...s,children:r.jsx(t,{...e,settings:n})})}}const en=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.SetupStep.type,options:{}})};function fa(t){return e=>n=>{const{model:s,status:o,KosModelLoader:a}=en(e);return r.jsx(a,{...o,children:r.jsx(t,{...n,setupStep:s})})}}const tn=()=>{const t=j.SetupStepContainer.type;return u.useKosModel({modelId:t,modelType:j.SetupStepContainer.type,options:{}})};function Zs(t){return e=>{const{model:n,status:s,KosModelLoader:o}=tn();return r.jsx(o,{...s,children:r.jsx(t,{...e,setupStepContainer:n})})}}const Hs=t=>{const[e,n]=p.useState(),[s,o]=le(t),a=e&&e>0;return p.useEffect(()=>{async function c(){if((t==null?void 0:t.ingredientId)!==void 0){const i=await(t==null?void 0:t.resolveIntentVolume("CALIBRATE"));n(Math.round(i.volume))}}c()},[t,t==null?void 0:t.ingredientId]),{calibrateVolume:e,canCalibrate:a,action:s,handleAction:o}},Ws=()=>{const t=j.Start.type;return u.useKosModel({modelId:t,modelType:j.Start.type,options:{}})};function ga(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Ws();return r.jsx(o,{...s,children:r.jsx(t,{...e,start:n})})}}const nn=()=>{const t=j.TroubleActionManager.type,{getExtensions:e}=Be(),n=e(Ce.id).map(o=>o.data);return u.useKosModel({modelId:t,modelType:j.TroubleActionManager.type,options:{definitions:n}})};function xa(t){return e=>{const{model:n,status:s,KosModelLoader:o}=nn();return r.jsx(o,{...s,children:r.jsx(t,{...e,troubleAction:n})})}}const xt=t=>{const[e,n]=p.useState({});return p.useEffect(()=>{async function s(){if(t){const o=await u.troubleDataFactory(t);n(o)}}s()},[t]),e},ya=t=>!t||t==="white",va=t=>t?void 0:"white",Xs=t=>{if(!u.isTroubleAware(t))return{};const e=t,{visibleTroubles:n,initialized:s}=ke(e),o=(n==null?void 0:n.length)??0,a=n==null?void 0:n[0],c=o>0,i=c?`${a==null?void 0:a.color}`:void 0,d=ya(i),m=c?va(d):void 0;return{backgroundColor:i,fontColor:m,highestTrouble:a,initialized:s,troubleCount:o,hasTroubles:c}},ba=({troubleType:t,condition:e})=>{const{model:n}=u.useTroubleContainerModel(),[s,o]=p.useState(!1),[a,c]=p.useState([]);return p.useEffect(()=>u.kosAutoEffect(()=>{const d=(t?n==null?void 0:n.troubles.getIndexByKey("byType",t):n==null?void 0:n.troubles.data)||[],m=e?d.filter(e):d;o(m.length>0),c(m)}),[e,n,t]),[s,a.length>0?a[0]:void 0,a]},sn=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.Utilities.type,options:{}})};function Ca(t){return e=>n=>{const{model:s,status:o,KosModelLoader:a}=sn(e);return r.jsx(a,{...o,children:r.jsx(t,{...n,utilities:s})})}}const on=()=>{const t=j.UtilitiesContainer.type;return u.useKosModel({modelId:t,modelType:j.UtilitiesContainer.type,options:{}})};function wa(t){return e=>{const{model:n,status:s,KosModelLoader:o}=on();return r.jsx(o,{...s,children:r.jsx(t,{...e,utilitiesContainer:n})})}}const qs=u.withDevice(u.kosComponent(({device:t})=>{const{t:e}=u.useKosTranslation("dispenser-profile"),s=t.serialNumber==="unassigned"?void 0:t.serialNumber;return r.jsx(l.InfoCard,{label:e("dispenser-serial"),value:s})})),_a=As(u.kosComponent(({dispenserInfo:t})=>{const{t:e}=u.useKosTranslation("dispenser-profile");return r.jsxs(r.Fragment,{children:[r.jsx(bs,{label:e("dispenser-name","Dispenser Name"),configProperty:t.name}),r.jsx(qs,{})]})})),ka=Qt(u.kosComponent(({settings:t})=>{const{t:e}=u.useKosTranslation("dispenser-profile"),n=s=>{if(s&&s.length>=25)return"The name shouldn’t exceed 25 characters."};return r.jsxs(r.Fragment,{children:[r.jsx(st,{closeButtonLabel:e("close","Close")||void 0,configProperty:t==null?void 0:t.name,isValid:n,label:e("dispenser-name","Dispenser Name"),layout:"alphanumeric",maxLength:25}),r.jsx(Ss,{label:e("activate-and-reboot-time"),configProperty:t.activateAndRebootTime})]})})),Gs=S(l.LabelDate)`
|
|
164
|
+
`,Is=({configProperties:t,disabled:e,enabledConfigProperty:n})=>{const{value:s}=u.useConfigProperty({configProperty:n}),o=s==="true",{componentModeOverride:a}=l.useComponentConfigurationContext(),c=t.length===1,i=c?Qo:Ts;return r.jsxs(Go,{disabled:!o||e,mode:a,children:[r.jsx(Jo,{children:t.map(d=>r.jsx(i,{disabled:!o||e,label:d.options?d.options.label:void 0,configProperty:d.configProperty,collapse:!c&&a==="standard",layout:d.options?d.options.layout:void 0,float:!0,hideUnits:d.options?d.options.hideUnits:void 0},d.configProperty.id))}),r.jsx(er,{compact:!c||a==="compact",children:r.jsx(De,{alwaysShowLabel:!0,collapse:!0,configProperty:n,disabled:e,stretch:a==="compact"})})]})},tr=({configProperty:t,disabled:e,enabledConfigProperty:n,options:s})=>{const o=p.useMemo(()=>[{configProperty:t,options:s}],[t,s]);return r.jsx(Is,{configProperties:o,disabled:e,enabledConfigProperty:n})},js=({configProperty:t,...e})=>{const{value:n}=u.useConfigProperty({configProperty:t}),s=o=>{o!==void 0&&(t==null||t.updateProperty(String(o)))};return r.jsx(l.SwitchCard,{...e,onChange:s,value:n})},Es=({description:t,float:e,label:n,modalTitle:s,onSave:o,time:a,...c})=>{const{regionModel:i}=u.useKosRegions(),{t:d}=u.useKosTranslation("common",{keyPrefix:"schedule"}),{amPmOptions:m,formattedTime:h,hourOptions:f,minuteOptions:g,setTime:v,time:b}=u.useRegionTimeProps({initialDate:a}),x=b.getHours(),T=p.useMemo(()=>[{id:"hr",items:f,selectedItemId:x<12?x:x-12,loop:!0},{id:"min",items:g,selectedItemId:b.getMinutes(),loop:!0},{id:"ampm",items:m,selectedItemId:x<12?"AM":"PM"}],[m,f,g,b,x]),R=p.useMemo(()=>[{id:"hr",items:f,selectedItemId:x,loop:!0},{id:"min",items:g,selectedItemId:b.getMinutes(),loop:!0}],[f,g,b,x]);return r.jsx(l.MultiPickerCard,{...c,cancelButtonLabel:d("discard-changes","Discard Changes")||void 0,closeButtonLabel:d("close","Close")||void 0,data:i!=null&&i.is12HourTimeFormat?T:R,description:t,displayValue:h,float:e,icon:_e.TimeIcon,label:n,modalTitle:s,proceedButtonLabel:d("save","Save")||void 0,onSave:D=>{const P=i!=null&&i.is12HourTimeFormat?D.ampm==="AM"?D.hr:D.hr+12:D.hr,E=D.min,_=new Date(b);_.setHours(P),_.setMinutes(E),v(_),o==null||o({hours:P,minutes:E})}})},Ps=({configProperty:t,...e})=>{var h;const{getStagedChange:n,updateStagedChange:s}=Ut(),{value:o}=u.useConfigProperty({configProperty:t}),a=((h=n==null?void 0:n(t.id))==null?void 0:h.value)??o,{hours:c,minutes:i}=j.toTimeComponents(Number(a)),d=new Date;d.setHours(c),d.setMinutes(i);const m=f=>{const g=j.toSeconds(f.hours,f.minutes);s?s(t.id,{configProperty:t,value:g}):t.updateProperty(g)};return r.jsx(Es,{...e,onSave:m,time:d})},nr=[0,6],As=({day:t=new Date().getDate(),month:e=new Date().getMonth(),onSave:n,year:s=new Date().getFullYear(),...o})=>{var v,b,x,T,R,D;const{t:a}=u.useKosTranslation("region"),{regionModel:c}=u.useKosRegions(),i=u.useDateProps({date:{year:s,month:e,day:t},formatOptions:{dayFormat:"short",yearFormat:"long",monthFormat:"long",formatString:(c==null?void 0:c.selectedDateFormat)||"yyyy/MM/dd"},filterOptions:{daysOfWeekFilter:nr,yearsRange:[s-10,s+10]}}),d=p.useMemo(()=>{var P,E;return(E=(P=i==null?void 0:i.dateState)==null?void 0:P.yearsOptionsArray)==null?void 0:E.map(_=>({id:_.value,label:_.label}))},[(v=i==null?void 0:i.dateState)==null?void 0:v.yearsOptionsArray]),m=p.useMemo(()=>{var P,E;return(E=(P=i==null?void 0:i.dateState)==null?void 0:P.daysOptionsArray)==null?void 0:E.map(_=>({id:_.value,label:_.label}))},[(b=i==null?void 0:i.dateState)==null?void 0:b.daysOptionsArray]),h=p.useMemo(()=>{var P,E;return(E=(P=i==null?void 0:i.dateState)==null?void 0:P.monthsOptionsArray)==null?void 0:E.map(_=>({id:_.value,label:String(_.label)}))},[(x=i==null?void 0:i.dateState)==null?void 0:x.monthsOptionsArray]),f=p.useMemo(()=>{const P=[];return c==null||c.selectedDateOrder.split("").forEach(E=>{var _,U,q;E==="y"?P.push({id:"year",items:d,selectedItemId:(_=i==null?void 0:i.dateState)==null?void 0:_.year,loop:!1}):E==="m"?P.push({id:"month",items:h,selectedItemId:(U=i==null?void 0:i.dateState)==null?void 0:U.month}):E==="d"&&P.push({id:"day",items:m,selectedItemId:(q=i==null?void 0:i.dateState)==null?void 0:q.day,loop:!1})}),P},[(T=i==null?void 0:i.dateState)==null?void 0:T.day,(R=i==null?void 0:i.dateState)==null?void 0:R.month,(D=i==null?void 0:i.dateState)==null?void 0:D.year,m,h,c==null?void 0:c.selectedDateOrder,d]),g=p.useCallback(async P=>{const _=new Date(P.year,P.month+1,0).getDate(),U=P.day>_?1:P.day;n({day:U,month:P.month,year:P.year})},[n]);return r.jsx(l.MultiPickerCard,{cancelButtonLabel:a("discard-changes","Discard Changes")||void 0,closeButtonLabel:a("close","Close")||void 0,data:f,displayValue:i.dateState.formattedDate,icon:_e.CalendarIcon,label:a("todays-date","Today's Date"),onSave:g,proceedButtonLabel:a("save","Save")||void 0,...o})},Ns=u.kosComponent(({pump:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"fcm-diagnostics"}),[s,o]=p.useState("idle"),[a,c]=p.useState(),i=p.useCallback(async()=>{o("test"),c(void 0);const m=await t.performElectricalTest();m.error?(c(m.error),o("failure")):m.result==="errEEPROM"?(c("errEEPROM"),o("failure")):o("success")},[t]),d=p.useMemo(()=>({idle:{information:r.jsx(l.LabelInformation,{children:n("perform-electrical-test")}),footer:r.jsx(l.Button,{onPointerDown:i,children:n("electrical-test")})},test:{information:r.jsx(l.LabelInformation,{children:n("testing")}),footer:r.jsx(l.Button,{disabled:!0,children:n("electrical-test")}),status:"loading"},success:{information:r.jsx(l.LabelInformation,{children:n("electrical-test-success-header")}),footer:r.jsx(l.Button,{onPointerDown:i,children:n("electrical-test")}),status:"success"},failure:{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("electrical-test-failure-header")}),r.jsx(l.BodyMediumInformation,{children:n(`error.${a}`)})]}),footer:r.jsx(l.Button,{onPointerDown:i,children:n("electrical-test")}),status:"information"}}),[a,n,i]);return r.jsx(l.WorkflowModal,{title:n(t.name),...d[s],onClose:()=>e()})}),Ot={title:"",summary:"",successMessage:"",failureMessage:"",actionLabel:""},sr=t=>{const[e,n]=p.useState(null),[s,o]=p.useState(Ot),a=t.map(c=>{const[i,,d]=c;return[i==null?void 0:i.future,i,d]}).flat();return p.useEffect(()=>{const c=t.find(i=>{const[d]=i;return!!(d!=null&&d.future)});c?(n(c[0]),o(c[2])):(n(null),o(Ot))},[...a,t]),[e,s]},or=t=>{switch(t){case"calibrate":return as;case"fixed-45":return is;case"flush":return cs;case"high-flow-test":return ls;case"hold-to-pour":return ds;case"low-flow-test":return us;case"manual-override":return ms;case"msv-reset":return ps;case"prime":return hs;case"purge":return fs;default:return}},rr=t=>(e,n="intents")=>({title:t(`${n}:troubles.${e}.progress`),summary:t(`${n}:troubles.${e}.summary`),successMessage:t(`${n}:troubles.${e}.success`),failureMessage:t(`${n}:troubles.${e}.error`),actionLabel:t(`${n}:troubles.${e}.action`)}),de=(t,e=or)=>{const{t:n}=u.useKosTranslation("troubles"),[s,o]=p.useState(null),[a,c]=p.useState(Ot),i=p.useCallback(async d=>{const m=e(d);if(m){const h=rr(n)(d);if(c(h),t){const f=new m(t);await f.performAction(),o(f)}}},[e,t,n]);return t?[s,i,a]:[null,i,a]},ar=t=>(u.KosLog.debug(`pumpActionFactory: actionId=${t}`),xs),ir=t=>(e,n="troubles")=>({title:t(`${n}:troubles.${e}.progress`),summary:t(`${n}:troubles.${e}.summary`),successMessage:t(`${n}:troubles.${e}.success`),failureMessage:t(`${n}:troubles.${e}.error`),actionLabel:t(`${n}:troubles.${e}.action`)}),cr=(t,e,n=ar)=>{const{t:s}=u.useKosTranslation("troubles"),[o,a]=p.useState(null),[c]=p.useState(ir(s)(e)),i=p.useCallback(async()=>{const d=n(e);if(d){const m=new d(t,e);await m.performAction(),a(m)}},[n,t,e]);return[o,i,c]};function lr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=$t();return r.jsx(o,{...s,children:r.jsx(t,{...e,agitationControl:n})})}}const zt=()=>{const t=j.Animation.type;return u.useKosModel({modelId:t,modelType:j.Animation.type,options:{}})};function Ds(t){return e=>{const{model:n,status:s,KosModelLoader:o}=zt();return r.jsx(o,{...s,children:r.jsx(t,{...e,animation:n})})}}const Fe=()=>{const t=j.Application.type;return u.useKosModel({modelId:t,modelType:j.Application.type,options:{}})};function dr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Fe();return r.jsx(o,{...s,children:r.jsx(t,{...e,application:n})})}}const Os=()=>{const t=j.CarbWater.type;return u.useKosModel({modelId:t,modelType:j.CarbWater.type,options:{}})};function ur(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Os();return r.jsx(o,{...s,children:r.jsx(t,{...e,carbWater:n})})}}const Rs=()=>{const t=j.CopyLogs.type;return u.useKosModel({modelId:t,modelType:j.CopyLogs.type,options:{},activate:!0,destroyOnUnmount:!0})};function mr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Rs();return r.jsx(o,{...s,children:r.jsx(t,{...e,copyLogs:n})})}}const Ht=()=>{const t=j.DashboardOperations.type;return u.useKosModel({modelId:t,modelType:j.DashboardOperations.type,options:{}})};function pr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Ht();return r.jsx(o,{...s,children:r.jsx(t,{...e,dashboardOperations:n})})}}const Zt=()=>{const t=j.DispenserInfo.type;return u.useKosModel({modelId:t,modelType:j.DispenserInfo.type,options:{}})};function Ms(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Zt();return r.jsx(o,{...s,children:r.jsx(t,{...e,dispenserInfo:n})})}}const Ls=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.Door.type,options:{}})};function hr(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Ls(e.id);return r.jsx(o,{...s,children:r.jsx(t,{...e,door:n})})}}var L;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const a={};for(const c of o)a[c]=c;return a},t.getValidEnumValues=o=>{const a=t.objectKeys(o).filter(i=>typeof o[o[i]]!="number"),c={};for(const i of a)c[i]=o[i];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(a){return o[a]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const a=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&a.push(c);return a},t.find=(o,a)=>{for(const c of o)if(a(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function s(o,a=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}t.joinValues=s,t.jsonStringifyReplacer=(o,a)=>typeof a=="bigint"?a.toString():a})(L||(L={}));var An;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(An||(An={}));const w=L.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Q=t=>{switch(typeof t){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(t)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(t)?w.array:t===null?w.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?w.promise:typeof Map<"u"&&t instanceof Map?w.map:typeof Set<"u"&&t instanceof Set?w.set:typeof Date<"u"&&t instanceof Date?w.date:w.object;default:return w.unknown}},y=L.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class G extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},s={_errors:[]},o=a=>{for(const c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)s._errors.push(n(c));else{let i=s,d=0;for(;d<c.path.length;){const m=c.path[d];d===c.path.length-1?(i[m]=i[m]||{_errors:[]},i[m]._errors.push(n(c))):i[m]=i[m]||{_errors:[]},i=i[m],d++}}};return o(this),s}static assert(e){if(!(e instanceof G))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,L.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},s=[];for(const o of this.issues)if(o.path.length>0){const a=o.path[0];n[a]=n[a]||[],n[a].push(e(o))}else s.push(e(o));return{formErrors:s,fieldErrors:n}}get formErrors(){return this.flatten()}}G.create=t=>new G(t);const Rt=(t,e)=>{let n;switch(t.code){case y.invalid_type:t.received===w.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case y.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,L.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:n=`Unrecognized key(s) in object: ${L.joinValues(t.keys,", ")}`;break;case y.invalid_union:n="Invalid input";break;case y.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${L.joinValues(t.options)}`;break;case y.invalid_enum_value:n=`Invalid enum value. Expected ${L.joinValues(t.options)}, received '${t.received}'`;break;case y.invalid_arguments:n="Invalid function arguments";break;case y.invalid_return_type:n="Invalid function return type";break;case y.invalid_date:n="Invalid date";break;case y.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:L.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case y.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case y.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case y.custom:n="Invalid input";break;case y.invalid_intersection_types:n="Intersection results could not be merged";break;case y.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case y.not_finite:n="Number must be finite";break;default:n=e.defaultError,L.assertNever(t)}return{message:n}};let fr=Rt;function gr(){return fr}const xr=t=>{const{data:e,path:n,errorMaps:s,issueData:o}=t,a=[...n,...o.path||[]],c={...o,path:a};if(o.message!==void 0)return{...o,path:a,message:o.message};let i="";const d=s.filter(m=>!!m).slice().reverse();for(const m of d)i=m(c,{data:e,defaultError:i}).message;return{...o,path:a,message:i}};function C(t,e){const n=gr(),s=xr({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Rt?void 0:Rt].filter(o=>!!o)});t.common.issues.push(s)}class z{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const s=[];for(const o of n){if(o.status==="aborted")return A;o.status==="dirty"&&e.dirty(),s.push(o.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,n){const s=[];for(const o of n){const a=await o.key,c=await o.value;s.push({key:a,value:c})}return z.mergeObjectSync(e,s)}static mergeObjectSync(e,n){const s={};for(const o of n){const{key:a,value:c}=o;if(a.status==="aborted"||c.status==="aborted")return A;a.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(s[a.value]=c.value)}return{status:e.value,value:s}}}const A=Object.freeze({status:"aborted"}),Pe=t=>({status:"dirty",value:t}),Z=t=>({status:"valid",value:t}),Nn=t=>t.status==="aborted",Dn=t=>t.status==="dirty",xe=t=>t.status==="valid",Je=t=>typeof Promise<"u"&&t instanceof Promise;var S;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(S||(S={}));class oe{constructor(e,n,s,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=s,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const On=(t,e)=>{if(xe(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new G(t.common.issues);return this._error=n,this._error}}};function O(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:s,description:o}=t;if(e&&(n||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,i)=>{const{message:d}=t;return c.code==="invalid_enum_value"?{message:d??i.defaultError}:typeof i.data>"u"?{message:d??s??i.defaultError}:c.code!=="invalid_type"?{message:i.defaultError}:{message:d??n??i.defaultError}},description:o}}class M{get description(){return this._def.description}_getType(e){return Q(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new z,ctx:{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Je(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const s=this.safeParse(e,n);if(s.success)return s.data;throw s.error}safeParse(e,n){const s={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},o=this._parseSync({data:e,path:s.path,parent:s});return On(s,o)}"~validate"(e){var s,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return xe(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(o=(s=a==null?void 0:a.message)==null?void 0:s.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>xe(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,n){const s=await this.safeParseAsync(e,n);if(s.success)return s.data;throw s.error}async safeParseAsync(e,n){const s={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},o=this._parse({data:e,path:s.path,parent:s}),a=await(Je(o)?o:Promise.resolve(o));return On(s,a)}refine(e,n){const s=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,a)=>{const c=e(o),i=()=>a.addIssue({code:y.custom,...s(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(d=>d?!0:(i(),!1)):c?!0:(i(),!1)})}refinement(e,n){return this._refinement((s,o)=>e(s)?!0:(o.addIssue(typeof n=="function"?n(s,o):n),!1))}_refinement(e){return new be({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ne.create(this,this._def)}nullable(){return ve.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Y.create(this)}promise(){return nt.create(this,this._def)}or(e){return et.create([this,e],this._def)}and(e){return tt.create(this,e,this._def)}transform(e){return new be({...O(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Ft({...O(this._def),innerType:this,defaultValue:n,typeName:N.ZodDefault})}brand(){return new Br({typeName:N.ZodBranded,type:this,...O(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Vt({...O(this._def),innerType:this,catchValue:n,typeName:N.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Wt.create(this,e)}readonly(){return Bt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const yr=/^c[^\s-]{8,}$/i,br=/^[0-9a-z]+$/,vr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_r=/^[a-z0-9_-]{21}$/i,wr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,kr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Sr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Tr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Nt;const Ir=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Er=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Pr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ar=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fs="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Dr=new RegExp(`^${Fs}$`);function Vs(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Or(t){return new RegExp(`^${Vs(t)}$`)}function Rr(t){let e=`${Fs}T${Vs(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Mr(t,e){return!!((e==="v4"||!e)&&Ir.test(t)||(e==="v6"||!e)&&Er.test(t))}function Lr(t,e){if(!wr.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const s=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(s));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Fr(t,e){return!!((e==="v4"||!e)&&jr.test(t)||(e==="v6"||!e)&&Pr.test(t))}class ee extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==w.string){const a=this._getOrReturnCtx(e);return C(a,{code:y.invalid_type,expected:w.string,received:a.parsedType}),A}const s=new z;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),C(o,{code:y.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(o=this._getOrReturnCtx(e,o),C(o,{code:y.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const c=e.data.length>a.value,i=e.data.length<a.value;(c||i)&&(o=this._getOrReturnCtx(e,o),c?C(o,{code:y.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):i&&C(o,{code:y.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Sr.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"email",code:y.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Nt||(Nt=new RegExp(Tr,"u")),Nt.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"emoji",code:y.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Cr.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"uuid",code:y.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")_r.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"nanoid",code:y.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")yr.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"cuid",code:y.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")br.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"cuid2",code:y.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")vr.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"ulid",code:y.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),C(o,{validation:"url",code:y.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"regex",code:y.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(e,o),C(o,{code:y.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(o=this._getOrReturnCtx(e,o),C(o,{code:y.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),C(o,{code:y.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Rr(a).test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{code:y.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Dr.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{code:y.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Or(a).test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{code:y.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?kr.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"duration",code:y.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Mr(e.data,a.version)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"ip",code:y.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?Lr(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"jwt",code:y.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?Fr(e.data,a.version)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"cidr",code:y.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?Ar.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"base64",code:y.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?Nr.test(e.data)||(o=this._getOrReturnCtx(e,o),C(o,{validation:"base64url",code:y.invalid_string,message:a.message}),s.dirty()):L.assertNever(a);return{status:s.value,value:e.data}}_regex(e,n,s){return this.refinement(o=>e.test(o),{validation:n,code:y.invalid_string,...S.errToObj(s)})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...S.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...S.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...S.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...S.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...S.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...S.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...S.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...S.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...S.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...S.errToObj(n)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}ee.create=t=>new ee({checks:[],typeName:N.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...O(t)});function Vr(t,e){const n=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,o=n>s?n:s,a=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return a%c/10**o}class Oe extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==w.number){const a=this._getOrReturnCtx(e);return C(a,{code:y.invalid_type,expected:w.number,received:a.parsedType}),A}let s;const o=new z;for(const a of this._def.checks)a.kind==="int"?L.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),C(s,{code:y.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),C(s,{code:y.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),C(s,{code:y.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?Vr(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),C(s,{code:y.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),C(s,{code:y.not_finite,message:a.message}),o.dirty()):L.assertNever(a);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,S.toString(n))}gt(e,n){return this.setLimit("min",e,!1,S.toString(n))}lte(e,n){return this.setLimit("max",e,!0,S.toString(n))}lt(e,n){return this.setLimit("max",e,!1,S.toString(n))}setLimit(e,n,s,o){return new Oe({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:S.toString(o)}]})}_addCheck(e){return new Oe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&L.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(n===null||s.value>n)&&(n=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Oe.create=t=>new Oe({checks:[],typeName:N.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...O(t)});class Re extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==w.bigint)return this._getInvalidInput(e);let s;const o=new z;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),C(s,{code:y.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),C(s,{code:y.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),C(s,{code:y.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):L.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return C(n,{code:y.invalid_type,expected:w.bigint,received:n.parsedType}),A}gte(e,n){return this.setLimit("min",e,!0,S.toString(n))}gt(e,n){return this.setLimit("min",e,!1,S.toString(n))}lte(e,n){return this.setLimit("max",e,!0,S.toString(n))}lt(e,n){return this.setLimit("max",e,!1,S.toString(n))}setLimit(e,n,s,o){return new Re({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:S.toString(o)}]})}_addCheck(e){return new Re({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Re.create=t=>new Re({checks:[],typeName:N.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...O(t)});class Rn extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==w.boolean){const s=this._getOrReturnCtx(e);return C(s,{code:y.invalid_type,expected:w.boolean,received:s.parsedType}),A}return Z(e.data)}}Rn.create=t=>new Rn({typeName:N.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...O(t)});class Qe extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==w.date){const a=this._getOrReturnCtx(e);return C(a,{code:y.invalid_type,expected:w.date,received:a.parsedType}),A}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return C(a,{code:y.invalid_date}),A}const s=new z;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),C(o,{code:y.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(o=this._getOrReturnCtx(e,o),C(o,{code:y.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):L.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Qe({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Qe.create=t=>new Qe({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:N.ZodDate,...O(t)});class Mn extends M{_parse(e){if(this._getType(e)!==w.symbol){const s=this._getOrReturnCtx(e);return C(s,{code:y.invalid_type,expected:w.symbol,received:s.parsedType}),A}return Z(e.data)}}Mn.create=t=>new Mn({typeName:N.ZodSymbol,...O(t)});class Ln extends M{_parse(e){if(this._getType(e)!==w.undefined){const s=this._getOrReturnCtx(e);return C(s,{code:y.invalid_type,expected:w.undefined,received:s.parsedType}),A}return Z(e.data)}}Ln.create=t=>new Ln({typeName:N.ZodUndefined,...O(t)});class Fn extends M{_parse(e){if(this._getType(e)!==w.null){const s=this._getOrReturnCtx(e);return C(s,{code:y.invalid_type,expected:w.null,received:s.parsedType}),A}return Z(e.data)}}Fn.create=t=>new Fn({typeName:N.ZodNull,...O(t)});class Vn extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return Z(e.data)}}Vn.create=t=>new Vn({typeName:N.ZodAny,...O(t)});class Bn extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Z(e.data)}}Bn.create=t=>new Bn({typeName:N.ZodUnknown,...O(t)});class re extends M{_parse(e){const n=this._getOrReturnCtx(e);return C(n,{code:y.invalid_type,expected:w.never,received:n.parsedType}),A}}re.create=t=>new re({typeName:N.ZodNever,...O(t)});class $n extends M{_parse(e){if(this._getType(e)!==w.undefined){const s=this._getOrReturnCtx(e);return C(s,{code:y.invalid_type,expected:w.void,received:s.parsedType}),A}return Z(e.data)}}$n.create=t=>new $n({typeName:N.ZodVoid,...O(t)});class Y extends M{_parse(e){const{ctx:n,status:s}=this._processInputParams(e),o=this._def;if(n.parsedType!==w.array)return C(n,{code:y.invalid_type,expected:w.array,received:n.parsedType}),A;if(o.exactLength!==null){const c=n.data.length>o.exactLength.value,i=n.data.length<o.exactLength.value;(c||i)&&(C(n,{code:c?y.too_big:y.too_small,minimum:i?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),s.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(C(n,{code:y.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),s.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(C(n,{code:y.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),n.common.async)return Promise.all([...n.data].map((c,i)=>o.type._parseAsync(new oe(n,c,n.path,i)))).then(c=>z.mergeArray(s,c));const a=[...n.data].map((c,i)=>o.type._parseSync(new oe(n,c,n.path,i)));return z.mergeArray(s,a)}get element(){return this._def.type}min(e,n){return new Y({...this._def,minLength:{value:e,message:S.toString(n)}})}max(e,n){return new Y({...this._def,maxLength:{value:e,message:S.toString(n)}})}length(e,n){return new Y({...this._def,exactLength:{value:e,message:S.toString(n)}})}nonempty(e){return this.min(1,e)}}Y.create=(t,e)=>new Y({type:t,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...O(e)});function fe(t){if(t instanceof B){const e={};for(const n in t.shape){const s=t.shape[n];e[n]=ne.create(fe(s))}return new B({...t._def,shape:()=>e})}else return t instanceof Y?new Y({...t._def,type:fe(t.element)}):t instanceof ne?ne.create(fe(t.unwrap())):t instanceof ve?ve.create(fe(t.unwrap())):t instanceof ce?ce.create(t.items.map(e=>fe(e))):t}class B extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=L.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==w.object){const m=this._getOrReturnCtx(e);return C(m,{code:y.invalid_type,expected:w.object,received:m.parsedType}),A}const{status:s,ctx:o}=this._processInputParams(e),{shape:a,keys:c}=this._getCached(),i=[];if(!(this._def.catchall instanceof re&&this._def.unknownKeys==="strip"))for(const m in o.data)c.includes(m)||i.push(m);const d=[];for(const m of c){const h=a[m],f=o.data[m];d.push({key:{status:"valid",value:m},value:h._parse(new oe(o,f,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof re){const m=this._def.unknownKeys;if(m==="passthrough")for(const h of i)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(m==="strict")i.length>0&&(C(o,{code:y.unrecognized_keys,keys:i}),s.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const h of i){const f=o.data[h];d.push({key:{status:"valid",value:h},value:m._parse(new oe(o,f,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const m=[];for(const h of d){const f=await h.key,g=await h.value;m.push({key:f,value:g,alwaysSet:h.alwaysSet})}return m}).then(m=>z.mergeObjectSync(s,m)):z.mergeObjectSync(s,d)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new B({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,s)=>{var a,c;const o=((c=(a=this._def).errorMap)==null?void 0:c.call(a,n,s).message)??s.defaultError;return n.code==="unrecognized_keys"?{message:S.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new B({...this._def,unknownKeys:"strip"})}passthrough(){return new B({...this._def,unknownKeys:"passthrough"})}extend(e){return new B({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new B({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:N.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new B({...this._def,catchall:e})}pick(e){const n={};for(const s of L.objectKeys(e))e[s]&&this.shape[s]&&(n[s]=this.shape[s]);return new B({...this._def,shape:()=>n})}omit(e){const n={};for(const s of L.objectKeys(this.shape))e[s]||(n[s]=this.shape[s]);return new B({...this._def,shape:()=>n})}deepPartial(){return fe(this)}partial(e){const n={};for(const s of L.objectKeys(this.shape)){const o=this.shape[s];e&&!e[s]?n[s]=o:n[s]=o.optional()}return new B({...this._def,shape:()=>n})}required(e){const n={};for(const s of L.objectKeys(this.shape))if(e&&!e[s])n[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof ne;)a=a._def.innerType;n[s]=a}return new B({...this._def,shape:()=>n})}keyof(){return Bs(L.objectKeys(this.shape))}}B.create=(t,e)=>new B({shape:()=>t,unknownKeys:"strip",catchall:re.create(),typeName:N.ZodObject,...O(e)});B.strictCreate=(t,e)=>new B({shape:()=>t,unknownKeys:"strict",catchall:re.create(),typeName:N.ZodObject,...O(e)});B.lazycreate=(t,e)=>new B({shape:t,unknownKeys:"strip",catchall:re.create(),typeName:N.ZodObject,...O(e)});class et extends M{_parse(e){const{ctx:n}=this._processInputParams(e),s=this._def.options;function o(a){for(const i of a)if(i.result.status==="valid")return i.result;for(const i of a)if(i.result.status==="dirty")return n.common.issues.push(...i.ctx.common.issues),i.result;const c=a.map(i=>new G(i.ctx.common.issues));return C(n,{code:y.invalid_union,unionErrors:c}),A}if(n.common.async)return Promise.all(s.map(async a=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(o);{let a;const c=[];for(const d of s){const m={...n,common:{...n.common,issues:[]},parent:null},h=d._parseSync({data:n.data,path:n.path,parent:m});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:m}),m.common.issues.length&&c.push(m.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const i=c.map(d=>new G(d));return C(n,{code:y.invalid_union,unionErrors:i}),A}}get options(){return this._def.options}}et.create=(t,e)=>new et({options:t,typeName:N.ZodUnion,...O(e)});function Mt(t,e){const n=Q(t),s=Q(e);if(t===e)return{valid:!0,data:t};if(n===w.object&&s===w.object){const o=L.objectKeys(e),a=L.objectKeys(t).filter(i=>o.indexOf(i)!==-1),c={...t,...e};for(const i of a){const d=Mt(t[i],e[i]);if(!d.valid)return{valid:!1};c[i]=d.data}return{valid:!0,data:c}}else if(n===w.array&&s===w.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let a=0;a<t.length;a++){const c=t[a],i=e[a],d=Mt(c,i);if(!d.valid)return{valid:!1};o.push(d.data)}return{valid:!0,data:o}}else return n===w.date&&s===w.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class tt extends M{_parse(e){const{status:n,ctx:s}=this._processInputParams(e),o=(a,c)=>{if(Nn(a)||Nn(c))return A;const i=Mt(a.value,c.value);return i.valid?((Dn(a)||Dn(c))&&n.dirty(),{status:n.value,value:i.data}):(C(s,{code:y.invalid_intersection_types}),A)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,c])=>o(a,c)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}tt.create=(t,e,n)=>new tt({left:t,right:e,typeName:N.ZodIntersection,...O(n)});class ce extends M{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==w.array)return C(s,{code:y.invalid_type,expected:w.array,received:s.parsedType}),A;if(s.data.length<this._def.items.length)return C(s,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&s.data.length>this._def.items.length&&(C(s,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...s.data].map((c,i)=>{const d=this._def.items[i]||this._def.rest;return d?d._parse(new oe(s,c,s.path,i)):null}).filter(c=>!!c);return s.common.async?Promise.all(a).then(c=>z.mergeArray(n,c)):z.mergeArray(n,a)}get items(){return this._def.items}rest(e){return new ce({...this._def,rest:e})}}ce.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ce({items:t,typeName:N.ZodTuple,rest:null,...O(e)})};class Kn extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==w.map)return C(s,{code:y.invalid_type,expected:w.map,received:s.parsedType}),A;const o=this._def.keyType,a=this._def.valueType,c=[...s.data.entries()].map(([i,d],m)=>({key:o._parse(new oe(s,i,s.path,[m,"key"])),value:a._parse(new oe(s,d,s.path,[m,"value"]))}));if(s.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const d of c){const m=await d.key,h=await d.value;if(m.status==="aborted"||h.status==="aborted")return A;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),i.set(m.value,h.value)}return{status:n.value,value:i}})}else{const i=new Map;for(const d of c){const m=d.key,h=d.value;if(m.status==="aborted"||h.status==="aborted")return A;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),i.set(m.value,h.value)}return{status:n.value,value:i}}}}Kn.create=(t,e,n)=>new Kn({valueType:e,keyType:t,typeName:N.ZodMap,...O(n)});class Me extends M{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==w.set)return C(s,{code:y.invalid_type,expected:w.set,received:s.parsedType}),A;const o=this._def;o.minSize!==null&&s.data.size<o.minSize.value&&(C(s,{code:y.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&s.data.size>o.maxSize.value&&(C(s,{code:y.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const a=this._def.valueType;function c(d){const m=new Set;for(const h of d){if(h.status==="aborted")return A;h.status==="dirty"&&n.dirty(),m.add(h.value)}return{status:n.value,value:m}}const i=[...s.data.values()].map((d,m)=>a._parse(new oe(s,d,s.path,m)));return s.common.async?Promise.all(i).then(d=>c(d)):c(i)}min(e,n){return new Me({...this._def,minSize:{value:e,message:S.toString(n)}})}max(e,n){return new Me({...this._def,maxSize:{value:e,message:S.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Me.create=(t,e)=>new Me({valueType:t,minSize:null,maxSize:null,typeName:N.ZodSet,...O(e)});class Un extends M{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Un.create=(t,e)=>new Un({getter:t,typeName:N.ZodLazy,...O(e)});class Lt extends M{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return C(n,{received:n.data,code:y.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}Lt.create=(t,e)=>new Lt({value:t,typeName:N.ZodLiteral,...O(e)});function Bs(t,e){return new ye({values:t,typeName:N.ZodEnum,...O(e)})}class ye extends M{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),s=this._def.values;return C(n,{expected:L.joinValues(s),received:n.parsedType,code:y.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),s=this._def.values;return C(n,{received:n.data,code:y.invalid_enum_value,options:s}),A}return Z(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ye.create(e,{...this._def,...n})}exclude(e,n=this._def){return ye.create(this.options.filter(s=>!e.includes(s)),{...this._def,...n})}}ye.create=Bs;class zn extends M{_parse(e){const n=L.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==w.string&&s.parsedType!==w.number){const o=L.objectValues(n);return C(s,{expected:L.joinValues(o),received:s.parsedType,code:y.invalid_type}),A}if(this._cache||(this._cache=new Set(L.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=L.objectValues(n);return C(s,{received:s.data,code:y.invalid_enum_value,options:o}),A}return Z(e.data)}get enum(){return this._def.values}}zn.create=(t,e)=>new zn({values:t,typeName:N.ZodNativeEnum,...O(e)});class nt extends M{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==w.promise&&n.common.async===!1)return C(n,{code:y.invalid_type,expected:w.promise,received:n.parsedType}),A;const s=n.parsedType===w.promise?n.data:Promise.resolve(n.data);return Z(s.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}nt.create=(t,e)=>new nt({type:t,typeName:N.ZodPromise,...O(e)});class be extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:s}=this._processInputParams(e),o=this._def.effect||null,a={addIssue:c=>{C(s,c),c.fatal?n.abort():n.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="preprocess"){const c=o.transform(s.data,a);if(s.common.async)return Promise.resolve(c).then(async i=>{if(n.value==="aborted")return A;const d=await this._def.schema._parseAsync({data:i,path:s.path,parent:s});return d.status==="aborted"?A:d.status==="dirty"||n.value==="dirty"?Pe(d.value):d});{if(n.value==="aborted")return A;const i=this._def.schema._parseSync({data:c,path:s.path,parent:s});return i.status==="aborted"?A:i.status==="dirty"||n.value==="dirty"?Pe(i.value):i}}if(o.type==="refinement"){const c=i=>{const d=o.refinement(i,a);if(s.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?A:(i.status==="dirty"&&n.dirty(),c(i.value),{status:n.value,value:i.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>i.status==="aborted"?A:(i.status==="dirty"&&n.dirty(),c(i.value).then(()=>({status:n.value,value:i.value}))))}if(o.type==="transform")if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!xe(c))return A;const i=o.transform(c.value,a);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:i}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>xe(c)?Promise.resolve(o.transform(c.value,a)).then(i=>({status:n.value,value:i})):A);L.assertNever(o)}}be.create=(t,e,n)=>new be({schema:t,typeName:N.ZodEffects,effect:e,...O(n)});be.createWithPreprocess=(t,e,n)=>new be({schema:e,effect:{type:"preprocess",transform:t},typeName:N.ZodEffects,...O(n)});class ne extends M{_parse(e){return this._getType(e)===w.undefined?Z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ne.create=(t,e)=>new ne({innerType:t,typeName:N.ZodOptional,...O(e)});class ve extends M{_parse(e){return this._getType(e)===w.null?Z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ve.create=(t,e)=>new ve({innerType:t,typeName:N.ZodNullable,...O(e)});class Ft extends M{_parse(e){const{ctx:n}=this._processInputParams(e);let s=n.data;return n.parsedType===w.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ft.create=(t,e)=>new Ft({innerType:t,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});class Vt extends M{_parse(e){const{ctx:n}=this._processInputParams(e),s={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Je(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new G(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new G(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Vt.create=(t,e)=>new Vt({innerType:t,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});class Hn extends M{_parse(e){if(this._getType(e)!==w.nan){const s=this._getOrReturnCtx(e);return C(s,{code:y.invalid_type,expected:w.nan,received:s.parsedType}),A}return{status:"valid",value:e.data}}}Hn.create=t=>new Hn({typeName:N.ZodNaN,...O(t)});class Br extends M{_parse(e){const{ctx:n}=this._processInputParams(e),s=n.data;return this._def.type._parse({data:s,path:n.path,parent:n})}unwrap(){return this._def.type}}class Wt extends M{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?A:a.status==="dirty"?(n.dirty(),Pe(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?A:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(e,n){return new Wt({in:e,out:n,typeName:N.ZodPipeline})}}class Bt extends M{_parse(e){const n=this._def.innerType._parse(e),s=o=>(xe(o)&&(o.value=Object.freeze(o.value)),o);return Je(n)?n.then(o=>s(o)):s(n)}unwrap(){return this._def.innerType}}Bt.create=(t,e)=>new Bt({innerType:t,typeName:N.ZodReadonly,...O(e)});var N;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(N||(N={}));const W=ee.create;re.create;Y.create;et.create;tt.create;ce.create;const Ve=Lt.create,$r=ye.create;nt.create;ne.create;ve.create;const Zn=I.createExtensionSchema({type:Ve("dashboard.summary").describe("Extension type, must be 'dashboard.summary'"),dashboardKey:W().min(1,"Dashboard key is required").describe("Key used to identify which dashboard this summary belongs to")},{rankable:!0}),at=I.extensionPointId("ddk","dashboard","summary"),Xt=I.defineExtensionPoint({id:at,contributionKey:"dashboardSummary",displayName:"Dashboard Summary",description:"Extension point for dashboard summary plugin configurations with view support",hasView:!0,isRankable:!0,schema:Zn,metadata:{exportName:"DashboardSummaryExtension",category:"Dashboard",tags:["dashboard","summary","visualization"]},validate:(t,e)=>{I.validateWithSchema(Zn,t,e)&&I.validateRankIfPresent(t,e)},transform:I.createViewAwareTransform()}),Kr=at,Ur=`${at}.def`,zr=`${at}.view`,Wn=I.createExtensionSchema({type:Ve("dashboard.detail").describe("Extension type, must be 'dashboard.detail'"),dashboardKey:W().min(1,"Dashboard key is required").describe("Key used to identify which dashboard this detail belongs to")},{rankable:!0}),it=I.extensionPointId("ddk","dashboard","detail"),qt=I.defineExtensionPoint({id:it,contributionKey:"dashboardDetail",displayName:"Dashboard Detail",description:"Extension point for dashboard detail plugin configurations with view support",hasView:!0,isRankable:!0,schema:Wn,metadata:{exportName:"DashboardDetailExtension",category:"Dashboard",tags:["dashboard","detail","visualization"]},validate:(t,e)=>{I.validateWithSchema(Wn,t,e)&&I.validateRankIfPresent(t,e)},transform:I.createViewAwareTransform()}),Hr=it,Zr=`${it}.def`,Wr=`${it}.view`,Xn=I.createExtensionSchema({type:Ve("dashboard.detail.pump").describe("Extension type, must be 'dashboard.detail.pump'"),dashboardKey:W().min(1,"Dashboard key is required").describe("Key used to match this extension with specific dashboard pumps")},{rankable:!0}),ct=I.extensionPointId("ddk","dashboard","pump-detail"),le=I.defineExtensionPoint({id:ct,contributionKey:"dashboardPumpDetail",displayName:"Dashboard Pump Detail",description:"Extension point for dashboard pump detail plugin configurations with view support",hasView:!0,isRankable:!0,schema:Xn,metadata:{exportName:"DashboardPumpDetailExtension"},validate:(t,e)=>{I.validateWithSchema(Xn,t,e)&&I.validateRankIfPresent(t,e)},transform:I.createViewAwareTransform()}),Xr=ct,qr=`${ct}.def`,Yr=`${ct}.view`,qn=I.createExtensionSchema({type:Ve("dashboard.macro.summary").describe("Extension type, must be 'dashboard.macro.summary'"),dashboardKey:W().min(1,"Dashboard key is required").describe("Key used to match this extension with a macro holder. Tried in order: (1) holder.name (e.g. 'ns', 'water', 'carb'), (2) ExtensionManager.executeDashboardKeyFactory(holder) (default: holder.pumps.data[0]?.type, e.g. 'lfcv', 'cgp').")},{rankable:!0}),lt=I.extensionPointId("ddk","dashboard","macro-summary"),Le=I.defineExtensionPoint({id:lt,contributionKey:"dashboardMacroSummary",displayName:"Dashboard Macro Summary",description:"Extension point for plug-in supplied macro holder card summary content (the body shown on the dashboard, not the tap-detail modal)",hasView:!0,isRankable:!0,schema:qn,metadata:{exportName:"DashboardMacroSummaryExtension",category:"Dashboard",tags:["dashboard","summary","macro"]},validate:(t,e)=>{I.validateWithSchema(qn,t,e)&&I.validateRankIfPresent(t,e)},transform:I.createViewAwareTransform()}),Gr=lt,Jr=`${lt}.def`,Qr=`${lt}.view`,Yn=I.createExtensionSchema({cuiDescriptor:W().min(1,"CUI descriptor is required").describe("Descriptor used to identify and categorize the CUI functionality"),modalMode:$r(["fullscreen","maximized"]).optional().describe("Modal display mode for the CUI interface")}),dt=I.extensionPointId("ddk","cui"),ut=I.defineExtensionPoint({id:dt,contributionKey:"cui",displayName:"CUI (Consumer User Interface)",description:"Extension point for CUI plugin configurations with view support",hasView:!0,isRankable:!1,schema:Yn,metadata:{exportName:"CuiExtension",category:"Interface",tags:["cui","user-interface","consumer"]},validate:(t,e)=>{I.validateWithSchema(Yn,t,e)&&I.validateDescriptorFormat("CUI descriptor",t.cuiDescriptor,e)},transform:I.createViewAwareTransform()}),ea=dt,ta=`${dt}.def`,na=`${dt}.view`,Gn=I.createExtensionSchema({navDescriptor:W().min(1,"Navigation descriptor is required").describe("Descriptor used to identify and map the navigation functionality")}),mt=I.extensionPointId("ddk","nav","view"),Yt=I.defineExtensionPoint({id:mt,contributionKey:"navViews",displayName:"Navigation Views",description:"Extension point for navigation view plugin configurations with view support",hasView:!0,isRankable:!1,schema:Gn,metadata:{exportName:"NavViewExtension",category:"Navigation",tags:["navigation","nav","views","routing"]},validate:(t,e)=>{I.validateWithSchema(Gn,t,e)&&I.validateDescriptorFormat("Navigation descriptor",t.navDescriptor,e)},transform:I.createViewAwareTransform()}),sa=mt,oa=`${mt}.def`,ra=`${mt}.view`,Jn=I.createExtensionSchema({setupDescriptor:W().min(1,"Setup descriptor is required").describe("Descriptor used to identify and categorize the setup step")},{rankable:!0}),pt=I.extensionPointId("ddk","setup"),Be=I.defineExtensionPoint({id:pt,contributionKey:"setupStep",displayName:"Setup Steps",description:"Extension point for setup step plugin configurations with view support",hasView:!0,isRankable:!0,schema:Jn,metadata:{exportName:"SetupExtension",category:"Setup",tags:["setup","configuration","steps","wizard"]},validate:(t,e)=>{I.validateWithSchema(Jn,t,e)&&(I.validateDescriptorFormat("Setup descriptor",t.setupDescriptor,e),I.validateRankIfPresent(t,e))},transform:I.createViewAwareTransform()}),aa=pt,ia=`${pt}.def`,ca=`${pt}.view`,Qn=I.createExtensionSchema({type:Ve("trouble.action").describe("Extension type, must be 'trouble.action'"),troubleType:W().min(1,"Trouble type is required").describe("Specific trouble type from TroubleContainer that triggers this action (e.g., 'pump-motor-fault', 'sensor-calibration-error'). This must match the exact trouble type string emitted by the device/system."),stateKey:W().min(1,"State key is required").describe("Normalized state key for grouping related troubles under a common UI experience (e.g., 'pumpProblem', 'sensorIssue'). Multiple troubleTypes can share the same stateKey to show the same troubleshooting component. If not provided, defaults to troubleType for 1:1 mapping."),stateValue:W().min(1,"State value is required").describe("Value set in the reactive state when this trouble becomes active (e.g., 'pump-failure', 'needs-calibration'). Used by other components to detect trouble categories and trigger appropriate responses. If not provided, defaults to troubleType.")},{rankable:!0}),ht=I.extensionPointId("ddk","trouble","action"),Ce=I.defineExtensionPoint({id:ht,contributionKey:"troubleActions",displayName:"Trouble Actions",description:"Extension point for trouble action plugin configurations with view support",hasView:!0,isRankable:!0,schema:Qn,metadata:{exportName:"TroubleActionExtension",category:"Trouble Management",tags:["trouble","action","state","error-handling"]},validate:(t,e)=>{I.validateWithSchema(Qn,t,e)&&I.validateRankIfPresent(t,e)},transform:I.createViewAwareTransform()}),la=ht,da=`${ht}.def`,ua=`${ht}.view`,es=I.createExtensionSchema({viewKey:W().min(1,"View key is required").describe("Key identifying the UI region where this component should be rendered (e.g., 'settings.config', 'dashboard.sidebar'). Multiple plugins can contribute to the same viewKey, and all will be rendered in the designated region.")},{rankable:!0}),ft=I.extensionPointId("ddk","view"),Gt=I.defineExtensionPoint({id:ft,contributionKey:"views",displayName:"Views",description:"Extension point for view plugin configurations with regional rendering support",hasView:!0,isRankable:!0,schema:es,metadata:{exportName:"ViewExtension",category:"UI Layout",tags:["views","ui","rendering","layout","regions"]},validate:(t,e)=>{I.validateWithSchema(es,t,e)&&(t.viewKey&&(t.viewKey.includes(".")||e.addInfo(`ViewKey '${t.viewKey}' might benefit from dot notation (e.g., 'settings.config', 'dashboard.sidebar') for better organization`),["view","content","main"].includes(t.viewKey)&&e.addWarning(`ViewKey '${t.viewKey}' is very generic - consider using more specific keys like 'settings.main' or 'dashboard.content'`)),I.validateRankIfPresent(t,e))},transform:I.createViewAwareTransform()}),ma=ft,pa=`${ft}.def`,ha=`${ft}.view`,fa="ddk.ncui.utilities",ts={[Be.id]:"setupDescriptor",[ut.id]:"cuiDescriptor",[fa]:"utilDescriptor"},$s=({defaultNamespace:t,extensionPoint:e})=>{const{getExtensions:n}=se.useKosPluginsContext(),s=n(e),o=s.map(d=>d.data.namespace)||[],{t:a}=u.useKosTranslation([t,...new Set(o)]),c=s.reduce((d,m)=>{const h=m,f=h.data;return d[f[ts[e]]]={extension:e,module:h.id,namespace:f.namespace,title:f.title},d},{}),i=s.reduce((d,m)=>{const f=m.data;return d[f[ts[e]]]=`${f.namespace}:${f.title}`,d},{});return{namespaces:o,t:a,labelMap:i,contributionMap:c}},we=(t,e)=>{const n=p.useMemo(()=>({agitate:ys,calibrate:({holder:c,pump:i,onComplete:d})=>{const m=u.getKosCompanionModel(i??c.pumps.data[0],$.FcmPump.type);return r.jsx(_s,{pump:m,onComplete:d})},calibrateSPM:({holder:c,pump:i,onComplete:d})=>{const m=u.getKosCompanionModel(i??c.pumps.data[0],$.SpmPump.type);return r.jsx(fo,{pump:m,onComplete:d})},diagnostics:({holder:c,pump:i,onComplete:d})=>{const m=u.getKosCompanionModel(i??c.pumps.data[0],$.FcmPump.type);return r.jsx(Ns,{pump:m,onComplete:d})},"replace-pump":({holder:c,pump:i,onComplete:d})=>r.jsx(lo,{pump:i??c.pumps.data[0],onComplete:d}),"rfid-override":uo,"replace-line":({holder:c,onComplete:i})=>r.jsx(co,{holder:c,onComplete:i})}),[]),[s,o]=p.useState(void 0),a=s?n[s]:void 0;return{holderExperience:a?r.jsx(a,{holder:t,pump:e,onComplete:()=>{o(void 0)}}):void 0,setHolderExperience:o,currentExperienceId:s}},Jt=p.createContext(void 0),ga=({children:t,value:e})=>r.jsx(Jt.Provider,{value:e,children:t}),xa=t=>({HolderContent:void 0}),Qt=(t,e=xa)=>{const n=p.useContext(Jt);return e=(n==null?void 0:n.actionFactory)||e,e(t)},en=()=>{const t=j.IngredientSummary.type;return u.useKosModel({modelId:t,modelType:j.IngredientSummary.type,options:{}})};function ya(t){return()=>e=>{const{model:n,status:s,KosModelLoader:o}=en();return r.jsx(o,{...s,children:r.jsx(t,{...e,ingredientSummary:n})})}}const tn=()=>{const t=j.MacroAssignment.type;return u.useKosModel({modelId:t,modelType:j.MacroAssignment.type,options:{}})};function Ks(t){return e=>{const{model:n,status:s,KosModelLoader:o}=tn();return r.jsx(o,{...s,children:r.jsx(t,{...e,macroAssignment:n})})}}const nn=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.NetworkTest.type,options:{}})};function ba(t){return e=>n=>{const{model:s,status:o,KosModelLoader:a}=nn(e);return r.jsx(a,{...o,children:r.jsx(t,{...n,networkTest:s})})}}const sn=()=>{const t=j.NetworkTestContainer.type;return u.useKosModel({modelId:t,modelType:j.NetworkTestContainer.type,options:{}})};function Us(t){return e=>{const{model:n,status:s,KosModelLoader:o}=sn();return r.jsx(o,{...s,children:r.jsx(t,{...e,networkTestContainer:n})})}}const zs=()=>{const t=j.NutritiveSweetener.type;return u.useKosModel({modelId:t,modelType:j.NutritiveSweetener.type,options:{}})};function va(t){return e=>{const{model:n,status:s,KosModelLoader:o}=zs();return r.jsx(o,{...s,children:r.jsx(t,{...e,nutritiveSweetener:n})})}}const Hs=()=>{const t=j.PlainWater.type;return u.useKosModel({modelId:t,modelType:j.PlainWater.type,options:{},destroyOnUnmount:!0})};function Ca(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Hs();return r.jsx(o,{...s,children:r.jsx(t,{...e,plainWater:n})})}}const Zs=t=>{switch(t.type){case"fcm":return $.FcmPump.type;case"lfcv":return $.LfcvPump.type;case"micro":return $.SpmPump.type;case"cgp":return $.CgpPump.type;default:return}},te="pluginVisibility",Ge=new Map;u.registerExtensionPoint(te,{register:(t,e)=>{var n;Ge.has(t)||Ge.set(t,[]),(n=Ge.get(t))==null||n.push(e)},execute:(t,e,n)=>{const s=Ge.get(t);if(!s)return!0;const o=s.map(a=>a(e,n));return o.length===0?!0:!o.includes(!1)}});class Ws{constructor(e,n){F(this,"core");F(this,"dispense");this.core=e,this.dispense=n}registerDashboardVisibilityFilter(e){return u.ExtensionManager[te].register(te,e),this}registerNavVisibilityFilter(e){return u.ExtensionManager[te].register(te,e),this}}class Xs{constructor(){F(this,"dispense");F(this,"core");F(this,"plugin");this.dispense=new Ae.DispenseExtensionManager,this.core=new u.CoreExtensionManager,this.plugin=new Ws(this.core,this.dispense)}}const _a={UTILITIES:"ddk.ncui.utilities"},wa=_a.UTILITIES;Xt.register();qt.register();le.register();Le.register();ut.register();Yt.register();Be.register();Ce.register();Gt.register();console.log("JSON-defined UtilitiesExtension ID:",wa);console.log("Registered DashboardSummaryExtension:",Xt.id);console.log("Registered DashboardDetailExtension:",qt.id);console.log("Registered DashboardPumpDetailExtension:",le.id);console.log("Registered DashboardMacroSummaryExtension:",Le.id);console.log("Registered CuiExtension:",ut.id);console.log("Registered NavViewExtension:",Yt.id);console.log("Registered SetupExtension:",Be.id);console.log("Registered TroubleActionExtension:",Ce.id);console.log("Registered ViewExtension:",Gt.id);const ka=()=>{$.KosModelRegistry.freestyle.models().model(j.Lockout).model(u.Device).model(j.TroubleActionManager).model(j.CopyLogs).model(j.Door).model(j.AgitationControl).companion(Ae.Assembly.type,()=>{if(u.KosFeatureFlags.isFeatureEnabled("carbTank"))return $.CarbAgitator.type}).companion(Ae.Pump.type,Zs).companion(u.TroubleContainer.type,j.AgitationControl.type).preload(j.Application.type),Object.keys(j.DDKModels).forEach(c=>{const i=j.DDKModels[c];u.registerLegacyModel($.KosModelRegistry)(c,i)}),new $.KosExtensionManager().freestyle.initializeFreestyleExtension();const{KosCoreContextProvider:e}=u.initKosProvider(),n={rank:999,factory:c=>{var i;return(i=c.pumps.data[0])==null?void 0:i.type}};u.ExtensionManager.registerDashboardKeyFactory(n);const s=(c,i)=>{if(c!=="settings.ice"||!i)return!0;const{assembly:d}=i;return!!(d!=null&&d.supportsIce)},o=(c,i)=>{if(c!=="settings.remoteNNS"&&c!=="dashboard.remoteNNS"||!i)return!0;const{assembly:d}=i;if(!d)return!0;const m=u.getKosCompanionModel(d,$.FreestyleAssembly.type);return!!(m!=null&&m.supportsRemoteTrays)};return new Xs().plugin.registerNavVisibilityFilter(s).registerNavVisibilityFilter(o),{KosCoreContextProvider:e}},$e=t=>t?qs(t.type):{action:"",label:"",progress:"",summary:""},qs=t=>{const e=`troubles:troubles.${t}`;return{action:`${e}.action`,label:`${e}.label`,progress:`${e}.progress`,summary:`${e}.summary`}},ke=t=>{const e=se.useReactiveExtensionRegistry(),[,n]=p.useState({}),[s]=p.useState(new Set);return p.useEffect(()=>{const a=[];return s.forEach(c=>{const i=e.subscribe(c,()=>{n({})});a.push(i)}),()=>{a.forEach(c=>c())}},[e,s]),{getExtensions:p.useCallback(a=>(s.add(a),Object.values(e.getExtensions(a,!1)).filter(d=>{const m=d.id;return u.ExtensionManager[te].execute(te,m,t)})),[e,t,s])}},gt=()=>{const t=j.Reboot.type;return u.useKosModel({modelId:t,modelType:j.Reboot.type,options:{}})};function Sa(t){return()=>e=>{const{model:n,status:s,KosModelLoader:o}=gt();return r.jsx(o,{...s,children:r.jsx(t,{...e,reboot:n})})}}const xt=()=>{const t=j.Settings.type;return u.useKosModel({modelId:t,modelType:j.Settings.type,options:{}})};function on(t){return e=>{const{model:n,status:s,KosModelLoader:o}=xt();return r.jsx(o,{...s,children:r.jsx(t,{...e,settings:n})})}}const rn=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.SetupStep.type,options:{}})};function Ta(t){return e=>n=>{const{model:s,status:o,KosModelLoader:a}=rn(e);return r.jsx(a,{...o,children:r.jsx(t,{...n,setupStep:s})})}}const an=()=>{const t=j.SetupStepContainer.type;return u.useKosModel({modelId:t,modelType:j.SetupStepContainer.type,options:{}})};function Ys(t){return e=>{const{model:n,status:s,KosModelLoader:o}=an();return r.jsx(o,{...s,children:r.jsx(t,{...e,setupStepContainer:n})})}}const Gs=t=>{const[e,n]=p.useState(),[s,o]=de(t),a=e&&e>0;return p.useEffect(()=>{async function c(){if((t==null?void 0:t.ingredientId)!==void 0){const i=await(t==null?void 0:t.resolveIntentVolume("CALIBRATE"));n(Math.round(i.volume))}}c()},[t,t==null?void 0:t.ingredientId]),{calibrateVolume:e,canCalibrate:a,action:s,handleAction:o}},Js=()=>{const t=j.Start.type;return u.useKosModel({modelId:t,modelType:j.Start.type,options:{}})};function Ia(t){return e=>{const{model:n,status:s,KosModelLoader:o}=Js();return r.jsx(o,{...s,children:r.jsx(t,{...e,start:n})})}}const cn=()=>{const t=j.TroubleActionManager.type,{getExtensions:e}=ke(),n=e(Ce.id).map(o=>o.data);return u.useKosModel({modelId:t,modelType:j.TroubleActionManager.type,options:{definitions:n}})};function ja(t){return e=>{const{model:n,status:s,KosModelLoader:o}=cn();return r.jsx(o,{...s,children:r.jsx(t,{...e,troubleAction:n})})}}const yt=t=>{const[e,n]=p.useState({});return p.useEffect(()=>{async function s(){if(t){const o=await u.troubleDataFactory(t);n(o)}}s()},[t]),e},Ea=t=>!t||t==="white",Pa=t=>t?void 0:"white",Qs=t=>{if(!u.isTroubleAware(t))return{};const e=t,{visibleTroubles:n,initialized:s}=Se(e),o=(n==null?void 0:n.length)??0,a=n==null?void 0:n[0],c=o>0,i=c?`${a==null?void 0:a.color}`:void 0,d=Ea(i),m=c?Pa(d):void 0;return{backgroundColor:i,fontColor:m,highestTrouble:a,initialized:s,troubleCount:o,hasTroubles:c}},Aa=({troubleType:t,condition:e})=>{const{model:n}=u.useTroubleContainerModel(),[s,o]=p.useState(!1),[a,c]=p.useState([]);return p.useEffect(()=>u.kosAutoEffect(()=>{const d=(t?n==null?void 0:n.troubles.getIndexByKey("byType",t):n==null?void 0:n.troubles.data)||[],m=e?d.filter(e):d;o(m.length>0),c(m)}),[e,n,t]),[s,a.length>0?a[0]:void 0,a]},ln=t=>{const e=t;return u.useKosModel({modelId:e,modelType:j.Utilities.type,options:{}})};function Na(t){return e=>n=>{const{model:s,status:o,KosModelLoader:a}=ln(e);return r.jsx(a,{...o,children:r.jsx(t,{...n,utilities:s})})}}const dn=()=>{const t=j.UtilitiesContainer.type;return u.useKosModel({modelId:t,modelType:j.UtilitiesContainer.type,options:{}})};function Da(t){return e=>{const{model:n,status:s,KosModelLoader:o}=dn();return r.jsx(o,{...s,children:r.jsx(t,{...e,utilitiesContainer:n})})}}const eo=u.withDevice(u.kosComponent(({device:t})=>{const{t:e}=u.useKosTranslation("dispenser-profile"),s=t.serialNumber==="unassigned"?void 0:t.serialNumber;return r.jsx(l.InfoCard,{label:e("dispenser-serial"),value:s})})),Oa=Ms(u.kosComponent(({dispenserInfo:t})=>{const{t:e}=u.useKosTranslation("dispenser-profile");return r.jsxs(r.Fragment,{children:[r.jsx(Ss,{label:e("dispenser-name","Dispenser Name"),configProperty:t.name}),r.jsx(eo,{})]})})),Ra=on(u.kosComponent(({settings:t})=>{const{t:e}=u.useKosTranslation("dispenser-profile"),n=s=>{if(s&&s.length>=25)return"The name shouldn’t exceed 25 characters."};return r.jsxs(r.Fragment,{children:[r.jsx(ot,{closeButtonLabel:e("close","Close")||void 0,configProperty:t==null?void 0:t.name,isValid:n,label:e("dispenser-name","Dispenser Name"),layout:"alphanumeric",maxLength:25}),r.jsx(Ps,{label:e("activate-and-reboot-time"),configProperty:t.activateAndRebootTime})]})})),to=k(l.LabelDate)`
|
|
165
165
|
color: var(--ddk-generic-color-grey-60);
|
|
166
166
|
font-size: var(--ddk-component-enjoy-by-font-size-small);
|
|
167
167
|
font-weight: var(--ddk-component-enjoy-by-font-weight-small);
|
|
168
|
-
`,
|
|
168
|
+
`,Ma=k(l.LabelDate)`
|
|
169
169
|
color: var(--ddk-component-dashboard-enjoy-by-trouble-warning-color);
|
|
170
|
-
`,
|
|
170
|
+
`,La=k(to)`
|
|
171
171
|
color: var(--ddk-component-dashboard-enjoy-by-trouble-warning-color);
|
|
172
|
-
`,
|
|
172
|
+
`,un=({holder:t,size:e})=>{const{t:n}=u.useKosTranslation("common"),{regionModel:s}=u.useKosRegions(),o=!!t.enjoyByDate,a=t.enjoyByDate??new Date,{formattedDate:c}=u.useFormattedDate({year:a.getFullYear(),month:a.getMonth(),day:a.getDate(),formatString:(s==null?void 0:s.selectedDateFormat)||""}),i=t.hasEnjoyByWarning?e==="small"?La:Ma:e==="small"?to:l.LabelDate;return o&&r.jsx(i,{children:n("enjoy-by",{data:{date:c}})})},Fa=({item:t,valueKey:e})=>{const{t:n}=u.useKosTranslation("hardware-info"),{linked:s}=t;if(e==="link.serialNum"&&!s)return r.jsx(l.LabelInformationExtraSmall,{children:n("not-connected")});const o=l.getItemData(t,e);return o||"—"},Va=k(l.Table)`
|
|
173
173
|
& ul {
|
|
174
174
|
list-style-type: none;
|
|
175
175
|
margin: 0;
|
|
176
176
|
padding: 0;
|
|
177
177
|
}
|
|
178
|
-
`,
|
|
178
|
+
`,Ba=u.kosComponent(()=>{const{model:t}=Ae.useBoardContainer(),{t:e}=u.useKosTranslation("hardware-info"),n=(t==null?void 0:t.boardList.map(s=>{var o,a,c;return{...s,link:{...s.link,firmwareVersions:(o=s.link)!=null&&o.firmwareVersions&&s.link.firmwareVersions.length>0?r.jsx("ul",{children:(c=(a=s.link)==null?void 0:a.firmwareVersions)==null?void 0:c.map((i,d)=>r.jsx("li",{children:i},d))}):"—"}}}))||[];return t&&t.boardList&&r.jsx(Va,{CellRenderer:Fa,data:n,dataKeys:["name","type","link.hardwareVersion","link.serialNum","link.firmwareVersions"],headers:[e("name"),e("type"),e("revision"),e("serial-number"),e("firmware")],heading:e("tower")||void 0})}),ue=({disabled:t,model:e,onPour:n,onPourCancel:s,...o})=>{const{t:a}=u.useKosTranslation("common"),[c,i]=p.useState(e.isPouring?"halt":"idle"),d=p.useRef(),m=p.useRef(!1),h=250;p.useEffect(()=>u.kosAutoEffect(()=>{e.isPouring||(m.current=!1,clearTimeout(d.current),d.current=void 0,i("idle"))}),[e]),p.useEffect(()=>()=>{e.isPouring&&e.cancelPour()},[e]);const f=p.useCallback(()=>{e&&(t||e.isPouring||(e.performIntent("HOLD_TO_POUR"),d.current=setTimeout(()=>{m.current=!0,d.current=void 0,i("run")},h)))},[t,e]),g=p.useCallback(()=>{e&&(m.current?(e.cancelPour(),m.current=!1,i("idle")):d.current?(clearTimeout(d.current),d.current=void 0,i("halt")):e.isPouring&&(e.cancelPour(),i("idle")))},[e]),v=p.useCallback(()=>{c!=="halt"&&g()},[g,c]);return r.jsx(l.TapAndHoldButton,{disabled:t,mode:"primary",onPointerCancel:g,onPointerDown:f,onPointerOut:v,onPointerUp:g,...o,state:c,children:a(a(c==="idle"?"tapOrHoldToPour":c==="run"?"releaseToStop":"stop"))})},mn=p.createContext(void 0),$a=({children:t})=>{const{model:e,ready:n}=zt(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(mn.Provider,{value:s,children:t})},Ka=()=>{const t=p.useContext(mn);if(!t)throw new Error("useAnimationContext must be used within a AnimationProvider");return t},Ua=Ds(({animation:t,animationOverrides:e,children:n,componentModeOverride:s,modalModeOverride:o})=>{const[a,c]=p.useState(!0),[i,d]=p.useState(!0),[m,h]=p.useState(!0);return p.useEffect(()=>{const f=u.kosAutoEffect(()=>{const g=!!(!(e!=null&&e.disableAll)&&(e!=null&&e.enableDial))&&!!(!t.disableAll.value&&t.enableDial.value),v=!!(!(e!=null&&e.disableAll)&&(e!=null&&e.enableModal))&&!!(!t.disableAll.value&&t.enableModal.value),b=!!(!(e!=null&&e.disableAll)&&(e!=null&&e.enableSideBar))&&!!(!t.disableAll.value&&t.enableSideBar.value);c(g),d(v),h(b)});return()=>{f()}},[t,e==null?void 0:e.disableAll,e==null?void 0:e.enableDial,e==null?void 0:e.enableModal,e==null?void 0:e.enableSideBar]),r.jsx(l.ComponentConfigurationProvider,{value:{componentModeOverride:s,enableDialAnimation:a,enableModalAnimation:i,enableSidebarAnimation:m,modalModeOverride:o},children:n})}),pn=p.createContext(void 0),za=({children:t})=>{const{model:e,ready:n}=Fe(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(pn.Provider,{value:s,children:t})},bt=()=>{const t=p.useContext(pn);if(!t)throw new Error("useApplicationContext must be used within a ApplicationProvider");return t},hn=p.createContext(void 0),Ha=({children:t})=>{const{model:e,ready:n}=Ht(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(hn.Provider,{value:s,children:t})},Za=()=>{const t=p.useContext(hn);if(!t)throw new Error("useDashboardOperationsContext must be used within a DashboardOperationsProvider");return t},fn=p.createContext(void 0),Wa=({children:t})=>{const{model:e,ready:n}=Zt(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(fn.Provider,{value:s,children:t})},Xa=()=>{const t=p.useContext(fn);if(!t)throw new Error("useDispenserInfoContext must be used within a DispenserInfoProvider");return t},gn=p.createContext(void 0),qa=({children:t})=>{const{model:e,ready:n}=en(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(gn.Provider,{value:s,children:t})},Ya=()=>{const t=p.useContext(gn);if(!t)throw new Error("useIngredientSummaryContext must be used within a IngredientSummaryProvider");return t},xn=p.createContext(void 0),Ga=({children:t})=>{const{model:e,ready:n}=tn(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(xn.Provider,{value:s,children:t})},Ja=()=>{const t=p.useContext(xn);if(!t)throw new Error("useMacroAssignmentContext must be used within a MacroAssignmentProvider");return t},yn=p.createContext(void 0),Qa=({children:t,id:e})=>{const{model:n,ready:s}=nn(e),o=p.useMemo(()=>s&&n?{model:n}:{},[s,n]);return r.jsx(yn.Provider,{value:o,children:t})},ei=()=>{const t=p.useContext(yn);if(!t)throw new Error("useNetworkTestContext must be used within a NetworkTestProvider");return t},bn=p.createContext(void 0),ti=({children:t})=>{const{model:e,ready:n}=sn(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(bn.Provider,{value:s,children:t})},ni=()=>{const t=p.useContext(bn);if(!t)throw new Error("useNetworkTestContainerContext must be used within a NetworkTestContainerProvider");return t},vn=p.createContext(void 0),si=({children:t})=>{const{model:e,ready:n}=gt(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(vn.Provider,{value:s,children:t})},oi=()=>{const t=p.useContext(vn);if(!t)throw new Error("useRebootContext must be used within a RebootProvider");return t},Cn=p.createContext(void 0),ri=({children:t})=>{const{model:e,ready:n}=xt(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(Cn.Provider,{value:s,children:t})},ai=()=>{const t=p.useContext(Cn);if(!t)throw new Error("useSettingsContext must be used within a SettingsProvider");return t},_n=p.createContext(void 0),ii=({children:t,id:e})=>{const{model:n,ready:s}=rn(e),o=p.useMemo(()=>s&&n?{model:n}:{},[s,n]);return r.jsx(_n.Provider,{value:o,children:t})},ci=()=>{const t=p.useContext(_n);if(!t)throw new Error("useSetupStepContext must be used within a SetupStepProvider");return t},wn=p.createContext(void 0),li=({children:t})=>{const{model:e,ready:n}=an(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(wn.Provider,{value:s,children:t})},di=()=>{const t=p.useContext(wn);if(!t)throw new Error("useSetupStepContainerContext must be used within a SetupStepContainerProvider");return t},kn=p.createContext(void 0),ui=({children:t,id:e})=>{const{model:n,ready:s}=ln(e),o=p.useMemo(()=>s&&n?{model:n}:{},[s,n]);return r.jsx(kn.Provider,{value:o,children:t})},mi=()=>{const t=p.useContext(kn);if(!t)throw new Error("useUtilitiesContext must be used within a UtilitiesProvider");return t},Sn=p.createContext(void 0),pi=({children:t})=>{const{model:e,ready:n}=dn(),s=p.useMemo(()=>n&&e?{model:e}:{},[n,e]);return r.jsx(Sn.Provider,{value:s,children:t})},hi=()=>{const t=p.useContext(Sn);if(!t)throw new Error("useUtilitiesContainerContext must be used within a UtilitiesContainerProvider");return t},Se=t=>{const{model:e}=bt(),[n,s]=p.useState(),o=e==null?void 0:e.currentRole,a=!!n;return p.useLayoutEffect(()=>{const c=u.kosAutoEffect(()=>{const i=t.troubles.filter(j.troubleVisibilityFilter(o));s(d=>{const m=d??[];return i.length!==m.length||i.some(h=>!m.includes(h))?i:m})});return()=>{c()}},[t,o]),{visibleTroubles:n,initialized:a}},no=u.KosLog.createLogger({name:"holder-group-view"});no.debug("holder-group-view component loaded");const ns=k.div`
|
|
179
179
|
align-items: start;
|
|
180
180
|
|
|
181
181
|
display: flex;
|
|
@@ -185,15 +185,17 @@
|
|
|
185
185
|
text-overflow: ellipsis;
|
|
186
186
|
width: 100%;
|
|
187
187
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
188
|
-
`,
|
|
188
|
+
`,fi=k.div`
|
|
189
189
|
display: flex;
|
|
190
190
|
align-items: center;
|
|
191
191
|
justify-content: center;
|
|
192
192
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
193
|
-
|
|
193
|
+
flex-wrap: nowrap;
|
|
194
|
+
white-space: nowrap;
|
|
195
|
+
`,gi=k.div`
|
|
194
196
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
195
197
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
196
|
-
`,
|
|
198
|
+
`,xi=t=>!t||t==="white",yi=t=>t?void 0:"white",bi=(t,e)=>e&&e.hasEnjoyByWarning?"var(--ddk-component-dashboard-enjoy-by-trouble-warning-color)":t?void 0:"white",so=u.kosComponent(({holder:t,onHolderSelect:e,showNavIcon:n,summaryBody:s,altNamePolicy:o="disable"})=>{const{model:a}=Fe(),{visibleTroubles:c,initialized:i}=Se(t),d=a==null?void 0:a.currentRole,{t:m}=u.useKosTranslation("troubles"),{t:h}=u.useKosTranslation("common"),{componentModeOverride:f}=l.useComponentConfigurationContext(),g=f==="compact",{getExtensions:v}=ke();let b=!1;const x=u.getKosCompanionModel(t,$.FreestyleHolder.type),T=x==null?void 0:x.altName,R=x==null?void 0:x.isRemote,D=o==="replace"&&!!T&&(x==null?void 0:x.isRemote);x!=null&&x.isRemote&&o==="disable"&&(no.warn("Holder is remote, skipping rendering"),b=!0);const[P,E]=p.useState(!1),_=!!t.ingredientId,U=p.useCallback(()=>{E(!1)},[]),q=(c==null?void 0:c.length)??0,V=c==null?void 0:c[0],H=q>0,Ue=yt(V),me=t.hasFuelGuage,Ct=t.fillPercent,Te=t.removed?"var(--ddk-component-dashboard-card-background-color-unassigned)":b?"var(--ddk-generic-color-grey-50)":H?`${V==null?void 0:V.color}`:_?void 0:"var(--ddk-component-dashboard-card-background-color-unassigned)",_t=t.removed?"var(--ddk-component-dashboard-card-header-background-color)":void 0,Ie=xi(Te),je=b?"white":t.unassigned?"var(--ddk-generic-color-grey-30)":H?yi(Ie):_?void 0:"var(--ddk-component-dashboard-card-color-unassigned)",ze=b?"white":H?bi(Ie,t):_?void 0:"var(--ddk-component-dashboard-card-color-unassigned)",wt=D?h(T,{defaultValue:"Remote NNS Tray"}):l.useAbbreviation(t.name,g),He=b?h("disabled"):D?"":t.removed?h(t.previousIngredientName):t.unassigned?h("unassigned"):h(t.ingredientName),Ze=r.jsx(ns,{color:je,children:He}),kt=r.jsx(fi,{color:je,children:wt}),St=D?h(T,{defaultValue:"Remote NNS Tray"}):t.name,We=r.jsxs(ns,{children:[St," ",He]}),Xe=_&&me&&!H&&i?s??r.jsx(l.FuelGauge,{color:H?"var(--ddk-generic-color-white)":void 0,size:"small",value:Ct}):null,pe=_&&me&&!H&&i&&l.getFillColor(Ct)||void 0,he=u.ExtensionManager.executeDashboardKeyFactory(t)||"",qe=p.useMemo(()=>v(le.id),[v]),Tt=p.useMemo(()=>qe.filter(ie=>!!ie.data).reduce((ie,En)=>{const So=En.data;return ie[So.dashboardKey]=En.data,ie},{}),[qe]),In=!!Tt[he],{HolderContent:It,modalOptions:yo}=Qt(t),jt=se.useExtensionComponent(le),bo=p.useMemo(()=>{var ie;return It?r.jsx(It,{holder:t,onComplete:U}):In&&jt?r.jsx(jt,{module:(ie=Tt[he])==null?void 0:ie.id,holder:t}):void 0},[It,U,Tt,In,t,he,jt]),vo=$e(V),Co=R&&!D,_o=r.jsx(gi,{color:H?je:ze,children:Co?h("remote-nns-active"):H?m(vo.summary,{context:V!=null&&V.deferred?"queued":void 0,data:Ue}):!g&&r.jsx(un,{size:"small",holder:t})}),{holderExperience:wo,setHolderExperience:jn}=we(t),{future:Ye}=J(V),ko=p.useCallback(()=>{b||t.sortedPumps.length<=0||(d==="technician"?E(!0):t.unassigned||t.removed?jn("rfid-override"):H&&(e==null||e(t)))},[b,t,d,jn,H,e]);return r.jsxs(r.Fragment,{children:[r.jsxs(l.Modal,{contain:!g,...yo,show:P,onClose:U,children:[r.jsx(l.Header,{contain:g,showCloseButton:!0,title:We,onClose:U,CloseButton:g?l.BackButton:void 0}),bo]}),r.jsx(p.Suspense,{children:wo}),r.jsx(l.HolderDashboardCard,{avatar:kt,headerBackgroundColor:_t,backgroundColor:Te,footer:_o,cardId:t.path,errors:q,title:Ze,indicatorColor:pe,disabled:b,body:Xe,showNavIcon:n,onCardSelect:ko},t.path),(V==null?void 0:V.future)&&r.jsx(K,{title:Ze,future:Ye,failureMessage:m(`troubles.${V.type}.error`,{context:Ye==null?void 0:Ye.reason})})]})}),Tn=k.div`
|
|
197
199
|
display: flex;
|
|
198
200
|
flex-direction: var(--ddk-component-dashboard-card-flex-direction);
|
|
199
201
|
flex-wrap: nowrap;
|
|
@@ -202,14 +204,14 @@
|
|
|
202
204
|
height: 100%;
|
|
203
205
|
user-select: none;
|
|
204
206
|
overflow: visible;
|
|
205
|
-
`,
|
|
207
|
+
`,vi=u.kosComponent(({holder:t,showNavIcons:e})=>{const n=t.troubles[0],s=()=>{n!=null&&n.resolvable&&n.resolve()};return r.jsx(so,{holder:t,showNavIcon:e,onHolderSelect:s},t.id)}),Ci=u.kosComponent(({holders:t,showNavIcons:e,...n})=>{const s=p.useMemo(()=>t.map(o=>r.jsx(vi,{holder:o,showNavIcons:!!e},o.id)),[t,e]);return r.jsx(Tn,{...n,children:s})}),_i=u.KosLog.createLogger({name:"holder-group-view"});_i.debug("holder-group-view component loaded");const wi=["water","carb","ns","nns"],ki=k.div`
|
|
206
208
|
display: flex;
|
|
207
209
|
flex-direction: column;
|
|
208
210
|
overflow-y: auto;
|
|
209
211
|
overflow-x: hidden;
|
|
210
212
|
justify-content: space-between;
|
|
211
213
|
height: 100%;
|
|
212
|
-
`,
|
|
214
|
+
`,ss=k.div`
|
|
213
215
|
align-items: start;
|
|
214
216
|
|
|
215
217
|
display: flex;
|
|
@@ -219,25 +221,25 @@
|
|
|
219
221
|
text-overflow: ellipsis;
|
|
220
222
|
width: 100%;
|
|
221
223
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
222
|
-
`,
|
|
224
|
+
`,Si=k.div`
|
|
223
225
|
display: flex;
|
|
224
226
|
align-items: center;
|
|
225
227
|
justify-content: center;
|
|
226
228
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
227
|
-
`,
|
|
229
|
+
`,Ti=k.div`
|
|
228
230
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
229
231
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
230
|
-
`,
|
|
232
|
+
`,Ii=(t,e,n,s)=>{const o=s(`common:macros.${t.name}`),a=wi.includes(t.name),c=e?a?"":` ${s(`common:${t.ingredientName}`)}`:` ${s("common:macros.unassigned")}`,i=`${o}${c}`,d=n?a?o:c:`${o} ${c}`;return{titleText:i,cardTitleText:d}},ji=u.kosComponent(({holder:t,dashboardKey:e,fallbackStatus:n})=>{const{getExtensions:s}=ke(),o=s(Le.id),a=d=>o.find(m=>{const h=m.data;return(h==null?void 0:h.dashboardKey)===d}),c=a(t.name)??a(e),i=se.useExtensionComponent(Le);return c&&i?r.jsx(i,{module:c.id,holder:t}):r.jsx(l.StatusIndicator,{size:"small",status:n})}),Ei=t=>!t||t==="white",Pi=t=>t?void 0:"white",oo=u.kosComponent(({holder:t,onHolderSelect:e,showNavIcon:n,summaryBody:s})=>{var We,Xe;const{model:o}=Fe(),{visibleTroubles:a,initialized:c}=Se(t),{t:i}=u.useKosTranslation(["troubles","common"]),{componentModeOverride:d}=l.useComponentConfigurationContext(),m=d==="compact",{getExtensions:h}=ke(),f=(We=o==null?void 0:o.currentRole)==null?void 0:We.toLowerCase(),[g,v]=p.useState(!1),b=!!t.ingredientId,x=(a==null?void 0:a.length)??0,T=a==null?void 0:a[0],R=a?a.length>0:!1,D=R?`${T==null?void 0:T.color}`:void 0,P=Ei(D),E=R?Pi(P):b?void 0:"var(--ddk-component-dashboard-card-color-unassigned)",_=l.useAbbreviation(t.name,d==="compact"),{titleText:U,cardTitleText:q}=Ii(t,b,m,i),V=d==="compact"&&r.jsx(Si,{color:E,children:_}),H=r.jsx(ss,{color:E,children:q}),Ue=r.jsx(ss,{children:U}),me=u.ExtensionManager.executeDashboardKeyFactory(t)||"",Te=h(le.id).filter(pe=>!!pe.data).reduce((pe,he)=>{const qe=he.data;return pe[qe.dashboardKey]=he.data,pe},{}),_t=!!Te[me],{HolderContent:Ie,modalOptions:je}=Qt(t),ze=se.useExtensionComponent(le),wt=s??r.jsx(ji,{holder:t,dashboardKey:me,fallbackStatus:R?"pending":"completed"}),He=Ie?r.jsx(Ie,{holder:t,onComplete:()=>v(!1)}):_t&&ze?r.jsx(ze,{module:(Xe=Te[me])==null?void 0:Xe.id,holder:t}):null,Ze=$e(T),kt=R?r.jsx(Ti,{color:E,children:i(Ze.summary)}):null,St=p.useCallback(()=>{t.sortedPumps.length>0&&(f==="technician"?v(!0):R&&(e==null||e(t)))},[R,t,e,f]);return r.jsxs(r.Fragment,{children:[r.jsx(l.HolderDashboardCard,{avatar:V,backgroundColor:D,body:R?null:wt,footer:kt,cardId:t.path,errors:x,title:H,showNavIcon:n,onCardSelect:St},t.path),r.jsx(l.Modal,{contain:d!=="compact",...je,show:g,onClose:()=>v(!1),children:r.jsxs(ki,{children:[r.jsx(l.Header,{contain:d==="compact",showCloseButton:!0,title:Ue,onClose:()=>v(!1),CloseButton:d==="compact"?l.BackButton:void 0}),He]})}),(T==null?void 0:T.future)&&r.jsx(K,{title:Ue,future:T==null?void 0:T.future})]})}),Ai=u.kosComponent(({holders:t,showNavIcons:e,...n})=>r.jsx(Tn,{...n,children:t.map(s=>{const o=s.troubles[0];return r.jsx(oo,{holder:s,showNavIcon:e,onHolderSelect:()=>{o.resolvable&&o.resolve()}},s.id)})})),Ni=k(_e.MessageInformationIconWithBackground)`
|
|
231
233
|
width: var(--ddk-component-macro-card-unavailable-icon-size);
|
|
232
234
|
height: var(--ddk-component-macro-card-unavailable-icon-size);
|
|
233
|
-
`,
|
|
235
|
+
`,Di=k(l.UtilityModalHeading)`
|
|
234
236
|
text-align: center;
|
|
235
237
|
font-size: var(--ddk-component-sub-modal-heading-font-size-medium);
|
|
236
|
-
`,
|
|
238
|
+
`,Oi=k.div`
|
|
237
239
|
height: 100%;
|
|
238
240
|
overflow-y: auto;
|
|
239
241
|
width: 100%;
|
|
240
|
-
`,
|
|
242
|
+
`,Ri=k.div`
|
|
241
243
|
display: grid;
|
|
242
244
|
gap: var(--ddk-component-macro-setup-card-gap);
|
|
243
245
|
|
|
@@ -247,7 +249,7 @@
|
|
|
247
249
|
justify-content: center;
|
|
248
250
|
width: 100%;
|
|
249
251
|
user-select: none;
|
|
250
|
-
`,
|
|
252
|
+
`,Mi=t=>{const{componentModeOverride:e}=l.useComponentConfigurationContext();return r.jsx(Ri,{compact:e==="compact",...t})},Li=k.div`
|
|
251
253
|
align-items: center;
|
|
252
254
|
|
|
253
255
|
background: ${t=>t.selected?"var(--ddk-generic-color-grey-5)":"var(--ddk-generic-color-white)"};
|
|
@@ -270,32 +272,32 @@
|
|
|
270
272
|
overflow-wrap: anywhere;
|
|
271
273
|
padding: var(--ddk-component-macro-setup-card-header-padding-md);
|
|
272
274
|
text-align: center;
|
|
273
|
-
`,
|
|
275
|
+
`,Fi=k.div`
|
|
274
276
|
align-items: center;
|
|
275
277
|
display: flex;
|
|
276
278
|
flex-direction: column;
|
|
277
279
|
gap: 32px;
|
|
278
280
|
height: 100%;
|
|
279
281
|
justify-content: center;
|
|
280
|
-
`,
|
|
282
|
+
`,Vi=k.div`
|
|
281
283
|
color: var(--ddk-component-macro-card-unavailable-font-color);
|
|
282
284
|
font-size: var(--ddk-component-macro-card-unavailable-font-size);
|
|
283
285
|
font-weight: var(--ddk-component-macro-card-unavailable-font-weight);
|
|
284
|
-
`,vt=
|
|
286
|
+
`,vt=Ks(({holder:t,onComplete:e,macroAssignment:n,showCloseButton:s=!0})=>{const{t:o}=u.useKosTranslation("setup"),{t:a}=u.useKosTranslation("common"),{componentModeOverride:c}=l.useComponentConfigurationContext(),[i,d]=p.useState(t.ingredient),m=k.div`
|
|
285
287
|
display: flex;
|
|
286
288
|
flex-direction: column;
|
|
287
289
|
gap: 24px;
|
|
288
290
|
height: 100%;
|
|
289
|
-
`;return r.jsxs(m,{children:[r.jsx(l.Content,{children:n.hasMacroIngredients?r.jsxs(r.Fragment,{children:[c==="standard"&&r.jsx(
|
|
290
|
-
${e("agitator:agitate-after-without",{data:{value:t.volWithoutIceMl.displayValue}})}`},{name:e("agitator:ice-type"),value:t.type.displayValue}],o=t.isAgitating||t.isIceChuteOpen,a=t.agitateIsRunning||t.gateIsRunning;return r.jsxs(r.Fragment,{children:[r.jsxs(l.Content,{children:[r.jsx(l.FrameContainer,{name:"Ice Properties",children:r.jsx(l.FrameBody,{keyList:["name","value"],tableData:s})}),r.jsx(l.InfoCard,{label:"Agitating",value:t.isAgitating?e("common:yes"):e("common:no")}),r.jsx(l.InfoCard,{label:"Ice Chute Open",value:t.isIceChuteOpen?e("common:yes"):e("common:no")})]}),r.jsxs(l.Footer,{children:[r.jsx(l.Button,{disabled:o,onPointerDown:()=>n("agitate"),children:e("action.label",{context:"agitator"})}),r.jsx(l.Button,{disabled:o,onPointerDown:()=>n("gate"),children:e("action.label",{context:"gate"})}),r.jsx(l.Button,{disabled:a,onPointerUp:()=>n("cancelPour"),onPointerDown:()=>n("pour"),children:e("action.label",{context:"pour"})})]}),t.agitateFuture&&r.jsx(
|
|
291
|
+
`;return r.jsxs(m,{children:[r.jsx(l.Content,{children:n.hasMacroIngredients?r.jsxs(r.Fragment,{children:[c==="standard"&&r.jsx(Di,{children:o("select-and-assign-ingredients-for",{data:{name:a(`macros.${t.name}`)}})}),r.jsx(Oi,{children:r.jsx(Mi,{children:n.macroIngredients.map(h=>r.jsx(Li,{selected:(i==null?void 0:i.id)===h.id,onPointerDown:()=>{i===h||d(h)},children:h.name},h.id))})})]}):r.jsxs(Fi,{children:[r.jsx(Ni,{}),r.jsx(Vi,{children:o("no-ingredients-available-for-assignment")})]})}),r.jsx(l.Footer,{children:n.hasMacroIngredients?r.jsxs(r.Fragment,{children:[c==="standard"&&s&&r.jsx(l.Button,{onPointerDown:()=>{e==null||e()},children:a("close")}),r.jsx(l.Button,{mode:"primary",disabled:!i||i.id===t.ingredientId,onPointerDown:async()=>{await t.assignIngredient(i==null?void 0:i.id),e==null||e()},children:a("assignIngredient")})]}):s!==!1&&r.jsx(l.Button,{mode:"primary",onPointerDown:()=>{e==null||e()},children:a("proceed")})})]})}),Bi=u.kosComponent(({cardModel:t})=>{u.KosLog.debug("Agitator",t.path);const{t:e}=u.useKosTranslation(["agitator","common"]),n=p.useCallback(c=>{c==="agitate"?t==null||t.testAgitate():c==="gate"?t==null||t.testGate():c==="pour"?t==null||t.pourIce():c==="cancelPour"&&(t==null||t.cancelIceDispense())},[t]),s=[{name:e("agitator:agitation-duration"),value:t.durationSec.displayValue},{name:e("agitator:ice-max-dispense"),value:t.maxDispenseSec.displayValue},{name:e("agitator:agitate-after"),value:`${e("agitator:agitate-after-inactive",{data:{value:t.inactivitySec.displayValue}})},
|
|
292
|
+
${e("agitator:agitate-after-without",{data:{value:t.volWithoutIceMl.displayValue}})}`},{name:e("agitator:ice-type"),value:t.type.displayValue}],o=t.isAgitating||t.isIceChuteOpen,a=t.agitateIsRunning||t.gateIsRunning;return r.jsxs(r.Fragment,{children:[r.jsxs(l.Content,{children:[r.jsx(l.FrameContainer,{name:"Ice Properties",children:r.jsx(l.FrameBody,{keyList:["name","value"],tableData:s})}),r.jsx(l.InfoCard,{label:"Agitating",value:t.isAgitating?e("common:yes"):e("common:no")}),r.jsx(l.InfoCard,{label:"Ice Chute Open",value:t.isIceChuteOpen?e("common:yes"):e("common:no")})]}),r.jsxs(l.Footer,{children:[r.jsx(l.Button,{disabled:o,onPointerDown:()=>n("agitate"),children:e("action.label",{context:"agitator"})}),r.jsx(l.Button,{disabled:o,onPointerDown:()=>n("gate"),children:e("action.label",{context:"gate"})}),r.jsx(l.Button,{disabled:a,onPointerUp:()=>n("cancelPour"),onPointerDown:()=>n("pour"),children:e("action.label",{context:"pour"})})]}),t.agitateFuture&&r.jsx(K,{title:e("testing"),future:t.agitateFuture}),t.gateFuture&&r.jsx(K,{title:e("testing"),future:t.gateFuture})]})}),$i=k.div`
|
|
291
293
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
292
294
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
293
|
-
`,
|
|
295
|
+
`,Ki=u.kosComponent(t=>{u.KosLog.debug(`summary component loaded for holder ${t}`),u.KosLog.info(`render agitator summary for holder ${t.cardModel.path}`);const{t:e}=u.useKosTranslation("common");return r.jsxs(r.Fragment,{children:[r.jsx(l.StatusIndicator,{size:"small",status:"completed"}),r.jsx($i,{style:{visibility:t.cardModel.isAgitating?"visible":"hidden"},children:e("agitating")})]})}),Ui=k.div`
|
|
294
296
|
display: flex;
|
|
295
297
|
flex-direction: column;
|
|
296
298
|
gap: 24px;
|
|
297
299
|
padding: 24px;
|
|
298
|
-
`,
|
|
300
|
+
`,zi=Ae.withAssembly(({assembly:t,showHeading:e})=>r.jsx(ro,{iceAgitator:t.iceAgitator,showHeading:e})),ro=u.kosComponent(({iceAgitator:t,showHeading:e})=>{const{t:n}=u.useKosTranslation("about"),s=rs.useLocation(),{componentModeOverride:o}=l.useComponentConfigurationContext(),a=(t==null?void 0:t.iceTypes.map(i=>({id:i,label:i})))||[],c=p.useCallback(async()=>{(t==null?void 0:t.type.value)!==void 0&&(t==null||t.updateIceType(t.type.value))},[t]);return t?r.jsxs(l.TabContainer,{children:[e&&r.jsx(l.SettingsSubheading,{children:n("ice-settings","Ice Settings")}),o==="compact"?r.jsx(js,{configProperty:t.type,onChange:i=>t.updateIceType(i),options:a,label:n("ice-type","Ice Type")}):r.jsx(rt,{configProperty:t.type,onSave:i=>t.updateIceType(i),items:a,label:n("ice-type","Ice Type")||void 0}),r.jsx(ge,{configProperty:t.durationSec,label:n("agitation-duration","Agitation duration")||void 0}),r.jsx(ge,{configProperty:t.inactivitySec,label:n("agitate-inactivity","Agitate after inactivity")||void 0}),r.jsx(ge,{configProperty:t.volWithoutIceMl,label:n("agitate-without-ice","Agitate after poured without ice")||void 0}),o!=="compact"&&(s==null?void 0:s.pathname.includes("/settings"))&&r.jsx(l.Footer,{children:r.jsx(l.Button,{onPointerDown:c,children:n("reset")})})]}):"Ice model not loaded..."}),Hi=u.kosComponent(({showHeading:t})=>{var h,f,g,v,b;const{t:e}=u.useKosTranslation("region"),{allLocales:n}=u.useKosTranslationContext(),{model:s}=xt(),{regionModel:o}=u.useKosRegions(),a=p.useCallback(x=>({id:x,label:e(`locale.country.${x}`)}),[e]),c=p.useMemo(()=>n.reduce((x,{locale:T,label:R})=>(x[T]=R,x),{}),[n]),{selectedRegion:i,updateRegion:d,regionSelectProps:m}=u.useKosRegions(a);return r.jsxs(l.TabContainer,{children:[t&&r.jsx(l.SettingsSubheading,{children:e("localization","Localization")}),r.jsx(l.PickerCard,{cancelButtonLabel:e("discard-changes","Discard Changes")||void 0,closeButtonLabel:e("close","Close")||void 0,displayValue:e(`locale.country.${i}`)||void 0,items:m.options,label:e("country","Country"),loop:!1,onSave:x=>d(x),proceedButtonLabel:e("save","Save")||void 0,selectedItemId:i}),((h=o==null?void 0:o.unitSystemOptions)==null?void 0:h.length)&&r.jsx(l.SwitchCard,{label:e("units-of-measurement","Units of Measurement"),options:(f=o==null?void 0:o.unitSystemOptions)==null?void 0:f.map(x=>({id:x.id,label:`${e(`locale.unit.${x.id}`)}/${e(`locale.units.${x.id}`)}`})),onChange:x=>o==null?void 0:o.setSelectedUnitSystem(String(x)),value:String(o==null?void 0:o.selectedUnitSystem).toLowerCase()}),r.jsx(l.PickerCard,{cancelButtonLabel:e("discard-changes","Discard Changes")||void 0,closeButtonLabel:e("close","Close")||void 0,displayValue:c[((g=s==null?void 0:s.ncuiLanguage)==null?void 0:g.displayValue)??""]??((v=s==null?void 0:s.ncuiLanguage)==null?void 0:v.displayValue),items:n==null?void 0:n.map(({locale:x,label:T})=>({id:x,label:T})),label:e("non-consumer-language","Non-Consumer Language"),loop:!1,onSave:x=>{var T;return(T=s==null?void 0:s.ncuiLanguage)==null?void 0:T.updateProperty(x)},proceedButtonLabel:e("save","Save")||void 0,selectedItemId:(b=s==null?void 0:s.ncuiLanguage)==null?void 0:b.displayValue})]})});k.div`
|
|
299
301
|
display: flex;
|
|
300
302
|
font-size: var(--ddk-generic-font-size-x-small);
|
|
301
303
|
font-weight: normal;
|
|
@@ -329,11 +331,11 @@ ${e("agitator:agitate-after-without",{data:{value:t.volWithoutIceMl.displayValue
|
|
|
329
331
|
display: flex;
|
|
330
332
|
justify-content: flex-end;
|
|
331
333
|
}
|
|
332
|
-
`;const
|
|
334
|
+
`;const Zi=k.div`
|
|
333
335
|
display: flex;
|
|
334
336
|
align-items: center;
|
|
335
337
|
justify-content: flex-end;
|
|
336
|
-
`,
|
|
338
|
+
`,Wi=({item:t,valueKey:e})=>{const{label:n,value:s}=t;if(e==="label")return r.jsx("div",{children:r.jsx("b",{children:n})});if(e==="value")return r.jsx(Zi,{children:s})},Xi=({groupName:t,networkTestContainer:e})=>{var s;const{t:n}=u.useKosTranslation("connectivity");return((s=e==null?void 0:e.models.getIndexByKey("group",t))==null?void 0:s.map(o=>{const a=t==="interface",c=a?o.results.map(i=>({label:i.name,value:i.val})):[];return a?r.jsx(l.Table,{CellRenderer:Wi,data:c,dataKeys:["label","value"],heading:o.name}):r.jsx(l.StatusCard,{leftLabel:n(`${o.name}`),rightLabel:o.inProgress?n("inProgress"):o.timestamp?o.passed?n("success"):n("Fail"):n("testNotRun"),type:o.inProgress?"InProgress":o.timestamp?o.passed?"Success":"Fail":"Default",failureMessage:n("failureMessage"),lastSuccess:o==null?void 0:o.timestamp,lastSuccessful:n("lastSuccessful")},o.id)}))||[]},qi=Us(Xi),Yi=k.div`
|
|
337
339
|
background-color: var(--ddk-generic-color-grey-80);
|
|
338
340
|
color: var(--ddk-generic-color-grey-5);
|
|
339
341
|
border-radius: 5px;
|
|
@@ -342,65 +344,65 @@ ${e("agitator:agitate-after-without",{data:{value:t.volWithoutIceMl.displayValue
|
|
|
342
344
|
align-items: center;
|
|
343
345
|
justify-content: center;
|
|
344
346
|
font-size: var(--ddk-generic-font-size-xx-small);
|
|
345
|
-
`,
|
|
347
|
+
`,ao=u.kosComponent(({showAction:t=!0,trouble:e,showHolder:n})=>{var T;const{t:s}=u.useKosTranslation(["troubles"]),{model:o}=bt(),a=o==null?void 0:o.currentRole,c=yt(e),{action:i,label:d,progress:m}=$e(e),h=e.resolvable??!1,{future:f}=J(e),g=(T=e==null?void 0:e.data)!=null&&T.holderNames&&e.data.holderNames.length>0?r.jsx(Yi,{children:e.data.holderNames[0]}):null,v=(e==null?void 0:e.color)??"orange",b=(e==null?void 0:e.shouldDefer)??!1,x=(e==null?void 0:e.deferred)??!1;return r.jsxs(r.Fragment,{children:[r.jsx(l.NotificationCard,{label:s(d,{context:a==null?void 0:a.toLowerCase(),data:c}),indicatorColor:v,buttonLabel:t?x?"Queued":b?"Queue":s(i,{context:a,defaultValue:""}):void 0,date:e.createTime,prefix:n?g:void 0,onAction:t&&h&&!x?()=>{e.resolve()}:void 0}),f&&r.jsx(K,{title:s(m,{context:a}),future:x?void 0:f,failureMessage:s(`troubles.${e.type}.error`,{context:f!=null&&f.reason?"reason":void 0,data:{reason:f!=null&&f.reason?`__troubles.errors.${f==null?void 0:f.reason}__`:void 0}})})]})}),Gi=({viewContainerId:t,extensionPointId:e,tabs:n,...s})=>{const{getExtensions:o}=se.useKosPluginsContext(),a=o(t),c=o(e).reduce((f,g)=>(f[g.id]=g,f),{}),i=a.map(f=>f.data.namespace),{t:d}=u.useKosTranslation(["",...new Set(i)]),m=a.map(f=>{const g=f.data,v=[...g.settings].map(b=>{const x=c[b],T=x.data;return r.jsxs(l.TabContainer,{children:[r.jsx(l.SettingsSubheading,{children:d(`${T.namespace}:${T.title}`)}),r.jsx(se.DynamicComponent,{extension:e,module:b})]},x.id)});return{id:f.id,label:d(`${g.namespace}:${g.title}`),content:r.jsx(l.TabViewLayout,{children:v})}}),h=[...n,...m];return r.jsx(l.TabRouter,{...s,tabs:h})},Ke=u.kosComponent(({holder:t})=>{const{t:e}=u.useKosTranslation("common"),{componentModeOverride:n}=l.useComponentConfigurationContext(),s=n==="compact",{visibleTroubles:o,initialized:a}=Se(t),i=((o==null?void 0:o.length)??0)>0,d=!!t.troublesByType.FlushTrouble,m=!!t.troublesByType.PrimeTrouble,h=!!t.troublesByType.PurgeTrouble,f=d?t.troublesByType.FlushTrouble[0]:m?t.troublesByType.PrimeTrouble[0]:h?t.troublesByType.PurgeTrouble[0]:null,g=(f==null?void 0:f.shouldDefer)??!1,v=(f==null?void 0:f.deferred)??!1,[b,x]=de(t),T=p.useCallback(R=>{g?f==null||f.resolve():x(R)},[x,g,f]);return i&&a&&s?r.jsxs(r.Fragment,{children:[d?r.jsx(l.Button,{disabled:v,mode:"primary",onPointerDown:()=>T("flush"),children:e("flush",{context:v?"queued":""})}):h?r.jsx(l.Button,{disabled:v,mode:"primary",onPointerDown:()=>T("purge"),children:e("purge",{context:v?"queued":""})}):m?r.jsx(l.Button,{disabled:v,mode:"primary",onPointerDown:()=>T("prime"),children:e("prime",{context:v?"queued":""})}):null,b&&r.jsx(K,{...b})]}):null}),ae=({holder:t,filter:e})=>{const{componentModeOverride:n}=l.useComponentConfigurationContext(),s=n==="standard",{visibleTroubles:o,initialized:a}=Se(t),c=e?o==null?void 0:o.filter(e):o;return((c==null?void 0:c.length)??0)>0&&a&&(o==null?void 0:o.map(m=>r.jsx(ao,{showAction:s,trouble:m},m.id)))},Ji=u.kosComponent(({holder:t})=>{const{t:e}=u.useKosTranslation("common"),[n,s]=de(t),[o,a]=p.useState();p.useEffect(()=>{async function b(){if(t.ingredientId!==void 0){const x=await t.resolveIntentVolume("CALIBRATE");a(Math.round(x.volume))}}b()},[t,t.ingredientId]);const c=t.ingredientId!==void 0,i=o&&o>0,{holderExperience:d,setHolderExperience:m,currentExperienceId:h}=we(t),f=c||h==="replace-line",g=t.pumps.data[0],v=u.getKosCompanionModel(g,$.CgpPump.type);return f?r.jsxs(r.Fragment,{children:[r.jsxs(l.Content,{contain:!0,children:[r.jsx(ae,{holder:t}),r.jsx(Qi,{children:r.jsx(Kt,{probeAware:v})})]}),r.jsxs(l.Footer,{children:[r.jsx(l.Button,{disabled:!i,onPointerDown:()=>s("calibrate"),children:i?e("intentPour",{data:{volume:o}}):e("calibrate")}),r.jsx(l.Button,{onPointerDown:()=>m("replace-line"),children:e("replace-line")}),r.jsx(ue,{disabled:!c,model:t}),r.jsx(Ke,{holder:t})]}),r.jsx(p.Suspense,{children:d}),n&&r.jsx(K,{...n})]}):r.jsx(vt,{showCloseButton:!1,holder:t})}),Qi=k.div`
|
|
346
348
|
width: 100%;
|
|
347
349
|
height: 100%;
|
|
348
350
|
display: flex;
|
|
349
351
|
justify-content: center;
|
|
350
352
|
align-items: center;
|
|
351
353
|
padding: 32px 0px;
|
|
352
|
-
`,
|
|
354
|
+
`,ec=u.kosComponent(({holder:t})=>{const{t:e}=u.useKosTranslation("common"),[n,s]=de(t),[o,a]=p.useState();p.useEffect(()=>{async function g(){if(t.ingredientId!==void 0){const v=await t.resolveIntentVolume("CALIBRATE");a(Math.round(v.volume))}}g()},[t,t.ingredientId]);const c=t.ingredientId!==void 0,i=o&&o>0,{holderExperience:d,setHolderExperience:m,currentExperienceId:h}=we(t);return c||h==="replace-line"?r.jsxs(r.Fragment,{children:[r.jsx(l.Content,{contain:!0,children:r.jsx(ae,{holder:t})}),r.jsxs(l.Footer,{children:[r.jsx(l.Button,{disabled:!i,onPointerDown:()=>s("calibrate"),children:i?e("intentPour",{data:{volume:o}}):e("calibrate")}),r.jsx(l.Button,{onPointerDown:()=>m("replace-line"),children:e("replace-line")}),r.jsx(ue,{disabled:!c,model:t}),r.jsx(Ke,{holder:t})]}),r.jsx(p.Suspense,{children:d}),n&&r.jsx(K,{...n})]}):r.jsx(vt,{showCloseButton:!1,holder:t})}),tc=u.kosComponent(({holder:t})=>{const{t:e}=u.useKosTranslation("common"),[n,s]=de(t),[o,a]=p.useState();p.useEffect(()=>{async function d(){if(t.ingredientId!==void 0){const m=await t.resolveIntentVolume("CALIBRATE");a(Math.round(m.volume))}}d()},[t,t.ingredientId]);const c=t.ingredientId!==void 0,i=o&&o>0;return c?r.jsxs(r.Fragment,{children:[r.jsx(l.Content,{contain:!0,children:r.jsx(ae,{holder:t})}),r.jsxs(l.Footer,{children:[r.jsx(l.Button,{disabled:!i,onPointerDown:()=>s("calibrate"),children:i?e("intentPour",{data:{volume:o}}):e("calibrate")}),r.jsx(ue,{disabled:!c,model:t}),r.jsx(Ke,{holder:t})]}),n&&r.jsx(K,{...n})]}):r.jsx(vt,{showCloseButton:!1,holder:t})}),nc=k.div`
|
|
353
355
|
display: flex;
|
|
354
356
|
flex-direction: column;
|
|
355
357
|
gap: var(--ddk-component-super-pump-container-gap);
|
|
356
|
-
`,
|
|
358
|
+
`,sc=k.div`
|
|
357
359
|
display: flex;
|
|
358
360
|
flex-direction: column;
|
|
359
361
|
gap: var(--ddk-component-cartridge-container-gap);
|
|
360
|
-
`,
|
|
362
|
+
`,io=u.kosComponent(({holder:t})=>{const e=$.useFreestyleAssemblyContext(),{t:n}=u.useKosTranslation("common"),[s,o]=p.useState("all"),a=e==null?void 0:e.cartridgeAgitatorModels[0],c=!!t.ingredientId,i=t.pumps.getModel(s),d=u.getKosCompanionModel(t,$.FreestyleHolder.type),m=!!(d!=null&&d.agitated),{holderExperience:h,setHolderExperience:f}=we(t,i),{calibrateVolume:g,canCalibrate:v,action:b,handleAction:x}=Gs(i),T=p.useCallback(_=>{o(_.id)},[]),R=t.hasFuelGuage,D=t.fillPercent,{future:P}=J(a),E=p.useCallback(_=>_.data.pumpPath===(i==null?void 0:i.path),[i==null?void 0:i.path]);return r.jsxs(r.Fragment,{children:[r.jsxs(nc,{children:[r.jsxs(l.Content,{contain:!0,children:[c&&R&&r.jsxs(sc,{children:[r.jsx(l.FuelGauge,{size:"large",value:D,showBarsOverride:!0}),r.jsx(un,{holder:t})]}),r.jsx(l.Tabs,{activeTab:s,contain:!1,tabs:[{id:"all",label:n("all"),content:r.jsx(ae,{holder:t})},...t.pumps.data.filter(_=>!_.virtual).map(_=>({id:_.id,label:n(`macros.${_.name}`),content:r.jsx(ae,{holder:_,filter:E})}))],onChange:T,showBackground:!1})]}),r.jsxs(l.Footer,{children:[i?r.jsxs(r.Fragment,{children:[r.jsx(l.Button,{onPointerDown:()=>f("replace-pump"),children:n("replace-pump")}),r.jsx(l.Button,{onPointerDown:()=>f("calibrateSPM"),children:n("calibrate")}),v&&r.jsx(l.Button,{disabled:!v,onPointerDown:()=>x("calibrate"),children:n("intentPour",{data:{volume:g}})})]}):r.jsxs(r.Fragment,{children:[!c&&r.jsx(l.Button,{onPointerDown:()=>f("rfid-override"),children:n("rfid-override")}),r.jsx(l.Button,{onPointerDown:()=>f("replace-line"),children:n("replace-line")}),m&&r.jsx(l.Button,{onPointerDown:()=>a==null?void 0:a.testAgitate(),children:n("agitate")})]}),r.jsx(ue,{disabled:!c,model:i||t})]})]}),r.jsx(p.Suspense,{children:h}),P&&r.jsx(K,{title:n("agitating"),future:P}),b&&r.jsx(K,{...b})]})}),oc=u.kosComponent(({holder:t})=>r.jsxs(r.Fragment,{children:[r.jsx(ae,{holder:t}),r.jsxs(l.Footer,{children:[r.jsx(ue,{model:t}),r.jsx(Ke,{holder:t})]})]})),rc=u.kosComponent(({holder:t})=>{const{t:e}=u.useKosTranslation("common"),[n,s]=de(t),{holderExperience:o,setHolderExperience:a}=we(t);return r.jsxs(r.Fragment,{children:[r.jsx(ae,{holder:t}),r.jsxs(l.Footer,{children:[r.jsx(ue,{model:t}),r.jsx(l.Button,{onPointerDown:()=>s("high-flow-test"),children:e("high-flow-test")}),r.jsx(l.Button,{onPointerDown:()=>s("low-flow-test"),children:e("low-flow-test")}),r.jsx(l.Button,{onPointerDown:()=>a("diagnostics"),children:e("diagnostics")}),r.jsx(l.Button,{onPointerDown:()=>a("calibrate"),children:e("calibrate")})]}),r.jsx(p.Suspense,{children:o}),n&&r.jsx(K,{...n})]})}),ac=k.section`
|
|
361
363
|
align-items: center;
|
|
362
364
|
display: flex;
|
|
363
365
|
flex-direction: column;
|
|
364
366
|
gap: 32px;
|
|
365
367
|
height: 100%;
|
|
366
368
|
justify-content: space-between;
|
|
367
|
-
`,
|
|
369
|
+
`,ic=k.div`
|
|
368
370
|
display: flex;
|
|
369
371
|
gap: 32px;
|
|
370
372
|
flex-direction: column;
|
|
371
373
|
align-items: center;
|
|
372
374
|
padding: 32px;
|
|
373
|
-
`,
|
|
375
|
+
`,cc=k.div`
|
|
374
376
|
display: flex;
|
|
375
377
|
flex-direction: column;
|
|
376
378
|
gap: 12px;
|
|
377
379
|
text-align: center;
|
|
378
|
-
`,
|
|
380
|
+
`,lc=({onComplete:t})=>{const{t:e}=u.useKosTranslation("reboot"),[n,s]=p.useState(!1),{model:o}=gt(),{componentModeOverride:a}=l.useComponentConfigurationContext();return r.jsxs(l.Modal,{show:!n,onClose:()=>s(!0),onClosed:t,contain:a!=="compact",children:[a==="compact"&&r.jsx(l.Header,{title:e("reboot"),showCloseButton:!0,onClose:()=>s(!0),CloseButton:l.CompactCloseButton}),r.jsxs(ac,{children:[r.jsxs(ic,{children:[r.jsx(l.QuestionIconStyle,{}),r.jsx(cc,{children:r.jsx(l.UtilityModalHeading,{children:e("modal-heading","Are you sure you want to reboot dispenser?")})})]}),r.jsx(l.CancelProceedFooter,{cancelLabel:`${e("cancel","Cancel")}`,proceedLabel:`${e("reboot","Reboot")}`,onCancel:()=>s(!0),onProceed:()=>o==null?void 0:o.completeReboot()})]})]})},Ee=k(l.LabelInformation)`
|
|
379
381
|
text-align: center;
|
|
380
|
-
`,
|
|
382
|
+
`,dc=u.kosComponent(({remoteTray:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"remote-nns"}),[s,o]=p.useState("idle"),[a,c]=p.useState({}),[i,d]=p.useState({}),h=t.holder.pumps.data.filter(D=>D.childPump),f=t.remoteTrayEnabled.value===!0,g=()=>h.every(D=>{const P=a[D.name];return P!=null&&P!==""}),v=p.useCallback((D,P)=>{c(E=>({...E,[D]:P}))},[]),b=p.useCallback(D=>(P="")=>{v(D,P)},[v]),x=p.useCallback(async()=>{t.remoteTrayEnabled.updateProperty(!f),o(f?"disableSuccess":"success")},[f,t.remoteTrayEnabled]),T=p.useCallback(async()=>{o("progress"),d({});let D=!1;await Promise.all(h.map(async P=>{try{const E=u.getKosCompanionModel(P,$.FreestylePump.type),[_]=await E.replacePump(a[P.name]);_&&(d(U=>({...U,[P.name]:_})),D=!0)}catch(E){console.error(E),d(_=>({..._,[P.name]:"unknownError"})),D=!0}})),D?o("pump"):x()},[f,a,h,t.remoteTrayEnabled,x]),R=p.useMemo(()=>({idle:{title:n(f?"disable-title":"idle-title"),information:r.jsx(Ee,{children:n(f?"disable-info":"idle-info")}),footer:r.jsx(l.Button,{onPointerDown:()=>{f?x():o("pump")},children:n(f?"disable":"enable")}),status:"information"},pump:{title:n("pump-title"),information:r.jsxs(r.Fragment,{children:[r.jsx(Ee,{children:n("pump-info")}),h.map(D=>r.jsx(l.ErrorInputCard,{layout:"hex",description:i[D.name]?n(`errors.${i[D.name]}`):"",value:a[D.name]??"",label:n(`pumps.${D.name}`),onChange:b(D.name)},D.name))]}),footer:r.jsxs(r.Fragment,{children:[r.jsx(l.Button,{disabled:!g(),onPointerDown:T,children:n("enter")}),r.jsx(l.Button,{onPointerDown:e,children:n("cancel")})]})},progress:{title:n("progress-title"),information:r.jsx(Ee,{children:n("progress-info")}),status:"loading"},success:{title:n("success-title"),information:r.jsx(Ee,{children:n("success-info")}),status:"success"},disableSuccess:{title:n("disable-success-title"),information:r.jsx(Ee,{children:n("disable-success-info")}),status:"success"}}),[v,f,e,a,i,h,T,n]);return r.jsx(l.WorkflowModal,{...R[s],onClose:()=>e()})}),uc=u.kosComponent(({cardModel:t})=>(u.KosLog.debug("RemoteTray",t.name),r.jsx(io,{holder:t.holder}))),mc=k.div`
|
|
381
383
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
382
384
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
383
385
|
position: absolute;
|
|
384
386
|
bottom: 6px;
|
|
385
|
-
`,
|
|
387
|
+
`,pc=u.kosComponent(t=>{u.KosLog.debug(`summary component loaded for holder ${t}`),u.KosLog.info(`render agitator summary for holder ${t.cardModel.name}`);const{t:e}=u.useKosTranslation("troubles"),n=t.cardModel,{hasTroubles:s,highestTrouble:o}=Qs(n),a=$e(o),c=yt(o);return s?r.jsx(mc,{children:e(a.summary,{context:o!=null&&o.deferred?"queued":void 0,data:c})}):r.jsx(l.StatusIndicator,{size:"small",status:"completed"})}),co=u.kosComponent(({holder:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("replace-line"),[s,o]=p.useState(),[a,c]=p.useState();p.useEffect(()=>{t.replaceLine().then(()=>{o("success")})},[t]);const i=()=>{if(a){o(void 0);return}e()};return r.jsx(l.StatusBar,{show:s!==void 0,onClose:i,children:s==="failure"?r.jsx(Ne,{children:n(a||"unknownError")}):s==="success"?r.jsx(st,{children:n("success")}):null})}),hc=k.div`
|
|
386
388
|
display: flex;
|
|
387
389
|
flex-direction: column;
|
|
388
390
|
overflow-y: auto;
|
|
389
391
|
overflow-x: hidden;
|
|
390
392
|
gap: 32px;
|
|
391
393
|
height: 100%;
|
|
392
|
-
`,
|
|
394
|
+
`,lo=u.kosComponent(({pump:t,onComplete:e})=>{const[n,s]=p.useState(!1),{t:o}=u.useKosTranslation("replace-pump"),{componentModeOverride:a}=l.useComponentConfigurationContext(),[c,i]=p.useState(),[d,m]=p.useState(),[h,f]=p.useState(),g=u.getKosCompanionModel(t,$.FreestylePump.type),v=t.name,b=p.useCallback(R=>{if(R!==void 0&&R.length===0)return o("pump-calibration-length-error")},[o]),x=p.useCallback(async()=>{if(c===void 0)return;const[R]=await g.replacePump(c);R?(m("failure"),f(R)):m("success")},[g,c]),T=()=>{if(h){m(void 0);return}s(!0)};return r.jsxs(r.Fragment,{children:[r.jsx(l.Modal,{contain:a!=="compact",onClosed:e,show:!n,children:r.jsxs(hc,{children:[r.jsx(l.Header,{contain:a==="compact",showCloseButton:!0,title:v?o("label-replace-pump",{label:v}):o("replace-pump"),showOpenButton:!1,onClose:()=>s(!0),CloseButton:a==="compact"?l.BackButton:void 0}),r.jsx(l.Content,{align:"top",children:r.jsx(l.InputCard,{isValid:b,label:o("enter-pump-calibration-code"),layout:"hex",value:c,onChange:R=>{f(void 0),i(R)}})}),r.jsx(l.Footer,{children:r.jsx(l.Button,{mode:"primary",disabled:!c||!!h,onPointerDown:x,children:o("replace-pump")})})]})}),r.jsx(l.StatusBar,{show:d!==void 0,onClose:T,children:d==="failure"?r.jsx(Ne,{children:o(h||"unknownError")}):d==="success"?r.jsx(st,{children:o("success")}):null})]})}),fc=/^[0-9a-fA-F]+$/,os=t=>fc.test(t),gc=k.div`
|
|
393
395
|
display: flex;
|
|
394
396
|
flex-direction: column;
|
|
395
397
|
overflow-y: auto;
|
|
396
398
|
overflow-x: hidden;
|
|
397
399
|
height: 100%;
|
|
398
|
-
`,
|
|
400
|
+
`,uo=u.kosComponent(({holder:t,onComplete:e})=>{const n=t.name,[s,o]=p.useState(!1),{t:a}=u.useKosTranslation("rfid-override"),{componentModeOverride:c}=l.useComponentConfigurationContext(),[i,d]=p.useState(),[m,h]=p.useState(),[f,g]=p.useState(),[v,b]=p.useState(),[x,T]=p.useState(),R=E=>{if(E!==void 0&&E.length!==12)return a("errIdLen");if(!os(E))return a("errIdFormat")},D=E=>{if(E!==void 0&&E.length!==8)return a("errCodeLen");if(!os(E))return a("errCodeFormat")},P=async()=>{try{await t.overrideRfidCode({stickerId:i,stickerCode:m}),o(!0)}catch(E){switch(E.type){case"errIdLen":case"errIdFormat":b(E.type);break;case"errCodeLen":case"errCodeFormat":T(E.type);break;case"errVerify":case"errBadJson":g(E.type);break}}};return r.jsxs(l.Modal,{contain:c!=="compact",mode:"maximized",onClosed:e,show:!s,children:[r.jsx(l.Header,{contain:c==="compact",showCloseButton:!0,title:n?a("label-rfid-override",{label:n}):a("rfid-override"),showOpenButton:!1,onClose:()=>o(!0),CloseButton:c==="compact"?l.BackButton:void 0}),r.jsxs(gc,{children:[r.jsxs(l.Content,{align:"top",children:[r.jsx(l.InfoContainer,{children:a("info")}),r.jsx(l.ErrorInputCard,{isValid:R,description:v?a(v):void 0,label:a("enter-cartridge-id"),layout:"hex",value:i,onChange:E=>{b(void 0),d(E)}}),r.jsx(l.ErrorInputCard,{isValid:D,description:x?a(x):void 0,label:a("enter-code"),layout:"hex",value:m,onChange:E=>{T(void 0),h(E)}})]}),r.jsx(l.Footer,{children:r.jsx(l.Button,{mode:"primary",disabled:!i||!m,onPointerDown:P,children:a("override")})}),f&&r.jsx(l.ProgressBar,{onClose:()=>g(void 0),renderFailure:r.jsx(l.FailureCard,{heading:a("rfid-override"),message:a(f,{holder:t.name})}),show:!0,status:"failure",title:"",value:0})]})]})}),xc=u.kosComponent(({setupPath:t})=>{const{model:e}=bt(),[n,s]=p.useState(!1),[o]=rs.useSearchParams(),a=!!o.get("skipSetup"),c=l.useNavigate();return p.useEffect(()=>{!n&&(e!=null&&e.setupRequired)&&(s(!0),a||c(t))},[e==null?void 0:e.setupRequired,n,c,t,a]),null}),mo=k.div`
|
|
399
401
|
cursor: pointer;
|
|
400
402
|
display: flex;
|
|
401
403
|
gap: 8px;
|
|
402
404
|
align-items: center;
|
|
403
|
-
`,
|
|
405
|
+
`,po=k.div`
|
|
404
406
|
color: var(--ddk-generic-color-grey-100, #171717);
|
|
405
407
|
font-size: var(--ddk-component-sidebar-font-size-medium);
|
|
406
408
|
font-style: normal;
|
|
@@ -409,18 +411,18 @@ ${e("agitator:agitate-after-without",{data:{value:t.volWithoutIceMl.displayValue
|
|
|
409
411
|
letter-spacing: 0.44px;
|
|
410
412
|
white-space: nowrap;
|
|
411
413
|
overflow: hidden;
|
|
412
|
-
`,
|
|
414
|
+
`,ho=u.kosComponent(({setupStepContainer:t,onStepSelected:e,...n})=>{const{t:s,labelMap:o}=$s({defaultNamespace:"setup",extensionPoint:Be.id}),a=t==null?void 0:t.currentStep,c=(t==null?void 0:t.data.map(i=>r.jsxs(mo,{onPointerDown:()=>{t.setCurrentStep(i.id),e(i.id)},children:[r.jsx(l.StatusIndicator,{size:"large",status:a===i?"active":i.complete?"completed":"pending"}),r.jsx(po,{children:s(o[i.name]??i.titleKey)})]},i.id)))||[];return r.jsx(l.Sidebar,{...n,children:c})}),yc=Ys(ho),bc=u.kosComponent(()=>{const{model:t}=u.useSoftwareInfo();return(t==null?void 0:t.nodes)&&t.nodes.map((e,n)=>r.jsxs(l.FrameContainer,{name:e.nodeName,children:[r.jsx("div",{children:r.jsx(l.FrameBody,{keyList:[],tableHead:`KOS Release Version: ${e.kosVersion}`,tableData:[],tableLayout:"fixed"})},"kosVersion"),Object.keys(e.group).map((s,o)=>r.jsx("div",{children:r.jsx(l.FrameBody,{keyList:["name","version"],tableHead:s==="undefined"?"Apps":s,tableData:e.group[s],tableLayout:"fixed"})},o))]},n))}),Dt=k(l.LabelInformation)`
|
|
413
415
|
white-space: pre-wrap;
|
|
414
|
-
`,
|
|
416
|
+
`,fo=u.kosComponent(({pump:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"spm-field-calibration"}),[s,o]=p.useState("preparation-idle"),[a,c]=p.useState(),[i,d]=p.useState(),[m,h]=p.useState(),{clearFuture:f,future:g}=J(t);p.useEffect(()=>{switch(g==null?void 0:g.endState){case"CANCEL":switch(s){case"preparation-in-progress":o("preparation-idle");break;default:c("calibration-canceled"),o("failure")}break;case"SUCCESS":switch(s){case"preparation-in-progress":o("preparation-success");break;case"calibration-in-progress":o("calibration-input");break;case"verification-in-progress":o("verification-input");break}break;case"FAIL":case"ABORT":c(""),o("failure");break}},[g==null?void 0:g.endState,g==null?void 0:g.reason,s]);const v=p.useMemo(()=>({"preparation-idle":{information:r.jsx(Dt,{children:n("preparation-idle-info")}),footer:r.jsx(l.Button,{onPointerDown:()=>{f(),t.performPreCalibrate(),o("preparation-in-progress")},children:n("preparation-action")}),status:"information"},"preparation-in-progress":{information:r.jsx(l.LabelInformation,{children:n("preparation-progress-info")}),footer:r.jsx(l.Button,{disabled:!0,children:n("preparation-action")}),status:"loading"},"preparation-success":{information:r.jsx(l.LabelInformation,{children:n("preparation-success-info")}),footer:r.jsx(l.Button,{onPointerDown:()=>o("calibration-idle"),children:n("preparation-success-action")}),status:"success"},"preparation-failed":{},"calibration-idle":{information:r.jsx(Dt,{children:n("calibration-idle-info")}),footer:r.jsx(l.Button,{onPointerDown:()=>{f(),t.performCalibrate(),o("calibration-in-progress")},children:n("calibrate")}),status:"information"},"calibration-in-progress":{information:r.jsx(l.LabelInformation,{children:n("calibration-progress-info")}),status:"loading"},"calibration-input":{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("calibration-input-info")}),r.jsx(l.InputCard,{label:"Volume",unitValue:"ml",layout:"num",onChange:x=>{x!==void 0&&d(x)},value:i!==void 0?i:""})]}),footer:r.jsx(l.Button,{disabled:i===void 0,onPointerDown:()=>{i!==void 0&&o("verification-idle")},children:n("proceed")}),status:"information"},"calibration-input-confirmation":{},"verification-idle":{information:r.jsx(Dt,{children:n("verification-idle-info")}),footer:r.jsx(l.Button,{onPointerDown:async()=>{i!==void 0&&(f(),t.performVerify(i,g==null?void 0:g.clientData),o("verification-in-progress"))},children:n("initiate-verification-pour")}),status:"information"},"verification-in-progress":{information:r.jsx(l.LabelInformation,{children:n("verification-progress-info")}),status:"loading"},"verification-trouble":{},"verification-input":{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("verification-input-info")}),r.jsx(l.InputCard,{label:"Volume",unitValue:"ml",layout:"num",onChange:x=>{x!==void 0&&h(x)},value:m!==void 0?m:""})]}),footer:r.jsx(l.Button,{disabled:m===void 0,onPointerDown:async()=>{if(i===void 0||m===void 0)return;f();const[x,T]=await t.performComplete(i,m,g==null?void 0:g.clientData);x?(c(x),o("failure")):o("verification-success")},children:n("proceed")}),status:"information"},"verification-input-confirmation":{},"verification-success":{information:r.jsx(l.LabelInformation,{children:n("verification-success-info")}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"success"},"verification-failure":{information:r.jsx(l.LabelInformation,{children:n("verification-failed-info",{data:{ingredient:t.name}})}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"error"},failure:{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("calibration-failed")}),r.jsx(l.BodyMediumInformation,{children:n(`error.${a||"unknownError"}`)})]}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"error"}}),[f,a,g==null?void 0:g.clientData,e,t,n,i,m]);let b;switch(s){case"preparation-in-progress":b="preparation-progress-title";break;case"calibration-in-progress":b="calibration-progress-title";break;case"verification-in-progress":b="verification-progress-title";break;default:b="initiating"}return r.jsxs(r.Fragment,{children:[r.jsx(l.WorkflowModal,{title:n("title",{data:{ingredient:t.name}}),...v[s],onClose:()=>e()}),g&&r.jsx(K,{title:n(b),future:g})]})}),vc=u.KosLog.createLogger({name:"state-experience"});vc.debug("state-experience component loaded");const Cc=k.div``,_c=u.kosComponent(()=>{const{getExtensions:t}=ke(),{model:e}=cn(),[n,s]=p.useState(null);return p.useEffect(()=>u.kosAutoEffect(()=>{const a=t(Ce.id),c=v=>{const b=a.find(T=>T.data.troubleType===v),x=b==null?void 0:b.data;return b?x.stateKey??x.troubleType:void 0},i=a.reduce((v,b)=>{const x=b.data,T=x.stateKey??x.troubleType;return v[T]={extension:Ce.id,module:b.id,namespace:x.namespace,title:x.title,stateValue:x.stateValue??x.troubleType},v},{}),d=e==null?void 0:e.activeTroubleType,m=e==null?void 0:e.activeTrouble,h=d?c(d):void 0,f=h?i[h]:void 0,g=f?r.jsx(se.DynamicComponent,{...f,props:{trouble:m}}):null;s(g)}),[t,e]),r.jsx(Cc,{children:n})}),wc=[0,6],go=()=>{const{regionModel:t}=u.useKosRegions(),{model:e}=u.useKosTime(),[n,s]=p.useState(new Date),o=n.getFullYear(),a=u.useDateProps({formatOptions:{dayFormat:"short",yearFormat:"long",monthFormat:"long",formatString:(t==null?void 0:t.selectedDateFormat)||"yyyy/MM/dd"},filterOptions:{daysOfWeekFilter:wc,yearsRange:[o-10,o+10]}}),c=p.useCallback((m,h)=>{switch(m){case"year":a.dateActions.setYear(h.id);break;case"month":a.dateActions.setMonth(h.id);break;case"day":a.dateActions.setDay(h.id);break}},[a.dateActions]),i=p.useCallback(()=>{a.dateActions.setYear(n.getFullYear()),a.dateActions.setMonth(n.getMonth()),a.dateActions.setDay(n.getDate())},[n,a.dateActions]),d=p.useCallback(async({day:m,month:h,year:f})=>{a.dateActions.setYear(f),a.dateActions.setMonth(h),a.dateActions.setDay(m),await(e==null?void 0:e.updateSystemDate({day:m,month:h,year:f})),s(new Date)},[a.dateActions,e]);return r.jsx(As,{onDiscard:i,onChange:c,onSave:d})},xo=u.kosComponent(({...t})=>{var i;const{regionModel:e}=u.useKosRegions(),{model:n}=u.useKosTime(),{t:s}=u.useKosTranslation("common"),o=e==null?void 0:e.allTimeZones.map(d=>({id:d,label:d.replace(/_/g," ")})),a=(i=e==null?void 0:e.timeZones)==null?void 0:i.map(d=>({id:d,label:d.replace(/_/g," ")})),c=[{id:"region",label:s("suggested"),items:a||[]},{id:"all",label:s("all"),items:o||[]}];return r.jsx(l.SwitchPickerCard,{...t,label:s("time-zone"),data:c,displayValue:(n==null?void 0:n.timezone).replace("_"," "),loop:!1,selectedItemId:n==null?void 0:n.timezone,onSave:n==null?void 0:n.updateSystemTimezone,closeButtonLabel:s("close","Close")||void 0,cancelButtonLabel:s("discard-changes","Discard Changes")||void 0,proceedButtonLabel:s("save","Save")||void 0})}),kc=u.kosComponent(({showHeading:t})=>{var v,b,x,T,R,D,P,E;const{t:e}=u.useKosTranslation("region"),{regionModel:n}=u.useKosRegions(),{model:s}=u.useKosTime(),{amPmOptions:o,formattedTime:a,hourOptions:c,minuteOptions:i,setTime:d,time:m}=u.useRegionTimeProps(),h=m.getHours(),f=p.useMemo(()=>[{id:"hr",items:c,selectedItemId:h<12?h:h-12,loop:!0},{id:"min",items:i,selectedItemId:m.getMinutes(),loop:!0},{id:"ampm",items:o,selectedItemId:h<12?"AM":"PM"}],[o,c,i,m,h]),g=p.useMemo(()=>[{id:"hr",items:c,selectedItemId:h,loop:!0},{id:"min",items:i,selectedItemId:m.getMinutes(),loop:!0}],[c,i,m,h]);return p.useEffect(()=>{const _=setInterval(()=>{d(new Date)},3e4);return()=>{clearInterval(_)}},[d]),r.jsxs(l.TabContainer,{children:[t&&r.jsx(l.SettingsSubheading,{children:e("time-settings","Time Settings")}),((v=n==null?void 0:n.dateFormatOptions)==null?void 0:v.length)&&r.jsx(l.SwitchCard,{label:e("date-format","Date Format"),value:(x=(b=n==null?void 0:n.dateFormatOptions)==null?void 0:b.find(_=>_.format===n.selectedDateFormat))==null?void 0:x.id,options:(T=n==null?void 0:n.dateFormatOptions)==null?void 0:T.map(_=>({label:_.format.toUpperCase(),..._})),onChange:_=>_&&(n==null?void 0:n.setSelectedDateFormat(String(_)))}),r.jsx(go,{}),r.jsx(xo,{}),((R=n==null?void 0:n.timeFormatOptions)==null?void 0:R.length)&&r.jsx(l.SwitchCard,{label:e("time-format","Time Format"),value:(P=(D=n==null?void 0:n.timeFormatOptions)==null?void 0:D.find(_=>_.format===n.selectedTimeFormat))==null?void 0:P.id,options:(E=n==null?void 0:n.timeFormatOptions)==null?void 0:E.map(_=>({label:_!=null&&_.ampm?"12 HR":"24 HR",..._})).reverse(),onChange:_=>_&&(n==null?void 0:n.setSelectedTimeFormat(String(_)))}),r.jsx(l.MultiPickerCard,{data:n!=null&&n.is12HourTimeFormat?f:g,icon:_e.TimeIcon,displayValue:a,label:e("current-time","Current Time"),closeButtonLabel:e("close","Close")||void 0,cancelButtonLabel:e("discard-changes","Discard Changes")||void 0,proceedButtonLabel:e("save","Save")||void 0,onSave:_=>{const U=n!=null&&n.is12HourTimeFormat?_.ampm==="AM"?_.hr:_.hr+12:_.hr,q=_.min,V=new Date(m);V.setHours(U),V.setMinutes(q),d(V),s==null||s.updateSystemTime({hour:U,min:q,sec:0})}})]})}),Sc=on(u.kosComponent(({settings:t,showHeading:e})=>{const{t:n}=u.useKosTranslation("dispenser-profile");return r.jsxs(l.TabContainer,{children:[e&&r.jsx(l.SettingsSubheading,{children:n("water-settings","Water Settings")}),r.jsx(De,{label:n("plain-water","Plain Water"),configProperty:t.hidePlainWaterBev}),r.jsx(De,{label:n("carbonated-water","Carbonated Water"),configProperty:t.hideCarbWaterBev})]})})),Tc=k.div`
|
|
415
417
|
display: flex;
|
|
416
418
|
flex-direction: column;
|
|
417
419
|
gap: 12px;
|
|
418
|
-
`,
|
|
420
|
+
`,Ic=k.div`
|
|
419
421
|
display: flex;
|
|
420
422
|
flex-direction: row;
|
|
421
423
|
gap: 12px;
|
|
422
424
|
align-items: center;
|
|
423
425
|
justify-content: center;
|
|
424
|
-
`,
|
|
426
|
+
`,jc=k(l.Button)`
|
|
425
427
|
display: block;
|
|
426
|
-
`;exports.ActionButton=
|
|
428
|
+
`;exports.ActionButton=jc;exports.ActionContainer=Tc;exports.ActionRow=Ic;exports.AgitationControlView=Mo;exports.AgitatorDetail=$o;exports.AgitatorModal=ys;exports.AgitatorSummary=Uo;exports.AnimationContext=mn;exports.AnimationProvider=$a;exports.ApplicationComponentConfigurationProvider=Ua;exports.ApplicationContext=pn;exports.ApplicationProvider=za;exports.CGPPumpCard=Ji;exports.CalibrateAction=as;exports.CalibrateModal=_s;exports.CarbTankDetail=Fo;exports.CarbTankSummary=Bo;exports.ConfigPropInfoCard=Ss;exports.ConfigPropInputCard=ot;exports.ConfigPropInputRangeCard=ge;exports.ConfigPropMultiInputEnableCard=Is;exports.ConfigPropPickerCard=rt;exports.ConfigPropSingleInputEnableCard=tr;exports.ConfigPropSwitchCard=js;exports.ConfigPropTimePickerCard=Ps;exports.ConfigPropToggleCard=De;exports.CuiExtension=ut;exports.DashboardDetailExtension=qt;exports.DashboardMacroSummaryExtension=Le;exports.DashboardOperationsContext=hn;exports.DashboardOperationsProvider=Ha;exports.DashboardPumpDetailExtension=le;exports.DashboardSummaryExtension=Xt;exports.DatePickerCard=As;exports.DiagnosticsModal=Ns;exports.DispenserInfoContext=fn;exports.DispenserInfoProvider=Wa;exports.DispenserInfoSettings=Oa;exports.DispenserSerialNumber=eo;exports.DispenserSettings=Ra;exports.EXTENSION_PLUGIN_VISIBILITY=te;exports.EXTENSION_POINT_CUI=ea;exports.EXTENSION_POINT_CUI_DEF=ta;exports.EXTENSION_POINT_CUI_VIEW=na;exports.EXTENSION_POINT_DASHBOARD_DETAIL=Hr;exports.EXTENSION_POINT_DASHBOARD_DETAIL_DEF=Zr;exports.EXTENSION_POINT_DASHBOARD_DETAIL_VIEW=Wr;exports.EXTENSION_POINT_DASHBOARD_MACRO_SUMMARY=Gr;exports.EXTENSION_POINT_DASHBOARD_MACRO_SUMMARY_DEF=Jr;exports.EXTENSION_POINT_DASHBOARD_MACRO_SUMMARY_VIEW=Qr;exports.EXTENSION_POINT_DASHBOARD_PUMP_DETAIL=Xr;exports.EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_DEF=qr;exports.EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_VIEW=Yr;exports.EXTENSION_POINT_DASHBOARD_SUMMARY=Kr;exports.EXTENSION_POINT_DASHBOARD_SUMMARY_DEF=Ur;exports.EXTENSION_POINT_DASHBOARD_SUMMARY_VIEW=zr;exports.EXTENSION_POINT_NAV_VIEW=sa;exports.EXTENSION_POINT_NAV_VIEW_DEF=oa;exports.EXTENSION_POINT_NAV_VIEW_VIEW=ra;exports.EXTENSION_POINT_SETUP=aa;exports.EXTENSION_POINT_SETUP_DEF=ia;exports.EXTENSION_POINT_SETUP_VIEW=ca;exports.EXTENSION_POINT_TROUBLE_ACTION=la;exports.EXTENSION_POINT_TROUBLE_ACTION_DEF=da;exports.EXTENSION_POINT_TROUBLE_ACTION_VIEW=ua;exports.EXTENSION_POINT_VIEW=ma;exports.EXTENSION_POINT_VIEW_DEF=pa;exports.EXTENSION_POINT_VIEW_VIEW=ha;exports.EnjoyByDate=un;exports.FailureMessage=Ne;exports.Fixed45FlowTestAction=is;exports.FlushAction=cs;exports.FutureProgressBar=K;exports.GenericTroubleAction=xs;exports.HardwareInfo=Ba;exports.HighFlowTestAction=ls;exports.HoldToPourAction=ds;exports.HoldToPourButton=ue;exports.HolderActions=Ke;exports.HolderCard=so;exports.HolderContentContext=Jt;exports.HolderContentProvider=ga;exports.HolderGroup=Tn;exports.HolderGroupView=Ci;exports.HolderNotifications=ae;exports.IceAgitatorDetail=Bi;exports.IceAgitatorSettings=ro;exports.IceAgitatorSettingsContainer=Ui;exports.IceAgitatorSettingsView=zi;exports.IceAgitatorSummary=Ki;exports.IngredientSummaryContext=gn;exports.IngredientSummaryProvider=qa;exports.IntentAction=X;exports.KosPluginExtensionManager=Xs;exports.LFCVPumpCard=ec;exports.LocalizationSettings=Hi;exports.LowFlowTestAction=us;exports.MSVPumpCard=tc;exports.MSVResetAction=ps;exports.MacroAssignmentContext=xn;exports.MacroAssignmentProvider=Ga;exports.MacroHolderCard=oo;exports.MacroHolderGroupView=Ai;exports.MacroSetupStepCard=vt;exports.ManualOverrideAction=ms;exports.NavViewExtension=Yt;exports.NetworkTestContainerContext=bn;exports.NetworkTestContainerProvider=ti;exports.NetworkTestContext=yn;exports.NetworkTestProvider=Qa;exports.NetworkTestResults=qi;exports.NotificationCardView=ao;exports.PluginExtensionManager=Ws;exports.PluginTabs=Gi;exports.PrimeAction=hs;exports.ProbeView=Kt;exports.PurgeAction=fs;exports.RFIDOverride=uo;exports.RebootContext=vn;exports.RebootProvider=si;exports.RebootView=lc;exports.RemoteNNSModal=dc;exports.RemoteTrayDetail=uc;exports.RemoteTraySummary=pc;exports.ReplaceLine=co;exports.ReplacePump=lo;exports.SPMFieldCalibrationModal=fo;exports.SettingsContext=Cn;exports.SettingsProvider=ri;exports.SetupExtension=Be;exports.SetupRequired=xc;exports.SetupSidebar=yc;exports.SetupSidebarComp=ho;exports.SetupStepContainerContext=wn;exports.SetupStepContainerProvider=li;exports.SetupStepContext=_n;exports.SetupStepProvider=ii;exports.Software=bc;exports.StagedChangesProvider=ks;exports.StateExperience=_c;exports.StepItem=mo;exports.StepTitle=po;exports.SuccessMessage=st;exports.SuperPumpCard=io;exports.SystemDatePickerCard=go;exports.TROUBLE_PRIME=jo;exports.TROUBLE_PURGE=Eo;exports.TimePickerCard=Es;exports.TimeSettings=kc;exports.TimeZonePickerCard=xo;exports.TroubleAction=gs;exports.TroubleActionExtension=Ce;exports.UtilitiesContainerContext=Sn;exports.UtilitiesContainerProvider=pi;exports.UtilitiesContext=kn;exports.UtilitiesProvider=ui;exports.ValveCard=oc;exports.ViewExtension=Gt;exports.WaterPumpCard=rc;exports.WaterSettings=Sc;exports.initDDKRegistration=ka;exports.pumpTypeFactory=Zs;exports.troubleLabelByType=qs;exports.troubleLabelFactory=$e;exports.useAgitationControl=$t;exports.useAnimation=zt;exports.useAnimationContext=Ka;exports.useApplication=Fe;exports.useApplicationContext=bt;exports.useCarbWater=Os;exports.useCombinedActions=sr;exports.useCopyLogs=Rs;exports.useDashboardOperations=Ht;exports.useDashboardOperationsContext=Za;exports.useDispenserInfo=Zt;exports.useDispenserInfoContext=Xa;exports.useDoor=Ls;exports.useFutureContainer=J;exports.useHolderContent=Qt;exports.useHolderExperience=we;exports.useIngredientSummary=en;exports.useIngredientSummaryContext=Ya;exports.useMacroAssignment=tn;exports.useMacroAssignmentContext=Ja;exports.useNetworkTest=nn;exports.useNetworkTestContainer=sn;exports.useNetworkTestContainerContext=ni;exports.useNetworkTestContext=ei;exports.useNutritiveSweetener=zs;exports.usePlainWater=Hs;exports.usePluginExtensions=ke;exports.usePumpAction=de;exports.usePumpCalibration=Gs;exports.useReboot=gt;exports.useRebootContext=oi;exports.useSettings=xt;exports.useSettingsContext=ai;exports.useSetupStep=rn;exports.useSetupStepContainer=an;exports.useSetupStepContainerContext=di;exports.useSetupStepContext=ci;exports.useStagedChanges=Ut;exports.useStart=Js;exports.useTroubleAction=cr;exports.useTroubleActionState=cn;exports.useTroubleData=yt;exports.useTroubleDecoration=Qs;exports.useTroubleVisibility=Aa;exports.useUtilities=ln;exports.useUtilitiesContainer=dn;exports.useUtilitiesContainerContext=hi;exports.useUtilitiesContext=mi;exports.useViewExtensions=$s;exports.useVisibleTroubles=Se;exports.withAgitationControl=lr;exports.withAnimation=Ds;exports.withApplication=dr;exports.withCarbWater=ur;exports.withCopyLogs=mr;exports.withDashboardOperations=pr;exports.withDispenserInfo=Ms;exports.withDoor=hr;exports.withIngredientSummary=ya;exports.withMacroAssignment=Ks;exports.withNetworkTest=ba;exports.withNetworkTestContainer=Us;exports.withNutritiveSweetener=va;exports.withPlainWater=Ca;exports.withReboot=Sa;exports.withSettings=on;exports.withSetupStep=Ta;exports.withSetupStepContainer=Ys;exports.withStagedChanges=Ho;exports.withStart=Ia;exports.withTroubleAction=ja;exports.withUtilities=Na;exports.withUtilitiesContainer=Da;
|