@kosdev-code/kos-freestyle-sdk 2.1.25 → 2.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/{extension-utils-sj0P_x9E.js → extension-utils-CARIyqNK.js} +8 -8
  2. package/{extension-utils-sj0P_x9E.js.map → extension-utils-CARIyqNK.js.map} +1 -1
  3. package/extension-utils-DABHO8qx.cjs +2 -0
  4. package/{extension-utils-BUUtrM-T.cjs.map → extension-utils-DABHO8qx.cjs.map} +1 -1
  5. package/index.cjs +1 -1
  6. package/index.js +28 -26
  7. package/models/utils/index.d.ts +1 -0
  8. package/models/utils/index.d.ts.map +1 -1
  9. package/models/utils/openapi-index.d.ts +3 -0
  10. package/models/utils/openapi-index.d.ts.map +1 -0
  11. package/models/utils/services/freestyle/daily/openapi.d.ts +1656 -0
  12. package/models/utils/services/freestyle/daily/service.d.ts +118 -0
  13. package/models/utils/services/freestyle/daily/service.d.ts.map +1 -0
  14. package/models/utils/services/handle/daily/openapi.d.ts +420 -0
  15. package/models/utils/services/handle/daily/service.d.ts +118 -0
  16. package/models/utils/services/handle/daily/service.d.ts.map +1 -0
  17. package/models/utils/services-index.d.ts +3 -0
  18. package/models/utils/services-index.d.ts.map +1 -0
  19. package/models.cjs +1 -1
  20. package/models.js +23 -21
  21. package/package.json +2 -2
  22. package/{freestyle-registration-manager-DSugLmqT.js → service-C0WOCTr1.js} +322 -302
  23. package/service-C0WOCTr1.js.map +1 -0
  24. package/{freestyle-registration-manager-rmrOsUZq.cjs → service-VUszslQD.cjs} +2 -2
  25. package/service-VUszslQD.cjs.map +1 -0
  26. package/ui.cjs +1 -1
  27. package/ui.js +2 -2
  28. package/use-nutrition-info-BRX7H5o6.cjs +2 -0
  29. package/{use-nutrition-info-DSdA_SRp.cjs.map → use-nutrition-info-BRX7H5o6.cjs.map} +1 -1
  30. package/{use-nutrition-info-DtcZs7dL.js → use-nutrition-info-BWyJAXF6.js} +2 -2
  31. package/{use-nutrition-info-DtcZs7dL.js.map → use-nutrition-info-BWyJAXF6.js.map} +1 -1
  32. package/extension-utils-BUUtrM-T.cjs +0 -2
  33. package/freestyle-registration-manager-DSugLmqT.js.map +0 -1
  34. package/freestyle-registration-manager-rmrOsUZq.cjs.map +0 -1
  35. package/use-nutrition-info-DSdA_SRp.cjs +0 -2
