homebridge-config-ui-x 5.0.0-beta.2 → 5.0.0-beta.21
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 +76 -5
- package/README.md +6 -8
- package/dist/bin/fork.js +17 -7
- package/dist/bin/fork.js.map +1 -1
- package/dist/bin/hb-service.js +18 -8
- package/dist/bin/hb-service.js.map +1 -1
- package/dist/bin/standalone.js +17 -7
- package/dist/bin/standalone.js.map +1 -1
- package/dist/core/auth/auth.module.js +1 -1
- package/dist/core/auth/auth.module.js.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/modules/config-editor/config-editor.controller.d.ts +1 -1
- package/dist/modules/config-editor/config-editor.service.d.ts +1 -1
- package/dist/modules/plugins/plugins.service.js +2 -2
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/package.json +25 -21
- package/public/3rdpartylicenses.txt +632 -606
- package/public/assets/hap-icons/valve-generic.svg +2 -2
- package/public/assets/hap-icons/valve-irrigation.svg +4 -4
- package/public/assets/hap-icons/valve-showerhead.svg +13 -0
- package/public/assets/hap-icons/valve-waterfaucet.svg +7 -0
- package/public/assets/plugin-ui-utils/ui.js +38 -19
- package/public/assets/plugin-ui-utils/ui.js.map +1 -1
- package/public/chunk-2DAPKUN5.js +1 -0
- package/public/chunk-32ESUCGF.js +1 -0
- package/public/chunk-3HQDWIYS.js +1 -0
- package/public/chunk-3O26TYAX.js +1 -0
- package/public/chunk-3TJ2GE2Y.js +1 -0
- package/public/chunk-3TW227A7.js +23 -0
- package/public/chunk-3U5HE6LL.js +1 -0
- package/public/chunk-3Z6U5O5M.js +14 -0
- package/public/chunk-44XAYR34.js +1 -0
- package/public/chunk-4JS645EV.js +1 -0
- package/public/chunk-5LT65NDZ.js +1 -0
- package/public/chunk-62UMOIOG.js +1 -0
- package/public/{chunk-6QEO3BTW.js → chunk-6MDI4RNQ.js} +14 -14
- package/public/chunk-6UMPRFLK.js +1 -0
- package/public/chunk-6VXGO53S.js +1 -0
- package/public/chunk-ADKE5LJF.js +5 -0
- package/public/chunk-B5VI2Y6M.js +1 -0
- package/public/chunk-BIXO3U6C.js +1 -0
- package/public/chunk-BZVO3JIQ.js +1 -0
- package/public/chunk-C4QSWDVR.js +8 -0
- package/public/chunk-CK234OHO.js +1 -0
- package/public/chunk-CTN2DQV5.js +1 -0
- package/public/chunk-DCVY3IA2.js +1 -0
- package/public/chunk-DKO4HAIB.js +1 -0
- package/public/chunk-E5FZHVEC.js +20 -0
- package/public/chunk-EA6RKP5G.js +1 -0
- package/public/chunk-EAYDVYFZ.js +1 -0
- package/public/chunk-EFBNPDVN.js +1 -0
- package/public/chunk-EXVHFPLG.js +1 -0
- package/public/{chunk-THFLPY67.js → chunk-F4QKTMKG.js} +1 -1
- package/public/chunk-F5SS6TN7.js +5 -0
- package/public/chunk-FRTATUBX.js +1 -0
- package/public/chunk-FWQXO3EP.js +1 -0
- package/public/chunk-GMU4IJBT.js +1 -0
- package/public/chunk-H3E4T6KH.js +1 -0
- package/public/chunk-HBGENGOA.js +1 -0
- package/public/chunk-HMOW3VNR.js +1 -0
- package/public/chunk-I5SM3GCQ.js +1 -0
- package/public/chunk-IDHLJZZJ.js +1 -0
- package/public/chunk-JZGR3WU5.js +1 -0
- package/public/chunk-KDJPDALB.js +7 -0
- package/public/chunk-KFM3IHPE.js +1 -0
- package/public/chunk-KMGDOXVO.js +1 -0
- package/public/chunk-KUG6OIB5.js +1 -0
- package/public/chunk-MDOAXUID.js +1 -0
- package/public/chunk-MMPQXC6H.js +2 -0
- package/public/chunk-MVS2OMCO.js +1 -0
- package/public/chunk-MXPZGRWK.js +1 -0
- package/public/chunk-N2HZUJ5D.js +1 -0
- package/public/chunk-NBLWBPNU.js +1 -0
- package/public/chunk-NIGZKKLM.js +1 -0
- package/public/chunk-NNKBGNWL.js +1 -0
- package/public/chunk-NPPEMRCU.js +1 -0
- package/public/chunk-NQVVIP7W.js +1 -0
- package/public/chunk-O2BHQ2WA.js +1 -0
- package/public/chunk-O2KNAZ5T.js +1 -0
- package/public/chunk-OVGWWGKD.js +1 -0
- package/public/chunk-OZTQT47N.js +1 -0
- package/public/chunk-P4FORPUA.js +1 -0
- package/public/chunk-P5WCYSBI.js +8 -0
- package/public/chunk-QAG66PLL.js +1 -0
- package/public/chunk-QHHRJOCD.js +2 -0
- package/public/chunk-REILQUGC.js +1 -0
- package/public/chunk-SEGRKPCL.js +1 -0
- package/public/chunk-SZD4AWYF.js +1 -0
- package/public/chunk-SZQRABYM.js +1 -0
- package/public/{chunk-GNQUXZMN.js → chunk-T6FYP7FJ.js} +1 -1
- package/public/chunk-TFLT3S56.js +1 -0
- package/public/chunk-UC6G6EJI.js +1 -0
- package/public/chunk-UIX722MQ.js +6 -0
- package/public/chunk-VPMXTLP5.js +1 -0
- package/public/chunk-VR52TTMY.js +4 -0
- package/public/chunk-WDTCTPKS.js +1 -0
- package/public/chunk-XB3CBRQE.js +1 -0
- package/public/chunk-XK4344ZY.js +32 -0
- package/public/chunk-XKJ6VGZO.js +1 -0
- package/public/chunk-Z2EXMZJ3.js +1 -0
- package/public/chunk-Z4CHNCHA.js +1 -0
- package/public/chunk-ZA2VSVJA.js +1 -0
- package/public/chunk-ZNOZDCL3.js +1 -0
- package/public/chunk-ZQQS75SA.js +1 -0
- package/public/index.html +2 -2
- package/public/main-XV4IWRJF.js +1 -0
- package/public/media/fa-brands-400-6PJPV6JM.woff2 +0 -0
- package/public/media/{fa-brands-400-CNBICIQT.ttf → fa-brands-400-KOKGDU7E.ttf} +0 -0
- package/public/media/{fa-regular-400-2FI4ICQD.ttf → fa-regular-400-IPMAEX5Y.ttf} +0 -0
- package/public/media/fa-regular-400-OHB6J4OK.woff2 +0 -0
- package/public/media/fa-solid-900-ABTK6BNK.woff2 +0 -0
- package/public/media/{fa-solid-900-XVWCCN5V.ttf → fa-solid-900-SRFFQLRM.ttf} +0 -0
- package/public/{polyfills-CE2SNIQF.js → polyfills-C6JHVXJJ.js} +2 -2
- package/public/prerendered-routes.json +3 -0
- package/public/styles-EG5MFQEM.css +1 -0
- package/public/chunk-2ZL77L5V.js +0 -5
- package/public/chunk-36QI2JZZ.js +0 -1
- package/public/chunk-4R6MSI5I.js +0 -14
- package/public/chunk-54RIF7BL.js +0 -1
- package/public/chunk-6PFEOQAC.js +0 -1
- package/public/chunk-AA4ALV5Q.js +0 -23
- package/public/chunk-B6C32ZRK.js +0 -1
- package/public/chunk-BROUJ7PT.js +0 -1
- package/public/chunk-C4DMFK2F.js +0 -1
- package/public/chunk-CMASH2I6.js +0 -20
- package/public/chunk-D63P2BMG.js +0 -4
- package/public/chunk-E6TKCZQK.js +0 -1
- package/public/chunk-EEAGROCO.js +0 -8
- package/public/chunk-EXLYVJ3I.js +0 -1
- package/public/chunk-F22FMU37.js +0 -1
- package/public/chunk-H7H7YVXE.js +0 -1
- package/public/chunk-IGUSDGD6.js +0 -8
- package/public/chunk-JM7QCDMZ.js +0 -1
- package/public/chunk-LL4U2S7T.js +0 -20
- package/public/chunk-MMU5EB5I.js +0 -1
- package/public/chunk-MQHO5ODL.js +0 -1
- package/public/chunk-MQOC5AAT.js +0 -1
- package/public/chunk-NJRXPLIM.js +0 -1
- package/public/chunk-NLHSKWUN.js +0 -1
- package/public/chunk-PCHM6ESV.js +0 -1
- package/public/chunk-PREOLVG7.js +0 -1
- package/public/chunk-RYWTZYEC.js +0 -1
- package/public/chunk-SJTXTMYT.js +0 -2
- package/public/chunk-TBJQ2Y3M.js +0 -1
- package/public/chunk-TCMARCBB.js +0 -1
- package/public/chunk-UBGLUD5C.js +0 -20
- package/public/chunk-V7NUKNPP.js +0 -1
- package/public/chunk-W5QNZH4U.js +0 -1
- package/public/chunk-WCDFKYP6.js +0 -5
- package/public/chunk-YXVNS6GA.js +0 -1
- package/public/main-EIMWK4RL.js +0 -6
- package/public/media/fa-brands-400-MDS4TU4L.woff2 +0 -0
- package/public/media/fa-regular-400-N56QV3DR.woff2 +0 -0
- package/public/media/fa-solid-900-Z3HFQTXF.woff2 +0 -0
- package/public/styles-7ETWN6DQ.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as X}from"./chunk-SEGRKPCL.js";import{n as Q}from"./chunk-F5SS6TN7.js";import{c as D,d as C,e as G,f as j,g as H,j as F,m as A,p as q,q as L,y as K,z as J}from"./chunk-Z4CHNCHA.js";import{e as N}from"./chunk-HMOW3VNR.js";import{c as W}from"./chunk-SZD4AWYF.js";import{b as R}from"./chunk-DKO4HAIB.js";import{a as z,b as B,j as O}from"./chunk-4JS645EV.js";import{l as M}from"./chunk-QHHRJOCD.js";import{a as P,b as V}from"./chunk-H3E4T6KH.js";import{$b as y,Bb as I,Bc as s,Cc as l,Mb as _,Rb as f,Wb as i,Xb as o,Yb as c,ad as E,cc as b,dc as m,h as w,ib as t,na as g,nc as a,oc as d,pc as v,ub as T,w as S,xa as x,xc as $,ya as h,yc as k}from"./chunk-KDJPDALB.js";var U=(n,u)=>({"is-valid":n,"is-invalid":u}),Z=n=>({"button-loading":n});function ee(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",3),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"button",5),b("click",function(){x(e);let p=m();return h(p.onClickGettingStarted())}),a(6),s(7,"translate"),o(),i(8,"small",6)(9,"a",7),b("click",function(){x(e);let p=m();return h(p.onClickRestoreBackup())}),a(10),s(11,"translate"),o()()()}n&2&&(t(3),d(l(4,3,"setup.welcome_to_homebridge")),t(3),v(" ",l(7,5,"setup.button_get_started")," "),t(4),d(l(11,7,"setup_wizard_message_restore")))}function te(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"div",9)(6,"p"),a(7),s(8,"translate"),o(),i(9,"form",10),b("ngSubmit",function(){x(e);let p=m();return h(p.createFirstUser())}),i(10,"div",11),c(11,"i",12)(12,"input",13),i(13,"label",14),a(14),s(15,"translate"),o()(),i(16,"div",11),c(17,"i",15)(18,"input",16),i(19,"label",17),a(20),s(21,"translate"),o()(),i(22,"div",11),c(23,"i",15)(24,"input",18),i(25,"label",19),a(26),s(27,"translate"),o()(),i(28,"div",20)(29,"button",21),a(30),s(31,"translate"),c(32,"i",22),o()()()()()}if(n&2){let e=m();t(3),d(l(4,15,"setup.create_account")),t(4),d(l(8,17,"setup.create_account_reason")),t(2),_("formGroup",e.createUserForm),t(3),_("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),t(2),d(l(15,19,"users.label_username")),t(4),_("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),t(2),d(l(21,21,"users.label_password")),t(4),_("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),t(2),d(l(27,23,"users.label_confirm_password")),t(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),t(),v(" ",l(31,25,"setup.create_account")," ")}}function ie(n,u){n&1&&(i(0,"span"),c(1,"i",29),a(2),s(3,"translate"),o()),n&2&&(t(2),v(" ",l(3,1,"backup.label_uploading")," "))}function ne(n,u){n&1&&(i(0,"span"),a(1),s(2,"translate"),o()),n&2&&(t(),d(l(2,1,"backup.button_restore_backup")))}function oe(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"p"),a(6),s(7,"translate"),o(),i(8,"div",23)(9,"input",24),b("change",function(p){x(e);let Y=m();return h(Y.handleRestoreFileInput(p.target.files))}),o(),i(10,"label",25),a(11),s(12,"translate"),o()(),i(13,"div",26)(14,"button",27),b("click",function(){x(e);let p=m();return h(p.onClickCancelRestore())}),a(15),s(16,"translate"),o(),i(17,"button",28),b("click",function(){x(e);let p=m();return h(p.onRestoreBackupClick())}),I(18,ie,4,3,"span")(19,ne,3,3,"span"),o()()()}if(n&2){let e=m();t(3),d(l(4,8,"form.button_restore")),t(3),d(l(7,10,"backup.restore_help_one")),t(5),v(" ",l(12,12,(e.selectedFile==null?null:e.selectedFile.name)||"backup.label_choose_backup_file_to_restore")," "),t(3),_("disabled",e.restoreUploadStarted),t(),v(" ",l(16,14,"form.button_cancel")," "),t(2),_("disabled",e.restoreUploading||!e.selectedFile),t(),f(e.restoreUploading?18:-1),t(),f(e.restoreUploading?-1:19)}}function re(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"h1"),c(6,"i",29),o()()),n&2&&(t(3),d(l(4,1,"restart.title_restart")))}function ae(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",30),a(3),s(4,"translate"),o(),i(5,"p",31),a(6),s(7,"translate"),o(),i(8,"a",32),a(9),s(10,"translate"),o()()),n&2&&(t(3),d(l(4,3,"setup_wizard_message_complete_title")),t(3),d(l(7,5,"setup_wizard_message_complete_message")),t(3),d(l(10,7,"setup.open_dashboard")))}var ye=(()=>{class n{$api=g(B);$auth=g(W);$modal=g(Q);$settings=g(R);$title=g(M);$toastr=g(O);$translate=g(P);previousTitle;step="welcome";createUserForm=new H({username:new F("",[C.required]),password:new F("",[C.compose([C.required,C.minLength(4)])]),passwordConfirm:new F("",[C.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,p=e.get("passwordConfirm").value;if(r!==p)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>w(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return w(this,null,function*(){try{let e=yield S(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(z.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield S(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return w(this,null,function*(){this.step="restarting",window.localStorage.removeItem(z.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>w(this,null,function*(){try{yield S(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=T({type:n,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-username"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass-confirm"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],[1,"custom-file"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"custom-file-input",3,"change"],["for","restoreFileUpload",1,"custom-file-label"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ml-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","mr-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,p){r&1&&(i(0,"div",0)(1,"div",1),I(2,ee,12,9,"div",2)(3,te,33,38,"div",2)(4,oe,20,16,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(t(2),f(p.step==="welcome"?2:-1),t(),f(p.step==="create-account"?3:-1),t(),f(p.step==="restore-backup"?4:-1),t(),f(p.step==="restarting"?5:-1),t(),f(p.step==="setup-complete"?6:-1))},dependencies:[K,A,D,G,j,J,q,L,E,N,V],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return n})();export{ye as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{Yb as Ut,e as d,g as He,h as Lt,kc as Dt,lc as Ft,rb as _t,ub as xt,wa as qt}from"./chunk-KDJPDALB.js";var zt=d((Dn,kt)=>{kt.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var I=d(P=>{var st,Ve=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};P.getSymbolTotalCodewords=function(t){return Ve[t]};P.getBCHDigit=function(n){let t=0;for(;n!==0;)t++,n>>>=1;return t};P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');st=t};P.isKanjiModeEnabled=function(){return typeof st<"u"};P.toSJIS=function(t){return st(t)}});var Q=d(w=>{w.L={bit:1};w.M={bit:0};w.Q={bit:3};w.H={bit:2};function Ke(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return w.L;case"m":case"medium":return w.M;case"q":case"quartile":return w.Q;case"h":case"high":return w.H;default:throw new Error("Unknown EC Level: "+n)}}w.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};w.from=function(t,e){if(w.isValid(t))return t;try{return Ke(t)}catch{return e}}});var Kt=d((zn,Vt)=>{function Ht(){this.buffer=[],this.length=0}Ht.prototype={get:function(n){let t=Math.floor(n/8);return(this.buffer[t]>>>7-n%8&1)===1},put:function(n,t){for(let e=0;e<t;e++)this.putBit((n>>>t-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),n&&(this.buffer[t]|=128>>>this.length%8),this.length++}};Vt.exports=Ht});var Ot=d((Hn,Jt)=>{function k(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}k.prototype.set=function(n,t,e,r){let o=n*this.size+t;this.data[o]=e,r&&(this.reservedBit[o]=!0)};k.prototype.get=function(n,t){return this.data[n*this.size+t]};k.prototype.xor=function(n,t,e){this.data[n*this.size+t]^=e};k.prototype.isReserved=function(n,t){return this.reservedBit[n*this.size+t]};Jt.exports=k});var Yt=d(j=>{var Je=I().getSymbolSize;j.getRowColCoords=function(t){if(t===1)return[];let e=Math.floor(t/7)+2,r=Je(t),o=r===145?26:Math.ceil((r-13)/(2*e-2))*2,i=[r-7];for(let s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()};j.getPositions=function(t){let e=[],r=j.getRowColCoords(t),o=r.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i===0&&s===0||i===0&&s===o-1||i===o-1&&s===0||e.push([r[i],r[s]]);return e}});var vt=d(jt=>{var Oe=I().getSymbolSize,Qt=7;jt.getPositions=function(t){let e=Oe(t);return[[0,0],[e-Qt,0],[0,e-Qt]]}});var Gt=d(g=>{g.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var b={N1:3,N2:3,N3:40,N4:10};g.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};g.from=function(t){return g.isValid(t)?parseInt(t,10):void 0};g.getPenaltyN1=function(t){let e=t.size,r=0,o=0,i=0,s=null,u=null;for(let c=0;c<e;c++){o=i=0,s=u=null;for(let l=0;l<e;l++){let a=t.get(c,l);a===s?o++:(o>=5&&(r+=b.N1+(o-5)),s=a,o=1),a=t.get(l,c),a===u?i++:(i>=5&&(r+=b.N1+(i-5)),u=a,i=1)}o>=5&&(r+=b.N1+(o-5)),i>=5&&(r+=b.N1+(i-5))}return r};g.getPenaltyN2=function(t){let e=t.size,r=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){let s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);(s===4||s===0)&&r++}return r*b.N2};g.getPenaltyN3=function(t){let e=t.size,r=0,o=0,i=0;for(let s=0;s<e;s++){o=i=0;for(let u=0;u<e;u++)o=o<<1&2047|t.get(s,u),u>=10&&(o===1488||o===93)&&r++,i=i<<1&2047|t.get(u,s),u>=10&&(i===1488||i===93)&&r++}return r*b.N3};g.getPenaltyN4=function(t){let e=0,r=t.data.length;for(let i=0;i<r;i++)e+=t.data[i];return Math.abs(Math.ceil(e*100/r/5)-10)*b.N4};function Ye(n,t,e){switch(n){case g.Patterns.PATTERN000:return(t+e)%2===0;case g.Patterns.PATTERN001:return t%2===0;case g.Patterns.PATTERN010:return e%3===0;case g.Patterns.PATTERN011:return(t+e)%3===0;case g.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2===0;case g.Patterns.PATTERN101:return t*e%2+t*e%3===0;case g.Patterns.PATTERN110:return(t*e%2+t*e%3)%2===0;case g.Patterns.PATTERN111:return(t*e%3+(t+e)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}g.applyMask=function(t,e){let r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,Ye(t,i,o))};g.getBestMask=function(t,e){let r=Object.keys(g.Patterns).length,o=0,i=1/0;for(let s=0;s<r;s++){e(s),g.applyMask(s,t);let u=g.getPenaltyN1(t)+g.getPenaltyN2(t)+g.getPenaltyN3(t)+g.getPenaltyN4(t);g.applyMask(s,t),u<i&&(i=u,o=s)}return o}});var ct=d(ut=>{var N=Q(),v=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],G=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ut.getBlocksCount=function(t,e){switch(e){case N.L:return v[(t-1)*4+0];case N.M:return v[(t-1)*4+1];case N.Q:return v[(t-1)*4+2];case N.H:return v[(t-1)*4+3];default:return}};ut.getTotalCodewordsCount=function(t,e){switch(e){case N.L:return G[(t-1)*4+0];case N.M:return G[(t-1)*4+1];case N.Q:return G[(t-1)*4+2];case N.H:return G[(t-1)*4+3];default:return}}});var $t=d(W=>{var z=new Uint8Array(512),$=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)z[e]=t,$[t]=e,t<<=1,t&256&&(t^=285);for(let e=255;e<512;e++)z[e]=z[e-255]})();W.log=function(t){if(t<1)throw new Error("log("+t+")");return $[t]};W.exp=function(t){return z[t]};W.mul=function(t,e){return t===0||e===0?0:z[$[t]+$[e]]}});var Wt=d(H=>{var lt=$t();H.mul=function(t,e){let r=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)r[o+i]^=lt.mul(t[o],e[i]);return r};H.mod=function(t,e){let r=new Uint8Array(t);for(;r.length-e.length>=0;){let o=r[0];for(let s=0;s<e.length;s++)r[s]^=lt.mul(e[s],o);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r};H.generateECPolynomial=function(t){let e=new Uint8Array([1]);for(let r=0;r<t;r++)e=H.mul(e,new Uint8Array([1,lt.exp(r)]));return e}});var te=d((jn,Xt)=>{var Zt=Wt();function at(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}at.prototype.initialize=function(t){this.degree=t,this.genPoly=Zt.generateECPolynomial(this.degree)};at.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(t.length+this.degree);e.set(t);let r=Zt.mod(e,this.genPoly),o=this.degree-r.length;if(o>0){let i=new Uint8Array(this.degree);return i.set(r,o),i}return r};Xt.exports=at});var ft=d(ee=>{ee.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var dt=d(B=>{var ne="[0-9]+",Qe="[A-Z $%*+\\-./:]+",V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");var je="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r
|
|
2
|
+
]))+`;B.KANJI=new RegExp(V,"g");B.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");B.BYTE=new RegExp(je,"g");B.NUMERIC=new RegExp(ne,"g");B.ALPHANUMERIC=new RegExp(Qe,"g");var ve=new RegExp("^"+V+"$"),Ge=new RegExp("^"+ne+"$"),$e=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");B.testKanji=function(t){return ve.test(t)};B.testNumeric=function(t){return Ge.test(t)};B.testAlphanumeric=function(t){return $e.test(t)}});var M=d(p=>{var We=ft(),gt=dt();p.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};p.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};p.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};p.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};p.MIXED={bit:-1};p.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!We.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]};p.getBestModeForData=function(t){return gt.testNumeric(t)?p.NUMERIC:gt.testAlphanumeric(t)?p.ALPHANUMERIC:gt.testKanji(t)?p.KANJI:p.BYTE};p.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};p.isValid=function(t){return t&&t.bit&&t.ccBits};function Ze(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return p.NUMERIC;case"alphanumeric":return p.ALPHANUMERIC;case"kanji":return p.KANJI;case"byte":return p.BYTE;default:throw new Error("Unknown mode: "+n)}}p.from=function(t,e){if(p.isValid(t))return t;try{return Ze(t)}catch{return e}}});var ue=d(R=>{var Z=I(),Xe=ct(),re=Q(),S=M(),ht=ft(),ie=7973,oe=Z.getBCHDigit(ie);function tn(n,t,e){for(let r=1;r<=40;r++)if(t<=R.getCapacity(r,e,n))return r}function se(n,t){return S.getCharCountIndicator(n,t)+4}function en(n,t){let e=0;return n.forEach(function(r){let o=se(r.mode,t);e+=o+r.getBitsLength()}),e}function nn(n,t){for(let e=1;e<=40;e++)if(en(n,e)<=R.getCapacity(e,t,S.MIXED))return e}R.from=function(t,e){return ht.isValid(t)?parseInt(t,10):e};R.getCapacity=function(t,e,r){if(!ht.isValid(t))throw new Error("Invalid QR Code version");typeof r>"u"&&(r=S.BYTE);let o=Z.getSymbolTotalCodewords(t),i=Xe.getTotalCodewordsCount(t,e),s=(o-i)*8;if(r===S.MIXED)return s;let u=s-se(r,t);switch(r){case S.NUMERIC:return Math.floor(u/10*3);case S.ALPHANUMERIC:return Math.floor(u/11*2);case S.KANJI:return Math.floor(u/13);case S.BYTE:default:return Math.floor(u/8)}};R.getBestVersionForData=function(t,e){let r,o=re.from(e,re.M);if(Array.isArray(t)){if(t.length>1)return nn(t,o);if(t.length===0)return 1;r=t[0]}else r=t;return tn(r.mode,r.getLength(),o)};R.getEncodedBits=function(t){if(!ht.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;Z.getBCHDigit(e)-oe>=0;)e^=ie<<Z.getBCHDigit(e)-oe;return t<<12|e}});var fe=d(ae=>{var pt=I(),le=1335,rn=21522,ce=pt.getBCHDigit(le);ae.getEncodedBits=function(t,e){let r=t.bit<<3|e,o=r<<10;for(;pt.getBCHDigit(o)-ce>=0;)o^=le<<pt.getBCHDigit(o)-ce;return(r<<10|o)^rn}});var ge=d((Xn,de)=>{var on=M();function _(n){this.mode=on.NUMERIC,this.data=n.toString()}_.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};_.prototype.getLength=function(){return this.data.length};_.prototype.getBitsLength=function(){return _.getBitsLength(this.data.length)};_.prototype.write=function(t){let e,r,o;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),o=parseInt(r,10),t.put(o,10);let i=this.data.length-e;i>0&&(r=this.data.substr(e),o=parseInt(r,10),t.put(o,i*3+1))};de.exports=_});var pe=d((tr,he)=>{var sn=M(),mt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(n){this.mode=sn.ALPHANUMERIC,this.data=n}x.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};x.prototype.getLength=function(){return this.data.length};x.prototype.getBitsLength=function(){return x.getBitsLength(this.data.length)};x.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let r=mt.indexOf(this.data[e])*45;r+=mt.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(mt.indexOf(this.data[e]),6)};he.exports=x});var we=d((er,me)=>{var un=M();function U(n){this.mode=un.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}U.getBitsLength=function(t){return t*8};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(n){for(let t=0,e=this.data.length;t<e;t++)n.put(this.data[t],8)};me.exports=U});var Ee=d((nr,ye)=>{var cn=M(),ln=I();function D(n){this.mode=cn.KANJI,this.data=n}D.getBitsLength=function(t){return t*13};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(n){let t;for(t=0;t<this.data.length;t++){let e=ln.toSJIS(this.data[t]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
3
|
+
Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}};ye.exports=D});var Ce=d((rr,wt)=>{"use strict";var K={single_source_shortest_paths:function(n,t,e){var r={},o={};o[t]=0;var i=K.PriorityQueue.make();i.push(t,0);for(var s,u,c,l,a,m,h,y,A;!i.empty();){s=i.pop(),u=s.value,l=s.cost,a=n[u]||{};for(c in a)a.hasOwnProperty(c)&&(m=a[c],h=l+m,y=o[c],A=typeof o[c]>"u",(A||y>h)&&(o[c]=h,i.push(c,h),r[c]=u))}if(typeof e<"u"&&typeof o[e]>"u"){var T=["Could not find a path from ",t," to ",e,"."].join("");throw new Error(T)}return r},extract_shortest_path_from_predecessor_list:function(n,t){for(var e=[],r=t,o;r;)e.push(r),o=n[r],r=n[r];return e.reverse(),e},find_path:function(n,t,e){var r=K.single_source_shortest_paths(n,t,e);return K.extract_shortest_path_from_predecessor_list(r,e)},PriorityQueue:{make:function(n){var t=K.PriorityQueue,e={},r;n=n||{};for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e.queue=[],e.sorter=n.sorter||t.default_sorter,e},default_sorter:function(n,t){return n.cost-t.cost},push:function(n,t){var e={value:n,cost:t};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof wt<"u"&&(wt.exports=K)});var Pe=d(F=>{var f=M(),Te=ge(),Ie=pe(),Ne=we(),Me=Ee(),J=dt(),X=I(),an=Ce();function Be(n){return unescape(encodeURIComponent(n)).length}function O(n,t,e){let r=[],o;for(;(o=n.exec(e))!==null;)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function Se(n){let t=O(J.NUMERIC,f.NUMERIC,n),e=O(J.ALPHANUMERIC,f.ALPHANUMERIC,n),r,o;return X.isKanjiModeEnabled()?(r=O(J.BYTE,f.BYTE,n),o=O(J.KANJI,f.KANJI,n)):(r=O(J.BYTE_KANJI,f.BYTE,n),o=[]),t.concat(e,r,o).sort(function(s,u){return s.index-u.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function yt(n,t){switch(t){case f.NUMERIC:return Te.getBitsLength(n);case f.ALPHANUMERIC:return Ie.getBitsLength(n);case f.KANJI:return Me.getBitsLength(n);case f.BYTE:return Ne.getBitsLength(n)}}function fn(n){return n.reduce(function(t,e){let r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}function dn(n){let t=[];for(let e=0;e<n.length;e++){let r=n[e];switch(r.mode){case f.NUMERIC:t.push([r,{data:r.data,mode:f.ALPHANUMERIC,length:r.length},{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.ALPHANUMERIC:t.push([r,{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.KANJI:t.push([r,{data:r.data,mode:f.BYTE,length:Be(r.data)}]);break;case f.BYTE:t.push([{data:r.data,mode:f.BYTE,length:Be(r.data)}])}}return t}function gn(n,t){let e={},r={start:{}},o=["start"];for(let i=0;i<n.length;i++){let s=n[i],u=[];for(let c=0;c<s.length;c++){let l=s[c],a=""+i+c;u.push(a),e[a]={node:l,lastCount:0},r[a]={};for(let m=0;m<o.length;m++){let h=o[m];e[h]&&e[h].node.mode===l.mode?(r[h][a]=yt(e[h].lastCount+l.length,l.mode)-yt(e[h].lastCount,l.mode),e[h].lastCount+=l.length):(e[h]&&(e[h].lastCount=l.length),r[h][a]=yt(l.length,l.mode)+4+f.getCharCountIndicator(l.mode,t))}}o=u}for(let i=0;i<o.length;i++)r[o[i]].end=0;return{map:r,table:e}}function Ae(n,t){let e,r=f.getBestModeForData(n);if(e=f.from(t,r),e!==f.BYTE&&e.bit<r.bit)throw new Error('"'+n+'" cannot be encoded with mode '+f.toString(e)+`.
|
|
4
|
+
Suggested mode is: `+f.toString(r));switch(e===f.KANJI&&!X.isKanjiModeEnabled()&&(e=f.BYTE),e){case f.NUMERIC:return new Te(n);case f.ALPHANUMERIC:return new Ie(n);case f.KANJI:return new Me(n);case f.BYTE:return new Ne(n)}}F.fromArray=function(t){return t.reduce(function(e,r){return typeof r=="string"?e.push(Ae(r,null)):r.data&&e.push(Ae(r.data,r.mode)),e},[])};F.fromString=function(t,e){let r=Se(t,X.isKanjiModeEnabled()),o=dn(r),i=gn(o,e),s=an.find_path(i.map,"start","end"),u=[];for(let c=1;c<s.length-1;c++)u.push(i.table[s[c]].node);return F.fromArray(fn(u))};F.rawSplit=function(t){return F.fromArray(Se(t,X.isKanjiModeEnabled()))}});var Re=d(be=>{var et=I(),Et=Q(),hn=Kt(),pn=Ot(),mn=Yt(),wn=vt(),At=Gt(),Tt=ct(),yn=te(),tt=ue(),En=fe(),Cn=M(),Ct=Pe();function Bn(n,t){let e=n.size,r=wn.getPositions(t);for(let o=0;o<r.length;o++){let i=r[o][0],s=r[o][1];for(let u=-1;u<=7;u++)if(!(i+u<=-1||e<=i+u))for(let c=-1;c<=7;c++)s+c<=-1||e<=s+c||(u>=0&&u<=6&&(c===0||c===6)||c>=0&&c<=6&&(u===0||u===6)||u>=2&&u<=4&&c>=2&&c<=4?n.set(i+u,s+c,!0,!0):n.set(i+u,s+c,!1,!0))}}function An(n){let t=n.size;for(let e=8;e<t-8;e++){let r=e%2===0;n.set(e,6,r,!0),n.set(6,e,r,!0)}}function Tn(n,t){let e=mn.getPositions(t);for(let r=0;r<e.length;r++){let o=e[r][0],i=e[r][1];for(let s=-2;s<=2;s++)for(let u=-2;u<=2;u++)s===-2||s===2||u===-2||u===2||s===0&&u===0?n.set(o+s,i+u,!0,!0):n.set(o+s,i+u,!1,!0)}}function In(n,t){let e=n.size,r=tt.getEncodedBits(t),o,i,s;for(let u=0;u<18;u++)o=Math.floor(u/3),i=u%3+e-8-3,s=(r>>u&1)===1,n.set(o,i,s,!0),n.set(i,o,s,!0)}function Bt(n,t,e){let r=n.size,o=En.getEncodedBits(t,e),i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?n.set(i,8,s,!0):i<8?n.set(i+1,8,s,!0):n.set(r-15+i,8,s,!0),i<8?n.set(8,r-i-1,s,!0):i<9?n.set(8,15-i-1+1,s,!0):n.set(8,15-i-1,s,!0);n.set(r-8,8,1,!0)}function Nn(n,t){let e=n.size,r=-1,o=e-1,i=7,s=0;for(let u=e-1;u>0;u-=2)for(u===6&&u--;;){for(let c=0;c<2;c++)if(!n.isReserved(o,u-c)){let l=!1;s<t.length&&(l=(t[s]>>>i&1)===1),n.set(o,u-c,l),i--,i===-1&&(s++,i=7)}if(o+=r,o<0||e<=o){o-=r,r=-r;break}}}function Mn(n,t,e){let r=new hn;e.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),Cn.getCharCountIndicator(c.mode,n)),c.write(r)});let o=et.getSymbolTotalCodewords(n),i=Tt.getTotalCodewordsCount(n,t),s=(o-i)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);let u=(s-r.getLengthInBits())/8;for(let c=0;c<u;c++)r.put(c%2?17:236,8);return Sn(r,n,t)}function Sn(n,t,e){let r=et.getSymbolTotalCodewords(t),o=Tt.getTotalCodewordsCount(t,e),i=r-o,s=Tt.getBlocksCount(t,e),u=r%s,c=s-u,l=Math.floor(r/s),a=Math.floor(i/s),m=a+1,h=l-a,y=new yn(h),A=0,T=new Array(s),bt=new Array(s),rt=0,ze=new Uint8Array(n.buffer);for(let q=0;q<s;q++){let it=q<c?a:m;T[q]=ze.slice(A,A+it),bt[q]=y.encode(T[q]),A+=it,rt=Math.max(rt,it)}let ot=new Uint8Array(r),Rt=0,E,C;for(E=0;E<rt;E++)for(C=0;C<s;C++)E<T[C].length&&(ot[Rt++]=T[C][E]);for(E=0;E<h;E++)for(C=0;C<s;C++)ot[Rt++]=bt[C][E];return ot}function Pn(n,t,e,r){let o;if(Array.isArray(n))o=Ct.fromArray(n);else if(typeof n=="string"){let l=t;if(!l){let a=Ct.rawSplit(n);l=tt.getBestVersionForData(a,e)}o=Ct.fromString(n,l||40)}else throw new Error("Invalid data");let i=tt.getBestVersionForData(o,e);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(`
|
|
5
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
6
|
+
Minimum version required to store current data is: `+i+`.
|
|
7
|
+
`);let s=Mn(t,e,o),u=et.getSymbolSize(t),c=new pn(u);return Bn(c,t),An(c),Tn(c,t),Bt(c,e,0),t>=7&&In(c,t),Nn(c,s),isNaN(r)&&(r=At.getBestMask(c,Bt.bind(null,c,e))),At.applyMask(r,c),Bt(c,e,r),{modules:c,version:t,errorCorrectionLevel:e,maskPattern:r,segments:o}}be.create=function(t,e){if(typeof t>"u"||t==="")throw new Error("No input text");let r=Et.M,o,i;return typeof e<"u"&&(r=Et.from(e.errorCorrectionLevel,Et.M),o=tt.from(e.version),i=At.from(e.maskPattern),e.toSJISFunc&&et.setToSJISFunction(e.toSJISFunc)),Pn(t,o,r,i)}});var It=d(L=>{function Le(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let t=n.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+n);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(r){return[r,r]}))),t.length===6&&t.push("F","F");let e=parseInt(t.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+t.slice(0,6).join("")}}L.getOptions=function(t){t||(t={}),t.color||(t.color={});let e=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:Le(t.color.dark||"#000000ff"),light:Le(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};L.getScale=function(t,e){return e.width&&e.width>=t+e.margin*2?e.width/(t+e.margin*2):e.scale};L.getImageWidth=function(t,e){let r=L.getScale(t,e);return Math.floor((t+e.margin*2)*r)};L.qrToImageData=function(t,e,r){let o=e.modules.size,i=e.modules.data,s=L.getScale(o,r),u=Math.floor((o+r.margin*2)*s),c=r.margin*s,l=[r.color.light,r.color.dark];for(let a=0;a<u;a++)for(let m=0;m<u;m++){let h=(a*u+m)*4,y=r.color.light;if(a>=c&&m>=c&&a<u-c&&m<u-c){let A=Math.floor((a-c)/s),T=Math.floor((m-c)/s);y=l[i[A*o+T]?1:0]}t[h++]=y.r,t[h++]=y.g,t[h++]=y.b,t[h]=y.a}}});var qe=d(nt=>{var Nt=It();function bn(n,t,e){n.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=e,t.width=e,t.style.height=e+"px",t.style.width=e+"px"}function Rn(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}nt.render=function(t,e,r){let o=r,i=e;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),e||(i=Rn()),o=Nt.getOptions(o);let s=Nt.getImageWidth(t.modules.size,o),u=i.getContext("2d"),c=u.createImageData(s,s);return Nt.qrToImageData(c.data,t,o),bn(u,i,s),u.putImageData(c,0,0),i};nt.renderToDataURL=function(t,e,r){let o=r;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),o||(o={});let i=nt.render(t,e,o),s=o.type||"image/png",u=o.rendererOpts||{};return i.toDataURL(s,u.quality)}});var Ue=d(xe=>{var Ln=It();function _e(n,t){let e=n.a/255,r=t+'="'+n.hex+'"';return e<1?r+" "+t+'-opacity="'+e.toFixed(2).slice(1)+'"':r}function Mt(n,t,e){let r=n+t;return typeof e<"u"&&(r+=" "+e),r}function qn(n,t,e){let r="",o=0,i=!1,s=0;for(let u=0;u<n.length;u++){let c=Math.floor(u%t),l=Math.floor(u/t);!c&&!i&&(i=!0),n[u]?(s++,u>0&&c>0&&n[u-1]||(r+=i?Mt("M",c+e,.5+l+e):Mt("m",o,0),o=0,i=!1),c+1<t&&n[u+1]||(r+=Mt("h",s),s=0)):o++}return r}xe.render=function(t,e,r){let o=Ln.getOptions(e),i=t.modules.size,s=t.modules.data,u=i+o.margin*2,c=o.color.light.a?"<path "+_e(o.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",l="<path "+_e(o.color.dark,"stroke")+' d="'+qn(s,i,o.margin)+'"/>',a='viewBox="0 0 '+u+" "+u+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+a+' shape-rendering="crispEdges">'+c+l+`</svg>
|
|
8
|
+
`;return typeof r=="function"&&r(null,h),h}});var Fe=d(Y=>{var _n=zt(),St=Re(),De=qe(),xn=Ue();function Pt(n,t,e,r,o){let i=[].slice.call(arguments,1),s=i.length,u=typeof i[s-1]=="function";if(!u&&!_n())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(o=e,e=t,t=r=void 0):s===3&&(t.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=e,e=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(e=t,t=r=void 0):s===2&&!t.getContext&&(r=e,e=t,t=void 0),new Promise(function(c,l){try{let a=St.create(e,r);c(n(a,t,r))}catch(a){l(a)}})}try{let c=St.create(e,r);o(null,n(c,t,r))}catch(c){o(c)}}Y.create=St.create;Y.toCanvas=Pt.bind(null,De.render);Y.toDataURL=Pt.bind(null,De.renderToDataURL);Y.toString=Pt.bind(null,function(n,t,e){return xn.render(n,e)})});var ke=He(Fe(),1);var Un=["qrcode"],hr=(()=>{class n{data;qrcodeElement=_t("qrcode");ngOnChanges(){this.renderQrCode()}renderQrCode(){return Lt(this,null,function*(){if(this.data){let e=this.qrcodeElement();e.nativeElement.innerHTML=yield(0,ke.toString)(this.data,{type:"svg",margin:0,color:{light:"#ffffff00",dark:document.body.classList.contains("dark-mode")?"#FFF":"#000"}}),e.nativeElement.querySelector("svg").querySelector("path").classList.add("qr-code-theme-color")}})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=xt({type:n,selectors:[["app-qrcode"]],viewQuery:function(r,o){r&1&&Dt(o.qrcodeElement,Un,5),r&2&&Ft()},inputs:{data:"data"},features:[qt],decls:2,vars:0,consts:[["qrcode",""],[2,"width","100%","height","100%"]],template:function(r,o){r&1&&Ut(0,"div",1,0)},encapsulation:2})}return n})();export{hr as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h}from"./chunk-ADKE5LJF.js";import{b}from"./chunk-H3E4T6KH.js";import{Bc as y,Cc as T,Wb as r,Xb as o,Yb as p,cc as u,gb as l,ib as s,kc as f,lc as v,n as m,na as a,nc as g,oc as w,rb as d,ub as c}from"./chunk-KDJPDALB.js";var C=["terminaloutput"],k=(()=>{class t{$terminal=a(h);termTarget=d("terminaloutput");resizeEvent=new m;onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent),this.$terminal.term.focus()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$terminal.destroyTerminal()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=c({type:t,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&f(n.termTarget,C,5),e&2&&v()},hostBindings:function(e,n){e&1&&u("resize",function(x){return n.onWindowResize(x)},!1,l)},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){e&1&&(r(0,"div",1)(1,"div",2)(2,"h3",3),g(3),y(4,"translate"),o()()(),r(5,"div",4),p(6,"div",5,0),o()),e&2&&(s(3),w(T(4,1,"menu.linux.label_terminal")))},dependencies:[b],encapsulation:2})}return t})();export{k as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$a as tt,$c as ee,Db as ot,Ea as Ee,Eb as q,Fb as Q,Ga as M,Gb as Me,H as $e,Ha as Te,Ic as it,Jc as at,Ka as Ye,L as Xe,La as we,Ma as Ke,Na as N,Pa as Re,Pc as H,Qc as ct,Rc as lt,Sc as R,T as ye,Ua as V,Va as L,Wa as x,Xa as qe,Ya as Qe,Za as He,_a as et,a as B,aa as Ge,ab as nt,b as ze,bb as rt,cb as S,ea as b,fa as D,h as fe,ha as v,hb as $,ia as ge,k as pe,ka as w,ma as d,md as dt,na as T,nb as st,nd as ut,pd as te,q as Ve,qa as ve,r as me,rd as ne,sa as Je,ta as Ze,ua as We,vb as be,x as z}from"./chunk-KDJPDALB.js";var G=class{},se=class{},A=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 s=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(s,o)}})}: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 s=(t.op==="a"?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>o.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(o=>o.toString()),s=t.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(t,s)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var De=class{encodeKey(t){return ht(t)}encodeValue(t){return ht(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Ft(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let o=s.indexOf("="),[i,c]=o==-1?[t.decodeKey(s),""]:[t.decodeKey(s.slice(0,o)),t.decodeValue(s.slice(o+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var Bt=/%(\d[a-f0-9])/gi,zt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ht(r){return encodeURIComponent(r).replace(Bt,(t,e)=>{var n;return(n=zt[e])!=null?n:t})}function re(r){return`${r}`}var I=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new De,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Ft(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],s=Array.isArray(n)?n.map(re):[re(n)];this.map.set(e,s)})):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 s=t[n];Array.isArray(s)?s.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:s,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(re(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],s=n.indexOf(re(t.value));s!==-1&&n.splice(s,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 Oe=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 Vt(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ft(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function pt(r){return typeof Blob<"u"&&r instanceof Blob}function mt(r){return typeof FormData<"u"&&r instanceof FormData}function $t(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var X=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,e,n,s){var i,c;this.url=e,this.method=t.toUpperCase();let o;if(Vt(this.method)||s?(this.body=n!==void 0?n:null,o=s):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),(i=this.headers)!=null||(this.headers=new A),(c=this.context)!=null||(this.context=new Oe),!this.params)this.params=new I,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let l=e.indexOf("?"),p=l===-1?"?":l<e.length-1?"&":"";this.urlWithParams=e+p+a}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ft(this.body)||pt(this.body)||mt(this.body)||$t(this.body)?this.body:this.body instanceof I?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||mt(this.body)?null:pt(this.body)?this.body.type||null:ft(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof I?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(t={}){var y,g,_,u;let e=t.method||this.method,n=t.url||this.url,s=t.responseType||this.responseType,o=(y=t.transferCache)!=null?y:this.transferCache,i=t.body!==void 0?t.body:this.body,c=(g=t.withCredentials)!=null?g:this.withCredentials,a=(_=t.reportProgress)!=null?_:this.reportProgress,l=t.headers||this.headers,p=t.params||this.params,m=(u=t.context)!=null?u:this.context;return t.setHeaders!==void 0&&(l=Object.keys(t.setHeaders).reduce((h,E)=>h.set(E,t.setHeaders[E]),l)),t.setParams&&(p=Object.keys(t.setParams).reduce((h,E)=>h.set(E,t.setParams[E]),p)),new r(e,n,i,{params:p,headers:l,context:m,reportProgress:a,responseType:s,withCredentials:c,transferCache:o})}},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||{}),J=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new A,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}},oe=class r extends J{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})}},Z=class r extends J{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})}},O=class extends J{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}},Tt=200,Xt=204;function Ae(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}}var Gt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,s={}){let o;if(e instanceof X)o=e;else{let a;s.headers instanceof A?a=s.headers:a=new A(s.headers);let l;s.params&&(s.params instanceof I?l=s.params:l=new I({fromObject:s.params})),o=new X(e,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:l,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let i=me(o).pipe(Xe(a=>this.handler.handle(a)));if(e instanceof X||s.observe==="events")return i;let c=i.pipe($e(a=>a instanceof Z));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(z(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return a.body}));case"blob":return c.pipe(z(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new Error("Response is not a Blob.");return a.body}));case"text":return c.pipe(z(a=>{if(a.body!==null&&typeof a.body!="string")throw new Error("Response is not a string.");return a.body}));case"json":default:return c.pipe(z(a=>a.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}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 I().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,Ae(s,n))}post(e,n,s={}){return this.request("POST",e,Ae(s,n))}put(e,n,s={}){return this.request("PUT",e,Ae(s,n))}static \u0275fac=function(n){return new(n||r)(d(G))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Jt=/^\)\]\}',?\n/,Zt="X-Request-URL";function yt(r){if(r.url)return r.url;let t=Zt.toLocaleLowerCase();return r.headers.get(t)}var Wt=(()=>{var t,e;class r{fetchImpl=(e=(t=T(Ie,{optional:!0}))==null?void 0:t.fetch)!=null?e:(...s)=>globalThis.fetch(...s);ngZone=T(M);handle(s){return new pe(o=>{let i=new AbortController;return this.doRequest(s,i.signal,o).then(Pe,c=>o.error(new O({error:c}))),()=>i.abort()})}doRequest(s,o,i){return fe(this,null,function*(){var u,h,E,C;let c=this.createRequestInit(s),a;try{let f=this.ngZone.runOutsideAngular(()=>this.fetchImpl(s.urlWithParams,B({signal:o},c)));Yt(f),i.next({type:P.Sent}),a=yield f}catch(f){i.error(new O({error:f,status:(u=f.status)!=null?u:0,statusText:f.statusText,url:s.urlWithParams,headers:f.headers}));return}let l=new A(a.headers),p=a.statusText,m=(h=yt(a))!=null?h:s.urlWithParams,y=a.status,g=null;if(s.reportProgress&&i.next(new oe({headers:l,status:y,statusText:p,url:m})),a.body){let f=a.headers.get("content-length"),k=[],de=a.body.getReader(),j=0,ue,U,Fe=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>fe(this,null,function*(){for(;;){let{done:F,value:he}=yield de.read();if(F)break;if(k.push(he),j+=he.length,s.reportProgress){U=s.responseType==="text"?(U!=null?U:"")+(ue!=null?ue:ue=new TextDecoder).decode(he,{stream:!0}):void 0;let Be=()=>i.next({type:P.DownloadProgress,total:f?+f:void 0,loaded:j,partialText:U});Fe?Fe.run(Be):Be()}}}));let xt=this.concatChunks(k,j);try{let F=(E=a.headers.get("Content-Type"))!=null?E:"";g=this.parseBody(s,xt,F)}catch(F){i.error(new O({error:F,headers:new A(a.headers),status:a.status,statusText:a.statusText,url:(C=yt(a))!=null?C:s.urlWithParams}));return}}y===0&&(y=g?Tt:0),y>=200&&y<300?(i.next(new Z({body:g,headers:l,status:y,statusText:p,url:m})),i.complete()):i.error(new O({error:g,headers:l,status:y,statusText:p,url:m}))})}parseBody(s,o,i){switch(s.responseType){case"json":let c=new TextDecoder().decode(o).replace(Jt,"");return c===""?null:JSON.parse(c);case"text":return new TextDecoder().decode(o);case"blob":return new Blob([o],{type:i});case"arraybuffer":return o.buffer}}createRequestInit(s){let o={},i=s.withCredentials?"include":void 0;if(s.headers.forEach((c,a)=>o[c]=a.join(",")),s.headers.has("Accept")||(o.Accept="application/json, text/plain, */*"),!s.headers.has("Content-Type")){let c=s.detectContentTypeHeader();c!==null&&(o["Content-Type"]=c)}return{body:s.serializeBody(),method:s.method,headers:o,credentials:i}}concatChunks(s,o){let i=new Uint8Array(o),c=0;for(let a of s)i.set(a,c),c+=a.length;return i}static \u0275fac=function(o){return new(o||r)};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Ie=class{};function Pe(){}function Yt(r){r.then(Pe,Pe)}function wt(r,t){return t(r)}function Kt(r,t){return(e,n)=>t.intercept(e,{handle:s=>r(s,n)})}function qt(r,t,e){return(n,s)=>We(e,()=>t(n,o=>r(o,s)))}var Qt=new w(""),Ne=new w(""),Ht=new w(""),Rt=new w("",{providedIn:"root",factory:()=>!0});function en(){let r=null;return(t,e)=>{var o;r===null&&(r=((o=T(Qt,{optional:!0}))!=null?o:[]).reduceRight(Kt,wt));let n=T(Ee);if(T(Rt)){let i=n.add();return r(t,e).pipe(ye(()=>n.remove(i)))}else return r(t,e)}}var gt=(()=>{class r extends G{backend;injector;chain=null;pendingTasks=T(Ee);contributeToStability=T(Rt);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(Ne),...this.injector.get(Ht,[])]));this.chain=n.reduceRight((s,o)=>qt(s,o,this.injector),wt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,s=>this.backend.handle(s)).pipe(ye(()=>this.pendingTasks.remove(n)))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(d(se),d(Ze))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})();var tn=/^\)\]\}',?\n/;function nn(r){return"responseURL"in r&&r.responseURL?r.responseURL:/^X-Request-URL:/m.test(r.getAllResponseHeaders())?r.getResponseHeader("X-Request-URL"):null}var vt=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new b(-2800,!1);let n=this.xhrFactory;return(n.\u0275loadImpl?Ve(n.\u0275loadImpl()):me(null)).pipe(Ge(()=>new pe(o=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((u,h)=>i.setRequestHeader(u,h.join(","))),e.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let u=e.detectContentTypeHeader();u!==null&&i.setRequestHeader("Content-Type",u)}if(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",h=new A(i.getAllResponseHeaders()),E=nn(i)||e.url;return a=new oe({headers:h,status:i.status,statusText:u,url:E}),a},p=()=>{let{headers:u,status:h,statusText:E,url:C}=l(),f=null;h!==Xt&&(f=typeof i.response>"u"?i.responseText:i.response),h===0&&(h=f?Tt:0);let k=h>=200&&h<300;if(e.responseType==="json"&&typeof f=="string"){let de=f;f=f.replace(tn,"");try{f=f!==""?JSON.parse(f):null}catch(j){f=de,k&&(k=!1,f={error:j,text:f})}}k?(o.next(new Z({body:f,headers:u,status:h,statusText:E,url:C||void 0})),o.complete()):o.error(new O({error:f,headers:u,status:h,statusText:E,url:C||void 0}))},m=u=>{let{url:h}=l(),E=new O({error:u,status:i.status||0,statusText:i.statusText||"Unknown Error",url:h||void 0});o.error(E)},y=!1,g=u=>{y||(o.next(l()),y=!0);let h={type:P.DownloadProgress,loaded:u.loaded};u.lengthComputable&&(h.total=u.total),e.responseType==="text"&&i.responseText&&(h.partialText=i.responseText),o.next(h)},_=u=>{let h={type:P.UploadProgress,loaded:u.loaded};u.lengthComputable&&(h.total=u.total),o.next(h)};return i.addEventListener("load",p),i.addEventListener("error",m),i.addEventListener("timeout",m),i.addEventListener("abort",m),e.reportProgress&&(i.addEventListener("progress",g),c!==null&&i.upload&&i.upload.addEventListener("progress",_)),i.send(c),o.next({type:P.Sent}),()=>{i.removeEventListener("error",m),i.removeEventListener("abort",m),i.removeEventListener("load",p),i.removeEventListener("timeout",m),e.reportProgress&&(i.removeEventListener("progress",g),c!==null&&i.upload&&i.upload.removeEventListener("progress",_)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(d(ne))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),bt=new w(""),rn="XSRF-TOKEN",sn=new w("",{providedIn:"root",factory:()=>rn}),on="X-XSRF-TOKEN",an=new w("",{providedIn:"root",factory:()=>on}),ie=class{},cn=(()=>{class r{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n,s){this.doc=e,this.platform=n,this.cookieName=s}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ee(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(d(R),d(N),d(sn))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})();function ln(r,t){let e=r.url.toLowerCase();if(!T(bt)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=T(ie).getToken(),s=T(an);return n!=null&&!r.headers.has(s)&&(r=r.clone({headers:r.headers.set(s,n)})),t(r)}var Mt=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}(Mt||{});function dn(r,t){return{\u0275kind:r,\u0275providers:t}}function qn(...r){let t=[Gt,vt,gt,{provide:G,useExisting:gt},{provide:se,useFactory:()=>{var e;return(e=T(Wt,{optional:!0}))!=null?e:T(vt)}},{provide:Ne,useValue:ln,multi:!0},{provide:bt,useValue:!0},{provide:ie,useClass:cn}];for(let e of r)t.push(...e.\u0275providers);return ve(t)}var Et=new w("");function Qn(){return dn(Mt.LegacyInterceptors,[{provide:Et,useFactory:en},{provide:Ne,useExisting:Et,multi:!0}])}var _e=class extends lt{supportsDOMEvents=!0},ke=class r extends _e{static makeCurrent(){ct(new r)}onAndCancel(t,e,n){return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}}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=hn();return e==null?null:fn(e)}resetBaseElement(){W=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ee(document.cookie,t)}},W=null;function hn(){return W=W||document.querySelector("base"),W?W.getAttribute("href"):null}function fn(r){return new URL(r,document.baseURI).pathname}var Le=class{addToWindow(t){D.getAngularTestability=(n,s=!0)=>{let o=t.findTestabilityInTree(n,s);if(o==null)throw new b(5103,!1);return o},D.getAllAngularTestabilities=()=>t.getAllTestabilities(),D.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let s=D.getAllAngularTestabilities(),o=s.length,i=function(){o--,o==0&&n()};s.forEach(c=>{c.whenStable(i)})};D.frameworkStabilizers||(D.frameworkStabilizers=[]),D.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let s=t.getTestability(e);return s!=null?s:n?H().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}},pn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),xe=new w(""),Nt=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,s){return this._findPluginFor(n).addEventListener(e,n,s)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new b(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(d(xe),d(M))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),ce=class{_doc;constructor(t){this._doc=t}manager},ae="ng-app-id";function At(r){for(let t of r)t.remove()}function Dt(r,t){let e=t.createElement("style");return e.textContent=r,e}function mn(r,t,e,n){var o;let s=(o=r.head)==null?void 0:o.querySelectorAll(`style[${ae}="${t}"],link[${ae}="${t}"]`);if(s)for(let i of s)i.removeAttribute(ae),i instanceof HTMLLinkElement?n.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&e.set(i.textContent,{usage:0,elements:[i]})}function Ce(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var St=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,n,s,o={}){this.doc=e,this.appId=n,this.nonce=s,this.isServer=te(o),mn(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let s of e)this.addUsage(s,this.inline,Dt);n==null||n.forEach(s=>this.addUsage(s,this.external,Ce))}removeStyles(e,n){for(let s of e)this.removeUsage(s,this.inline);n==null||n.forEach(s=>this.removeUsage(s,this.external))}addUsage(e,n,s){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,s(e,this.doc)))})}removeUsage(e,n){let s=n.get(e);s&&(s.usage--,s.usage<=0&&(At(s.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])At(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:s}]of this.inline)s.push(this.addElement(e,Dt(n,this.doc)));for(let[n,{elements:s}]of this.external)s.push(this.addElement(e,Ce(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(ae,this.appId),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(d(R),d(we),d(Re,8),d(N))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Se={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"},Ue=/%COMP%/g,_t="%COMP%",yn=`_nghost-${_t}`,gn=`_ngcontent-${_t}`,vn=!0,En=new w("",{providedIn:"root",factory:()=>vn});function Tn(r){return gn.replace(Ue,r)}function wn(r){return yn.replace(Ue,r)}function kt(r,t){return t.map(e=>e.replace(Ue,r))}var Ot=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,s,o,i,c,a,l=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=l,this.platformIsServer=te(c),this.defaultRenderer=new Y(e,i,a,this.platformIsServer)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===V.ShadowDom&&(n=ze(B({},n),{encapsulation:V.Emulated}));let s=this.getOrCreateRenderer(e,n);return s instanceof le?s.applyToHost(e):s instanceof K&&s.applyStyles(),s}getOrCreateRenderer(e,n){let s=this.rendererByCompId,o=s.get(n.id);if(!o){let i=this.doc,c=this.ngZone,a=this.eventManager,l=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,m=this.platformIsServer;switch(n.encapsulation){case V.Emulated:o=new le(a,l,n,this.appId,p,i,c,m);break;case V.ShadowDom:return new je(a,l,e,n,i,c,this.nonce,m);default:o=new K(a,l,n,p,i,c,m);break}s.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static \u0275fac=function(n){return new(n||r)(d(Nt),d(St),d(we),d(En),d(R),d(N),d(M),d(Re))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Y=class{eventManager;doc;ngZone;platformIsServer;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,s){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=s}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Se[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(It(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(It(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 b(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,s){if(s){e=s+":"+e;let o=Se[s];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let s=Se[n];s?t.removeAttributeNS(s,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,s){s&($.DashCase|$.Important)?t.style.setProperty(e,n,s&$.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&$.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){if(typeof t=="string"&&(t=H().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(n))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function It(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var je=class extends Y{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,s,o,i,c,a){var m;super(t,o,i,a),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=kt(s.id,s.styles);for(let y of l){let g=document.createElement("style");c&&g.setAttribute("nonce",c),g.textContent=y,this.shadowRoot.appendChild(g)}let p=(m=s.getExternalStyles)==null?void 0:m.call(s);if(p)for(let y of p){let g=Ce(y,o);c&&g.setAttribute("nonce",c),this.shadowRoot.appendChild(g)}}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)}},K=class extends Y{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,s,o,i,c,a){var l;super(t,o,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=s,this.styles=a?kt(a,n.styles):n.styles,this.styleUrls=(l=n.getExternalStyles)==null?void 0:l.call(n,a)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},le=class extends K{contentAttr;hostAttr;constructor(t,e,n,s,o,i,c,a){let l=s+"-"+n.id;super(t,e,n,o,i,c,a,l),this.contentAttr=Tn(l),this.hostAttr=wn(l)}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}},Rn=(()=>{class r extends ce{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s){return e.addEventListener(n,s,!1),()=>this.removeEventListener(e,n,s)}removeEventListener(e,n,s){return e.removeEventListener(n,s)}static \u0275fac=function(n){return new(n||r)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Pt=["alt","control","meta","shift"],bn={"\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"},Mn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},An=(()=>{class r extends ce{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,s){let o=r.parseEventName(n),i=r.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>H().onAndCancel(e,o.domEventName,i))}static parseEventName(e){let n=e.toLowerCase().split("."),s=n.shift();if(n.length===0||!(s==="keydown"||s==="keyup"))return null;let o=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),Pt.forEach(l=>{let p=n.indexOf(l);p>-1&&(n.splice(p,1),i+=l+".")}),i+=o,n.length!=0||o.length===0)return null;let a={};return a.domEventName=s,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let s=bn[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(s=e.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),Pt.forEach(i=>{if(i!==s){let c=Mn[i];c(e)&&(o+=i+".")}}),o+=s,o===n)}static eventCallback(e,n,s){return o=>{r.matchEventFullKeyCode(o,e)&&s.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})();function Er(r,t){return at(B({rootComponent:r},Dn(t)))}function Dn(r){var t;return{appProviders:[...Lt,...(t=r==null?void 0:r.providers)!=null?t:[]],platformProviders:Nn}}function On(){ke.makeCurrent()}function In(){return new Te}function Pn(){return Ye(document),document}var Nn=[{provide:N,useValue:ut},{provide:Ke,useValue:On,multi:!0},{provide:R,useFactory:Pn,deps:[]}];var Sn=new w(""),_n=[{provide:q,useClass:Le,deps:[]},{provide:ot,useClass:Q,deps:[M,Me,q]},{provide:Q,useClass:Q,deps:[M,Me,q]}],Lt=[{provide:Je,useValue:"root"},{provide:Te,useFactory:In,deps:[]},{provide:xe,useClass:Rn,multi:!0,deps:[R,M,N]},{provide:xe,useClass:An,multi:!0,deps:[R]},Ot,St,Nt,{provide:st,useExisting:Ot},{provide:ne,useClass:pn,deps:[]},[]],Tr=(()=>{class r{constructor(e){}static \u0275fac=function(n){return new(n||r)(d(Sn,12))};static \u0275mod=be({type:r});static \u0275inj=ge({providers:[...Lt,..._n],imports:[dt,it]})}return r})();var wr=(()=>{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)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var kn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=v({token:r,factory:function(n){let s=null;return n?s=new(n||r):s=d(Ln),s},providedIn:"root"})}return r})(),Ln=(()=>{class r extends kn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case S.NONE:return n;case S.HTML:return x(n,"HTML")?L(n):rt(this._doc,String(n)).toString();case S.STYLE:return x(n,"Style")?L(n):n;case S.SCRIPT:if(x(n,"Script"))return L(n);throw new b(5200,!1);case S.URL:return x(n,"URL")?L(n):nt(String(n));case S.RESOURCE_URL:if(x(n,"ResourceURL"))return L(n);throw new b(5201,!1);default:throw new b(5202,!1)}}bypassSecurityTrustHtml(e){return qe(e)}bypassSecurityTrustStyle(e){return Qe(e)}bypassSecurityTrustScript(e){return He(e)}bypassSecurityTrustUrl(e){return et(e)}bypassSecurityTrustResourceUrl(e){return tt(e)}static \u0275fac=function(n){return new(n||r)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{se as a,I as b,P as c,Z as d,Gt as e,Qt as f,qn as g,Qn as h,Ot as i,Er as j,Tr as k,wr as l,kn as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-N2HZUJ5D.js";import"./chunk-I5SM3GCQ.js";import"./chunk-HMOW3VNR.js";import"./chunk-SZD4AWYF.js";import"./chunk-DKO4HAIB.js";import"./chunk-4JS645EV.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as ContainerRestartComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as N,b as U}from"./chunk-F4QKTMKG.js";import{m as H}from"./chunk-F5SS6TN7.js";import{a as D}from"./chunk-I5SM3GCQ.js";import{d as V}from"./chunk-HMOW3VNR.js";import{b as E,j as z}from"./chunk-4JS645EV.js";import{c as I,d as w}from"./chunk-QHHRJOCD.js";import{a as P,b as A}from"./chunk-H3E4T6KH.js";import{$b as R,Bb as f,Bc as l,Cc as d,Dc as F,Lb as S,Mb as b,Rb as c,Wb as a,Xb as o,Yb as u,cc as x,dc as p,g as $,h as k,ib as i,na as _,nc as s,oc as h,pc as v,ub as y,xa as C,xc as B,ya as g}from"./chunk-KDJPDALB.js";var M=$(N(),1),W=$(U(),1);var j=t=>({maxBackupSizeText:t});function q(t,m){if(t&1&&(a(0,"div"),u(1,"input",11),o()),t&2){let e=p(2);i(),b("value",e.selectedBackup.fileName)}}function O(t,m){if(t&1){let e=R();a(0,"div",10)(1,"input",12),x("change",function(n){C(e);let T=p(2);return g(T.handleRestoreFileInput(n.target.files))}),o(),a(2,"label",13),s(3),l(4,"translate"),o()()}if(t&2){let e=p(2);i(3),v(" ",d(4,1,(e.selectedFile==null?null:e.selectedFile.name)||"backup.label_choose_backup_file_to_restore")," ")}}function G(t,m){if(t&1&&(a(0,"div",5)(1,"div",8),u(2,"i",9),o(),a(3,"p"),s(4),l(5,"translate"),o(),a(6,"ul")(7,"li"),s(8),l(9,"translate"),o(),a(10,"li"),s(11),l(12,"translate"),o(),a(13,"li"),s(14),l(15,"translate"),o()(),f(16,q,2,1,"div")(17,O,5,3,"div",10),o()),t&2){let e=p();i(4),h(d(5,6,"backup.restore_help_one")),i(4),h(d(9,8,"backup.restore_help_two")),i(3),h(F(12,10,"backup.restore_max_size",B(15,j,e.maxFileSizeText))),i(3),h(d(15,13,"backup.restore_warning")),i(2),c(e.selectedBackup?16:-1),i(),c(e.selectedBackup?-1:17)}}function J(t,m){t&1&&u(0,"i",19)}function K(t,m){if(t&1&&(a(0,"span"),s(1),o()),t&2){let e=p(3);i(),v("",e.uploadPercent,"% - ")}}function L(t,m){t&1&&(a(0,"span"),s(1," Extracting Archive"),o())}function Q(t,m){t&1&&(a(0,"span"),s(1),l(2,"translate"),o()),t&2&&(i(),v(" ",d(2,1,"backup.label_uploading"),""))}function X(t,m){if(t&1&&(a(0,"span"),f(1,J,1,0,"i",19)(2,K,2,1,"span")(3,L,2,0,"span")(4,Q,3,3,"span"),o()),t&2){let e=p(2);i(),c(!e.uploadPercent||e.uploadPercent===100?1:-1),i(),c(e.uploadPercent&&e.uploadPercent!==100?2:-1),i(),c(e.uploadPercent===100?3:-1),i(),c(e.uploadPercent!==100?4:-1)}}function Y(t,m){t&1&&(a(0,"span"),s(1),l(2,"translate"),o()),t&2&&(i(),h(d(2,1,"form.button_restore")))}function Z(t,m){if(t&1){let e=R();a(0,"div",7)(1,"div",14)(2,"button",15),l(3,"translate"),x("click",function(){C(e);let n=p();return g(n.$activeModal.dismiss("Dismiss"))}),s(4),l(5,"translate"),o()(),u(6,"div",16),a(7,"div",17)(8,"button",18),x("click",function(){C(e);let n=p();return g(n.onRestoreBackupClick())}),f(9,X,5,4,"span")(10,Y,3,3,"span"),o()()()}if(t&2){let e=p();i(2),b("disabled",e.clicked),S("aria-label",d(3,6,"form.button_close")),i(2),v(" ",d(5,8,"form.button_close")," "),i(4),b("disabled",!e.selectedBackup&&!e.selectedFile||e.clicked),i(),c(e.clicked?9:-1),i(),c(e.clicked?-1:10)}}function ee(t,m){if(t&1){let e=R();a(0,"div",7),u(1,"div",14),a(2,"div",16)(3,"button",20),x("click",function(){C(e);let n=p();return g(n.postBackupRestart())}),s(4),l(5,"translate"),o()(),u(6,"div",17),o()}t&2&&(i(4),v(" ",d(5,1,"menu.hbrestart.title")," "))}var me=(()=>{class t{$activeModal=_(H);$api=_(E);$route=_(V);$toastr=_(z);$translate=_(P);$ws=_(D);setupWizardRestore=!1;selectedBackup=null;clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;restoreArchiveType="homebridge";uploadPercent=0;term=new M.Terminal;termTarget;fitAddon=new W.FitAddon;io;ngOnInit(){return k(this,null,function*(){this.io=this.$ws.connectToNamespace("backup"),this.termTarget=document.getElementById("plugin-log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",e=>{this.term.write(e)}),this.setupWizardRestore&&(this.restoreStarted=!0,this.restoreInProgress=!0,this.startRestore())})}onRestoreBackupClick(){this.selectedBackup?this.restoreScheduledBackup():this.restoreArchiveType==="homebridge"?this.uploadHomebridgeArchive():this.restoreArchiveType==="hbfx"&&this.uploadHbfxArchive()}uploadHomebridgeArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore",e).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:r=>{var n;console.error(r),this.$toastr.error(((n=r.error)==null?void 0:n.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})}restoreScheduledBackup(){return k(this,null,function*(){this.term.reset(),this.clicked=!0,this.$api.post(`/backup/scheduled-backups/${this.selectedBackup.id}/restore`,{}).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:e=>{var r;console.error(e),this.$toastr.error(((r=e.error)==null?void 0:r.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})})}startRestore(){return k(this,null,function*(){this.io.request("do-restore").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success")),this.setupWizardRestore&&this.postBackupRestart()},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}uploadHbfxArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore/hbfx",e,{reportProgress:!0,observe:"events"}).subscribe({next:r=>{r.type===I.UploadProgress?this.uploadPercent=Math.round(100*r.loaded/r.total):r instanceof w&&(this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startHbfxRestore()},500),this.clicked=!1)},error:r=>{var n;this.clicked=!1,console.error(r),this.$toastr.error(((n=r.error)==null?void 0:n.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})}startHbfxRestore(){return k(this,null,function*(){this.io.request("do-restore-hbfx").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success"))},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.selectedFile.name.endsWith(".hbfx")?this.restoreArchiveType="hbfx":this.restoreArchiveType="homebridge"):delete this.selectedFile}postBackupRestart(){this.$api.put("/backup/restart",{}).subscribe({next:()=>{this.$activeModal.close(!0),this.$route.navigate(["/"])},error:()=>{}})}ngOnDestroy(){this.io.end()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],inputs:{setupWizardRestore:"setupWizardRestore",selectedBackup:"selectedBackup"},decls:13,vars:11,consts:[[1,"modal-content","hb-backup-modal"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click","disabled"],["aria-hidden","true"],[1,"modal-body"],["id","plugin-log-output",1,"modal-body",3,"hidden"],[1,"modal-footer","justify-content-between"],[1,"text-center","mt-2","mb-3"],[1,"fas","fa-fw","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"custom-file"],["type","text","disabled","",1,"form-control","custom-input",3,"value"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"custom-file-input",3,"change"],["for","restoreFileUpload",1,"custom-file-label"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-fw","fa-circle-notch","fa-spin"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),s(3),l(4,"translate"),o(),a(5,"button",3),l(6,"translate"),x("click",function(){return n.$activeModal.dismiss("Dismiss")}),a(7,"span",4),s(8,"\xD7"),o()()(),f(9,G,18,17,"div",5),u(10,"div",6),f(11,Z,11,10,"div",7)(12,ee,7,3,"div",7),o()),r&2&&(i(3),h(d(4,7,"form.button_restore")),i(2),b("disabled",n.restoreInProgress),S("aria-label",d(6,9,"form.button_close")),i(4),c(!n.restoreStarted&&!n.setupWizardRestore?9:-1),i(),b("hidden",!n.restoreStarted),i(),c(!n.restoreStarted||n.restoreFailed===!0?11:-1),i(),c(!n.restoreInProgress&&n.restoreStarted?12:-1))},dependencies:[A],encapsulation:2})}return t})();export{me as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as _,b as D}from"./chunk-DKO4HAIB.js";import{a as l,b as S}from"./chunk-4JS645EV.js";import{f as x}from"./chunk-QHHRJOCD.js";import{C as v,Sc as I,g as O,h as a,ha as h,ia as E,ka as y,ma as c,na as f,r as p,vb as j,w as d,x as T,z as w}from"./chunk-KDJPDALB.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(c(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(c(g),c(m),c(I))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(c(r,12))},r.\u0275mod=j({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(l.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(l.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(l.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(l.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(l.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-EXVHFPLG.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as SupportComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as I}from"./chunk-
|
|
1
|
+
import{e as I}from"./chunk-KDJPDALB.js";var j=I((k,m)=>{(function(g,l){typeof k=="object"&&typeof m=="object"?m.exports=l():typeof define=="function"&&define.amd?define([],l):typeof k=="object"?k.WebLinksAddon=l():g.WebLinksAddon=l()})(self,function(){return(()=>{"use strict";var g={6:(a,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkComputer=r.WebLinkProvider=void 0;var s=function(){function o(n,i,e,t){t===void 0&&(t={}),this._terminal=n,this._regex=i,this._handler=e,this._options=t}return o.prototype.provideLinks=function(n,i){var e=p.computeLink(n,this._regex,this._terminal,this._handler);i(this._addCallbacks(e))},o.prototype._addCallbacks=function(n){var i=this;return n.map(function(e){return e.leave=i._options.leave,e.hover=function(t,u){if(i._options.hover){var c=e.range;i._options.hover(t,u,c)}},e})},o}();r.WebLinkProvider=s;var p=function(){function o(){}return o.computeLink=function(n,i,e,t){for(var u,c=new RegExp(i.source,(i.flags||"")+"g"),_=o._translateBufferLineToStringWithWrap(n-1,!1,e),d=_[0],f=_[1],v=-1,w=[];(u=c.exec(d))!==null;){var h=u[1];if(!h){console.log("match found without corresponding matchIndex");break}if(v=d.indexOf(h,v+1),c.lastIndex=v+h.length,v<0)break;for(var b=v+h.length,y=f+1;b>e.cols;)b-=e.cols,y++;for(var L=v+1,P=f+1;L>e.cols;)L-=e.cols,P++;var M={start:{x:L,y:P},end:{x:b,y}};w.push({range:M,text:h,activate:t})}return w},o._translateBufferLineToStringWithWrap=function(n,i,e){var t,u,c="";do{if(!(d=e.buffer.active.getLine(n)))break;d.isWrapped&&n--,u=d.isWrapped}while(u);var _=n;do{var d,f=e.buffer.active.getLine(n+1);if(t=!!f&&f.isWrapped,!(d=e.buffer.active.getLine(n)))break;c+=d.translateToString(!t&&i).substring(0,e.cols),n++}while(t);return[c,_]},o}();r.LinkComputer=p}},l={};function x(a){var r=l[a];if(r!==void 0)return r.exports;var s=l[a]={exports:{}};return g[a](s,s.exports,x),s.exports}var W={};return(()=>{var a=W;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;var r=x(6),s=new RegExp(`(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,18}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?((\\/[\\/\\w\\.\\-%~:+@]*)*([^:"'\\s]))?(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)`);function p(n,i){var e=window.open();if(e){try{e.opener=null}catch{}e.location.href=i}else console.warn("Opening link blocked as opener could not be cleared")}var o=function(){function n(i,e,t){i===void 0&&(i=p),e===void 0&&(e={}),t===void 0&&(t=!1),this._handler=i,this._options=e,this._useLinkProvider=t}return n.prototype.activate=function(i){if(this._terminal=i,this._useLinkProvider&&"registerLinkProvider"in this._terminal){var e=(t=this._options).urlRegex||s;this._linkProvider=this._terminal.registerLinkProvider(new r.WebLinkProvider(this._terminal,e,this._handler,t))}else{var t;(t=this._options).matchIndex=1,this._linkMatcherId=this._terminal.registerLinkMatcher(s,this._handler,t)}},n.prototype.dispose=function(){var i;this._linkMatcherId!==void 0&&this._terminal!==void 0&&this._terminal.deregisterLinkMatcher(this._linkMatcherId),(i=this._linkProvider)===null||i===void 0||i.dispose()},n}();a.WebLinksAddon=o})(),W})()})});export{j as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-3HQDWIYS.js";import"./chunk-I5SM3GCQ.js";import"./chunk-HMOW3VNR.js";import"./chunk-SZD4AWYF.js";import"./chunk-DKO4HAIB.js";import"./chunk-4JS645EV.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as RestartComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"./chunk-3TW227A7.js";import{a as s}from"./chunk-XB3CBRQE.js";import"./chunk-NIGZKKLM.js";import"./chunk-44XAYR34.js";import"./chunk-XK4344ZY.js";import"./chunk-3Z6U5O5M.js";import"./chunk-MMPQXC6H.js";import"./chunk-6MDI4RNQ.js";import"./chunk-C4QSWDVR.js";import"./chunk-T6FYP7FJ.js";import"./chunk-P5WCYSBI.js";import"./chunk-F4QKTMKG.js";import"./chunk-OZTQT47N.js";import"./chunk-CK234OHO.js";import"./chunk-BZVO3JIQ.js";import"./chunk-EFBNPDVN.js";import{q as p}from"./chunk-F5SS6TN7.js";import{y as u,z as l}from"./chunk-Z4CHNCHA.js";import"./chunk-I5SM3GCQ.js";import{g as e}from"./chunk-HMOW3VNR.js";import"./chunk-SZD4AWYF.js";import"./chunk-DKO4HAIB.js";import"./chunk-4JS645EV.js";import"./chunk-QHHRJOCD.js";import{c as m}from"./chunk-H3E4T6KH.js";import{ia as t,md as n,vb as r}from"./chunk-KDJPDALB.js";var g=[{path:"",loadComponent:()=>import("./chunk-3U5HE6LL.js").then(o=>o.PluginsComponent)}],d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[e.forChild(g),e]})}return o})();var v=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,u,l,m.forChild(),p,f,d,s]})}return o})();export{v as PluginsModule};
|