homebridge-config-ui-x 5.3.1-beta.8 → 5.4.0
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/CHANGELOG.md +14 -4
- package/dist/bin/standalone.d.ts +2 -0
- package/dist/bin/standalone.js +58 -0
- package/dist/bin/standalone.js.map +1 -0
- package/dist/modules/platform-tools/terminal/terminal.service.js +26 -26
- package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
- package/dist/modules/server/server.service.js +1 -1
- package/package.json +4 -4
- package/public/assets/monaco-0.21.3/LICENSE +21 -0
- package/public/assets/monaco-0.21.3/README.md +96 -0
- package/public/assets/monaco-0.21.3/ThirdPartyNotices.txt +283 -0
- package/public/assets/monaco-0.21.3/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/public/assets/monaco-0.21.3/package.json +38 -0
- package/public/assets/service-icons/air-purifier.svg +50 -0
- package/public/assets/{hap-icons → service-icons}/air-quality-sensor.svg +2 -2
- package/public/assets/service-icons/carbon-dioxide-sensor.svg +53 -0
- package/public/assets/service-icons/carbon-monoxide-sensor.svg +53 -0
- package/public/assets/service-icons/contact-sensor.svg +45 -0
- package/public/assets/service-icons/door.svg +28 -0
- package/public/assets/service-icons/doorbell.svg +7 -0
- package/public/assets/service-icons/fan.svg +15 -0
- package/public/assets/service-icons/filter-maintenance.svg +54 -0
- package/public/assets/service-icons/garage-door.svg +120 -0
- package/public/assets/service-icons/microphone.svg +12 -0
- package/public/assets/service-icons/smoke-sensor.svg +38 -0
- package/public/assets/service-icons/speaker.svg +28 -0
- package/public/assets/service-icons/television.svg +17 -0
- package/public/assets/service-icons/washing-machine.svg +34 -0
- package/public/assets/service-icons/window-covering.svg +44 -0
- package/public/assets/service-icons/window.svg +67 -0
- package/public/{chunk-2JIV277Z.js → chunk-2HZOWWRB.js} +1 -1
- package/public/{chunk-XWQ3MP3R.js → chunk-2TDOLECC.js} +1 -1
- package/public/chunk-2ZM2CO7S.js +1 -0
- package/public/{chunk-KKMV35EJ.js → chunk-3JNJJOX6.js} +1 -1
- package/public/{chunk-ALZRCF67.js → chunk-3L7PIOD5.js} +1 -1
- package/public/{chunk-AKD24HZC.js → chunk-3QBYXJ7T.js} +1 -1
- package/public/{chunk-YWMVRJI5.js → chunk-3WCZQYFM.js} +1 -1
- package/public/{chunk-N2AJOFIZ.js → chunk-4A6F5427.js} +1 -1
- package/public/{chunk-J23T3NRY.js → chunk-4I4YTNGD.js} +1 -1
- package/public/{chunk-PWD63BNX.js → chunk-5FOJUOIT.js} +1 -1
- package/public/chunk-645YHJEQ.js +4 -0
- package/public/{chunk-VQIHIGLC.js → chunk-6BITWEO6.js} +1 -1
- package/public/{chunk-25NXLXGL.js → chunk-6HJHVJPI.js} +1 -1
- package/public/chunk-6NW4EKE6.js +4 -0
- package/public/{chunk-Q5XUVLJA.js → chunk-73PB5ERF.js} +1 -1
- package/public/{chunk-IXXVSSF7.js → chunk-7M4GTFPB.js} +1 -1
- package/public/{chunk-B2VW3ZQI.js → chunk-7NWB7MN6.js} +1 -1
- package/public/chunk-BHQK7H4B.js +1 -0
- package/public/{chunk-V5ZUMJ2X.js → chunk-BLNEXUND.js} +1 -1
- package/public/{chunk-GR3ILWWZ.js → chunk-BQ7Q4FRF.js} +1 -1
- package/public/chunk-CLGDJPWG.js +12 -0
- package/public/{chunk-AAPPFSR7.js → chunk-DCEE4BJT.js} +1 -1
- package/public/{chunk-RPRM66DV.js → chunk-DYB33NRF.js} +1 -1
- package/public/{chunk-WBB65MTJ.js → chunk-EKINPADV.js} +1 -1
- package/public/{chunk-UPWD7C23.js → chunk-EQHN6CPG.js} +1 -1
- package/public/{chunk-3T4CLJZB.js → chunk-EZQF5CUM.js} +1 -1
- package/public/{chunk-GHVVXIDF.js → chunk-F6NZALU5.js} +1 -1
- package/public/{chunk-LBAYQDOV.js → chunk-FG5QICVJ.js} +1 -1
- package/public/{chunk-3QFXC5X6.js → chunk-FIQUQJTU.js} +1 -1
- package/public/{chunk-6YLJWQUB.js → chunk-FKZEDXUZ.js} +1 -1
- package/public/chunk-FYDO54CR.js +1 -0
- package/public/{chunk-MJK6N6PA.js → chunk-FYI7RHOJ.js} +1 -1
- package/public/{chunk-S7AIVWKK.js → chunk-G6KV6PYE.js} +1 -1
- package/public/chunk-GNULJZ2P.js +1 -0
- package/public/{chunk-H337OZRD.js → chunk-HHGB2T2Q.js} +1 -1
- package/public/{chunk-2FTHA637.js → chunk-HO4UVRDI.js} +1 -1
- package/public/{chunk-FBTBVR2O.js → chunk-HSAZV5QQ.js} +1 -1
- package/public/{chunk-R33OISYU.js → chunk-IAVKQO7M.js} +1 -1
- package/public/{chunk-RHCMG64A.js → chunk-JCYDPJQ5.js} +1 -1
- package/public/chunk-KLQ6BEKS.js +2 -0
- package/public/chunk-KPOP67KE.js +1 -0
- package/public/{chunk-VPU5FNT3.js → chunk-KYB236MX.js} +1 -1
- package/public/{chunk-23FYLGHC.js → chunk-LJDW32KF.js} +16 -14
- package/public/{chunk-F3MG6UU6.js → chunk-M4QDQWSG.js} +1 -1
- package/public/chunk-O7RJ6JXM.js +1 -0
- package/public/{chunk-CNMZOW2D.js → chunk-OMGXHYZA.js} +1 -1
- package/public/{chunk-DSUQJPY2.js → chunk-OSQ37ZQY.js} +1 -1
- package/public/{chunk-HWMBWLXB.js → chunk-OW6LBBVH.js} +1 -1
- package/public/{chunk-NO7RIAKI.js → chunk-PPSFRNJC.js} +1 -1
- package/public/{chunk-GWJ7ISZW.js → chunk-QL5UNVZO.js} +1 -1
- package/public/{chunk-EMOJK6NQ.js → chunk-QM6QRTMV.js} +1 -1
- package/public/{chunk-76XPFTSX.js → chunk-QZWC7RP4.js} +1 -1
- package/public/{chunk-JXNVM6CK.js → chunk-R6KN5Y43.js} +1 -1
- package/public/{chunk-UKEZ5GGN.js → chunk-RCYYU6LQ.js} +1 -1
- package/public/{chunk-V2JQMGNW.js → chunk-RGXCQLZU.js} +1 -1
- package/public/{chunk-S7D4ALZN.js → chunk-RZ4UMDVF.js} +1 -1
- package/public/{chunk-7RYLBOQ5.js → chunk-TOI5IERI.js} +1 -1
- package/public/{chunk-JAZMMXSA.js → chunk-U4UZ4WQX.js} +1 -1
- package/public/{chunk-TJCBCOGJ.js → chunk-U52WKM74.js} +1 -1
- package/public/{chunk-JNVGCARV.js → chunk-UFFQKHXE.js} +1 -1
- package/public/{chunk-O4DNLPYF.js → chunk-ULWO2VVV.js} +1 -1
- package/public/{chunk-IMT3YYMD.js → chunk-V35TPDVW.js} +1 -1
- package/public/{chunk-VRIOVBXE.js → chunk-V7OQR5Y4.js} +1 -1
- package/public/{chunk-BNM7RGNK.js → chunk-VJOMQ46T.js} +1 -1
- package/public/{chunk-OIOLFXMO.js → chunk-VRXR6ACJ.js} +1 -1
- package/public/{chunk-V2QWJKFB.js → chunk-WG533VX7.js} +1 -1
- package/public/{chunk-RMRJFNIT.js → chunk-YPZJFK3W.js} +1 -1
- package/public/chunk-Z6DMMN6D.js +1 -0
- package/public/{chunk-BSXHN5WA.js → chunk-ZO74PVYQ.js} +1 -1
- package/public/index.html +2 -2
- package/public/main-HN6ISZGH.js +1 -0
- package/public/media/fa-brands-400-Q3XCMWHQ.woff2 +0 -0
- package/public/media/fa-brands-400-R2XQZCET.ttf +0 -0
- package/public/media/fa-regular-400-QSNYFYRT.woff2 +0 -0
- package/public/media/fa-regular-400-XUOPSR7E.ttf +0 -0
- package/public/media/fa-solid-900-5ZUYHGA7.woff2 +0 -0
- package/public/media/fa-solid-900-PJNKLK6W.ttf +0 -0
- package/public/styles-XESJTHVW.css +1 -0
- package/public/assets/hap-icons/air-purifier.svg +0 -62
- package/public/assets/hap-icons/carbon-dioxide-sensor.svg +0 -72
- package/public/assets/hap-icons/carbon-monoxide-sensor.svg +0 -72
- package/public/assets/hap-icons/contact-sensor-closed.svg +0 -36
- package/public/assets/hap-icons/contact-sensor-open.svg +0 -81
- package/public/assets/hap-icons/door-closed.svg +0 -33
- package/public/assets/hap-icons/door-open.svg +0 -49
- package/public/assets/hap-icons/doorbell.svg +0 -9
- package/public/assets/hap-icons/fan-off.svg +0 -25
- package/public/assets/hap-icons/fan-on.svg +0 -25
- package/public/assets/hap-icons/filter-maintenance.svg +0 -26
- package/public/assets/hap-icons/garage-door.svg +0 -25
- package/public/assets/hap-icons/microphone.svg +0 -14
- package/public/assets/hap-icons/smoke-sensor.svg +0 -59
- package/public/assets/hap-icons/speaker.svg +0 -46
- package/public/assets/hap-icons/television.svg +0 -16
- package/public/assets/hap-icons/window-closed.svg +0 -86
- package/public/assets/hap-icons/window-covering-closed.svg +0 -49
- package/public/assets/hap-icons/window-covering-open.svg +0 -44
- package/public/assets/hap-icons/window-open.svg +0 -137
- package/public/chunk-7CDOEUGY.js +0 -1
- package/public/chunk-CPAHENLQ.js +0 -1
- package/public/chunk-ESQQ74VV.js +0 -4
- package/public/chunk-HEUWGOF3.js +0 -1
- package/public/chunk-LPDYQHMD.js +0 -1
- package/public/chunk-RJOGO4M5.js +0 -2
- package/public/chunk-SPLSJVTN.js +0 -1
- package/public/chunk-SW6PIZF7.js +0 -1
- package/public/chunk-TTMAUECI.js +0 -12
- package/public/chunk-WEVBEUAJ.js +0 -4
- package/public/chunk-YL2ITUR4.js +0 -1
- package/public/main-I34D7ZNT.js +0 -1
- package/public/media/fa-brands-400-WVWUIHCX.woff2 +0 -0
- package/public/media/fa-regular-400-I5DJMINO.woff2 +0 -0
- package/public/media/fa-solid-900-C5F6UWGT.woff2 +0 -0
- package/public/styles-LG2MDN7O.css +0 -1
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/base/worker/workerMain.js +0 -0
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/basic-languages/shell/shell.js +0 -0
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/editor/editor.main.css +0 -0
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/editor/editor.main.js +0 -0
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/editor/editor.main.nls.js +0 -0
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/language/json/jsonMode.js +0 -0
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/language/json/jsonWorker.js +0 -0
- /package/public/assets/{monaco → monaco-0.21.3}/min/vs/loader.js +0 -0
- /package/public/assets/{hap-icons → service-icons}/robot-vacuum.svg +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as we}from"./chunk-S7D4ALZN.js";import{b as A,e as ye,f as Ce,g as Re}from"./chunk-LBAYQDOV.js";import{a as fe,b as he}from"./chunk-F3MG6UU6.js";import{a as _e}from"./chunk-AKD24HZC.js";import{a as De}from"./chunk-IMT3YYMD.js";import{m as pe,n as ge,t as D}from"./chunk-MJK6N6PA.js";import{A as me,c as se,e as le,l as de,z as ce}from"./chunk-VPU5FNT3.js";import{b as ue,d as j}from"./chunk-25NXLXGL.js";import{b as be}from"./chunk-LPDYQHMD.js";import{k as I,n as H}from"./chunk-SPLSJVTN.js";import{a as R,b as P}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Ec as z,Hb as C,Hc as s,Ib as w,Ic as d,Jb as v,Jc as K,Lb as Z,Mb as ee,Nb as te,Ob as f,Pb as a,Qb as l,Rb as p,_b as x,ab as r,bc as b,d as G,dc as m,fb as X,g as Q,h as E,id as re,la as g,mb as B,pd as ae,qc as _,ra as h,rc as k,sa as u,sc as M,w as $,xc as ie,yc as oe,zc as ne}from"./chunk-WEVBEUAJ.js";var ke=Q(Re(),1);var ve=Q(De(),1);var Ee=(n,y)=>({"fa-trash":n,"fa-cog fa-spin":y});function Ie(n,y){n&1&&(a(0,"div",13),p(1,"i",20),l())}function je(n,y){if(n&1){let e=x();a(0,"li",9)(1,"span"),_(2),s(3,"date"),p(4,"br"),a(5,"span",21),_(6),s(7,"date"),l()(),a(8,"span",22)(9,"button",25),s(10,"translate"),s(11,"translate"),b("click",function(){let i=h(e).$implicit,o=m(2);return u(o.restore(i.id))}),p(12,"i",26),l(),a(13,"button",27),s(14,"translate"),s(15,"translate"),b("click",function(){let i=h(e).$implicit,o=m(2);return u(o.download(i.id))}),p(16,"i",28),l(),a(17,"button",23),s(18,"translate"),s(19,"translate"),b("click",function(){let i=h(e).$implicit,o=m(2);return u(o.delete(i.id))}),p(20,"i",24),l()()()}if(n&2){let e=y.$implicit,t=m(2);r(2),M(" ",K(3,15,e.timestamp,"mediumDate")),r(4),k(K(7,18,e.timestamp,"shortTime")),r(3),f("disabled",t.clicked||t.deleting)("ngbTooltip",d(10,21,"config.restore.copy_to_editor"))("openDelay",150),C("aria-label",d(11,23,"config.restore.copy_to_editor")),r(4),f("disabled",t.clicked||t.deleting)("ngbTooltip",d(14,25,"form.button_download"))("openDelay",150),C("aria-label",d(15,27,"form.button_download")),r(4),f("disabled",t.clicked||t.deleting)("ngbTooltip",d(18,29,"form.button_delete"))("openDelay",150),C("aria-label",d(19,31,"form.button_delete")),r(3),f("ngClass",z(33,Ee,e.id!==t.deleting,e.id===t.deleting))}}function He(n,y){if(n&1){let e=x();a(0,"ul",14),ee(1,je,21,36,"li",9,Z),a(3,"li",9)(4,"span"),_(5),s(6,"translate"),p(7,"br"),a(8,"span",21),_(9),s(10,"translate"),l()(),a(11,"span",22)(12,"button",23),s(13,"translate"),s(14,"translate"),b("click",function(){h(e);let i=m();return u(i.deleteAllBackups())}),p(15,"i",24),l()()()()}if(n&2){let e=m();r(),te(e.backupList),r(4),M(" ",d(6,7,"form.button_delete_all")),r(4),M(" ",d(10,9,"common.labels.no_confirmation")," "),r(3),f("disabled",e.clicked||e.deleting)("ngbTooltip",d(13,11,"form.button_delete_all"))("openDelay",150),C("aria-label",d(14,13,"form.button_delete")),r(3),f("ngClass",z(15,Ee,e.deleting!=="all",e.deleting==="all"))}}var xe=(()=>{class n{$activeModal=g(pe);$api=g(H);$router=g(j);$toastr=g(I);$translate=g(R);currentConfig;fromSettings=!1;loading=!0;backupList=[];clicked=!1;deleting=null;ngOnInit(){this.getConfigBackups()}getConfigBackups(){return E(this,null,function*(){try{let e=yield $(this.$api.get("/config-editor/backups"));this.loading=!1,this.backupList=e}catch(e){this.loading=!1,console.error(e),this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),this.dismissModal()}})}restore(e){return this.$activeModal.close(e)}download(e){return E(this,null,function*(){this.clicked=!0;try{let t=yield $(this.$api.get(`/config-editor/backups/${e}`)),i=JSON.stringify(t,null,4),o=new Blob([i],{type:"application/json"}),T=`config-backup-${e}.json`;(0,ve.saveAs)(o,T),this.clicked=!1}catch(t){this.clicked=!1,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}downloadCurrentConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.currentConfig)}`,t=document.createElement("a");t.setAttribute("href",e),t.setAttribute("download","config.json"),document.body.appendChild(t),t.click(),t.remove()}delete(e){return E(this,null,function*(){this.deleting=e;try{yield $(this.$api.delete(`/config-editor/backups/${e}`)),yield this.getConfigBackups(),this.deleting=null}catch(t){this.deleting=null,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}deleteAllBackups(){return E(this,null,function*(){this.deleting="all";try{yield $(this.$api.delete("/config-editor/backups")),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success")),this.backupList=[],this.deleting=null}catch(e){this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),console.error(e),this.deleting=null}})}dismissModal(){this.fromSettings&&this.$router.navigate(["/settings"]),this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["ng-component"]],inputs:{currentConfig:"currentConfig",fromSettings:"fromSettings"},decls:40,vars:31,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas","fa-fw","fa-arrow-right"],[1,"text-center","primary-text"],[1,"list-group","list-group-box","mt-3"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],[1,"fa","fa-fw","fa-cog","fa-spin","mt-3",2,"font-size","75px"],[1,"grey-text","small"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw",3,"ngClass"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw","fa-history"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw","fa-download"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),_(3),s(4,"translate"),l(),a(5,"button",3),s(6,"translate"),b("click",function(){return i.dismissModal()}),l()(),a(7,"div",4)(8,"div",5),p(9,"i",6),l(),a(10,"ul",7)(11,"li"),_(12),s(13,"translate"),l(),a(14,"li"),_(15),s(16,"translate"),l()(),a(17,"ul",8)(18,"li",9)(19,"div")(20,"span"),_(21),s(22,"translate"),l(),p(23,"br"),a(24,"small",10),_(25),s(26,"translate"),l()(),a(27,"button",11),s(28,"translate"),b("click",function(){return i.downloadCurrentConfig()}),p(29,"i",12),l()()(),w(30,Ie,2,0,"div",13)(31,He,16,18,"ul",14),l(),a(32,"div",15),p(33,"div",16),a(34,"div",17)(35,"button",18),s(36,"translate"),b("click",function(){return i.dismissModal()}),_(37),s(38,"translate"),l()(),p(39,"div",19),l()()),t&2&&(r(3),k(d(4,13,"config.restore.title")),r(2),f("disabled",i.clicked||i.deleting),C("aria-label",d(6,15,"form.button_close")),r(7),k(d(13,17,"config.restore.help_1")),r(3),k(d(16,19,"config.restore.help_2")),r(6),k(d(22,21,"form.button_download")),r(4),k(d(26,23,"config.restore.download")),r(2),f("disabled",i.clicked||i.deleting),C("aria-label",d(28,25,"backup.backup_now")),r(3),v(i.loading?30:i.backupList.length?31:-1),r(5),f("disabled",i.clicked||i.deleting),C("aria-label",d(36,27,"form.button_close")),r(2),M(" ",d(38,29,"form.button_close")," "))},dependencies:[D,re,me,ae,P],encapsulation:2})}return n})();function Oe(n,y){if(n&1){let e=x();a(0,"button",13),s(1,"translate"),s(2,"translate"),b("click",function(){h(e);let i=m();return u(i.onCancelRestore())}),p(3,"i",14),l()}if(n&2){let e=m();f("disabled",e.saveInProgress)("openDelay",150)("ngbTooltip",d(1,4,"form.button_cancel")),C("aria-label",d(2,6,"form.button_cancel"))}}function Ne(n,y){if(n&1){let e=x();a(0,"button",15),s(1,"translate"),s(2,"translate"),b("click",function(){h(e);let i=m();return u(i.onRestore())}),p(3,"i",16),l()}n&2&&(f("openDelay",150)("ngbTooltip",d(1,3,"form.button_restore")),C("aria-label",d(2,5,"form.button_restore")))}function qe(n,y){n&1&&p(0,"i",8)}function Fe(n,y){n&1&&p(0,"i",9)}function Le(n,y){if(n&1){let e=x();a(0,"ngx-monaco-editor",17),b("onInit",function(i){h(e);let o=m();return u(o.onEditorInit(i))})("keydown.control.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())})("keydown.meta.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())}),l()}if(n&2){let e=m();f("options",e.editorOptions)("model",e.monacoEditorModel)}}function Je(n,y){if(n&1){let e=x();a(0,"ngx-monaco-diff-editor",18),b("onInit",function(i){h(e);let o=m();return u(o.onInitDiffEditor(i))})("keydown.control.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())})("keydown.meta.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())}),l()}if(n&2){let e=m();f("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function ze(n,y){if(n&1){let e=x();a(0,"textarea",19),ne("ngModelChange",function(i){h(e);let o=m();return oe(o.homebridgeConfig,i)||(o.homebridgeConfig=i),u(i)}),_(1," "),l()}if(n&2){let e=m();ie("ngModel",e.homebridgeConfig)}}var xt=(()=>{class n{$api=g(H);$md=g(_e);$modal=g(ge);$monacoEditor=g(we);$route=g(ue);$renderer=g(X);$router=g(j);$settings=g(be);$toastr=g(I);$translate=g(R);editorDecorations=[];lastHeight;visualViewPortEventCallback;latestSavedConfig;childBridgesToRestart=[];hbPendingRestart=!1;homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config,this.latestSavedConfig=JSON.parse(i.config)}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}});let{action:t}=this.$router.parseUrl(this.$router.url).queryParams;if(t){switch(t){case"restore":{this.onRestore(!0);break}}this.$router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:""})}}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return E(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let t=window.monaco.editor.getModelMarkers({owner:"json"});for(let i of t)if(i.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}onRestore(e=!1){let t=this.$modal.open(xe,{size:"lg",backdrop:"static"});t.componentInstance.currentConfig=this.homebridgeConfig,t.componentInstance.fromSettings=e,t.result.then(i=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${i}`).subscribe({next:o=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(o,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:o=>{console.error(o),this.$toastr.error(o.error?.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig="",this.onRestore()}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}validateSection(e,t){for(let i of e){if(typeof i!="object"||Array.isArray(i))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(!i[t])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(typeof i[t]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1}return!0}validatePlugins(e,t){for(let i of e)if(typeof i!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:t}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
1
|
+
import{a as we}from"./chunk-RZ4UMDVF.js";import{b as A,e as ye,f as Ce,g as Re}from"./chunk-FG5QICVJ.js";import{a as fe,b as he}from"./chunk-M4QDQWSG.js";import{a as _e}from"./chunk-3QBYXJ7T.js";import{a as De}from"./chunk-V35TPDVW.js";import{m as pe,n as ge,t as D}from"./chunk-FYI7RHOJ.js";import{A as me,c as se,e as le,l as de,z as ce}from"./chunk-KYB236MX.js";import{b as ue,d as j}from"./chunk-6HJHVJPI.js";import{b as be}from"./chunk-Z6DMMN6D.js";import{k as I,n as H}from"./chunk-2ZM2CO7S.js";import{a as R,b as P}from"./chunk-FYDO54CR.js";import"./chunk-KLQ6BEKS.js";import{Ec as z,Hb as C,Ib as w,Ic as s,Jb as v,Jc as d,Kc as K,Lb as Z,Mb as ee,Nb as te,Ob as f,Pb as a,Qb as l,Rb as p,_b as x,ab as r,bc as b,d as G,dc as m,fb as X,g as Q,h as E,jd as re,la as g,mb as B,qc as _,qd as ae,ra as h,rc as k,sa as u,sc as M,w as $,xc as ie,yc as oe,zc as ne}from"./chunk-645YHJEQ.js";var ke=Q(Re(),1);var ve=Q(De(),1);var Ee=(n,y)=>({"fa-trash":n,"fa-cog fa-spin":y});function Ie(n,y){n&1&&(a(0,"div",13),p(1,"i",20),l())}function je(n,y){if(n&1){let e=x();a(0,"li",9)(1,"span"),_(2),s(3,"date"),p(4,"br"),a(5,"span",21),_(6),s(7,"date"),l()(),a(8,"span",22)(9,"button",25),s(10,"translate"),s(11,"translate"),b("click",function(){let i=h(e).$implicit,o=m(2);return u(o.restore(i.id))}),p(12,"i",26),l(),a(13,"button",27),s(14,"translate"),s(15,"translate"),b("click",function(){let i=h(e).$implicit,o=m(2);return u(o.download(i.id))}),p(16,"i",28),l(),a(17,"button",23),s(18,"translate"),s(19,"translate"),b("click",function(){let i=h(e).$implicit,o=m(2);return u(o.delete(i.id))}),p(20,"i",24),l()()()}if(n&2){let e=y.$implicit,t=m(2);r(2),M(" ",K(3,15,e.timestamp,"mediumDate")),r(4),k(K(7,18,e.timestamp,"shortTime")),r(3),f("disabled",t.clicked||t.deleting)("ngbTooltip",d(10,21,"config.restore.copy_to_editor"))("openDelay",150),C("aria-label",d(11,23,"config.restore.copy_to_editor")),r(4),f("disabled",t.clicked||t.deleting)("ngbTooltip",d(14,25,"form.button_download"))("openDelay",150),C("aria-label",d(15,27,"form.button_download")),r(4),f("disabled",t.clicked||t.deleting)("ngbTooltip",d(18,29,"form.button_delete"))("openDelay",150),C("aria-label",d(19,31,"form.button_delete")),r(3),f("ngClass",z(33,Ee,e.id!==t.deleting,e.id===t.deleting))}}function He(n,y){if(n&1){let e=x();a(0,"ul",14),ee(1,je,21,36,"li",9,Z),a(3,"li",9)(4,"span"),_(5),s(6,"translate"),p(7,"br"),a(8,"span",21),_(9),s(10,"translate"),l()(),a(11,"span",22)(12,"button",23),s(13,"translate"),s(14,"translate"),b("click",function(){h(e);let i=m();return u(i.deleteAllBackups())}),p(15,"i",24),l()()()()}if(n&2){let e=m();r(),te(e.backupList),r(4),M(" ",d(6,7,"form.button_delete_all")),r(4),M(" ",d(10,9,"common.labels.no_confirmation")," "),r(3),f("disabled",e.clicked||e.deleting)("ngbTooltip",d(13,11,"form.button_delete_all"))("openDelay",150),C("aria-label",d(14,13,"form.button_delete")),r(3),f("ngClass",z(15,Ee,e.deleting!=="all",e.deleting==="all"))}}var xe=(()=>{class n{$activeModal=g(pe);$api=g(H);$router=g(j);$toastr=g(I);$translate=g(R);currentConfig;fromSettings=!1;loading=!0;backupList=[];clicked=!1;deleting=null;ngOnInit(){this.getConfigBackups()}getConfigBackups(){return E(this,null,function*(){try{let e=yield $(this.$api.get("/config-editor/backups"));this.loading=!1,this.backupList=e}catch(e){this.loading=!1,console.error(e),this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),this.dismissModal()}})}restore(e){return this.$activeModal.close(e)}download(e){return E(this,null,function*(){this.clicked=!0;try{let t=yield $(this.$api.get(`/config-editor/backups/${e}`)),i=JSON.stringify(t,null,4),o=new Blob([i],{type:"application/json"}),T=`config-backup-${e}.json`;(0,ve.saveAs)(o,T),this.clicked=!1}catch(t){this.clicked=!1,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}downloadCurrentConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.currentConfig)}`,t=document.createElement("a");t.setAttribute("href",e),t.setAttribute("download","config.json"),document.body.appendChild(t),t.click(),t.remove()}delete(e){return E(this,null,function*(){this.deleting=e;try{yield $(this.$api.delete(`/config-editor/backups/${e}`)),yield this.getConfigBackups(),this.deleting=null}catch(t){this.deleting=null,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}deleteAllBackups(){return E(this,null,function*(){this.deleting="all";try{yield $(this.$api.delete("/config-editor/backups")),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success")),this.backupList=[],this.deleting=null}catch(e){this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),console.error(e),this.deleting=null}})}dismissModal(){this.fromSettings&&this.$router.navigate(["/settings"]),this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=B({type:n,selectors:[["ng-component"]],inputs:{currentConfig:"currentConfig",fromSettings:"fromSettings"},decls:40,vars:31,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas","fa-fw","fa-arrow-right"],[1,"text-center","primary-text"],[1,"list-group","list-group-box","mt-3"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],[1,"fa","fa-fw","fa-cog","fa-spin","mt-3",2,"font-size","75px"],[1,"grey-text","small"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw",3,"ngClass"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw","fa-history"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw","fa-download"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),_(3),s(4,"translate"),l(),a(5,"button",3),s(6,"translate"),b("click",function(){return i.dismissModal()}),l()(),a(7,"div",4)(8,"div",5),p(9,"i",6),l(),a(10,"ul",7)(11,"li"),_(12),s(13,"translate"),l(),a(14,"li"),_(15),s(16,"translate"),l()(),a(17,"ul",8)(18,"li",9)(19,"div")(20,"span"),_(21),s(22,"translate"),l(),p(23,"br"),a(24,"small",10),_(25),s(26,"translate"),l()(),a(27,"button",11),s(28,"translate"),b("click",function(){return i.downloadCurrentConfig()}),p(29,"i",12),l()()(),w(30,Ie,2,0,"div",13)(31,He,16,18,"ul",14),l(),a(32,"div",15),p(33,"div",16),a(34,"div",17)(35,"button",18),s(36,"translate"),b("click",function(){return i.dismissModal()}),_(37),s(38,"translate"),l()(),p(39,"div",19),l()()),t&2&&(r(3),k(d(4,13,"config.restore.title")),r(2),f("disabled",i.clicked||i.deleting),C("aria-label",d(6,15,"form.button_close")),r(7),k(d(13,17,"config.restore.help_1")),r(3),k(d(16,19,"config.restore.help_2")),r(6),k(d(22,21,"form.button_download")),r(4),k(d(26,23,"config.restore.download")),r(2),f("disabled",i.clicked||i.deleting),C("aria-label",d(28,25,"backup.backup_now")),r(3),v(i.loading?30:i.backupList.length?31:-1),r(5),f("disabled",i.clicked||i.deleting),C("aria-label",d(36,27,"form.button_close")),r(2),M(" ",d(38,29,"form.button_close")," "))},dependencies:[D,re,me,ae,P],encapsulation:2})}return n})();function Oe(n,y){if(n&1){let e=x();a(0,"button",13),s(1,"translate"),s(2,"translate"),b("click",function(){h(e);let i=m();return u(i.onCancelRestore())}),p(3,"i",14),l()}if(n&2){let e=m();f("disabled",e.saveInProgress)("openDelay",150)("ngbTooltip",d(1,4,"form.button_cancel")),C("aria-label",d(2,6,"form.button_cancel"))}}function Ne(n,y){if(n&1){let e=x();a(0,"button",15),s(1,"translate"),s(2,"translate"),b("click",function(){h(e);let i=m();return u(i.onRestore())}),p(3,"i",16),l()}n&2&&(f("openDelay",150)("ngbTooltip",d(1,3,"form.button_restore")),C("aria-label",d(2,5,"form.button_restore")))}function qe(n,y){n&1&&p(0,"i",8)}function Fe(n,y){n&1&&p(0,"i",9)}function Le(n,y){if(n&1){let e=x();a(0,"ngx-monaco-editor",17),b("onInit",function(i){h(e);let o=m();return u(o.onEditorInit(i))})("keydown.control.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())})("keydown.meta.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())}),l()}if(n&2){let e=m();f("options",e.editorOptions)("model",e.monacoEditorModel)}}function Je(n,y){if(n&1){let e=x();a(0,"ngx-monaco-diff-editor",18),b("onInit",function(i){h(e);let o=m();return u(o.onInitDiffEditor(i))})("keydown.control.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())})("keydown.meta.s",function(i){h(e);let o=m();return i.preventDefault(),u(o.onSave())}),l()}if(n&2){let e=m();f("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function ze(n,y){if(n&1){let e=x();a(0,"textarea",19),ne("ngModelChange",function(i){h(e);let o=m();return oe(o.homebridgeConfig,i)||(o.homebridgeConfig=i),u(i)}),_(1," "),l()}if(n&2){let e=m();ie("ngModel",e.homebridgeConfig)}}var xt=(()=>{class n{$api=g(H);$md=g(_e);$modal=g(ge);$monacoEditor=g(we);$route=g(ue);$renderer=g(X);$router=g(j);$settings=g(be);$toastr=g(I);$translate=g(R);editorDecorations=[];lastHeight;visualViewPortEventCallback;latestSavedConfig;childBridgesToRestart=[];hbPendingRestart=!1;homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config,this.latestSavedConfig=JSON.parse(i.config)}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}});let{action:t}=this.$router.parseUrl(this.$router.url).queryParams;if(t){switch(t){case"restore":{this.onRestore(!0);break}}this.$router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:""})}}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return E(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let t=window.monaco.editor.getModelMarkers({owner:"json"});for(let i of t)if(i.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}onRestore(e=!1){let t=this.$modal.open(xe,{size:"lg",backdrop:"static"});t.componentInstance.currentConfig=this.homebridgeConfig,t.componentInstance.fromSettings=e,t.result.then(i=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${i}`).subscribe({next:o=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(o,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:o=>{console.error(o),this.$toastr.error(o.error?.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig="",this.onRestore()}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}validateSection(e,t){for(let i of e){if(typeof i!="object"||Array.isArray(i))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(!i[t])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(typeof i[t]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1}return!0}validatePlugins(e,t){for(let i of e)if(typeof i!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:t}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
2
2
|
`).map(t=>` ${t}`).join(`
|
|
3
3
|
`),setTimeout(()=>{let t=this.monacoEditor.getModel().findMatches(e);if(t.length){let i=t[0].range,o=new monaco.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:o,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(t=>t.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
|
|
4
4
|
This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l}from"./chunk-
|
|
1
|
+
import{g as l}from"./chunk-FYI7RHOJ.js";import{b as c}from"./chunk-FYDO54CR.js";import{Ec as s,Ic as a,Kc as m,Ob as o,Rb as p,Xa as i,mb as r}from"./chunk-645YHJEQ.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[l,c],encapsulation:2})}return e})();export{k as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$ as Ze,$c as j,Ab as oe,Ba as _e,Bb as se,Cb as Ae,Ga as et,H as Je,Ha as De,Ia as tt,Ja as J,L as Ye,La as Oe,Ma as Se,Na as L,Oa as U,Pa as nt,Qa as rt,Ra as ot,S as Re,Sa as st,Ta as it,Ua as at,Va as ct,Wa as k,Wc as ht,Xc as ft,a as x,ad as pt,bb as Y,bd as mt,da as v,ea as O,eb as dt,ga as g,h as Ee,ha as ne,ja as T,k as Te,ka as h,la as w,ma as Me,nb as re,oa as We,pa as Ke,qa as qe,r as we,sd as yt,tb as lt,td as ie,ud as ae,va as M,vb as S,wa as Qe,wd as gt,x as G,xa as be,zb as ut}from"./chunk-645YHJEQ.js";var B=class{},z=class{},_=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
2
|
+
`).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),s=e.slice(n+1).trim();this.addHeaderEntry(o,s)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let o=(t.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let s=t.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>s.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(s=>s.toString()),o=t.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var le=class{encodeKey(t){return vt(t)}encodeValue(t){return vt(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Xt(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(o=>{let s=o.indexOf("="),[i,c]=s==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,s)),t.decodeValue(o.slice(s+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var Gt=/%(\d[a-f0-9])/gi,Jt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function vt(r){return encodeURIComponent(r).replace(Gt,(t,e)=>Jt[e]??t)}function ce(r){return`${r}`}var A=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new le,t.fromString){if(t.fromObject)throw new v(2805,!1);this.map=Xt(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],o=Array.isArray(n)?n.map(ce):[ce(n)];this.map.set(e,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let o=t[n];Array.isArray(o)?o.forEach(s=>{e.push({param:n,value:s,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ce(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],o=n.indexOf(ce(t.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var ue=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Yt(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Et(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function Tt(r){return typeof Blob<"u"&&r instanceof Blob}function wt(r){return typeof FormData<"u"&&r instanceof FormData}function Zt(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var Z="Content-Type",he="Accept",xe="X-Request-URL",bt="text/plain",_t="application/json",Dt=`${_t}, ${bt}, */*`,F=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,n,o){this.url=e,this.method=t.toUpperCase();let s;if(Yt(this.method)||o?(this.body=n!==void 0?n:null,s=o):s=n,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new Error("");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),this.transferCache=s.transferCache}if(this.headers??=new _,this.context??=new ue,!this.params)this.params=new A,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Et(this.body)||Tt(this.body)||wt(this.body)||Zt(this.body)?this.body:this.body instanceof A?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||wt(this.body)?null:Tt(this.body)?this.body.type||null:Et(this.body)?null:typeof this.body=="string"?bt:this.body instanceof A?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?_t:null}clone(t={}){let e=t.method||this.method,n=t.url||this.url,o=t.responseType||this.responseType,s=t.keepalive??this.keepalive,i=t.priority||this.priority,c=t.cache||this.cache,a=t.mode||this.mode,l=t.redirect||this.redirect,d=t.credentials||this.credentials,y=t.transferCache??this.transferCache,E=t.timeout??this.timeout,m=t.body!==void 0?t.body:this.body,I=t.withCredentials??this.withCredentials,N=t.reportProgress??this.reportProgress,u=t.headers||this.headers,f=t.params||this.params,R=t.context??this.context;return t.setHeaders!==void 0&&(u=Object.keys(t.setHeaders).reduce((D,p)=>D.set(p,t.setHeaders[p]),u)),t.setParams&&(f=Object.keys(t.setParams).reduce((D,p)=>D.set(p,t.setParams[p]),f)),new r(e,n,m,{params:f,headers:u,context:R,reportProgress:N,responseType:o,withCredentials:I,transferCache:y,keepalive:s,cache:c,priority:i,timeout:E,mode:a,redirect:l,credentials:d})}},P=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(P||{}),H=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new _,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},W=class r extends H{constructor(t={}){super(t)}type=P.ResponseHeader;clone(t={}){return new r({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},V=class r extends H{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=P.Response;clone(t={}){return new r({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},b=class extends H{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},Ot=200,Wt=204;function Pe(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect}}var St=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,o={}){let s;if(e instanceof F)s=e;else{let a;o.headers instanceof _?a=o.headers:a=new _(o.headers);let l;o.params&&(o.params instanceof A?l=o.params:l=new A({fromObject:o.params})),s=new F(e,n,o.body!==void 0?o.body:null,{headers:a,context:o.context,params:l,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials})}let i=we(s).pipe(Ye(a=>this.handler.handle(a)));if(e instanceof F||o.observe==="events")return i;let c=i.pipe(Je(a=>a instanceof V));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(G(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new v(2806,!1);return a.body}));case"blob":return c.pipe(G(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new v(2807,!1);return a.body}));case"text":return c.pipe(G(a=>{if(a.body!==null&&typeof a.body!="string")throw new v(2808,!1);return a.body}));case"json":default:return c.pipe(G(a=>a.body))}case"response":return c;default:throw new v(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new A().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,Pe(o,n))}post(e,n,o={}){return this.request("POST",e,Pe(o,n))}put(e,n,o={}){return this.request("PUT",e,Pe(o,n))}static \u0275fac=function(n){return new(n||r)(h(B))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Kt=/^\)\]\}',?\n/;function Rt(r){if(r.url)return r.url;let t=xe.toLocaleLowerCase();return r.headers.get(t)}var At=new T(""),de=(()=>{class r{fetchImpl=w(Ie,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=w(S);destroyRef=w(Qe);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(e){return new Te(n=>{let o=new AbortController;this.doRequest(e,o.signal,n).then(Ne,i=>n.error(new b({error:i})));let s;return e.timeout&&(s=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{s!==void 0&&clearTimeout(s),o.abort()}})}doRequest(e,n,o){return Ee(this,null,function*(){let s=this.createRequestInit(e),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,x({signal:n},s)));qt(m),o.next({type:P.Sent}),i=yield m}catch(m){o.error(new b({error:m,status:m.status??0,statusText:m.statusText,url:e.urlWithParams,headers:m.headers}));return}let c=new _(i.headers),a=i.statusText,l=Rt(i)??e.urlWithParams,d=i.status,y=null;if(e.reportProgress&&o.next(new W({headers:c,status:d,statusText:a,url:l})),i.body){let m=i.headers.get("content-length"),I=[],N=i.body.getReader(),u=0,f,R,D=typeof Zone<"u"&&Zone.current,p=!1;if(yield this.ngZone.runOutsideAngular(()=>Ee(this,null,function*(){for(;;){if(this.destroyed){yield N.cancel(),p=!0;break}let{done:C,value:X}=yield N.read();if(C)break;if(I.push(X),u+=X.length,e.reportProgress){R=e.responseType==="text"?(R??"")+(f??=new TextDecoder).decode(X,{stream:!0}):void 0;let Ge=()=>o.next({type:P.DownloadProgress,total:m?+m:void 0,loaded:u,partialText:R});D?D.run(Ge):Ge()}}})),p){o.complete();return}let $=this.concatChunks(I,u);try{let C=i.headers.get(Z)??"";y=this.parseBody(e,$,C,d)}catch(C){o.error(new b({error:C,headers:new _(i.headers),status:i.status,statusText:i.statusText,url:Rt(i)??e.urlWithParams}));return}}d===0&&(d=y?Ot:0),d>=200&&d<300?(o.next(new V({body:y,headers:c,status:d,statusText:a,url:l})),o.complete()):o.error(new b({error:y,headers:c,status:d,statusText:a,url:l}))})}parseBody(e,n,o,s){switch(e.responseType){case"json":let i=new TextDecoder().decode(n).replace(Kt,"");if(i==="")return null;try{return JSON.parse(i)}catch(c){if(s<200||s>=300)return i;throw c}case"text":return new TextDecoder().decode(n);case"blob":return new Blob([n],{type:o});case"arraybuffer":return n.buffer}}createRequestInit(e){let n={},o;if(o=e.credentials,e.withCredentials&&(o="include"),e.headers.forEach((s,i)=>n[s]=i.join(",")),e.headers.has(he)||(n[he]=Dt),!e.headers.has(Z)){let s=e.detectContentTypeHeader();s!==null&&(n[Z]=s)}return{body:e.serializeBody(),method:e.method,headers:n,credentials:o,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect}}concatChunks(e,n){let o=new Uint8Array(n),s=0;for(let i of e)o.set(i,s),s+=i.length;return o}static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Ie=class{};function Ne(){}function qt(r){r.then(Ne,Ne)}function Pt(r,t){return t(r)}function Qt(r,t){return(e,n)=>t.intercept(e,{handle:o=>r(o,n)})}function en(r,t,e){return(n,o)=>qe(e,()=>t(n,s=>r(s,o)))}var It=new T(""),Le=new T(""),Nt=new T(""),Ue=new T("",{providedIn:"root",factory:()=>!0});function tn(){let r=null;return(t,e)=>{r===null&&(r=(w(It,{optional:!0})??[]).reduceRight(Qt,Pt));let n=w(_e);if(w(Ue)){let s=n.add();return r(t,e).pipe(Re(s))}else return r(t,e)}}var fe=(()=>{class r extends B{backend;injector;chain=null;pendingTasks=w(_e);contributeToStability=w(Ue);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Le),...this.injector.get(Nt,[])]));this.chain=n.reduceRight((o,s)=>en(o,s,this.injector),Pt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Re(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(h(z),h(Ke))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();var nn=/^\)\]\}',?\n/,rn=RegExp(`^${xe}:`,"m");function on(r){return"responseURL"in r&&r.responseURL?r.responseURL:rn.test(r.getAllResponseHeaders())?r.getResponseHeader(xe):null}var Ce=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new v(-2800,!1);let n=this.xhrFactory;return we(null).pipe(Ze(()=>new Te(s=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((u,f)=>i.setRequestHeader(u,f.join(","))),e.headers.has(he)||i.setRequestHeader(he,Dt),!e.headers.has(Z)){let u=e.detectContentTypeHeader();u!==null&&i.setRequestHeader(Z,u)}if(e.timeout&&(i.timeout=e.timeout),e.responseType){let u=e.responseType.toLowerCase();i.responseType=u!=="json"?u:"text"}let c=e.serializeBody(),a=null,l=()=>{if(a!==null)return a;let u=i.statusText||"OK",f=new _(i.getAllResponseHeaders()),R=on(i)||e.url;return a=new W({headers:f,status:i.status,statusText:u,url:R}),a},d=()=>{let{headers:u,status:f,statusText:R,url:D}=l(),p=null;f!==Wt&&(p=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=p?Ot:0);let $=f>=200&&f<300;if(e.responseType==="json"&&typeof p=="string"){let C=p;p=p.replace(nn,"");try{p=p!==""?JSON.parse(p):null}catch(X){p=C,$&&($=!1,p={error:X,text:p})}}$?(s.next(new V({body:p,headers:u,status:f,statusText:R,url:D||void 0})),s.complete()):s.error(new b({error:p,headers:u,status:f,statusText:R,url:D||void 0}))},y=u=>{let{url:f}=l(),R=new b({error:u,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});s.error(R)},E=y;e.timeout&&(E=u=>{let{url:f}=l(),R=new b({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:f||void 0});s.error(R)});let m=!1,I=u=>{m||(s.next(l()),m=!0);let f={type:P.DownloadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),s.next(f)},N=u=>{let f={type:P.UploadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),s.next(f)};return i.addEventListener("load",d),i.addEventListener("error",y),i.addEventListener("timeout",E),i.addEventListener("abort",y),e.reportProgress&&(i.addEventListener("progress",I),c!==null&&i.upload&&i.upload.addEventListener("progress",N)),i.send(c),s.next({type:P.Sent}),()=>{i.removeEventListener("error",y),i.removeEventListener("abort",y),i.removeEventListener("load",d),i.removeEventListener("timeout",E),e.reportProgress&&(i.removeEventListener("progress",I),c!==null&&i.upload&&i.upload.removeEventListener("progress",N)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(h(ae))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Ct=new T(""),sn="XSRF-TOKEN",an=new T("",{providedIn:"root",factory:()=>sn}),cn="X-XSRF-TOKEN",dn=new T("",{providedIn:"root",factory:()=>cn}),K=class{},ln=(()=>{class r{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ie(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(h(M),h(an))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();function un(r,t){let e=r.url.toLowerCase();if(!w(Ct)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=w(K).getToken(),o=w(dn);return n!=null&&!r.headers.has(o)&&(r=r.clone({headers:r.headers.set(o,n)})),t(r)}var pe=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(pe||{});function kt(r,t){return{\u0275kind:r,\u0275providers:t}}function hn(...r){let t=[St,Ce,fe,{provide:B,useExisting:fe},{provide:z,useFactory:()=>w(At,{optional:!0})??w(Ce)},{provide:Le,useValue:un,multi:!0},{provide:Ct,useValue:!0},{provide:K,useClass:ln}];for(let e of r)t.push(...e.\u0275providers);return Me(t)}var Mt=new T("");function fn(){return kt(pe.LegacyInterceptors,[{provide:Mt,useFactory:tn},{provide:Le,useExisting:Mt,multi:!0}])}function pn(){return kt(pe.Fetch,[de,{provide:At,useExisting:de},{provide:z,useExisting:de}])}var ye=new T(""),He=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,o,s){return this._findPluginFor(n).addEventListener(e,n,o,s)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(s=>s.supports(e)),!n)throw new v(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(h(ye),h(S))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),q=class{_doc;constructor(t){this._doc=t}manager},je="ng-app-id";function xt(r){for(let t of r)t.remove()}function Lt(r,t){let e=t.createElement("style");return e.textContent=r,e}function mn(r,t,e,n){let o=r.head?.querySelectorAll(`style[${je}="${t}"],link[${je}="${t}"]`);if(o)for(let s of o)s.removeAttribute(je),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function Be(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var Ve=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,o,s={}){this.doc=e,this.appId=n,this.nonce=o,mn(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let o of e)this.addUsage(o,this.inline,Lt);n?.forEach(o=>this.addUsage(o,this.external,Be))}removeStyles(e,n){for(let o of e)this.removeUsage(o,this.inline);n?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,n,o){let s=n.get(e);s?s.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,n){let o=n.get(e);o&&(o.usage--,o.usage<=0&&(xt(o.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])xt(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:o}]of this.inline)o.push(this.addElement(e,Lt(n,this.doc)));for(let[n,{elements:o}]of this.external)o.push(this.addElement(e,Be(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(h(M),h(De),h(Oe,8),h(J))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Fe={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},$e=/%COMP%/g;var jt="%COMP%",yn=`_nghost-${jt}`,gn=`_ngcontent-${jt}`,vn=!0,En=new T("",{providedIn:"root",factory:()=>vn});function Tn(r){return gn.replace($e,r)}function wn(r){return yn.replace($e,r)}function Ft(r,t){return t.map(e=>e.replace($e,r))}var Xe=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,o,s,i,c,a,l=null,d=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=l,this.tracingService=d,this.platformIsServer=!1,this.defaultRenderer=new Q(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,n);return o instanceof me?o.applyToHost(e):o instanceof ee&&o.applyStyles(),o}getOrCreateRenderer(e,n){let o=this.rendererByCompId,s=o.get(n.id);if(!s){let i=this.doc,c=this.ngZone,a=this.eventManager,l=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,y=this.platformIsServer,E=this.tracingService;switch(n.encapsulation){case Se.Emulated:s=new me(a,l,n,this.appId,d,i,c,y,E);break;case Se.ShadowDom:return new ze(a,l,e,n,i,c,this.nonce,y,E);default:s=new ee(a,l,n,d,i,c,y,E);break}o.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||r)(h(He),h(Ve),h(De),h(En),h(M),h(J),h(S),h(Oe),h(lt,8))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Q=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,o,s){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Fe[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Ut(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(Ut(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new v(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,o){if(o){e=o+":"+e;let s=Fe[o];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let o=Fe[n];o?t.removeAttributeNS(o,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,o){o&(Y.DashCase|Y.Important)?t.style.setProperty(e,n,o&Y.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Y.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,o){if(typeof t=="string"&&(t=j().getGlobalEventTarget(this.doc,t),!t))throw new v(5102,!1);let s=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(t,e,s)),this.eventManager.addEventListener(t,e,s,o)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function Ut(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var ze=class extends Q{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,o,s,i,c,a,l){super(t,s,i,a,l),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=o.styles;d=Ft(o.id,d);for(let E of d){let m=document.createElement("style");c&&m.setAttribute("nonce",c),m.textContent=E,this.shadowRoot.appendChild(m)}let y=o.getExternalStyles?.();if(y)for(let E of y){let m=Be(E,s);c&&m.setAttribute("nonce",c),this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ee=class extends Q{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,o,s,i,c,a,l){super(t,s,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let d=n.styles;this.styles=l?Ft(l,d):d,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},me=class extends ee{contentAttr;hostAttr;constructor(t,e,n,o,s,i,c,a,l){let d=o+"-"+n.id;super(t,e,n,s,i,c,a,l,d),this.contentAttr=Tn(d),this.hostAttr=wn(d)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}};var ge=class r extends mt{supportsDOMEvents=!0;static makeCurrent(){pt(new r)}onAndCancel(t,e,n,o){return t.addEventListener(e,n,o),()=>{t.removeEventListener(e,n,o)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=Rn();return e==null?null:Mn(e)}resetBaseElement(){te=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ie(document.cookie,t)}},te=null;function Rn(){return te=te||document.head.querySelector("base"),te?te.getAttribute("href"):null}function Mn(r){return new URL(r,document.baseURI).pathname}var ve=class{addToWindow(t){O.getAngularTestability=(n,o=!0)=>{let s=t.findTestabilityInTree(n,o);if(s==null)throw new v(5103,!1);return s},O.getAllAngularTestabilities=()=>t.getAllTestabilities(),O.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let o=O.getAllAngularTestabilities(),s=o.length,i=function(){s--,s==0&&n()};o.forEach(c=>{c.whenStable(i)})};O.frameworkStabilizers||(O.frameworkStabilizers=[]),O.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let o=t.getTestability(e);return o??(n?j().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},bn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),zt=(()=>{class r extends q{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,o,s){return e.addEventListener(n,o,s),()=>this.removeEventListener(e,n,o,s)}removeEventListener(e,n,o,s){return e.removeEventListener(n,o,s)}static \u0275fac=function(n){return new(n||r)(h(M))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Bt=["alt","control","meta","shift"],_n={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Dn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ht=(()=>{class r extends q{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,o,s){let i=r.parseEventName(n),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>j().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let n=e.toLowerCase().split("."),o=n.shift();if(n.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),Bt.forEach(l=>{let d=n.indexOf(l);d>-1&&(n.splice(d,1),i+=l+".")}),i+=s,n.length!=0||s.length===0)return null;let a={};return a.domEventName=o,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let o=_n[e.key]||e.key,s="";return n.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Bt.forEach(i=>{if(i!==o){let c=Dn[i];c(e)&&(s+=i+".")}}),s+=o,s===n)}static eventCallback(e,n,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>n(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(h(M))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();function On(r,t){let e=x({rootComponent:r},Sn(t));return ft(e)}function Sn(r){return{appProviders:[...Vt,...r?.providers??[]],platformProviders:Nn}}function An(){ge.makeCurrent()}function Pn(){return new be}function In(){return et(document),document}var Nn=[{provide:J,useValue:gt},{provide:tt,useValue:An,multi:!0},{provide:M,useFactory:In}];var Cn=[{provide:oe,useClass:ve},{provide:ut,useClass:se,deps:[S,Ae,oe]},{provide:se,useClass:se,deps:[S,Ae,oe]}],Vt=[{provide:We,useValue:"root"},{provide:be,useFactory:Pn},{provide:ye,useClass:zt,multi:!0,deps:[M]},{provide:ye,useClass:Ht,multi:!0,deps:[M]},Xe,Ve,He,{provide:dt,useExisting:Xe},{provide:ae,useClass:bn},[]],kn=(()=>{class r{constructor(){}static \u0275fac=function(n){return new(n||r)};static \u0275mod=re({type:r});static \u0275inj=ne({providers:[...Vt,...Cn],imports:[yt,ht]})}return r})();var qr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(h(M))};static \u0275prov=g({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Ln=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:function(n){let o=null;return n?o=new(n||r):o=h(Un),o},providedIn:"root"})}return r})(),Un=(()=>{class r extends Ln{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case k.NONE:return n;case k.HTML:return U(n,"HTML")?L(n):ct(this._doc,String(n)).toString();case k.STYLE:return U(n,"Style")?L(n):n;case k.SCRIPT:if(U(n,"Script"))return L(n);throw new v(5200,!1);case k.URL:return U(n,"URL")?L(n):at(String(n));case k.RESOURCE_URL:if(U(n,"ResourceURL"))return L(n);throw new v(5201,!1);default:throw new v(5202,!1)}}bypassSecurityTrustHtml(e){return nt(e)}bypassSecurityTrustStyle(e){return rt(e)}bypassSecurityTrustScript(e){return ot(e)}bypassSecurityTrustUrl(e){return st(e)}bypassSecurityTrustResourceUrl(e){return it(e)}static \u0275fac=function(n){return new(n||r)(h(M))};static \u0275prov=g({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{z as a,A as b,P as c,V as d,St as e,It as f,hn as g,fn as h,pn as i,Xe as j,On as k,kn as l,qr as m,Ln as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-WG533VX7.js";import"./chunk-U4UZ4WQX.js";import"./chunk-V7OQR5Y4.js";import"./chunk-G6KV6PYE.js";import"./chunk-FYI7RHOJ.js";import"./chunk-KYB236MX.js";import"./chunk-U52WKM74.js";import"./chunk-ZO74PVYQ.js";import{g as i}from"./chunk-6HJHVJPI.js";import"./chunk-Z6DMMN6D.js";import"./chunk-2ZM2CO7S.js";import"./chunk-FYDO54CR.js";import"./chunk-KLQ6BEKS.js";import{ha as e,nb as t}from"./chunk-645YHJEQ.js";var u=[{path:"",loadComponent:()=>import("./chunk-VRXR6ACJ.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Bc as c,Ca as E,D as Ne,Da as g,Db as xe,Fa as N,Gb as Pe,Hb as x,Nc as m,Oc as w,Uc as he,Xc as fe,_c as ge,a as h,b as f,bc as V,da as $,fa as d,fb as O,gb as o,ha as q,ja as A,la as z,n as Fe,nb as Z,ob as l,oc as ce,q as Ie,qb as u,ub as C,wa as de,x as Se,xb as Oe,za as M}from"./chunk-WEVBEUAJ.js";var Le=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(O),o(N))};static \u0275dir=l({type:n})}return n})(),H=(()=>{class n extends Le{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),b=new A(""),pt={provide:b,useExisting:d(()=>mt),multi:!0},mt=(()=>{class n extends H{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([pt]),u]})}return n})(),_t={provide:b,useExisting:d(()=>We),multi:!0};function vt(){let n=ge()?ge().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var yt=new A(""),We=(()=>{class n extends Le{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vt())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(O),o(N),o(yt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([_t]),u]})}return n})();function _e(n){return n==null||ve(n)===0}function ve(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new A(""),L=new A(""),Ct=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Re=class{static min(t){return $e(t)}static max(t){return qe(t)}static required(t){return ze(t)}static requiredTrue(t){return Vt(t)}static email(t){return Dt(t)}static minLength(t){return bt(t)}static maxLength(t){return At(t)}static pattern(t){return Ze(t)}static nullValidator(t){return Y()}static compose(t){return et(t)}static composeAsync(t){return tt(t)}};function $e(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function qe(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ze(n){return _e(n.value)?{required:!0}:null}function Vt(n){return n.value===!0?null:{required:!0}}function Dt(n){return _e(n.value)||Ct.test(n.value)?null:{email:!0}}function bt(n){return t=>{let e=t.value?.length??ve(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function At(n){return t=>{let e=t.value?.length??ve(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function Ze(n){if(!n)return Y;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(_e(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Y(n){return null}function Xe(n){return n!=null}function Ye(n){return xe(n)?Ie(n):n}function Ke(n){let t={};return n.forEach(e=>{t=e!=null?h(h({},t),e):t}),Object.keys(t).length===0?null:t}function Je(n,t){return t.map(e=>e(n))}function Mt(n){return!n.validate}function Qe(n){return n.map(t=>Mt(t)?t:e=>t.validate(e))}function et(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){return Ke(Je(e,t))}}function ye(n){return n!=null?et(Qe(n)):null}function tt(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){let i=Je(e,t).map(Ye);return Ne(i).pipe(Se(Ke))}}function Ce(n){return n!=null?tt(Qe(n)):null}function ke(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function nt(n){return n._rawValidators}function it(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function K(n,t){return Array.isArray(n)?n.includes(t):n===t}function je(n,t){let e=pe(t);return pe(n).forEach(r=>{K(e,r)||e.push(r)}),e}function Ge(n,t){return pe(t).filter(e=>!K(n,e))}var J=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ye(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ce(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},_=class extends J{name;get formDirective(){return null}get path(){return null}},v=class extends J{_parent=null;name=null;valueAccessor=null},Q=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Et={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},wn=f(h({},Et),{"[class.ng-submitted]":"isSubmitted"}),Fn=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ce("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),In=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(_,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ce("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var P="VALID",X="INVALID",F="PENDING",R="DISABLED",D=class{},ee=class extends D{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends D{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends D{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},I=class extends D{status;source;constructor(t,e){super(),this.status=t,this.source=e}},te=class extends D{source;constructor(t){super(),this.source=t}},ne=class extends D{source;constructor(t){super(),this.source=t}};function Ve(n){return(oe(n)?n.validators:n)||null}function wt(n){return Array.isArray(n)?ye(n):n||null}function De(n,t){return(oe(t)?t.asyncValidators:n)||null}function Ft(n){return Array.isArray(n)?Ce(n):n||null}function oe(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function rt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new $(1e3,"");if(!i[e])throw new $(1001,"")}function st(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new $(1002,"")})}var T=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=w(()=>this.statusReactive());statusReactive=M(void 0);get valid(){return this.status===P}get invalid(){return this.status===X}get pending(){return this.status==F}get disabled(){return this.status===R}get enabled(){return this.status!==R}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=w(()=>this.pristineReactive());pristineReactive=M(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=w(()=>this.touchedReactive());touchedReactive=M(!1);get untouched(){return!this.touched}_events=new Fe;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(je(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(je(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Ge(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}hasValidator(t){return K(this._rawValidators,t)}hasAsyncValidator(t){return K(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new I(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(f(h({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this.errors=null,this._forEachChild(r=>{r.disable(f(h({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,i)),this._events.next(new I(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this._forEachChild(i=>{i.enable(f(h({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===P||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,e)),this._events.next(new I(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(f(h({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?R:P}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Ye(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new I(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?R:this.errors?X:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(X)?X:P}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){oe(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=wt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ft(this._rawAsyncValidators)}},B=class extends T{constructor(t,e,i){super(Ve(e),De(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){st(this,!0,t),Object.keys(t).forEach(i=>{rt(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Sn=B;var S=new A("",{providedIn:"root",factory:()=>ae}),ae="always";function ot(n,t){return[...t.path,n]}function U(n,t,e=ae){be(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),St(n,t),Ot(n,t),Nt(n,t),It(n,t)}function ie(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function re(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function It(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function be(n,t){let e=nt(n);t.validator!==null?n.setValidators(ke(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=it(n);t.asyncValidator!==null?n.setAsyncValidators(ke(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();re(t._rawValidators,r),re(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=nt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=it(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return re(t._rawValidators,i),re(t._rawAsyncValidators,i),e}function St(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&at(n,t)})}function Nt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&at(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function at(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ot(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function lt(n,t){n==null,be(n,t)}function xt(n,t){return se(n,t)}function Ae(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Pt(n){return Object.getPrototypeOf(n.constructor)===H}function ut(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Me(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===We?e=s:Pt(s)?i=s:r=s}),r||i||e||null}function Rt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var kt={provide:_,useExisting:d(()=>jt)},k=Promise.resolve(),jt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this.submittedReactive)}_submitted=w(()=>this.submittedReactive());submittedReactive=M(!1);_directives=new Set;form;ngSubmit=new C;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new B({},ye(e),Ce(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){k.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),U(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){k.then(()=>{let i=this._findContainer(e.path),r=new B({});lt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){k.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ut(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ne(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([kt]),u]})}return n})();function Te(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Be(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Ee=class extends T{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ve(e),De(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),oe(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Be(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Te(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Te(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Be(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},On=Ee,Gt=n=>n instanceof Ee;var Tt={provide:v,useExisting:d(()=>Bt)},Ue=Promise.resolve(),Bt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new Ee;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,p){super(),this._changeDetectorRef=a,this.callSetDisabledState=p,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Me(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Ae(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){U(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Ue.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&fe(i);Ue.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ot(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(_,9),o(y,10),o(L,10),o(b,10),o(he,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[c([Tt]),u,E]})}return n})();var xn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ut={provide:b,useExisting:d(()=>Ht),multi:!0},Ht=(()=>{class n extends H{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Ut]),u]})}return n})();var we=new A(""),Lt={provide:v,useExisting:d(()=>Wt)},Wt=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Me(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ie(i,this,!1),U(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Ae(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ie(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(b,10),o(we,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([Lt]),u,E]})}return n})(),$t={provide:_,useExisting:d(()=>qt)},qt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=w(()=>this._submittedReactive());_submittedReactive=M(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(se(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return U(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ie(e.control||null,e,!1),Rt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),ut(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new ne(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ie(i||null,e),Gt(r)&&(U(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);lt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&xt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){be(this.form,this),this._oldForm&&se(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([$t]),u,E]})}return n})();var zt={provide:v,useExisting:d(()=>Zt)},Zt=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Me(this,s)}ngOnChanges(e){this._added||this._setUpControl(),Ae(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return ot(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(_,13),o(y,10),o(L,10),o(b,10),o(we,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([zt]),u,E]})}return n})();var Xt={provide:b,useExisting:d(()=>ct),multi:!0};function dt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Yt(n){return n.split(":")[0]}var ct=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=z(Pe).injector;appRefDestroyRef=this.appRefInjector.get(de);destroyRef=z(de);cdr=z(he);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefDestroyRef.destroyed||(this._queuedWrite=!0,Oe({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=dt(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=Yt(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Xt]),u]})}return n})(),Pn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(dt(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select&&this._select._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ct,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),Kt={provide:b,useExisting:d(()=>ht),multi:!0};function He(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Jt(n){return n.split(":")[0]}var ht=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let p=0;p<a.length;p++){let W=a[p],ue=this._getOptionValue(W.value);r.push(ue)}}else{let a=i.options;for(let p=0;p<a.length;p++){let W=a[p];if(W.selected){let ue=this._getOptionValue(W.value);r.push(ue)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Jt(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Kt]),u]})}return n})(),Rn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ht,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function ft(n){return typeof n=="number"?n:parseFloat(n)}var le=(()=>{class n{_validator=Y;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Y,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[E]})}return n})(),Qt={provide:y,useExisting:d(()=>en),multi:!0},en=(()=>{class n extends le{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>qe(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([Qt]),u]})}return n})(),tn={provide:y,useExisting:d(()=>nn),multi:!0},nn=(()=>{class n extends le{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>$e(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([tn]),u]})}return n})(),rn={provide:y,useExisting:d(()=>sn),multi:!0};var sn=(()=>{class n extends le{required;inputName="required";normalizeInput=fe;createValidator=e=>ze;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&x("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([rn]),u]})}return n})();var on={provide:y,useExisting:d(()=>an),multi:!0},an=(()=>{class n extends le{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[c([on]),u]})}return n})();var gt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({})}return n})(),me=class extends T{constructor(t,e,i){super(Ve(e),De(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){st(this,!1,t),t.forEach((i,r)=>{rt(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}},kn=me;var jn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})(),Gn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:we,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})();export{b as a,mt as b,We as c,Re as d,Fn as e,In as f,B as g,Sn as h,jt as i,Ee as j,On as k,Bt as l,xn as m,Ht as n,Wt as o,qt as p,Zt as q,ct as r,Pn as s,Rn as t,en as u,nn as v,sn as w,an as x,kn as y,jn as z,Gn as A};
|
|
1
|
+
import{$c as fe,Bc as c,Ca as E,D as Se,Da as g,Db as xe,Fa as N,Gb as Pe,Hb as x,Oc as m,Pc as w,Vc as ce,Yc as he,a as h,b as f,bc as V,da as $,fa as d,fb as O,gb as o,ha as q,ja as A,la as z,n as we,nb as Z,ob as l,oc as de,q as Fe,qb as u,ub as C,wa as Ne,x as Ie,xb as Oe,za as M}from"./chunk-645YHJEQ.js";var Le=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(O),o(N))};static \u0275dir=l({type:n})}return n})(),H=(()=>{class n extends Le{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),b=new A(""),pt={provide:b,useExisting:d(()=>mt),multi:!0},mt=(()=>{class n extends H{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([pt]),u]})}return n})(),_t={provide:b,useExisting:d(()=>We),multi:!0};function vt(){let n=fe()?fe().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var yt=new A(""),We=(()=>{class n extends Le{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vt())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(O),o(N),o(yt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([_t]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new A(""),L=new A(""),Ct=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Re=class{static min(t){return $e(t)}static max(t){return qe(t)}static required(t){return ze(t)}static requiredTrue(t){return Vt(t)}static email(t){return Dt(t)}static minLength(t){return bt(t)}static maxLength(t){return At(t)}static pattern(t){return Ze(t)}static nullValidator(t){return Y()}static compose(t){return et(t)}static composeAsync(t){return tt(t)}};function $e(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function qe(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ze(n){return me(n.value)?{required:!0}:null}function Vt(n){return n.value===!0?null:{required:!0}}function Dt(n){return me(n.value)||Ct.test(n.value)?null:{email:!0}}function bt(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function At(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function Ze(n){if(!n)return Y;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Y(n){return null}function Xe(n){return n!=null}function Ye(n){return xe(n)?Fe(n):n}function Ke(n){let t={};return n.forEach(e=>{t=e!=null?h(h({},t),e):t}),Object.keys(t).length===0?null:t}function Je(n,t){return t.map(e=>e(n))}function Mt(n){return!n.validate}function Qe(n){return n.map(t=>Mt(t)?t:e=>t.validate(e))}function et(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){return Ke(Je(e,t))}}function ve(n){return n!=null?et(Qe(n)):null}function tt(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){let i=Je(e,t).map(Ye);return Se(i).pipe(Ie(Ke))}}function ye(n){return n!=null?tt(Qe(n)):null}function ke(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function nt(n){return n._rawValidators}function it(n){return n._rawAsyncValidators}function ge(n){return n?Array.isArray(n)?n:[n]:[]}function K(n,t){return Array.isArray(n)?n.includes(t):n===t}function je(n,t){let e=ge(t);return ge(n).forEach(r=>{K(e,r)||e.push(r)}),e}function Ge(n,t){return ge(t).filter(e=>!K(n,e))}var J=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},_=class extends J{name;get formDirective(){return null}get path(){return null}},v=class extends J{_parent=null;name=null;valueAccessor=null},Q=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Et={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},wn=f(h({},Et),{"[class.ng-submitted]":"isSubmitted"}),Fn=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),In=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(_,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var P="VALID",X="INVALID",F="PENDING",R="DISABLED",D=class{},ee=class extends D{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends D{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends D{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},I=class extends D{status;source;constructor(t,e){super(),this.status=t,this.source=e}},te=class extends D{source;constructor(t){super(),this.source=t}},ne=class extends D{source;constructor(t){super(),this.source=t}};function Ce(n){return(oe(n)?n.validators:n)||null}function wt(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(oe(t)?t.asyncValidators:n)||null}function Ft(n){return Array.isArray(n)?ye(n):n||null}function oe(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function rt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new $(1e3,"");if(!i[e])throw new $(1001,"")}function st(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new $(1002,"")})}var T=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=w(()=>this.statusReactive());statusReactive=M(void 0);get valid(){return this.status===P}get invalid(){return this.status===X}get pending(){return this.status==F}get disabled(){return this.status===R}get enabled(){return this.status!==R}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=w(()=>this.pristineReactive());pristineReactive=M(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=w(()=>this.touchedReactive());touchedReactive=M(!1);get untouched(){return!this.touched}_events=new we;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(je(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(je(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Ge(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}hasValidator(t){return K(this._rawValidators,t)}hasAsyncValidator(t){return K(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new I(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(f(h({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this.errors=null,this._forEachChild(r=>{r.disable(f(h({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,i)),this._events.next(new I(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this._forEachChild(i=>{i.enable(f(h({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===P||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,e)),this._events.next(new I(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(f(h({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?R:P}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Ye(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new I(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?R:this.errors?X:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(X)?X:P}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){oe(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=wt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ft(this._rawAsyncValidators)}},B=class extends T{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){st(this,!0,t),Object.keys(t).forEach(i=>{rt(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Sn=B;var S=new A("",{providedIn:"root",factory:()=>ae}),ae="always";function ot(n,t){return[...t.path,n]}function U(n,t,e=ae){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),St(n,t),Ot(n,t),Nt(n,t),It(n,t)}function ie(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function re(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function It(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=nt(n);t.validator!==null?n.setValidators(ke(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=it(n);t.asyncValidator!==null?n.setAsyncValidators(ke(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();re(t._rawValidators,r),re(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=nt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=it(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return re(t._rawValidators,i),re(t._rawAsyncValidators,i),e}function St(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&at(n,t)})}function Nt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&at(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function at(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ot(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function lt(n,t){n==null,De(n,t)}function xt(n,t){return se(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Pt(n){return Object.getPrototypeOf(n.constructor)===H}function ut(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===We?e=s:Pt(s)?i=s:r=s}),r||i||e||null}function Rt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var kt={provide:_,useExisting:d(()=>jt)},k=Promise.resolve(),jt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this.submittedReactive)}_submitted=w(()=>this.submittedReactive());submittedReactive=M(!1);_directives=new Set;form;ngSubmit=new C;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new B({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){k.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),U(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){k.then(()=>{let i=this._findContainer(e.path),r=new B({});lt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){k.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ut(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ne(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([kt]),u]})}return n})();function Te(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Be(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Me=class extends T{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),oe(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Be(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Te(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Te(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Be(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},On=Me,Gt=n=>n instanceof Me;var Tt={provide:v,useExisting:d(()=>Bt)},Ue=Promise.resolve(),Bt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new Me;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,p){super(),this._changeDetectorRef=a,this.callSetDisabledState=p,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),be(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){U(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Ue.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&he(i);Ue.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ot(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(_,9),o(y,10),o(L,10),o(b,10),o(ce,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[c([Tt]),u,E]})}return n})();var xn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ut={provide:b,useExisting:d(()=>Ht),multi:!0},Ht=(()=>{class n extends H{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Ut]),u]})}return n})();var Ee=new A(""),Lt={provide:v,useExisting:d(()=>Wt)},Wt=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ie(i,this,!1),U(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ie(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(b,10),o(Ee,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([Lt]),u,E]})}return n})(),$t={provide:_,useExisting:d(()=>qt)},qt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=w(()=>this._submittedReactive());_submittedReactive=M(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(se(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return U(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ie(e.control||null,e,!1),Rt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),ut(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new ne(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ie(i||null,e),Gt(r)&&(U(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);lt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&xt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&se(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([$t]),u,E]})}return n})();var zt={provide:v,useExisting:d(()=>Zt)},Zt=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){this._added||this._setUpControl(),be(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return ot(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(_,13),o(y,10),o(L,10),o(b,10),o(Ee,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([zt]),u,E]})}return n})();var Xt={provide:b,useExisting:d(()=>ct),multi:!0};function dt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Yt(n){return n.split(":")[0]}var ct=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=z(Pe).injector;destroyRef=z(Ne);cdr=z(ce);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Oe({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=dt(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=Yt(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Xt]),u]})}return n})(),Pn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(dt(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select&&this._select._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ct,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),Kt={provide:b,useExisting:d(()=>ht),multi:!0};function He(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Jt(n){return n.split(":")[0]}var ht=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let p=0;p<a.length;p++){let W=a[p],ue=this._getOptionValue(W.value);r.push(ue)}}else{let a=i.options;for(let p=0;p<a.length;p++){let W=a[p];if(W.selected){let ue=this._getOptionValue(W.value);r.push(ue)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Jt(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Kt]),u]})}return n})(),Rn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ht,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function ft(n){return typeof n=="number"?n:parseFloat(n)}var le=(()=>{class n{_validator=Y;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Y,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[E]})}return n})(),Qt={provide:y,useExisting:d(()=>en),multi:!0},en=(()=>{class n extends le{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>qe(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([Qt]),u]})}return n})(),tn={provide:y,useExisting:d(()=>nn),multi:!0},nn=(()=>{class n extends le{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>$e(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([tn]),u]})}return n})(),rn={provide:y,useExisting:d(()=>sn),multi:!0};var sn=(()=>{class n extends le{required;inputName="required";normalizeInput=he;createValidator=e=>ze;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&x("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([rn]),u]})}return n})();var on={provide:y,useExisting:d(()=>an),multi:!0},an=(()=>{class n extends le{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[c([on]),u]})}return n})();var gt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({})}return n})(),pe=class extends T{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){st(this,!1,t),t.forEach((i,r)=>{rt(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}},kn=pe;var jn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})(),Gn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Ee,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})();export{b as a,mt as b,We as c,Re as d,Fn as e,In as f,B as g,Sn as h,jt as i,Me as j,On as k,Bt as l,xn as m,Ht as n,Wt as o,qt as p,Zt as q,ct as r,Pn as s,Rn as t,en as u,nn as v,sn as w,an as x,kn as y,jn as z,Gn as A};
|