@@ -1,2 +1,2 @@
1
- "use strict";var tt=Object.defineProperty;var rt=(e,t,r)=>t in e?tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var s=(e,t,r)=>(rt(e,typeof t!="symbol"?t+"":t,r),r);const o=require("@kosdev-code/kos-ui-sdk"),d=require("@kosdev-code/kos-dispense-sdk"),{URL:ce}=o.resolveServiceUrl("ICE_AGITATOR_SERVICE"),{postModel:ot}=o.ServiceFactory.build({basePath:`${ce}/api/ext/freestyle/ice`});o.KosLog.createLogger({name:"carb-tank-service",group:"Services"});const at=async(e,t)=>{const r=await ot({model:{},tracker:t,urlOverride:`${ce}/api/handle/${e}/test`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data};var de=Object.defineProperty,it=Object.getOwnPropertyDescriptor,st=(e,t,r)=>t in e?de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r,i)=>{for(var a=i>1?void 0:i?it(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&de(t,r,a),a},nt=(e,t,r)=>(st(e,t+"",r),r);const lt="carb-agitator-model",oe=o.createPropKey("statePath");let h=class{constructor(e,t,r){s(this,"id");s(this,"name");s(this,"path");s(this,"statePath");s(this,"highProbeWet");s(this,"lowProbeWet");s(this,"filling");s(this,"enabled");var a;this.id=e,this.name=t.name,this.path=((a=r.kosContext.get("assembly-feature-carbTank"))==null?void 0:a.path)||"";const i=r.kosContext.get("assembly-state-path-carbTank");this.statePath=i}get holder(){var t;return(t=this.getCompanionParent())==null?void 0:t.getHoldersByGroup("carb")[0]}get pump(){var e;return(e=this.holder)==null?void 0:e.pumps.data[0]}get isFilling(){return!!this.filling.value}get isCarbInitialized(){return!!this.enabled.value}get canActivate(){return!this.enabled.value}get canProceed(){return this.isInState("INITIALIZED")||this.isInState("SKIPPED")}handleActivationStart(){this.logger.info("Carb tank activation started")}handleActivationComplete(){this.logger.info("Carb tank initialized")}handleInitialized(){this.logger.info("Carb tank ready to proceed")}handleSkipped(){this.logger.info("Proceeding without carbinator")}async activateCarbTank(){this.transition("ACTIVATE"),this.enabled.updateProperty(!0),this.transition("ACTIVATION_COMPLETE")}async deactivateCarbTank(){this.enabled.updateProperty(!1),this.transition("RESET")}skip(){this.transition("SKIP")}reset(){this.enabled.updateProperty(!1),this.transition("RESET")}toggleCarbTank(){this.enabled.value?this.deactivateCarbTank():this.activateCarbTank()}handleTestCarbTank(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`testing carb tank: ${this.id}`),at(this.path,e)}};nt(h,"Registration");y([o.kosStateProp({path:oe,attribute:"highProbeWet"})],h.prototype,"highProbeWet",2);y([o.kosStateProp({path:oe,attribute:"lowProbeWet"})],h.prototype,"lowProbeWet",2);y([o.kosStateProp({path:oe,attribute:"filling"})],h.prototype,"filling",2);y([o.kosConfigProperty({path:"assembly:core:board:macksm:carbTank:carbTank",attribute:"enabled"})],h.prototype,"enabled",2);y([o.kosStateEntry("ACTIVATING")],h.prototype,"handleActivationStart",1);y([o.kosStateExit("ACTIVATING")],h.prototype,"handleActivationComplete",1);y([o.kosStateEntry("INITIALIZED")],h.prototype,"handleInitialized",1);y([o.kosStateEntry("SKIPPED")],h.prototype,"handleSkipped",1);y([o.kosStateGuard({allowedStates:["UNINITIALIZED"]})],h.prototype,"activateCarbTank",1);y([o.kosStateGuard({allowedStates:["UNINITIALIZED"]})],h.prototype,"skip",1);y([o.kosStateGuard({allowedStates:["INITIALIZED","SKIPPED"]})],h.prototype,"reset",1);y([o.kosFuture()],h.prototype,"handleTestCarbTank",1);h=y([o.kosModel({modelTypeId:lt,singleton:!1}),o.kosLoggerAware(),o.kosCompanion({mode:"composition",lifecycle:o.DependencyLifecycle.LOAD}),o.kosFutureAware(),o.kosStateMachine({initial:"UNINITIALIZED",states:{UNINITIALIZED:{on:{ACTIVATE:"ACTIVATING",SKIP:"SKIPPED"}},ACTIVATING:{on:{ACTIVATION_COMPLETE:"INITIALIZED"}},INITIALIZED:{on:{RESET:"UNINITIALIZED"}},SKIPPED:{on:{RESET:"UNINITIALIZED"}}}},{throwOnInvalid:!1})],h);const ae=h.Registration;var ut=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,pe=(e,t,r,i)=>{for(var a=i>1?void 0:i?ct(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&ut(t,r,a),a};const ge="cartridge-agitator-container-model";let L=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"_models");this.id=e,this.logger=r.logger,this._models=new o.KosModelContainer({parentId:e})}getModel(e){return this._models.getModel(e)}get models(){return this._models}get data(){return this._models.data}addModel(e){this._models.addModel(e)}removeModel(e){this._models.removeModel(e)}async init(){this.logger.debug(`initializing cartridge-agitator-container container ${this.id}`)}async load(){this.logger.debug(`loading cartridge-agitator-container container ${this.id}`)}};pe([o.kosChild],L.prototype,"_models",2);L=pe([o.kosModel(ge)],L);const{URL:he}=o.resolveServiceUrl("CARTRIDGE_AGITATOR_SERVICE"),{postModel:dt}=o.ServiceFactory.build({basePath:`${he}/api/ext/freestyle/freestyle/ice`}),pt=async(e,t)=>{const r=await dt({model:{},tracker:t,urlOverride:`${he}/api/handle/${e}/test`});if(!(r!=null&&r.data))throw new Error("No response from server");return r.data};var gt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,U=(e,t,r,i)=>{for(var a=i>1?void 0:i?ht(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&gt(t,r,a),a};const fe="cartridge-agitator-model";class O{}s(O,"TOPIC_AGITATION_STARTED","/kos/events/ddk/agitation-started"),s(O,"TOPIC_AGITATION_ENDED","/kos/events/ddk/agitation-ended");const ft=o.createPropKey("statePath");let C=class{constructor(e,t){s(this,"id");s(this,"agitating");s(this,"path");s(this,"statePath");s(this,"name");this.id=e,this.path=t.path,this.name=t.name,this.statePath=t.statePath}get isAgitating(){return!!this.agitating.value}async testAgitate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`agitating cartridge-agitator ${this.id}`),pt(this.path,e)}handleAgitation(){var e;this.isAgitating?(this.logger.info(`agitating cartridge-agitator ${this.id}`),o.EventBus.publish(O.TOPIC_AGITATION_STARTED,{path:this.path,futureId:(e=this.future)==null?void 0:e.futureId})):o.EventBus.publish(O.TOPIC_AGITATION_ENDED,{path:this.path})}};U([o.kosStateProp({path:ft,attribute:"agitating"})],C.prototype,"agitating",2);U([o.kosFuture()],C.prototype,"testAgitate",1);U([o.kosModelEffect({dependencies:e=>[e.isAgitating]})],C.prototype,"handleAgitation",1);C=U([o.kosModel(fe),o.kosFutureAware(),o.kosLoggerAware()],C);const ie=new o.KosModelRegistrationFactory({class:C,type:fe}),x=new o.SingletonKosModelRegistrationFactory({class:L,type:ge});x.addRelatedModel(ie);var ye=Object.defineProperty,yt=Object.getOwnPropertyDescriptor,mt=(e,t,r)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G=(e,t,r,i)=>{for(var a=i>1?void 0:i?yt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&ye(t,r,a),a},Pt=(e,t,r)=>(mt(e,t+"",r),r);const bt="cgp-pump-model",se=o.createPropKey("statePath");let I=class{constructor(e,t){s(this,"highProbeWet");s(this,"lowProbeWet");s(this,"filling");s(this,"id");s(this,"state");var r;this.id=e,this.state=((r=t.data)==null?void 0:r.state)??{name:"unknown",path:""}}get statePath(){return this.state.path}};Pt(I,"Registration");G([o.kosStateProp({path:se,attribute:"highProbeWet"})],I.prototype,"highProbeWet",2);G([o.kosStateProp({path:se,attribute:"lowProbeWet"})],I.prototype,"lowProbeWet",2);G([o.kosStateProp({path:se,attribute:"filling"})],I.prototype,"filling",2);I=G([o.kosModel({modelTypeId:bt,singleton:!1}),o.kosCompanion({mode:"composition"}),o.kosLoggerAware()],I);const me=I.Registration,{URL:$}=o.resolveServiceUrl("FCM-PUMP_SERVICE"),{postModel:R}=o.ServiceFactory.build({basePath:`${$}/api/fcm-pump`}),f=o.KosLog.createLogger({name:"fcm-pump-service",group:"Services"}),Pe=async e=>{var t,r,i,a,l;f.debug(`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`);try{const n=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`});return f.debug("performElectricalTest - response:",n),((n==null?void 0:n.status)===200||(n==null?void 0:n.status)===499)&&((t=n.data)!=null&&t.error)?[n.data.error||"unknownError",n.data]:[void 0,n==null?void 0:n.data]}catch(n){if(f.error(`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,n),n instanceof o.FetchError){const c=((i=(r=n.payload)==null?void 0:r.data)==null?void 0:i.error)||((a=n.payload)==null?void 0:a.error)||"unknownError";return[c,((l=n.payload)==null?void 0:l.data)||{error:c}]}}return["unknownError",{error:"unknownError"}]},be=async(e,t)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`);try{const r=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,tracker:t});return f.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},ve=async(e,t)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`);try{const r=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,tracker:t});return f.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},Te=async(e,t,r)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`);try{const i=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,tracker:r});return f.debug("performVerify - response:",i),i!=null&&i.data&&o.FutureManager.initiateFuture(i.data),i==null?void 0:i.data}catch(i){f.error(`performVerify - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,i);const a={id:r||"",endState:o.FutureEndState.Fail,tracker:r,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(a),a}},vt=e=>e?e.data==="success"||!e.data?"success":e.data:"error",Ie=async(e,t,r)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`);try{const i=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`});return f.debug("performPreCalibrate - response:",i),vt(i==null?void 0:i.data)}catch(i){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,i);return}};var Tt=Object.defineProperty,It=Object.getOwnPropertyDescriptor,V=(e,t,r,i)=>{for(var a=i>1?void 0:i?It(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&Tt(t,r,a),a};const _e="fcm-pump-model",_t=o.KosLog.createLogger({name:"fcm-pump-model"});let E=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pumpModel");s(this,"futureHandler");this.id=e,this.logger=r.logger,this.pumpModel=t.companionParent,this.futureHandler=new o.FutureHandler(this)}get future(){return this.futureHandler.future}get name(){return this.pumpModel.name}get canPour(){return this.pumpModel.canPour}get isPouring(){return this.pumpModel.isPouring}async cancelPour(){return this.pumpModel.cancelPour()}performIntent(e){return this.pumpModel.performIntent(e)}async performElectricalTest(){const[e,t]=await Pe(this.pumpModel.path);return e&&_t.error(`Failed to perform electrical test on pump ${this.id}`,e),t}getChildren(){return[...this.futureHandler.allFutures]}async performPreCalibrate(e){return be(this.pumpModel.path,e)}async performCalibrate(e){return ve(this.pumpModel.path,e)}async performVerify(e,t){return Te(this.pumpModel.path,e,t)}async performComplete(e,t){return Ie(this.pumpModel.path,e,t)}async init(){this.logger.debug(`initializing fcm-pump ${this.id}`)}async load(){this.logger.debug(`loading fcm-pump ${this.id}`)}};V([o.kosFuture()],E.prototype,"performPreCalibrate",1);V([o.kosFuture()],E.prototype,"performCalibrate",1);V([o.kosFuture()],E.prototype,"performVerify",1);E=V([o.kosModel(_e)],E);const Ce=new o.KosModelRegistrationFactory({class:E,type:_e});var Ct=Object.defineProperty,Et=Object.getOwnPropertyDescriptor,Ee=(e,t,r,i)=>{for(var a=i>1?void 0:i?Et(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&Ct(t,r,a),a};const Se="freestyle-assembly-model",Me="iceAgitator",St="carbTank",Mt="remoteTrays";let N=class{constructor(e,t,r){s(this,"id");s(this,"_carbTankModel");s(this,"logger");s(this,"assembly");s(this,"_remoteTrays");this.id=e,this.logger=r.logger,this.assembly=t.companionParent}get holderGroups(){return this.assembly.holderGroups}get nozzlePaths(){return this.assembly.nozzlePaths}get allHolders(){return this.assembly.allHolders}getHoldersByGroup(e){return this.assembly.getHoldersByGroup(e)}getHoldersByNozzle(e){return this.assembly.getHoldersByNozzle(e)}get pumpsByNozzle(){return this.assembly.pumpsByNozzle}get pumpPaths(){return this.assembly.pumpPaths}get boards(){return this.assembly.boards}updateModel(e){return this.assembly.updateModel(e)}get iceAgitator(){return this.assembly.iceAgitator}get carbTank(){return this._carbTankModel}get cartridgeAgitators(){return this.assembly.cartridgeAgitators}get defaultCartridgeAgitator(){return this.assembly.cartridgeAgitators.data[0]}get cartridgeAgitatorModels(){return this.assembly.cartridgeAgitators.data}get hasCartridgeAgitators(){return this.assembly.cartridgeAgitators.data.length>0}get remoteTrays(){return this.assembly.remoteTrays}get hasRemoteTrays(){return this.assembly.remoteTrays?this.assembly.remoteTrays.data.length>0:!1}get supportsRemoteTrays(){return o.KosFeatureFlags.isFeatureEnabled(Mt)}get supportsIce(){return o.KosFeatureFlags.isFeatureEnabled(Me)}get supportsCarb(){return o.KosFeatureFlags.isFeatureEnabled(St)}async init(){this.logger.debug(`initializing freestyle-assembly ${this.id}`)}async ready(){const e=o.getKosCompanionModel(this.assembly,ae.type);this._carbTankModel=e}};Ee([o.kosChild],N.prototype,"_remoteTrays",2);N=Ee([o.kosParentAware(),o.kosModel(Se)],N);const z=new o.SingletonKosModelRegistrationFactory({class:N,type:Se});var $t=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,$e=(e,t,r,i)=>{for(var a=i>1?void 0:i?Ot(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&$t(t,r,a),a};const Oe="remote-tray-model";o.createPropKey("holderPath");const At=o.createPropKey("configPath");let K=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"holderPath");s(this,"configPath");s(this,"name");s(this,"remoteTrayEnabled");this.id=e,this.logger=r.logger,this.holderPath=t.holderPath,this.configPath=t.configPath,this.name=t.name}get troubles(){var e;return((e=this.holder)==null?void 0:e.troubles)??[]}get troubleStatus(){return""}get troublesByType(){var e;return((e=this.holder)==null?void 0:e.troublesByType)??{}}updateModel(e){}get holder(){return o.getKosModelSync(this.holderPath).model}get active(){return!!this.remoteTrayEnabled.value}async init(){this.logger.debug(`initializing remote-tray ${this.id}`)}async load(){this.logger.debug(`loading remote-tray ${this.id}`)}};$e([o.kosConfigProperty({path:At,attribute:"enabled"})],K.prototype,"remoteTrayEnabled",2);K=$e([o.kosModel(Oe)],K);const S=new o.KosModelRegistrationFactory({class:K,type:Oe});var wt=Object.getOwnPropertyDescriptor,Rt=(e,t,r,i)=>{for(var a=i>1?void 0:i?wt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const Ae="remote-tray-container-model";let W=class{constructor(e){s(this,"id");this.id=e}};W=Rt([o.kosModel(Ae),o.kosLoggerAware(),o.kosContainerAware()],W);const q=new o.SingletonKosModelRegistrationFactory({class:W,type:Ae});q.addRelatedModel(S);var Ft=Object.getOwnPropertyDescriptor,Dt=(e,t,r,i)=>{for(var a=i>1?void 0:i?Ft(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const we="freestyle-holder-model";function Lt(e){const t=o.KosContextManager.getContext(e),r=t==null?void 0:t.get(z.type);if(!r){o.KosLog.error("Freestyle assembly not found");return}return r}async function Nt(e,t){if(!e||!t)return;const r=await e[t]();if(r!=null&&r.tracker)return o.FutureManager.getFuture(r.tracker)}let Z=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"holder");s(this,"context");s(this,"future");this.id=e,this.logger=r.logger,this.context=r.kosContext,this.holder=t.companionParent}get agitated(){return this.holder.data.agitated}async agitate(){if(!this.holder.data.agitated)return;this.future=void 0;const e=Lt(this.id);if(!e)return;if(!e.defaultCartridgeAgitator){this.logger.error("Agitator not found");return}return this.future=await Nt(e.defaultCartridgeAgitator,"testAgitate"),this.future}get isRemote(){const e=`${S.type}-${this.holder.path}`,t=o.getKosModelSync(e);return t!=null&&t.model?!!t.model.remoteTrayEnabled.value:!1}async init(){this.logger.debug(`initializing freestyle-holder ${this.id}`)}async load(){this.logger.debug(`loading freestyle-holder ${this.id}`)}};Z=Dt([o.kosModel(we)],Z);const X=new o.KosModelRegistrationFactory({class:Z,type:we}),{URL:zt}=o.resolveServiceUrl("FREESTYLE-NOZZLE_SERVICE"),{getOne:Kt}=o.ServiceFactory.build({basePath:`${zt}/api/freestyle-nozzle`}),D=o.KosLog.createLogger({name:"freestyle-nozzle-service",group:"Services"});class Re extends Error{constructor(t){super(t),this.name="NutritionInfoError"}}class Q extends Error{constructor(t){super(t),this.name="InvalidRequestError"}}const Fe=async(e,t,r,i="http://localhost:8081")=>{if(D.debug("sending GET for freestyle-nozzle"),!t)throw D.error("Invalid freestyle-nozzle request: beverageId is required"),new Q("No beverageId provided");if(!r||r.length===0)throw D.error("Invalid freestyle-nozzle request: volumes are required"),new Q("No volumes provided");const a=await Kt({urlOverride:`${i}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(",")}`});if(!(a!=null&&a.data))throw D.error("Failed to retrieve freestyle-nozzle data"),new Error("Failed to retrieve freestyle-nozzle data");if(a.data.error)throw new Re(a.data.error);return a.data};var kt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,De=(e,t,r,i)=>{for(var a=i>1?void 0:i?Ut(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&kt(t,r,a),a};const Le="freestyle-nozzle-model";let k=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"nozzleModel");s(this,"_cupSizes");s(this,"_nutritionInfo");this.id=e,this.logger=r.logger,this.nozzleModel=t.companionParent,this._cupSizes=[100]}set cupSizes(e){this._cupSizes=e}get nutritionInfo(){return this._nutritionInfo}get selectedPourable(){return this.nozzleModel.selectedPourable}async handleBeverageSelection(){if(this.nozzleModel.selectedPourable.beverage&&this._cupSizes.length){this.logger.debug(`selected beverage: ${this.nozzleModel.selectedPourable.beverage.rawId}. Volume: ${this._cupSizes.join(", ")}`);const e=this.nozzleModel.selectedPourable.beverage.rawId,t=this.nozzleModel.urlPrefix;try{const r=await Fe(t,e,this._cupSizes);o.kosAction(()=>{this._nutritionInfo=r})}catch(r){this.logger.error(`Error fetching nutrition info: ${r}`)}}}async init(){this.logger.debug(`initializing freestyle-nozzle ${this.id}`)}unload(){this.logger.debug(`unloading freestyle-nozzle ${this.id}`)}async load(){this.logger.debug(`loading freestyle-nozzle ${this.id}`)}};De([o.kosModelEffect({dependencies:e=>[e.selectedPourable.beverage]})],k.prototype,"handleBeverageSelection",1);k=De([o.kosParentAware(),o.kosModel(Le)],k);const J=new o.KosModelRegistrationFactory({class:k,type:Le}),{URL:Ne}=o.resolveServiceUrl("PUMP_SERVICE"),{postModel:xt}=o.ServiceFactory.build({basePath:`${Ne}/api/ext/freestyle/microCalibration`}),Y=o.KosLog.createLogger({name:"freestyle-pump-service",group:"Services"}),ze=async(e,t)=>{var r,i,a,l,n;Y.debug(`replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`);try{const c=await xt({model:{},urlOverride:`${Ne}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`});return Y.debug("replacePump - response:",c),((c==null?void 0:c.status)===200||(c==null?void 0:c.status)===499)&&((r=c.data)!=null&&r.error)?[c.data.error||"unknownError",c.data]:[void 0,c==null?void 0:c.data]}catch(c){if(Y.error(`replacePump - sending POST request to /api/cal/${e}/code/${t}`,c),c instanceof o.FetchError){const v=((a=(i=c.payload)==null?void 0:i.data)==null?void 0:a.error)||((l=c.payload)==null?void 0:l.error)||"unknownError";return[v,((n=c.payload)==null?void 0:n.data)||{error:v}]}}return["unknownError",{error:"unknownError"}]};var Gt=Object.getOwnPropertyDescriptor,Vt=(e,t,r,i)=>{for(var a=i>1?void 0:i?Gt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const Ke="freestyle-pump-model";let ee=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pump");this.id=e,this.logger=r.logger,this.pump=t.companionParent}async replacePump(e){const[t,r]=await ze(this.pump.path,e);return t&&this.logger.error(`Failed to replace the pump, ${this.pump.id}`,t),[t,r]}};ee=Vt([o.kosModel(Ke)],ee);const te=new o.KosModelRegistrationFactory({class:ee,type:Ke}),{URL:_}=o.resolveServiceUrl("ICE_AGITATOR_SERVICE"),{getAll:ke,postModel:B}=o.ServiceFactory.build({basePath:`${_}/api/ext/freestyle/ice`}),Ue=o.KosLog.createLogger({name:"ice-agitator-service",group:"Services"}),qt=async e=>(Ue.debug("sending GET for ice types"),await ke({urlOverride:`${_}/api/handle/${e}/types`})),Bt=async(e,t)=>(Ue.debug("sending POST for ice types"),await B({urlOverride:`${_}/api/handle/${e}/type/${t}`,model:{}})),jt=async e=>await ke({urlOverride:`${_}/api/kos/config/details/${e}/4`}),Ht=async(e,t)=>{const r=await B({model:{},tracker:t,urlOverride:`${_}/api/handle/${e}/pour`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data},Yt=async(e,t)=>{const r=await B({model:{},tracker:t,urlOverride:`${_}/api/handle/${e}/test/agitation`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data},Wt=async(e,t)=>{const r=await B({model:{},tracker:t,urlOverride:`${_}/api/handle/${e}/test/gate`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data};var Zt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a=i>1?void 0:i?Xt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&Zt(t,r,a),a};class A{}s(A,"TOPIC_AGITATION_STARTED","/kos/events/ddk/ice-agitation-started"),s(A,"TOPIC_AGITATION_ENDED","/kos/events/ddk/ice-agitation-ended");const xe="ice-agitator-model",Ge=o.createPropKey("statePath");let p=class{constructor(e,t,r){s(this,"id");s(this,"name");s(this,"path");s(this,"volWithoutIceMl");s(this,"durationSec");s(this,"enableIceChuteClear");s(this,"iceChuteClearDurationMs");s(this,"iceChuteClearIntervalSec");s(this,"iceChuteClearRetryIntervalSec");s(this,"maxDispenseSec");s(this,"type");s(this,"dilutionOffset");s(this,"inactivitySec");s(this,"agitating");s(this,"iceChuteOpen");s(this,"statePath");s(this,"_allIceTypes");s(this,"logger");s(this,"currentState",d.PourState.IDLE);s(this,"resetDefaultValues",async()=>await jt(this.path));this.id=e,this.name=t.name,this.path=t.path,this.statePath=t.statePath,this._allIceTypes=[],this.logger=r.logger}get iceTypes(){return this._allIceTypes}get isAgitating(){return!!this.agitating.value}get isIceChuteOpen(){return!!this.iceChuteOpen.value}get isPouring(){var e;return!!(this.pourFuture&&!((e=this.pourFuture)!=null&&e.endState))||this.currentState===d.PourState.POUR_STARTING||this.currentState===d.PourState.POURING||this.currentState===d.PourState.POUR_CANCELING}get canPour(){return this.currentState===d.PourState.IDLE}updateIfCurrent(e,t){this.currentState===e&&o.kosAction(()=>{this.currentState=t})}async pourIce(e){try{if(this.currentState===d.PourState.IDLE){if(this.updateIfCurrent(d.PourState.IDLE,d.PourState.POUR_STARTING),!e)throw new Error("No tracker provided");const t=await Ht(this.path,e);return this.updateIfCurrent(d.PourState.POUR_STARTING,d.PourState.POURING),t!=null&&t.endState&&this.updateIfCurrent(d.PourState.POURING,d.PourState.IDLE),t}else throw new Error(`Cannot pour in state ${this.currentState}`)}catch(t){throw this.logger.error(t),this.currentState=d.PourState.IDLE,t}}async cancelIceDispense(){var e;this.currentState===d.PourState.POURING||this.currentState===d.PourState.POUR_STARTING?(this.currentState=d.PourState.POUR_CANCELING,await((e=this.pourFuture)==null?void 0:e.cancelFuture()),o.kosAction(()=>{this.currentState=d.PourState.IDLE})):this.logger.warn(`Cannot cancel ice dispense in state ${this.currentState}`)}async testAgitate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`agitating ice-agitator ${this.id}`),Yt(this.path,e)}async testGate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`testing ice gate: ${this.id}`),Wt(this.path,e)}handleAgitationChange(){var e;this.isAgitating?(this.logger.info(`agitating ice-agitator ${this.id}`),o.EventBus.publish(A.TOPIC_AGITATION_STARTED,{path:this.path,futureId:(e=this.futureHandler.future)==null?void 0:e.futureId})):o.EventBus.publish(A.TOPIC_AGITATION_ENDED,{path:this.path})}async updateIceType(e){await Bt(this.path,e)}async init(){this.logger.debug(`initializing ice-agitator ${this.id}`)}async load(){this.logger.debug(`loading ice-agitator ${this.id}`);const e=await qt(this.path);(e==null?void 0:e.status)===200&&o.kosAction(()=>{this._allIceTypes=e.data||[]})}};g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.volWithoutIceMl"})],p.prototype,"volWithoutIceMl",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.durationSec",converter:{to:"second"}})],p.prototype,"durationSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"enableIceChuteClear"})],p.prototype,"enableIceChuteClear",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearDurationMs"})],p.prototype,"iceChuteClearDurationMs",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearIntervalSec"})],p.prototype,"iceChuteClearIntervalSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearRetryIntervalSec"})],p.prototype,"iceChuteClearRetryIntervalSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"maxDispenseSec"})],p.prototype,"maxDispenseSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"type"})],p.prototype,"type",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.dilutionOffset"})],p.prototype,"dilutionOffset",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.inactivitySec",converter:{to:"minute"}})],p.prototype,"inactivitySec",2);g([o.kosStateProp({path:Ge,attribute:"agitating"})],p.prototype,"agitating",2);g([o.kosStateProp({path:Ge,attribute:"iceChuteOpen"})],p.prototype,"iceChuteOpen",2);g([o.kosFuture({alias:"pour"})],p.prototype,"pourIce",1);g([o.kosFuture({alias:"agitate"})],p.prototype,"testAgitate",1);g([o.kosFuture({alias:"gate"})],p.prototype,"testGate",1);g([o.kosModelEffect({dependencies:e=>[e.isAgitating]})],p.prototype,"handleAgitationChange",1);p=g([o.kosModel(xe),o.kosMultipleFutureAware()],p);const ne=new o.KosModelRegistrationFactory({class:p,type:xe});var Qt=Object.getOwnPropertyDescriptor,Jt=(e,t,r,i)=>{for(var a=i>1?void 0:i?Qt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const Ve="lfcv-pump-model";let re=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pumpModel");this.id=e,this.logger=r.logger,this.pumpModel=t.companionParent}get name(){return this.pumpModel.name}get canPour(){return this.pumpModel.canPour}get isPouring(){return this.pumpModel.isPouring}async cancelPour(){return this.pumpModel.cancelPour()}performIntent(e){return this.pumpModel.performIntent(e)}async init(){this.logger.debug(`initializing lfcv-pump ${this.id}`)}async load(){this.logger.debug(`loading lfcv-pump ${this.id}`)}};re=Jt([o.kosModel(Ve)],re);const qe=new o.KosModelRegistrationFactory({class:re,type:Ve}),{URL:er}=o.resolveServiceUrl("LFCV-PUMP_SERVICE"),{getAll:tr}=o.ServiceFactory.build({basePath:`${er}/api/lfcv-pump`}),rr=o.KosLog.createLogger({name:"lfcv-pump-service",group:"Services"}),or=async()=>(rr.debug("sending GET for lfcv-pump"),await tr({})),{URL:F}=o.resolveServiceUrl("SPM-PUMP_SERVICE"),{postModel:j}=o.ServiceFactory.build({basePath:`${F}/api/spm-pump`}),P=o.KosLog.createLogger({name:"spm-pump-service",group:"Services"}),Be=async(e,t)=>{P.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`);try{const r=await j({model:{},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,tracker:t});return P.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){P.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},je=async(e,t)=>{P.debug(`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`);try{const r=await j({model:{},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,tracker:t});return P.debug("performCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){P.error(`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},He=async(e,t,r,i)=>{P.debug(`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`);try{const a=await j({model:{...r,measuredCalibrationVolume:t},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/verify`,tracker:i});return P.debug("performVerify - response:",a),a!=null&&a.data&&o.FutureManager.initiateFuture(a.data),a==null?void 0:a.data}catch(a){P.error(`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,a);const l={id:i||"",endState:o.FutureEndState.Fail,tracker:i,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(l),l}},Ye=async(e,t,r,i)=>{var a,l,n,c,v;P.debug(`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`);try{const u=await j({model:{...i,measuredCalibrationVolume:t,measuredVerificationVolume:r},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/complete`});return P.debug("performComplete - response:",u),((u==null?void 0:u.status)===200||(u==null?void 0:u.status)===499)&&((a=u.data)!=null&&a.error)?[u.data.error||"unknownError",u.data]:[void 0,u==null?void 0:u.data]}catch(u){if(P.error(`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,u),u instanceof o.FetchError){const m=((n=(l=u.payload)==null?void 0:l.data)==null?void 0:n.error)||((c=u.payload)==null?void 0:c.error)||"unknownError";return[m,((v=u.payload)==null?void 0:v.data)||{error:m}]}}return["unknownError",{error:"unknownError"}]};var ar=Object.defineProperty,ir=Object.getOwnPropertyDescriptor,H=(e,t,r,i)=>{for(var a=i>1?void 0:i?ir(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&ar(t,r,a),a};const We="spm-pump-model";let M=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pump");s(this,"futureHandler");this.id=e,this.logger=r.logger,this.pump=t.companionParent,this.futureHandler=new o.FutureHandler(this)}get name(){return this.pump.name}get canPour(){return this.pump.canPour}get isPouring(){return this.pump.isPouring}async cancelPour(){return this.pump.cancelPour()}performIntent(e){return this.pump.performIntent(e)}get future(){return this.futureHandler.future}async performPreCalibrate(e){return Be(this.pump.path,e)}async performCalibrate(e){return je(this.pump.path,e)}async performVerify(e,t,r){return He(this.pump.path,e,t,r)}async performComplete(e,t,r){return Ye(this.pump.path,e,t,r)}async init(){this.logger.debug(`initializing spm-pump ${this.id}`)}async load(){this.logger.debug(`loading spm-pump ${this.id}`)}};H([o.kosFuture()],M.prototype,"performPreCalibrate",1);H([o.kosFuture()],M.prototype,"performCalibrate",1);H([o.kosFuture()],M.prototype,"performVerify",1);M=H([o.kosModel(We)],M);const Ze=new o.KosModelRegistrationFactory({class:M,type:We});var sr=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,le=(e,t,r,i)=>{for(var a=i>1?void 0:i?nr(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&sr(t,r,a),a};const ue="agitation-required-trouble-model",lr=e=>{if(e.data.agitationRequired)return ue},Xe="InsufficientAgitationTrouble";let w=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"trouble");s(this,"_deferred");s(this,"_holdersLoaded",!1);s(this,"agitateBeforePour");this.id=e,this.logger=r.logger,this._deferred=!1,this.trouble=t.companionParent}async resolve(){return this.trouble.resolve()}get holder(){const e=this.trouble.data.holderPaths[0],t=o.getKosModelSync(e);if(!(!this._holdersLoaded&&!t.model))return t==null?void 0:t.model}updateHolder(){if(!this._holdersLoaded){const e=this.trouble.data.holderPaths[0];o.getKosModelSync(e).model&&(this._holdersLoaded=!0)}}get shouldDefer(){var i,a;if(!this.holder)return!0;const t=(((i=this.holder)==null?void 0:i.troublesByType[Xe])||[]).length>0;return!!((a=this.agitateBeforePour)!=null&&a.value)&&t}get deferred(){return this._deferred}defer(){this._deferred=!0}clearDefer(){this._deferred=!1}};le([o.kosConfigProperty({path:"app:kosdev.ddk:app",attribute:"ncui.agitateBeforePour"})],w.prototype,"agitateBeforePour",2);le([o.kosTopicHandler({topic:o.modelTypeEventTopicFactory(d.Assembly.type),lifecycle:o.DependencyLifecycle.INIT})],w.prototype,"updateHolder",1);w=le([o.kosModel(ue)],w);const Qe=new o.KosModelRegistrationFactory({class:w,type:ue}),ur=["iceAgitator"],cr={iceAgitator:ne.factory},dr=o.KosLog.createLogger({name:"freestyle-assembly-data-mapper"}),pr=async e=>{const t=x.instance().options({}).build(),r=q.instance().options({}).build(),i=e.assemblies.reduce((n,c)=>{var v;return ur.forEach(u=>{var T;const m=c[u];if(m){const et=cr[u](m.path);n[u]=et({name:m.name,path:m.path,statePath:((T=m.state)==null?void 0:T.path)||""})}}),(v=c.cartridgeAgitators)==null||v.forEach(u=>{var T;const m=ie.instance(u.path).options({name:u.name,path:u.path,statePath:((T=u.state)==null?void 0:T.path)||""}).build();t.addModel(m)}),c.remoteTrays&&c.remoteTrays.forEach(u=>{dr.info(`Found remote tray ${u.name} with path ${u.path}`);const m=`${S.type}-${u.holderPath}`,T=S.instance(m).options({holderPath:u.holderPath,configPath:u.path,name:u.name}).build();r.addModel(T)}),n},{}),a=!!i.iceAgitator,l=!!i.carbTank;return{...i,cartridgeAgitators:t,remoteTrays:r,supportsCarb:l,supportsIce:a}},Je=e=>()=>(o.registerCoreModels(e)(),d.registerDispenseModels(e)(),J.register(),z.register(),ne.register(),ae.register(),x.register(),Ze.register(),Ce.register(),qe.register(),me.register(),te.register(),X.register(),S.register(),q.register(),o.RegistrationManager.companion.register(e)(d.Nozzle.type,J.type),o.RegistrationManager.companion.register(e)(d.Assembly.type,z.type),Qe.register(),o.RegistrationManager.companion.register(e)(o.Trouble.type,lr),o.RegistrationManager.companion.register(e)(d.Pump.type,te.type),o.RegistrationManager.companion.register(e)(d.Holder.type,X.type),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("EnjoyByTrouble",async t=>{if(t.data.enjoyByDate){const r=new Date(t.data.enjoyByDate);return{enjoyByDays:Math.floor((new Date().getTime()-r.getTime())/(1e3*60*60*24))||""}}return{}}),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("SuperPumpRequiredTrouble",async t=>{const{model:r}=o.getKosModelSync(d.PumpContainer.type);return r?{superPumps:r.models.getIndexByKey(d.PumpIndex.byType,"microSuper").map(l=>l.name).join(", ")}:{}}),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("MicroPumpAirDetectTrouble",async t=>{if(t.ifaces.includes("container"))return{};if(t.data.pumpPath){const{model:r}=o.getKosModelSync(t.data.pumpPath);if(r){const i=r.ingredientId?o.getKosModelSync(r.ingredientId).model:void 0;return{ingredientId:r.ingredientId,ingredientName:(i==null?void 0:i.name)||""}}}return{}}),{preload:o.RegistrationManager.model.preloadModel(e),model:o.RegistrationManager.model.register(e),companion:o.RegistrationManager.companion.register(e),legacy:o.RegistrationManager.model.registerLegacyModel(e)}),b={...d.KosModelRegistry};b.freestyle={models:Je(b)};b.preload=o.RegistrationManager.model.preloadModel(b);b.model=o.RegistrationManager.model.register(b);b.companion=o.RegistrationManager.companion.register(b);b.legacy=o.RegistrationManager.model.registerLegacyModel(b);const gr=b;exports.AGITATION_REQUIRED_TROUBLE=Xe;exports.AgitationRequiredTrouble=Qe;exports.CarbAgitator=ae;exports.CartridgeAgitator=ie;exports.CartridgeAgitatorContainer=x;exports.CartridgeAgitatorEvents=O;exports.CgpPump=me;exports.FEATURE_SUPPORTS_ICE=Me;exports.FcmPump=Ce;exports.FreestyleAssembly=z;exports.FreestyleHolder=X;exports.FreestyleNozzle=J;exports.FreestylePump=te;exports.IceAgitator=ne;exports.IceAgitatorEvents=A;exports.InvalidRequestError=Q;exports.KosModelRegistry=gr;exports.LfcvPump=qe;exports.NutritionInfoError=Re;exports.RemoteTray=S;exports.RemoteTrayContainer=q;exports.SpmPump=Ze;exports.freestyleAssemblyDataMapper=pr;exports.getFreestyleNutritionInfo=Fe;exports.getLfcvPumps=or;exports.performCalibrate=ve;exports.performCalibrate$1=je;exports.performComplete=Ie;exports.performComplete$1=Ye;exports.performElectricalTest=Pe;exports.performPreCalibrate=be;exports.performPreCalibrate$1=Be;exports.performVerify=Te;exports.performVerify$1=He;exports.registerFreestyleModels=Je;exports.replacePump=ze;
2
- //# sourceMappingURL=freestyle-registration-manager-rmrOsUZq.cjs.map
1
+ "use strict";var ot=Object.defineProperty;var at=(e,t,r)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var s=(e,t,r)=>(at(e,typeof t!="symbol"?t+"":t,r),r);const o=require("@kosdev-code/kos-ui-sdk"),d=require("@kosdev-code/kos-dispense-sdk"),{URL:pe}=o.resolveServiceUrl("ICE_AGITATOR_SERVICE"),{postModel:it}=o.ServiceFactory.build({basePath:`${pe}/api/ext/freestyle/ice`});o.KosLog.createLogger({name:"carb-tank-service",group:"Services"});const st=async(e,t)=>{const r=await it({model:{},tracker:t,urlOverride:`${pe}/api/handle/${e}/test`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data};var ge=Object.defineProperty,nt=Object.getOwnPropertyDescriptor,lt=(e,t,r)=>t in e?ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r,i)=>{for(var a=i>1?void 0:i?nt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&ge(t,r,a),a},ut=(e,t,r)=>(lt(e,t+"",r),r);const ct="carb-agitator-model",oe=o.createPropKey("statePath");let h=class{constructor(e,t,r){s(this,"id");s(this,"name");s(this,"path");s(this,"statePath");s(this,"highProbeWet");s(this,"lowProbeWet");s(this,"filling");s(this,"enabled");var a;this.id=e,this.name=t.name,this.path=((a=r.kosContext.get("assembly-feature-carbTank"))==null?void 0:a.path)||"";const i=r.kosContext.get("assembly-state-path-carbTank");this.statePath=i}get holder(){var t;return(t=this.getCompanionParent())==null?void 0:t.getHoldersByGroup("carb")[0]}get pump(){var e;return(e=this.holder)==null?void 0:e.pumps.data[0]}get isFilling(){return!!this.filling.value}get isCarbInitialized(){return!!this.enabled.value}get canActivate(){return!this.enabled.value}get canProceed(){return this.isInState("INITIALIZED")||this.isInState("SKIPPED")}handleActivationStart(){this.logger.info("Carb tank activation started")}handleActivationComplete(){this.logger.info("Carb tank initialized")}handleInitialized(){this.logger.info("Carb tank ready to proceed")}handleSkipped(){this.logger.info("Proceeding without carbinator")}async activateCarbTank(){this.transition("ACTIVATE"),this.enabled.updateProperty(!0),this.transition("ACTIVATION_COMPLETE")}async deactivateCarbTank(){this.enabled.updateProperty(!1),this.transition("RESET")}skip(){this.transition("SKIP")}reset(){this.enabled.updateProperty(!1),this.transition("RESET")}toggleCarbTank(){this.enabled.value?this.deactivateCarbTank():this.activateCarbTank()}handleTestCarbTank(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`testing carb tank: ${this.id}`),st(this.path,e)}};ut(h,"Registration");y([o.kosStateProp({path:oe,attribute:"highProbeWet"})],h.prototype,"highProbeWet",2);y([o.kosStateProp({path:oe,attribute:"lowProbeWet"})],h.prototype,"lowProbeWet",2);y([o.kosStateProp({path:oe,attribute:"filling"})],h.prototype,"filling",2);y([o.kosConfigProperty({path:"assembly:core:board:macksm:carbTank:carbTank",attribute:"enabled"})],h.prototype,"enabled",2);y([o.kosStateEntry("ACTIVATING")],h.prototype,"handleActivationStart",1);y([o.kosStateExit("ACTIVATING")],h.prototype,"handleActivationComplete",1);y([o.kosStateEntry("INITIALIZED")],h.prototype,"handleInitialized",1);y([o.kosStateEntry("SKIPPED")],h.prototype,"handleSkipped",1);y([o.kosStateGuard({allowedStates:["UNINITIALIZED"]})],h.prototype,"activateCarbTank",1);y([o.kosStateGuard({allowedStates:["UNINITIALIZED"]})],h.prototype,"skip",1);y([o.kosStateGuard({allowedStates:["INITIALIZED","SKIPPED"]})],h.prototype,"reset",1);y([o.kosFuture()],h.prototype,"handleTestCarbTank",1);h=y([o.kosModel({modelTypeId:ct,singleton:!1}),o.kosLoggerAware(),o.kosCompanion({mode:"composition",lifecycle:o.DependencyLifecycle.LOAD}),o.kosFutureAware(),o.kosStateMachine({initial:"UNINITIALIZED",states:{UNINITIALIZED:{on:{ACTIVATE:"ACTIVATING",SKIP:"SKIPPED"}},ACTIVATING:{on:{ACTIVATION_COMPLETE:"INITIALIZED"}},INITIALIZED:{on:{RESET:"UNINITIALIZED"}},SKIPPED:{on:{RESET:"UNINITIALIZED"}}}},{throwOnInvalid:!1})],h);const ae=h.Registration;var dt=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,he=(e,t,r,i)=>{for(var a=i>1?void 0:i?pt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&dt(t,r,a),a};const fe="cartridge-agitator-container-model";let L=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"_models");this.id=e,this.logger=r.logger,this._models=new o.KosModelContainer({parentId:e})}getModel(e){return this._models.getModel(e)}get models(){return this._models}get data(){return this._models.data}addModel(e){this._models.addModel(e)}removeModel(e){this._models.removeModel(e)}async init(){this.logger.debug(`initializing cartridge-agitator-container container ${this.id}`)}async load(){this.logger.debug(`loading cartridge-agitator-container container ${this.id}`)}};he([o.kosChild],L.prototype,"_models",2);L=he([o.kosModel(fe)],L);const{URL:ye}=o.resolveServiceUrl("CARTRIDGE_AGITATOR_SERVICE"),{postModel:gt}=o.ServiceFactory.build({basePath:`${ye}/api/ext/freestyle/freestyle/ice`}),ht=async(e,t)=>{const r=await gt({model:{},tracker:t,urlOverride:`${ye}/api/handle/${e}/test`});if(!(r!=null&&r.data))throw new Error("No response from server");return r.data};var ft=Object.defineProperty,yt=Object.getOwnPropertyDescriptor,U=(e,t,r,i)=>{for(var a=i>1?void 0:i?yt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&ft(t,r,a),a};const me="cartridge-agitator-model";class O{}s(O,"TOPIC_AGITATION_STARTED","/kos/events/ddk/agitation-started"),s(O,"TOPIC_AGITATION_ENDED","/kos/events/ddk/agitation-ended");const mt=o.createPropKey("statePath");let C=class{constructor(e,t){s(this,"id");s(this,"agitating");s(this,"path");s(this,"statePath");s(this,"name");this.id=e,this.path=t.path,this.name=t.name,this.statePath=t.statePath}get isAgitating(){return!!this.agitating.value}async testAgitate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`agitating cartridge-agitator ${this.id}`),ht(this.path,e)}handleAgitation(){var e;this.isAgitating?(this.logger.info(`agitating cartridge-agitator ${this.id}`),o.EventBus.publish(O.TOPIC_AGITATION_STARTED,{path:this.path,futureId:(e=this.future)==null?void 0:e.futureId})):o.EventBus.publish(O.TOPIC_AGITATION_ENDED,{path:this.path})}};U([o.kosStateProp({path:mt,attribute:"agitating"})],C.prototype,"agitating",2);U([o.kosFuture()],C.prototype,"testAgitate",1);U([o.kosModelEffect({dependencies:e=>[e.isAgitating]})],C.prototype,"handleAgitation",1);C=U([o.kosModel(me),o.kosFutureAware(),o.kosLoggerAware()],C);const ie=new o.KosModelRegistrationFactory({class:C,type:me}),x=new o.SingletonKosModelRegistrationFactory({class:L,type:fe});x.addRelatedModel(ie);var Pe=Object.defineProperty,Pt=Object.getOwnPropertyDescriptor,bt=(e,t,r)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G=(e,t,r,i)=>{for(var a=i>1?void 0:i?Pt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&Pe(t,r,a),a},vt=(e,t,r)=>(bt(e,t+"",r),r);const Tt="cgp-pump-model",se=o.createPropKey("statePath");let _=class{constructor(e,t){s(this,"highProbeWet");s(this,"lowProbeWet");s(this,"filling");s(this,"id");s(this,"state");var r;this.id=e,this.state=((r=t.data)==null?void 0:r.state)??{name:"unknown",path:""}}get statePath(){return this.state.path}};vt(_,"Registration");G([o.kosStateProp({path:se,attribute:"highProbeWet"})],_.prototype,"highProbeWet",2);G([o.kosStateProp({path:se,attribute:"lowProbeWet"})],_.prototype,"lowProbeWet",2);G([o.kosStateProp({path:se,attribute:"filling"})],_.prototype,"filling",2);_=G([o.kosModel({modelTypeId:Tt,singleton:!1}),o.kosCompanion({mode:"composition"}),o.kosLoggerAware()],_);const be=_.Registration,{URL:$}=o.resolveServiceUrl("FCM-PUMP_SERVICE"),{postModel:R}=o.ServiceFactory.build({basePath:`${$}/api/fcm-pump`}),f=o.KosLog.createLogger({name:"fcm-pump-service",group:"Services"}),ve=async e=>{var t,r,i,a,l;f.debug(`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`);try{const n=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`});return f.debug("performElectricalTest - response:",n),((n==null?void 0:n.status)===200||(n==null?void 0:n.status)===499)&&((t=n.data)!=null&&t.error)?[n.data.error||"unknownError",n.data]:[void 0,n==null?void 0:n.data]}catch(n){if(f.error(`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,n),n instanceof o.FetchError){const c=((i=(r=n.payload)==null?void 0:r.data)==null?void 0:i.error)||((a=n.payload)==null?void 0:a.error)||"unknownError";return[c,((l=n.payload)==null?void 0:l.data)||{error:c}]}}return["unknownError",{error:"unknownError"}]},Te=async(e,t)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`);try{const r=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,tracker:t});return f.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},_e=async(e,t)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`);try{const r=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,tracker:t});return f.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},Ie=async(e,t,r)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`);try{const i=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,tracker:r});return f.debug("performVerify - response:",i),i!=null&&i.data&&o.FutureManager.initiateFuture(i.data),i==null?void 0:i.data}catch(i){f.error(`performVerify - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,i);const a={id:r||"",endState:o.FutureEndState.Fail,tracker:r,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(a),a}},_t=e=>e?e.data==="success"||!e.data?"success":e.data:"error",Ce=async(e,t,r)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`);try{const i=await R({model:{},urlOverride:`${$}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`});return f.debug("performPreCalibrate - response:",i),_t(i==null?void 0:i.data)}catch(i){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,i);return}};var It=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,q=(e,t,r,i)=>{for(var a=i>1?void 0:i?Ct(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&It(t,r,a),a};const Ee="fcm-pump-model",Et=o.KosLog.createLogger({name:"fcm-pump-model"});let E=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pumpModel");s(this,"futureHandler");this.id=e,this.logger=r.logger,this.pumpModel=t.companionParent,this.futureHandler=new o.FutureHandler(this)}get future(){return this.futureHandler.future}get name(){return this.pumpModel.name}get canPour(){return this.pumpModel.canPour}get isPouring(){return this.pumpModel.isPouring}async cancelPour(){return this.pumpModel.cancelPour()}performIntent(e){return this.pumpModel.performIntent(e)}async performElectricalTest(){const[e,t]=await ve(this.pumpModel.path);return e&&Et.error(`Failed to perform electrical test on pump ${this.id}`,e),t}getChildren(){return[...this.futureHandler.allFutures]}async performPreCalibrate(e){return Te(this.pumpModel.path,e)}async performCalibrate(e){return _e(this.pumpModel.path,e)}async performVerify(e,t){return Ie(this.pumpModel.path,e,t)}async performComplete(e,t){return Ce(this.pumpModel.path,e,t)}async init(){this.logger.debug(`initializing fcm-pump ${this.id}`)}async load(){this.logger.debug(`loading fcm-pump ${this.id}`)}};q([o.kosFuture()],E.prototype,"performPreCalibrate",1);q([o.kosFuture()],E.prototype,"performCalibrate",1);q([o.kosFuture()],E.prototype,"performVerify",1);E=q([o.kosModel(Ee)],E);const Se=new o.KosModelRegistrationFactory({class:E,type:Ee});var St=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Me=(e,t,r,i)=>{for(var a=i>1?void 0:i?Mt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&St(t,r,a),a};const $e="freestyle-assembly-model",Oe="iceAgitator",$t="carbTank",Ot="remoteTrays";let N=class{constructor(e,t,r){s(this,"id");s(this,"_carbTankModel");s(this,"logger");s(this,"assembly");s(this,"_remoteTrays");this.id=e,this.logger=r.logger,this.assembly=t.companionParent}get holderGroups(){return this.assembly.holderGroups}get nozzlePaths(){return this.assembly.nozzlePaths}get allHolders(){return this.assembly.allHolders}getHoldersByGroup(e){return this.assembly.getHoldersByGroup(e)}getHoldersByNozzle(e){return this.assembly.getHoldersByNozzle(e)}get pumpsByNozzle(){return this.assembly.pumpsByNozzle}get pumpPaths(){return this.assembly.pumpPaths}get boards(){return this.assembly.boards}updateModel(e){return this.assembly.updateModel(e)}get iceAgitator(){return this.assembly.iceAgitator}get carbTank(){return this._carbTankModel}get cartridgeAgitators(){return this.assembly.cartridgeAgitators}get defaultCartridgeAgitator(){return this.assembly.cartridgeAgitators.data[0]}get cartridgeAgitatorModels(){return this.assembly.cartridgeAgitators.data}get hasCartridgeAgitators(){return this.assembly.cartridgeAgitators.data.length>0}get remoteTrays(){return this.assembly.remoteTrays}get hasRemoteTrays(){return this.assembly.remoteTrays?this.assembly.remoteTrays.data.length>0:!1}get supportsRemoteTrays(){return o.KosFeatureFlags.isFeatureEnabled(Ot)}get supportsIce(){return o.KosFeatureFlags.isFeatureEnabled(Oe)}get supportsCarb(){return o.KosFeatureFlags.isFeatureEnabled($t)}async init(){this.logger.debug(`initializing freestyle-assembly ${this.id}`)}async ready(){const e=o.getKosCompanionModel(this.assembly,ae.type);this._carbTankModel=e}};Me([o.kosChild],N.prototype,"_remoteTrays",2);N=Me([o.kosParentAware(),o.kosModel($e)],N);const z=new o.SingletonKosModelRegistrationFactory({class:N,type:$e});var At=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,Ae=(e,t,r,i)=>{for(var a=i>1?void 0:i?wt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&At(t,r,a),a};const we="remote-tray-model";o.createPropKey("holderPath");const Rt=o.createPropKey("configPath");let k=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"holderPath");s(this,"configPath");s(this,"name");s(this,"remoteTrayEnabled");this.id=e,this.logger=r.logger,this.holderPath=t.holderPath,this.configPath=t.configPath,this.name=t.name}get troubles(){var e;return((e=this.holder)==null?void 0:e.troubles)??[]}get troubleStatus(){return""}get troublesByType(){var e;return((e=this.holder)==null?void 0:e.troublesByType)??{}}updateModel(e){}get holder(){return o.getKosModelSync(this.holderPath).model}get active(){return!!this.remoteTrayEnabled.value}async init(){this.logger.debug(`initializing remote-tray ${this.id}`)}async load(){this.logger.debug(`loading remote-tray ${this.id}`)}};Ae([o.kosConfigProperty({path:Rt,attribute:"enabled"})],k.prototype,"remoteTrayEnabled",2);k=Ae([o.kosModel(we)],k);const S=new o.KosModelRegistrationFactory({class:k,type:we});var Ft=Object.getOwnPropertyDescriptor,Dt=(e,t,r,i)=>{for(var a=i>1?void 0:i?Ft(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const Re="remote-tray-container-model";let W=class{constructor(e){s(this,"id");this.id=e}};W=Dt([o.kosModel(Re),o.kosLoggerAware(),o.kosContainerAware()],W);const j=new o.SingletonKosModelRegistrationFactory({class:W,type:Re});j.addRelatedModel(S);var Lt=Object.getOwnPropertyDescriptor,Nt=(e,t,r,i)=>{for(var a=i>1?void 0:i?Lt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const Fe="freestyle-holder-model";function zt(e){const t=o.KosContextManager.getContext(e),r=t==null?void 0:t.get(z.type);if(!r){o.KosLog.error("Freestyle assembly not found");return}return r}async function kt(e,t){if(!e||!t)return;const r=await e[t]();if(r!=null&&r.tracker)return o.FutureManager.getFuture(r.tracker)}let Z=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"holder");s(this,"context");s(this,"future");this.id=e,this.logger=r.logger,this.context=r.kosContext,this.holder=t.companionParent}get agitated(){return this.holder.data.agitated}async agitate(){if(!this.holder.data.agitated)return;this.future=void 0;const e=zt(this.id);if(!e)return;if(!e.defaultCartridgeAgitator){this.logger.error("Agitator not found");return}return this.future=await kt(e.defaultCartridgeAgitator,"testAgitate"),this.future}get isRemote(){const e=`${S.type}-${this.holder.path}`,t=o.getKosModelSync(e);return t!=null&&t.model?!!t.model.remoteTrayEnabled.value:!1}async init(){this.logger.debug(`initializing freestyle-holder ${this.id}`)}async load(){this.logger.debug(`loading freestyle-holder ${this.id}`)}};Z=Nt([o.kosModel(Fe)],Z);const X=new o.KosModelRegistrationFactory({class:Z,type:Fe}),{URL:Kt}=o.resolveServiceUrl("FREESTYLE-NOZZLE_SERVICE"),{getOne:Ut}=o.ServiceFactory.build({basePath:`${Kt}/api/freestyle-nozzle`}),D=o.KosLog.createLogger({name:"freestyle-nozzle-service",group:"Services"});class De extends Error{constructor(t){super(t),this.name="NutritionInfoError"}}class Q extends Error{constructor(t){super(t),this.name="InvalidRequestError"}}const Le=async(e,t,r,i="http://localhost:8081")=>{if(D.debug("sending GET for freestyle-nozzle"),!t)throw D.error("Invalid freestyle-nozzle request: beverageId is required"),new Q("No beverageId provided");if(!r||r.length===0)throw D.error("Invalid freestyle-nozzle request: volumes are required"),new Q("No volumes provided");const a=await Ut({urlOverride:`${i}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(",")}`});if(!(a!=null&&a.data))throw D.error("Failed to retrieve freestyle-nozzle data"),new Error("Failed to retrieve freestyle-nozzle data");if(a.data.error)throw new De(a.data.error);return a.data};var xt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Ne=(e,t,r,i)=>{for(var a=i>1?void 0:i?Gt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&xt(t,r,a),a};const ze="freestyle-nozzle-model";let K=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"nozzleModel");s(this,"_cupSizes");s(this,"_nutritionInfo");this.id=e,this.logger=r.logger,this.nozzleModel=t.companionParent,this._cupSizes=[100]}set cupSizes(e){this._cupSizes=e}get nutritionInfo(){return this._nutritionInfo}get selectedPourable(){return this.nozzleModel.selectedPourable}async handleBeverageSelection(){if(this.nozzleModel.selectedPourable.beverage&&this._cupSizes.length){this.logger.debug(`selected beverage: ${this.nozzleModel.selectedPourable.beverage.rawId}. Volume: ${this._cupSizes.join(", ")}`);const e=this.nozzleModel.selectedPourable.beverage.rawId,t=this.nozzleModel.urlPrefix;try{const r=await Le(t,e,this._cupSizes);o.kosAction(()=>{this._nutritionInfo=r})}catch(r){this.logger.error(`Error fetching nutrition info: ${r}`)}}}async init(){this.logger.debug(`initializing freestyle-nozzle ${this.id}`)}unload(){this.logger.debug(`unloading freestyle-nozzle ${this.id}`)}async load(){this.logger.debug(`loading freestyle-nozzle ${this.id}`)}};Ne([o.kosModelEffect({dependencies:e=>[e.selectedPourable.beverage]})],K.prototype,"handleBeverageSelection",1);K=Ne([o.kosParentAware(),o.kosModel(ze)],K);const J=new o.KosModelRegistrationFactory({class:K,type:ze}),{URL:ke}=o.resolveServiceUrl("PUMP_SERVICE"),{postModel:qt}=o.ServiceFactory.build({basePath:`${ke}/api/ext/freestyle/microCalibration`}),Y=o.KosLog.createLogger({name:"freestyle-pump-service",group:"Services"}),Ke=async(e,t)=>{var r,i,a,l,n;Y.debug(`replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`);try{const c=await qt({model:{},urlOverride:`${ke}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`});return Y.debug("replacePump - response:",c),((c==null?void 0:c.status)===200||(c==null?void 0:c.status)===499)&&((r=c.data)!=null&&r.error)?[c.data.error||"unknownError",c.data]:[void 0,c==null?void 0:c.data]}catch(c){if(Y.error(`replacePump - sending POST request to /api/cal/${e}/code/${t}`,c),c instanceof o.FetchError){const v=((a=(i=c.payload)==null?void 0:i.data)==null?void 0:a.error)||((l=c.payload)==null?void 0:l.error)||"unknownError";return[v,((n=c.payload)==null?void 0:n.data)||{error:v}]}}return["unknownError",{error:"unknownError"}]};var jt=Object.getOwnPropertyDescriptor,Vt=(e,t,r,i)=>{for(var a=i>1?void 0:i?jt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const Ue="freestyle-pump-model";let ee=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pump");this.id=e,this.logger=r.logger,this.pump=t.companionParent}async replacePump(e){const[t,r]=await Ke(this.pump.path,e);return t&&this.logger.error(`Failed to replace the pump, ${this.pump.id}`,t),[t,r]}};ee=Vt([o.kosModel(Ue)],ee);const te=new o.KosModelRegistrationFactory({class:ee,type:Ue}),{URL:I}=o.resolveServiceUrl("ICE_AGITATOR_SERVICE"),{getAll:xe,postModel:V}=o.ServiceFactory.build({basePath:`${I}/api/ext/freestyle/ice`}),Ge=o.KosLog.createLogger({name:"ice-agitator-service",group:"Services"}),Bt=async e=>(Ge.debug("sending GET for ice types"),await xe({urlOverride:`${I}/api/handle/${e}/types`})),Ht=async(e,t)=>(Ge.debug("sending POST for ice types"),await V({urlOverride:`${I}/api/handle/${e}/type/${t}`,model:{}})),Yt=async e=>await xe({urlOverride:`${I}/api/kos/config/details/${e}/4`}),Wt=async(e,t)=>{const r=await V({model:{},tracker:t,urlOverride:`${I}/api/handle/${e}/pour`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data},Zt=async(e,t)=>{const r=await V({model:{},tracker:t,urlOverride:`${I}/api/handle/${e}/test/agitation`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data},Xt=async(e,t)=>{const r=await V({model:{},tracker:t,urlOverride:`${I}/api/handle/${e}/test/gate`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data};var Qt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a=i>1?void 0:i?Jt(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&Qt(t,r,a),a};class A{}s(A,"TOPIC_AGITATION_STARTED","/kos/events/ddk/ice-agitation-started"),s(A,"TOPIC_AGITATION_ENDED","/kos/events/ddk/ice-agitation-ended");const qe="ice-agitator-model",je=o.createPropKey("statePath");let p=class{constructor(e,t,r){s(this,"id");s(this,"name");s(this,"path");s(this,"volWithoutIceMl");s(this,"durationSec");s(this,"enableIceChuteClear");s(this,"iceChuteClearDurationMs");s(this,"iceChuteClearIntervalSec");s(this,"iceChuteClearRetryIntervalSec");s(this,"maxDispenseSec");s(this,"type");s(this,"dilutionOffset");s(this,"inactivitySec");s(this,"agitating");s(this,"iceChuteOpen");s(this,"statePath");s(this,"_allIceTypes");s(this,"logger");s(this,"currentState",d.PourState.IDLE);s(this,"resetDefaultValues",async()=>await Yt(this.path));this.id=e,this.name=t.name,this.path=t.path,this.statePath=t.statePath,this._allIceTypes=[],this.logger=r.logger}get iceTypes(){return this._allIceTypes}get isAgitating(){return!!this.agitating.value}get isIceChuteOpen(){return!!this.iceChuteOpen.value}get isPouring(){var e;return!!(this.pourFuture&&!((e=this.pourFuture)!=null&&e.endState))||this.currentState===d.PourState.POUR_STARTING||this.currentState===d.PourState.POURING||this.currentState===d.PourState.POUR_CANCELING}get canPour(){return this.currentState===d.PourState.IDLE}updateIfCurrent(e,t){this.currentState===e&&o.kosAction(()=>{this.currentState=t})}async pourIce(e){try{if(this.currentState===d.PourState.IDLE){if(this.updateIfCurrent(d.PourState.IDLE,d.PourState.POUR_STARTING),!e)throw new Error("No tracker provided");const t=await Wt(this.path,e);return this.updateIfCurrent(d.PourState.POUR_STARTING,d.PourState.POURING),t!=null&&t.endState&&this.updateIfCurrent(d.PourState.POURING,d.PourState.IDLE),t}else throw new Error(`Cannot pour in state ${this.currentState}`)}catch(t){throw this.logger.error(t),this.currentState=d.PourState.IDLE,t}}async cancelIceDispense(){var e;this.currentState===d.PourState.POURING||this.currentState===d.PourState.POUR_STARTING?(this.currentState=d.PourState.POUR_CANCELING,await((e=this.pourFuture)==null?void 0:e.cancelFuture()),o.kosAction(()=>{this.currentState=d.PourState.IDLE})):this.logger.warn(`Cannot cancel ice dispense in state ${this.currentState}`)}async testAgitate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`agitating ice-agitator ${this.id}`),Zt(this.path,e)}async testGate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`testing ice gate: ${this.id}`),Xt(this.path,e)}handleAgitationChange(){var e;this.isAgitating?(this.logger.info(`agitating ice-agitator ${this.id}`),o.EventBus.publish(A.TOPIC_AGITATION_STARTED,{path:this.path,futureId:(e=this.futureHandler.future)==null?void 0:e.futureId})):o.EventBus.publish(A.TOPIC_AGITATION_ENDED,{path:this.path})}async updateIceType(e){await Ht(this.path,e)}async init(){this.logger.debug(`initializing ice-agitator ${this.id}`)}async load(){this.logger.debug(`loading ice-agitator ${this.id}`);const e=await Bt(this.path);(e==null?void 0:e.status)===200&&o.kosAction(()=>{this._allIceTypes=e.data||[]})}};g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.volWithoutIceMl"})],p.prototype,"volWithoutIceMl",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.durationSec",converter:{to:"second"}})],p.prototype,"durationSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"enableIceChuteClear"})],p.prototype,"enableIceChuteClear",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearDurationMs"})],p.prototype,"iceChuteClearDurationMs",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearIntervalSec"})],p.prototype,"iceChuteClearIntervalSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearRetryIntervalSec"})],p.prototype,"iceChuteClearRetryIntervalSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"maxDispenseSec"})],p.prototype,"maxDispenseSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"type"})],p.prototype,"type",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.dilutionOffset"})],p.prototype,"dilutionOffset",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.inactivitySec",converter:{to:"minute"}})],p.prototype,"inactivitySec",2);g([o.kosStateProp({path:je,attribute:"agitating"})],p.prototype,"agitating",2);g([o.kosStateProp({path:je,attribute:"iceChuteOpen"})],p.prototype,"iceChuteOpen",2);g([o.kosFuture({alias:"pour"})],p.prototype,"pourIce",1);g([o.kosFuture({alias:"agitate"})],p.prototype,"testAgitate",1);g([o.kosFuture({alias:"gate"})],p.prototype,"testGate",1);g([o.kosModelEffect({dependencies:e=>[e.isAgitating]})],p.prototype,"handleAgitationChange",1);p=g([o.kosModel(qe),o.kosMultipleFutureAware()],p);const ne=new o.KosModelRegistrationFactory({class:p,type:qe});var er=Object.getOwnPropertyDescriptor,tr=(e,t,r,i)=>{for(var a=i>1?void 0:i?er(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=n(a)||a);return a};const Ve="lfcv-pump-model";let re=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pumpModel");this.id=e,this.logger=r.logger,this.pumpModel=t.companionParent}get name(){return this.pumpModel.name}get canPour(){return this.pumpModel.canPour}get isPouring(){return this.pumpModel.isPouring}async cancelPour(){return this.pumpModel.cancelPour()}performIntent(e){return this.pumpModel.performIntent(e)}async init(){this.logger.debug(`initializing lfcv-pump ${this.id}`)}async load(){this.logger.debug(`loading lfcv-pump ${this.id}`)}};re=tr([o.kosModel(Ve)],re);const Be=new o.KosModelRegistrationFactory({class:re,type:Ve}),{URL:rr}=o.resolveServiceUrl("LFCV-PUMP_SERVICE"),{getAll:or}=o.ServiceFactory.build({basePath:`${rr}/api/lfcv-pump`}),ar=o.KosLog.createLogger({name:"lfcv-pump-service",group:"Services"}),ir=async()=>(ar.debug("sending GET for lfcv-pump"),await or({})),{URL:F}=o.resolveServiceUrl("SPM-PUMP_SERVICE"),{postModel:B}=o.ServiceFactory.build({basePath:`${F}/api/spm-pump`}),P=o.KosLog.createLogger({name:"spm-pump-service",group:"Services"}),He=async(e,t)=>{P.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`);try{const r=await B({model:{},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,tracker:t});return P.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){P.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},Ye=async(e,t)=>{P.debug(`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`);try{const r=await B({model:{},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,tracker:t});return P.debug("performCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){P.error(`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},We=async(e,t,r,i)=>{P.debug(`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`);try{const a=await B({model:{...r,measuredCalibrationVolume:t},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/verify`,tracker:i});return P.debug("performVerify - response:",a),a!=null&&a.data&&o.FutureManager.initiateFuture(a.data),a==null?void 0:a.data}catch(a){P.error(`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,a);const l={id:i||"",endState:o.FutureEndState.Fail,tracker:i,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(l),l}},Ze=async(e,t,r,i)=>{var a,l,n,c,v;P.debug(`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`);try{const u=await B({model:{...i,measuredCalibrationVolume:t,measuredVerificationVolume:r},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/complete`});return P.debug("performComplete - response:",u),((u==null?void 0:u.status)===200||(u==null?void 0:u.status)===499)&&((a=u.data)!=null&&a.error)?[u.data.error||"unknownError",u.data]:[void 0,u==null?void 0:u.data]}catch(u){if(P.error(`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,u),u instanceof o.FetchError){const m=((n=(l=u.payload)==null?void 0:l.data)==null?void 0:n.error)||((c=u.payload)==null?void 0:c.error)||"unknownError";return[m,((v=u.payload)==null?void 0:v.data)||{error:m}]}}return["unknownError",{error:"unknownError"}]};var sr=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,H=(e,t,r,i)=>{for(var a=i>1?void 0:i?nr(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&sr(t,r,a),a};const Xe="spm-pump-model";let M=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"pump");s(this,"futureHandler");this.id=e,this.logger=r.logger,this.pump=t.companionParent,this.futureHandler=new o.FutureHandler(this)}get name(){return this.pump.name}get canPour(){return this.pump.canPour}get isPouring(){return this.pump.isPouring}async cancelPour(){return this.pump.cancelPour()}performIntent(e){return this.pump.performIntent(e)}get future(){return this.futureHandler.future}async performPreCalibrate(e){return He(this.pump.path,e)}async performCalibrate(e){return Ye(this.pump.path,e)}async performVerify(e,t,r){return We(this.pump.path,e,t,r)}async performComplete(e,t,r){return Ze(this.pump.path,e,t,r)}async init(){this.logger.debug(`initializing spm-pump ${this.id}`)}async load(){this.logger.debug(`loading spm-pump ${this.id}`)}};H([o.kosFuture()],M.prototype,"performPreCalibrate",1);H([o.kosFuture()],M.prototype,"performCalibrate",1);H([o.kosFuture()],M.prototype,"performVerify",1);M=H([o.kosModel(Xe)],M);const Qe=new o.KosModelRegistrationFactory({class:M,type:Xe});var lr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,le=(e,t,r,i)=>{for(var a=i>1?void 0:i?ur(t,r):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&lr(t,r,a),a};const ue="agitation-required-trouble-model",cr=e=>{if(e.data.agitationRequired)return ue},Je="InsufficientAgitationTrouble";let w=class{constructor(e,t,r){s(this,"id");s(this,"logger");s(this,"trouble");s(this,"_deferred");s(this,"_holdersLoaded",!1);s(this,"agitateBeforePour");this.id=e,this.logger=r.logger,this._deferred=!1,this.trouble=t.companionParent}async resolve(){return this.trouble.resolve()}get holder(){const e=this.trouble.data.holderPaths[0],t=o.getKosModelSync(e);if(!(!this._holdersLoaded&&!t.model))return t==null?void 0:t.model}updateHolder(){if(!this._holdersLoaded){const e=this.trouble.data.holderPaths[0];o.getKosModelSync(e).model&&(this._holdersLoaded=!0)}}get shouldDefer(){var i,a;if(!this.holder)return!0;const t=(((i=this.holder)==null?void 0:i.troublesByType[Je])||[]).length>0;return!!((a=this.agitateBeforePour)!=null&&a.value)&&t}get deferred(){return this._deferred}defer(){this._deferred=!0}clearDefer(){this._deferred=!1}};le([o.kosConfigProperty({path:"app:kosdev.ddk:app",attribute:"ncui.agitateBeforePour"})],w.prototype,"agitateBeforePour",2);le([o.kosTopicHandler({topic:o.modelTypeEventTopicFactory(d.Assembly.type),lifecycle:o.DependencyLifecycle.INIT})],w.prototype,"updateHolder",1);w=le([o.kosModel(ue)],w);const et=new o.KosModelRegistrationFactory({class:w,type:ue}),dr=["iceAgitator"],pr={iceAgitator:ne.factory},gr=o.KosLog.createLogger({name:"freestyle-assembly-data-mapper"}),hr=async e=>{const t=x.instance().options({}).build(),r=j.instance().options({}).build(),i=e.assemblies.reduce((n,c)=>{var v;return dr.forEach(u=>{var T;const m=c[u];if(m){const rt=pr[u](m.path);n[u]=rt({name:m.name,path:m.path,statePath:((T=m.state)==null?void 0:T.path)||""})}}),(v=c.cartridgeAgitators)==null||v.forEach(u=>{var T;const m=ie.instance(u.path).options({name:u.name,path:u.path,statePath:((T=u.state)==null?void 0:T.path)||""}).build();t.addModel(m)}),c.remoteTrays&&c.remoteTrays.forEach(u=>{gr.info(`Found remote tray ${u.name} with path ${u.path}`);const m=`${S.type}-${u.holderPath}`,T=S.instance(m).options({holderPath:u.holderPath,configPath:u.path,name:u.name}).build();r.addModel(T)}),n},{}),a=!!i.iceAgitator,l=!!i.carbTank;return{...i,cartridgeAgitators:t,remoteTrays:r,supportsCarb:l,supportsIce:a}},tt=e=>()=>(o.registerCoreModels(e)(),d.registerDispenseModels(e)(),J.register(),z.register(),ne.register(),ae.register(),x.register(),Qe.register(),Se.register(),Be.register(),be.register(),te.register(),X.register(),S.register(),j.register(),o.RegistrationManager.companion.register(e)(d.Nozzle.type,J.type),o.RegistrationManager.companion.register(e)(d.Assembly.type,z.type),et.register(),o.RegistrationManager.companion.register(e)(o.Trouble.type,cr),o.RegistrationManager.companion.register(e)(d.Pump.type,te.type),o.RegistrationManager.companion.register(e)(d.Holder.type,X.type),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("EnjoyByTrouble",async t=>{if(t.data.enjoyByDate){const r=new Date(t.data.enjoyByDate);return{enjoyByDays:Math.floor((new Date().getTime()-r.getTime())/(1e3*60*60*24))||""}}return{}}),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("SuperPumpRequiredTrouble",async t=>{const{model:r}=o.getKosModelSync(d.PumpContainer.type);return r?{superPumps:r.models.getIndexByKey(d.PumpIndex.byType,"microSuper").map(l=>l.name).join(", ")}:{}}),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("MicroPumpAirDetectTrouble",async t=>{if(t.ifaces.includes("container"))return{};if(t.data.pumpPath){const{model:r}=o.getKosModelSync(t.data.pumpPath);if(r){const i=r.ingredientId?o.getKosModelSync(r.ingredientId).model:void 0;return{ingredientId:r.ingredientId,ingredientName:(i==null?void 0:i.name)||""}}}return{}}),{preload:o.RegistrationManager.model.preloadModel(e),model:o.RegistrationManager.model.register(e),companion:o.RegistrationManager.companion.register(e),legacy:o.RegistrationManager.model.registerLegacyModel(e)}),b={...d.KosModelRegistry};b.freestyle={models:tt(b)};b.preload=o.RegistrationManager.model.preloadModel(b);b.model=o.RegistrationManager.model.register(b);b.companion=o.RegistrationManager.companion.register(b);b.legacy=o.RegistrationManager.model.registerLegacyModel(b);const fr=b;function yr(e){return o.kosServiceRequest(e)}const ce=o.createClient(),mr=Object.freeze(Object.defineProperty({__proto__:null,api:ce,default:ce,kosServiceRequest:yr},Symbol.toStringTag,{value:"Module"}));function Pr(e){return o.kosServiceRequest(e)}const de=o.createClient(),br=Object.freeze(Object.defineProperty({__proto__:null,api:de,default:de,kosServiceRequest:Pr},Symbol.toStringTag,{value:"Module"}));exports.AGITATION_REQUIRED_TROUBLE=Je;exports.AgitationRequiredTrouble=et;exports.CarbAgitator=ae;exports.CartridgeAgitator=ie;exports.CartridgeAgitatorContainer=x;exports.CartridgeAgitatorEvents=O;exports.CgpPump=be;exports.FEATURE_SUPPORTS_ICE=Oe;exports.FcmPump=Se;exports.FreestyleAssembly=z;exports.FreestyleHolder=X;exports.FreestyleNozzle=J;exports.FreestylePump=te;exports.IceAgitator=ne;exports.IceAgitatorEvents=A;exports.InvalidRequestError=Q;exports.KosModelRegistry=fr;exports.LfcvPump=Be;exports.NutritionInfoError=De;exports.RemoteTray=S;exports.RemoteTrayContainer=j;exports.SpmPump=Qe;exports.freestyleAssemblyDataMapper=hr;exports.getFreestyleNutritionInfo=Le;exports.getLfcvPumps=ir;exports.performCalibrate=_e;exports.performCalibrate$1=Ye;exports.performComplete=Ce;exports.performComplete$1=Ze;exports.performElectricalTest=ve;exports.performPreCalibrate=Te;exports.performPreCalibrate$1=He;exports.performVerify=Ie;exports.performVerify$1=We;exports.registerFreestyleModels=tt;exports.replacePump=Ke;exports.service=mr;exports.service$1=br;
2
+ //# sourceMappingURL=service-VUszslQD.cjs.map