diff --git a/public/build/assets/About-BzKiptnW.js b/public/build/assets/About-BzKiptnW.js deleted file mode 100644 index df5339a4..00000000 --- a/public/build/assets/About-BzKiptnW.js +++ /dev/null @@ -1 +0,0 @@ -import{L as b,u as k,e as i,f as g,k as C,p as r,h as s,t,m as o,n as c,j as e,i as h,U as u}from"./app-CuhK3jij.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const B={class:"title has-text-grey-dark"},F={class:"block"},A=s("span",{class:"is-size-5"},"2FAuth",-1),w=s("br",null,null,-1),y=s("img",{class:"about-logo",src:"logo.svg",alt:"2FAuth logo"},null,-1),L=s("p",{class:"block"},[e(" ©Bubka "),s("a",{class:"is-size-7",href:"https://github.com/Bubka/2FAuth/blob/master/LICENSE"},"AGPL-3.0 license")],-1),v={class:"title is-5 has-text-grey-light"},I={class:"buttons"},$={class:"icon is-small"},S=s("span",null,"Github",-1),T={class:"icon is-small"},V=s("span",null,"Docs",-1),z={class:"icon is-small"},N=s("span",null,"Demo",-1),D={class:"icon is-small"},E=s("span",null,"API",-1),W={class:"title is-5 has-text-grey-light"},j={class:"block"},M=s("a",{href:"https://docs.2fauth.app/credits/"},"Laravel, Bulma CSS, Vue.js and more",-1),R=s("a",{href:"https://fontawesome.com/"},"Font Awesome",-1),x=s("a",{class:"is-size-7",href:"https://fontawesome.com/license/free"},"(CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)",-1),G=s("a",{href:"https://2fa.directory/"},"2FA Directory",-1),P=s("a",{class:"is-size-7",href:"https://github.com/2factorauth/twofactorauth/blob/master/LICENSE.md"},"(MIT License)",-1),H={__name:"About",setup(U){const _=b("2fauth"),d=k().options.history.state.back;return(a,Y)=>{const l=i("FontAwesomeIcon"),p=i("ButtonBackCloseCancel"),m=i("VueFooter"),f=i("ResponsiveWidthWrapper");return g(),C(f,null,{default:r(()=>[s("h1",B,t(a.$t("commons.about")),1),s("p",F,[o(h(u),null,{default:r(({mode:n})=>[s("span",{class:c(n=="dark"?"has-text-white":"has-text-black")},[A,e(" v"+t(h(_).version),1)],2)]),_:1}),w,e(" "+t(a.$t("commons.2fauth_teaser")),1)]),y,L,s("h2",v,t(a.$t("commons.resources")),1),s("div",I,[o(h(u),null,{default:r(({mode:n})=>[s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://github.com/Bubka/2FAuth",target:"_blank"},[s("span",$,[o(l,{icon:["fab","github-alt"]})]),S],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://docs.2fauth.app/",target:"_blank"},[s("span",T,[o(l,{icon:["fas","book"]})]),V],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://demo.2fauth.app/",target:"_blank"},[s("span",z,[o(l,{icon:["fas","flask"]})]),N],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://docs.2fauth.app/resources/rapidoc.html",target:"_blank"},[s("span",D,[o(l,{icon:["fas","code"]})]),E],2)]),_:1})]),s("h2",W,t(a.$t("commons.credits")),1),s("p",j,[s("ul",null,[s("li",null,[e(t(a.$t("commons.made_with"))+" ",1),M]),s("li",null,[e(t(a.$t("commons.ui_icons_by"))+" ",1),R,e(" "),x]),s("li",null,[e(t(a.$t("commons.logos_by"))+" ",1),G,e(" "),P])])]),o(m,{showButtons:!0},{default:r(()=>[o(p,{returnTo:{path:h(d)},action:"back"},null,8,["returnTo"])]),_:1})]),_:1})}}};export{H as default}; diff --git a/public/build/assets/About-DoDl2Z3n.js b/public/build/assets/About-DoDl2Z3n.js new file mode 100644 index 00000000..bf8ecc16 --- /dev/null +++ b/public/build/assets/About-DoDl2Z3n.js @@ -0,0 +1,2 @@ +import{h as k,k as p,p as g,l as u,m as C,j as e,e as s,t as o,n as r,g as a,f as m,U as B,L as F}from"./app-CzxRjCVM.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const A={class:"title has-text-grey-dark"},_={class:"block"},w={class:"title is-5 has-text-grey-light"},y={class:"buttons"},L={class:"icon is-small"},v={class:"icon is-small"},I={class:"icon is-small"},$={class:"icon is-small"},S={class:"title is-5 has-text-grey-light"},T={class:"block"},D={__name:"About",setup(V){const c=F("2fauth"),d=g().options.history.state.back;return(n,t)=>{const i=u("FontAwesomeIcon"),h=u("ButtonBackCloseCancel"),f=u("VueFooter"),b=u("ResponsiveWidthWrapper");return C(),k(b,null,{default:p(()=>[e(m(B),null,{default:p(({mode:l})=>[s("h1",A,o(n.$t("commons.about")),1),s("p",_,[s("span",{class:r(l=="dark"?"has-text-white":"has-text-black")},[t[0]||(t[0]=s("span",{class:"is-size-5"},"2FAuth",-1)),a(" v"+o(m(c).version),1)],2),t[1]||(t[1]=s("br",null,null,-1)),a(" "+o(n.$t("commons.2fauth_teaser")),1)]),t[13]||(t[13]=s("img",{class:"about-logo",src:"logo.svg",alt:"2FAuth logo"},null,-1)),t[14]||(t[14]=s("p",{class:"block"},[a(" ©Bubka "),s("a",{class:"is-size-7",href:"https://github.com/Bubka/2FAuth/blob/master/LICENSE"},"AGPL-3.0 license")],-1)),s("h2",w,o(n.$t("commons.resources")),1),s("div",y,[s("a",{class:r(["button",{"is-dark":l=="dark"}]),href:"https://github.com/Bubka/2FAuth",target:"_blank"},[s("span",L,[e(i,{icon:["fab","github-alt"]})]),t[2]||(t[2]=s("span",null,"Github",-1))],2),s("a",{class:r(["button",{"is-dark":l=="dark"}]),href:"https://docs.2fauth.app/",target:"_blank"},[s("span",v,[e(i,{icon:["fas","book"]})]),t[3]||(t[3]=s("span",null,"Docs",-1))],2),s("a",{class:r(["button",{"is-dark":l=="dark"}]),href:"https://demo.2fauth.app/",target:"_blank"},[s("span",I,[e(i,{icon:["fas","flask"]})]),t[4]||(t[4]=s("span",null,"Demo",-1))],2),s("a",{class:r(["button",{"is-dark":l=="dark"}]),href:"https://docs.2fauth.app/resources/rapidoc.html",target:"_blank"},[s("span",$,[e(i,{icon:["fas","code"]})]),t[5]||(t[5]=s("span",null,"API",-1))],2)]),s("h2",S,o(n.$t("commons.credits")),1),s("p",T,[s("ul",null,[s("li",null,[a(o(n.$t("commons.made_with"))+" ",1),t[6]||(t[6]=s("a",{href:"https://docs.2fauth.app/credits/"},"Laravel, Bulma CSS, Vue.js and more",-1))]),s("li",null,[a(o(n.$t("commons.ui_icons_by"))+" ",1),t[7]||(t[7]=s("a",{href:"https://fontawesome.com/"},"Font Awesome",-1)),t[8]||(t[8]=a(" ")),t[9]||(t[9]=s("a",{class:"is-size-7",href:"https://fontawesome.com/license/free"},"(CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)",-1))]),s("li",null,[a(o(n.$t("commons.logos_by"))+" ",1),t[10]||(t[10]=s("a",{href:"https://2fa.directory/"},"2FA Directory",-1)),t[11]||(t[11]=a(" ")),t[12]||(t[12]=s("a",{class:"is-size-7",href:"https://github.com/2factorauth/twofactorauth/blob/master/LICENSE.md"},"(MIT License)",-1))])])]),e(f,{showButtons:!0},{default:p(()=>[e(h,{returnTo:{path:m(d)},action:"back"},null,8,["returnTo"])]),_:1})]),_:1})]),_:1})}}};export{D as default}; +//# sourceMappingURL=About-DoDl2Z3n.js.map diff --git a/public/build/assets/About-DoDl2Z3n.js.map b/public/build/assets/About-DoDl2Z3n.js.map new file mode 100644 index 00000000..cc1864d6 --- /dev/null +++ b/public/build/assets/About-DoDl2Z3n.js.map @@ -0,0 +1 @@ +{"version":3,"file":"About-DoDl2Z3n.js","sources":["../../../resources/js/views/About.vue"],"sourcesContent":["\n\n"],"names":["$2fauth","inject","returnTo","useRouter"],"mappings":"8gBAGI,MAAMA,EAAUC,EAAO,QAAQ,EAEzBC,EADSC,EAAS,EACA,QAAQ,QAAQ,MAAM"} \ No newline at end of file diff --git a/public/build/assets/Access-BGNRb1hB.js b/public/build/assets/Access-BGNRb1hB.js new file mode 100644 index 00000000..64e01c91 --- /dev/null +++ b/public/build/assets/Access-BGNRb1hB.js @@ -0,0 +1,2 @@ +import{_}from"./AccessLogViewer-DhKO22h5.js";import{o as f,r as h,I as B,h as I,k as u,l as o,m as g,e as c,t as r,f as k,j as t,p as v}from"./app-CzxRjCVM.js";import{u as C}from"./bus-BNAtGMCo.js";import"./SearchBox-CH3IEr_n.js";import"./Spinner-C-V0HKYn.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const b={class:"title has-text-grey-dark"},y={class:"block is-size-7-mobile"},T={__name:"Access",props:{userId:[Number,String]},setup(i){const l=C();v(),f(async()=>{m()});const e=i,a=h(l.username??"");function m(){B.getById(e.userId,{returnError:!0}).then(s=>{a.value=s.data.info.name})}return(s,S)=>{const n=o("ButtonBackCloseCancel"),d=o("VueFooter"),p=o("ResponsiveWidthWrapper");return g(),I(p,null,{default:u(()=>[c("h1",b,r(s.$t("titles.admin.logs.access")),1),c("div",y,r(s.$t("admin.access_log_legend_for_user",{username:k(a)}))+" (#"+r(e.userId)+") ",1),t(_,{userId:e.userId,lastOnly:!1,showSearch:!0,period:1},null,8,["userId"]),t(d,{showButtons:!0},{default:u(()=>[t(n,{returnTo:{name:"admin.manageUser",params:{userId:e.userId}},action:"back"},null,8,["returnTo"]),t(n,{returnTo:{name:"accounts"},action:"close"})]),_:1})]),_:1})}}};export{T as default}; +//# sourceMappingURL=Access-BGNRb1hB.js.map diff --git a/public/build/assets/Access-BGNRb1hB.js.map b/public/build/assets/Access-BGNRb1hB.js.map new file mode 100644 index 00000000..2fa5f0a4 --- /dev/null +++ b/public/build/assets/Access-BGNRb1hB.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Access-BGNRb1hB.js","sources":["../../../resources/js/views/admin/logs/Access.vue"],"sourcesContent":["\n\n\n"],"names":["bus","useBusStore","useRouter","onMounted","getUser","props","__props","username","ref","userService","response"],"mappings":"qeAMI,MAAMA,EAAMC,EAAW,EACRC,EAAS,EAExBC,EAAU,SAAY,CAClBC,EAAO,CACV,CAAA,EAED,MAAMC,EAAQC,EAIRC,EAAWC,EAAIR,EAAI,UAAY,EAAE,EAKvC,SAASI,GAAU,CACfK,EAAY,QAAQJ,EAAM,OAAQ,CAAC,YAAa,EAAI,CAAC,EACpD,KAAKK,GAAY,CACdH,EAAS,MAAQG,EAAS,KAAK,KAAK,IACvC,CAAA,CACT"} \ No newline at end of file diff --git a/public/build/assets/Access-KiYVHBfV.js b/public/build/assets/Access-KiYVHBfV.js deleted file mode 100644 index d39f4837..00000000 --- a/public/build/assets/Access-KiYVHBfV.js +++ /dev/null @@ -1 +0,0 @@ -import{_}from"./AccessLogViewer-ATsuzUAw.js";import{u as f,o as h,r as B,I,e as o,f as g,k,p as u,h as c,t as r,i as v,m as t}from"./app-CuhK3jij.js";import{u as C}from"./bus-BalNs30H.js";import"./SearchBox-Bwo0E13W.js";import"./Spinner-WULdfd4I.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const b={class:"title has-text-grey-dark"},y={class:"block is-size-7-mobile"},T={__name:"Access",props:{userId:[Number,String]},setup(i){const l=C();f(),h(async()=>{m()});const e=i,a=B(l.username??"");function m(){I.getById(e.userId,{returnError:!0}).then(s=>{a.value=s.data.info.name})}return(s,S)=>{const n=o("ButtonBackCloseCancel"),d=o("VueFooter"),p=o("ResponsiveWidthWrapper");return g(),k(p,null,{default:u(()=>[c("h1",b,r(s.$t("titles.admin.logs.access")),1),c("div",y,r(s.$t("admin.access_log_legend_for_user",{username:v(a)}))+" (#"+r(e.userId)+") ",1),t(_,{userId:e.userId,lastOnly:!1,showSearch:!0,period:1},null,8,["userId"]),t(d,{showButtons:!0},{default:u(()=>[t(n,{returnTo:{name:"admin.manageUser",params:{userId:e.userId}},action:"back"},null,8,["returnTo"]),t(n,{returnTo:{name:"accounts"},action:"close"})]),_:1})]),_:1})}}};export{T as default}; diff --git a/public/build/assets/AccessLogViewer-ATsuzUAw.js b/public/build/assets/AccessLogViewer-ATsuzUAw.js deleted file mode 100644 index e15fe957..00000000 --- a/public/build/assets/AccessLogViewer-ATsuzUAw.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as O}from"./SearchBox-Bwo0E13W.js";import{b as E,L as j,r as f,x as z,o as U,I as P,e as J,f as r,g as l,k as R,i as n,D as q,l as C,h as o,n as c,t as i,m as a,F as x,E as G,p as A,j as w,a8 as K,U as Q}from"./app-CuhK3jij.js";import{S as W}from"./Spinner-WULdfd4I.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const X={key:1,class:"level is-mobile mb-2"},Z={class:"level-item has-text-centered"},ee={class:"buttons"},se=["title"],te=["title"],oe=["title"],ne=["title"],re=["title"],ie=["title"],le={key:2},ae=["innerHTML"],de=["innerHTML"],ce=["innerHTML"],ue=["innerHTML"],he={class:"light-or-darker"},me={class:"light-or-darker"},_e={class:"light-or-darker"},ge={key:3,class:"mt-4"},fe={key:4,class:"mt-5 pl-3"},be={__name:"AccessLogViewer",props:{userId:[Number,String],lastOnly:Boolean,showSearch:Boolean,period:{type:[Number,String],default:12}},emits:["has-more-entries"],setup(T,{emit:N}){const H=E(),I=j("2fauth"),h=T,d={aMonth:1,threeMonths:3,halfYear:6,aYear:12},u=f([]),v=f(!1),p=f(""),m=f(h.period),g=f(!0),B=N,$=z(()=>u.value.filter(e=>JSON.stringify(e).toString().toLowerCase().includes(p.value)));U(()=>{L()});function y(e){m.value=e,L()}function F(){g.value=!1,S()}function S(){u.value.sort((e,t)=>e.id>t.id?1:-1)}function V(){g.value=!0,M()}function M(){u.value.sort((e,t)=>e.id{u.value=t.data,u.value.length>3&&h.lastOnly&&(B("has-more-entries"),u.value.pop()),g.value==!0?M():S()}).catch(t=>{H.error(t)}).finally(()=>{v.value=!1})}const Y=e=>{switch(e){case"phone":return"mobile-screen";case"tablet":return"tablet-screen-button";default:return"display"}},D=e=>!e.login_at&&e.logout_at,b=e=>!e.login_successful&&!e.logout_at;return(e,t)=>{const _=J("FontAwesomeIcon");return r(),l(x,null,[h.showSearch?(r(),R(O,{key:0,keyword:n(p),"onUpdate:keyword":t[0]||(t[0]=s=>q(p)?p.value=s:null),hasNoBackground:!0},null,8,["keyword"])):C("",!0),h.showSearch?(r(),l("nav",X,[o("div",Z,[o("div",ee,[o("button",{id:"btnShowOneMonth",title:e.$t("admin.show_last_month_log"),onClick:t[1]||(t[1]=s=>y(d.aMonth)),class:c([{"has-text-grey":n(m)!==d.aMonth},"button is-ghost p-1"])},i(e.$t("commons.one_month")),11,se),o("button",{id:"btnShowThreeMonths",title:e.$t("admin.show_three_months_log"),onClick:t[2]||(t[2]=s=>y(d.threeMonths)),class:c([{"has-text-grey":n(m)!==d.threeMonths},"button is-ghost p-1"])},i(e.$t("commons.x_month",{x:"3"})),11,te),o("button",{id:"btnShowSixMonths",title:e.$t("admin.show_six_months_log"),onClick:t[3]||(t[3]=s=>y(d.halfYear)),class:c([{"has-text-grey":n(m)!==d.halfYear},"button is-ghost p-1"])},i(e.$t("commons.x_month",{x:"6"})),11,oe),o("button",{id:"btnShowOneYear",title:e.$t("admin.show_one_year_log"),onClick:t[4]||(t[4]=s=>y(d.aYear)),class:c([{"has-text-grey":n(m)!==d.aYear},"button is-ghost p-1 mr-5"])},i(e.$t("commons.one_year")),11,ne),o("button",{id:"btnSortLogDesc",onClick:V,title:e.$t("admin.sort_by_date_desc"),class:c([{"has-text-grey":!n(g)},"button p-1 is-ghost"])},[a(_,{icon:["fas","arrow-up-long"],flip:"vertical"}),a(_,{icon:["far","calendar"]})],10,re),o("button",{id:"btnSortLogAsc",onClick:F,title:e.$t("admin.sort_by_date_asc"),class:c([{"has-text-grey":n(g)},"button p-1 is-ghost"])},[a(_,{icon:["fas","arrow-up-long"]}),a(_,{icon:["far","calendar"]})],10,ie)])])])):C("",!0),n($).length>0?(r(),l("div",le,[(r(!0),l(x,null,G(n($),s=>(r(),l("div",{key:s.id,class:"list-item is-size-6 is-size-7-mobile has-text-grey is-flex is-justify-content-space-between"},[a(n(Q),null,{default:A(({mode:k})=>[o("div",null,[o("div",null,[b(s)?(r(),l("span",{key:0,innerHTML:e.$t("admin.failed_login_on",{login_at:s.login_at})},null,8,ae)):D(s)?(r(),l("span",{key:1,innerHTML:e.$t("admin.successful_logout_on",{login_at:s.logout_at})},null,8,de)):n(I).config.proxyAuth?(r(),l("span",{key:2,innerHTML:e.$t("admin.viewed_on",{login_at:s.login_at})},null,8,ce)):(r(),l("span",{key:3,innerHTML:e.$t("admin.successful_login_on",{login_at:s.login_at})},null,8,ue))]),o("div",null,[w(i(e.$t("commons.IP"))+": ",1),o("span",he,i(s.ip_address),1),w(" - "+i(e.$t("commons.browser"))+": ",1),o("span",me,i(s.browser),1),w(" - "+i(e.$t("commons.operating_system_short"))+": ",1),o("span",_e,i(s.platform),1)])]),o("div",{class:c([k=="dark"?"has-text-grey-darker":"has-text-grey-lighter","is-align-self-center"])},[a(n(K),{class:"fa-2x width-1-5x"},{default:A(()=>[a(_,{icon:["fas",Y(s.device)],transform:"grow-6","fixed-width":""},null,8,["icon"]),a(_,{icon:["fas",b(s)?"times":"check"],transform:"shrink-7"+(s.device=="desktop"?" up-2":""),class:c(b(s)?"has-text-danger"+(k=="dark"?"-dark":""):"has-text-success"+(k=="dark"?"-dark":"")),"fixed-width":""},null,8,["icon","transform","class"])]),_:2},1024)],2)]),_:2},1024)]))),128))])):n(u).length==0?(r(),l("div",ge,i(e.$t("commons.no_entry_yet")),1)):(r(),l("div",fe,i(e.$t("commons.no_result")),1)),a(W,{isVisible:n(v)},null,8,["isVisible"])],64)}}};export{be as _}; diff --git a/public/build/assets/AccessLogViewer-DhKO22h5.js b/public/build/assets/AccessLogViewer-DhKO22h5.js new file mode 100644 index 00000000..1b2b9188 --- /dev/null +++ b/public/build/assets/AccessLogViewer-DhKO22h5.js @@ -0,0 +1,2 @@ +import{_ as O}from"./SearchBox-CH3IEr_n.js";import{a as j,L as z,r as f,x as E,o as U,I as P,l as J,m as r,d as l,h as R,f as n,C as q,i as C,e as o,n as u,t as i,j as a,F as x,D as G,k as A,g as w,a8 as K,U as Q}from"./app-CzxRjCVM.js";import{S as W}from"./Spinner-C-V0HKYn.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const X={key:1,class:"level is-mobile mb-2"},Z={class:"level-item has-text-centered"},ee={class:"buttons"},te=["title"],se=["title"],oe=["title"],ne=["title"],re=["title"],ie=["title"],le={key:2},ae=["innerHTML"],de=["innerHTML"],ue=["innerHTML"],ce=["innerHTML"],he={class:"light-or-darker"},me={class:"light-or-darker"},_e={class:"light-or-darker"},ge={key:3,class:"mt-4"},fe={key:4,class:"mt-5 pl-3"},ve={__name:"AccessLogViewer",props:{userId:[Number,String],lastOnly:Boolean,showSearch:Boolean,period:{type:[Number,String],default:12}},emits:["has-more-entries"],setup(T,{emit:N}){const H=j(),I=z("2fauth"),h=T,d={aMonth:1,threeMonths:3,halfYear:6,aYear:12},c=f([]),b=f(!1),p=f(""),m=f(h.period),g=f(!0),B=N,$=E(()=>c.value.filter(e=>JSON.stringify(e).toString().toLowerCase().includes(p.value)));U(()=>{L()});function y(e){m.value=e,L()}function F(){g.value=!1,S()}function S(){c.value.sort((e,s)=>e.id>s.id?1:-1)}function V(){g.value=!0,M()}function M(){c.value.sort((e,s)=>e.id{c.value=s.data,c.value.length>3&&h.lastOnly&&(B("has-more-entries"),c.value.pop()),g.value==!0?M():S()}).catch(s=>{H.error(s)}).finally(()=>{b.value=!1})}const Y=e=>{switch(e){case"phone":return"mobile-screen";case"tablet":return"tablet-screen-button";default:return"display"}},D=e=>!e.login_at&&e.logout_at,v=e=>!e.login_successful&&!e.logout_at;return(e,s)=>{const _=J("FontAwesomeIcon");return r(),l(x,null,[h.showSearch?(r(),R(O,{key:0,keyword:n(p),"onUpdate:keyword":s[0]||(s[0]=t=>q(p)?p.value=t:null),hasNoBackground:!0},null,8,["keyword"])):C("",!0),h.showSearch?(r(),l("nav",X,[o("div",Z,[o("div",ee,[o("button",{id:"btnShowOneMonth",title:e.$t("admin.show_last_month_log"),onClick:s[1]||(s[1]=t=>y(d.aMonth)),class:u([{"has-text-grey":n(m)!==d.aMonth},"button is-ghost p-1"]),type:"button"},i(e.$t("commons.one_month")),11,te),o("button",{id:"btnShowThreeMonths",title:e.$t("admin.show_three_months_log"),onClick:s[2]||(s[2]=t=>y(d.threeMonths)),class:u([{"has-text-grey":n(m)!==d.threeMonths},"button is-ghost p-1"]),type:"button"},i(e.$t("commons.x_month",{x:"3"})),11,se),o("button",{id:"btnShowSixMonths",title:e.$t("admin.show_six_months_log"),onClick:s[3]||(s[3]=t=>y(d.halfYear)),class:u([{"has-text-grey":n(m)!==d.halfYear},"button is-ghost p-1"]),type:"button"},i(e.$t("commons.x_month",{x:"6"})),11,oe),o("button",{id:"btnShowOneYear",title:e.$t("admin.show_one_year_log"),onClick:s[4]||(s[4]=t=>y(d.aYear)),class:u([{"has-text-grey":n(m)!==d.aYear},"button is-ghost p-1 mr-5"]),type:"button"},i(e.$t("commons.one_year")),11,ne),o("button",{id:"btnSortLogDesc",onClick:V,title:e.$t("admin.sort_by_date_desc"),class:u([{"has-text-grey":!n(g)},"button p-1 is-ghost"]),type:"button"},[a(_,{icon:["fas","arrow-up-long"],flip:"vertical"}),a(_,{icon:["far","calendar"]})],10,re),o("button",{id:"btnSortLogAsc",onClick:F,title:e.$t("admin.sort_by_date_asc"),class:u([{"has-text-grey":n(g)},"button p-1 is-ghost"]),type:"button"},[a(_,{icon:["fas","arrow-up-long"]}),a(_,{icon:["far","calendar"]})],10,ie)])])])):C("",!0),n($).length>0?(r(),l("div",le,[(r(!0),l(x,null,G(n($),t=>(r(),l("div",{key:t.id,class:"list-item is-size-6 is-size-7-mobile has-text-grey is-flex is-justify-content-space-between"},[a(n(Q),null,{default:A(({mode:k})=>[o("div",null,[o("div",null,[v(t)?(r(),l("span",{key:0,innerHTML:e.$t("admin.failed_login_on",{login_at:t.login_at})},null,8,ae)):D(t)?(r(),l("span",{key:1,innerHTML:e.$t("admin.successful_logout_on",{login_at:t.logout_at})},null,8,de)):n(I).config.proxyAuth?(r(),l("span",{key:2,innerHTML:e.$t("admin.viewed_on",{login_at:t.login_at})},null,8,ue)):(r(),l("span",{key:3,innerHTML:e.$t("admin.successful_login_on",{login_at:t.login_at})},null,8,ce))]),o("div",null,[w(i(e.$t("commons.IP"))+": ",1),o("span",he,i(t.ip_address),1),w(" - "+i(e.$t("commons.browser"))+": ",1),o("span",me,i(t.browser),1),w(" - "+i(e.$t("commons.operating_system_short"))+": ",1),o("span",_e,i(t.platform),1)])]),o("div",{class:u([k=="dark"?"has-text-grey-darker":"has-text-grey-lighter","is-align-self-center"])},[a(n(K),{class:"fa-2x width-1-5x"},{default:A(()=>[a(_,{icon:["fas",Y(t.device)],transform:"grow-6","fixed-width":""},null,8,["icon"]),a(_,{icon:["fas",v(t)?"times":"check"],transform:"shrink-7"+(t.device=="desktop"?" up-2":""),class:u(v(t)?"has-text-danger"+(k=="dark"?"-dark":""):"has-text-success"+(k=="dark"?"-dark":"")),"fixed-width":""},null,8,["icon","transform","class"])]),_:2},1024)],2)]),_:2},1024)]))),128))])):n(c).length==0?(r(),l("div",ge,i(e.$t("commons.no_entry_yet")),1)):(r(),l("div",fe,i(e.$t("commons.no_result")),1)),a(W,{isVisible:n(b)},null,8,["isVisible"])],64)}}};export{ve as _}; +//# sourceMappingURL=AccessLogViewer-DhKO22h5.js.map diff --git a/public/build/assets/AccessLogViewer-DhKO22h5.js.map b/public/build/assets/AccessLogViewer-DhKO22h5.js.map new file mode 100644 index 00000000..745ffacf --- /dev/null +++ b/public/build/assets/AccessLogViewer-DhKO22h5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AccessLogViewer-DhKO22h5.js","sources":["../../../resources/js/components/AccessLogViewer.vue"],"sourcesContent":["\n\n"],"names":["notify","useNotifyStore","$2fauth","inject","props","__props","periods","authentications","ref","isFetching","searched","period","orderIsDesc","emit","__emit","visibleAuthentications","computed","authentication","onMounted","getAuthentications","setPeriod","duration","setAsc","sortAsc","a","b","setDesc","sortDesc","limit","userService","response","error","device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AAY,OAAS,GAAOe,EAAU,EAAGJ,EAAO,CACnD,CAAA,EACA,MAAMQ,GAAS,CACZ/B,EAAO,MAAM+B,CAAK,CACrB,CAAA,EACA,QAAQ,IAAM,CACXtB,EAAW,MAAQ,EACtB,CAAA,CACT,CAEI,MAAMuB,EAAcC,GAAW,CAC3B,OAAQA,EAAM,CACV,IAAK,QACD,MAAO,gBACX,IAAK,SACD,MAAO,uBACX,QACI,MAAO,SACvB,CACA,EAMUC,EAAsBjB,GACjB,CAACA,EAAe,UAAYA,EAAe,UAGhDkB,EAAiBlB,GACZ,CAACA,EAAe,kBAAoB,CAACA,EAAe"} \ No newline at end of file diff --git a/public/build/assets/Account-Bvea0oZ6.js b/public/build/assets/Account-Bvea0oZ6.js deleted file mode 100644 index 95cc73ed..00000000 --- a/public/build/assets/Account-Bvea0oZ6.js +++ /dev/null @@ -1 +0,0 @@ -import{L as C,a as U,b as S,u as K,a2 as L,d as y,a1 as D,e as p,f as _,g as w,m as a,h as n,p as E,i as s,t as u,l as g,C as b,H as V}from"./app-CuhK3jij.js";import{F as v}from"./Form-o2lWAB-o.js";import{_ as R}from"./SettingTabs-DdogXjnE.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const H={class:"options-tabs"},M={key:0,class:"notification is-warning"},W={key:1,class:"notification is-info has-text-centered"},j=["innerHTML"],z={class:"title is-4 has-text-grey-light"},I=["disabled"],q={class:"title is-4 pt-6 has-text-grey-light"},G=["disabled"],J={class:"title is-4 pt-6 has-text-danger"},O={class:"field is-size-7-mobile"},Q={class:"block"},X=["disabled"],oe={__name:"Account",setup(Y){const c=C("2fauth"),d=U(),i=S(),F=K(),x=L(c.prefix+"returnTo","accounts"),l=y(new v({name:d.name,email:d.email,password:""})),t=y(new v({currentPassword:"",password:"",password_confirmation:""})),m=y(new v({password:""}));function T(r){l.put("/user",{returnError:!0}).then(e=>{d.$patch({name:e.data.name,email:e.data.email,isAdmin:e.data.is_admin}),i.success({text:V("auth.forms.profile_saved")})}).catch(e=>{e.response.status===400?i.alert({text:e.response.data.message}):e.response.status!==422&&i.error(e.response)})}function P(r){t.patch("/user/password",{returnError:!0}).then(e=>{t.password="",t.formPassword="",t.password_confirmation="",i.success({text:e.data.message})}).catch(e=>{e.response.status===400?i.alert({text:e.response.data.message}):e.response.status!==422&&i.error(e.response)})}function $(r){confirm(V("auth.confirm.delete_account"))&&m.delete("/user",{returnError:!0}).then(e=>{i.success({text:V("auth.forms.user_account_successfully_deleted")}),F.push({name:"register"})}).catch(e=>{e.response.status===400?i.alert({text:e.response.data.message}):e.response.status!==422&&i.error(e.response)})}return D(r=>{!r.name.startsWith("settings.")&&r.name==="login"&&i.clear()}),(r,e)=>{const f=p("FormField"),h=p("FormButtons"),B=p("FormPasswordField"),N=p("FormWrapper"),k=p("ButtonBackCloseCancel"),A=p("VueFooter");return _(),w("div",null,[a(R,{activeTab:"settings.account"},null,8,["activeTab"]),n("div",H,[a(N,null,{default:E(()=>[s(d).isAdmin?(_(),w("div",M,u(r.$t("settings.you_are_administrator")),1)):g("",!0),s(d).oauth_provider?(_(),w("div",W,u(r.$t("settings.account_linked_to_sso_x_provider",{provider:s(d).oauth_provider})),1)):g("",!0),n("form",{onSubmit:b(T,["prevent"]),onKeydown:e[3]||(e[3]=o=>s(l).onKeydown(o))},[s(c).config.proxyAuth?(_(),w("div",{key:0,class:"notification is-warning has-text-centered",innerHTML:r.$t("auth.user_account_controlled_by_proxy")},null,8,j)):g("",!0),n("h4",z,u(r.$t("settings.profile")),1),n("fieldset",{disabled:s(c).config.proxyAuth||s(d).oauth_provider},[a(f,{modelValue:s(l).name,"onUpdate:modelValue":e[0]||(e[0]=o=>s(l).name=o),fieldName:"name",fieldError:s(l).errors.get("name"),label:"auth.forms.name",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),a(f,{modelValue:s(l).email,"onUpdate:modelValue":e[1]||(e[1]=o=>s(l).email=o),fieldName:"email",fieldError:s(l).errors.get("email"),inputType:"email",label:"auth.forms.email",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),a(f,{modelValue:s(l).password,"onUpdate:modelValue":e[2]||(e[2]=o=>s(l).password=o),fieldName:"password",fieldError:s(l).errors.get("password"),inputType:"password",label:"auth.forms.current_password.label",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),a(h,{isBusy:s(l).isBusy,caption:"commons.update"},null,8,["isBusy"])],8,I)],32),n("form",{onSubmit:b(P,["prevent"]),onKeydown:e[7]||(e[7]=o=>s(t).onKeydown(o))},[n("h4",q,u(r.$t("settings.change_password")),1),n("fieldset",{disabled:s(c).config.proxyAuth||s(d).oauth_provider},[a(B,{modelValue:s(t).password,"onUpdate:modelValue":e[4]||(e[4]=o=>s(t).password=o),fieldName:"password",fieldError:s(t).errors.get("password"),autocomplete:"new-password",showRules:!0,label:"auth.forms.new_password"},null,8,["modelValue","fieldError"]),a(B,{modelValue:s(t).password_confirmation,"onUpdate:modelValue":e[5]||(e[5]=o=>s(t).password_confirmation=o),showRules:!1,fieldName:"password_confirmation",fieldError:s(t).errors.get("password_confirmation"),inputType:"password",autocomplete:"new-password",label:"auth.forms.confirm_new_password"},null,8,["modelValue","fieldError"]),a(f,{modelValue:s(t).currentPassword,"onUpdate:modelValue":e[6]||(e[6]=o=>s(t).currentPassword=o),fieldName:"currentPassword",fieldError:s(t).errors.get("currentPassword"),inputType:"password",label:"auth.forms.current_password.label",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),a(h,{isBusy:s(t).isBusy,caption:"auth.forms.change_password"},null,8,["isBusy"])],8,G)],32),n("form",{id:"frmDeleteAccount",onSubmit:b($,["prevent"]),onKeydown:e[9]||(e[9]=o=>s(m).onKeydown(o))},[n("h4",J,u(r.$t("auth.forms.delete_account")),1),n("div",O,[n("p",Q,u(r.$t("auth.forms.delete_your_account_and_reset_all_data")),1),n("p",null,u(r.$t("auth.forms.reset_your_password_to_delete_your_account")),1),n("p",null,u(r.$t("auth.forms.deleting_2fauth_account_does_not_impact_provider")),1)]),n("fieldset",{disabled:s(c).config.proxyAuth},[a(f,{modelValue:s(m).password,"onUpdate:modelValue":e[8]||(e[8]=o=>s(m).password=o),fieldName:"password",fieldError:s(m).errors.get("password"),inputType:"password",autocomplete:"new-password",label:"auth.forms.current_password.label",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),a(h,{isBusy:s(m).isBusy,caption:"auth.forms.delete_your_account",submitId:"btnDeleteAccount",color:"is-danger"},null,8,["isBusy"])],8,X)],32)]),_:1})]),a(A,{showButtons:!0},{default:E(()=>[a(k,{returnTo:{name:s(x)},action:"close"},null,8,["returnTo"])]),_:1})])}}};export{oe as default}; diff --git a/public/build/assets/Account-CPg75o3J.js b/public/build/assets/Account-CPg75o3J.js new file mode 100644 index 00000000..dc326786 --- /dev/null +++ b/public/build/assets/Account-CPg75o3J.js @@ -0,0 +1,2 @@ +import{u as A,a as U,a2 as C,c as y,a1 as D,d as _,j as l,e as t,k as B,L as K,l as p,m as w,f as s,t as d,i as g,G as b,p as L,H as v}from"./app-CzxRjCVM.js";import{F as V}from"./Form-EFIuWKGI.js";import{_ as R}from"./SettingTabs-CcdxaQB3.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const H={class:"options-tabs"},M={key:0,class:"notification is-warning"},W={key:1,class:"notification is-info has-text-centered"},j=["innerHTML"],I={class:"title is-4 has-text-grey-light"},z=["disabled"],G=["value"],q=["value"],J={class:"title is-4 pt-6 has-text-grey-light"},O=["disabled"],Q=["value"],X=["value"],Y={class:"title is-4 pt-6 has-text-danger"},Z={class:"field is-size-7-mobile"},ee={class:"block"},se=["disabled"],ne={__name:"Account",setup(oe){const c=K("2fauth"),u=A(),i=U(),E=L(),F=C(c.prefix+"returnTo","accounts"),a=y(new V({name:u.name,email:u.email,password:""})),r=y(new V({currentPassword:"",password:"",password_confirmation:""})),m=y(new V({password:""}));function P(n){a.put("/user",{returnError:!0}).then(e=>{u.$patch({name:e.data.name,email:e.data.email,isAdmin:e.data.is_admin}),i.success({text:v("auth.forms.profile_saved")})}).catch(e=>{e.response.status===400?i.alert({text:e.response.data.message}):e.response.status!==422&&i.error(e.response)})}function T(n){r.patch("/user/password",{returnError:!0}).then(e=>{r.password="",r.formPassword="",r.password_confirmation="",i.success({text:e.data.message})}).catch(e=>{e.response.status===400?i.alert({text:e.response.data.message}):e.response.status!==422&&i.error(e.response)})}function $(n){confirm(v("auth.confirm.delete_account"))&&m.delete("/user",{returnError:!0}).then(e=>{i.success({text:v("auth.forms.user_account_successfully_deleted")}),E.push({name:"register"})}).catch(e=>{e.response.status===400?i.alert({text:e.response.data.message}):e.response.status!==422&&i.error(e.response)})}return D(n=>{!n.name.startsWith("settings.")&&n.name==="login"&&i.clear()}),(n,e)=>{const f=p("FormField"),h=p("FormButtons"),x=p("FormPasswordField"),N=p("FormWrapper"),k=p("ButtonBackCloseCancel"),S=p("VueFooter");return w(),_("div",null,[l(R,{activeTab:"settings.account"}),t("div",H,[l(N,null,{default:B(()=>[s(u).isAdmin?(w(),_("div",M,d(n.$t("settings.you_are_administrator")),1)):g("",!0),s(u).oauth_provider?(w(),_("div",W,d(n.$t("settings.account_linked_to_sso_x_provider",{provider:s(u).oauth_provider})),1)):g("",!0),t("form",{onSubmit:b(P,["prevent"]),onKeydown:e[3]||(e[3]=o=>s(a).onKeydown(o))},[s(c).config.proxyAuth?(w(),_("div",{key:0,class:"notification is-warning has-text-centered",innerHTML:n.$t("auth.user_account_controlled_by_proxy")},null,8,j)):g("",!0),t("h4",I,d(n.$t("settings.profile")),1),t("fieldset",{disabled:s(c).config.proxyAuth||s(u).oauth_provider},[l(f,{modelValue:s(a).name,"onUpdate:modelValue":e[0]||(e[0]=o=>s(a).name=o),fieldName:"name",fieldError:s(a).errors.get("name"),label:"auth.forms.name",maxLength:255,autocomplete:"username",autofocus:""},null,8,["modelValue","fieldError"]),l(f,{modelValue:s(a).email,"onUpdate:modelValue":e[1]||(e[1]=o=>s(a).email=o),fieldName:"email",fieldError:s(a).errors.get("email"),inputType:"email",label:"auth.forms.email",autocomplete:"email",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),l(f,{modelValue:s(a).password,"onUpdate:modelValue":e[2]||(e[2]=o=>s(a).password=o),fieldName:"password",fieldError:s(a).errors.get("password"),inputType:"password",label:"auth.forms.current_password.label",autocomplete:"current-password",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),l(h,{isBusy:s(a).isBusy,caption:"commons.update"},null,8,["isBusy"])],8,z)],32),t("form",{onSubmit:b(T,["prevent"]),onKeydown:e[7]||(e[7]=o=>s(r).onKeydown(o))},[t("input",{hidden:"",type:"text",name:"name",value:s(a).name,autocomplete:"username"},null,8,G),t("input",{hidden:"",type:"text",name:"email",value:s(a).email,autocomplete:"email"},null,8,q),t("h4",J,d(n.$t("settings.change_password")),1),t("fieldset",{disabled:s(c).config.proxyAuth||s(u).oauth_provider},[l(x,{modelValue:s(r).password,"onUpdate:modelValue":e[4]||(e[4]=o=>s(r).password=o),fieldName:"password",fieldError:s(r).errors.get("password"),idSuffix:"ForUpdate",autocomplete:"new-password",showRules:!0,label:"auth.forms.new_password"},null,8,["modelValue","fieldError"]),l(x,{modelValue:s(r).password_confirmation,"onUpdate:modelValue":e[5]||(e[5]=o=>s(r).password_confirmation=o),showRules:!1,fieldName:"password_confirmation",fieldError:s(r).errors.get("password_confirmation"),inputType:"password",autocomplete:"new-password",label:"auth.forms.confirm_new_password"},null,8,["modelValue","fieldError"]),l(f,{modelValue:s(r).currentPassword,"onUpdate:modelValue":e[6]||(e[6]=o=>s(r).currentPassword=o),fieldName:"currentPassword",fieldError:s(r).errors.get("currentPassword"),inputType:"password",label:"auth.forms.current_password.label",autocomplete:"current-password",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),l(h,{isBusy:s(r).isBusy,submitId:"btnSubmitChangePwd",caption:"auth.forms.change_password"},null,8,["isBusy"])],8,O)],32),t("form",{id:"frmDeleteAccount",onSubmit:b($,["prevent"]),onKeydown:e[9]||(e[9]=o=>s(m).onKeydown(o))},[t("input",{hidden:"",type:"text",name:"name",value:s(a).name,autocomplete:"username"},null,8,Q),t("input",{hidden:"",type:"text",name:"email",value:s(a).email,autocomplete:"email"},null,8,X),t("h4",Y,d(n.$t("auth.forms.delete_account")),1),t("div",Z,[t("p",ee,d(n.$t("auth.forms.delete_your_account_and_reset_all_data")),1),t("p",null,d(n.$t("auth.forms.reset_your_password_to_delete_your_account")),1),t("p",null,d(n.$t("auth.forms.deleting_2fauth_account_does_not_impact_provider")),1)]),t("fieldset",{disabled:s(c).config.proxyAuth},[l(f,{modelValue:s(m).password,"onUpdate:modelValue":e[8]||(e[8]=o=>s(m).password=o),fieldName:"password",fieldError:s(m).errors.get("password"),inputType:"password",idSuffix:"ForDelete",autocomplete:"new-password",label:"auth.forms.current_password.label",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),l(h,{isBusy:s(m).isBusy,caption:"auth.forms.delete_your_account",submitId:"btnDeleteAccount",color:"is-danger"},null,8,["isBusy"])],8,se)],32)]),_:1})]),l(S,{showButtons:!0},{default:B(()=>[l(k,{returnTo:{name:s(F)},action:"close"},null,8,["returnTo"])]),_:1})])}}};export{ne as default}; +//# sourceMappingURL=Account-CPg75o3J.js.map diff --git a/public/build/assets/Account-CPg75o3J.js.map b/public/build/assets/Account-CPg75o3J.js.map new file mode 100644 index 00000000..25bf4cb2 --- /dev/null +++ b/public/build/assets/Account-CPg75o3J.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Account-CPg75o3J.js","sources":["../../../resources/js/views/settings/Account.vue"],"sourcesContent":["\n\n\n"],"names":["$2fauth","inject","user","useUserStore","notify","useNotifyStore","router","useRouter","returnTo","useStorage","formProfile","reactive","Form","formPassword","formDelete","submitProfile","e","response","trans","error","submitPassword","submitDelete","onBeforeRouteLeave","to"],"mappings":"wxBAMI,MAAMA,EAAUC,EAAO,QAAQ,EACzBC,EAAOC,EAAY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L,EAAG,CAEnB,QAAQE,EAAM,6BAA6B,CAAC,GAC3CJ,EAAW,OAAO,QAAS,CAAC,YAAa,EAAI,CAAC,EAC7C,KAAKG,GAAY,CACdb,EAAO,QAAQ,CAAE,KAAMc,EAAM,8CAA8C,CAAG,CAAA,EAC9EZ,EAAO,KAAK,CAAE,KAAM,UAAU,CAAE,CACnC,CAAA,EACA,MAAMa,GAAS,CACRA,EAAM,SAAS,SAAW,IAC1Bf,EAAO,MAAM,CAAE,KAAMe,EAAM,SAAS,KAAK,OAAS,CAAA,EAE7CA,EAAM,SAAS,SAAW,KAC/Bf,EAAO,MAAMe,EAAM,QAAQ,CAElC,CAAA,CAEb,CAEI,OAAAG,EAAoBC,GAAO,CACnB,CAAEA,EAAG,KAAK,WAAW,WAAW,GAAKA,EAAG,OAAS,SACjDnB,EAAO,MAAK,CAEnB,CAAA"} \ No newline at end of file diff --git a/public/build/assets/Accounts-BErdy-fg.js b/public/build/assets/Accounts-BErdy-fg.js new file mode 100644 index 00000000..8ee256ad --- /dev/null +++ b/public/build/assets/Accounts-BErdy-fg.js @@ -0,0 +1,7 @@ +import{u as Rt,l as re,m as w,d as k,e as g,F as Qe,D as ft,j as T,k as R,n as q,t as I,f as p,U as Ze,g as Re,I as vn,r as ne,J as rt,K as bn,y as _n,p as Bt,h as ge,i as Y,L as Jt,M as yn,N as wn,C as Ye,O as Yt,P as st,Q as En,a as Sn,R as Dn,S as kn,b as Cn,T as $n,s as yt,x as Tn,o as On,H as wt,G as $e,V as In,z as Et,W as An,w as St,X as Xe,A as zt,Y as Mn}from"./app-CzxRjCVM.js";import{_ as xn,a as Pn,b as Nn}from"./OtpDisplay-ytUtG8ZN.js";import{_ as Fn}from"./SearchBox-CH3IEr_n.js";import{u as Rn}from"./bus-BNAtGMCo.js";import"./Spinner-C-V0HKYn.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const Bn={id:"groupSwitch",class:"container groups"},Gn={class:"columns is-centered"},Ln={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Xn={class:"columns is-multiline"},Yn=["onClick"],zn={class:"columns is-centered"},Un={class:"column has-text-centered"},Hn={__name:"GroupSwitch",props:{showGroupSwitch:Boolean,groups:Array},emits:["update:showGroupSwitch"],setup(o,{emit:e}){const n=Rt(),t=e;function i(r){n.preferences.activeGroup=r,n.preferences.rememberActiveGroup&&vn.updatePreference("activeGroup",r),t("update:showGroupSwitch",!1)}return(r,s)=>{const l=re("RouterLink"),u=re("ButtonBackCloseCancel"),a=re("VueFooter");return w(),k("div",Bn,[g("div",Gn,[g("div",Ln,[g("div",Xn,[(w(!0),k(Qe,null,ft(o.groups,f=>(w(),k("div",{class:"column is-full",key:f.id},[T(p(Ze),null,{default:R(({mode:c})=>[g("button",{type:"button",class:q(["button is-fullwidth",{"is-dark has-text-light is-outlined":c=="dark"}]),onClick:E=>i(f.id)},I(f.name),11,Yn)]),_:2},1024)]))),128))]),g("div",zn,[g("div",Un,[T(l,{to:{name:"groups"}},{default:R(()=>[Re(I(r.$t("groups.manage_groups")),1)]),_:1})])])])]),T(a,{showButtons:!0},{default:R(()=>[T(u,{action:"close",useLinkTag:!1,onClosed:s[0]||(s[0]=f=>r.$emit("update:showGroupSwitch",!1))})]),_:1})])}}},qn={class:"container group-selector"},Wn={class:"columns is-centered is-multiline"},Vn={class:"column is-full has-text-centered"},jn={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Kn={class:"columns is-multiline"},Qn=["onClick"],Zn={key:0,class:"is-italic"},Jn={key:1},eo={class:"columns is-centered"},to={class:"column has-text-centered"},no={class:"control"},oo={__name:"DestinationGroupSelector",props:{showDestinationGroupSelector:Boolean,selectedAccountsIds:Array,groups:Array},emits:["update:showDestinationGroupSelector","accounts-moved"],setup(o,{emit:e}){const n=o,t=ne(null),i=e;async function r(){t.value===0?await rt.withdraw(n.selectedAccountsIds):await bn.assign(n.selectedAccountsIds,t.value),i("accounts-moved")}return(s,l)=>{const u=re("RouterLink"),a=re("ButtonBackCloseCancel"),f=re("VueFooter");return w(),k("div",qn,[g("div",Wn,[g("div",Vn,I(s.$t("groups.move_selected_to")),1),g("div",jn,[g("div",Kn,[(w(!0),k(Qe,null,ft(o.groups,c=>(w(),k("div",{class:"column is-full",key:c.id},[T(p(Ze),null,{default:R(({mode:E})=>[g("button",{type:"button",class:q(["button is-fullwidth",{"is-link":p(t)===c.id,"is-dark has-text-light is-outlined":E=="dark"}]),onClick:D=>t.value=c.id},[c.id===0?(w(),k("span",Zn,I(s.$t("groups.no_group")),1)):(w(),k("span",Jn,I(c.name),1))],10,Qn)]),_:2},1024)]))),128))]),g("div",eo,[g("div",to,[T(u,{to:{name:"groups"}},{default:R(()=>[Re(I(s.$t("groups.manage_groups")),1)]),_:1})])])])]),T(f,{showButtons:!0},{default:R(()=>[g("p",no,[g("button",{type:"button",class:"button is-link is-rounded",onClick:r},I(s.$t("commons.move")),1)]),T(a,{action:"cancel",useLinkTag:!1,onCanceled:l[0]||(l[0]=c=>s.$emit("update:showDestinationGroupSelector",!1))})]),_:1})])}}},io={class:"toolbar has-text-centered"},ro={class:"columns"},so={class:"column has-nowrap px-0"},ao={class:"has-text-grey mr-1"},lo=["title"],uo=["title"],co=["title"],fo=["title"],po={__name:"Toolbar",props:{selectedCount:Number},setup(o){return(e,n)=>{const t=re("FontAwesomeIcon");return w(),k("div",io,[g("div",ro,[g("div",so,[g("span",ao,I(e.$t("commons.x_selected",{count:o.selectedCount})),1),g("button",{type:"button",id:"btnUnselectAll",onClick:n[0]||(n[0]=i=>e.$emit("clear-selected")),class:"clear-selection delete mr-4",style:_n({visibility:o.selectedCount>0?"visible":"hidden"}),title:e.$t("commons.clear_selection")},null,12,lo),g("button",{type:"button",id:"btnSelectAll",onClick:n[1]||(n[1]=i=>e.$emit("select-all")),class:"button mr-5 has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.select_all")},[g("span",null,I(e.$t("commons.check_all")),1),T(t,{class:"ml-1",icon:["fas","check-square"]})],8,uo),g("button",{type:"button",id:"btnSortAscending",onClick:n[2]||(n[2]=i=>e.$emit("sort-asc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_ascending")},[T(t,{icon:["fas","sort-alpha-down"]})],8,co),g("button",{type:"button",id:"btnSortDescending",onClick:n[3]||(n[3]=i=>e.$emit("sort-desc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_descending")},[T(t,{icon:["fas","sort-alpha-up"]})],8,fo)])])])}}},ho={key:0,class:"control"},mo={class:"icon is-small"},go={key:1,class:"control"},vo={key:2,class:"control"},bo=["disabled","title"],_o={key:3,class:"control"},yo=["disabled"],wo={key:4,class:"control"},Eo=["disabled","title"],So={__name:"ActionButtons",props:{inManagementMode:Boolean,areDisabled:Boolean},emits:["update:inManagementMode","move-button-clicked","delete-button-clicked","export-button-clicked"],setup(o,{emit:e}){const n=Bt(),t=Rt();function i(){t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="advancedForm"?n.push({name:"createAccount"}):t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="livescan"?n.push({name:"capture"}):n.push({name:"start"})}return(r,s)=>{const l=re("FontAwesomeIcon");return w(),ge(p(Ze),null,{default:R(({mode:u})=>[o.inManagementMode?Y("",!0):(w(),k("p",ho,[g("button",{type:"button",class:"button is-link is-rounded is-focus",onClick:i},[g("span",null,I(r.$t("commons.new")),1),g("span",mo,[T(l,{icon:["fas","qrcode"]})])])])),o.inManagementMode?Y("",!0):(w(),k("p",go,[g("button",{type:"button",id:"btnManage",class:q(["button is-rounded",{"is-dark":u=="dark"}]),onClick:s[0]||(s[0]=a=>r.$emit("update:inManagementMode",!0))},I(r.$t("commons.manage")),3)])),o.inManagementMode?(w(),k("p",vo,[g("button",{id:"btnMove",disabled:o.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[1]||(s[1]=a=>r.$emit("move-button-clicked")),title:r.$t("groups.move_selected_to_group")},I(r.$t("commons.move")),11,bo)])):Y("",!0),o.inManagementMode?(w(),k("p",_o,[g("button",{id:"btnDelete",disabled:o.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[2]||(s[2]=a=>r.$emit("delete-button-clicked"))},I(r.$t("commons.delete")),11,yo)])):Y("",!0),o.inManagementMode?(w(),k("p",wo,[g("button",{id:"btnExport",disabled:o.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[3]||(s[3]=a=>r.$emit("export-button-clicked")),title:r.$t("twofaccounts.export_selected_accounts")},I(r.$t("commons.export")),11,Eo)])):Y("",!0)]),_:1})}}},Do={class:"block"},ko={class:"has-text-weight-bold has-text-grey"},Co={class:"is-size-7-mobile"},$o=["href"],To=["title"],Oo={class:"block"},Io={class:"has-text-weight-bold has-text-grey"},Ao={class:"is-size-7-mobile"},Mo=["title"],xo={__name:"ExportButtons",emits:["export-twofauth-format","export-otpauth-format"],setup(o,{emit:e}){Bt();const n=Jt("2fauth");return(t,i)=>(w(),k(Qe,null,[g("div",Do,[T(p(Ze),null,{default:R(({mode:r})=>[g("p",ko,I(t.$t("twofaccounts.twofauth_export_format_sub")),1)]),_:1}),g("p",Co,[Re(I(t.$t("twofaccounts.twofauth_export_format_desc"))+" "+I(t.$t("twofaccounts.twofauth_export_format_url"))+" ",1),g("a",{id:"lnkExportSchemaUrl",class:"is-link",tabindex:"0",href:p(n).urls.exportSchemaUrl,target:"_blank"},I(t.$t("twofaccounts.twofauth_export_schema")),9,$o)]),g("button",{type:"button",id:"btnExport2FAuth",class:"button is-link is-rounded is-focus my-3",onClick:i[0]||(i[0]=r=>t.$emit("export-twofauth-format")),title:t.$t("twofaccounts.twofauth_export_format_sub")},I(t.$t("twofaccounts.twofauth_export_format")),9,To)]),g("div",Oo,[g("p",Io,I(t.$t("twofaccounts.otpauth_export_format_sub")),1),g("p",Ao,I(t.$t("twofaccounts.otpauth_export_format_desc")),1),g("button",{type:"button",id:"btnExportOtpauth",class:"button is-link is-rounded is-focus my-3",onClick:i[1]||(i[1]=r=>t.$emit("export-otpauth-format")),title:t.$t("twofaccounts.otpauth_export_format_sub")},I(t.$t("twofaccounts.otpauth_export_format")),9,Mo)])],64))}};/**! + * Sortable 1.15.3 + * @author RubaXa + * @author owenm + * @license MIT + */function Ut(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),n.push.apply(n,t)}return n}function he(o){for(var e=1;e=0)&&(n[i]=o[i]);return n}function Fo(o,e){if(o==null)return{};var n=No(o,e),t,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(o,t)&&(n[t]=o[t])}return n}var Ro="1.15.3";function ve(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var _e=ve(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Je=ve(/Edge/i),Ht=ve(/firefox/i),qe=ve(/safari/i)&&!ve(/chrome/i)&&!ve(/android/i),en=ve(/iP(ad|od|hone)/i),tn=ve(/chrome/i)&&ve(/android/i),nn={capture:!1,passive:!1};function O(o,e,n){o.addEventListener(e,n,!_e&&nn)}function $(o,e,n){o.removeEventListener(e,n,!_e&&nn)}function pt(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function on(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function de(o,e,n,t){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&pt(o,e):pt(o,e))||t&&o===n)return o;if(o===n)break}while(o=on(o))}return null}var qt=/\s+/g;function oe(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var t=(" "+o.className+" ").replace(qt," ").replace(" "+e+" "," ");o.className=(t+(n?" "+e:"")).replace(qt," ")}}function b(o,e,n){var t=o&&o.style;if(t){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in t)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),t[e]=n+(typeof n=="string"?"":"px")}}function Be(o,e){var n="";if(typeof o=="string")n=o;else do{var t=b(o,"transform");t&&t!=="none"&&(n=t+" "+n)}while(!e&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function rn(o,e,n){if(o){var t=o.getElementsByTagName(e),i=0,r=t.length;if(n)for(;i=r,!s)return t;if(t===pe())break;t=De(t,!1)}return!1}function Ge(o,e,n,t){for(var i=0,r=0,s=o.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=t.evt,r=Fo(t,Ho);et.pluginEvent.bind(_)(e,n,he({dragEl:d,parentEl:x,ghostEl:y,rootEl:A,nextEl:Ie,lastDownEl:lt,cloneEl:M,cloneHidden:Se,dragStarted:ze,putSortable:X,activeSortable:_.active,originalEvent:i,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:ie,newDraggableIndex:Ee,hideGhostForTarget:pn,unhideGhostForTarget:hn,cloneNowHidden:function(){Se=!0},cloneNowShown:function(){Se=!1},dispatchSortableEvent:function(l){j({sortable:n,name:l,originalEvent:i})}},r))};function j(o){Uo(he({putSortable:X,cloneEl:M,targetEl:d,rootEl:A,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:ie,newDraggableIndex:Ee},o))}var d,x,y,A,Ie,lt,M,Se,Fe,ie,Ve,Ee,tt,X,Ne=!1,ht=!1,mt=[],Te,ue,Ct,$t,jt,Kt,ze,Pe,je,Ke=!1,nt=!1,ut,H,Tt=[],xt=!1,gt=[],bt=typeof document<"u",ot=en,Qt=Je||_e?"cssFloat":"float",qo=bt&&!tn&&!en&&"draggable"in document.createElement("div"),dn=function(){if(bt){if(_e)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),cn=function(e,n){var t=b(e),i=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),r=Ge(e,0,n),s=Ge(e,1,n),l=r&&b(r),u=s&&b(s),a=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+N(r).width,f=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+N(s).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return s&&(u.clear==="both"||u.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||a>=i&&t[Qt]==="none"||s&&t[Qt]==="none"&&a+f>i)?"vertical":"horizontal"},Wo=function(e,n,t){var i=t?e.left:e.top,r=t?e.right:e.bottom,s=t?e.width:e.height,l=t?n.left:n.top,u=t?n.right:n.bottom,a=t?n.width:n.height;return i===l||r===u||i+s/2===l+a/2},Vo=function(e,n){var t;return mt.some(function(i){var r=i[Z].options.emptyInsertThreshold;if(!(!r||Gt(i))){var s=N(i),l=e>=s.left-r&&e<=s.right+r,u=n>=s.top-r&&n<=s.bottom+r;if(l&&u)return t=i}}),t},fn=function(e){function n(r,s){return function(l,u,a,f){var c=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(r==null&&(s||c))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(l,u,a,f),s)(l,u,a,f);var E=(s?l:u).options.group.name;return r===!0||typeof r=="string"&&r===E||r.join&&r.indexOf(E)>-1}}var t={},i=e.group;(!i||at(i)!="object")&&(i={name:i}),t.name=i.name,t.checkPull=n(i.pull,!0),t.checkPut=n(i.put),t.revertClone=i.revertClone,e.group=t},pn=function(){!dn&&y&&b(y,"display","none")},hn=function(){!dn&&y&&b(y,"display","")};bt&&!tn&&document.addEventListener("click",function(o){if(ht)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),ht=!1,!1},!0);var Oe=function(e){if(d){e=e.touches?e.touches[0]:e;var n=Vo(e.clientX,e.clientY);if(n){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[Z]._onDragOver(t)}}},jo=function(e){d&&d.parentNode[Z]._isOutsideThisEl(e.target)};function _(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=be({},e),o[Z]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return cn(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:_.supportPointer!==!1&&"PointerEvent"in window&&!qe,emptyInsertThreshold:5};et.initializePlugins(this,o,n);for(var t in n)!(t in e)&&(e[t]=n[t]);fn(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:qo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?O(o,"pointerdown",this._onTapStart):(O(o,"mousedown",this._onTapStart),O(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(o,"dragover",this),O(o,"dragenter",this)),mt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),be(this,Xo())}_.prototype={constructor:_,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,i=this.options,r=i.preventOnFilter,s=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,f=i.filter;if(oi(t),!d&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&qe&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=de(u,i.draggable,t,!1),!(u&&u.animated)&<!==u)){if(Fe=ae(u),Ve=ae(u,i.draggable),typeof f=="function"){if(f.call(this,e,u,this)){j({sortable:n,rootEl:a,name:"filter",targetEl:u,toEl:t,fromEl:t}),Q("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(f&&(f=f.split(",").some(function(c){if(c=de(a,c.trim(),t,!1),c)return j({sortable:n,rootEl:c,name:"filter",targetEl:u,fromEl:t,toEl:t}),Q("filter",n,{evt:e}),!0}),f)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!de(a,i.handle,t,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,n,t){var i=this,r=i.el,s=i.options,l=r.ownerDocument,u;if(t&&!d&&t.parentNode===r){var a=N(t);if(A=r,d=t,x=d.parentNode,Ie=d.nextSibling,lt=t,tt=s.group,_.dragged=d,Te={target:d,clientX:(n||e).clientX,clientY:(n||e).clientY},jt=Te.clientX-a.left,Kt=Te.clientY-a.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,d.style["will-change"]="all",u=function(){if(Q("delayEnded",i,{evt:e}),_.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Ht&&i.nativeDraggable&&(d.draggable=!0),i._triggerDragStart(e,n),j({sortable:i,name:"choose",originalEvent:e}),oe(d,s.chosenClass,!0)},s.ignore.split(",").forEach(function(f){rn(d,f.trim(),Ot)}),O(l,"dragover",Oe),O(l,"mousemove",Oe),O(l,"touchmove",Oe),O(l,"mouseup",i._onDrop),O(l,"touchend",i._onDrop),O(l,"touchcancel",i._onDrop),Ht&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),Q("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Je||_e))){if(_.eventCanceled){this._onDrop();return}O(l,"mouseup",i._disableDelayedDrag),O(l,"touchend",i._disableDelayedDrag),O(l,"touchcancel",i._disableDelayedDrag),O(l,"mousemove",i._delayedDragTouchMoveHandler),O(l,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&O(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,s.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&Ot(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;$(e,"mouseup",this._disableDelayedDrag),$(e,"touchend",this._disableDelayedDrag),$(e,"touchcancel",this._disableDelayedDrag),$(e,"mousemove",this._delayedDragTouchMoveHandler),$(e,"touchmove",this._delayedDragTouchMoveHandler),$(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):n?O(document,"touchmove",this._onTouchMove):O(document,"mousemove",this._onTouchMove):(O(d,"dragend",this),O(A,"dragstart",this._onDragStart));try{document.selection?dt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ne=!1,A&&d){Q("dragStarted",this,{evt:n}),this.nativeDraggable&&O(document,"dragover",jo);var t=this.options;!e&&oe(d,t.dragClass,!1),oe(d,t.ghostClass,!0),_.active=this,e&&this._appendGhost(),j({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ue){this._lastX=ue.clientX,this._lastY=ue.clientY,pn();for(var e=document.elementFromPoint(ue.clientX,ue.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ue.clientX,ue.clientY),e!==n);)n=e;if(d.parentNode[Z]._isOutsideThisEl(e),n)do{if(n[Z]){var t=void 0;if(t=n[Z]._onDragOver({clientX:ue.clientX,clientY:ue.clientY,target:e,rootEl:n}),t&&!this.options.dragoverBubble)break}e=n}while(n=on(n));hn()}},_onTouchMove:function(e){if(Te){var n=this.options,t=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,s=y&&Be(y,!0),l=y&&s&&s.a,u=y&&s&&s.d,a=ot&&H&&Vt(H),f=(r.clientX-Te.clientX+i.x)/(l||1)+(a?a[0]-Tt[0]:0)/(l||1),c=(r.clientY-Te.clientY+i.y)/(u||1)+(a?a[1]-Tt[1]:0)/(u||1);if(!_.active&&!Ne){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(j({rootEl:x,name:"add",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"remove",toEl:x,originalEvent:e}),j({rootEl:x,name:"sort",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),X&&X.save()):ie!==Fe&&ie>=0&&(j({sortable:this,name:"update",toEl:x,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),_.active&&((ie==null||ie===-1)&&(ie=Fe,Ee=Ve),j({sortable:this,name:"end",toEl:x,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Q("nulling",this),A=d=x=y=Ie=M=lt=Se=Te=ue=ze=ie=Ee=Fe=Ve=Pe=je=X=tt=_.dragged=_.ghost=_.clone=_.active=null,gt.forEach(function(e){e.checked=!0}),gt.length=Ct=$t=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),Ko(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,t=this.el.children,i=0,r=t.length,s=this.options;ii.right+r||o.clientY>t.bottom&&o.clientX>t.left:o.clientY>i.bottom+r||o.clientX>t.right&&o.clientY>t.top}function ei(o,e,n,t,i,r,s,l){var u=t?o.clientY:o.clientX,a=t?n.height:n.width,f=t?n.top:n.left,c=t?n.bottom:n.right,E=!1;if(!s){if(l&&utf+a*r/2:uc-ut)return-je}else if(u>f+a*(1-i)/2&&uc-a*r/2)?u>f+a/2?1:-1:0}function ti(o){return ae(d){gn(e,f.oldIndex,f.newIndex)}},l=()=>{const f=i==null?void 0:i.querySelector(o);!f||t!==void 0||(t=new _(f,{...s,...r}))},u=()=>{t==null||t.destroy(),t=void 0},a=(f,c)=>{if(c!==void 0)t==null||t.option(f,c);else return t==null?void 0:t.option(f)};return yn(l),wn(u),{stop:u,start:l,option:a}}function gn(o,e,n){const t=Ye(o),i=t?[...Yt(o)]:Yt(o);if(n>=0&&n{i.splice(n,0,r),t&&(o.value=i)})}}const si={key:2,class:"header"},ai={class:"columns is-gapless is-mobile is-centered"},li={class:"column is-three-quarters-mobile is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},ui={key:1,class:"has-text-centered"},di={class:"columns"},ci={key:0,class:"column"},fi=["title"],pi={key:1,class:"column"},hi=["title"],mi={key:3},gi={class:"accounts"},vi={class:"tfa-container"},bi={key:0,class:"tfa-cell tfa-checkbox"},_i={class:"field"},yi=["id","value","name"],wi=["for","onKeypress"],Ei=["onClick","onKeyup"],Si={class:"tfa-text has-ellipsis"},Di=["src"],ki=["src"],Ci={class:"has-ellipsis is-family-primary is-size-6 is-size-7-mobile has-text-grey"},$i={class:"has-text-right"},Ti={key:0},Oi={key:0,class:"has-nowrap has-text-grey has-text-centered is-size-5"},Ii=["onClick","onKeyup","title"],Ai={key:1},Mi=["onClick","title"],xi={class:"has-text-right"},Pi=["onClick"],Ni={key:0,class:"tfa-cell tfa-edit has-text-grey"},Fi={key:0,class:"drag-handle tfa-cell tfa-dots has-text-grey"},Yi={__name:"Accounts",setup(o){const e=Jt("2fauth"),n=Bt(),t=Sn(),i=Rt(),r=Rn(),s=Dn(),{copy:l,copied:u}=kn({legacy:!0}),a=Cn(),f=$n(),c=ne(!1),E=ne(!1),D=ne(!1),S=ne(!1);ne(!1);const C=ne(!1),G=ne(null),K=ne(null),F=ne(null),L=ne({otp_type:"",account:"",service:"",icon:""}),z=ne([]),le=ne([]);yt(c,v=>{var m;v==!1&&((m=F.value)==null||m.clearOTP())}),yt(()=>a.items,v=>{r.inManagementMode&&ce()}),yt(()=>r.inManagementMode,v=>{v&&ce()});const J=Tn(()=>!a.isEmpty&&!D.value&&!S.value);On(async()=>{i.preferences.getOtpOnRequest?a.fetch().then(()=>{a.backendWasNewer&&t.info({text:wt("commons.data_refreshed_to_reflect_server_changes"),duration:1e4})}):we(),f.fetch()});function ce(){ri("#dv",a.filtered,{animation:200,handle:".drag-handle",onUpdate:v=>{const m=a.filtered[v.oldIndex].id,B=a.items.findIndex(te=>te.id==m);gn(a.items,B,v.newIndex),st(()=>{a.saveOrder()})}})}function ke(){a.fetch(),a.selectNone(),S.value=!1,t.success({text:wt("twofaccounts.accounts_moved")})}function U(v){L.value.otp_type=v.otp_type,L.value.service=v.service,L.value.account=v.account,L.value.icon=v.icon,st().then(()=>{c.value=!0,F.value.show(v.id)})}function ye(v){r.inManagementMode?a.select(v.id):!i.preferences.getOtpOnRequest&&v.otp_type.includes("totp")?ee(v.otp.password):U(v)}function ee(v){l(v),u&&(i.preferences.kickUserAfter==-1&&i.logout({kicked:!0}),i.preferences.clearSearchOnCopy&&(a.filter=""),i.preferences.viewDefaultGroupOnCopy&&(i.preferences.activeGroup=i.preferences.defaultGroup==-1?i.preferences.activeGroup:i.preferences.defaultGroup),t.success({text:wt("commons.copied_to_clipboard")}))}async function Ce(v){rt.getOtpById(v.id).then(m=>{let B=m.data;if(ee(B.password),B.otp_type=="hotp"){let te=accounts.value.find(W=>W.id==v.id);te!=null&&(te.counter=B.counter)}})}function se(v,m){le.value.filter(B=>B.props.period==v||v==null).forEach(B=>{B.turnOn(m)})}function me(v){le.value.filter(m=>m.props.period==v||v==null).forEach(m=>{m.turnOff()})}async function we(v){C.value=!0,me(v);let m;v==null?(G.value=-1,m=rt.getAll(!0)):(G.value=v,m=rt.getByIds(a.accountIdsWithPeriod(v).join(","),!0)),m.then(B=>{let te=0;B.data.forEach(W=>{if(W.otp_type==="totp"){const Le=a.items.findIndex(_t=>_t.id===W.id);a.items[Le]==null?a.items.push(W):a.items[Le].otp=W.otp,te=W.otp.generated_at}}),z.value.forEach(W=>{(W.props.period==v||v==null)&&st().then(()=>{W.startLoop(te)})})}).finally(()=>{C.value=!1,G.value=null})}async function fe(){await a.deleteSelected(),a.isEmpty&&(r.inManagementMode=!1,n.push({name:"start"}))}function Ae(){r.inManagementMode=!1,a.selectNone()}return(v,m)=>{const B=re("FontAwesomeIcon"),te=re("Modal"),W=re("font-awesome-icon"),Le=re("RouterLink"),_t=re("VueFooter");return w(),ge(p(Ze),null,{default:R(({mode:Me})=>[g("div",null,[p(D)?(w(),ge(Hn,{key:0,showGroupSwitch:p(D),"onUpdate:showGroupSwitch":m[0]||(m[0]=h=>Ye(D)?D.value=h:null),groups:p(f).items,"onUpdate:groups":m[1]||(m[1]=h=>p(f).items=h)},null,8,["showGroupSwitch","groups"])):Y("",!0),p(S)?(w(),ge(oo,{key:1,showDestinationGroupSelector:p(S),"onUpdate:showDestinationGroupSelector":m[2]||(m[2]=h=>Ye(S)?S.value=h:null),selectedAccountsIds:p(a).selectedIds,"onUpdate:selectedAccountsIds":m[3]||(m[3]=h=>p(a).selectedIds=h),groups:p(f).items,onAccountsMoved:ke},null,8,["showDestinationGroupSelector","selectedAccountsIds","groups"])):Y("",!0),p(J)||p(D)?(w(),k("div",si,[g("div",ai,[g("div",li,[T(Fn,{keyword:p(a).filter,"onUpdate:keyword":m[4]||(m[4]=h=>p(a).filter=h)},null,8,["keyword"]),p(r).inManagementMode?(w(),ge(po,{key:0,selectedCount:p(a).selectedCount,onClearSelected:m[5]||(m[5]=h=>p(a).selectNone()),onSelectAll:m[6]||(m[6]=h=>p(a).selectAll()),onSortAsc:m[7]||(m[7]=h=>p(a).sortAsc()),onSortDesc:m[8]||(m[8]=h=>p(a).sortDesc())},null,8,["selectedCount"])):(w(),k("div",ui,[g("div",di,[p(D)?(w(),k("div",ci,[g("button",{type:"button",id:"btnHideGroupSwitch",title:v.$t("groups.hide_group_selector"),tabindex:"1",class:q(["button is-text is-like-text",{"has-text-grey":Me!="dark"}]),onClick:m[9]||(m[9]=$e(h=>D.value=!p(D),["stop"]))},I(v.$t("groups.select_accounts_to_show")),11,fi)])):(w(),k("div",pi,[g("button",{type:"button",id:"btnShowGroupSwitch",title:v.$t("groups.show_group_selector"),tabindex:"1",class:q(["button is-text is-like-text",{"has-text-grey":Me!="dark"}]),onClick:m[10]||(m[10]=$e(h=>D.value=!p(D),["stop"]))},[Re(I(p(f).current)+" ("+I(p(a).filteredCount)+")  ",1),T(B,{icon:["fas","caret-down"]})],10,hi)]))])]))])])])):Y("",!0),T(te,{modelValue:p(E),"onUpdate:modelValue":m[13]||(m[13]=h=>Ye(E)?E.value=h:null),isFullHeight:!0},{default:R(()=>[T(xo,{onExportTwofauthFormat:m[11]||(m[11]=h=>p(a).export()),onExportOtpauthFormat:m[12]||(m[12]=h=>p(a).export("otpauth"))})]),_:1},8,["modelValue"]),T(te,{modelValue:p(c),"onUpdate:modelValue":m[16]||(m[16]=h=>Ye(c)?c.value=h:null)},{default:R(()=>[T(xn,In({ref_key:"otpDisplay",ref:F},p(L),{onPleaseCloseMe:m[14]||(m[14]=h=>c.value=!1),onPleaseClearSearch:m[15]||(m[15]=h=>p(a).filter="")}),null,16)]),_:1},8,["modelValue"]),p(i).preferences.getOtpOnRequest?Y("",!0):(w(),k("span",mi,[(w(!0),k(Qe,null,ft(p(a).periods,h=>(w(),ge(Pn,{key:h.period,autostart:!1,period:h.period,generated_at:h.generated_at,onLoopEnded:V=>we(h.period),onLoopStarted:V=>se(h.period,V),onSteppedUp:V=>se(h.period,V),ref_for:!0,ref_key:"looperRefs",ref:z},null,8,["period","generated_at","onLoopEnded","onLoopStarted","onSteppedUp"]))),128))])),p(J)?(w(),k("div",{key:4,class:q(["container",p(r).inManagementMode?"is-edit-mode":""])},[g("div",gi,[g("span",{id:"dv",class:q(["columns is-multiline",{"is-centered":p(i).preferences.displayMode==="grid"}])},[(w(!0),k(Qe,null,ft(p(a).filtered,h=>(w(),k("div",{class:q([[p(i).preferences.displayMode==="grid"?"tfa-grid":"tfa-list"],"column is-narrow"]),key:h.id},[g("div",vi,[T(Xe,{name:"slideCheckbox"},{default:R(()=>[p(r).inManagementMode?(w(),k("div",bi,[g("div",_i,[Et(g("input",{class:q(["is-checkradio is-small",Me=="dark"?"is-white":"is-info"]),id:"ckb_"+h.id,value:h.id,type:"checkbox",name:"ckb_"+h.id,"onUpdate:modelValue":m[17]||(m[17]=V=>p(a).selectedIds=V)},null,10,yi),[[An,p(a).selectedIds]]),g("label",{tabindex:"0",for:"ckb_"+h.id,onKeypress:St($e(V=>p(a).select(h.id),["prevent"]),["space"])},null,40,wi)])])):Y("",!0)]),_:2},1024),g("div",{tabindex:"0",class:"tfa-cell tfa-content is-size-3 is-size-4-mobile",onClick:[$e(V=>ye(h),["exact"]),$e(V=>Ce(h),["ctrl"])],onKeyup:St(V=>ye(h),["enter"]),role:"button"},[g("div",Si,[h.icon&&p(i).preferences.showAccountsIcons?(w(),k("img",{key:0,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/icons/"+h.icon,alt:""},null,8,Di)):h.icon==null&&p(i).preferences.showAccountsIcons?(w(),k("img",{key:1,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/noicon.svg",alt:""},null,8,ki)):Y("",!0),Re(" "+I(h.service?h.service:v.$t("twofaccounts.no_service")),1),p(s).useEncryption&&h.account===v.$t("errors.indecipherable")?(w(),ge(B,{key:2,class:"has-text-danger is-size-5 ml-2",icon:["fas","exclamation-circle"]})):Y("",!0),g("span",Ci,I(h.account),1)])],40,Ei),T(Xe,{name:"popLater"},{default:R(()=>[Et(g("div",$i,[h.otp!=null?(w(),k("span",Ti,[p(C)==!0&&(p(G)==-1||p(G)==h.period)?(w(),k("span",Oi,[T(B,{icon:["fas","circle-notch"],spin:""})])):(w(),k("span",{key:1,class:"always-on-otp is-clickable has-nowrap has-text-grey is-size-5 ml-4",onClick:V=>ee(h.otp.password),onKeyup:St(V=>ee(h.otp.password),["enter"]),title:v.$t("commons.copy_to_clipboard")},I(p(Mn)(h.otp.password,p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP&&p(K)==h.id)),41,Ii)),h.otp_type.includes("totp")?(w(),ge(Nn,{key:2,class:q("condensed"),ref_for:!0,ref_key:"dotsRefs",ref:le,period:h.period},null,8,["period"])):Y("",!0)])):(w(),k("span",Ai,[g("button",{type:"button",class:q(["button tag",Me=="dark"?"is-dark":"is-white"]),onClick:V=>U(h),title:v.$t("twofaccounts.import.import_this_account")},I(v.$t("commons.generate")),11,Mi)]))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024),p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP?(w(),ge(Xe,{key:0,name:"popLater"},{default:R(()=>[Et(g("div",xi,[p(K)==h.id?(w(),k("button",{key:0,type:"button",class:"pr-0 button is-ghost has-text-grey-dark",onClick:m[18]||(m[18]=$e(V=>K.value=null,["stop"]))},[T(W,{icon:["fas","eye"]})])):(w(),k("button",{key:1,type:"button",class:"pr-0 button is-ghost has-text-grey-dark",onClick:$e(V=>K.value=h.id,["stop"])},[T(W,{icon:["fas","eye-slash"]})],8,Pi))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024)):Y("",!0),T(Xe,{name:"fadeInOut"},{default:R(()=>[p(r).inManagementMode?(w(),k("div",Ni,[T(Le,{to:{name:"editAccount",params:{twofaccountId:h.id}},class:q(["tag is-rounded mr-1",Me=="dark"?"is-dark":"is-white"])},{default:R(()=>[Re(I(v.$t("commons.edit")),1)]),_:2},1032,["to","class"]),T(Le,{to:{name:"showQRcode",params:{twofaccountId:h.id}},class:q(["tag is-rounded",Me=="dark"?"is-dark":"is-white"]),title:v.$t("twofaccounts.show_qrcode")},{default:R(()=>[T(B,{icon:["fas","qrcode"]})]),_:2},1032,["to","class","title"])])):Y("",!0)]),_:2},1024),T(Xe,{name:"fadeInOut"},{default:R(()=>[p(r).inManagementMode?(w(),k("div",Fi,[T(B,{icon:["fas","bars"]})])):Y("",!0)]),_:1})])],2))),128))],2)]),T(_t,{showButtons:!0,internalFooterType:p(r).inManagementMode&&!p(S)?"doneButton":"navLinks",onDoneButtonClicked:Ae},{default:R(()=>[T(So,{inManagementMode:p(r).inManagementMode,"onUpdate:inManagementMode":m[19]||(m[19]=h=>p(r).inManagementMode=h),areDisabled:p(a).hasNoneSelected,onMoveButtonClicked:m[20]||(m[20]=h=>S.value=!0),onDeleteButtonClicked:fe,onExportButtonClicked:m[21]||(m[21]=h=>E.value=!0)},null,8,["inManagementMode","areDisabled"])]),_:1},8,["internalFooterType"])],2)):Y("",!0)])]),_:1})}}};export{Yi as default}; +//# sourceMappingURL=Accounts-BErdy-fg.js.map diff --git a/public/build/assets/Accounts-BErdy-fg.js.map b/public/build/assets/Accounts-BErdy-fg.js.map new file mode 100644 index 00000000..afd610d2 --- /dev/null +++ b/public/build/assets/Accounts-BErdy-fg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Accounts-BErdy-fg.js","sources":["../../../resources/js/components/GroupSwitch.vue","../../../resources/js/components/DestinationGroupSelector.vue","../../../resources/js/components/ActionButtons.vue","../../../resources/js/components/ExportButtons.vue","../../../node_modules/sortablejs/modular/sortable.esm.js","../../../node_modules/@vueuse/integrations/useSortable.mjs","../../../resources/js/views/twofaccounts/Accounts.vue"],"sourcesContent":["\n\n","\n\n","\n\n","\n\n","/**!\n * Sortable 1.15.3\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.3\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n return false;\n}\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\nfunction css(el, prop, val) {\n var style = el && el.style;\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n } while (!selfOnly && (el = el.parentNode));\n }\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n return list;\n }\n return [];\n}\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\r\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\r\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\r\n * @param {[HTMLElement]} container The parent the element will be placed in\r\n * @return {Object} The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode;\n\n // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect();\n\n // Set relative to edges of padding box of container\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n } while (container = container.parentNode);\n }\n }\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\r\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n\n /* jshint boss:true */\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param {HTMLElement} el The parent element\r\n * @param {Number} childNum The index of the child\r\n * @param {Object} options Parent Sortable's options\r\n * @return {HTMLElement} The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n currentChild++;\n }\n i++;\n }\n return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param {HTMLElement} el Parent element\r\n * @param {selector} selector Any other elements that should be ignored\r\n * @return {HTMLElement} The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param {HTMLElement} el\r\n * @param {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n var index = 0;\n if (!el || !el.parentNode) {\n return -1;\n }\n\n /* jshint boss:true */\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param {HTMLElement} el\r\n * @return {Array} Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param {Array} arr Array that may or may not hold the object\r\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number} The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n } while (elem = elem.parentNode);\n return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n var rect = {};\n Array.from(container.children).forEach(function (child) {\n var _rect$left, _rect$top, _rect$right, _rect$bottom;\n if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n var childRect = getRect(child);\n rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n });\n rect.width = rect.right - rect.left;\n rect.height = rect.bottom - rect.top;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n // If animating: compensate for current animation\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n target.toRect = toRect;\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n }\n\n // if fromRect != toRect: animate\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n if (!time) {\n time = _this.options.animation;\n }\n _this.animate(target, animatingRect, toRect, time);\n }\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\nfunction repaint(target) {\n return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n this.eventCanceled = false;\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return;\n // Fire global events if it exists in this sortable\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n\n // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized;\n\n // Add default options from plugin\n _extends(defaults, initialized.defaults);\n });\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return;\n\n // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\n ghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n\n _silent = false,\n savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\n supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return;\n // false when <= IE11\n if (IE11OrLess) {\n return false;\n }\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n }(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n },\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n },\n /**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n },\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n var group = {};\n var originalGroup = options.group;\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n },\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n },\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n if (nearest) {\n // Create imitation event\n var event = {};\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n nearest[expando]._onDragOver(event);\n }\n }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n this.el = el; // root element\n this.options = options = _extends({}, options);\n\n // Export instance\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults);\n\n // Set default options\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n _prepareGroup(options);\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n // Setup drag mode\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n }\n\n // Bind events\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n sortables.push(this.el);\n\n // Restore sorting\n options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n // Add animation state manager\n _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n if (!evt.cancelable) return;\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n _saveInputCheckedState(el);\n\n // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n if (dragEl) {\n return;\n }\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n }\n\n // cancel dnd if original target is content editable\n if (originalTarget.isContentEditable) {\n return;\n }\n\n // Safari ignores further event handling after mousedown\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n target = closest(target, options.draggable, el, false);\n if (target && target.animated) {\n return;\n }\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n }\n\n // Get the index of the dragged element within its parent\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable);\n\n // Check filter\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n }\n\n // Prepare `dragstart`\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n _this._onDrop();\n return;\n }\n // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n _this._disableDelayedDragEvents();\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n }\n\n // Bind the events: dragstart/dragend\n _this._triggerDragStart(evt, touch);\n\n // Drag start event\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n });\n\n // Chosen item\n toggleClass(dragEl, options.chosenClass, true);\n };\n\n // Disable \"draggable\"\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop);\n\n // Make dragEl draggable (must be before delay for FireFox)\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n pluginEvent('delayStart', this, {\n evt: evt\n });\n\n // Delay is impossible for native DnD in Edge or IE\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n var touch = e.touches ? e.touches[0] : e;\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n awaitingDragStarted = false;\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n var options = this.options;\n\n // Apply effect\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost();\n\n // Drag start event\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n _hideGhostForTarget();\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n target = parent; // store last element\n }\n /* jshint boss:true */ while (parent = getParentOrHost(parent));\n }\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n // only set the status to dragging, when we are actually dragging\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n this._onDragStart(evt, true);\n }\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options;\n\n // Position absolutely\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl);\n\n // Set transform-origin\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n var _this = this;\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n pluginEvent('setupClone', this);\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n this._hideClone();\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n }\n\n // #1143: IFrame support workaround\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n _this._hideClone();\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true);\n\n // Set proper drop events\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n on(document, 'drop', _this);\n\n // #1276 fix:\n css(dragEl, 'transform', 'translateZ(0)');\n }\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver( /**Event*/evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n if (_silent) return;\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n }\n\n // Capture animation state\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n _this.captureAnimationState();\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n }\n\n // Return invocation when dragEl is inserted (or completed)\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n }\n\n // Animation\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n }\n\n // Null lastTarget if it is not inside a previously swapped element\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n }\n\n // no bubbling and not fallback\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n // Do not detect for empty insert if already inserted\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n }\n\n // Call when dragEl has been inserted\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n ignoreNextClick = false;\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n if (revert) {\n parentEl = rootEl; // actualization\n capture();\n this._hideClone();\n dragOverEvent('revert');\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n return completed(true);\n }\n var elLastChild = lastChild(el, options.draggable);\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n }\n\n // if there is a last element, it is the target\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n if (target) {\n targetRect = getRect(target);\n }\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n if (firstChild === dragEl) {\n return completed(false);\n }\n target = firstChild;\n targetRect = getRect(target);\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n }\n // If dragEl is already beside target: Do not insert\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n }\n\n // Undo chrome's scroll adjustment (has no effect on other browsers)\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n parentEl = dragEl.parentNode; // actualization\n\n // must be done before animation\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n changed();\n return completed(true);\n }\n }\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop( /**Event*/evt) {\n var el = this.el,\n options = this.options;\n\n // Get the index of the dragged element within its parent\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode;\n\n // Get again after plugin event\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n if (Sortable.eventCanceled) {\n this._nulling();\n return;\n }\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n _cancelNextTick(this.cloneId);\n _cancelNextTick(this._dragStartId);\n\n // Unbind events\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n this._offMoveEvents();\n this._offUpEvents();\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n css(dragEl, 'transform', '');\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n _disableDraggable(dragEl);\n dragEl.style['will-change'] = '';\n\n // Remove classes\n // ghostClass is added in dragStarted\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n toggleClass(dragEl, this.options.chosenClass, false);\n\n // Drag stop event\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n // Remove event\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // drag from one list and drop into another\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // Save sorting\n this.save();\n }\n }\n }\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent( /**Event*/evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n break;\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n _globalDragOver(evt);\n }\n break;\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n for (; i < n; i++) {\n el = children[i];\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n return order;\n },\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n }\n // Remove draggable attributes\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n this._onDrop();\n this._disableDelayedDragEvents();\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n return;\n }\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return;\n\n // show clone at dragEl or original position\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\nfunction _globalDragOver( /**Event*/evt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal;\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n return retVal;\n}\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\nfunction _unsilent() {\n _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n invert = invert || invertSwap;\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n while (i--) {\n sum += str.charCodeAt(i);\n }\n return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n}\n\n// Export utils\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild,\n expando: expando\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\nSortable.get = function (element) {\n return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n };\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt;\n\n // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback);\n\n // Listener for pointer element change\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval();\n // Detect for pointer elem change, emulating native DnD behaviour\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn;\n\n // New scroll root, set scrollEl\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n var layersOut = 0;\n var currentParent = scrollEl;\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n }\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\nfunction Revert() {}\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n this.sortable.animateAll();\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\n multiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\n folding = false,\n // Folding any other time\n dragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n dataTransfer.setData('Text', data);\n }\n };\n }\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n sortable._hideClone();\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n });\n\n // Sort multi-drag elements\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n\n sortable.captureAnimationState();\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n }\n\n // Remove all auxiliary multidrag items from el, if sorting enabled\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n initialFolding = false;\n // If leaving sort:false root, or already folding - Fold to new location\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute);\n\n // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n }\n\n // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n activeSortable._showClone(sortable);\n\n // Unfold animation for clones if showing from hidden\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children;\n\n // Multi-drag selection\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n\n // Modifier activated, select from last to dragEl\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n }\n\n // Multi-drag drop\n if (dragStarted && this.isMultiDrag) {\n folding = false;\n // Do not \"unfold\" after around dragEl if reverted\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect;\n\n // Prepare unfold animation\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n }\n\n // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n multiDragIndex++;\n });\n\n // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n if (update) {\n dispatchSortableEvent('update');\n dispatchSortableEvent('sort');\n }\n }\n }\n\n // Must be done after capturing individual rects (scroll bar)\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n multiDragSortable = toSortable;\n }\n\n // Remove clones if necessary\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n // Only deselect if selection is in this sortable\n if (multiDragSortable !== this.sortable) return;\n\n // Only deselect if target is not item in this sortable\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n // Only deselect if left click\n if (evt && evt.button !== 0) return;\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n multiDragSortable = sortable;\n }\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n });\n\n // multiDragElements will already be sorted if folding\n var newIndex;\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n return key;\n }\n }\n });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","import { tryOnMounted, tryOnScopeDispose, toValue, unrefElement, defaultDocument } from '@vueuse/core';\nimport Sortable from 'sortablejs';\nimport { isRef, nextTick } from 'vue-demi';\n\nfunction useSortable(el, list, options = {}) {\n let sortable;\n const { document = defaultDocument, ...resetOptions } = options;\n const defaultOptions = {\n onUpdate: (e) => {\n moveArrayElement(list, e.oldIndex, e.newIndex);\n }\n };\n const start = () => {\n const target = typeof el === \"string\" ? document == null ? void 0 : document.querySelector(el) : unrefElement(el);\n if (!target || sortable !== void 0)\n return;\n sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });\n };\n const stop = () => {\n sortable == null ? void 0 : sortable.destroy();\n sortable = void 0;\n };\n const option = (name, value) => {\n if (value !== void 0)\n sortable == null ? void 0 : sortable.option(name, value);\n else\n return sortable == null ? void 0 : sortable.option(name);\n };\n tryOnMounted(start);\n tryOnScopeDispose(stop);\n return {\n stop,\n start,\n option\n };\n}\nfunction moveArrayElement(list, from, to) {\n const _valueIsRef = isRef(list);\n const array = _valueIsRef ? [...toValue(list)] : toValue(list);\n if (to >= 0 && to < array.length) {\n const element = array.splice(from, 1)[0];\n nextTick(() => {\n array.splice(to, 0, element);\n if (_valueIsRef)\n list.value = array;\n });\n }\n}\n\nexport { moveArrayElement, useSortable };\n","\n\n\n"],"names":["user","useUserStore","emit","__emit","setActiveGroup","id","userService","props","__props","destinationGroupId","ref","moveAccounts","twofaccountService","groupService","router","useRouter","goAddNewAccount","$2fauth","inject","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","key","_defineProperty","_typeof","obj","value","_extends","_objectWithoutPropertiesLoose","excluded","sourceKeys","_objectWithoutProperties","sourceSymbolKeys","version","userAgent","pattern","IE11OrLess","Edge","FireFox","Safari","IOS","ChromeForAndroid","captureMode","on","el","event","fn","off","matches","selector","getParentOrHost","closest","ctx","includeCTX","R_SPACE","toggleClass","name","state","className","css","prop","val","style","matrix","selfOnly","appliedTransforms","transform","matrixFn","find","tagName","iterator","list","n","getWindowScrollingElement","scrollingElement","getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","container","elRect","top","left","bottom","right","height","width","containerRect","elMatrix","scaleX","scaleY","isScrolledPast","elSide","parentSide","parent","getParentAutoScrollElement","elSideVal","parentSideVal","visible","getChild","childNum","options","includeDragEl","currentChild","children","Sortable","lastChild","last","index","getRelativeScrollOffset","offsetLeft","offsetTop","winScroller","indexOfObject","arr","includeSelf","elem","gotSelf","elemCSS","extend","dst","src","isRectEqual","rect1","rect2","_throttleTimeout","throttle","callback","ms","args","_this","cancelThrottle","scrollBy","x","y","clone","Polymer","$","getChildContainingRectFromElement","ghostEl","rect","child","_rect$left","_rect$top","_rect$right","_rect$bottom","childRect","expando","AnimationStateManager","animationStates","animationCallbackId","fromRect","childMatrix","animating","animationTime","time","toRect","prevFromRect","prevToRect","animatingRect","targetMatrix","calculateRealTime","currentRect","duration","translateX","translateY","repaint","plugins","defaults","PluginManager","plugin","option","p","eventName","sortable","evt","eventNameGlobal","pluginName","initialized","modified","eventProperties","modifiedValue","dispatchEvent","_ref","rootEl","targetEl","cloneEl","toEl","fromEl","oldIndex","newIndex","oldDraggableIndex","newDraggableIndex","originalEvent","putSortable","extraEventProperties","onName","allEventProperties","_excluded","pluginEvent","data","dragEl","parentEl","nextEl","lastDownEl","cloneHidden","moved","_hideGhostForTarget","_unhideGhostForTarget","_dispatchEvent","info","activeGroup","awaitingDragStarted","ignoreNextClick","sortables","tapEvt","touchEvt","lastDx","lastDy","tapDistanceLeft","tapDistanceTop","lastTarget","lastDirection","pastFirstInvertThresh","isCircumstantialInvert","targetMoveDistance","ghostRelativeParent","ghostRelativeParentInitialScroll","_silent","savedInputChecked","documentExists","PositionGhostAbsolutely","CSSFloatProperty","supportDraggable","supportCssPointerEvents","_detectDirection","elCSS","elWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","secondChildWidth","touchingSideChild2","_dragElInRowColumn","dragRect","targetRect","vertical","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","_detectNearestEmptySortable","ret","threshold","insideHorizontally","insideVertically","_prepareGroup","toFn","pull","to","from","sameGroup","otherGroup","group","originalGroup","nearestEmptyInsertDetectEvent","nearest","_checkOutsideTargetEl","dataTransfer","preventOnFilter","type","touch","originalTarget","filter","_saveInputCheckedState","criteria","ownerDocument","dragStartFn","_disableDraggable","_nextTick","fallback","inserted","fallbackTolerance","fallbackOffset","ghostMatrix","relativeScrollOffset","dx","dy","cssMatrix","revert","activeSortable","isOwner","canSort","fromSortable","completedFired","dragOverEvent","extra","completed","after","_onMove","changed","capture","insertion","elLastChild","_ghostIsLast","_ghostIsFirst","firstChild","direction","targetBeforeFirstSwap","differentLevel","differentRowCol","side1","scrolledPastTop","scrollBefore","_getSwapDirection","sibling","dragIndex","nextSibling","moveVector","_unsilent","_cancelNextTick","_globalDragOver","order","_generateId","useAnimation","items","store","willInsertAfter","onMoveFn","retVal","firstElRect","childContainingRect","spacer","lastElRect","swapThreshold","invertedSwapThreshold","invertSwap","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","invert","_getInsertDirection","str","sum","root","inputs","idx","element","_len","_key","autoScrolls","scrollEl","scrollRootEl","scrolling","lastAutoScrollX","lastAutoScrollY","touchEvt$1","pointerElemChangedInterval","AutoScrollPlugin","AutoScroll","_ref2","clearPointerElemChangedInterval","clearAutoScrolls","autoScroll","ogElemScroller","newElem","isFallback","sens","speed","scrollThisInstance","scrollCustomFn","layersOut","currentParent","canScrollX","canScrollY","scrollWidth","scrollHeight","scrollPosX","scrollPosY","vx","vy","scrollOffsetY","scrollOffsetX","drop","dispatchSortableEvent","hideGhostForTarget","unhideGhostForTarget","toSortable","Revert","_ref3","Remove","_ref4","parentSortable","useSortable","document","defaultDocument","resetOptions","defaultOptions","e","moveArrayElement","start","stop","tryOnMounted","tryOnScopeDispose","_valueIsRef","isRef","array","toValue","nextTick","notify","useNotifyStore","bus","useBusStore","appSettings","useAppSettingsStore","copy","copied","useClipboard","twofaccounts","useTwofaccounts","groups","useGroups","showOtpInModal","showExportFormatSelector","showGroupSwitch","showDestinationGroupSelector","isRenewingOTPs","renewedPeriod","revealPassword","otpDisplay","otpDisplayProps","looperRefs","dotsRefs","watch","_a","setSortable","showAccounts","computed","onMounted","trans","updateTotps","movedId","inItemsIndex","item","postGroupAssignementUpdate","showOTP","account","showOrCopy","copyToClipboard","password","getAndCopyOTP","response","otp","hotpToIncrement","acc","turnDotsOn","period","stepIndex","dots","dot","turnDotsOff","fetchPromise","generatedAt","looper","deleteAccounts","exitManagementMode"],"mappings":"okCAKI,MAAMA,EAAOC,GAAY,EAMnBC,EAAOC,EAKb,SAASC,EAAeC,EAAI,CACxBL,EAAK,YAAY,YAAcK,EAE3BL,EAAK,YAAY,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AC7B4T,EAAa,MAAM,KAAK4B,CAAO,EAE9B5B,EAAa,MAAM5T,EAAK,EAAE,IAAMwV,EAAQ,IAC7CgB,GAAchB,EAAQ,IAAI,YAC9C,CACa,CAAA,EAGDf,EAAW,MAAM,QAASgC,GAAW,EAC7BA,EAAO,MAAM,QAAUP,GAAUA,GAAU,OAC3ChD,GAAQ,EAAG,KAAK,IAAM,CAClBuD,EAAO,UAAUD,EAAW,CAC/B,CAAA,CAER,CAAA,CACJ,CAAA,EACA,QAAQ,IAAM,CACXpC,EAAe,MAAQ,GACvBC,EAAc,MAAQ,IACzB,CAAA,CACT,CAKI,eAAeqC,IAAiB,CAC5B,MAAM9C,EAAa,eAAc,EAE7BA,EAAa,UACbP,EAAI,iBAAmB,GACvB1Z,EAAO,KAAK,CAAE,KAAM,OAAS,CAAA,EAEzC,CAKI,SAASgd,IACT,CACItD,EAAI,iBAAmB,GACvBO,EAAa,WAAU,CAC/B","x_google_ignoreList":[4,5]} \ No newline at end of file diff --git a/public/build/assets/Accounts-C-25Qy2v.js b/public/build/assets/Accounts-C-25Qy2v.js deleted file mode 100644 index 9805db95..00000000 --- a/public/build/assets/Accounts-C-25Qy2v.js +++ /dev/null @@ -1,6 +0,0 @@ -import{a as Ft,e as ie,f as y,g as C,h as g,F as Qe,E as ct,m as k,p as P,n as W,t as I,i as p,U as De,j as Re,I as gn,r as te,J as it,K as vn,y as bn,u as Rt,k as ye,l as z,L as Jt,M as _n,N as wn,O as yn,D as Ye,P as Yt,Q as rt,R as En,b as Sn,S as Dn,T as kn,c as Cn,V as $n,s as _t,x as Tn,o as On,H as wt,C as Te,W as In,z as yt,X as An,w as Et,Y as Xe,A as zt,Z as Mn}from"./app-CuhK3jij.js";import{_ as xn,a as Pn,b as Nn}from"./OtpDisplay-D1Cg2JBE.js";import{_ as Fn}from"./SearchBox-Bwo0E13W.js";import{u as Rn}from"./bus-BalNs30H.js";import"./Spinner-WULdfd4I.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const Bn={id:"groupSwitch",class:"container groups"},Gn={class:"columns is-centered"},Ln={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Xn={class:"columns is-multiline"},Yn=["onClick"],zn={class:"columns is-centered"},Un={class:"column has-text-centered"},Hn={__name:"GroupSwitch",props:{showGroupSwitch:Boolean,groups:Array},emits:["update:showGroupSwitch"],setup(o,{emit:e}){const n=Ft(),t=e;function i(r){n.preferences.activeGroup=r,n.preferences.rememberActiveGroup&&gn.updatePreference("activeGroup",r),t("update:showGroupSwitch",!1)}return(r,s)=>{const l=ie("RouterLink"),u=ie("ButtonBackCloseCancel"),a=ie("VueFooter");return y(),C("div",Bn,[g("div",Gn,[g("div",Ln,[g("div",Xn,[(y(!0),C(Qe,null,ct(o.groups,f=>(y(),C("div",{class:"column is-full",key:f.id},[k(p(De),null,{default:P(({mode:c})=>[g("button",{class:W(["button is-fullwidth",{"is-dark has-text-light is-outlined":c=="dark"}]),onClick:E=>i(f.id)},I(f.name),11,Yn)]),_:2},1024)]))),128))]),g("div",zn,[g("div",Un,[k(l,{to:{name:"groups"}},{default:P(()=>[Re(I(r.$t("groups.manage_groups")),1)]),_:1})])])])]),k(a,{showButtons:!0},{default:P(()=>[k(u,{action:"close",useLinkTag:!1,onClosed:s[0]||(s[0]=f=>r.$emit("update:showGroupSwitch",!1))})]),_:1})])}}},qn={class:"container group-selector"},Wn={class:"columns is-centered is-multiline"},Vn={class:"column is-full has-text-centered"},jn={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Kn={class:"columns is-multiline"},Qn=["onClick"],Zn={key:0,class:"is-italic"},Jn={key:1},eo={class:"columns is-centered"},to={class:"column has-text-centered"},no={class:"control"},oo={__name:"DestinationGroupSelector",props:{showDestinationGroupSelector:Boolean,selectedAccountsIds:Array,groups:Array},emits:["update:showDestinationGroupSelector","accounts-moved"],setup(o,{emit:e}){const n=o,t=te(null),i=e;async function r(){t.value===0?await it.withdraw(n.selectedAccountsIds):await vn.assign(n.selectedAccountsIds,t.value),i("accounts-moved")}return(s,l)=>{const u=ie("RouterLink"),a=ie("ButtonBackCloseCancel"),f=ie("VueFooter");return y(),C("div",qn,[g("div",Wn,[g("div",Vn,I(s.$t("groups.move_selected_to")),1),g("div",jn,[g("div",Kn,[(y(!0),C(Qe,null,ct(o.groups,c=>(y(),C("div",{class:"column is-full",key:c.id},[k(p(De),null,{default:P(({mode:E})=>[g("button",{class:W(["button is-fullwidth",{"is-link":p(t)===c.id,"is-dark has-text-light is-outlined":E=="dark"}]),onClick:D=>t.value=c.id},[c.id===0?(y(),C("span",Zn,I(s.$t("groups.no_group")),1)):(y(),C("span",Jn,I(c.name),1))],10,Qn)]),_:2},1024)]))),128))]),g("div",eo,[g("div",to,[k(u,{to:{name:"groups"}},{default:P(()=>[Re(I(s.$t("groups.manage_groups")),1)]),_:1})])])])]),k(f,{showButtons:!0},{default:P(()=>[g("p",no,[g("button",{class:"button is-link is-rounded",onClick:r},I(s.$t("commons.move")),1)]),k(a,{action:"cancel",useLinkTag:!1,onCanceled:l[0]||(l[0]=c=>s.$emit("update:showDestinationGroupSelector",!1))})]),_:1})])}}},io={class:"toolbar has-text-centered"},ro={class:"columns"},so={class:"column has-nowrap px-0"},ao={class:"has-text-grey mr-1"},lo=["title"],uo=["title"],co=["title"],fo=["title"],po={__name:"Toolbar",props:{selectedCount:Number},setup(o){return(e,n)=>{const t=ie("FontAwesomeIcon");return y(),C("div",io,[g("div",ro,[g("div",so,[g("span",ao,I(e.$t("commons.x_selected",{count:o.selectedCount})),1),g("button",{id:"btnUnselectAll",onClick:n[0]||(n[0]=i=>e.$emit("clear-selected")),class:"clear-selection delete mr-4",style:bn({visibility:o.selectedCount>0?"visible":"hidden"}),title:e.$t("commons.clear_selection")},null,12,lo),g("button",{id:"btnSelectAll",onClick:n[1]||(n[1]=i=>e.$emit("select-all")),class:"button mr-5 has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.select_all")},[g("span",null,I(e.$t("commons.check_all")),1),k(t,{class:"ml-1",icon:["fas","check-square"]})],8,uo),g("button",{id:"btnSortAscending",onClick:n[2]||(n[2]=i=>e.$emit("sort-asc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_ascending")},[k(t,{icon:["fas","sort-alpha-down"]})],8,co),g("button",{id:"btnSortDescending",onClick:n[3]||(n[3]=i=>e.$emit("sort-desc")),class:"button has-line-height p-1 is-ghost has-text-grey",title:e.$t("commons.sort_descending")},[k(t,{icon:["fas","sort-alpha-up"]})],8,fo)])])])}}},ho={key:0,class:"control"},mo={class:"icon is-small"},go={key:1,class:"control"},vo={key:2,class:"control"},bo=["disabled","title"],_o={key:3,class:"control"},wo=["disabled"],yo={key:4,class:"control"},Eo=["disabled","title"],So={__name:"ActionButtons",props:{inManagementMode:Boolean,areDisabled:Boolean},emits:["update:inManagementMode","move-button-clicked","delete-button-clicked","export-button-clicked"],setup(o,{emit:e}){const n=Rt(),t=Ft();function i(){t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="advancedForm"?n.push({name:"createAccount"}):t.preferences.useDirectCapture&&t.preferences.defaultCaptureMode==="livescan"?n.push({name:"capture"}):n.push({name:"start"})}return(r,s)=>{const l=ie("FontAwesomeIcon");return y(),ye(p(De),null,{default:P(({mode:u})=>[o.inManagementMode?z("",!0):(y(),C("p",ho,[g("button",{class:"button is-link is-rounded is-focus",onClick:i},[g("span",null,I(r.$t("commons.new")),1),g("span",mo,[k(l,{icon:["fas","qrcode"]})])])])),o.inManagementMode?z("",!0):(y(),C("p",go,[g("button",{id:"btnManage",class:W(["button is-rounded",{"is-dark":u=="dark"}]),onClick:s[0]||(s[0]=a=>r.$emit("update:inManagementMode",!0))},I(r.$t("commons.manage")),3)])),o.inManagementMode?(y(),C("p",vo,[g("button",{id:"btnMove",disabled:o.areDisabled,class:W(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[1]||(s[1]=a=>r.$emit("move-button-clicked")),title:r.$t("groups.move_selected_to_group")},I(r.$t("commons.move")),11,bo)])):z("",!0),o.inManagementMode?(y(),C("p",_o,[g("button",{id:"btnDelete",disabled:o.areDisabled,class:W(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[2]||(s[2]=a=>r.$emit("delete-button-clicked"))},I(r.$t("commons.delete")),11,wo)])):z("",!0),o.inManagementMode?(y(),C("p",yo,[g("button",{id:"btnExport",disabled:o.areDisabled,class:W(["button is-rounded",[{"is-outlined":u=="dark"||o.areDisabled},o.areDisabled?"is-dark":"is-link"]]),onClick:s[3]||(s[3]=a=>r.$emit("export-button-clicked")),title:r.$t("twofaccounts.export_selected_accounts")},I(r.$t("commons.export")),11,Eo)])):z("",!0)]),_:1})}}},Do={class:"block"},ko={class:"has-text-weight-bold has-text-grey"},Co={class:"is-size-7-mobile"},$o=["href"],To=["title"],Oo={class:"block"},Io={class:"has-text-weight-bold has-text-grey"},Ao={class:"is-size-7-mobile"},Mo=["title"],xo={__name:"ExportButtons",emits:["export-twofauth-format","export-otpauth-format"],setup(o,{emit:e}){Rt();const n=Jt("2fauth");return(t,i)=>(y(),C(Qe,null,[g("div",Do,[k(p(De),null,{default:P(({mode:r})=>[g("p",ko,I(t.$t("twofaccounts.twofauth_export_format_sub")),1)]),_:1}),g("p",Co,[Re(I(t.$t("twofaccounts.twofauth_export_format_desc"))+" "+I(t.$t("twofaccounts.twofauth_export_format_url"))+" ",1),g("a",{id:"lnkExportSchemaUrl",class:"is-link",tabindex:"0",href:p(n).urls.exportSchemaUrl,target:"_blank"},I(t.$t("twofaccounts.twofauth_export_schema")),9,$o)]),g("button",{id:"btnExport2FAuth",class:"button is-link is-rounded is-focus my-3",onClick:i[0]||(i[0]=r=>t.$emit("export-twofauth-format")),title:t.$t("twofaccounts.twofauth_export_format_sub")},I(t.$t("twofaccounts.twofauth_export_format")),9,To)]),g("div",Oo,[g("p",Io,I(t.$t("twofaccounts.otpauth_export_format_sub")),1),g("p",Ao,I(t.$t("twofaccounts.otpauth_export_format_desc")),1),g("button",{id:"btnExportOtpauth",class:"button is-link is-rounded is-focus my-3",onClick:i[1]||(i[1]=r=>t.$emit("export-otpauth-format")),title:t.$t("twofaccounts.otpauth_export_format_sub")},I(t.$t("twofaccounts.otpauth_export_format")),9,Mo)])],64))}};/**! - * Sortable 1.15.2 - * @author RubaXa - * @author owenm - * @license MIT - */function Ut(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),n.push.apply(n,t)}return n}function he(o){for(var e=1;e=0)&&(n[i]=o[i]);return n}function Fo(o,e){if(o==null)return{};var n=No(o,e),t,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(o,t)&&(n[t]=o[t])}return n}var Ro="1.15.2";function ge(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var be=ge(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ze=ge(/Edge/i),Ht=ge(/firefox/i),qe=ge(/safari/i)&&!ge(/chrome/i)&&!ge(/android/i),en=ge(/iP(ad|od|hone)/i),tn=ge(/chrome/i)&&ge(/android/i),nn={capture:!1,passive:!1};function O(o,e,n){o.addEventListener(e,n,!be&&nn)}function T(o,e,n){o.removeEventListener(e,n,!be&&nn)}function ft(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Bo(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function de(o,e,n,t){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&ft(o,e):ft(o,e))||t&&o===n)return o;if(o===n)break}while(o=Bo(o))}return null}var qt=/\s+/g;function ne(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var t=(" "+o.className+" ").replace(qt," ").replace(" "+e+" "," ");o.className=(t+(n?" "+e:"")).replace(qt," ")}}function b(o,e,n){var t=o&&o.style;if(t){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in t)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),t[e]=n+(typeof n=="string"?"":"px")}}function Be(o,e){var n="";if(typeof o=="string")n=o;else do{var t=b(o,"transform");t&&t!=="none"&&(n=t+" "+n)}while(!e&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function on(o,e,n){if(o){var t=o.getElementsByTagName(e),i=0,r=t.length;if(n)for(;i=r:s=i<=r,!s)return t;if(t===pe())break;t=ke(t,!1)}return!1}function Ge(o,e,n,t){for(var i=0,r=0,s=o.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=t.evt,r=Fo(t,qo);Je.pluginEvent.bind(_)(e,n,he({dragEl:d,parentEl:x,ghostEl:w,rootEl:A,nextEl:Ae,lastDownEl:at,cloneEl:M,cloneHidden:Se,dragStarted:ze,putSortable:Y,activeSortable:_.active,originalEvent:i,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:oe,newDraggableIndex:Ee,hideGhostForTarget:fn,unhideGhostForTarget:pn,cloneNowHidden:function(){Se=!0},cloneNowShown:function(){Se=!1},dispatchSortableEvent:function(l){j({sortable:n,name:l,originalEvent:i})}},r))};function j(o){Ho(he({putSortable:Y,cloneEl:M,targetEl:d,rootEl:A,oldIndex:Fe,oldDraggableIndex:Ve,newIndex:oe,newDraggableIndex:Ee},o))}var d,x,w,A,Ae,at,M,Se,Fe,oe,Ve,Ee,et,Y,Ne=!1,pt=!1,ht=[],Oe,ue,kt,Ct,jt,Kt,ze,Pe,je,Ke=!1,tt=!1,lt,q,$t=[],Mt=!1,mt=[],vt=typeof document<"u",nt=en,Qt=Ze||be?"cssFloat":"float",Wo=vt&&!tn&&!en&&"draggable"in document.createElement("div"),un=function(){if(vt){if(be)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),dn=function(e,n){var t=b(e),i=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),r=Ge(e,0,n),s=Ge(e,1,n),l=r&&b(r),u=s&&b(s),a=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+R(r).width,f=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+R(s).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return s&&(u.clear==="both"||u.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||a>=i&&t[Qt]==="none"||s&&t[Qt]==="none"&&a+f>i)?"vertical":"horizontal"},Vo=function(e,n,t){var i=t?e.left:e.top,r=t?e.right:e.bottom,s=t?e.width:e.height,l=t?n.left:n.top,u=t?n.right:n.bottom,a=t?n.width:n.height;return i===l||r===u||i+s/2===l+a/2},jo=function(e,n){var t;return ht.some(function(i){var r=i[re].options.emptyInsertThreshold;if(!(!r||Bt(i))){var s=R(i),l=e>=s.left-r&&e<=s.right+r,u=n>=s.top-r&&n<=s.bottom+r;if(l&&u)return t=i}}),t},cn=function(e){function n(r,s){return function(l,u,a,f){var c=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(r==null&&(s||c))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(l,u,a,f),s)(l,u,a,f);var E=(s?l:u).options.group.name;return r===!0||typeof r=="string"&&r===E||r.join&&r.indexOf(E)>-1}}var t={},i=e.group;(!i||st(i)!="object")&&(i={name:i}),t.name=i.name,t.checkPull=n(i.pull,!0),t.checkPut=n(i.put),t.revertClone=i.revertClone,e.group=t},fn=function(){!un&&w&&b(w,"display","none")},pn=function(){!un&&w&&b(w,"display","")};vt&&!tn&&document.addEventListener("click",function(o){if(pt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),pt=!1,!1},!0);var Ie=function(e){if(d){e=e.touches?e.touches[0]:e;var n=jo(e.clientX,e.clientY);if(n){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[re]._onDragOver(t)}}},Ko=function(e){d&&d.parentNode[re]._isOutsideThisEl(e.target)};function _(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=ve({},e),o[re]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return dn(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:_.supportPointer!==!1&&"PointerEvent"in window&&!qe,emptyInsertThreshold:5};Je.initializePlugins(this,o,n);for(var t in n)!(t in e)&&(e[t]=n[t]);cn(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:Wo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?O(o,"pointerdown",this._onTapStart):(O(o,"mousedown",this._onTapStart),O(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(o,"dragover",this),O(o,"dragenter",this)),ht.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ve(this,Yo())}_.prototype={constructor:_,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,i=this.options,r=i.preventOnFilter,s=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,f=i.filter;if(ii(t),!d&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&qe&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=de(u,i.draggable,t,!1),!(u&&u.animated)&&at!==u)){if(Fe=ae(u),Ve=ae(u,i.draggable),typeof f=="function"){if(f.call(this,e,u,this)){j({sortable:n,rootEl:a,name:"filter",targetEl:u,toEl:t,fromEl:t}),Q("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(f&&(f=f.split(",").some(function(c){if(c=de(a,c.trim(),t,!1),c)return j({sortable:n,rootEl:c,name:"filter",targetEl:u,fromEl:t,toEl:t}),Q("filter",n,{evt:e}),!0}),f)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!de(a,i.handle,t,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,n,t){var i=this,r=i.el,s=i.options,l=r.ownerDocument,u;if(t&&!d&&t.parentNode===r){var a=R(t);if(A=r,d=t,x=d.parentNode,Ae=d.nextSibling,at=t,et=s.group,_.dragged=d,Oe={target:d,clientX:(n||e).clientX,clientY:(n||e).clientY},jt=Oe.clientX-a.left,Kt=Oe.clientY-a.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,d.style["will-change"]="all",u=function(){if(Q("delayEnded",i,{evt:e}),_.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Ht&&i.nativeDraggable&&(d.draggable=!0),i._triggerDragStart(e,n),j({sortable:i,name:"choose",originalEvent:e}),ne(d,s.chosenClass,!0)},s.ignore.split(",").forEach(function(f){on(d,f.trim(),Tt)}),O(l,"dragover",Ie),O(l,"mousemove",Ie),O(l,"touchmove",Ie),O(l,"mouseup",i._onDrop),O(l,"touchend",i._onDrop),O(l,"touchcancel",i._onDrop),Ht&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),Q("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Ze||be))){if(_.eventCanceled){this._onDrop();return}O(l,"mouseup",i._disableDelayedDrag),O(l,"touchend",i._disableDelayedDrag),O(l,"touchcancel",i._disableDelayedDrag),O(l,"mousemove",i._delayedDragTouchMoveHandler),O(l,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&O(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,s.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&Tt(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;T(e,"mouseup",this._disableDelayedDrag),T(e,"touchend",this._disableDelayedDrag),T(e,"touchcancel",this._disableDelayedDrag),T(e,"mousemove",this._delayedDragTouchMoveHandler),T(e,"touchmove",this._delayedDragTouchMoveHandler),T(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):n?O(document,"touchmove",this._onTouchMove):O(document,"mousemove",this._onTouchMove):(O(d,"dragend",this),O(A,"dragstart",this._onDragStart));try{document.selection?ut(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ne=!1,A&&d){Q("dragStarted",this,{evt:n}),this.nativeDraggable&&O(document,"dragover",Ko);var t=this.options;!e&&ne(d,t.dragClass,!1),ne(d,t.ghostClass,!0),_.active=this,e&&this._appendGhost(),j({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ue){this._lastX=ue.clientX,this._lastY=ue.clientY,fn();for(var e=document.elementFromPoint(ue.clientX,ue.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ue.clientX,ue.clientY),e!==n);)n=e;if(d.parentNode[re]._isOutsideThisEl(e),n)do{if(n[re]){var t=void 0;if(t=n[re]._onDragOver({clientX:ue.clientX,clientY:ue.clientY,target:e,rootEl:n}),t&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);pn()}},_onTouchMove:function(e){if(Oe){var n=this.options,t=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,s=w&&Be(w,!0),l=w&&s&&s.a,u=w&&s&&s.d,a=nt&&q&&Vt(q),f=(r.clientX-Oe.clientX+i.x)/(l||1)+(a?a[0]-$t[0]:0)/(l||1),c=(r.clientY-Oe.clientY+i.y)/(u||1)+(a?a[1]-$t[1]:0)/(u||1);if(!_.active&&!Ne){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(j({rootEl:x,name:"add",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"remove",toEl:x,originalEvent:e}),j({rootEl:x,name:"sort",toEl:x,fromEl:A,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),Y&&Y.save()):oe!==Fe&&oe>=0&&(j({sortable:this,name:"update",toEl:x,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),_.active&&((oe==null||oe===-1)&&(oe=Fe,Ee=Ve),j({sortable:this,name:"end",toEl:x,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Q("nulling",this),A=d=x=w=Ae=M=at=Se=Oe=ue=ze=oe=Ee=Fe=Ve=Pe=je=Y=et=_.dragged=_.ghost=_.clone=_.active=null,mt.forEach(function(e){e.checked=!0}),mt.length=kt=Ct=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),Qo(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,t=this.el.children,i=0,r=t.length,s=this.options;ii.right+r||o.clientY>t.bottom&&o.clientX>t.left:o.clientY>i.bottom+r||o.clientX>t.right&&o.clientY>t.top}function ti(o,e,n,t,i,r,s,l){var u=t?o.clientY:o.clientX,a=t?n.height:n.width,f=t?n.top:n.left,c=t?n.bottom:n.right,E=!1;if(!s){if(l&<f+a*r/2:uc-lt)return-je}else if(u>f+a*(1-i)/2&&uc-a*r/2)?u>f+a/2?1:-1:0}function ni(o){return ae(d){mn(e,f.oldIndex,f.newIndex)}},l=()=>{const f=typeof o=="string"?i==null?void 0:i.querySelector(o):yn(o);!f||t!==void 0||(t=new _(f,{...s,...r}))},u=()=>{t==null||t.destroy(),t=void 0},a=(f,c)=>{if(c!==void 0)t==null||t.option(f,c);else return t==null?void 0:t.option(f)};return _n(l),wn(u),{stop:u,start:l,option:a}}function mn(o,e,n){const t=Ye(o),i=t?[...Yt(o)]:Yt(o);if(n>=0&&n{i.splice(n,0,r),t&&(o.value=i)})}}const ai={key:2,class:"header"},li={class:"columns is-gapless is-mobile is-centered"},ui={class:"column is-three-quarters-mobile is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},di={key:1,class:"has-text-centered"},ci={class:"columns"},fi={key:0,class:"column"},pi=["title"],hi={key:1,class:"column"},mi=["title"],gi={key:3},vi={class:"accounts"},bi={class:"tfa-container"},_i={key:0,class:"tfa-cell tfa-checkbox"},wi={class:"field"},yi=["id","value","name"],Ei=["for","onKeypress"],Si=["onClick","onKeyup"],Di={class:"tfa-text has-ellipsis"},ki=["src"],Ci=["src"],$i={class:"has-ellipsis is-family-primary is-size-6 is-size-7-mobile has-text-grey"},Ti={class:"has-text-right"},Oi={key:0},Ii={key:0,class:"has-nowrap has-text-grey has-text-centered is-size-5"},Ai=["onClick","onKeyup","title"],Mi={key:1},xi=["onClick","title"],Pi={class:"has-text-right"},Ni=["onClick"],Fi={key:0,class:"tfa-cell tfa-edit has-text-grey"},Ri={key:0,class:"drag-handle tfa-cell tfa-dots has-text-grey"},zi={__name:"Accounts",setup(o){const e=Jt("2fauth"),n=Rt(),t=Sn(),i=Ft(),r=Rn(),s=Dn(),{copy:l,copied:u}=kn({legacy:!0}),a=Cn(),f=$n(),c=te(!1),E=te(!1),D=te(!1),S=te(!1);te(!1);const $=te(!1),L=te(null),K=te(null),B=te(null),X=te({otp_type:"",account:"",service:"",icon:""}),U=te([]),le=te([]);_t(c,v=>{var m;v==!1&&((m=B.value)==null||m.clearOTP())}),_t(()=>a.items,v=>{r.inManagementMode&&ce()}),_t(()=>r.inManagementMode,v=>{v&&ce()});const Z=Tn(()=>!a.isEmpty&&!D.value&&!S.value);On(async()=>{i.preferences.getOtpOnRequest?a.fetch().then(()=>{a.backendWasNewer&&t.info({text:wt("commons.data_refreshed_to_reflect_server_changes"),duration:1e4})}):we(),f.fetch()});function ce(){si("#dv",a.filtered,{animation:200,handle:".drag-handle",onUpdate:v=>{const m=a.filtered[v.oldIndex].id,G=a.items.findIndex(ee=>ee.id==m);mn(a.items,G,v.newIndex),rt(()=>{a.saveOrder()})}})}function Ce(){a.fetch(),a.selectNone(),S.value=!1,t.success({text:wt("twofaccounts.accounts_moved")})}function H(v){X.value.otp_type=v.otp_type,X.value.service=v.service,X.value.account=v.account,X.value.icon=v.icon,rt().then(()=>{c.value=!0,B.value.show(v.id)})}function _e(v){r.inManagementMode?a.select(v.id):!i.preferences.getOtpOnRequest&&v.otp_type.includes("totp")?J(v.otp.password):H(v)}function J(v){l(v),u&&(i.preferences.kickUserAfter==-1&&i.logout({kicked:!0}),i.preferences.clearSearchOnCopy&&(a.filter=""),i.preferences.viewDefaultGroupOnCopy&&(i.preferences.activeGroup=i.preferences.defaultGroup==-1?i.preferences.activeGroup:i.preferences.defaultGroup),t.success({text:wt("commons.copied_to_clipboard")}))}async function $e(v){it.getOtpById(v.id).then(m=>{let G=m.data;if(J(G.password),G.otp_type=="hotp"){let ee=accounts.value.find(V=>V.id==v.id);ee!=null&&(ee.counter=G.counter)}})}function se(v,m){le.value.filter(G=>G.props.period==v||v==null).forEach(G=>{G.turnOn(m)})}function me(v){le.value.filter(m=>m.props.period==v||v==null).forEach(m=>{m.turnOff()})}async function we(v){$.value=!0,me(v);let m;v==null?(L.value=-1,m=it.getAll(!0)):(L.value=v,m=it.getByIds(a.accountIdsWithPeriod(v).join(","),!0)),m.then(G=>{let ee=0;G.data.forEach(V=>{if(V.otp_type==="totp"){const Le=a.items.findIndex(bt=>bt.id===V.id);a.items[Le]==null?a.items.push(V):a.items[Le].otp=V.otp,ee=V.otp.generated_at}}),U.value.forEach(V=>{(V.props.period==v||v==null)&&rt().then(()=>{V.startLoop(ee)})})}).finally(()=>{$.value=!1,L.value=null})}async function fe(){await a.deleteSelected(),a.isEmpty&&(r.inManagementMode=!1,n.push({name:"start"}))}function Me(){r.inManagementMode=!1,a.selectNone()}return(v,m)=>{const G=ie("FontAwesomeIcon"),ee=ie("Modal"),V=ie("font-awesome-icon"),Le=ie("RouterLink"),bt=ie("VueFooter");return y(),C("div",null,[p(D)?(y(),ye(Hn,{key:0,showGroupSwitch:p(D),"onUpdate:showGroupSwitch":m[0]||(m[0]=h=>Ye(D)?D.value=h:null),groups:p(f).items,"onUpdate:groups":m[1]||(m[1]=h=>p(f).items=h)},null,8,["showGroupSwitch","groups"])):z("",!0),p(S)?(y(),ye(oo,{key:1,showDestinationGroupSelector:p(S),"onUpdate:showDestinationGroupSelector":m[2]||(m[2]=h=>Ye(S)?S.value=h:null),selectedAccountsIds:p(a).selectedIds,"onUpdate:selectedAccountsIds":m[3]||(m[3]=h=>p(a).selectedIds=h),groups:p(f).items,onAccountsMoved:Ce},null,8,["showDestinationGroupSelector","selectedAccountsIds","groups"])):z("",!0),p(Z)||p(D)?(y(),C("div",ai,[g("div",li,[g("div",ui,[k(Fn,{keyword:p(a).filter,"onUpdate:keyword":m[4]||(m[4]=h=>p(a).filter=h)},null,8,["keyword"]),p(r).inManagementMode?(y(),ye(po,{key:0,selectedCount:p(a).selectedCount,onClearSelected:m[5]||(m[5]=h=>p(a).selectNone()),onSelectAll:m[6]||(m[6]=h=>p(a).selectAll()),onSortAsc:m[7]||(m[7]=h=>p(a).sortAsc()),onSortDesc:m[8]||(m[8]=h=>p(a).sortDesc())},null,8,["selectedCount"])):(y(),C("div",di,[g("div",ci,[k(p(De),null,{default:P(({mode:h})=>[p(D)?(y(),C("div",fi,[g("button",{id:"btnHideGroupSwitch",title:v.$t("groups.hide_group_selector"),tabindex:"1",class:W(["button is-text is-like-text",{"has-text-grey":h!="dark"}]),onClick:m[9]||(m[9]=Te(N=>D.value=!p(D),["stop"]))},I(v.$t("groups.select_accounts_to_show")),11,pi)])):(y(),C("div",hi,[g("button",{id:"btnShowGroupSwitch",title:v.$t("groups.show_group_selector"),tabindex:"1",class:W(["button is-text is-like-text",{"has-text-grey":h!="dark"}]),onClick:m[10]||(m[10]=Te(N=>D.value=!p(D),["stop"]))},[Re(I(p(f).current)+" ("+I(p(a).filteredCount)+")  ",1),k(G,{icon:["fas","caret-down"]})],10,mi)]))]),_:1})])]))])])])):z("",!0),k(ee,{modelValue:p(E),"onUpdate:modelValue":m[13]||(m[13]=h=>Ye(E)?E.value=h:null),isFullHeight:!0},{default:P(()=>[k(xo,{onExportTwofauthFormat:m[11]||(m[11]=h=>p(a).export()),onExportOtpauthFormat:m[12]||(m[12]=h=>p(a).export("otpauth"))})]),_:1},8,["modelValue"]),k(ee,{modelValue:p(c),"onUpdate:modelValue":m[16]||(m[16]=h=>Ye(c)?c.value=h:null)},{default:P(()=>[k(xn,In({ref_key:"otpDisplay",ref:B},p(X),{onPleaseCloseMe:m[14]||(m[14]=h=>c.value=!1),onPleaseClearSearch:m[15]||(m[15]=h=>p(a).filter="")}),null,16)]),_:1},8,["modelValue"]),p(i).preferences.getOtpOnRequest?z("",!0):(y(),C("span",gi,[(y(!0),C(Qe,null,ct(p(a).periods,h=>(y(),ye(Pn,{key:h.period,autostart:!1,period:h.period,generated_at:h.generated_at,onLoopEnded:N=>we(h.period),onLoopStarted:N=>se(h.period,N),onSteppedUp:N=>se(h.period,N),ref_for:!0,ref_key:"looperRefs",ref:U},null,8,["period","generated_at","onLoopEnded","onLoopStarted","onSteppedUp"]))),128))])),p(Z)?(y(),C("div",{key:4,class:W(["container",p(r).inManagementMode?"is-edit-mode":""])},[g("div",vi,[g("span",{id:"dv",class:W(["columns is-multiline",{"is-centered":p(i).preferences.displayMode==="grid"}])},[(y(!0),C(Qe,null,ct(p(a).filtered,h=>(y(),C("div",{class:W([[p(i).preferences.displayMode==="grid"?"tfa-grid":"tfa-list"],"column is-narrow"]),key:h.id},[g("div",bi,[k(Xe,{name:"slideCheckbox"},{default:P(()=>[p(r).inManagementMode?(y(),C("div",_i,[g("div",wi,[k(p(De),null,{default:P(({mode:N})=>[yt(g("input",{class:W(["is-checkradio is-small",N=="dark"?"is-white":"is-info"]),id:"ckb_"+h.id,value:h.id,type:"checkbox",name:"ckb_"+h.id,"onUpdate:modelValue":m[17]||(m[17]=Xt=>p(a).selectedIds=Xt)},null,10,yi),[[An,p(a).selectedIds]])]),_:2},1024),g("label",{tabindex:"0",for:"ckb_"+h.id,onKeypress:Et(Te(N=>p(a).select(h.id),["prevent"]),["space"])},null,40,Ei)])])):z("",!0)]),_:2},1024),g("div",{tabindex:"0",class:"tfa-cell tfa-content is-size-3 is-size-4-mobile",onClick:[Te(N=>_e(h),["exact"]),Te(N=>$e(h),["ctrl"])],onKeyup:Et(N=>_e(h),["enter"]),role:"button"},[g("div",Di,[h.icon&&p(i).preferences.showAccountsIcons?(y(),C("img",{key:0,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/icons/"+h.icon,alt:""},null,8,ki)):h.icon==null&&p(i).preferences.showAccountsIcons?(y(),C("img",{key:1,role:"presentation",class:"tfa-icon",src:p(e).config.subdirectory+"/storage/noicon.svg",alt:""},null,8,Ci)):z("",!0),Re(" "+I(h.service?h.service:v.$t("twofaccounts.no_service")),1),p(s).useEncryption&&h.account===v.$t("errors.indecipherable")?(y(),ye(G,{key:2,class:"has-text-danger is-size-5 ml-2",icon:["fas","exclamation-circle"]})):z("",!0),g("span",$i,I(h.account),1)])],40,Si),k(Xe,{name:"popLater"},{default:P(()=>[yt(g("div",Ti,[h.otp!=null?(y(),C("span",Oi,[p($)==!0&&(p(L)==-1||p(L)==h.period)?(y(),C("span",Ii,[k(G,{icon:["fas","circle-notch"],spin:""})])):(y(),C("span",{key:1,class:"always-on-otp is-clickable has-nowrap has-text-grey is-size-5 ml-4",onClick:N=>J(h.otp.password),onKeyup:Et(N=>J(h.otp.password),["enter"]),title:v.$t("commons.copy_to_clipboard")},I(p(Mn)(h.otp.password,p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP&&p(K)==h.id)),41,Ai)),h.otp_type.includes("totp")?(y(),ye(Nn,{key:2,class:W("condensed"),ref_for:!0,ref_key:"dotsRefs",ref:le,period:h.period},null,8,["period"])):z("",!0)])):(y(),C("span",Mi,[k(p(De),null,{default:P(({mode:N})=>[g("button",{class:W(["button tag",N=="dark"?"is-dark":"is-white"]),onClick:Xt=>H(h),title:v.$t("twofaccounts.import.import_this_account")},I(v.$t("commons.generate")),11,xi)]),_:2},1024)]))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024),p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP?(y(),ye(Xe,{key:0,name:"popLater"},{default:P(()=>[yt(g("div",Pi,[p(K)==h.id?(y(),C("button",{key:0,class:"pr-0 button is-ghost has-text-grey-dark",onClick:m[18]||(m[18]=Te(N=>K.value=null,["stop"]))},[k(V,{icon:["fas","eye"]})])):(y(),C("button",{key:1,class:"pr-0 button is-ghost has-text-grey-dark",onClick:Te(N=>K.value=h.id,["stop"])},[k(V,{icon:["fas","eye-slash"]})],8,Ni))],512),[[zt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024)):z("",!0),k(Xe,{name:"fadeInOut"},{default:P(()=>[p(r).inManagementMode?(y(),C("div",Fi,[k(p(De),null,{default:P(({mode:N})=>[k(Le,{to:{name:"editAccount",params:{twofaccountId:h.id}},class:W(["tag is-rounded mr-1",N=="dark"?"is-dark":"is-white"])},{default:P(()=>[Re(I(v.$t("commons.edit")),1)]),_:2},1032,["to","class"]),k(Le,{to:{name:"showQRcode",params:{twofaccountId:h.id}},class:W(["tag is-rounded",N=="dark"?"is-dark":"is-white"]),title:v.$t("twofaccounts.show_qrcode")},{default:P(()=>[k(G,{icon:["fas","qrcode"]})]),_:2},1032,["to","class","title"])]),_:2},1024)])):z("",!0)]),_:2},1024),k(Xe,{name:"fadeInOut"},{default:P(()=>[p(r).inManagementMode?(y(),C("div",Ri,[k(G,{icon:["fas","bars"]})])):z("",!0)]),_:1})])],2))),128))],2)]),k(bt,{showButtons:!0,internalFooterType:p(r).inManagementMode&&!p(S)?"doneButton":"navLinks",onDoneButtonClicked:Me},{default:P(()=>[k(So,{inManagementMode:p(r).inManagementMode,"onUpdate:inManagementMode":m[19]||(m[19]=h=>p(r).inManagementMode=h),areDisabled:p(a).hasNoneSelected,onMoveButtonClicked:m[20]||(m[20]=h=>S.value=!0),onDeleteButtonClicked:fe,onExportButtonClicked:m[21]||(m[21]=h=>E.value=!0)},null,8,["inManagementMode","areDisabled"])]),_:1},8,["internalFooterType"])],2)):z("",!0)])}}};export{zi as default}; diff --git a/public/build/assets/AdminTabs-CAsvsm7h.js b/public/build/assets/AdminTabs-Dso2jpCe.js similarity index 75% rename from public/build/assets/AdminTabs-CAsvsm7h.js rename to public/build/assets/AdminTabs-Dso2jpCe.js index 6bddbc97..999ec06c 100644 --- a/public/build/assets/AdminTabs-CAsvsm7h.js +++ b/public/build/assets/AdminTabs-Dso2jpCe.js @@ -1 +1,2 @@ -import{r as u,e as t,f as a,g as s,m as n,p as i,h as o,F as _,E as v,i as h,n as f,j as k,t as w}from"./app-CuhK3jij.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const T={class:"options-header"},b={class:"tabs is-centered is-fullwidth"},W={__name:"AdminTabs",props:{activeTab:{type:String,default:""}},setup(r){const d=u([{name:"admin.app_setup",view:"admin.appSetup",id:"lnkTabApp"},{name:"admin.auth",view:"admin.auth",id:"lnkTabAuth"},{name:"admin.users",view:"admin.users",id:"lnkTabUsers"}]),p=r;return(l,g)=>{const c=t("RouterLink"),m=t("ResponsiveWidthWrapper");return a(),s("div",T,[n(m,null,{default:i(()=>[o("div",b,[o("ul",null,[(a(!0),s(_,null,v(h(d),e=>(a(),s("li",{key:e.view,class:f({"is-active":e.view===p.activeTab})},[n(c,{id:e.id,to:{name:e.view}},{default:i(()=>[k(w(l.$t(e.name)),1)]),_:2},1032,["id","to"])],2))),128))])])]),_:1})])}}};export{W as _}; +import{r as u,l as t,m as a,d as s,j as n,k as i,e as o,F as _,D as v,f as h,n as f,g as k,t as w}from"./app-CzxRjCVM.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const T={class:"options-header"},b={class:"tabs is-centered is-fullwidth"},W={__name:"AdminTabs",props:{activeTab:{type:String,default:""}},setup(r){const d=u([{name:"admin.app_setup",view:"admin.appSetup",id:"lnkTabApp"},{name:"admin.auth",view:"admin.auth",id:"lnkTabAuth"},{name:"admin.users",view:"admin.users",id:"lnkTabUsers"}]),p=r;return(l,g)=>{const c=t("RouterLink"),m=t("ResponsiveWidthWrapper");return a(),s("div",T,[n(m,null,{default:i(()=>[o("div",b,[o("ul",null,[(a(!0),s(_,null,v(h(d),e=>(a(),s("li",{key:e.view,class:f({"is-active":e.view===p.activeTab})},[n(c,{id:e.id,to:{name:e.view}},{default:i(()=>[k(w(l.$t(e.name)),1)]),_:2},1032,["id","to"])],2))),128))])])]),_:1})])}}};export{W as _}; +//# sourceMappingURL=AdminTabs-Dso2jpCe.js.map diff --git a/public/build/assets/AdminTabs-Dso2jpCe.js.map b/public/build/assets/AdminTabs-Dso2jpCe.js.map new file mode 100644 index 00000000..f4865093 --- /dev/null +++ b/public/build/assets/AdminTabs-Dso2jpCe.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AdminTabs-Dso2jpCe.js","sources":["../../../resources/js/layouts/AdminTabs.vue"],"sourcesContent":["\n\n"],"names":["tabs","ref","props","__props"],"mappings":"uWACI,MAAMA,EAAOC,EAAI,CACb,CACI,KAAS,kBACT,KAAS,iBACT,GAAS,WACZ,EACD,CACI,KAAS,aACT,KAAS,aACT,GAAS,YACZ,EACD,CACI,KAAS,cACT,KAAS,cACT,GAAS,aACZ,CACJ,CAAA,EAEKC,EAAQC"} \ No newline at end of file diff --git a/public/build/assets/AppSetup-CjgtJWbk.js b/public/build/assets/AppSetup-CjgtJWbk.js new file mode 100644 index 00000000..4cfb681d --- /dev/null +++ b/public/build/assets/AppSetup-CjgtJWbk.js @@ -0,0 +1,2 @@ +import{_ as z}from"./AdminTabs-Dso2jpCe.js";import{a4 as P,R as I,r as f,l as p,m as d,d as u,e,n as T,f as s,t as n,j as l,k as F,g as v,i as H,U as W,u as j,a as E,a2 as q,a1 as G,o as J,L as K,F as O,D as Q,H as X}from"./app-CzxRjCVM.js";import{u as w}from"./appSettingsUpdater-CwAA4o0u.js";import{_ as Y}from"./CopyButton-B9az3SKR.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const k=P("web"),C={getSystemInfos(i={}){return k.get("system/infos",{...i})},getLastRelease(i={}){return k.get("system/latestRelease",{...i})},sendTestEmail(i={}){return k.post("system/test-email",{...i})},clearCache(i={}){return k.get("system/clear-cache",{...i})},optimize(i={}){return k.get("system/optimize",{...i})}},Z={class:"columns is-mobile is-vcentered"},ee={class:"column is-narrow"},se={class:"column"},te={class:"is-size-7",href:"https://github.com/Bubka/2FAuth/releases"},ne={key:1,class:"has-text-grey"},ae={key:2,class:"has-text-grey"},oe={__name:"VersionChecker",setup(i){const _=I(),b=f(!1),h=f();async function c(){b.value=!0,h.value=void 0,await C.getLastRelease({returnError:!0}).then(r=>{_.latestRelease=r.data.newRelease,h.value=r.data.newRelease===null?null:r.data.newRelease===!1}).catch(()=>{h.value=null}),b.value=!1}return(r,m)=>{const g=p("FontAwesomeIcon");return d(),u("div",Z,[e("div",ee,[e("button",{type:"button",class:T([s(b)?"is-loading":"","button is-link is-rounded is-small"]),onClick:c},n(r.$t("admin.check_now")),3)]),e("div",se,[l(s(W),null,{default:F(({mode:y})=>[s(_).latestRelease?(d(),u("span",{key:0,class:T(["mt-2",y=="dark"?"has-text-warning":"has-text-warning-dark"])},[m[0]||(m[0]=e("span",{class:"release-flag"},null,-1)),v(n(r.$t("admin.x_is_available",{version:s(_).latestRelease}))+" ",1),e("a",te,n(r.$t("admin.view_on_github")),1)],2)):H("",!0),s(h)?(d(),u("span",ne,[l(g,{icon:["fas","check"],class:"mr-1 has-text-success"}),v(" "+n(r.$t("commons.you_are_up_to_date")),1)])):s(h)===null?(d(),u("span",ae,[l(g,{icon:["fas","times"],class:"mr-1 has-text-danger"}),v(n(r.$t("errors.check_failed_try_later")),1)])):H("",!0)]),_:1})])])}}},le={class:"options-tabs"},ie={class:"title is-4 pt-4 has-text-grey-light"},re={class:"field"},ce=["innerHTML"],de=["innerHTML"],ue=["innerHTML"],me={class:"columns is-mobile is-vcentered"},_e={class:"column is-narrow"},he={class:"icon is-small"},pe={class:"field"},fe=["innerHTML"],be=["innerHTML"],ge={class:"title is-4 pt-5 has-text-grey-light"},ye={class:"title is-4 pt-5 has-text-grey-light"},ke={class:"title is-4 pt-5 has-text-grey-light"},ve={class:"field"},Ce=["innerHTML"],Te=["innerHTML"],$e={class:"field mb-5 is-grouped"},Le={class:"control"},we={class:"field"},Fe=["innerHTML"],He={key:0,class:"about-debug box is-family-monospace is-size-7"},Me=["value"],Ve={class:"has-text-grey"},Ee={key:1,class:"about-debug box is-family-monospace is-size-7 has-text-warning-dark"},Be={__name:"AppSetup",setup(i){const _=K("2fauth"),b=j(),h=E(),c=I(),r=q(_.prefix+"returnTo","accounts"),m=f(),g=f(null),y=f(!1),$=f(!1),S=_.config.subdirectory+"/up",R=location.hostname+_.config.subdirectory+"/up";function U(){y.value=!0,C.sendTestEmail().finally(()=>{y.value=!1})}function B(){$.value=!0,C.clearCache().then(t=>{E().success({type:"is-success",text:X("admin.cache_cleared")})}).finally(()=>{$.value=!1})}return G(t=>{t.name.startsWith("admin.")||h.clear()}),J(async()=>{await c.fetch(),C.getSystemInfos({returnError:!0}).then(t=>{m.value=t.data.common}).catch(()=>{m.value=null})}),(t,a)=>{const L=p("FormCheckbox"),A=p("FontAwesomeIcon"),N=p("FormWrapper"),D=p("ButtonBackCloseCancel"),x=p("VueFooter");return d(),u("div",null,[l(z,{activeTab:"admin.appSetup"}),e("div",le,[l(N,null,{default:F(()=>{var M;return[e("form",null,[e("h4",ie,n(t.$t("settings.general")),1),l(L,{modelValue:s(c).checkForUpdate,"onUpdate:modelValue":[a[0]||(a[0]=o=>s(c).checkForUpdate=o),a[1]||(a[1]=o=>s(w)("checkForUpdate",o))],fieldName:"checkForUpdate",label:"commons.check_for_update",help:"commons.check_for_update_help"},null,8,["modelValue"]),l(oe),e("div",re,[e("label",{class:"label",for:"btnTestEmail",innerHTML:t.$t("admin.forms.test_email.label")},null,8,ce),e("p",{class:"help",innerHTML:t.$t("admin.forms.test_email.help")},null,8,de),e("p",{class:"help",innerHTML:t.$t("admin.forms.test_email.email_will_be_send_to_x",{email:s(b).email})},null,8,ue)]),e("div",me,[e("div",_e,[e("button",{id:"btnTestEmail",type:"button",class:T([s(y)?"is-loading":"","button is-link is-rounded is-small"]),onClick:U},[e("span",he,[l(A,{icon:["far","paper-plane"]})]),e("span",null,n(t.$t("commons.send")),1)],2)])]),e("div",pe,[e("label",{class:"label",for:"lnkHealthCheck",innerHTML:t.$t("admin.forms.health_endpoint.label")},null,8,fe),e("p",{class:"help",innerHTML:t.$t("admin.forms.health_endpoint.help")},null,8,be)]),e("div",{class:"field mb-5"},[e("a",{id:"lnkHealthCheck",target:"_blank",href:S},n(R))]),e("h4",ge,n(t.$t("admin.storage")),1),l(L,{modelValue:s(c).storeIconsInDatabase,"onUpdate:modelValue":[a[2]||(a[2]=o=>s(c).storeIconsInDatabase=o),a[3]||(a[3]=o=>s(w)("storeIconsInDatabase",o))],fieldName:"storeIconsInDatabase",label:"admin.forms.store_icon_to_database.label",help:"admin.forms.store_icon_to_database.help"},null,8,["modelValue"]),e("h4",ye,n(t.$t("settings.security")),1),l(L,{modelValue:s(c).useEncryption,"onUpdate:modelValue":[a[4]||(a[4]=o=>s(c).useEncryption=o),a[5]||(a[5]=o=>s(w)("useEncryption",o))],fieldName:"useEncryption",label:"admin.forms.use_encryption.label",help:"admin.forms.use_encryption.help"},null,8,["modelValue"])]),e("h4",ke,n(t.$t("commons.environment")),1),e("div",ve,[e("label",{for:"btnClearCache",class:"label",innerHTML:t.$t("admin.forms.cache_management.label")},null,8,Ce),e("p",{class:"help",innerHTML:t.$t("admin.forms.cache_management.help")},null,8,Te)]),e("div",$e,[e("p",Le,[e("button",{id:"btnClearCache",type:"button",class:T([s($)?"is-loading":"","button is-link is-rounded is-small"]),onClick:B},n(t.$t("commons.clear")),3)])]),e("div",we,[e("label",{for:"btnCopyEnvVars",class:"label",innerHTML:t.$t("admin.variables")},null,8,Fe)]),s(m)?(d(),u("div",He,[l(Y,{id:"btnCopyEnvVars",token:(M=s(g))==null?void 0:M.innerText},null,8,["token"]),e("ul",{ref_key:"listInfos",ref:g,id:"listInfos"},[(d(!0),u(O,null,Q(s(m),(o,V)=>(d(),u("li",{value:o,key:V},[e("b",null,n(V),1),a[6]||(a[6]=v(": ")),e("span",Ve,n(o),1)],8,Me))),128))],512)])):s(m)===null?(d(),u("div",Ee,n(t.$t("errors.error_during_data_fetching")),1)):H("",!0)]}),_:1})]),l(x,{showButtons:!0},{default:F(()=>[l(D,{returnTo:{name:s(r)},action:"close"},null,8,["returnTo"])]),_:1})])}}};export{Be as default}; +//# sourceMappingURL=AppSetup-CjgtJWbk.js.map diff --git a/public/build/assets/AppSetup-CjgtJWbk.js.map b/public/build/assets/AppSetup-CjgtJWbk.js.map new file mode 100644 index 00000000..90c4474a --- /dev/null +++ b/public/build/assets/AppSetup-CjgtJWbk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AppSetup-CjgtJWbk.js","sources":["../../../resources/js/services/systemService.js","../../../resources/js/components/VersionChecker.vue","../../../resources/js/views/admin/AppSetup.vue"],"sourcesContent":["import { httpClientFactory } from '@/services/httpClientFactory'\n\nconst webClient = httpClientFactory('web')\n\nexport default {\n /**\n * \n * @returns Promise\n */\n getSystemInfos(config = {}) {\n return webClient.get('system/infos', { ...config })\n },\n\n /**\n * \n * @returns Promise\n */\n getLastRelease(config = {}) {\n return webClient.get('system/latestRelease', { ...config })\n },\n\n /**\n * \n * @returns Promise\n */\n sendTestEmail(config = {}) {\n return webClient.post('system/test-email', { ...config })\n },\n\n /**\n * \n * @returns Promise\n */\n clearCache(config = {}) {\n return webClient.get('system/clear-cache', { ...config })\n },\n\n /**\n * \n * @returns Promise\n */\n optimize(config = {}) {\n return webClient.get('system/optimize', { ...config })\n },\n \n}","\n\n\n","\n\n"],"names":["webClient","httpClientFactory","systemService","config","appSettings","useAppSettingsStore","isScanning","ref","isUpToDate","getLatestRelease","response","$2fauth","inject","user","useUserStore","notify","useNotifyStore","returnTo","useStorage","infos","listInfos","isSendingTestEmail","isClearingCache","healthEndPoint","healthEndPointFullPath","sendTestEmail","clearCache","trans","onBeforeRouteLeave","to","onMounted"],"mappings":"2aAEA,MAAMA,EAAYC,EAAkB,KAAK,EAE1BC,EAAA,CAKX,eAAeC,EAAS,GAAI,CACxB,OAAOH,EAAU,IAAI,eAAgB,CAAE,GAAGG,CAAQ,CAAA,CACrD,EAMD,eAAeA,EAAS,GAAI,CACxB,OAAOH,EAAU,IAAI,uBAAwB,CAAE,GAAGG,CAAQ,CAAA,CAC7D,EAMD,cAAcA,EAAS,GAAI,CACvB,OAAOH,EAAU,KAAK,oBAAqB,CAAE,GAAGG,CAAQ,CAAA,CAC3D,EAMD,WAAWA,EAAS,GAAI,CACpB,OAAOH,EAAU,IAAI,qBAAsB,CAAE,GAAGG,CAAQ,CAAA,CAC3D,EAMD,SAASA,EAAS,GAAI,CAClB,OAAOH,EAAU,IAAI,kBAAmB,CAAE,GAAGG,CAAQ,CAAA,CACxD,CAEL,6QCxCI,MAAMC,EAAcC,EAAmB,EACjCC,EAAaC,EAAI,EAAK,EACtBC,EAAaD,EAAG,EAEtB,eAAeE,GAAmB,CAC9BH,EAAW,MAAQ,GACnBE,EAAW,MAAQ,OAEnB,MAAMN,EAAc,eAAe,CAAC,YAAa,EAAI,CAAC,EACrD,KAAKQ,GAAY,CACdN,EAAY,cAAgBM,EAAS,KAAK,WAC1CF,EAAW,MAAQE,EAAS,KAAK,aAAe,KAAO,KAAOA,EAAS,KAAK,aAAe,EAC9F,CAAA,EACA,MAAM,IAAM,CACTF,EAAW,MAAQ,IACtB,CAAA,EAEDF,EAAW,MAAQ,EAC3B,goDCbI,MAAMK,EAAUC,EAAO,QAAQ,EACzBC,EAAOC,EAAY,EACnBC,EAASC,EAAc,EACvBZ,EAAcC,EAAmB,EACjCY,EAAWC,EAAWP,EAAQ,OAAS,WAAY,UAAU,EAE7DQ,EAAQZ,EAAG,EACXa,EAAYb,EAAI,IAAI,EACpBc,EAAqBd,EAAI,EAAK,EAC9Be,EAAkBf,EAAI,EAAK,EAC3BgB,EAAiBZ,EAAQ,OAAO,aAAe,MAC/Ca,EAAyB,SAAS,SAAWb,EAAQ,OAAO,aAAe,MAKjF,SAASc,GAAgB,CACrBJ,EAAmB,MAAQ,GAE3BnB,EAAc,cAAa,EAC1B,QAAQ,IAAM,CACXmB,EAAmB,MAAQ,EAC9B,CAAA,CACT,CAKI,SAASK,GAAa,CAClBJ,EAAgB,MAAQ,GAExBpB,EAAc,WAAU,EAAG,KAAKQ,GAAY,CACxCM,EAAgB,EAAC,QAAQ,CAAE,KAAM,aAAc,KAAMW,EAAM,qBAAqB,CAAG,CAAA,CACtF,CAAA,EACA,QAAQ,IAAM,CACXL,EAAgB,MAAQ,EAC3B,CAAA,CACT,CAEI,OAAAM,EAAoBC,GAAO,CACjBA,EAAG,KAAK,WAAW,QAAQ,GAC7Bd,EAAO,MAAK,CAEnB,CAAA,EAEDe,EAAU,SAAY,CAClB,MAAM1B,EAAY,MAAK,EAEvBF,EAAc,eAAe,CAAC,YAAa,EAAI,CAAC,EAAE,KAAKQ,GAAY,CAC/DS,EAAM,MAAQT,EAAS,KAAK,MAC/B,CAAA,EACA,MAAM,IAAM,CACTS,EAAM,MAAQ,IACjB,CAAA,CACJ,CAAA"} \ No newline at end of file diff --git a/public/build/assets/AppSetup-D27COJPH.js b/public/build/assets/AppSetup-D27COJPH.js deleted file mode 100644 index 9ffbe8e5..00000000 --- a/public/build/assets/AppSetup-D27COJPH.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as D}from"./AdminTabs-CAsvsm7h.js";import{a4 as P,S as V,r as f,e as p,f as u,g as d,h as e,n as T,i as s,t as n,m as o,p as F,j as k,l as M,U as W,L as j,a as q,b as S,a2 as G,a1 as J,o as K,F as O,E as Q,H as X}from"./app-CuhK3jij.js";import{u as w}from"./appSettingsUpdater-DcxdiO4R.js";import{_ as Y}from"./CopyButton-C1eOxUvy.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const v=P("web"),$={getSystemInfos(i={}){return v.get("system/infos",{...i})},getLastRelease(i={}){return v.get("system/latestRelease",{...i})},sendTestEmail(i={}){return v.post("system/test-email",{...i})},clearCache(i={}){return v.get("system/clear-cache",{...i})},optimize(i={}){return v.get("system/optimize",{...i})}},Z={class:"columns is-mobile is-vcentered"},ee={class:"column is-narrow"},se={class:"column"},te=e("span",{class:"release-flag"},null,-1),ne={class:"is-size-7",href:"https://github.com/Bubka/2FAuth/releases"},ae={key:1,class:"has-text-grey"},oe={key:2,class:"has-text-grey"},le={__name:"VersionChecker",setup(i){const m=V(),b=f(!1),_=f();async function c(){b.value=!0,_.value=void 0,await $.getLastRelease({returnError:!0}).then(r=>{m.latestRelease=r.data.newRelease,_.value=r.data.newRelease===null?null:r.data.newRelease===!1}).catch(()=>{_.value=null}),b.value=!1}return(r,h)=>{const g=p("FontAwesomeIcon");return u(),d("div",Z,[e("div",ee,[e("button",{type:"button",class:T([s(b)?"is-loading":"","button is-link is-rounded is-small"]),onClick:c},n(r.$t("admin.check_now")),3)]),e("div",se,[o(s(W),null,{default:F(({mode:y})=>[s(m).latestRelease?(u(),d("span",{key:0,class:T(["mt-2",y=="dark"?"has-text-warning":"has-text-warning-dark"])},[te,k(n(r.$t("admin.x_is_available",{version:s(m).latestRelease}))+" ",1),e("a",ne,n(r.$t("admin.view_on_github")),1)],2)):M("",!0),s(_)?(u(),d("span",ae,[o(g,{icon:["fas","check"],class:"mr-1 has-text-success"}),k(" "+n(r.$t("commons.you_are_up_to_date")),1)])):s(_)===null?(u(),d("span",oe,[o(g,{icon:["fas","times"],class:"mr-1 has-text-danger"}),k(n(r.$t("errors.check_failed_try_later")),1)])):M("",!0)]),_:1})])])}}},ie={class:"options-tabs"},re={class:"title is-4 pt-4 has-text-grey-light"},ce={class:"field"},ue=["innerHTML"],de=["innerHTML"],me=["innerHTML"],_e={class:"columns is-mobile is-vcentered"},he={class:"column is-narrow"},pe={class:"icon is-small"},fe={class:"field"},be=["innerHTML"],ge=["innerHTML"],ye={class:"title is-4 pt-5 has-text-grey-light"},ve={class:"title is-4 pt-5 has-text-grey-light"},ke={class:"title is-4 pt-5 has-text-grey-light"},$e={class:"field"},Te=["innerHTML"],Ce=["innerHTML"],Le={class:"field mb-5 is-grouped"},we={class:"control"},Fe={class:"field"},Me=["innerHTML"],He={key:0,class:"about-debug box is-family-monospace is-size-7"},Ie=["value"],Se={class:"has-text-grey"},Ve={key:1,class:"about-debug box is-family-monospace is-size-7 has-text-warning-dark"},Ae={__name:"AppSetup",setup(i){const m=j("2fauth"),b=q(),_=S(),c=V(),r=G(m.prefix+"returnTo","accounts"),h=f(),g=f(null),y=f(!1),C=f(!1),E=m.config.subdirectory+"/up",U=location.hostname+m.config.subdirectory+"/up";function R(){y.value=!0,$.sendTestEmail().finally(()=>{y.value=!1})}function B(){C.value=!0,$.clearCache().then(t=>{S().success({type:"is-success",text:X("admin.cache_cleared")})}).finally(()=>{C.value=!1})}return J(t=>{t.name.startsWith("admin.")||_.clear()}),K(async()=>{await c.fetch(),$.getSystemInfos({returnError:!0}).then(t=>{h.value=t.data.common}).catch(()=>{h.value=null})}),(t,l)=>{const L=p("FormCheckbox"),A=p("FontAwesomeIcon"),N=p("FormWrapper"),x=p("ButtonBackCloseCancel"),z=p("VueFooter");return u(),d("div",null,[o(D,{activeTab:"admin.appSetup"}),e("div",ie,[o(N,null,{default:F(()=>{var H;return[e("form",null,[e("h4",re,n(t.$t("settings.general")),1),o(L,{modelValue:s(c).checkForUpdate,"onUpdate:modelValue":[l[0]||(l[0]=a=>s(c).checkForUpdate=a),l[1]||(l[1]=a=>s(w)("checkForUpdate",a))],fieldName:"checkForUpdate",label:"commons.check_for_update",help:"commons.check_for_update_help"},null,8,["modelValue"]),o(le),e("div",ce,[e("label",{class:"label",innerHTML:t.$t("admin.forms.test_email.label")},null,8,ue),e("p",{class:"help",innerHTML:t.$t("admin.forms.test_email.help")},null,8,de),e("p",{class:"help",innerHTML:t.$t("admin.forms.test_email.email_will_be_send_to_x",{email:s(b).email})},null,8,me)]),e("div",_e,[e("div",he,[e("button",{type:"button",class:T([s(y)?"is-loading":"","button is-link is-rounded is-small"]),onClick:R},[e("span",pe,[o(A,{icon:["far","paper-plane"]})]),e("span",null,n(t.$t("commons.send")),1)],2)])]),e("div",fe,[e("label",{class:"label",innerHTML:t.$t("admin.forms.health_endpoint.label")},null,8,be),e("p",{class:"help",innerHTML:t.$t("admin.forms.health_endpoint.help")},null,8,ge)]),e("div",{class:"field mb-5"},[e("a",{target:"_blank",href:E},n(U))]),e("h4",ye,n(t.$t("admin.storage")),1),o(L,{modelValue:s(c).storeIconsInDatabase,"onUpdate:modelValue":[l[2]||(l[2]=a=>s(c).storeIconsInDatabase=a),l[3]||(l[3]=a=>s(w)("storeIconsInDatabase",a))],fieldName:"storeIconsInDatabase",label:"admin.forms.store_icon_to_database.label",help:"admin.forms.store_icon_to_database.help"},null,8,["modelValue"]),e("h4",ve,n(t.$t("settings.security")),1),o(L,{modelValue:s(c).useEncryption,"onUpdate:modelValue":[l[4]||(l[4]=a=>s(c).useEncryption=a),l[5]||(l[5]=a=>s(w)("useEncryption",a))],fieldName:"useEncryption",label:"admin.forms.use_encryption.label",help:"admin.forms.use_encryption.help"},null,8,["modelValue"])]),e("h4",ke,n(t.$t("commons.environment")),1),e("div",$e,[e("label",{class:"label",innerHTML:t.$t("admin.forms.cache_management.label")},null,8,Te),e("p",{class:"help",innerHTML:t.$t("admin.forms.cache_management.help")},null,8,Ce)]),e("div",Le,[e("p",we,[e("button",{type:"button",class:T([s(C)?"is-loading":"","button is-link is-rounded is-small"]),onClick:B},n(t.$t("commons.clear")),3)])]),e("div",Fe,[e("label",{class:"label",innerHTML:t.$t("admin.variables")},null,8,Me)]),s(h)?(u(),d("div",He,[o(Y,{id:"btnCopyEnvVars",token:(H=s(g))==null?void 0:H.innerText},null,8,["token"]),e("ul",{ref_key:"listInfos",ref:g,id:"listInfos"},[(u(!0),d(O,null,Q(s(h),(a,I)=>(u(),d("li",{value:a,key:I},[e("b",null,n(I),1),k(": "),e("span",Se,n(a),1)],8,Ie))),128))],512)])):s(h)===null?(u(),d("div",Ve,n(t.$t("errors.error_during_data_fetching")),1)):M("",!0)]}),_:1})]),o(z,{showButtons:!0},{default:F(()=>[o(x,{returnTo:{name:s(r)},action:"close"},null,8,["returnTo"])]),_:1})])}}};export{Ae as default}; diff --git a/public/build/assets/Auth-BknZQPI-.js b/public/build/assets/Auth-C7Y7ObbO.js similarity index 79% rename from public/build/assets/Auth-BknZQPI-.js rename to public/build/assets/Auth-C7Y7ObbO.js index a0dac73e..6bc2b6dc 100644 --- a/public/build/assets/Auth-BknZQPI-.js +++ b/public/build/assets/Auth-C7Y7ObbO.js @@ -1 +1,2 @@ -import{_ as h}from"./AdminTabs-CAsvsm7h.js";import{L as y,b as k,S as D,a2 as E,r as C,a1 as F,o as N,e as n,f as v,g as B,m as i,h as u,p as f,t as g,i as s,a7 as L,H as U}from"./app-CuhK3jij.js";import{u as a}from"./appSettingsUpdater-DcxdiO4R.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const x={class:"options-tabs"},I={class:"title is-4 pt-4 has-text-grey-light"},O={class:"title is-4 pt-4 has-text-grey-light"},W={__name:"Auth",setup(T){const V=y("2fauth"),m=k(),l=D(),c=E(V.prefix+"returnTo","accounts"),d=C({restrictList:null,restrictRule:null});async function p(r,e){if(d.value[r]=null,e=="")L.delete(r,{returnError:!0}).then(o=>{l[r]="",m.success({type:"is-success",text:U("settings.forms.setting_saved")})}).catch(o=>{o.response.status!==404&&m.error(o)});else{const{error:o}=await a(r,e,!0);o&&(d.value[r]=o.response.data.message)}}return F(r=>{r.name.startsWith("admin.")||m.clear()}),N(async()=>{await l.fetch()}),(r,e)=>{const o=n("FormCheckbox"),b=n("FormField"),R=n("FormWrapper"),S=n("ButtonBackCloseCancel"),_=n("VueFooter");return v(),B("div",null,[i(h,{activeTab:"admin.auth"}),u("div",x,[i(R,null,{default:f(()=>[u("form",null,[u("h4",I,g(r.$t("admin.single_sign_on")),1),i(o,{modelValue:s(l).enableSso,"onUpdate:modelValue":[e[0]||(e[0]=t=>s(l).enableSso=t),e[1]||(e[1]=t=>s(a)("enableSso",t))],fieldName:"enableSso",label:"admin.forms.enable_sso.label",help:"admin.forms.enable_sso.help"},null,8,["modelValue"]),i(o,{modelValue:s(l).useSsoOnly,"onUpdate:modelValue":[e[2]||(e[2]=t=>s(l).useSsoOnly=t),e[3]||(e[3]=t=>s(a)("useSsoOnly",t))],fieldName:"useSsoOnly",label:"admin.forms.use_sso_only.label",help:"admin.forms.use_sso_only.help",isDisabled:!s(l).enableSso,isIndented:!0},null,8,["modelValue","isDisabled"]),u("h4",O,g(r.$t("admin.registrations")),1),i(o,{modelValue:s(l).restrictRegistration,"onUpdate:modelValue":[e[4]||(e[4]=t=>s(l).restrictRegistration=t),e[5]||(e[5]=t=>s(a)("restrictRegistration",t))],fieldName:"restrictRegistration",isDisabled:s(l).disableRegistration,label:"admin.forms.restrict_registration.label",help:"admin.forms.restrict_registration.help"},null,8,["modelValue","isDisabled"]),i(b,{modelValue:s(l).restrictList,"onUpdate:modelValue":e[6]||(e[6]=t=>s(l).restrictList=t),"onChange:modelValue":e[7]||(e[7]=t=>p("restrictList",t)),fieldError:s(d).restrictList,fieldName:"restrictList",isDisabled:!s(l).restrictRegistration||s(l).disableRegistration,label:"admin.forms.restrict_list.label",help:"admin.forms.restrict_list.help",isIndented:!0},null,8,["modelValue","fieldError","isDisabled"]),i(b,{modelValue:s(l).restrictRule,"onUpdate:modelValue":e[8]||(e[8]=t=>s(l).restrictRule=t),"onChange:modelValue":e[9]||(e[9]=t=>p("restrictRule",t)),fieldError:s(d).restrictRule,fieldName:"restrictRule",isDisabled:!s(l).restrictRegistration||s(l).disableRegistration,label:"admin.forms.restrict_rule.label",help:"admin.forms.restrict_rule.help",isIndented:!0,leftIcon:"slash",rightIcon:"slash"},null,8,["modelValue","fieldError","isDisabled"]),i(o,{modelValue:s(l).disableRegistration,"onUpdate:modelValue":[e[10]||(e[10]=t=>s(l).disableRegistration=t),e[11]||(e[11]=t=>s(a)("disableRegistration",t))],fieldName:"disableRegistration",label:"admin.forms.disable_registration.label",help:"admin.forms.disable_registration.help"},null,8,["modelValue"]),i(o,{modelValue:s(l).keepSsoRegistrationEnabled,"onUpdate:modelValue":[e[12]||(e[12]=t=>s(l).keepSsoRegistrationEnabled=t),e[13]||(e[13]=t=>s(a)("keepSsoRegistrationEnabled",t))],fieldName:"keepSsoRegistrationEnabled",isDisabled:!s(l).enableSso||!s(l).disableRegistration,label:"admin.forms.keep_sso_registration_enabled.label",help:"admin.forms.keep_sso_registration_enabled.help",isIndented:!0},null,8,["modelValue","isDisabled"])])]),_:1})]),i(_,{showButtons:!0},{default:f(()=>[i(S,{returnTo:{name:s(c)},action:"close"},null,8,["returnTo"])]),_:1})])}}};export{W as default}; +import{_ as y}from"./AdminTabs-Dso2jpCe.js";import{a as h,R as k,a2 as D,r as E,a1 as C,o as F,d as N,j as i,e as u,k as f,L as v,l as n,m as B,t as g,f as s,a7 as L,H as U}from"./app-CzxRjCVM.js";import{u as a}from"./appSettingsUpdater-CwAA4o0u.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const x={class:"options-tabs"},I={class:"title is-4 pt-4 has-text-grey-light"},O={class:"title is-4 pt-4 has-text-grey-light"},W={__name:"Auth",setup(T){const V=v("2fauth"),m=h(),l=k(),R=D(V.prefix+"returnTo","accounts"),d=E({restrictList:null,restrictRule:null});async function p(r,e){if(d.value[r]=null,e=="")L.delete(r,{returnError:!0}).then(o=>{l[r]="",m.success({type:"is-success",text:U("settings.forms.setting_saved")})}).catch(o=>{o.response.status!==404&&m.error(o)});else{const{error:o}=await a(r,e,!0);o&&(d.value[r]=o.response.data.message)}}return C(r=>{r.name.startsWith("admin.")||m.clear()}),F(async()=>{await l.fetch()}),(r,e)=>{const o=n("FormCheckbox"),b=n("FormField"),c=n("FormWrapper"),S=n("ButtonBackCloseCancel"),_=n("VueFooter");return B(),N("div",null,[i(y,{activeTab:"admin.auth"}),u("div",x,[i(c,null,{default:f(()=>[u("form",null,[u("h4",I,g(r.$t("admin.single_sign_on")),1),i(o,{modelValue:s(l).enableSso,"onUpdate:modelValue":[e[0]||(e[0]=t=>s(l).enableSso=t),e[1]||(e[1]=t=>s(a)("enableSso",t))],fieldName:"enableSso",label:"admin.forms.enable_sso.label",help:"admin.forms.enable_sso.help"},null,8,["modelValue"]),i(o,{modelValue:s(l).useSsoOnly,"onUpdate:modelValue":[e[2]||(e[2]=t=>s(l).useSsoOnly=t),e[3]||(e[3]=t=>s(a)("useSsoOnly",t))],fieldName:"useSsoOnly",label:"admin.forms.use_sso_only.label",help:"admin.forms.use_sso_only.help",isDisabled:!s(l).enableSso,isIndented:!0},null,8,["modelValue","isDisabled"]),u("h4",O,g(r.$t("admin.registrations")),1),i(o,{modelValue:s(l).restrictRegistration,"onUpdate:modelValue":[e[4]||(e[4]=t=>s(l).restrictRegistration=t),e[5]||(e[5]=t=>s(a)("restrictRegistration",t))],fieldName:"restrictRegistration",isDisabled:s(l).disableRegistration,label:"admin.forms.restrict_registration.label",help:"admin.forms.restrict_registration.help"},null,8,["modelValue","isDisabled"]),i(b,{modelValue:s(l).restrictList,"onUpdate:modelValue":e[6]||(e[6]=t=>s(l).restrictList=t),"onChange:modelValue":e[7]||(e[7]=t=>p("restrictList",t)),fieldError:s(d).restrictList,fieldName:"restrictList",isDisabled:!s(l).restrictRegistration||s(l).disableRegistration,label:"admin.forms.restrict_list.label",help:"admin.forms.restrict_list.help",isIndented:!0},null,8,["modelValue","fieldError","isDisabled"]),i(b,{modelValue:s(l).restrictRule,"onUpdate:modelValue":e[8]||(e[8]=t=>s(l).restrictRule=t),"onChange:modelValue":e[9]||(e[9]=t=>p("restrictRule",t)),fieldError:s(d).restrictRule,fieldName:"restrictRule",isDisabled:!s(l).restrictRegistration||s(l).disableRegistration,label:"admin.forms.restrict_rule.label",help:"admin.forms.restrict_rule.help",isIndented:!0,leftIcon:"slash",rightIcon:"slash"},null,8,["modelValue","fieldError","isDisabled"]),i(o,{modelValue:s(l).disableRegistration,"onUpdate:modelValue":[e[10]||(e[10]=t=>s(l).disableRegistration=t),e[11]||(e[11]=t=>s(a)("disableRegistration",t))],fieldName:"disableRegistration",label:"admin.forms.disable_registration.label",help:"admin.forms.disable_registration.help"},null,8,["modelValue"]),i(o,{modelValue:s(l).keepSsoRegistrationEnabled,"onUpdate:modelValue":[e[12]||(e[12]=t=>s(l).keepSsoRegistrationEnabled=t),e[13]||(e[13]=t=>s(a)("keepSsoRegistrationEnabled",t))],fieldName:"keepSsoRegistrationEnabled",isDisabled:!s(l).enableSso||!s(l).disableRegistration,label:"admin.forms.keep_sso_registration_enabled.label",help:"admin.forms.keep_sso_registration_enabled.help",isIndented:!0},null,8,["modelValue","isDisabled"])])]),_:1})]),i(_,{showButtons:!0},{default:f(()=>[i(S,{returnTo:{name:s(R)},action:"close"},null,8,["returnTo"])]),_:1})])}}};export{W as default}; +//# sourceMappingURL=Auth-C7Y7ObbO.js.map diff --git a/public/build/assets/Auth-C7Y7ObbO.js.map b/public/build/assets/Auth-C7Y7ObbO.js.map new file mode 100644 index 00000000..d26ec320 --- /dev/null +++ b/public/build/assets/Auth-C7Y7ObbO.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Auth-C7Y7ObbO.js","sources":["../../../resources/js/views/admin/Auth.vue"],"sourcesContent":["\n\n\n"],"names":["$2fauth","inject","notify","useNotifyStore","appSettings","useAppSettingsStore","returnTo","useStorage","fieldErrors","ref","saveOrDeleteSetting","setting","value","appSettingService","response","trans","error","useAppSettingsUpdater","onBeforeRouteLeave","to","onMounted"],"mappings":"2eAOI,MAAMA,EAAUC,EAAO,QAAQ,EACzBC,EAASC,EAAc,EACvBC,EAAcC,EAAmB,EACjCC,EAAWC,EAAWP,EAAQ,OAAS,WAAY,UAAU,EAE7DQ,EAAcC,EAAI,CACpB,aAAc,KACd,aAAc,IACjB,CAAA,EAkBD,eAAeC,EAAoBC,EAASC,EAAO,CAM/C,GALAJ,EAAY,MAAMG,CAAO,EAAI,KAKzBC,GAAS,GACTC,EAAkB,OAAOF,EAAS,CAAE,YAAa,GAAM,EAAE,KAAKG,GAAY,CACtEV,EAAYO,CAAO,EAAI,GACvBT,EAAO,QAAQ,CAAE,KAAM,aAAc,KAAMa,EAAM,8BAA8B,CAAG,CAAA,CACrF,CAAA,EACA,MAAMC,GAAS,CACRA,EAAM,SAAS,SAAW,KAC1Bd,EAAO,MAAMc,CAAK,CAEzB,CAAA,MAEA,CACD,KAAM,CAAE,MAAAA,CAAK,EAAK,MAAMC,EAAsBN,EAASC,EAAO,EAAI,EAE9DI,IACAR,EAAY,MAAMG,CAAO,EAAIK,EAAM,SAAS,KAAK,QAEjE,CACA,CAEI,OAAAE,EAAoBC,GAAO,CACjBA,EAAG,KAAK,WAAW,QAAQ,GAC7BjB,EAAO,MAAK,CAEnB,CAAA,EAEDkB,EAAU,SAAY,CAClB,MAAMhB,EAAY,MAAK,CAC1B,CAAA"} \ No newline at end of file diff --git a/public/build/assets/Capture-CIhtAWpt.js b/public/build/assets/Capture-CIhtAWpt.js deleted file mode 100644 index a6243f5e..00000000 --- a/public/build/assets/Capture-CIhtAWpt.js +++ /dev/null @@ -1,3 +0,0 @@ -import{q as So,r as ne,s as Be,o as Wr,v as Po,x as Ut,f as ue,g as ge,h as I,y as Eo,z as Ht,A as Ur,B as Oo,u as Ao,b as Mo,d as xo,e as Lt,i as Z,t as Se,m as pe,p as Nt,C as ko,k as _r,l as Tr,D as $r,F as Sr,E as Do,G as jo,n as Pr,U as Er,H as Or}from"./app-CuhK3jij.js";import{F as Ro}from"./Form-o2lWAB-o.js";import{S as Fo}from"./Spinner-WULdfd4I.js";import{_ as Io}from"./QrContentDisplay-CyBGNU2O.js";import{u as Wo}from"./bus-BalNs30H.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */var Lr=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},Ar=(r,i,a)=>(Lr(r,i,"read from private field"),a?a.call(r):i.get(r)),Uo=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},Lo=(r,i,a,c)=>(Lr(r,i,"write to private field"),c?c.call(r,a):i.set(r,a),a);const Nr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],No=[...Nr,["unknown"]].map(r=>r[0]),lt=new Map(Nr);function Ho(r){for(const[i,a]of lt)if(r===a)return i;return"unknown"}function Vo(r){if(Hr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Vr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Br(r))return{width:r.videoWidth,height:r.videoHeight};if(Gr(r))return{width:r.width,height:r.height};if(Jr(r))return{width:r.displayWidth,height:r.displayHeight};if(zr(r))return{width:r.width,height:r.height};if(qr(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Hr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Vr(r){try{return r instanceof SVGImageElement}catch{return!1}}function Br(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function zr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function Gr(r){try{return r instanceof ImageBitmap}catch{return!1}}function qr(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Jr(r){try{return r instanceof VideoFrame}catch{return!1}}function Yr(r){try{return r instanceof Blob}catch{return!1}}function Bo(r){try{return r instanceof ImageData}catch{return!1}}function zo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Qr(r){if(Hr(r)&&!await Yo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Vr(r)&&!await Qo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Jr(r)&&Xo(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Br(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Gr(r)&&Zo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=Vo(r);if(i===0||a===0)return null;const c=zo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Go(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Qr(i)}function qo(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Jo(r){if(Yr(r))return await Go(r);if(Bo(r)){if(Ko(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return zr(r)||qr(r)?qo(r):await Qr(r)}async function Yo(r){try{return await r.decode(),!0}catch{return!1}}async function Qo(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function Xo(r){return r.format===null}function Ko(r){return r.data.buffer.byteLength===0}function Zo(r){return r.width===0&&r.height===0}function Mr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const xr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function ei(r){return r.join("|")}function ti(r){const i=kr(r);let a=0,c=xr.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),m=xr[f],v=kr(m);if(v===i)return m;v{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let Dr=new WeakMap;function Bt(r,i){var a;const c=Dr.get(r);if(c!=null&&c.modulePromise&&(i===void 0||Object.is(i,c.moduleOverrides)))return c.modulePromise;const f=(a=i??(c==null?void 0:c.moduleOverrides))!=null?a:ci,m=r({...f});return Dr.set(r,{moduleOverrides:f,modulePromise:m}),m}async function ui(r,i,a=De){const c={...De,...a},f=await Bt(r),{size:m}=i,v=new Uint8Array(await i.arrayBuffer()),C=f._malloc(m);f.HEAPU8.set(v,C);const h=f.readBarcodesFromImage(C,m,Xr(f,c));f._free(C);const w=[];for(let _=0;_{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var m=Object.assign({},a),v="./this.program",C=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function _(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(C||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var D=a.printErr||console.error.bind(console);Object.assign(a,m),m=null,a.arguments&&a.arguments,a.thisProgram&&(v=a.thisProgram),a.quit&&a.quit;var j;a.wasmBinary&&(j=a.wasmBinary),typeof WebAssembly!="object"&&te("no native wasm support detected");var k,W=!1,L,P,F,x,S,A,N,ae;function Pe(){var e=k.buffer;a.HEAP8=L=new Int8Array(e),a.HEAP16=F=new Int16Array(e),a.HEAPU8=P=new Uint8Array(e),a.HEAPU16=x=new Uint16Array(e),a.HEAP32=S=new Int32Array(e),a.HEAPU32=A=new Uint32Array(e),a.HEAPF32=N=new Float32Array(e),a.HEAPF64=ae=new Float64Array(e)}var Ee=[],je=[],Re=[];function Ge(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)mt(a.preRun.shift());bt(Ee)}function ht(){bt(je)}function pt(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Fe(a.postRun.shift());bt(Re)}function mt(e){Ee.unshift(e)}function vt(e){je.unshift(e)}function Fe(e){Re.unshift(e)}var ie=0,_e=null;function yt(e){var t;ie++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,ie)}function ve(e){var t;if(ie--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,ie),ie==0&&_e){var n=_e;_e=null,n()}}function te(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",D(e),W=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var gt="data:application/octet-stream;base64,",qe=e=>e.startsWith(gt),ye;ye="zxing_reader.wasm",qe(ye)||(ye=_(ye));function Je(e){if(e==ye&&j)return new Uint8Array(j);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function wt(e){return!j&&(C||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>Je(e)):Promise.resolve().then(()=>Je(e))}function Ye(e,t,n){return wt(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{D(`failed to asynchronously prepare wasm: ${o}`),te(o)})}function pn(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!qe(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return D(`wasm streaming compile failed: ${l}`),D("falling back to ArrayBuffer instantiation"),Ye(t,n,o)})}):Ye(t,n,o)}function mn(){var e={a:ro};function t(o,s){return Y=o.exports,k=Y.ia,Pe(),tr=Y.ma,vt(Y.ja),ve(),Y}yt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){D(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return pn(j,ye,e,n).catch(f),{}}var bt=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Qe=[],Xe=0,vn=e=>{var t=new Ct(e);return t.get_caught()||(t.set_caught(!0),Xe--),t.set_rethrown(!1),Qe.push(t),mr(t.excPtr),t.get_exception_ptr()},de=0,yn=()=>{H(0,0);var e=Qe.pop();pr(e.excPtr),de=0};function Ct(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,L[this.ptr+12>>0]=t},this.get_caught=function(){return L[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,L[this.ptr+13>>0]=t},this.get_rethrown=function(){return L[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=yr(this.get_type());if(t)return A[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var gn=e=>{throw de||(de=e),de},_t=e=>{var t=de;if(!t)return Ve(0),0;var n=new Ct(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Ve(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(vr(u,o,l))return Ve(u),t}return Ve(o),t},wn=()=>_t([]),bn=e=>_t([e]),Cn=(e,t)=>_t([e,t]),_n=()=>{var e=Qe.pop();e||te("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Qe.push(e),e.set_rethrown(!0),e.set_caught(!1),Xe++),de=t,de},Tn=(e,t,n)=>{var o=new Ct(e);throw o.init(t,n),de=e,Xe++,de},$n=()=>Xe,Ke={},Tt=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function $t(e){return this.fromWireType(S[e>>2])}var Oe={},Te={},Ze={},Gt,et=e=>{throw new Gt(e)},$e=(e,t,n)=>{e.forEach(function(d){Ze[d]=t});function o(d){var p=n(d);p.length!==e.length&&et("Mismatched type converter count");for(var g=0;g{Te.hasOwnProperty(d)?s[p]=Te[d]:(u.push(d),Oe.hasOwnProperty(d)||(Oe[d]=[]),Oe[d].push(()=>{s[p]=Te[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},Sn=e=>{var t=Ke[e];delete Ke[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));$e([e],u,l=>{var d={};return s.forEach((p,g)=>{var T=p.fieldName,E=l[g],O=p.getter,M=p.getterContext,V=l[g+s.length],q=p.setter,U=p.setterContext;d[T]={read:K=>E.fromWireType(O(M,K)),write:(K,y)=>{var $=[];q(U,K,V.toWireType($,y)),Tt($)}}}),[{name:t.name,fromWireType:p=>{var g={};for(var T in d)g[T]=d[T].read(p);return o(p),g},toWireType:(p,g)=>{for(var T in d)if(!(T in g))throw new TypeError(`Missing field: "${T}"`);var E=n();for(T in d)d[T].write(E,g[T]);return p!==null&&p.push(o,E),E},argPackAdvance:ce,readValueFromPointer:$t,destructorFunction:o}]})},Pn=(e,t,n,o,s)=>{},En=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);qt=e},qt,X=e=>{for(var t="",n=e;P[n];)t+=qt[P[n++]];return t},Ae,R=e=>{throw new Ae(e)};function On(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||R(`type "${o}" must have a positive integer typeid pointer`),Te.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;R(`Cannot register type '${o}' twice`)}if(Te[e]=t,delete Ze[e],Oe.hasOwnProperty(e)){var s=Oe[e];delete Oe[e],s.forEach(u=>u())}}function se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return On(e,t,n)}var ce=8,An=(e,t,n,o)=>{t=X(t),se(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:ce,readValueFromPointer:function(s){return this.fromWireType(P[s])},destructorFunction:null})},Mn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),St=e=>{function t(n){return n.$$.ptrType.registeredClass.name}R(t(e)+" instance already deleted")},Pt=!1,Jt=e=>{},xn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Yt=e=>{e.count.value-=1;var t=e.count.value===0;t&&xn(e)},Qt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Qt(e,t,n.baseClass);return o===null?null:n.downcast(o)},Xt={},kn=()=>Object.keys(Ue).length,Dn=()=>{var e=[];for(var t in Ue)Ue.hasOwnProperty(t)&&e.push(Ue[t]);return e},Ie=[],Et=()=>{for(;Ie.length;){var e=Ie.pop();e.$$.deleteScheduled=!1,e.delete()}},We,jn=e=>{We=e,Ie.length&&We&&We(Et)},Rn=()=>{a.getInheritedInstanceCount=kn,a.getLiveInheritedInstances=Dn,a.flushPendingDeletes=Et,a.setDelayFunction=jn},Ue={},Fn=(e,t)=>{for(t===void 0&&R("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},In=(e,t)=>(t=Fn(e,t),Ue[t]),tt=(e,t)=>{(!t.ptrType||!t.ptr)&&et("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&et("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Le(Object.create(e,{$$:{value:t,writable:!0}}))};function Wn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=In(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?tt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):tt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Xt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var p=Qt(t,this.registeredClass,d.registeredClass);return p===null?s.call(this):this.isSmartPointer?tt(d.registeredClass.instancePrototype,{ptrType:d,ptr:p,smartPtrType:this,smartPtr:e}):tt(d.registeredClass.instancePrototype,{ptrType:d,ptr:p})}var Le=e=>typeof FinalizationRegistry>"u"?(Le=t=>t,e):(Pt=new FinalizationRegistry(t=>{Yt(t.$$)}),Le=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};Pt.register(t,s,t)}return t},Jt=t=>Pt.unregister(t),Le(e)),Un=()=>{Object.assign(rt.prototype,{isAliasOf(e){if(!(this instanceof rt)||!(e instanceof rt))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||St(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Le(Object.create(Object.getPrototypeOf(this),{$$:{value:Mn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&R("Object already scheduled for deletion"),Jt(this),Yt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&R("Object already scheduled for deletion"),Ie.push(this),Ie.length===1&&We&&We(Et),this.$$.deleteScheduled=!0,this}})};function rt(){}var Ne=(e,t)=>Object.defineProperty(t,"name",{value:e}),Kt=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||R(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},Ot=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&R(`Cannot register public name '${e}' twice`),Kt(a,e,e),a.hasOwnProperty(n)&&R(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},Ln=48,Nn=57,Hn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Ln&&t<=Nn?`_${e}`:e};function Vn(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var At=(e,t,n)=>{for(;t!==n;)t.upcast||R(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Bn(e,t){if(t===null)return this.isReference&&R(`null is not a valid ${this.name}`),0;t.$$||R(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||R(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=At(t.$$.ptr,n,this.registeredClass);return o}function zn(e,t){var n;if(t===null)return this.isReference&&R(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&R(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||R(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&R(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=At(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&R("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:R(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,fe.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:R("Unsupporting sharing policy")}return n}function Gn(e,t){if(t===null)return this.isReference&&R(`null is not a valid ${this.name}`),0;t.$$||R(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||R(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&R(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=At(t.$$.ptr,n,this.registeredClass);return o}function Zt(e){return this.fromWireType(A[e>>2])}var qn=()=>{Object.assign(nt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ce,readValueFromPointer:Zt,deleteObject(e){e!==null&&e.delete()},fromWireType:Wn})};function nt(e,t,n,o,s,u,l,d,p,g,T){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=p,this.rawShare=g,this.rawDestructor=T,!s&&t.baseClass===void 0?o?(this.toWireType=Bn,this.destructorFunction=null):(this.toWireType=Gn,this.destructorFunction=null):this.toWireType=zn}var er=(e,t,n)=>{a.hasOwnProperty(e)||et("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},Jn=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},at=[],tr,B=e=>{var t=at[e];return t||(e>=at.length&&(at.length=e+1),at[e]=t=tr.get(e)),t},Yn=(e,t,n)=>{if(e.includes("j"))return Jn(e,t,n);var o=B(t).apply(null,n);return o},Qn=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),Yn(e,t,n)}},oe=(e,t)=>{e=X(e);function n(){return e.includes("j")?Qn(e,t):B(t)}var o=n();return typeof o!="function"&&R(`unknown function pointer with signature ${e}: ${t}`),o},Xn=(e,t)=>{var n=Ne(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+` -`+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},rr,nr=e=>{var t=hr(e),n=X(t);return he(t),n},ot=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!Te[u]){if(Ze[u]){Ze[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new rr(`${e}: `+n.map(nr).join([", "]))},Kn=(e,t,n,o,s,u,l,d,p,g,T,E,O)=>{T=X(T),u=oe(s,u),d&&(d=oe(l,d)),g&&(g=oe(p,g)),O=oe(E,O);var M=Hn(T);Ot(M,function(){ot(`Cannot construct ${T} due to unbound types`,[o])}),$e([e,t,n],o?[o]:[],function(V){V=V[0];var q,U;o?(q=V.registeredClass,U=q.instancePrototype):U=rt.prototype;var K=Ne(T,function(){if(Object.getPrototypeOf(this)!==y)throw new Ae("Use 'new' to construct "+T);if($.constructor_body===void 0)throw new Ae(T+" has no accessible constructor");var Cr=$.constructor_body[arguments.length];if(Cr===void 0)throw new Ae(`Tried to invoke ctor of ${T} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return Cr.apply(this,arguments)}),y=Object.create(U,{constructor:{value:K}});K.prototype=y;var $=new Vn(T,K,y,O,q,u,d,g);if($.baseClass){var J,Q;(Q=(J=$.baseClass).__derivedClasses)!==null&&Q!==void 0||(J.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var Me=new nt(T,$,!0,!1,!1),ct=new nt(T+"*",$,!1,!1,!1),br=new nt(T+" const*",$,!1,!0,!1);return Xt[e]={pointerType:ct,constPointerType:br},er(M,K),[Me,ct,br]})},Mt=(e,t)=>{for(var n=[],o=0;o>2]);return n};function Zn(e){for(var t=1;t{var l=Mt(t,n);s=oe(o,s),$e([],[e],function(d){d=d[0];var p=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new Ae(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{ot(`Cannot construct ${d.name} due to unbound types`,l)},$e([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=xt(p,g,null,s,u),[])),[]})},ar=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},ta=(e,t,n,o,s,u,l,d,p)=>{var g=Mt(n,o);t=X(t),t=ar(t),u=oe(s,u),$e([],[e],function(T){T=T[0];var E=`${T.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&T.registeredClass.pureVirtualFunctions.push(t);function O(){ot(`Cannot call ${E} due to unbound types`,g)}var M=T.registeredClass.instancePrototype,V=M[t];return V===void 0||V.overloadTable===void 0&&V.className!==T.name&&V.argCount===n-2?(O.argCount=n-2,O.className=T.name,M[t]=O):(Kt(M,t,E),M[t].overloadTable[n-2]=O),$e([],g,function(q){var U=xt(E,q,T,u,l);return M[t].overloadTable===void 0?(U.argCount=n-2,M[t]=U):M[t].overloadTable[n-2]=U,[]}),[]})};function ra(){Object.assign(or.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function or(){this.allocated=[void 0],this.freelist=[]}var re=new or,kt=e=>{e>=re.reserved&&--re.get(e).refcount===0&&re.free(e)},na=()=>{for(var e=0,t=re.reserved;t{re.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),re.reserved=re.allocated.length,a.count_emval_handles=na},fe={toValue:e=>(e||R("Cannot use deleted val. handle = "+e),re.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return re.allocate({refcount:1,value:e})}}},oa=(e,t)=>{t=X(t),se(e,{name:t,fromWireType:n=>{var o=fe.toValue(n);return kt(n),o},toWireType:(n,o)=>fe.toHandle(o),argPackAdvance:ce,readValueFromPointer:$t,destructorFunction:null})},ia=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(L[o>>0])}:function(o){return this.fromWireType(P[o>>0])};case 2:return n?function(o){return this.fromWireType(F[o>>1])}:function(o){return this.fromWireType(x[o>>1])};case 4:return n?function(o){return this.fromWireType(S[o>>2])}:function(o){return this.fromWireType(A[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},sa=(e,t,n,o)=>{t=X(t);function s(){}s.values={},se(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:ce,readValueFromPointer:ia(t,n,o),destructorFunction:null}),Ot(t,s)},Dt=(e,t)=>{var n=Te[e];return n===void 0&&R(t+" has unknown type "+nr(e)),n},ca=(e,t,n)=>{var o=Dt(e,"enum");t=X(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:Ne(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},jt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},ua=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(N[n>>2])};case 8:return function(n){return this.fromWireType(ae[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},la=(e,t,n)=>{t=X(t),se(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:ce,readValueFromPointer:ua(t,n),destructorFunction:null})},da=(e,t,n,o,s,u,l)=>{var d=Mt(t,n);e=X(e),e=ar(e),s=oe(o,s),Ot(e,function(){ot(`Cannot call ${e} due to unbound types`,d)},t-1),$e([],d,function(p){var g=[p[0],null].concat(p.slice(1));return er(e,xt(e,g,null,s,u),t-1),[]})},fa=(e,t,n)=>{switch(t){case 1:return n?o=>L[o>>0]:o=>P[o>>0];case 2:return n?o=>F[o>>1]:o=>x[o>>1];case 4:return n?o=>S[o>>2]:o=>A[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ha=(e,t,n,o,s)=>{t=X(t);var u=T=>T;if(o===0){var l=32-8*n;u=T=>T<>>l}var d=t.includes("unsigned"),p=(T,E)=>{},g;d?g=function(T,E){return p(E,this.name),E>>>0}:g=function(T,E){return p(E,this.name),E},se(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:ce,readValueFromPointer:fa(t,n,o!==0),destructorFunction:null})},pa=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=A[l>>2],p=A[l+4>>2];return new s(L.buffer,p,d)}n=X(n),se(e,{name:n,fromWireType:u,argPackAdvance:ce,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},ir=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},ma=(e,t,n)=>ir(e,P,t,n),sr=e=>{for(var t=0,n=0;n=55296&&o<=57343?(t+=4,++n):t+=3}return t},cr=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,va=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&cr)return cr.decode(e.subarray(t,s));for(var u="";t>10,56320|g&1023)}}return u},Rt=(e,t)=>e?va(P,e,t):"",ya=(e,t)=>{t=X(t);var n=t==="std::string";se(e,{name:t,fromWireType(o){var s=A[o>>2],u=o+4,l;if(n)for(var d=u,p=0;p<=s;++p){var g=u+p;if(p==s||P[g]==0){var T=g-d,E=Rt(d,T);l===void 0?l=E:(l+="\0",l+=E),d=g+1}}else{for(var O=new Array(s),p=0;p>2]=u,n&&l)ma(s,p,u+1);else if(l)for(var g=0;g255&&(he(p),R("String has UTF-16 code units that do not fit in 8 bits")),P[p+g]=T}else for(var g=0;g{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&x[o];)++o;if(n=o<<1,n-e>32&&ur)return ur.decode(P.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=F[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},wa=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n>1]=d,t+=2}return F[t>>1]=0,t-s},ba=e=>e.length*2,Ca=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=S[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},_a=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(S[t>>2]=d,t+=4,t+4>u)break}return S[t>>2]=0,t-s},Ta=e=>{for(var t=0,n=0;n=55296&&o<=57343&&++n,t+=4}return t},$a=(e,t,n)=>{n=X(n);var o,s,u,l,d;t===2?(o=ga,s=wa,l=ba,u=()=>x,d=1):t===4&&(o=Ca,s=_a,l=Ta,u=()=>A,d=2),se(e,{name:n,fromWireType:p=>{for(var g=A[p>>2],T=u(),E,O=p+4,M=0;M<=g;++M){var V=p+4+M*t;if(M==g||T[V>>d]==0){var q=V-O,U=o(O,q);E===void 0?E=U:(E+="\0",E+=U),O=V+t}}return he(p),E},toWireType:(p,g)=>{typeof g!="string"&&R(`Cannot pass non-string to C++ string type ${n}`);var T=l(g),E=Wt(4+T+t);return A[E>>2]=T>>d,s(g,E+4,T+t),p!==null&&p.push(he,E),E},argPackAdvance:ce,readValueFromPointer:$t,destructorFunction(p){he(p)}})},Sa=(e,t,n,o,s,u)=>{Ke[e]={name:X(t),rawConstructor:oe(n,o),rawDestructor:oe(s,u),fields:[]}},Pa=(e,t,n,o,s,u,l,d,p,g)=>{Ke[e].fields.push({fieldName:X(t),getterReturnType:n,getter:oe(o,s),getterContext:u,setterArgumentType:l,setter:oe(d,p),setterContext:g})},Ea=(e,t)=>{t=X(t),se(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Ft=[],Oa=(e,t,n,o)=>(e=Ft[e],t=fe.toValue(t),e(null,t,n,o)),Aa={},Ma=e=>{var t=Aa[e];return t===void 0?X(e):t},lr=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},xa=e=>e===0?fe.toHandle(lr()):(e=Ma(e),fe.toHandle(lr()[e])),ka=e=>{var t=Ft.length;return Ft.push(e),t},Da=(e,t)=>{for(var n=new Array(e),o=0;o>2],"parameter "+o);return n},ja=Reflect.construct,Ra=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(A[t>>2]=fe.toHandle(o)),s},Fa=(e,t,n)=>{var o=Da(e,t),s=o.shift();e--;var u=new Array(e),l=(p,g,T,E)=>{for(var O=0,M=0;Mp.name).join(", ")}) => ${s.name}>`;return ka(Ne(d,l))},Ia=e=>{e>4&&(re.get(e).refcount+=1)},Wa=e=>{var t=fe.toValue(e);Tt(t),kt(e)},Ua=(e,t)=>{e=Dt(e,"_emval_take_value");var n=e.readValueFromPointer(t);return fe.toHandle(n)},La=()=>{te("")},Na=(e,t,n)=>P.copyWithin(e,t,t+n),Ha=()=>2147483648,Va=e=>{var t=k.buffer,n=(e-t.byteLength+65535)/65536;try{return k.grow(n),Pe(),1}catch{}},Ba=e=>{var t=P.length;e>>>=0;var n=Ha();if(e>n)return!1;for(var o=(p,g)=>p+(g-p%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=Va(l);if(d)return!0}return!1},It={},za=()=>v||"./this.program",He=()=>{if(!He.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:za()};for(var n in It)It[n]===void 0?delete t[n]:t[n]=It[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);He.strings=o}return He.strings},Ga=(e,t)=>{for(var n=0;n>0]=e.charCodeAt(n);L[t>>0]=0},qa=(e,t)=>{var n=0;return He().forEach((o,s)=>{var u=t+n;A[e+s*4>>2]=u,Ga(o,u),n+=o.length+1}),0},Ja=(e,t)=>{var n=He();A[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),A[t>>2]=o,0},Ya=e=>e,it=e=>e%4===0&&(e%100!==0||e%400===0),Qa=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},dr=[31,29,31,30,31,30,31,31,30,31,30,31],fr=[31,28,31,30,31,30,31,31,30,31,30,31],Xa=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=it(n.getFullYear()),s=n.getMonth(),u=(o?dr:fr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function Ka(e,t,n){var o=n>0?n:sr(e)+1,s=new Array(o),u=ir(e,s,0,s.length);return t&&(s.length=u),s}var Za=(e,t)=>{L.set(e,t)},eo=(e,t,n,o)=>{var s=A[o+40>>2],u={tm_sec:S[o>>2],tm_min:S[o+4>>2],tm_hour:S[o+8>>2],tm_mday:S[o+12>>2],tm_mon:S[o+16>>2],tm_year:S[o+20>>2],tm_wday:S[o+24>>2],tm_yday:S[o+28>>2],tm_isdst:S[o+32>>2],tm_gmtoff:S[o+36>>2],tm_zone:s?Rt(s):""},l=Rt(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in d)l=l.replace(new RegExp(p,"g"),d[p]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],T=["January","February","March","April","May","June","July","August","September","October","November","December"];function E(y,$,J){for(var Q=typeof y=="number"?y.toString():y||"";Q.length<$;)Q=J[0]+Q;return Q}function O(y,$){return E(y,$,"0")}function M(y,$){function J(Me){return Me<0?-1:Me>0?1:0}var Q;return(Q=J(y.getFullYear()-$.getFullYear()))===0&&(Q=J(y.getMonth()-$.getMonth()))===0&&(Q=J(y.getDate()-$.getDate())),Q}function V(y){switch(y.getDay()){case 0:return new Date(y.getFullYear()-1,11,29);case 1:return y;case 2:return new Date(y.getFullYear(),0,3);case 3:return new Date(y.getFullYear(),0,2);case 4:return new Date(y.getFullYear(),0,1);case 5:return new Date(y.getFullYear()-1,11,31);case 6:return new Date(y.getFullYear()-1,11,30)}}function q(y){var $=Xa(new Date(y.tm_year+1900,0,1),y.tm_yday),J=new Date($.getFullYear(),0,4),Q=new Date($.getFullYear()+1,0,4),Me=V(J),ct=V(Q);return M(Me,$)<=0?M(ct,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var U={"%a":y=>g[y.tm_wday].substring(0,3),"%A":y=>g[y.tm_wday],"%b":y=>T[y.tm_mon].substring(0,3),"%B":y=>T[y.tm_mon],"%C":y=>{var $=y.tm_year+1900;return O($/100|0,2)},"%d":y=>O(y.tm_mday,2),"%e":y=>E(y.tm_mday,2," "),"%g":y=>q(y).toString().substring(2),"%G":y=>q(y),"%H":y=>O(y.tm_hour,2),"%I":y=>{var $=y.tm_hour;return $==0?$=12:$>12&&($-=12),O($,2)},"%j":y=>O(y.tm_mday+Qa(it(y.tm_year+1900)?dr:fr,y.tm_mon-1),3),"%m":y=>O(y.tm_mon+1,2),"%M":y=>O(y.tm_min,2),"%n":()=>` -`,"%p":y=>y.tm_hour>=0&&y.tm_hour<12?"AM":"PM","%S":y=>O(y.tm_sec,2),"%t":()=>" ","%u":y=>y.tm_wday||7,"%U":y=>{var $=y.tm_yday+7-y.tm_wday;return O(Math.floor($/7),2)},"%V":y=>{var $=Math.floor((y.tm_yday+7-(y.tm_wday+6)%7)/7);if((y.tm_wday+371-y.tm_yday-2)%7<=2&&$++,$){if($==53){var J=(y.tm_wday+371-y.tm_yday)%7;J!=4&&(J!=3||!it(y.tm_year))&&($=1)}}else{$=52;var Q=(y.tm_wday+7-y.tm_yday-1)%7;(Q==4||Q==5&&it(y.tm_year%400-1))&&$++}return O($,2)},"%w":y=>y.tm_wday,"%W":y=>{var $=y.tm_yday+7-(y.tm_wday+6)%7;return O(Math.floor($/7),2)},"%y":y=>(y.tm_year+1900).toString().substring(2),"%Y":y=>y.tm_year+1900,"%z":y=>{var $=y.tm_gmtoff,J=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(J?"+":"-")+("0000"+$).slice(-4)},"%Z":y=>y.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var p in U)l.includes(p)&&(l=l.replace(new RegExp(p,"g"),U[p](u)));l=l.replace(/\0\0/g,"%");var K=Ka(l,!1);return K.length>t?0:(Za(K,e),K.length-1)},to=(e,t,n,o,s)=>eo(e,t,n,o);Gt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},En(),Ae=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Un(),Rn(),qn(),rr=a.UnboundTypeError=Xn(Error,"UnboundTypeError"),ra(),aa();var ro={s:vn,u:yn,b:wn,g:bn,q:Cn,J:_n,f:Tn,V:$n,d:gn,da:Sn,Q:Pn,_:An,ca:Kn,ba:ea,w:ta,Y:oa,x:sa,h:ca,L:la,M:da,t:ha,o:pa,K:ya,C:$a,A:Sa,ea:Pa,$:Ea,R:Oa,ha:kt,fa:xa,Z:Fa,N:Ia,O:Wa,aa:Ua,B:La,X:Na,W:Ba,T:qa,U:Ja,E:wo,D:so,F:go,n:bo,a:no,e:uo,m:io,k:fo,H:vo,v:po,G:yo,z:_o,P:$o,l:lo,j:co,c:oo,p:ao,I:mo,r:Co,i:ho,y:To,ga:Ya,S:to},Y=mn(),he=a._free=e=>(he=a._free=Y.ka)(e),Wt=a._malloc=e=>(Wt=a._malloc=Y.la)(e),hr=e=>(hr=Y.na)(e),H=(e,t)=>(H=Y.oa)(e,t),Ve=e=>(Ve=Y.pa)(e),z=()=>(z=Y.qa)(),G=e=>(G=Y.ra)(e),pr=e=>(pr=Y.sa)(e),mr=e=>(mr=Y.ta)(e),vr=(e,t,n)=>(vr=Y.ua)(e,t,n),yr=e=>(yr=Y.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=Y.wa)(e,t,n,o,s,u,l);var gr=a.dynCall_jiiii=(e,t,n,o,s)=>(gr=a.dynCall_jiiii=Y.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=Y.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,p)=>(a.dynCall_iiiiijj=Y.za)(e,t,n,o,s,u,l,d,p),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,p,g)=>(a.dynCall_iiiiiijj=Y.Aa)(e,t,n,o,s,u,l,d,p,g);function no(e,t){var n=z();try{return B(e)(t)}catch(o){if(G(n),o!==o+0)throw o;H(1,0)}}function ao(e,t,n,o){var s=z();try{B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function oo(e,t,n){var o=z();try{B(e)(t,n)}catch(s){if(G(o),s!==s+0)throw s;H(1,0)}}function io(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function so(e,t,n,o,s){var u=z();try{return B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function co(e,t){var n=z();try{B(e)(t)}catch(o){if(G(n),o!==o+0)throw o;H(1,0)}}function uo(e,t,n){var o=z();try{return B(e)(t,n)}catch(s){if(G(o),s!==s+0)throw s;H(1,0)}}function lo(e){var t=z();try{B(e)()}catch(n){if(G(t),n!==n+0)throw n;H(1,0)}}function fo(e,t,n,o,s){var u=z();try{return B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function ho(e,t,n,o,s,u,l,d,p,g,T){var E=z();try{B(e)(t,n,o,s,u,l,d,p,g,T)}catch(O){if(G(E),O!==O+0)throw O;H(1,0)}}function po(e,t,n,o,s,u,l){var d=z();try{return B(e)(t,n,o,s,u,l)}catch(p){if(G(d),p!==p+0)throw p;H(1,0)}}function mo(e,t,n,o,s){var u=z();try{B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function vo(e,t,n,o,s,u){var l=z();try{return B(e)(t,n,o,s,u)}catch(d){if(G(l),d!==d+0)throw d;H(1,0)}}function yo(e,t,n,o,s,u,l,d){var p=z();try{return B(e)(t,n,o,s,u,l,d)}catch(g){if(G(p),g!==g+0)throw g;H(1,0)}}function go(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function wo(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function bo(e){var t=z();try{return B(e)()}catch(n){if(G(t),n!==n+0)throw n;H(1,0)}}function Co(e,t,n,o,s,u,l,d){var p=z();try{B(e)(t,n,o,s,u,l,d)}catch(g){if(G(p),g!==g+0)throw g;H(1,0)}}function _o(e,t,n,o,s,u,l,d,p,g,T,E){var O=z();try{return B(e)(t,n,o,s,u,l,d,p,g,T,E)}catch(M){if(G(O),M!==M+0)throw M;H(1,0)}}function To(e,t,n,o,s,u,l,d,p,g,T,E,O,M,V,q){var U=z();try{B(e)(t,n,o,s,u,l,d,p,g,T,E,O,M,V,q)}catch(K){if(G(U),K!==K+0)throw K;H(1,0)}}function $o(e,t,n,o,s){var u=z();try{return gr(e,t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}var st;_e=function e(){st||wr(),st||(_e=e)};function wr(){if(ie>0||(Ge(),ie>0))return;function e(){st||(st=!0,a.calledRun=!0,!W&&(ht(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),pt()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return wr(),i.ready}})();function di(r){return Bt(zt,r)}async function fi(r,i){return ui(zt,r,i)}async function hi(r,i){return li(zt,r,i)}var ze;class Zr extends EventTarget{constructor(i={}){var a;super(),Uo(this,ze,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!lt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),Lo(this,ze,c??[]),di().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw Mr(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return No.filter(i=>i!=="unknown")}async detect(i){try{const a=await Jo(i);if(a===null)return[];let c;try{Yr(a)?c=await fi(a,{tryHarder:!0,formats:Ar(this,ze).map(f=>lt.get(f))}):c=await hi(a,{tryHarder:!0,formats:Ar(this,ze).map(f=>lt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:m,y:v},topRight:{x:C,y:h},bottomLeft:{x:w,y:_},bottomRight:{x:b,y:D}}=f.position,j=Math.min(m,C,w,b),k=Math.min(v,h,_,D),W=Math.max(m,C,w,b),L=Math.max(v,h,_,D);return{boundingBox:new DOMRectReadOnly(j,k,W-j,L-k),rawValue:f.text,format:Ho(f.format),cornerPoints:[{x:m,y:v},{x:C,y:h},{x:b,y:D},{x:w,y:_}]}})}catch(a){throw Mr(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ze=new WeakMap;const en=(r,i,a="error")=>{let c,f;const m=new Promise((v,C)=>{c=v,f=C,r.addEventListener(i,c),r.addEventListener(a,f)});return m.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),m},jr=r=>new Promise(i=>setTimeout(i,r));class tn extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class pi extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class mi extends Error{constructor(){super("Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let Vt;const vi=r=>{Vt=new Zr({formats:r})},yi=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{Vt=new Zr({formats:f});const m=v=>async C=>{if(r.readyState>1){const{lastScanned:h,contentBefore:w,lastScanHadContent:_}=v;if(C-h!w.includes(W.rawValue));D&&i(b);const j=b.length>0;j&&a(b),!j&&_&&a(b);const k={lastScanned:C,lastScanHadContent:j,contentBefore:D?b.map(W=>W.rawValue):w};window.requestAnimationFrame(m(k))}}};m({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var rn={},ee={};Object.defineProperty(ee,"__esModule",{value:!0});ee.compactObject=on;ee.deprecated=Pi;var gi=ee.detectBrowser=Ei;ee.disableLog=Ti;ee.disableWarnings=$i;ee.extractVersion=dt;ee.filterStats=Oi;ee.log=Si;ee.walkStats=ft;ee.wrapPeerConnectionEvent=_i;function wi(r,i,a){return i=bi(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function bi(r){var i=Ci(r,"string");return be(i)==="symbol"?i:String(i)}function Ci(r,i){if(be(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(be(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function be(r){"@babel/helpers - typeof";return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},be(r)}var nn=!0,an=!0;function dt(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function _i(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(v,C){if(v!==i)return f.apply(this,arguments);var h=function(w){var _=a(w);_&&(C.handleEvent?C.handleEvent(_):C(_))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(C,h),f.apply(this,[v,h])};var m=c.removeEventListener;c.removeEventListener=function(v,C){if(v!==i||!this._eventMap||!this._eventMap[i])return m.apply(this,arguments);if(!this._eventMap[i].has(C))return m.apply(this,arguments);var h=this._eventMap[i].get(C);return this._eventMap[i].delete(C),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,m.apply(this,[v,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(v){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),v&&this.addEventListener(i,this["_on"+i]=v)},enumerable:!0,configurable:!0})}}function Ti(r){return typeof r!="boolean"?new Error("Argument type: "+be(r)+". Please use a boolean."):(nn=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function $i(r){return typeof r!="boolean"?new Error("Argument type: "+be(r)+". Please use a boolean."):(an=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Si(){if((typeof window>"u"?"undefined":be(window))==="object"){if(nn)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Pi(r,i){an&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Ei(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=dt(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=dt(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=dt(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function Rr(r){return Object.prototype.toString.call(r)==="[object Object]"}function on(r){return Rr(r)?Object.keys(r).reduce(function(i,a){var c=Rr(r[a]),f=c?on(r[a]):r[a],m=c&&!Object.keys(f).length;return f===void 0||m?i:Object.assign(i,wi({},a,f))},{}):r}function ft(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ft(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ft(r,r.get(f),a)})}))}function Oi(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var m=[];return r.forEach(function(v){v.type==="track"&&v.trackIdentifier===i.id&&m.push(v)}),m.forEach(function(v){r.forEach(function(C){C.type===c&&C.trackId===v.id&&ft(r,C,f)})}),f}Object.defineProperty(rn,"__esModule",{value:!0});var Ai=rn.shimGetUserMedia=ki,Mi=xi(ee);function sn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(sn=function(c){return c?a:i})(r)}function xi(r,i){if(!i&&r&&r.__esModule)return r;if(r===null||we(r)!=="object"&&typeof r!="function")return{default:r};var a=sn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in r)if(m!=="default"&&Object.prototype.hasOwnProperty.call(r,m)){var v=f?Object.getOwnPropertyDescriptor(r,m):null;v&&(v.get||v.set)?Object.defineProperty(c,m,v):c[m]=r[m]}return c.default=r,a&&a.set(r,c),c}function we(r){"@babel/helpers - typeof";return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},we(r)}var Fr=Mi.log;function ki(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(we(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(_){if(!(_==="require"||_==="advanced"||_==="mediaSource")){var b=we(h[_])==="object"?h[_]:{ideal:h[_]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var D=function(k,W){return k?k+W.charAt(0).toUpperCase()+W.slice(1):W==="deviceId"?"sourceId":W};if(b.ideal!==void 0){w.optional=w.optional||[];var j={};typeof b.ideal=="number"?(j[D("min",_)]=b.ideal,w.optional.push(j),j={},j[D("max",_)]=b.ideal,w.optional.push(j)):(j[D("",_)]=b.ideal,w.optional.push(j))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[D("",_)]=b.exact):["min","max"].forEach(function(k){b[k]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[D(k,_)]=b[k])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&we(h.audio)==="object"){var _=function(k,W,L){W in k&&!(L in k)&&(k[L]=k[W],delete k[W])};h=JSON.parse(JSON.stringify(h)),_(h.audio,"autoGainControl","googAutoGainControl"),_(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&we(h.video)==="object"){var b=h.video.facingMode;b=b&&(we(b)==="object"?b:{ideal:b});var D=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!D)){delete h.video.facingMode;var j;if(b.exact==="environment"||b.ideal==="environment"?j=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(j=["front"]),j)return a.mediaDevices.enumerateDevices().then(function(k){k=k.filter(function(L){return L.kind==="videoinput"});var W=k.find(function(L){return j.some(function(P){return L.label.toLowerCase().includes(P)})});return!W&&k.length&&j.includes("back")&&(W=k[k.length-1]),W&&(h.video.deviceId=b.exact?{exact:W.deviceId}:{ideal:W.deviceId}),h.video=c(h.video),Fr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return Fr("chrome: "+JSON.stringify(h)),w(h)},m=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},v=function(h,w,_){f(h,function(b){a.webkitGetUserMedia(b,w,function(D){_&&_(m(D))})})};if(a.getUserMedia=v.bind(a),a.mediaDevices.getUserMedia){var C=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return C(w).then(function(_){if(w.audio&&!_.getAudioTracks().length||w.video&&!_.getVideoTracks().length)throw _.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return _},function(_){return Promise.reject(m(_))})})}}}}var cn={};Object.defineProperty(cn,"__esModule",{value:!0});var Di=cn.shimGetUserMedia=Fi,ji=Ri(ee);function un(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(un=function(c){return c?a:i})(r)}function Ri(r,i){if(!i&&r&&r.__esModule)return r;if(r===null||xe(r)!=="object"&&typeof r!="function")return{default:r};var a=un(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in r)if(m!=="default"&&Object.prototype.hasOwnProperty.call(r,m)){var v=f?Object.getOwnPropertyDescriptor(r,m):null;v&&(v.get||v.set)?Object.defineProperty(c,m,v):c[m]=r[m]}return c.default=r,a&&a.set(r,c),c}function xe(r){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},xe(r)}function Fi(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,_){ji.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,_)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,_){w in h&&!(_ in h)&&(h[_]=h[w],delete h[w])},m=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return xe(h)==="object"&&xe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),m(h)},c&&c.prototype.getSettings){var v=c.prototype.getSettings;c.prototype.getSettings=function(){var h=v.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var C=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&xe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),C.apply(this,[h])}}}}var le={};Object.defineProperty(le,"__esModule",{value:!0});le.shimAudioContext=Gi;le.shimCallbacksAPI=Ni;le.shimConstraints=fn;le.shimCreateOfferLegacy=zi;var Ii=le.shimGetUserMedia=Hi;le.shimLocalStreamsAPI=Ui;le.shimRTCIceServerUrls=Vi;le.shimRemoteStreamsAPI=Li;le.shimTrackEventTransceiver=Bi;var ln=Wi(ee);function dn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(dn=function(c){return c?a:i})(r)}function Wi(r,i){if(!i&&r&&r.__esModule)return r;if(r===null||Ce(r)!=="object"&&typeof r!="function")return{default:r};var a=dn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in r)if(m!=="default"&&Object.prototype.hasOwnProperty.call(r,m)){var v=f?Object.getOwnPropertyDescriptor(r,m):null;v&&(v.get||v.set)?Object.defineProperty(c,m,v):c[m]=r[m]}return c.default=r,a&&a.set(r,c),c}function Ce(r){"@babel/helpers - typeof";return Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ce(r)}function Ui(r){if(!(Ce(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,m=new Array(f>1?f-1:0),v=1;v=0)){a._remoteStreams.push(f);var m=new Event("addstream");m.stream=f,a.dispatchEvent(m)}})}),i.apply(a,arguments)}}}function Ni(r){if(!(Ce(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,m=i.setRemoteDescription,v=i.addIceCandidate;i.createOffer=function(h,w){var _=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[_]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var _=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[_]);return w?(b.then(h,w),Promise.resolve()):b};var C=function(h,w,_){var b=f.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b};i.setLocalDescription=C,C=function(h,w,_){var b=m.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b},i.setRemoteDescription=C,C=function(h,w,_){var b=v.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b},i.addIceCandidate=C}}function Hi(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(fn(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,m,v){i.mediaDevices.getUserMedia(f).then(m,v)}).bind(i))}function fn(r){return r&&r.video!==void 0?Object.assign({},r,{video:ln.compactObject(r.video)}):r}function Vi(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],m=0;m{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function me(r,i){if(r===!1)throw new Error(i??"assertion failure")}const Ji=qi(()=>{const r=gi(window);switch(r.browser){case"chrome":Ai(window,r);break;case"firefox":Di(window,r);break;case"safari":Ii(window,r);break;default:throw new tn}});let ke=Promise.resolve({type:"stop",data:{}});async function Ir(r,i,a){var c,f,m;if(window.isSecureContext!==!0)throw new pi;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new tn;Ji();const v=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=v:r.mozSrcObject!==void 0?r.mozSrcObject=v:window.URL.createObjectURL?r.src=window.URL.createObjectURL(v):window.webkitURL?r.src=window.webkitURL.createObjectURL(v):r.src=v.id,r.play(),await Promise.race([en(r,"loadeddata"),jr(3e3).then(()=>{throw new mi})]),await jr(500);const[C]=v.getVideoTracks(),h=(m=(f=C==null?void 0:C.getCapabilities)==null?void 0:f.call(C))!=null?m:{};let w=!1;return a&&h.torch&&(await C.applyConstraints({advanced:[{torch:!0}]}),w=!0),{type:"start",data:{videoEl:r,stream:v,capabilities:h,constraints:i,isTorchOn:w}}}async function Yi(r,{constraints:i,torch:a,restart:c=!1}){ke=ke.then(m=>{if(m.type==="start"){const{data:{videoEl:v,stream:C,constraints:h,isTorchOn:w}}=m;return!c&&r===v&&i===h&&a===w?m:hn(v,C,w).then(()=>Ir(r,i,a))}return Ir(r,i,a)});const f=await ke;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");return f.data.capabilities}async function hn(r,i,a){r.src="",r.srcObject=null,r.load(),await en(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function ut(){if(ke=ke.then(r=>{if(r.type==="stop")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return hn(i,a,c)}),(await ke).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const Qi=So({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=ne(a.constraints),m=ne(a.formats);Be(()=>a.constraints,(x,S)=>{JSON.stringify(x)!==JSON.stringify(S)&&(f.value=x)},{deep:!0}),Be(()=>a.formats,(x,S)=>{JSON.stringify(x)!==JSON.stringify(S)&&(m.value=x)},{deep:!0});const v=ne(),C=ne(),h=ne(),w=ne(!1),_=ne(!1);Wr(()=>{_.value=!0}),Po(()=>{ut()});const b=Ut(()=>({torch:a.torch,constraints:f.value,shouldStream:_.value&&!a.paused}));Be(b,async x=>{const S=h.value;me(S!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const A=v.value;me(A!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const N=A.getContext("2d");if(me(N!==null,"if cavnas is defined, canvas 2d context should also be non-null"),x.shouldStream){ut(),w.value=!1;try{const ae=await Yi(S,x);_.value?(w.value=!0,c("camera-on",ae)):await ut()}catch(ae){c("error",ae)}}else A.width=S.videoWidth,A.height=S.videoHeight,N.drawImage(S,0,0,S.videoWidth,S.videoHeight),ut(),w.value=!1,c("camera-off")},{deep:!0}),Be(m,x=>{_.value&&vi(x)});const D=Ut(()=>b.value.shouldStream&&w.value);Be(D,x=>{if(x){me(v.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),j(v.value),me(C.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),j(C.value);const S=()=>a.track===void 0?500:40;me(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),yi(h.value,{detectHandler:A=>c("detect",A),formats:m.value,locateHandler:k,minDelay:S()})}});const j=x=>{const S=x.getContext("2d");me(S!==null,"canvas 2d context should always be non-null"),S.clearRect(0,0,x.width,x.height)},k=x=>{const S=C.value;me(S!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const A=h.value;if(me(A!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),x.length===0||a.track===void 0)j(S);else{const N=A.offsetWidth,ae=A.offsetHeight,Pe=A.videoWidth,Ee=A.videoHeight,je=Math.max(N/Pe,ae/Ee),Re=Pe*je,Ge=Ee*je,ht=Re/Pe,pt=Ge/Ee,mt=(N-Re)/2,vt=(ae-Ge)/2,Fe=({x:ve,y:te})=>({x:Math.floor(ve*ht),y:Math.floor(te*pt)}),ie=({x:ve,y:te})=>({x:Math.floor(ve+mt),y:Math.floor(te+vt)}),_e=x.map(ve=>{const{boundingBox:te,cornerPoints:gt}=ve,{x:qe,y:ye}=ie(Fe({x:te.x,y:te.y})),{x:Je,y:wt}=Fe({x:te.width,y:te.height});return{...ve,cornerPoints:gt.map(Ye=>ie(Fe(Ye))),boundingBox:DOMRectReadOnly.fromRect({x:qe,y:ye,width:Je,height:wt})}});S.width=A.offsetWidth,S.height=A.offsetHeight;const yt=S.getContext("2d");a.track(_e,yt)}},W={width:"100%",height:"100%",position:"relative","z-index":"0"},L={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},P={width:"100%",height:"100%","object-fit":"cover"},F=Ut(()=>D.value?P:{...P,visibility:"hidden",position:"absolute"});return(x,S)=>(ue(),ge("div",{style:W},[I("video",{ref_key:"videoRef",ref:h,style:Eo(F.value),autoplay:"",muted:"",playsinline:""},null,4),Ht(I("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:v,style:P},null,512),[[Ur,!D.value]]),I("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:C,style:L},null,512),I("div",{style:L},[Oo(x.$slots,"default")])]))}}),Xi={class:"modal is-active"},Ki=I("div",{class:"modal-background"},null,-1),Zi={class:"modal-content"},es={class:"section"},ts={class:"columns is-centered"},rs={class:"column is-three-quarters"},ns={class:"modal-slot has-text-centered is-shadowless"},as={key:0},os={class:"block is-size-5"},is={key:0},ss={class:"is-size-7 mb-3"},cs={class:"is-size-7 mb-3"},us={class:"addressbar columns is-mobile is-gapless"},ls={class:"column is-narrow has-text-left circled"},ds=I("div",{class:"column has-text-left ml-3"}," http://my.2fauth.app/... ",-1),fs={class:"column is-narrow has-text-right"},hs={key:1,class:"is-size-7"},ps={class:"fullscreen-streamer"},ms={key:1,class:"field has-addons has-addons-centered mt-3"},vs={class:"control has-icons-left"},ys={class:"select"},gs=["value"],ws={class:"icon is-small is-left"},bs={class:"fullscreen-footer"},Ps={__name:"Capture",setup(r){const i=Ao(),a=Wo(),c=Mo(),f=ne(!1),m=ne(null),v=ne([]),C=ne(""),h=xo(new Ro({qrcode:null,uri:""})),w=ne(!1);Wr(async()=>{var P;(P=navigator.mediaDevices)!=null&&P.enumerateDevices?await navigator.mediaDevices.enumerateDevices().then(F=>{v.value=F.filter(({kind:x})=>x==="videoinput"),v.value.length>0?m.value=v.value[0]:C.value="no_cam_on_device"}).catch(F=>{_(F)}):C.value="secured_context_required"});const _=P=>{P.name==="NotAllowedError"?C.value="need_grant_permission":P.name==="NotFoundError"?C.value="no_cam_on_device":P.name==="NotSupportedError"||P.name==="InsecureContextError"?C.value="secured_context_required":P.name==="NotReadableError"?C.value="not_readable":P.name==="OverconstrainedError"?C.value="camera_not_suitable":P.name==="StreamApiNotSupportedError"?C.value="stream_api_not_supported":c.error(P)},b=async P=>{const[F]=P;h.uri=F.rawValue,h.uri?h.uri.slice(0,33).toLowerCase()=="otpauth-migration://offline?data="?(a.migrationUri=h.uri,i.push({name:"importAccounts"})):h.uri.slice(0,15).toLowerCase()!=="otpauth://totp/"&&h.uri.slice(0,15).toLowerCase()!=="otpauth://hotp/"?(w.value=!0,c.warn({text:Or("errors.no_valid_otp")})):(a.decodedUri=h.uri,i.push({name:"createAccount"})):c.warn({text:Or("errors.qrcode_cannot_be_read")})};function D(P){f.value=!0}function j(P){f.value=!1}function k(){i.go(-1)}const W=(P,F)=>{for(const x of P){const[S,...A]=x.cornerPoints;F.strokeStyle="red",F.beginPath(),F.moveTo(S.x,S.y);for(const{x:N,y:ae}of A)F.lineTo(N,ae);F.lineTo(S.x,S.y),F.closePath(),F.stroke()}};function L(){location.reload()}return(P,F)=>{const x=Lt("FontAwesomeIcon"),S=Lt("ButtonBackCloseCancel"),A=Lt("modal");return ue(),ge(Sr,null,[I("div",Xi,[Ki,I("div",Zi,[I("section",es,[I("div",ts,[I("div",rs,[I("div",ns,[Z(C)?(ue(),ge("div",as,[I("p",os,Se(P.$t("twofaccounts.stream.live_scan_cant_start")),1),pe(Z(Er),null,{default:Nt(({mode:N})=>[I("p",{class:Pr(["block",{"has-text-light":N=="dark"}])},Se(P.$t("twofaccounts.stream."+Z(C)+".reason")),3)]),_:1}),Z(C)=="need_grant_permission"?(ue(),ge("div",is,[I("p",ss,Se(P.$t("twofaccounts.stream.need_grant_permission.solution")),1),I("p",cs,Se(P.$t("twofaccounts.stream.need_grant_permission.click_camera_icon")),1),I("div",us,[I("div",ls,[pe(x,{icon:["fas","lock"],class:"ml-1",size:"xs"}),pe(x,{icon:["fas","video-slash"],class:"ml-3",size:"xs"})]),ds,I("div",fs,[pe(x,{icon:["far","star"],class:"mr-1"})])]),I("p",null,[I("a",{onClick:ko(L,["stop"])},Se(P.$t("commons.refresh")),1)])])):(ue(),ge("p",hs,Se(P.$t("twofaccounts.stream."+Z(C)+".solution")),1))])):(ue(),_r(Z(Er),{key:1},{default:Nt(({mode:N})=>[I("span",{class:Pr(["is-size-4",N=="dark"?"has-text-light":"has-text-grey-dark"])},[pe(Fo,{isVisible:!0,type:"raw",class:"is-size-1"})],2)]),_:1}))])])])])]),Ht(I("div",ps,[Z(m)!==null?(ue(),_r(Z(Qi),{key:0,track:W,onDetect:b,onError:_,onCameraOn:D,onCameraOff:j})):Tr("",!0),Z(f)&&Z(v).length>1?(ue(),ge("div",ms,[I("p",vs,[I("span",ys,[Ht(I("select",{"onUpdate:modelValue":F[0]||(F[0]=N=>$r(m)?m.value=N:null)},[(ue(!0),ge(Sr,null,Do(Z(v),N=>(ue(),ge("option",{key:N.label,value:N},Se(N.label?N.label:P.$t("commons.default")),9,gs))),128))],512),[[jo,Z(m)]])]),I("span",ws,[pe(x,{icon:["fas","camera"]})])])])):Tr("",!0)],512),[[Ur,!Z(C)]]),I("div",bs,[pe(S,{action:"cancel",isCapture:!0,useLinkTag:!1,onCanceled:F[1]||(F[1]=N=>k())})])]),pe(A,{modelValue:Z(w),"onUpdate:modelValue":F[2]||(F[2]=N=>$r(w)?w.value=N:null)},{default:Nt(()=>[pe(Io,{qrContent:Z(h).uri},null,8,["qrContent"])]),_:1},8,["modelValue"])],64)}}};export{Ps as default}; diff --git a/public/build/assets/Capture-x-RcmcHd.js b/public/build/assets/Capture-x-RcmcHd.js new file mode 100644 index 00000000..9ac0a3e2 --- /dev/null +++ b/public/build/assets/Capture-x-RcmcHd.js @@ -0,0 +1,4 @@ +import{q as So,r as ne,s as Ve,o as Ir,v as Po,x as Ut,m as ue,d as ve,e as U,y as Eo,z as Ht,A as Wr,B as Oo,a as Mo,c as Do,j as pe,k as br,f as Z,h as xo,i as Cr,C as _r,F as Tr,D as Ao,E as ko,l as Lt,t as Se,n as $r,G as jo,U as Ro,p as Fo,H as Sr}from"./app-CzxRjCVM.js";import{F as Io}from"./Form-EFIuWKGI.js";import{S as Wo}from"./Spinner-C-V0HKYn.js";import{_ as Uo}from"./QrContentDisplay-C2fFtz-5.js";import{u as Lo}from"./bus-BNAtGMCo.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */var Ur=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},Pr=(r,i,a)=>(Ur(r,i,"read from private field"),a?a.call(r):i.get(r)),Ho=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},No=(r,i,a,c)=>(Ur(r,i,"write to private field"),i.set(r,a),a);const Lr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],Bo=[...Lr,["unknown"]].map(r=>r[0]),lt=new Map(Lr);function Vo(r){for(const[i,a]of lt)if(r===a)return i;return"unknown"}function zo(r){if(Hr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Nr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Br(r))return{width:r.videoWidth,height:r.videoHeight};if(zr(r))return{width:r.width,height:r.height};if(Jr(r))return{width:r.displayWidth,height:r.displayHeight};if(Vr(r))return{width:r.width,height:r.height};if(qr(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Hr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Nr(r){try{return r instanceof SVGImageElement}catch{return!1}}function Br(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function Vr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function zr(r){try{return r instanceof ImageBitmap}catch{return!1}}function qr(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Jr(r){try{return r instanceof VideoFrame}catch{return!1}}function Gr(r){try{return r instanceof Blob}catch{return!1}}function qo(r){try{return r instanceof ImageData}catch{return!1}}function Jo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Yr(r){if(Hr(r)&&!await Xo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Nr(r)&&!await Ko(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Jr(r)&&Zo(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Br(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(zr(r)&&ti(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=zo(r);if(i===0||a===0)return null;const c=Jo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Go(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Yr(i)}function Yo(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Qo(r){if(Gr(r))return await Go(r);if(qo(r)){if(ei(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return Vr(r)||qr(r)?Yo(r):await Yr(r)}async function Xo(r){try{return await r.decode(),!0}catch{return!1}}async function Ko(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function Zo(r){return r.format===null}function ei(r){return r.data.buffer.byteLength===0}function ti(r){return r.width===0&&r.height===0}function Er(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const Or=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function ri(r){return r.join("|")}function ni(r){const i=Mr(r);let a=0,c=Or.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),p=Or[f],v=Mr(p);if(v===i)return p;v{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let Dr=new WeakMap;function Nt(r,i){var a;const c=Dr.get(r);if(c!=null&&c.modulePromise&&i===void 0)return c.modulePromise;const f=(a=c==null?void 0:c.moduleOverrides)!=null?a:li,p=r({...f});return Dr.set(r,{moduleOverrides:f,modulePromise:p}),p}async function di(r,i,a=ke){const c={...ke,...a},f=await Nt(r),{size:p}=i,v=new Uint8Array(await i.arrayBuffer()),C=f._malloc(p);f.HEAPU8.set(v,C);const h=f.readBarcodesFromImage(C,p,Qr(f,c));f._free(C);const w=[];for(let _=0;_{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var p=Object.assign({},a),v="./this.program",C=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function _(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(C||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var j=a.printErr||console.error.bind(console);Object.assign(a,p),p=null,a.arguments&&a.arguments,a.thisProgram&&(v=a.thisProgram),a.quit&&a.quit;var R;a.wasmBinary&&(R=a.wasmBinary),typeof WebAssembly!="object"&&te("no native wasm support detected");var A,I=!1,L,P,k,x,S,M,H,ae;function Pe(){var e=A.buffer;a.HEAP8=L=new Int8Array(e),a.HEAP16=k=new Int16Array(e),a.HEAPU8=P=new Uint8Array(e),a.HEAPU16=x=new Uint16Array(e),a.HEAP32=S=new Int32Array(e),a.HEAPU32=M=new Uint32Array(e),a.HEAPF32=H=new Float32Array(e),a.HEAPF64=ae=new Float64Array(e)}var Ee=[],je=[],Re=[];function qe(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)mt(a.preRun.shift());bt(Ee)}function ht(){bt(je)}function pt(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Fe(a.postRun.shift());bt(Re)}function mt(e){Ee.unshift(e)}function vt(e){je.unshift(e)}function Fe(e){Re.unshift(e)}var ie=0,_e=null;function yt(e){var t;ie++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,ie)}function ye(e){var t;if(ie--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,ie),ie==0&&_e){var n=_e;_e=null,n()}}function te(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",j(e),I=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var gt="data:application/octet-stream;base64,",Je=e=>e.startsWith(gt),ge;ge="zxing_reader.wasm",Je(ge)||(ge=_(ge));function Ge(e){if(e==ge&&R)return new Uint8Array(R);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function wt(e){return!R&&(C||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>Ge(e)):Promise.resolve().then(()=>Ge(e))}function Ye(e,t,n){return wt(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{j(`failed to asynchronously prepare wasm: ${o}`),te(o)})}function pn(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Je(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return j(`wasm streaming compile failed: ${l}`),j("falling back to ArrayBuffer instantiation"),Ye(t,n,o)})}):Ye(t,n,o)}function mn(){var e={a:ro};function t(o,s){return Y=o.exports,A=Y.ia,Pe(),Zt=Y.ma,vt(Y.ja),ye(),Y}yt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){j(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return pn(R,ge,e,n).catch(f),{}}var bt=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Qe=[],Xe=0,vn=e=>{var t=new Ct(e);return t.get_caught()||(t.set_caught(!0),Xe--),t.set_rethrown(!1),Qe.push(t),hr(t.excPtr),t.get_exception_ptr()},de=0,yn=()=>{N(0,0);var e=Qe.pop();fr(e.excPtr),de=0};function Ct(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){M[this.ptr+4>>2]=t},this.get_type=function(){return M[this.ptr+4>>2]},this.set_destructor=function(t){M[this.ptr+8>>2]=t},this.get_destructor=function(){return M[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,L[this.ptr+12>>0]=t},this.get_caught=function(){return L[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,L[this.ptr+13>>0]=t},this.get_rethrown=function(){return L[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){M[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return M[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=mr(this.get_type());if(t)return M[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var gn=e=>{throw de||(de=e),de},_t=e=>{var t=de;if(!t)return Be(0),0;var n=new Ct(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Be(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(pr(u,o,l))return Be(u),t}return Be(o),t},wn=()=>_t([]),bn=e=>_t([e]),Cn=(e,t)=>_t([e,t]),_n=()=>{var e=Qe.pop();e||te("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Qe.push(e),e.set_rethrown(!0),e.set_caught(!1),Xe++),de=t,de},Tn=(e,t,n)=>{var o=new Ct(e);throw o.init(t,n),de=e,Xe++,de},$n=()=>Xe,Ke={},Tt=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function $t(e){return this.fromWireType(S[e>>2])}var Oe={},Te={},Ze={},Vt,et=e=>{throw new Vt(e)},$e=(e,t,n)=>{e.forEach(function(d){Ze[d]=t});function o(d){var m=n(d);m.length!==e.length&&et("Mismatched type converter count");for(var g=0;g{Te.hasOwnProperty(d)?s[m]=Te[d]:(u.push(d),Oe.hasOwnProperty(d)||(Oe[d]=[]),Oe[d].push(()=>{s[m]=Te[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},Sn=e=>{var t=Ke[e];delete Ke[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));$e([e],u,l=>{var d={};return s.forEach((m,g)=>{var T=m.fieldName,E=l[g],O=m.getter,D=m.getterContext,B=l[g+s.length],J=m.setter,W=m.setterContext;d[T]={read:K=>E.fromWireType(O(D,K)),write:(K,y)=>{var $=[];J(W,K,B.toWireType($,y)),Tt($)}}}),[{name:t.name,fromWireType:m=>{var g={};for(var T in d)g[T]=d[T].read(m);return o(m),g},toWireType:(m,g)=>{for(var T in d)if(!(T in g))throw new TypeError(`Missing field: "${T}"`);var E=n();for(T in d)d[T].write(E,g[T]);return m!==null&&m.push(o,E),E},argPackAdvance:ce,readValueFromPointer:$t,destructorFunction:o}]})},Pn=(e,t,n,o,s)=>{},En=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);zt=e},zt,X=e=>{for(var t="",n=e;P[n];)t+=zt[P[n++]];return t},Me,F=e=>{throw new Me(e)};function On(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||F(`type "${o}" must have a positive integer typeid pointer`),Te.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;F(`Cannot register type '${o}' twice`)}if(Te[e]=t,delete Ze[e],Oe.hasOwnProperty(e)){var s=Oe[e];delete Oe[e],s.forEach(u=>u())}}function se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return On(e,t,n)}var ce=8,Mn=(e,t,n,o)=>{t=X(t),se(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:ce,readValueFromPointer:function(s){return this.fromWireType(P[s])},destructorFunction:null})},Dn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),St=e=>{function t(n){return n.$$.ptrType.registeredClass.name}F(t(e)+" instance already deleted")},Pt=!1,qt=e=>{},xn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Jt=e=>{e.count.value-=1;var t=e.count.value===0;t&&xn(e)},Gt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Gt(e,t,n.baseClass);return o===null?null:n.downcast(o)},Yt={},An=()=>Object.keys(Ue).length,kn=()=>{var e=[];for(var t in Ue)Ue.hasOwnProperty(t)&&e.push(Ue[t]);return e},Ie=[],Et=()=>{for(;Ie.length;){var e=Ie.pop();e.$$.deleteScheduled=!1,e.delete()}},We,jn=e=>{We=e,Ie.length&&We&&We(Et)},Rn=()=>{a.getInheritedInstanceCount=An,a.getLiveInheritedInstances=kn,a.flushPendingDeletes=Et,a.setDelayFunction=jn},Ue={},Fn=(e,t)=>{for(t===void 0&&F("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},In=(e,t)=>(t=Fn(e,t),Ue[t]),tt=(e,t)=>{(!t.ptrType||!t.ptr)&&et("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&et("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Le(Object.create(e,{$$:{value:t,writable:!0}}))};function Wn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=In(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?tt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):tt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Yt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var m=Gt(t,this.registeredClass,d.registeredClass);return m===null?s.call(this):this.isSmartPointer?tt(d.registeredClass.instancePrototype,{ptrType:d,ptr:m,smartPtrType:this,smartPtr:e}):tt(d.registeredClass.instancePrototype,{ptrType:d,ptr:m})}var Le=e=>typeof FinalizationRegistry>"u"?(Le=t=>t,e):(Pt=new FinalizationRegistry(t=>{Jt(t.$$)}),Le=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};Pt.register(t,s,t)}return t},qt=t=>Pt.unregister(t),Le(e)),Un=()=>{Object.assign(rt.prototype,{isAliasOf(e){if(!(this instanceof rt)||!(e instanceof rt))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||St(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Le(Object.create(Object.getPrototypeOf(this),{$$:{value:Dn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&F("Object already scheduled for deletion"),qt(this),Jt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&F("Object already scheduled for deletion"),Ie.push(this),Ie.length===1&&We&&We(Et),this.$$.deleteScheduled=!0,this}})};function rt(){}var He=(e,t)=>Object.defineProperty(t,"name",{value:e}),Qt=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||F(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},Ot=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&F(`Cannot register public name '${e}' twice`),Qt(a,e,e),a.hasOwnProperty(n)&&F(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},Ln=48,Hn=57,Nn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Ln&&t<=Hn?`_${e}`:e};function Bn(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var Mt=(e,t,n)=>{for(;t!==n;)t.upcast||F(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Vn(e,t){if(t===null)return this.isReference&&F(`null is not a valid ${this.name}`),0;t.$$||F(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||F(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Mt(t.$$.ptr,n,this.registeredClass);return o}function zn(e,t){var n;if(t===null)return this.isReference&&F(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&F(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||F(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&F(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=Mt(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&F("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:F(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,fe.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:F("Unsupporting sharing policy")}return n}function qn(e,t){if(t===null)return this.isReference&&F(`null is not a valid ${this.name}`),0;t.$$||F(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||F(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&F(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Mt(t.$$.ptr,n,this.registeredClass);return o}function Xt(e){return this.fromWireType(M[e>>2])}var Jn=()=>{Object.assign(nt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ce,readValueFromPointer:Xt,deleteObject(e){e!==null&&e.delete()},fromWireType:Wn})};function nt(e,t,n,o,s,u,l,d,m,g,T){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=m,this.rawShare=g,this.rawDestructor=T,!s&&t.baseClass===void 0?o?(this.toWireType=Vn,this.destructorFunction=null):(this.toWireType=qn,this.destructorFunction=null):this.toWireType=zn}var Kt=(e,t,n)=>{a.hasOwnProperty(e)||et("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},Gn=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},at=[],Zt,V=e=>{var t=at[e];return t||(e>=at.length&&(at.length=e+1),at[e]=t=Zt.get(e)),t},Yn=(e,t,n)=>{if(e.includes("j"))return Gn(e,t,n);var o=V(t).apply(null,n);return o},Qn=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),Yn(e,t,n)}},oe=(e,t)=>{e=X(e);function n(){return e.includes("j")?Qn(e,t):V(t)}var o=n();return typeof o!="function"&&F(`unknown function pointer with signature ${e}: ${t}`),o},Xn=(e,t)=>{var n=He(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+` +`+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},er,tr=e=>{var t=dr(e),n=X(t);return he(t),n},ot=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!Te[u]){if(Ze[u]){Ze[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new er(`${e}: `+n.map(tr).join([", "]))},Kn=(e,t,n,o,s,u,l,d,m,g,T,E,O)=>{T=X(T),u=oe(s,u),d&&(d=oe(l,d)),g&&(g=oe(m,g)),O=oe(E,O);var D=Nn(T);Ot(D,function(){ot(`Cannot construct ${T} due to unbound types`,[o])}),$e([e,t,n],o?[o]:[],function(B){B=B[0];var J,W;o?(J=B.registeredClass,W=J.instancePrototype):W=rt.prototype;var K=He(T,function(){if(Object.getPrototypeOf(this)!==y)throw new Me("Use 'new' to construct "+T);if($.constructor_body===void 0)throw new Me(T+" has no accessible constructor");var wr=$.constructor_body[arguments.length];if(wr===void 0)throw new Me(`Tried to invoke ctor of ${T} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return wr.apply(this,arguments)}),y=Object.create(W,{constructor:{value:K}});K.prototype=y;var $=new Bn(T,K,y,O,J,u,d,g);if($.baseClass){var G,Q;(Q=(G=$.baseClass).__derivedClasses)!==null&&Q!==void 0||(G.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var De=new nt(T,$,!0,!1,!1),ct=new nt(T+"*",$,!1,!1,!1),gr=new nt(T+" const*",$,!1,!0,!1);return Yt[e]={pointerType:ct,constPointerType:gr},Kt(D,K),[De,ct,gr]})},Dt=(e,t)=>{for(var n=[],o=0;o>2]);return n};function Zn(e){for(var t=1;t{var l=Dt(t,n);s=oe(o,s),$e([],[e],function(d){d=d[0];var m=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new Me(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{ot(`Cannot construct ${d.name} due to unbound types`,l)},$e([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=xt(m,g,null,s,u),[])),[]})},rr=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},ta=(e,t,n,o,s,u,l,d,m)=>{var g=Dt(n,o);t=X(t),t=rr(t),u=oe(s,u),$e([],[e],function(T){T=T[0];var E=`${T.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&T.registeredClass.pureVirtualFunctions.push(t);function O(){ot(`Cannot call ${E} due to unbound types`,g)}var D=T.registeredClass.instancePrototype,B=D[t];return B===void 0||B.overloadTable===void 0&&B.className!==T.name&&B.argCount===n-2?(O.argCount=n-2,O.className=T.name,D[t]=O):(Qt(D,t,E),D[t].overloadTable[n-2]=O),$e([],g,function(J){var W=xt(E,J,T,u,l);return D[t].overloadTable===void 0?(W.argCount=n-2,D[t]=W):D[t].overloadTable[n-2]=W,[]}),[]})};function ra(){Object.assign(nr.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function nr(){this.allocated=[void 0],this.freelist=[]}var re=new nr,At=e=>{e>=re.reserved&&--re.get(e).refcount===0&&re.free(e)},na=()=>{for(var e=0,t=re.reserved;t{re.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),re.reserved=re.allocated.length,a.count_emval_handles=na},fe={toValue:e=>(e||F("Cannot use deleted val. handle = "+e),re.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return re.allocate({refcount:1,value:e})}}},oa=(e,t)=>{t=X(t),se(e,{name:t,fromWireType:n=>{var o=fe.toValue(n);return At(n),o},toWireType:(n,o)=>fe.toHandle(o),argPackAdvance:ce,readValueFromPointer:$t,destructorFunction:null})},ia=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(L[o>>0])}:function(o){return this.fromWireType(P[o>>0])};case 2:return n?function(o){return this.fromWireType(k[o>>1])}:function(o){return this.fromWireType(x[o>>1])};case 4:return n?function(o){return this.fromWireType(S[o>>2])}:function(o){return this.fromWireType(M[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},sa=(e,t,n,o)=>{t=X(t);function s(){}s.values={},se(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:ce,readValueFromPointer:ia(t,n,o),destructorFunction:null}),Ot(t,s)},kt=(e,t)=>{var n=Te[e];return n===void 0&&F(t+" has unknown type "+tr(e)),n},ca=(e,t,n)=>{var o=kt(e,"enum");t=X(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:He(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},jt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},ua=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(H[n>>2])};case 8:return function(n){return this.fromWireType(ae[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},la=(e,t,n)=>{t=X(t),se(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:ce,readValueFromPointer:ua(t,n),destructorFunction:null})},da=(e,t,n,o,s,u,l)=>{var d=Dt(t,n);e=X(e),e=rr(e),s=oe(o,s),Ot(e,function(){ot(`Cannot call ${e} due to unbound types`,d)},t-1),$e([],d,function(m){var g=[m[0],null].concat(m.slice(1));return Kt(e,xt(e,g,null,s,u),t-1),[]})},fa=(e,t,n)=>{switch(t){case 1:return n?o=>L[o>>0]:o=>P[o>>0];case 2:return n?o=>k[o>>1]:o=>x[o>>1];case 4:return n?o=>S[o>>2]:o=>M[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ha=(e,t,n,o,s)=>{t=X(t);var u=T=>T;if(o===0){var l=32-8*n;u=T=>T<>>l}var d=t.includes("unsigned"),m=(T,E)=>{},g;d?g=function(T,E){return m(E,this.name),E>>>0}:g=function(T,E){return m(E,this.name),E},se(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:ce,readValueFromPointer:fa(t,n,o!==0),destructorFunction:null})},pa=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=M[l>>2],m=M[l+4>>2];return new s(L.buffer,m,d)}n=X(n),se(e,{name:n,fromWireType:u,argPackAdvance:ce,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},ar=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l=55296&&d<=57343){var m=e.charCodeAt(++l);d=65536+((d&1023)<<10)|m&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},ma=(e,t,n)=>ar(e,P,t,n),or=e=>{for(var t=0,n=0;n=55296&&o<=57343?(t+=4,++n):t+=3}return t},ir=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,va=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&ir)return ir.decode(e.subarray(t,s));for(var u="";t>10,56320|g&1023)}}return u},Rt=(e,t)=>e?va(P,e,t):"",ya=(e,t)=>{t=X(t);var n=t==="std::string";se(e,{name:t,fromWireType(o){var s=M[o>>2],u=o+4,l;if(n)for(var d=u,m=0;m<=s;++m){var g=u+m;if(m==s||P[g]==0){var T=g-d,E=Rt(d,T);l===void 0?l=E:(l+="\0",l+=E),d=g+1}}else{for(var O=new Array(s),m=0;m>2]=u,n&&l)ma(s,m,u+1);else if(l)for(var g=0;g255&&(he(m),F("String has UTF-16 code units that do not fit in 8 bits")),P[m+g]=T}else for(var g=0;g{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&x[o];)++o;if(n=o<<1,n-e>32&&sr)return sr.decode(P.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=k[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},wa=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n>1]=d,t+=2}return k[t>>1]=0,t-s},ba=e=>e.length*2,Ca=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=S[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},_a=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l=55296&&d<=57343){var m=e.charCodeAt(++l);d=65536+((d&1023)<<10)|m&1023}if(S[t>>2]=d,t+=4,t+4>u)break}return S[t>>2]=0,t-s},Ta=e=>{for(var t=0,n=0;n=55296&&o<=57343&&++n,t+=4}return t},$a=(e,t,n)=>{n=X(n);var o,s,u,l,d;t===2?(o=ga,s=wa,l=ba,u=()=>x,d=1):t===4&&(o=Ca,s=_a,l=Ta,u=()=>M,d=2),se(e,{name:n,fromWireType:m=>{for(var g=M[m>>2],T=u(),E,O=m+4,D=0;D<=g;++D){var B=m+4+D*t;if(D==g||T[B>>d]==0){var J=B-O,W=o(O,J);E===void 0?E=W:(E+="\0",E+=W),O=B+t}}return he(m),E},toWireType:(m,g)=>{typeof g!="string"&&F(`Cannot pass non-string to C++ string type ${n}`);var T=l(g),E=Wt(4+T+t);return M[E>>2]=T>>d,s(g,E+4,T+t),m!==null&&m.push(he,E),E},argPackAdvance:ce,readValueFromPointer:$t,destructorFunction(m){he(m)}})},Sa=(e,t,n,o,s,u)=>{Ke[e]={name:X(t),rawConstructor:oe(n,o),rawDestructor:oe(s,u),fields:[]}},Pa=(e,t,n,o,s,u,l,d,m,g)=>{Ke[e].fields.push({fieldName:X(t),getterReturnType:n,getter:oe(o,s),getterContext:u,setterArgumentType:l,setter:oe(d,m),setterContext:g})},Ea=(e,t)=>{t=X(t),se(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Ft=[],Oa=(e,t,n,o)=>(e=Ft[e],t=fe.toValue(t),e(null,t,n,o)),Ma={},Da=e=>{var t=Ma[e];return t===void 0?X(e):t},cr=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},xa=e=>e===0?fe.toHandle(cr()):(e=Da(e),fe.toHandle(cr()[e])),Aa=e=>{var t=Ft.length;return Ft.push(e),t},ka=(e,t)=>{for(var n=new Array(e),o=0;o>2],"parameter "+o);return n},ja=Reflect.construct,Ra=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(M[t>>2]=fe.toHandle(o)),s},Fa=(e,t,n)=>{var o=ka(e,t),s=o.shift();e--;var u=new Array(e),l=(m,g,T,E)=>{for(var O=0,D=0;Dm.name).join(", ")}) => ${s.name}>`;return Aa(He(d,l))},Ia=e=>{e>4&&(re.get(e).refcount+=1)},Wa=e=>{var t=fe.toValue(e);Tt(t),At(e)},Ua=(e,t)=>{e=kt(e,"_emval_take_value");var n=e.readValueFromPointer(t);return fe.toHandle(n)},La=()=>{te("")},Ha=(e,t,n)=>P.copyWithin(e,t,t+n),Na=()=>2147483648,Ba=e=>{var t=A.buffer,n=(e-t.byteLength+65535)/65536;try{return A.grow(n),Pe(),1}catch{}},Va=e=>{var t=P.length;e>>>=0;var n=Na();if(e>n)return!1;for(var o=(m,g)=>m+(g-m%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=Ba(l);if(d)return!0}return!1},It={},za=()=>v||"./this.program",Ne=()=>{if(!Ne.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:za()};for(var n in It)It[n]===void 0?delete t[n]:t[n]=It[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);Ne.strings=o}return Ne.strings},qa=(e,t)=>{for(var n=0;n>0]=e.charCodeAt(n);L[t>>0]=0},Ja=(e,t)=>{var n=0;return Ne().forEach((o,s)=>{var u=t+n;M[e+s*4>>2]=u,qa(o,u),n+=o.length+1}),0},Ga=(e,t)=>{var n=Ne();M[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),M[t>>2]=o,0},Ya=e=>e,it=e=>e%4===0&&(e%100!==0||e%400===0),Qa=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},ur=[31,29,31,30,31,30,31,31,30,31,30,31],lr=[31,28,31,30,31,30,31,31,30,31,30,31],Xa=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=it(n.getFullYear()),s=n.getMonth(),u=(o?ur:lr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function Ka(e,t,n){var o=or(e)+1,s=new Array(o);return ar(e,s,0,s.length),s}var Za=(e,t)=>{L.set(e,t)},eo=(e,t,n,o)=>{var s=M[o+40>>2],u={tm_sec:S[o>>2],tm_min:S[o+4>>2],tm_hour:S[o+8>>2],tm_mday:S[o+12>>2],tm_mon:S[o+16>>2],tm_year:S[o+20>>2],tm_wday:S[o+24>>2],tm_yday:S[o+28>>2],tm_isdst:S[o+32>>2],tm_gmtoff:S[o+36>>2],tm_zone:s?Rt(s):""},l=Rt(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var m in d)l=l.replace(new RegExp(m,"g"),d[m]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],T=["January","February","March","April","May","June","July","August","September","October","November","December"];function E(y,$,G){for(var Q=typeof y=="number"?y.toString():y||"";Q.length<$;)Q=G[0]+Q;return Q}function O(y,$){return E(y,$,"0")}function D(y,$){function G(De){return De<0?-1:De>0?1:0}var Q;return(Q=G(y.getFullYear()-$.getFullYear()))===0&&(Q=G(y.getMonth()-$.getMonth()))===0&&(Q=G(y.getDate()-$.getDate())),Q}function B(y){switch(y.getDay()){case 0:return new Date(y.getFullYear()-1,11,29);case 1:return y;case 2:return new Date(y.getFullYear(),0,3);case 3:return new Date(y.getFullYear(),0,2);case 4:return new Date(y.getFullYear(),0,1);case 5:return new Date(y.getFullYear()-1,11,31);case 6:return new Date(y.getFullYear()-1,11,30)}}function J(y){var $=Xa(new Date(y.tm_year+1900,0,1),y.tm_yday),G=new Date($.getFullYear(),0,4),Q=new Date($.getFullYear()+1,0,4),De=B(G),ct=B(Q);return D(De,$)<=0?D(ct,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var W={"%a":y=>g[y.tm_wday].substring(0,3),"%A":y=>g[y.tm_wday],"%b":y=>T[y.tm_mon].substring(0,3),"%B":y=>T[y.tm_mon],"%C":y=>{var $=y.tm_year+1900;return O($/100|0,2)},"%d":y=>O(y.tm_mday,2),"%e":y=>E(y.tm_mday,2," "),"%g":y=>J(y).toString().substring(2),"%G":y=>J(y),"%H":y=>O(y.tm_hour,2),"%I":y=>{var $=y.tm_hour;return $==0?$=12:$>12&&($-=12),O($,2)},"%j":y=>O(y.tm_mday+Qa(it(y.tm_year+1900)?ur:lr,y.tm_mon-1),3),"%m":y=>O(y.tm_mon+1,2),"%M":y=>O(y.tm_min,2),"%n":()=>` +`,"%p":y=>y.tm_hour>=0&&y.tm_hour<12?"AM":"PM","%S":y=>O(y.tm_sec,2),"%t":()=>" ","%u":y=>y.tm_wday||7,"%U":y=>{var $=y.tm_yday+7-y.tm_wday;return O(Math.floor($/7),2)},"%V":y=>{var $=Math.floor((y.tm_yday+7-(y.tm_wday+6)%7)/7);if((y.tm_wday+371-y.tm_yday-2)%7<=2&&$++,$){if($==53){var G=(y.tm_wday+371-y.tm_yday)%7;G!=4&&(G!=3||!it(y.tm_year))&&($=1)}}else{$=52;var Q=(y.tm_wday+7-y.tm_yday-1)%7;(Q==4||Q==5&&it(y.tm_year%400-1))&&$++}return O($,2)},"%w":y=>y.tm_wday,"%W":y=>{var $=y.tm_yday+7-(y.tm_wday+6)%7;return O(Math.floor($/7),2)},"%y":y=>(y.tm_year+1900).toString().substring(2),"%Y":y=>y.tm_year+1900,"%z":y=>{var $=y.tm_gmtoff,G=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(G?"+":"-")+("0000"+$).slice(-4)},"%Z":y=>y.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var m in W)l.includes(m)&&(l=l.replace(new RegExp(m,"g"),W[m](u)));l=l.replace(/\0\0/g,"%");var K=Ka(l);return K.length>t?0:(Za(K,e),K.length-1)},to=(e,t,n,o,s)=>eo(e,t,n,o);Vt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},En(),Me=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Un(),Rn(),Jn(),er=a.UnboundTypeError=Xn(Error,"UnboundTypeError"),ra(),aa();var ro={s:vn,u:yn,b:wn,g:bn,q:Cn,J:_n,f:Tn,V:$n,d:gn,da:Sn,Q:Pn,_:Mn,ca:Kn,ba:ea,w:ta,Y:oa,x:sa,h:ca,L:la,M:da,t:ha,o:pa,K:ya,C:$a,A:Sa,ea:Pa,$:Ea,R:Oa,ha:At,fa:xa,Z:Fa,N:Ia,O:Wa,aa:Ua,B:La,X:Ha,W:Va,T:Ja,U:Ga,E:wo,D:so,F:go,n:bo,a:no,e:uo,m:io,k:fo,H:vo,v:po,G:yo,z:_o,P:$o,l:lo,j:co,c:oo,p:ao,I:mo,r:Co,i:ho,y:To,ga:Ya,S:to},Y=mn(),he=a._free=e=>(he=a._free=Y.ka)(e),Wt=a._malloc=e=>(Wt=a._malloc=Y.la)(e),dr=e=>(dr=Y.na)(e),N=(e,t)=>(N=Y.oa)(e,t),Be=e=>(Be=Y.pa)(e),z=()=>(z=Y.qa)(),q=e=>(q=Y.ra)(e),fr=e=>(fr=Y.sa)(e),hr=e=>(hr=Y.ta)(e),pr=(e,t,n)=>(pr=Y.ua)(e,t,n),mr=e=>(mr=Y.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=Y.wa)(e,t,n,o,s,u,l);var vr=a.dynCall_jiiii=(e,t,n,o,s)=>(vr=a.dynCall_jiiii=Y.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=Y.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,m)=>(a.dynCall_iiiiijj=Y.za)(e,t,n,o,s,u,l,d,m),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,m,g)=>(a.dynCall_iiiiiijj=Y.Aa)(e,t,n,o,s,u,l,d,m,g);function no(e,t){var n=z();try{return V(e)(t)}catch(o){if(q(n),o!==o+0)throw o;N(1,0)}}function ao(e,t,n,o){var s=z();try{V(e)(t,n,o)}catch(u){if(q(s),u!==u+0)throw u;N(1,0)}}function oo(e,t,n){var o=z();try{V(e)(t,n)}catch(s){if(q(o),s!==s+0)throw s;N(1,0)}}function io(e,t,n,o){var s=z();try{return V(e)(t,n,o)}catch(u){if(q(s),u!==u+0)throw u;N(1,0)}}function so(e,t,n,o,s){var u=z();try{return V(e)(t,n,o,s)}catch(l){if(q(u),l!==l+0)throw l;N(1,0)}}function co(e,t){var n=z();try{V(e)(t)}catch(o){if(q(n),o!==o+0)throw o;N(1,0)}}function uo(e,t,n){var o=z();try{return V(e)(t,n)}catch(s){if(q(o),s!==s+0)throw s;N(1,0)}}function lo(e){var t=z();try{V(e)()}catch(n){if(q(t),n!==n+0)throw n;N(1,0)}}function fo(e,t,n,o,s){var u=z();try{return V(e)(t,n,o,s)}catch(l){if(q(u),l!==l+0)throw l;N(1,0)}}function ho(e,t,n,o,s,u,l,d,m,g,T){var E=z();try{V(e)(t,n,o,s,u,l,d,m,g,T)}catch(O){if(q(E),O!==O+0)throw O;N(1,0)}}function po(e,t,n,o,s,u,l){var d=z();try{return V(e)(t,n,o,s,u,l)}catch(m){if(q(d),m!==m+0)throw m;N(1,0)}}function mo(e,t,n,o,s){var u=z();try{V(e)(t,n,o,s)}catch(l){if(q(u),l!==l+0)throw l;N(1,0)}}function vo(e,t,n,o,s,u){var l=z();try{return V(e)(t,n,o,s,u)}catch(d){if(q(l),d!==d+0)throw d;N(1,0)}}function yo(e,t,n,o,s,u,l,d){var m=z();try{return V(e)(t,n,o,s,u,l,d)}catch(g){if(q(m),g!==g+0)throw g;N(1,0)}}function go(e,t,n,o){var s=z();try{return V(e)(t,n,o)}catch(u){if(q(s),u!==u+0)throw u;N(1,0)}}function wo(e,t,n,o){var s=z();try{return V(e)(t,n,o)}catch(u){if(q(s),u!==u+0)throw u;N(1,0)}}function bo(e){var t=z();try{return V(e)()}catch(n){if(q(t),n!==n+0)throw n;N(1,0)}}function Co(e,t,n,o,s,u,l,d){var m=z();try{V(e)(t,n,o,s,u,l,d)}catch(g){if(q(m),g!==g+0)throw g;N(1,0)}}function _o(e,t,n,o,s,u,l,d,m,g,T,E){var O=z();try{return V(e)(t,n,o,s,u,l,d,m,g,T,E)}catch(D){if(q(O),D!==D+0)throw D;N(1,0)}}function To(e,t,n,o,s,u,l,d,m,g,T,E,O,D,B,J){var W=z();try{V(e)(t,n,o,s,u,l,d,m,g,T,E,O,D,B,J)}catch(K){if(q(W),K!==K+0)throw K;N(1,0)}}function $o(e,t,n,o,s){var u=z();try{return vr(e,t,n,o,s)}catch(l){if(q(u),l!==l+0)throw l;N(1,0)}}var st;_e=function e(){st||yr(),st||(_e=e)};function yr(){if(ie>0||(qe(),ie>0))return;function e(){st||(st=!0,a.calledRun=!0,!I&&(ht(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),pt()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return yr(),i.ready}})();function hi(r){return Nt(Bt,r)}async function pi(r,i){return di(Bt,r,i)}async function mi(r,i){return fi(Bt,r,i)}var ze;class xr extends EventTarget{constructor(i={}){var a;super(),Ho(this,ze,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!lt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),No(this,ze,c??[]),hi().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw Er(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Bo.filter(i=>i!=="unknown")}async detect(i){try{const a=await Qo(i);if(a===null)return[];let c;try{Gr(a)?c=await pi(a,{tryHarder:!0,formats:Pr(this,ze).map(f=>lt.get(f))}):c=await mi(a,{tryHarder:!0,formats:Pr(this,ze).map(f=>lt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:p,y:v},topRight:{x:C,y:h},bottomLeft:{x:w,y:_},bottomRight:{x:b,y:j}}=f.position,R=Math.min(p,C,w,b),A=Math.min(v,h,_,j),I=Math.max(p,C,w,b),L=Math.max(v,h,_,j);return{boundingBox:new DOMRectReadOnly(R,A,I-R,L-A),rawValue:f.text,format:Vo(f.format),cornerPoints:[{x:p,y:v},{x:C,y:h},{x:b,y:j},{x:w,y:_}]}})}catch(a){throw Er(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ze=new WeakMap;const Kr=(r,i,a="error")=>{let c,f;const p=new Promise((v,C)=>{c=v,f=C,r.addEventListener(i,c),r.addEventListener(a,f)});return p.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),p},Ar=r=>new Promise(i=>setTimeout(i,r));class Zr extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class vi extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class yi extends Error{constructor(){super("Loading camera stream timed out after 6 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let en;async function gi(r){if(window.BarcodeDetector===void 0)return console.debug("[vue-qrcode-reader] Native BarcodeDetector not supported. Will use polyfill."),new xr({formats:r});const i=await window.BarcodeDetector.getSupportedFormats(),a=r.filter(c=>!i.includes(c));return a.length>0?(console.debug(`[vue-qrcode-reader] Native BarcodeDetector does not support formats ${JSON.stringify(a)}. Will use polyfill.`),new xr({formats:r})):(console.debug("[vue-qrcode-reader] Will use native BarcodeDetector."),new window.BarcodeDetector({formats:r}))}async function tn(r){en=await gi(r)}const wi=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{console.debug("[vue-qrcode-reader] start scanning"),await tn(f);const p=v=>async C=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:h,contentBefore:w,lastScanHadContent:_}=v;if(C-h!w.includes(I.rawValue));j&&i(b);const R=b.length>0;R&&a(b),!R&&_&&a(b);const A={lastScanned:C,lastScanHadContent:R,contentBefore:j?b.map(I=>I.rawValue):w};window.requestAnimationFrame(p(A))}}};p({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var rn={},ee={};Object.defineProperty(ee,"__esModule",{value:!0});ee.compactObject=on;ee.deprecated=Oi;var bi=ee.detectBrowser=Mi;ee.disableLog=Si;ee.disableWarnings=Pi;ee.extractVersion=dt;ee.filterStats=Di;ee.log=Ei;ee.walkStats=ft;ee.wrapPeerConnectionEvent=$i;function Ci(r,i,a){return i=_i(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function _i(r){var i=Ti(r,"string");return be(i)==="symbol"?i:String(i)}function Ti(r,i){if(be(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(be(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function be(r){"@babel/helpers - typeof";return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},be(r)}var nn=!0,an=!0;function dt(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function $i(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(v,C){if(v!==i)return f.apply(this,arguments);var h=function(w){var _=a(w);_&&(C.handleEvent?C.handleEvent(_):C(_))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(C,h),f.apply(this,[v,h])};var p=c.removeEventListener;c.removeEventListener=function(v,C){if(v!==i||!this._eventMap||!this._eventMap[i])return p.apply(this,arguments);if(!this._eventMap[i].has(C))return p.apply(this,arguments);var h=this._eventMap[i].get(C);return this._eventMap[i].delete(C),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,p.apply(this,[v,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(v){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),v&&this.addEventListener(i,this["_on"+i]=v)},enumerable:!0,configurable:!0})}}function Si(r){return typeof r!="boolean"?new Error("Argument type: "+be(r)+". Please use a boolean."):(nn=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Pi(r){return typeof r!="boolean"?new Error("Argument type: "+be(r)+". Please use a boolean."):(an=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Ei(){if((typeof window>"u"?"undefined":be(window))==="object"){if(nn)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Oi(r,i){an&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Mi(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=dt(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=dt(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=dt(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function kr(r){return Object.prototype.toString.call(r)==="[object Object]"}function on(r){return kr(r)?Object.keys(r).reduce(function(i,a){var c=kr(r[a]),f=c?on(r[a]):r[a],p=c&&!Object.keys(f).length;return f===void 0||p?i:Object.assign(i,Ci({},a,f))},{}):r}function ft(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ft(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ft(r,r.get(f),a)})}))}function Di(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var p=[];return r.forEach(function(v){v.type==="track"&&v.trackIdentifier===i.id&&p.push(v)}),p.forEach(function(v){r.forEach(function(C){C.type===c&&C.trackId===v.id&&ft(r,C,f)})}),f}Object.defineProperty(rn,"__esModule",{value:!0});var xi=rn.shimGetUserMedia=ji,Ai=ki(ee);function sn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(sn=function(c){return c?a:i})(r)}function ki(r,i){if(r&&r.__esModule)return r;if(r===null||we(r)!=="object"&&typeof r!="function")return{default:r};var a=sn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var v=f?Object.getOwnPropertyDescriptor(r,p):null;v&&(v.get||v.set)?Object.defineProperty(c,p,v):c[p]=r[p]}return c.default=r,a&&a.set(r,c),c}function we(r){"@babel/helpers - typeof";return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},we(r)}var jr=Ai.log;function ji(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(we(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(_){if(!(_==="require"||_==="advanced"||_==="mediaSource")){var b=we(h[_])==="object"?h[_]:{ideal:h[_]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var j=function(A,I){return A?A+I.charAt(0).toUpperCase()+I.slice(1):I==="deviceId"?"sourceId":I};if(b.ideal!==void 0){w.optional=w.optional||[];var R={};typeof b.ideal=="number"?(R[j("min",_)]=b.ideal,w.optional.push(R),R={},R[j("max",_)]=b.ideal,w.optional.push(R)):(R[j("",_)]=b.ideal,w.optional.push(R))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[j("",_)]=b.exact):["min","max"].forEach(function(A){b[A]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[j(A,_)]=b[A])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&we(h.audio)==="object"){var _=function(A,I,L){I in A&&!(L in A)&&(A[L]=A[I],delete A[I])};h=JSON.parse(JSON.stringify(h)),_(h.audio,"autoGainControl","googAutoGainControl"),_(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&we(h.video)==="object"){var b=h.video.facingMode;b=b&&(we(b)==="object"?b:{ideal:b});var j=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!j)){delete h.video.facingMode;var R;if(b.exact==="environment"||b.ideal==="environment"?R=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(R=["front"]),R)return a.mediaDevices.enumerateDevices().then(function(A){A=A.filter(function(L){return L.kind==="videoinput"});var I=A.find(function(L){return R.some(function(P){return L.label.toLowerCase().includes(P)})});return!I&&A.length&&R.includes("back")&&(I=A[A.length-1]),I&&(h.video.deviceId=b.exact?{exact:I.deviceId}:{ideal:I.deviceId}),h.video=c(h.video),jr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return jr("chrome: "+JSON.stringify(h)),w(h)},p=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},v=function(h,w,_){f(h,function(b){a.webkitGetUserMedia(b,w,function(j){_&&_(p(j))})})};if(a.getUserMedia=v.bind(a),a.mediaDevices.getUserMedia){var C=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return C(w).then(function(_){if(w.audio&&!_.getAudioTracks().length||w.video&&!_.getVideoTracks().length)throw _.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return _},function(_){return Promise.reject(p(_))})})}}}}var cn={};Object.defineProperty(cn,"__esModule",{value:!0});var Ri=cn.shimGetUserMedia=Wi,Fi=Ii(ee);function un(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(un=function(c){return c?a:i})(r)}function Ii(r,i){if(r&&r.__esModule)return r;if(r===null||xe(r)!=="object"&&typeof r!="function")return{default:r};var a=un(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var v=f?Object.getOwnPropertyDescriptor(r,p):null;v&&(v.get||v.set)?Object.defineProperty(c,p,v):c[p]=r[p]}return c.default=r,a&&a.set(r,c),c}function xe(r){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},xe(r)}function Wi(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,_){Fi.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,_)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,_){w in h&&!(_ in h)&&(h[_]=h[w],delete h[w])},p=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return xe(h)==="object"&&xe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),p(h)},c&&c.prototype.getSettings){var v=c.prototype.getSettings;c.prototype.getSettings=function(){var h=v.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var C=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&xe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),C.apply(this,[h])}}}}var le={};Object.defineProperty(le,"__esModule",{value:!0});le.shimAudioContext=Gi;le.shimCallbacksAPI=Bi;le.shimConstraints=fn;le.shimCreateOfferLegacy=Ji;var Ui=le.shimGetUserMedia=Vi;le.shimLocalStreamsAPI=Hi;le.shimRTCIceServerUrls=zi;le.shimRemoteStreamsAPI=Ni;le.shimTrackEventTransceiver=qi;var ln=Li(ee);function dn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(dn=function(c){return c?a:i})(r)}function Li(r,i){if(r&&r.__esModule)return r;if(r===null||Ce(r)!=="object"&&typeof r!="function")return{default:r};var a=dn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var v=f?Object.getOwnPropertyDescriptor(r,p):null;v&&(v.get||v.set)?Object.defineProperty(c,p,v):c[p]=r[p]}return c.default=r,a&&a.set(r,c),c}function Ce(r){"@babel/helpers - typeof";return Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ce(r)}function Hi(r){if(!(Ce(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,p=new Array(f>1?f-1:0),v=1;v=0)){a._remoteStreams.push(f);var p=new Event("addstream");p.stream=f,a.dispatchEvent(p)}})}),i.apply(a,arguments)}}}function Bi(r){if(!(Ce(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,p=i.setRemoteDescription,v=i.addIceCandidate;i.createOffer=function(h,w){var _=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[_]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var _=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[_]);return w?(b.then(h,w),Promise.resolve()):b};var C=function(h,w,_){var b=f.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b};i.setLocalDescription=C,C=function(h,w,_){var b=p.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b},i.setRemoteDescription=C,C=function(h,w,_){var b=v.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b},i.addIceCandidate=C}}function Vi(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(fn(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,p,v){i.mediaDevices.getUserMedia(f).then(p,v)}).bind(i))}function fn(r){return r&&r.video!==void 0?Object.assign({},r,{video:ln.compactObject(r.video)}):r}function zi(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],p=0;p{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function me(r,i){if(r===!1)throw new Error(i??"assertion failure")}function Rr(r){throw new Error("this code should be unreachable")}const Qi=Yi(()=>{const r=bi(window);switch(r.browser){case"chrome":xi(window,r);break;case"firefox":Ri(window,r);break;case"safari":Ui(window,r);break;default:throw new Zr}});let Ae=Promise.resolve({type:"stop",data:{}});async function Fr(r,i,a){var c,f,p;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(i)),window.isSecureContext!==!0)throw new vi;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new Zr;Qi(),console.debug("[vue-qrcode-reader] calling getUserMedia");const v=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=v:r.mozSrcObject!==void 0?r.mozSrcObject=v:window.URL.createObjectURL?r.src=window.URL.createObjectURL(v):window.webkitURL?r.src=window.webkitURL.createObjectURL(v):r.src=v.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([Kr(r,"loadeddata"),Ar(6e3).then(()=>{throw new yi})]),console.debug("[vue-qrcode-reader] video element loaded"),await Ar(500);const[C]=v.getVideoTracks(),h=(p=(f=C==null?void 0:C.getCapabilities)==null?void 0:f.call(C))!=null?p:{};let w=!1;return a&&h.torch&&(await C.applyConstraints({advanced:[{torch:!0}]}),w=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:v,capabilities:h,constraints:i,isTorchOn:w}}}async function Xi(r,{constraints:i,torch:a,restart:c=!1}){Ae=Ae.then(p=>{if(p.type==="start"){const{data:{videoEl:v,stream:C,constraints:h,isTorchOn:w}}=p;return!c&&r===v&&i===h&&a===w?p:hn(v,C,w).then(()=>Fr(r,i,a))}else if(p.type==="stop"||p.type==="failed")return Fr(r,i,a);Rr()}).catch(p=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${p}"`),{type:"failed",error:p}));const f=await Ae;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(f.type==="failed")throw f.error;if(f.type==="start")return f.data.capabilities;Rr()}async function hn(r,i,a){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await Kr(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function ut(){if(Ae=Ae.then(r=>{if(r.type==="stop"||r.type==="failed")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return hn(i,a,c)}),(await Ae).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const Ki=So({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=ne(a.constraints),p=ne(a.formats);Ve(()=>a.constraints,(x,S)=>{JSON.stringify(x)!==JSON.stringify(S)&&(f.value=x)},{deep:!0}),Ve(()=>a.formats,(x,S)=>{JSON.stringify(x)!==JSON.stringify(S)&&(p.value=x)},{deep:!0});const v=ne(),C=ne(),h=ne(),w=ne(!1),_=ne(!1);Ir(()=>{_.value=!0}),Po(()=>{ut()});const b=Ut(()=>({torch:a.torch,constraints:f.value,shouldStream:_.value&&!a.paused}));Ve(b,async x=>{const S=h.value;me(S!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const M=v.value;me(M!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const H=M.getContext("2d");if(me(H!==null,"if cavnas is defined, canvas 2d context should also be non-null"),x.shouldStream){ut(),w.value=!1;try{const ae=await Xi(S,x);_.value?(w.value=!0,c("camera-on",ae)):await ut()}catch(ae){c("error",ae)}}else M.width=S.videoWidth,M.height=S.videoHeight,H.drawImage(S,0,0,S.videoWidth,S.videoHeight),ut(),w.value=!1,c("camera-off")},{deep:!0}),Ve(p,async x=>{_.value&&await tn(x)});const j=Ut(()=>b.value.shouldStream&&w.value);Ve(j,x=>{if(x){me(v.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),R(v.value),me(C.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),R(C.value);const S=()=>a.track===void 0?500:40;me(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),wi(h.value,{detectHandler:M=>c("detect",M),formats:p.value,locateHandler:A,minDelay:S()})}});const R=x=>{const S=x.getContext("2d");me(S!==null,"canvas 2d context should always be non-null"),S.clearRect(0,0,x.width,x.height)},A=x=>{const S=C.value;me(S!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const M=h.value;if(me(M!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),x.length===0||a.track===void 0)R(S);else{const H=M.offsetWidth,ae=M.offsetHeight,Pe=M.videoWidth,Ee=M.videoHeight,je=Math.max(H/Pe,ae/Ee),Re=Pe*je,qe=Ee*je,ht=Re/Pe,pt=qe/Ee,mt=(H-Re)/2,vt=(ae-qe)/2,Fe=({x:ye,y:te})=>({x:Math.floor(ye*ht),y:Math.floor(te*pt)}),ie=({x:ye,y:te})=>({x:Math.floor(ye+mt),y:Math.floor(te+vt)}),_e=x.map(ye=>{const{boundingBox:te,cornerPoints:gt}=ye,{x:Je,y:ge}=ie(Fe({x:te.x,y:te.y})),{x:Ge,y:wt}=Fe({x:te.width,y:te.height});return{...ye,cornerPoints:gt.map(Ye=>ie(Fe(Ye))),boundingBox:DOMRectReadOnly.fromRect({x:Je,y:ge,width:Ge,height:wt})}});S.width=M.offsetWidth,S.height=M.offsetHeight;const yt=S.getContext("2d");a.track(_e,yt)}},I={width:"100%",height:"100%",position:"relative","z-index":"0"},L={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},P={width:"100%",height:"100%","object-fit":"cover"},k=Ut(()=>j.value?P:{...P,visibility:"hidden",position:"absolute"});return(x,S)=>(ue(),ve("div",{style:I},[U("video",{ref_key:"videoRef",ref:h,style:Eo(k.value),autoplay:"",muted:"",playsinline:""},null,4),Ht(U("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:v,style:P},null,512),[[Wr,!j.value]]),U("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:C,style:L},null,512),U("div",{style:L},[Oo(x.$slots,"default")])]))}}),Zi={class:"modal is-active"},es={class:"modal-content"},ts={class:"section"},rs={class:"columns is-centered"},ns={class:"column is-three-quarters"},as={class:"modal-slot has-text-centered is-shadowless"},os={key:0},is={class:"block is-size-5"},ss={key:0},cs={class:"is-size-7 mb-3"},us={class:"is-size-7 mb-3"},ls={class:"addressbar columns is-mobile is-gapless"},ds={class:"column is-narrow has-text-left circled"},fs={class:"column is-narrow has-text-right"},hs={key:1,class:"is-size-7"},ps={class:"fullscreen-streamer"},ms={key:1,class:"field has-addons has-addons-centered mt-3"},vs={class:"control has-icons-left"},ys={class:"select"},gs=["value"],ws={class:"icon is-small is-left"},bs={class:"fullscreen-footer"},Ps={__name:"Capture",setup(r){const i=Fo(),a=Lo(),c=Mo(),f=ne(!1),p=ne(null),v=ne([]),C=ne(""),h=Do(new Io({qrcode:null,uri:""})),w=ne(!1);Ir(async()=>{var P;(P=navigator.mediaDevices)!=null&&P.enumerateDevices?await navigator.mediaDevices.enumerateDevices().then(k=>{v.value=k.filter(({kind:x})=>x==="videoinput"),v.value.length>0?p.value=v.value[0]:C.value="no_cam_on_device"}).catch(k=>{_(k)}):C.value="secured_context_required"});const _=P=>{P.name==="NotAllowedError"?C.value="need_grant_permission":P.name==="NotFoundError"?C.value="no_cam_on_device":P.name==="NotSupportedError"||P.name==="InsecureContextError"?C.value="secured_context_required":P.name==="NotReadableError"?C.value="not_readable":P.name==="OverconstrainedError"?C.value="camera_not_suitable":P.name==="StreamApiNotSupportedError"?C.value="stream_api_not_supported":c.error(P)},b=async P=>{const[k]=P;h.uri=k.rawValue,h.uri?h.uri.slice(0,33).toLowerCase()=="otpauth-migration://offline?data="?(a.migrationUri=h.uri,i.push({name:"importAccounts"})):h.uri.slice(0,15).toLowerCase()!=="otpauth://totp/"&&h.uri.slice(0,15).toLowerCase()!=="otpauth://hotp/"?(w.value=!0,c.warn({text:Sr("errors.no_valid_otp")})):(a.decodedUri=h.uri,i.push({name:"createAccount"})):c.warn({text:Sr("errors.qrcode_cannot_be_read")})};function j(P){f.value=!0}function R(P){f.value=!1}function A(){i.go(-1)}const I=(P,k)=>{for(const x of P){const[S,...M]=x.cornerPoints;k.strokeStyle="red",k.beginPath(),k.moveTo(S.x,S.y);for(const{x:H,y:ae}of M)k.lineTo(H,ae);k.lineTo(S.x,S.y),k.closePath(),k.stroke()}};function L(){location.reload()}return(P,k)=>{const x=Lt("FontAwesomeIcon"),S=Lt("ButtonBackCloseCancel"),M=Lt("modal");return ue(),ve(Tr,null,[U("div",Zi,[k[4]||(k[4]=U("div",{class:"modal-background"},null,-1)),U("div",es,[U("section",ts,[U("div",rs,[U("div",ns,[U("div",as,[pe(Z(Ro),null,{default:br(({mode:H})=>[Z(C)?(ue(),ve("div",os,[U("p",is,Se(P.$t("twofaccounts.stream.live_scan_cant_start")),1),U("p",{class:$r(["block",{"has-text-light":H=="dark"}])},Se(P.$t("twofaccounts.stream."+Z(C)+".reason")),3),Z(C)=="need_grant_permission"?(ue(),ve("div",ss,[U("p",cs,Se(P.$t("twofaccounts.stream.need_grant_permission.solution")),1),U("p",us,Se(P.$t("twofaccounts.stream.need_grant_permission.click_camera_icon")),1),U("div",ls,[U("div",ds,[pe(x,{icon:["fas","lock"],class:"ml-1",size:"xs"}),pe(x,{icon:["fas","video-slash"],class:"ml-3",size:"xs"})]),k[3]||(k[3]=U("div",{class:"column has-text-left ml-3"}," http://my.2fauth.app/... ",-1)),U("div",fs,[pe(x,{icon:["far","star"],class:"mr-1"})])]),U("p",null,[U("a",{onClick:jo(L,["stop"])},Se(P.$t("commons.refresh")),1)])])):(ue(),ve("p",hs,Se(P.$t("twofaccounts.stream."+Z(C)+".solution")),1))])):(ue(),ve("span",{key:1,class:$r(["is-size-4",H=="dark"?"has-text-light":"has-text-grey-dark"])},[pe(Wo,{isVisible:!0,type:"raw",class:"is-size-1"})],2))]),_:1})])])])])]),Ht(U("div",ps,[Z(p)!==null?(ue(),xo(Z(Ki),{key:0,track:I,onDetect:b,onError:_,onCameraOn:j,onCameraOff:R})):Cr("",!0),Z(f)&&Z(v).length>1?(ue(),ve("div",ms,[U("p",vs,[U("span",ys,[Ht(U("select",{"onUpdate:modelValue":k[0]||(k[0]=H=>_r(p)?p.value=H:null)},[(ue(!0),ve(Tr,null,Ao(Z(v),H=>(ue(),ve("option",{key:H.label,value:H},Se(H.label?H.label:P.$t("commons.default")),9,gs))),128))],512),[[ko,Z(p)]])]),U("span",ws,[pe(x,{icon:["fas","camera"]})])])])):Cr("",!0)],512),[[Wr,!Z(C)]]),U("div",bs,[pe(S,{action:"cancel",isCapture:!0,useLinkTag:!1,onCanceled:k[1]||(k[1]=H=>A())})])]),pe(M,{modelValue:Z(w),"onUpdate:modelValue":k[2]||(k[2]=H=>_r(w)?w.value=H:null)},{default:br(()=>[pe(Uo,{qrContent:Z(h).uri},null,8,["qrContent"])]),_:1},8,["modelValue"])],64)}}};export{Ps as default}; +//# sourceMappingURL=Capture-x-RcmcHd.js.map diff --git a/public/build/assets/Capture-x-RcmcHd.js.map b/public/build/assets/Capture-x-RcmcHd.js.map new file mode 100644 index 00000000..e63b4968 --- /dev/null +++ b/public/build/assets/Capture-x-RcmcHd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Capture-x-RcmcHd.js","sources":["../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js","../../../resources/js/views/twofaccounts/Capture.vue"],"sourcesContent":["import { defineComponent as jt, ref as we, watch as We, onMounted as vo, onUnmounted as yo, computed as Ut, openBlock as Lt, createElementBlock as Ht, createElementVNode as nt, normalizeStyle as go, withDirectives as wo, vShow as bo, renderSlot as Dr, withModifiers as at } from \"vue\";\nvar Mr = (r, o, i) => {\n if (!o.has(r))\n throw TypeError(\"Cannot \" + i);\n}, br = (r, o, i) => (Mr(r, o, \"read from private field\"), i ? i.call(r) : o.get(r)), Co = (r, o, i) => {\n if (o.has(r))\n throw TypeError(\"Cannot add the same private member more than once\");\n o instanceof WeakSet ? o.add(r) : o.set(r, i);\n}, $o = (r, o, i, c) => (Mr(r, o, \"write to private field\"), o.set(r, i), i);\nconst Ar = [\n [\"aztec\", \"Aztec\"],\n [\"code_128\", \"Code128\"],\n [\"code_39\", \"Code39\"],\n [\"code_93\", \"Code93\"],\n [\"codabar\", \"Codabar\"],\n [\"databar\", \"DataBar\"],\n [\"databar_expanded\", \"DataBarExpanded\"],\n [\"data_matrix\", \"DataMatrix\"],\n [\"dx_film_edge\", \"DXFilmEdge\"],\n [\"ean_13\", \"EAN-13\"],\n [\"ean_8\", \"EAN-8\"],\n [\"itf\", \"ITF\"],\n [\"maxi_code\", \"MaxiCode\"],\n [\"micro_qr_code\", \"MicroQRCode\"],\n [\"pdf417\", \"PDF417\"],\n [\"qr_code\", \"QRCode\"],\n [\"rm_qr_code\", \"rMQRCode\"],\n [\"upc_a\", \"UPC-A\"],\n [\"upc_e\", \"UPC-E\"],\n [\"linear_codes\", \"Linear-Codes\"],\n [\"matrix_codes\", \"Matrix-Codes\"]\n], _o = [...Ar, [\"unknown\"]].map((r) => r[0]), it = new Map(\n Ar\n);\nfunction So(r) {\n for (const [o, i] of it)\n if (r === i)\n return o;\n return \"unknown\";\n}\nfunction Po(r) {\n if (xr(r))\n return {\n width: r.naturalWidth,\n height: r.naturalHeight\n };\n if (Rr(r))\n return {\n width: r.width.baseVal.value,\n height: r.height.baseVal.value\n };\n if (kr(r))\n return {\n width: r.videoWidth,\n height: r.videoHeight\n };\n if (Fr(r))\n return {\n width: r.width,\n height: r.height\n };\n if (Wr(r))\n return {\n width: r.displayWidth,\n height: r.displayHeight\n };\n if (Ir(r))\n return {\n width: r.width,\n height: r.height\n };\n if (Ur(r))\n return {\n width: r.width,\n height: r.height\n };\n throw new TypeError(\n \"The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.\"\n );\n}\nfunction xr(r) {\n try {\n return r instanceof HTMLImageElement;\n } catch (o) {\n return !1;\n }\n}\nfunction Rr(r) {\n try {\n return r instanceof SVGImageElement;\n } catch (o) {\n return !1;\n }\n}\nfunction kr(r) {\n try {\n return r instanceof HTMLVideoElement;\n } catch (o) {\n return !1;\n }\n}\nfunction Ir(r) {\n try {\n return r instanceof HTMLCanvasElement;\n } catch (o) {\n return !1;\n }\n}\nfunction Fr(r) {\n try {\n return r instanceof ImageBitmap;\n } catch (o) {\n return !1;\n }\n}\nfunction Ur(r) {\n try {\n return r instanceof OffscreenCanvas;\n } catch (o) {\n return !1;\n }\n}\nfunction Wr(r) {\n try {\n return r instanceof VideoFrame;\n } catch (o) {\n return !1;\n }\n}\nfunction jr(r) {\n try {\n return r instanceof Blob;\n } catch (o) {\n return !1;\n }\n}\nfunction To(r) {\n try {\n return r instanceof ImageData;\n } catch (o) {\n return !1;\n }\n}\nfunction Eo(r, o) {\n try {\n const i = new OffscreenCanvas(r, o);\n if (i.getContext(\"2d\") instanceof OffscreenCanvasRenderingContext2D)\n return i;\n throw void 0;\n } catch (i) {\n const c = document.createElement(\"canvas\");\n return c.width = r, c.height = o, c;\n }\n}\nasync function Lr(r) {\n if (xr(r) && !await Ao(r))\n throw new DOMException(\n \"Failed to load or decode HTMLImageElement.\",\n \"InvalidStateError\"\n );\n if (Rr(r) && !await xo(r))\n throw new DOMException(\n \"Failed to load or decode SVGImageElement.\",\n \"InvalidStateError\"\n );\n if (Wr(r) && Ro(r))\n throw new DOMException(\"VideoFrame is closed.\", \"InvalidStateError\");\n if (kr(r) && (r.readyState === 0 || r.readyState === 1))\n throw new DOMException(\"Invalid element or state.\", \"InvalidStateError\");\n if (Fr(r) && Io(r))\n throw new DOMException(\n \"The image source is detached.\",\n \"InvalidStateError\"\n );\n const { width: o, height: i } = Po(r);\n if (o === 0 || i === 0)\n return null;\n const c = Eo(o, i).getContext(\"2d\");\n c.drawImage(r, 0, 0);\n try {\n return c.getImageData(0, 0, o, i);\n } catch (l) {\n throw new DOMException(\"Source would taint origin.\", \"SecurityError\");\n }\n}\nasync function Oo(r) {\n let o;\n try {\n if (globalThis.createImageBitmap)\n o = await createImageBitmap(r);\n else if (globalThis.Image) {\n o = new Image();\n let i = \"\";\n try {\n i = URL.createObjectURL(r), o.src = i, await o.decode();\n } finally {\n URL.revokeObjectURL(i);\n }\n } else\n return r;\n } catch (i) {\n throw new DOMException(\n \"Failed to load or decode Blob.\",\n \"InvalidStateError\"\n );\n }\n return await Lr(o);\n}\nfunction Do(r) {\n const { width: o, height: i } = r;\n if (o === 0 || i === 0)\n return null;\n const c = r.getContext(\"2d\");\n try {\n return c.getImageData(0, 0, o, i);\n } catch (l) {\n throw new DOMException(\"Source would taint origin.\", \"SecurityError\");\n }\n}\nasync function Mo(r) {\n if (jr(r))\n return await Oo(r);\n if (To(r)) {\n if (ko(r))\n throw new DOMException(\n \"The image data has been detached.\",\n \"InvalidStateError\"\n );\n return r;\n }\n return Ir(r) || Ur(r) ? Do(r) : await Lr(r);\n}\nasync function Ao(r) {\n try {\n return await r.decode(), !0;\n } catch (o) {\n return !1;\n }\n}\nasync function xo(r) {\n var o;\n try {\n return await ((o = r.decode) == null ? void 0 : o.call(r)), !0;\n } catch (i) {\n return !1;\n }\n}\nfunction Ro(r) {\n return r.format === null;\n}\nfunction ko(r) {\n return r.data.buffer.byteLength === 0;\n}\nfunction Io(r) {\n return r.width === 0 && r.height === 0;\n}\nfunction Cr(r, o) {\n return r instanceof DOMException ? new DOMException(`${o}: ${r.message}`, r.name) : r instanceof Error ? new r.constructor(`${o}: ${r.message}`) : new Error(`${o}: ${r}`);\n}\nconst $r = [\n \"Aztec\",\n \"Codabar\",\n \"Code128\",\n \"Code39\",\n \"Code93\",\n \"DataBar\",\n \"DataBarExpanded\",\n \"DataMatrix\",\n \"DXFilmEdge\",\n \"EAN-13\",\n \"EAN-8\",\n \"ITF\",\n \"Linear-Codes\",\n \"Matrix-Codes\",\n \"MaxiCode\",\n \"MicroQRCode\",\n \"None\",\n \"PDF417\",\n \"QRCode\",\n \"rMQRCode\",\n \"UPC-A\",\n \"UPC-E\"\n];\nfunction Fo(r) {\n return r.join(\"|\");\n}\nfunction Uo(r) {\n const o = _r(r);\n let i = 0, c = $r.length - 1;\n for (; i <= c; ) {\n const l = Math.floor((i + c) / 2), h = $r[l], v = _r(h);\n if (v === o)\n return h;\n v < o ? i = l + 1 : c = l - 1;\n }\n return \"None\";\n}\nfunction _r(r) {\n return r.toLowerCase().replace(/_-\\[\\]/g, \"\");\n}\nfunction Wo(r, o) {\n return r.Binarizer[o];\n}\nfunction jo(r, o) {\n return r.CharacterSet[o];\n}\nconst Lo = [\n \"Text\",\n \"Binary\",\n \"Mixed\",\n \"GS1\",\n \"ISO15434\",\n \"UnknownECI\"\n];\nfunction Ho(r) {\n return Lo[r.value];\n}\nfunction Bo(r, o) {\n return r.EanAddOnSymbol[o];\n}\nfunction Vo(r, o) {\n return r.TextMode[o];\n}\nconst Ee = {\n formats: [],\n tryHarder: !0,\n tryRotate: !0,\n tryInvert: !0,\n tryDownscale: !0,\n binarizer: \"LocalAverage\",\n isPure: !1,\n downscaleFactor: 3,\n downscaleThreshold: 500,\n minLineCount: 2,\n maxNumberOfSymbols: 255,\n tryCode39ExtendedMode: !1,\n validateCode39CheckSum: !1,\n validateITFCheckSum: !1,\n returnCodabarStartEnd: !1,\n returnErrors: !1,\n eanAddOnSymbol: \"Read\",\n textMode: \"Plain\",\n characterSet: \"Unknown\"\n};\nfunction Hr(r, o) {\n return {\n ...o,\n formats: Fo(o.formats),\n binarizer: Wo(r, o.binarizer),\n eanAddOnSymbol: Bo(\n r,\n o.eanAddOnSymbol\n ),\n textMode: Vo(r, o.textMode),\n characterSet: jo(\n r,\n o.characterSet\n )\n };\n}\nfunction Br(r) {\n return {\n ...r,\n format: Uo(r.format),\n eccLevel: r.eccLevel,\n contentType: Ho(r.contentType)\n };\n}\nconst qo = {\n locateFile: (r, o) => {\n const i = r.match(/_(.+?)\\.wasm$/);\n return i ? `https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${i[1]}/${r}` : o + r;\n }\n};\nlet Wt = /* @__PURE__ */ new WeakMap();\nfunction Bt(r, o) {\n var i;\n const c = Wt.get(r);\n if (c != null && c.modulePromise && o === void 0)\n return c.modulePromise;\n const l = (i = c == null ? void 0 : c.moduleOverrides) != null ? i : qo, h = r({\n ...l\n });\n return Wt.set(r, {\n moduleOverrides: l,\n modulePromise: h\n }), h;\n}\nfunction No(r, o) {\n Wt.set(r, {\n moduleOverrides: o\n });\n}\nasync function zo(r, o, i = Ee) {\n const c = {\n ...Ee,\n ...i\n }, l = await Bt(r), { size: h } = o, v = new Uint8Array(await o.arrayBuffer()), g = l._malloc(h);\n l.HEAPU8.set(v, g);\n const b = l.readBarcodesFromImage(\n g,\n h,\n Hr(l, c)\n );\n l._free(g);\n const p = [];\n for (let C = 0; C < b.size(); ++C)\n p.push(\n Br(b.get(C))\n );\n return p;\n}\nasync function Go(r, o, i = Ee) {\n const c = {\n ...Ee,\n ...i\n }, l = await Bt(r), {\n data: h,\n width: v,\n height: g,\n data: { byteLength: b }\n } = o, p = l._malloc(b);\n l.HEAPU8.set(h, p);\n const C = l.readBarcodesFromPixmap(\n p,\n v,\n g,\n Hr(l, c)\n );\n l._free(p);\n const S = [];\n for (let $ = 0; $ < C.size(); ++$)\n S.push(\n Br(C.get($))\n );\n return S;\n}\n({\n ...Ee,\n formats: [...Ee.formats]\n});\nvar lt = (() => {\n var r = typeof document < \"u\" && document.currentScript ? document.currentScript.src : void 0;\n return function(o = {}) {\n var i = o, c, l;\n i.ready = new Promise((e, t) => {\n c = e, l = t;\n });\n var h = Object.assign({}, i), v = \"./this.program\", g = typeof window == \"object\", b = typeof importScripts == \"function\";\n typeof process == \"object\" && typeof process.versions == \"object\" && process.versions.node;\n var p = \"\";\n function C(e) {\n return i.locateFile ? i.locateFile(e, p) : p + e;\n }\n var S;\n (g || b) && (b ? p = self.location.href : typeof document < \"u\" && document.currentScript && (p = document.currentScript.src), r && (p = r), p.indexOf(\"blob:\") !== 0 ? p = p.substr(0, p.replace(/[?#].*/, \"\").lastIndexOf(\"/\") + 1) : p = \"\", b && (S = (e) => {\n var t = new XMLHttpRequest();\n return t.open(\"GET\", e, !1), t.responseType = \"arraybuffer\", t.send(null), new Uint8Array(t.response);\n })), i.print || console.log.bind(console);\n var $ = i.printErr || console.error.bind(console);\n Object.assign(i, h), h = null, i.arguments && i.arguments, i.thisProgram && (v = i.thisProgram), i.quit && i.quit;\n var F;\n i.wasmBinary && (F = i.wasmBinary), typeof WebAssembly != \"object\" && Z(\"no native wasm support detected\");\n var U, W = !1, R, A, X, k, D, M, le, oe;\n function be() {\n var e = U.buffer;\n i.HEAP8 = R = new Int8Array(e), i.HEAP16 = X = new Int16Array(e), i.HEAPU8 = A = new Uint8Array(e), i.HEAPU16 = k = new Uint16Array(e), i.HEAP32 = D = new Int32Array(e), i.HEAPU32 = M = new Uint32Array(e), i.HEAPF32 = le = new Float32Array(e), i.HEAPF64 = oe = new Float64Array(e);\n }\n var Ce = [], Oe = [], De = [];\n function Le() {\n if (i.preRun)\n for (typeof i.preRun == \"function\" && (i.preRun = [i.preRun]); i.preRun.length; )\n ht(i.preRun.shift());\n gt(Ce);\n }\n function dt() {\n gt(Oe);\n }\n function ft() {\n if (i.postRun)\n for (typeof i.postRun == \"function\" && (i.postRun = [i.postRun]); i.postRun.length; )\n Me(i.postRun.shift());\n gt(De);\n }\n function ht(e) {\n Ce.unshift(e);\n }\n function pt(e) {\n Oe.unshift(e);\n }\n function Me(e) {\n De.unshift(e);\n }\n var te = 0, ve = null;\n function mt(e) {\n var t;\n te++, (t = i.monitorRunDependencies) === null || t === void 0 || t.call(i, te);\n }\n function de(e) {\n var t;\n if (te--, (t = i.monitorRunDependencies) === null || t === void 0 || t.call(i, te), te == 0 && ve) {\n var n = ve;\n ve = null, n();\n }\n }\n function Z(e) {\n var t;\n (t = i.onAbort) === null || t === void 0 || t.call(i, e), e = \"Aborted(\" + e + \")\", $(e), W = !0, e += \". Build with -sASSERTIONS for more info.\";\n var n = new WebAssembly.RuntimeError(e);\n throw l(n), n;\n }\n var vt = \"data:application/octet-stream;base64,\", He = (e) => e.startsWith(vt), fe;\n fe = \"zxing_reader.wasm\", He(fe) || (fe = C(fe));\n function Be(e) {\n if (e == fe && F)\n return new Uint8Array(F);\n if (S)\n return S(e);\n throw \"both async and sync fetching of the wasm failed\";\n }\n function yt(e) {\n return !F && (g || b) && typeof fetch == \"function\" ? fetch(e, {\n credentials: \"same-origin\"\n }).then((t) => {\n if (!t.ok)\n throw \"failed to load wasm binary file at '\" + e + \"'\";\n return t.arrayBuffer();\n }).catch(() => Be(e)) : Promise.resolve().then(() => Be(e));\n }\n function Ve(e, t, n) {\n return yt(e).then((a) => WebAssembly.instantiate(a, t)).then((a) => a).then(n, (a) => {\n $(`failed to asynchronously prepare wasm: ${a}`), Z(a);\n });\n }\n function an(e, t, n, a) {\n return !e && typeof WebAssembly.instantiateStreaming == \"function\" && !He(t) && typeof fetch == \"function\" ? fetch(t, {\n credentials: \"same-origin\"\n }).then((s) => {\n var u = WebAssembly.instantiateStreaming(s, n);\n return u.then(a, function(d) {\n return $(`wasm streaming compile failed: ${d}`), $(\"falling back to ArrayBuffer instantiation\"), Ve(t, n, a);\n });\n }) : Ve(t, n, a);\n }\n function on() {\n var e = {\n a: Ga\n };\n function t(a, s) {\n return z = a.exports, U = z.ia, be(), Kt = z.ma, pt(z.ja), de(), z;\n }\n mt();\n function n(a) {\n t(a.instance);\n }\n if (i.instantiateWasm)\n try {\n return i.instantiateWasm(e, t);\n } catch (a) {\n $(`Module.instantiateWasm callback failed with error: ${a}`), l(a);\n }\n return an(F, fe, e, n).catch(l), {};\n }\n var gt = (e) => {\n for (; e.length > 0; )\n e.shift()(i);\n };\n i.noExitRuntime;\n var qe = [], Ne = 0, sn = (e) => {\n var t = new wt(e);\n return t.get_caught() || (t.set_caught(!0), Ne--), t.set_rethrown(!1), qe.push(t), hr(t.excPtr), t.get_exception_ptr();\n }, ie = 0, cn = () => {\n j(0, 0);\n var e = qe.pop();\n fr(e.excPtr), ie = 0;\n };\n function wt(e) {\n this.excPtr = e, this.ptr = e - 24, this.set_type = function(t) {\n M[this.ptr + 4 >> 2] = t;\n }, this.get_type = function() {\n return M[this.ptr + 4 >> 2];\n }, this.set_destructor = function(t) {\n M[this.ptr + 8 >> 2] = t;\n }, this.get_destructor = function() {\n return M[this.ptr + 8 >> 2];\n }, this.set_caught = function(t) {\n t = t ? 1 : 0, R[this.ptr + 12 >> 0] = t;\n }, this.get_caught = function() {\n return R[this.ptr + 12 >> 0] != 0;\n }, this.set_rethrown = function(t) {\n t = t ? 1 : 0, R[this.ptr + 13 >> 0] = t;\n }, this.get_rethrown = function() {\n return R[this.ptr + 13 >> 0] != 0;\n }, this.init = function(t, n) {\n this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(n);\n }, this.set_adjusted_ptr = function(t) {\n M[this.ptr + 16 >> 2] = t;\n }, this.get_adjusted_ptr = function() {\n return M[this.ptr + 16 >> 2];\n }, this.get_exception_ptr = function() {\n var t = mr(this.get_type());\n if (t)\n return M[this.excPtr >> 2];\n var n = this.get_adjusted_ptr();\n return n !== 0 ? n : this.excPtr;\n };\n }\n var un = (e) => {\n throw ie || (ie = e), ie;\n }, bt = (e) => {\n var t = ie;\n if (!t)\n return Ue(0), 0;\n var n = new wt(t);\n n.set_adjusted_ptr(t);\n var a = n.get_type();\n if (!a)\n return Ue(0), t;\n for (var s in e) {\n var u = e[s];\n if (u === 0 || u === a)\n break;\n var d = n.ptr + 16;\n if (pr(u, a, d))\n return Ue(u), t;\n }\n return Ue(a), t;\n }, ln = () => bt([]), dn = (e) => bt([e]), fn = (e, t) => bt([e, t]), hn = () => {\n var e = qe.pop();\n e || Z(\"no exception to throw\");\n var t = e.excPtr;\n throw e.get_rethrown() || (qe.push(e), e.set_rethrown(!0), e.set_caught(!1), Ne++), ie = t, ie;\n }, pn = (e, t, n) => {\n var a = new wt(e);\n throw a.init(t, n), ie = e, Ne++, ie;\n }, mn = () => Ne, ze = {}, Ct = (e) => {\n for (; e.length; ) {\n var t = e.pop(), n = e.pop();\n n(t);\n }\n };\n function $t(e) {\n return this.fromWireType(D[e >> 2]);\n }\n var $e = {}, ye = {}, Ge = {}, qt, Ye = (e) => {\n throw new qt(e);\n }, ge = (e, t, n) => {\n e.forEach(function(f) {\n Ge[f] = t;\n });\n function a(f) {\n var m = n(f);\n m.length !== e.length && Ye(\"Mismatched type converter count\");\n for (var w = 0; w < e.length; ++w)\n re(e[w], m[w]);\n }\n var s = new Array(t.length), u = [], d = 0;\n t.forEach((f, m) => {\n ye.hasOwnProperty(f) ? s[m] = ye[f] : (u.push(f), $e.hasOwnProperty(f) || ($e[f] = []), $e[f].push(() => {\n s[m] = ye[f], ++d, d === u.length && a(s);\n }));\n }), u.length === 0 && a(s);\n }, vn = (e) => {\n var t = ze[e];\n delete ze[e];\n var n = t.rawConstructor, a = t.rawDestructor, s = t.fields, u = s.map((d) => d.getterReturnType).concat(s.map((d) => d.setterArgumentType));\n ge([e], u, (d) => {\n var f = {};\n return s.forEach((m, w) => {\n var _ = m.fieldName, T = d[w], E = m.getter, O = m.getterContext, L = d[w + s.length], q = m.setter, I = m.setterContext;\n f[_] = {\n read: (J) => T.fromWireType(E(O, J)),\n write: (J, y) => {\n var P = [];\n q(I, J, L.toWireType(P, y)), Ct(P);\n }\n };\n }), [{\n name: t.name,\n fromWireType: (m) => {\n var w = {};\n for (var _ in f)\n w[_] = f[_].read(m);\n return a(m), w;\n },\n toWireType: (m, w) => {\n for (var _ in f)\n if (!(_ in w))\n throw new TypeError(`Missing field: \"${_}\"`);\n var T = n();\n for (_ in f)\n f[_].write(T, w[_]);\n return m !== null && m.push(a, T), T;\n },\n argPackAdvance: ne,\n readValueFromPointer: $t,\n destructorFunction: a\n }];\n });\n }, yn = (e, t, n, a, s) => {\n }, gn = () => {\n for (var e = new Array(256), t = 0; t < 256; ++t)\n e[t] = String.fromCharCode(t);\n Nt = e;\n }, Nt, Y = (e) => {\n for (var t = \"\", n = e; A[n]; )\n t += Nt[A[n++]];\n return t;\n }, _e, x = (e) => {\n throw new _e(e);\n };\n function wn(e, t) {\n let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n var a = t.name;\n if (e || x(`type \"${a}\" must have a positive integer typeid pointer`), ye.hasOwnProperty(e)) {\n if (n.ignoreDuplicateRegistrations)\n return;\n x(`Cannot register type '${a}' twice`);\n }\n if (ye[e] = t, delete Ge[e], $e.hasOwnProperty(e)) {\n var s = $e[e];\n delete $e[e], s.forEach((u) => u());\n }\n }\n function re(e, t) {\n let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n if (!(\"argPackAdvance\" in t))\n throw new TypeError(\"registerType registeredInstance requires argPackAdvance\");\n return wn(e, t, n);\n }\n var ne = 8, bn = (e, t, n, a) => {\n t = Y(t), re(e, {\n name: t,\n fromWireType: function(s) {\n return !!s;\n },\n toWireType: function(s, u) {\n return u ? n : a;\n },\n argPackAdvance: ne,\n readValueFromPointer: function(s) {\n return this.fromWireType(A[s]);\n },\n destructorFunction: null\n });\n }, Cn = (e) => ({\n count: e.count,\n deleteScheduled: e.deleteScheduled,\n preservePointerOnDelete: e.preservePointerOnDelete,\n ptr: e.ptr,\n ptrType: e.ptrType,\n smartPtr: e.smartPtr,\n smartPtrType: e.smartPtrType\n }), _t = (e) => {\n function t(n) {\n return n.$$.ptrType.registeredClass.name;\n }\n x(t(e) + \" instance already deleted\");\n }, St = !1, zt = (e) => {\n }, $n = (e) => {\n e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);\n }, Gt = (e) => {\n e.count.value -= 1;\n var t = e.count.value === 0;\n t && $n(e);\n }, Yt = (e, t, n) => {\n if (t === n)\n return e;\n if (n.baseClass === void 0)\n return null;\n var a = Yt(e, t, n.baseClass);\n return a === null ? null : n.downcast(a);\n }, Jt = {}, _n = () => Object.keys(Re).length, Sn = () => {\n var e = [];\n for (var t in Re)\n Re.hasOwnProperty(t) && e.push(Re[t]);\n return e;\n }, Ae = [], Pt = () => {\n for (; Ae.length; ) {\n var e = Ae.pop();\n e.$$.deleteScheduled = !1, e.delete();\n }\n }, xe, Pn = (e) => {\n xe = e, Ae.length && xe && xe(Pt);\n }, Tn = () => {\n i.getInheritedInstanceCount = _n, i.getLiveInheritedInstances = Sn, i.flushPendingDeletes = Pt, i.setDelayFunction = Pn;\n }, Re = {}, En = (e, t) => {\n for (t === void 0 && x(\"ptr should not be undefined\"); e.baseClass; )\n t = e.upcast(t), e = e.baseClass;\n return t;\n }, On = (e, t) => (t = En(e, t), Re[t]), Je = (e, t) => {\n (!t.ptrType || !t.ptr) && Ye(\"makeClassHandle requires ptr and ptrType\");\n var n = !!t.smartPtrType, a = !!t.smartPtr;\n return n !== a && Ye(\"Both smartPtrType and smartPtr must be specified\"), t.count = {\n value: 1\n }, ke(Object.create(e, {\n $$: {\n value: t,\n writable: !0\n }\n }));\n };\n function Dn(e) {\n var t = this.getPointee(e);\n if (!t)\n return this.destructor(e), null;\n var n = On(this.registeredClass, t);\n if (n !== void 0) {\n if (n.$$.count.value === 0)\n return n.$$.ptr = t, n.$$.smartPtr = e, n.clone();\n var a = n.clone();\n return this.destructor(e), a;\n }\n function s() {\n return this.isSmartPointer ? Je(this.registeredClass.instancePrototype, {\n ptrType: this.pointeeType,\n ptr: t,\n smartPtrType: this,\n smartPtr: e\n }) : Je(this.registeredClass.instancePrototype, {\n ptrType: this,\n ptr: e\n });\n }\n var u = this.registeredClass.getActualType(t), d = Jt[u];\n if (!d)\n return s.call(this);\n var f;\n this.isConst ? f = d.constPointerType : f = d.pointerType;\n var m = Yt(t, this.registeredClass, f.registeredClass);\n return m === null ? s.call(this) : this.isSmartPointer ? Je(f.registeredClass.instancePrototype, {\n ptrType: f,\n ptr: m,\n smartPtrType: this,\n smartPtr: e\n }) : Je(f.registeredClass.instancePrototype, {\n ptrType: f,\n ptr: m\n });\n }\n var ke = (e) => typeof FinalizationRegistry > \"u\" ? (ke = (t) => t, e) : (St = new FinalizationRegistry((t) => {\n Gt(t.$$);\n }), ke = (t) => {\n var n = t.$$, a = !!n.smartPtr;\n if (a) {\n var s = {\n $$: n\n };\n St.register(t, s, t);\n }\n return t;\n }, zt = (t) => St.unregister(t), ke(e)), Mn = () => {\n Object.assign(Qe.prototype, {\n isAliasOf(e) {\n if (!(this instanceof Qe) || !(e instanceof Qe))\n return !1;\n var t = this.$$.ptrType.registeredClass, n = this.$$.ptr;\n e.$$ = e.$$;\n for (var a = e.$$.ptrType.registeredClass, s = e.$$.ptr; t.baseClass; )\n n = t.upcast(n), t = t.baseClass;\n for (; a.baseClass; )\n s = a.upcast(s), a = a.baseClass;\n return t === a && n === s;\n },\n clone() {\n if (this.$$.ptr || _t(this), this.$$.preservePointerOnDelete)\n return this.$$.count.value += 1, this;\n var e = ke(Object.create(Object.getPrototypeOf(this), {\n $$: {\n value: Cn(this.$$)\n }\n }));\n return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e;\n },\n delete() {\n this.$$.ptr || _t(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && x(\"Object already scheduled for deletion\"), zt(this), Gt(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);\n },\n isDeleted() {\n return !this.$$.ptr;\n },\n deleteLater() {\n return this.$$.ptr || _t(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && x(\"Object already scheduled for deletion\"), Ae.push(this), Ae.length === 1 && xe && xe(Pt), this.$$.deleteScheduled = !0, this;\n }\n });\n };\n function Qe() {\n }\n var Ie = (e, t) => Object.defineProperty(t, \"name\", {\n value: e\n }), Qt = (e, t, n) => {\n if (e[t].overloadTable === void 0) {\n var a = e[t];\n e[t] = function() {\n return e[t].overloadTable.hasOwnProperty(arguments.length) || x(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`), e[t].overloadTable[arguments.length].apply(this, arguments);\n }, e[t].overloadTable = [], e[t].overloadTable[a.argCount] = a;\n }\n }, Tt = (e, t, n) => {\n i.hasOwnProperty(e) ? ((n === void 0 || i[e].overloadTable !== void 0 && i[e].overloadTable[n] !== void 0) && x(`Cannot register public name '${e}' twice`), Qt(i, e, e), i.hasOwnProperty(n) && x(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`), i[e].overloadTable[n] = t) : (i[e] = t, n !== void 0 && (i[e].numArguments = n));\n }, An = 48, xn = 57, Rn = (e) => {\n if (e === void 0)\n return \"_unknown\";\n e = e.replace(/[^a-zA-Z0-9_]/g, \"$\");\n var t = e.charCodeAt(0);\n return t >= An && t <= xn ? `_${e}` : e;\n };\n function kn(e, t, n, a, s, u, d, f) {\n this.name = e, this.constructor = t, this.instancePrototype = n, this.rawDestructor = a, this.baseClass = s, this.getActualType = u, this.upcast = d, this.downcast = f, this.pureVirtualFunctions = [];\n }\n var Et = (e, t, n) => {\n for (; t !== n; )\n t.upcast || x(`Expected null or instance of ${n.name}, got an instance of ${t.name}`), e = t.upcast(e), t = t.baseClass;\n return e;\n };\n function In(e, t) {\n if (t === null)\n return this.isReference && x(`null is not a valid ${this.name}`), 0;\n t.$$ || x(`Cannot pass \"${xt(t)}\" as a ${this.name}`), t.$$.ptr || x(`Cannot pass deleted object as a pointer of type ${this.name}`);\n var n = t.$$.ptrType.registeredClass, a = Et(t.$$.ptr, n, this.registeredClass);\n return a;\n }\n function Fn(e, t) {\n var n;\n if (t === null)\n return this.isReference && x(`null is not a valid ${this.name}`), this.isSmartPointer ? (n = this.rawConstructor(), e !== null && e.push(this.rawDestructor, n), n) : 0;\n (!t || !t.$$) && x(`Cannot pass \"${xt(t)}\" as a ${this.name}`), t.$$.ptr || x(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && x(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);\n var a = t.$$.ptrType.registeredClass;\n if (n = Et(t.$$.ptr, a, this.registeredClass), this.isSmartPointer)\n switch (t.$$.smartPtr === void 0 && x(\"Passing raw pointer to smart pointer is illegal\"), this.sharingPolicy) {\n case 0:\n t.$$.smartPtrType === this ? n = t.$$.smartPtr : x(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);\n break;\n case 1:\n n = t.$$.smartPtr;\n break;\n case 2:\n if (t.$$.smartPtrType === this)\n n = t.$$.smartPtr;\n else {\n var s = t.clone();\n n = this.rawShare(n, se.toHandle(() => s.delete())), e !== null && e.push(this.rawDestructor, n);\n }\n break;\n default:\n x(\"Unsupporting sharing policy\");\n }\n return n;\n }\n function Un(e, t) {\n if (t === null)\n return this.isReference && x(`null is not a valid ${this.name}`), 0;\n t.$$ || x(`Cannot pass \"${xt(t)}\" as a ${this.name}`), t.$$.ptr || x(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && x(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);\n var n = t.$$.ptrType.registeredClass, a = Et(t.$$.ptr, n, this.registeredClass);\n return a;\n }\n function Xt(e) {\n return this.fromWireType(M[e >> 2]);\n }\n var Wn = () => {\n Object.assign(Xe.prototype, {\n getPointee(e) {\n return this.rawGetPointee && (e = this.rawGetPointee(e)), e;\n },\n destructor(e) {\n var t;\n (t = this.rawDestructor) === null || t === void 0 || t.call(this, e);\n },\n argPackAdvance: ne,\n readValueFromPointer: Xt,\n deleteObject(e) {\n e !== null && e.delete();\n },\n fromWireType: Dn\n });\n };\n function Xe(e, t, n, a, s, u, d, f, m, w, _) {\n this.name = e, this.registeredClass = t, this.isReference = n, this.isConst = a, this.isSmartPointer = s, this.pointeeType = u, this.sharingPolicy = d, this.rawGetPointee = f, this.rawConstructor = m, this.rawShare = w, this.rawDestructor = _, !s && t.baseClass === void 0 ? a ? (this.toWireType = In, this.destructorFunction = null) : (this.toWireType = Un, this.destructorFunction = null) : this.toWireType = Fn;\n }\n var Zt = (e, t, n) => {\n i.hasOwnProperty(e) || Ye(\"Replacing nonexistant public symbol\"), i[e].overloadTable !== void 0 && n !== void 0 ? i[e].overloadTable[n] = t : (i[e] = t, i[e].argCount = n);\n }, jn = (e, t, n) => {\n var a = i[\"dynCall_\" + e];\n return n && n.length ? a.apply(null, [t].concat(n)) : a.call(null, t);\n }, Ze = [], Kt, H = (e) => {\n var t = Ze[e];\n return t || (e >= Ze.length && (Ze.length = e + 1), Ze[e] = t = Kt.get(e)), t;\n }, Ln = (e, t, n) => {\n if (e.includes(\"j\"))\n return jn(e, t, n);\n var a = H(t).apply(null, n);\n return a;\n }, Hn = (e, t) => {\n var n = [];\n return function() {\n return n.length = 0, Object.assign(n, arguments), Ln(e, t, n);\n };\n }, ee = (e, t) => {\n e = Y(e);\n function n() {\n return e.includes(\"j\") ? Hn(e, t) : H(t);\n }\n var a = n();\n return typeof a != \"function\" && x(`unknown function pointer with signature ${e}: ${t}`), a;\n }, Bn = (e, t) => {\n var n = Ie(t, function(a) {\n this.name = t, this.message = a;\n var s = new Error(a).stack;\n s !== void 0 && (this.stack = this.toString() + `\n` + s.replace(/^Error(:[^\\n]*)?\\n/, \"\"));\n });\n return n.prototype = Object.create(e.prototype), n.prototype.constructor = n, n.prototype.toString = function() {\n return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;\n }, n;\n }, er, tr = (e) => {\n var t = dr(e), n = Y(t);\n return ce(t), n;\n }, Ke = (e, t) => {\n var n = [], a = {};\n function s(u) {\n if (!a[u] && !ye[u]) {\n if (Ge[u]) {\n Ge[u].forEach(s);\n return;\n }\n n.push(u), a[u] = !0;\n }\n }\n throw t.forEach(s), new er(`${e}: ` + n.map(tr).join([\", \"]));\n }, Vn = (e, t, n, a, s, u, d, f, m, w, _, T, E) => {\n _ = Y(_), u = ee(s, u), f && (f = ee(d, f)), w && (w = ee(m, w)), E = ee(T, E);\n var O = Rn(_);\n Tt(O, function() {\n Ke(`Cannot construct ${_} due to unbound types`, [a]);\n }), ge([e, t, n], a ? [a] : [], function(L) {\n L = L[0];\n var q, I;\n a ? (q = L.registeredClass, I = q.instancePrototype) : I = Qe.prototype;\n var J = Ie(_, function() {\n if (Object.getPrototypeOf(this) !== y)\n throw new _e(\"Use 'new' to construct \" + _);\n if (P.constructor_body === void 0)\n throw new _e(_ + \" has no accessible constructor\");\n var wr = P.constructor_body[arguments.length];\n if (wr === void 0)\n throw new _e(`Tried to invoke ctor of ${_} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(P.constructor_body).toString()}) parameters instead!`);\n return wr.apply(this, arguments);\n }), y = Object.create(I, {\n constructor: {\n value: J\n }\n });\n J.prototype = y;\n var P = new kn(_, J, y, E, q, u, f, w);\n if (P.baseClass) {\n var N, G;\n (G = (N = P.baseClass).__derivedClasses) !== null && G !== void 0 || (N.__derivedClasses = []), P.baseClass.__derivedClasses.push(P);\n }\n var Se = new Xe(_, P, !0, !1, !1), rt = new Xe(_ + \"*\", P, !1, !1, !1), gr = new Xe(_ + \" const*\", P, !1, !0, !1);\n return Jt[e] = {\n pointerType: rt,\n constPointerType: gr\n }, Zt(O, J), [Se, rt, gr];\n });\n }, Ot = (e, t) => {\n for (var n = [], a = 0; a < e; a++)\n n.push(M[t + a * 4 >> 2]);\n return n;\n };\n function qn(e) {\n for (var t = 1; t < e.length; ++t)\n if (e[t] !== null && e[t].destructorFunction === void 0)\n return !0;\n return !1;\n }\n function Dt(e, t, n, a, s, u) {\n var d = t.length;\n d < 2 && x(\"argTypes array size mismatch! Must at least get return value and 'this' types!\");\n var f = t[1] !== null && n !== null, m = qn(t), w = t[0].name !== \"void\", _ = d - 2, T = new Array(_), E = [], O = [], L = function() {\n arguments.length !== _ && x(`function ${e} called with ${arguments.length} arguments, expected ${_}`), O.length = 0;\n var q;\n E.length = f ? 2 : 1, E[0] = s, f && (q = t[1].toWireType(O, this), E[1] = q);\n for (var I = 0; I < _; ++I)\n T[I] = t[I + 2].toWireType(O, arguments[I]), E.push(T[I]);\n var J = a.apply(null, E);\n function y(P) {\n if (m)\n Ct(O);\n else\n for (var N = f ? 1 : 2; N < t.length; N++) {\n var G = N === 1 ? q : T[N - 2];\n t[N].destructorFunction !== null && t[N].destructorFunction(G);\n }\n if (w)\n return t[0].fromWireType(P);\n }\n return y(J);\n };\n return Ie(e, L);\n }\n var Nn = (e, t, n, a, s, u) => {\n var d = Ot(t, n);\n s = ee(a, s), ge([], [e], function(f) {\n f = f[0];\n var m = `constructor ${f.name}`;\n if (f.registeredClass.constructor_body === void 0 && (f.registeredClass.constructor_body = []), f.registeredClass.constructor_body[t - 1] !== void 0)\n throw new _e(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${f.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);\n return f.registeredClass.constructor_body[t - 1] = () => {\n Ke(`Cannot construct ${f.name} due to unbound types`, d);\n }, ge([], d, (w) => (w.splice(1, 0, null), f.registeredClass.constructor_body[t - 1] = Dt(m, w, null, s, u), [])), [];\n });\n }, rr = (e) => {\n e = e.trim();\n const t = e.indexOf(\"(\");\n return t !== -1 ? e.substr(0, t) : e;\n }, zn = (e, t, n, a, s, u, d, f, m) => {\n var w = Ot(n, a);\n t = Y(t), t = rr(t), u = ee(s, u), ge([], [e], function(_) {\n _ = _[0];\n var T = `${_.name}.${t}`;\n t.startsWith(\"@@\") && (t = Symbol[t.substring(2)]), f && _.registeredClass.pureVirtualFunctions.push(t);\n function E() {\n Ke(`Cannot call ${T} due to unbound types`, w);\n }\n var O = _.registeredClass.instancePrototype, L = O[t];\n return L === void 0 || L.overloadTable === void 0 && L.className !== _.name && L.argCount === n - 2 ? (E.argCount = n - 2, E.className = _.name, O[t] = E) : (Qt(O, t, T), O[t].overloadTable[n - 2] = E), ge([], w, function(q) {\n var I = Dt(T, q, _, u, d);\n return O[t].overloadTable === void 0 ? (I.argCount = n - 2, O[t] = I) : O[t].overloadTable[n - 2] = I, [];\n }), [];\n });\n };\n function Gn() {\n Object.assign(nr.prototype, {\n get(e) {\n return this.allocated[e];\n },\n has(e) {\n return this.allocated[e] !== void 0;\n },\n allocate(e) {\n var t = this.freelist.pop() || this.allocated.length;\n return this.allocated[t] = e, t;\n },\n free(e) {\n this.allocated[e] = void 0, this.freelist.push(e);\n }\n });\n }\n function nr() {\n this.allocated = [void 0], this.freelist = [];\n }\n var K = new nr(), Mt = (e) => {\n e >= K.reserved && --K.get(e).refcount === 0 && K.free(e);\n }, Yn = () => {\n for (var e = 0, t = K.reserved; t < K.allocated.length; ++t)\n K.allocated[t] !== void 0 && ++e;\n return e;\n }, Jn = () => {\n K.allocated.push({\n value: void 0\n }, {\n value: null\n }, {\n value: !0\n }, {\n value: !1\n }), K.reserved = K.allocated.length, i.count_emval_handles = Yn;\n }, se = {\n toValue: (e) => (e || x(\"Cannot use deleted val. handle = \" + e), K.get(e).value),\n toHandle: (e) => {\n switch (e) {\n case void 0:\n return 1;\n case null:\n return 2;\n case !0:\n return 3;\n case !1:\n return 4;\n default:\n return K.allocate({\n refcount: 1,\n value: e\n });\n }\n }\n }, Qn = (e, t) => {\n t = Y(t), re(e, {\n name: t,\n fromWireType: (n) => {\n var a = se.toValue(n);\n return Mt(n), a;\n },\n toWireType: (n, a) => se.toHandle(a),\n argPackAdvance: ne,\n readValueFromPointer: $t,\n destructorFunction: null\n });\n }, Xn = (e, t, n) => {\n switch (t) {\n case 1:\n return n ? function(a) {\n return this.fromWireType(R[a >> 0]);\n } : function(a) {\n return this.fromWireType(A[a >> 0]);\n };\n case 2:\n return n ? function(a) {\n return this.fromWireType(X[a >> 1]);\n } : function(a) {\n return this.fromWireType(k[a >> 1]);\n };\n case 4:\n return n ? function(a) {\n return this.fromWireType(D[a >> 2]);\n } : function(a) {\n return this.fromWireType(M[a >> 2]);\n };\n default:\n throw new TypeError(`invalid integer width (${t}): ${e}`);\n }\n }, Zn = (e, t, n, a) => {\n t = Y(t);\n function s() {\n }\n s.values = {}, re(e, {\n name: t,\n constructor: s,\n fromWireType: function(u) {\n return this.constructor.values[u];\n },\n toWireType: (u, d) => d.value,\n argPackAdvance: ne,\n readValueFromPointer: Xn(t, n, a),\n destructorFunction: null\n }), Tt(t, s);\n }, At = (e, t) => {\n var n = ye[e];\n return n === void 0 && x(t + \" has unknown type \" + tr(e)), n;\n }, Kn = (e, t, n) => {\n var a = At(e, \"enum\");\n t = Y(t);\n var s = a.constructor, u = Object.create(a.constructor.prototype, {\n value: {\n value: n\n },\n constructor: {\n value: Ie(`${a.name}_${t}`, function() {\n })\n }\n });\n s.values[n] = u, s[t] = u;\n }, xt = (e) => {\n if (e === null)\n return \"null\";\n var t = typeof e;\n return t === \"object\" || t === \"array\" || t === \"function\" ? e.toString() : \"\" + e;\n }, ea = (e, t) => {\n switch (t) {\n case 4:\n return function(n) {\n return this.fromWireType(le[n >> 2]);\n };\n case 8:\n return function(n) {\n return this.fromWireType(oe[n >> 3]);\n };\n default:\n throw new TypeError(`invalid float width (${t}): ${e}`);\n }\n }, ta = (e, t, n) => {\n t = Y(t), re(e, {\n name: t,\n fromWireType: (a) => a,\n toWireType: (a, s) => s,\n argPackAdvance: ne,\n readValueFromPointer: ea(t, n),\n destructorFunction: null\n });\n }, ra = (e, t, n, a, s, u, d) => {\n var f = Ot(t, n);\n e = Y(e), e = rr(e), s = ee(a, s), Tt(e, function() {\n Ke(`Cannot call ${e} due to unbound types`, f);\n }, t - 1), ge([], f, function(m) {\n var w = [m[0], null].concat(m.slice(1));\n return Zt(e, Dt(e, w, null, s, u), t - 1), [];\n });\n }, na = (e, t, n) => {\n switch (t) {\n case 1:\n return n ? (a) => R[a >> 0] : (a) => A[a >> 0];\n case 2:\n return n ? (a) => X[a >> 1] : (a) => k[a >> 1];\n case 4:\n return n ? (a) => D[a >> 2] : (a) => M[a >> 2];\n default:\n throw new TypeError(`invalid integer width (${t}): ${e}`);\n }\n }, aa = (e, t, n, a, s) => {\n t = Y(t);\n var u = (_) => _;\n if (a === 0) {\n var d = 32 - 8 * n;\n u = (_) => _ << d >>> d;\n }\n var f = t.includes(\"unsigned\"), m = (_, T) => {\n }, w;\n f ? w = function(_, T) {\n return m(T, this.name), T >>> 0;\n } : w = function(_, T) {\n return m(T, this.name), T;\n }, re(e, {\n name: t,\n fromWireType: u,\n toWireType: w,\n argPackAdvance: ne,\n readValueFromPointer: na(t, n, a !== 0),\n destructorFunction: null\n });\n }, oa = (e, t, n) => {\n var a = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], s = a[t];\n function u(d) {\n var f = M[d >> 2], m = M[d + 4 >> 2];\n return new s(R.buffer, m, f);\n }\n n = Y(n), re(e, {\n name: n,\n fromWireType: u,\n argPackAdvance: ne,\n readValueFromPointer: u\n }, {\n ignoreDuplicateRegistrations: !0\n });\n }, ar = (e, t, n, a) => {\n if (!(a > 0))\n return 0;\n for (var s = n, u = n + a - 1, d = 0; d < e.length; ++d) {\n var f = e.charCodeAt(d);\n if (f >= 55296 && f <= 57343) {\n var m = e.charCodeAt(++d);\n f = 65536 + ((f & 1023) << 10) | m & 1023;\n }\n if (f <= 127) {\n if (n >= u)\n break;\n t[n++] = f;\n } else if (f <= 2047) {\n if (n + 1 >= u)\n break;\n t[n++] = 192 | f >> 6, t[n++] = 128 | f & 63;\n } else if (f <= 65535) {\n if (n + 2 >= u)\n break;\n t[n++] = 224 | f >> 12, t[n++] = 128 | f >> 6 & 63, t[n++] = 128 | f & 63;\n } else {\n if (n + 3 >= u)\n break;\n t[n++] = 240 | f >> 18, t[n++] = 128 | f >> 12 & 63, t[n++] = 128 | f >> 6 & 63, t[n++] = 128 | f & 63;\n }\n }\n return t[n] = 0, n - s;\n }, ia = (e, t, n) => ar(e, A, t, n), or = (e) => {\n for (var t = 0, n = 0; n < e.length; ++n) {\n var a = e.charCodeAt(n);\n a <= 127 ? t++ : a <= 2047 ? t += 2 : a >= 55296 && a <= 57343 ? (t += 4, ++n) : t += 3;\n }\n return t;\n }, ir = typeof TextDecoder < \"u\" ? new TextDecoder(\"utf8\") : void 0, sa = (e, t, n) => {\n for (var a = t + n, s = t; e[s] && !(s >= a); )\n ++s;\n if (s - t > 16 && e.buffer && ir)\n return ir.decode(e.subarray(t, s));\n for (var u = \"\"; t < s; ) {\n var d = e[t++];\n if (!(d & 128)) {\n u += String.fromCharCode(d);\n continue;\n }\n var f = e[t++] & 63;\n if ((d & 224) == 192) {\n u += String.fromCharCode((d & 31) << 6 | f);\n continue;\n }\n var m = e[t++] & 63;\n if ((d & 240) == 224 ? d = (d & 15) << 12 | f << 6 | m : d = (d & 7) << 18 | f << 12 | m << 6 | e[t++] & 63, d < 65536)\n u += String.fromCharCode(d);\n else {\n var w = d - 65536;\n u += String.fromCharCode(55296 | w >> 10, 56320 | w & 1023);\n }\n }\n return u;\n }, Rt = (e, t) => e ? sa(A, e, t) : \"\", ca = (e, t) => {\n t = Y(t);\n var n = t === \"std::string\";\n re(e, {\n name: t,\n fromWireType(a) {\n var s = M[a >> 2], u = a + 4, d;\n if (n)\n for (var f = u, m = 0; m <= s; ++m) {\n var w = u + m;\n if (m == s || A[w] == 0) {\n var _ = w - f, T = Rt(f, _);\n d === void 0 ? d = T : (d += \"\\0\", d += T), f = w + 1;\n }\n }\n else {\n for (var E = new Array(s), m = 0; m < s; ++m)\n E[m] = String.fromCharCode(A[u + m]);\n d = E.join(\"\");\n }\n return ce(a), d;\n },\n toWireType(a, s) {\n s instanceof ArrayBuffer && (s = new Uint8Array(s));\n var u, d = typeof s == \"string\";\n d || s instanceof Uint8Array || s instanceof Uint8ClampedArray || s instanceof Int8Array || x(\"Cannot pass non-string to std::string\"), n && d ? u = or(s) : u = s.length;\n var f = Ft(4 + u + 1), m = f + 4;\n if (M[f >> 2] = u, n && d)\n ia(s, m, u + 1);\n else if (d)\n for (var w = 0; w < u; ++w) {\n var _ = s.charCodeAt(w);\n _ > 255 && (ce(m), x(\"String has UTF-16 code units that do not fit in 8 bits\")), A[m + w] = _;\n }\n else\n for (var w = 0; w < u; ++w)\n A[m + w] = s[w];\n return a !== null && a.push(ce, f), f;\n },\n argPackAdvance: ne,\n readValueFromPointer: Xt,\n destructorFunction(a) {\n ce(a);\n }\n });\n }, sr = typeof TextDecoder < \"u\" ? new TextDecoder(\"utf-16le\") : void 0, ua = (e, t) => {\n for (var n = e, a = n >> 1, s = a + t / 2; !(a >= s) && k[a]; )\n ++a;\n if (n = a << 1, n - e > 32 && sr)\n return sr.decode(A.subarray(e, n));\n for (var u = \"\", d = 0; !(d >= t / 2); ++d) {\n var f = X[e + d * 2 >> 1];\n if (f == 0)\n break;\n u += String.fromCharCode(f);\n }\n return u;\n }, la = (e, t, n) => {\n var a;\n if ((a = n) !== null && a !== void 0 || (n = 2147483647), n < 2)\n return 0;\n n -= 2;\n for (var s = t, u = n < e.length * 2 ? n / 2 : e.length, d = 0; d < u; ++d) {\n var f = e.charCodeAt(d);\n X[t >> 1] = f, t += 2;\n }\n return X[t >> 1] = 0, t - s;\n }, da = (e) => e.length * 2, fa = (e, t) => {\n for (var n = 0, a = \"\"; !(n >= t / 4); ) {\n var s = D[e + n * 4 >> 2];\n if (s == 0)\n break;\n if (++n, s >= 65536) {\n var u = s - 65536;\n a += String.fromCharCode(55296 | u >> 10, 56320 | u & 1023);\n } else\n a += String.fromCharCode(s);\n }\n return a;\n }, ha = (e, t, n) => {\n var a;\n if ((a = n) !== null && a !== void 0 || (n = 2147483647), n < 4)\n return 0;\n for (var s = t, u = s + n - 4, d = 0; d < e.length; ++d) {\n var f = e.charCodeAt(d);\n if (f >= 55296 && f <= 57343) {\n var m = e.charCodeAt(++d);\n f = 65536 + ((f & 1023) << 10) | m & 1023;\n }\n if (D[t >> 2] = f, t += 4, t + 4 > u)\n break;\n }\n return D[t >> 2] = 0, t - s;\n }, pa = (e) => {\n for (var t = 0, n = 0; n < e.length; ++n) {\n var a = e.charCodeAt(n);\n a >= 55296 && a <= 57343 && ++n, t += 4;\n }\n return t;\n }, ma = (e, t, n) => {\n n = Y(n);\n var a, s, u, d, f;\n t === 2 ? (a = ua, s = la, d = da, u = () => k, f = 1) : t === 4 && (a = fa, s = ha, d = pa, u = () => M, f = 2), re(e, {\n name: n,\n fromWireType: (m) => {\n for (var w = M[m >> 2], _ = u(), T, E = m + 4, O = 0; O <= w; ++O) {\n var L = m + 4 + O * t;\n if (O == w || _[L >> f] == 0) {\n var q = L - E, I = a(E, q);\n T === void 0 ? T = I : (T += \"\\0\", T += I), E = L + t;\n }\n }\n return ce(m), T;\n },\n toWireType: (m, w) => {\n typeof w != \"string\" && x(`Cannot pass non-string to C++ string type ${n}`);\n var _ = d(w), T = Ft(4 + _ + t);\n return M[T >> 2] = _ >> f, s(w, T + 4, _ + t), m !== null && m.push(ce, T), T;\n },\n argPackAdvance: ne,\n readValueFromPointer: $t,\n destructorFunction(m) {\n ce(m);\n }\n });\n }, va = (e, t, n, a, s, u) => {\n ze[e] = {\n name: Y(t),\n rawConstructor: ee(n, a),\n rawDestructor: ee(s, u),\n fields: []\n };\n }, ya = (e, t, n, a, s, u, d, f, m, w) => {\n ze[e].fields.push({\n fieldName: Y(t),\n getterReturnType: n,\n getter: ee(a, s),\n getterContext: u,\n setterArgumentType: d,\n setter: ee(f, m),\n setterContext: w\n });\n }, ga = (e, t) => {\n t = Y(t), re(e, {\n isVoid: !0,\n name: t,\n argPackAdvance: 0,\n fromWireType: () => {\n },\n toWireType: (n, a) => {\n }\n });\n }, kt = [], wa = (e, t, n, a) => (e = kt[e], t = se.toValue(t), e(null, t, n, a)), ba = {}, Ca = (e) => {\n var t = ba[e];\n return t === void 0 ? Y(e) : t;\n }, cr = () => {\n if (typeof globalThis == \"object\")\n return globalThis;\n function e(t) {\n t.$$$embind_global$$$ = t;\n var n = typeof $$$embind_global$$$ == \"object\" && t.$$$embind_global$$$ == t;\n return n || delete t.$$$embind_global$$$, n;\n }\n if (typeof $$$embind_global$$$ == \"object\" || (typeof global == \"object\" && e(global) ? $$$embind_global$$$ = global : typeof self == \"object\" && e(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == \"object\"))\n return $$$embind_global$$$;\n throw Error(\"unable to get global object.\");\n }, $a = (e) => e === 0 ? se.toHandle(cr()) : (e = Ca(e), se.toHandle(cr()[e])), _a = (e) => {\n var t = kt.length;\n return kt.push(e), t;\n }, Sa = (e, t) => {\n for (var n = new Array(e), a = 0; a < e; ++a)\n n[a] = At(M[t + a * 4 >> 2], \"parameter \" + a);\n return n;\n }, Pa = Reflect.construct, Ta = (e, t, n) => {\n var a = [], s = e.toWireType(a, n);\n return a.length && (M[t >> 2] = se.toHandle(a)), s;\n }, Ea = (e, t, n) => {\n var a = Sa(e, t), s = a.shift();\n e--;\n var u = new Array(e), d = (m, w, _, T) => {\n for (var E = 0, O = 0; O < e; ++O)\n u[O] = a[O].readValueFromPointer(T + E), E += a[O].argPackAdvance;\n for (var L = n === 1 ? Pa(w, u) : w.apply(m, u), O = 0; O < e; ++O) {\n var q, I;\n (q = (I = a[O]).deleteObject) === null || q === void 0 || q.call(I, u[O]);\n }\n return Ta(s, _, L);\n }, f = `methodCaller<(${a.map((m) => m.name).join(\", \")}) => ${s.name}>`;\n return _a(Ie(f, d));\n }, Oa = (e) => {\n e > 4 && (K.get(e).refcount += 1);\n }, Da = (e) => {\n var t = se.toValue(e);\n Ct(t), Mt(e);\n }, Ma = (e, t) => {\n e = At(e, \"_emval_take_value\");\n var n = e.readValueFromPointer(t);\n return se.toHandle(n);\n }, Aa = () => {\n Z(\"\");\n }, xa = (e, t, n) => A.copyWithin(e, t, t + n), Ra = () => 2147483648, ka = (e) => {\n var t = U.buffer, n = (e - t.byteLength + 65535) / 65536;\n try {\n return U.grow(n), be(), 1;\n } catch (a) {\n }\n }, Ia = (e) => {\n var t = A.length;\n e >>>= 0;\n var n = Ra();\n if (e > n)\n return !1;\n for (var a = (m, w) => m + (w - m % w) % w, s = 1; s <= 4; s *= 2) {\n var u = t * (1 + 0.2 / s);\n u = Math.min(u, e + 100663296);\n var d = Math.min(n, a(Math.max(e, u), 65536)), f = ka(d);\n if (f)\n return !0;\n }\n return !1;\n }, It = {}, Fa = () => v || \"./this.program\", Fe = () => {\n if (!Fe.strings) {\n var e = (typeof navigator == \"object\" && navigator.languages && navigator.languages[0] || \"C\").replace(\"-\", \"_\") + \".UTF-8\", t = {\n USER: \"web_user\",\n LOGNAME: \"web_user\",\n PATH: \"/\",\n PWD: \"/\",\n HOME: \"/home/web_user\",\n LANG: e,\n _: Fa()\n };\n for (var n in It)\n It[n] === void 0 ? delete t[n] : t[n] = It[n];\n var a = [];\n for (var n in t)\n a.push(`${n}=${t[n]}`);\n Fe.strings = a;\n }\n return Fe.strings;\n }, Ua = (e, t) => {\n for (var n = 0; n < e.length; ++n)\n R[t++ >> 0] = e.charCodeAt(n);\n R[t >> 0] = 0;\n }, Wa = (e, t) => {\n var n = 0;\n return Fe().forEach((a, s) => {\n var u = t + n;\n M[e + s * 4 >> 2] = u, Ua(a, u), n += a.length + 1;\n }), 0;\n }, ja = (e, t) => {\n var n = Fe();\n M[e >> 2] = n.length;\n var a = 0;\n return n.forEach((s) => a += s.length + 1), M[t >> 2] = a, 0;\n }, La = (e) => e, et = (e) => e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0), Ha = (e, t) => {\n for (var n = 0, a = 0; a <= t; n += e[a++])\n ;\n return n;\n }, ur = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], lr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ba = (e, t) => {\n for (var n = new Date(e.getTime()); t > 0; ) {\n var a = et(n.getFullYear()), s = n.getMonth(), u = (a ? ur : lr)[s];\n if (t > u - n.getDate())\n t -= u - n.getDate() + 1, n.setDate(1), s < 11 ? n.setMonth(s + 1) : (n.setMonth(0), n.setFullYear(n.getFullYear() + 1));\n else\n return n.setDate(n.getDate() + t), n;\n }\n return n;\n };\n function Va(e, t, n) {\n var a = or(e) + 1, s = new Array(a);\n return ar(e, s, 0, s.length), s;\n }\n var qa = (e, t) => {\n R.set(e, t);\n }, Na = (e, t, n, a) => {\n var s = M[a + 40 >> 2], u = {\n tm_sec: D[a >> 2],\n tm_min: D[a + 4 >> 2],\n tm_hour: D[a + 8 >> 2],\n tm_mday: D[a + 12 >> 2],\n tm_mon: D[a + 16 >> 2],\n tm_year: D[a + 20 >> 2],\n tm_wday: D[a + 24 >> 2],\n tm_yday: D[a + 28 >> 2],\n tm_isdst: D[a + 32 >> 2],\n tm_gmtoff: D[a + 36 >> 2],\n tm_zone: s ? Rt(s) : \"\"\n }, d = Rt(n), f = {\n \"%c\": \"%a %b %d %H:%M:%S %Y\",\n \"%D\": \"%m/%d/%y\",\n \"%F\": \"%Y-%m-%d\",\n \"%h\": \"%b\",\n \"%r\": \"%I:%M:%S %p\",\n \"%R\": \"%H:%M\",\n \"%T\": \"%H:%M:%S\",\n \"%x\": \"%m/%d/%y\",\n \"%X\": \"%H:%M:%S\",\n \"%Ec\": \"%c\",\n \"%EC\": \"%C\",\n \"%Ex\": \"%m/%d/%y\",\n \"%EX\": \"%H:%M:%S\",\n \"%Ey\": \"%y\",\n \"%EY\": \"%Y\",\n \"%Od\": \"%d\",\n \"%Oe\": \"%e\",\n \"%OH\": \"%H\",\n \"%OI\": \"%I\",\n \"%Om\": \"%m\",\n \"%OM\": \"%M\",\n \"%OS\": \"%S\",\n \"%Ou\": \"%u\",\n \"%OU\": \"%U\",\n \"%OV\": \"%V\",\n \"%Ow\": \"%w\",\n \"%OW\": \"%W\",\n \"%Oy\": \"%y\"\n };\n for (var m in f)\n d = d.replace(new RegExp(m, \"g\"), f[m]);\n var w = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], _ = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n function T(y, P, N) {\n for (var G = typeof y == \"number\" ? y.toString() : y || \"\"; G.length < P; )\n G = N[0] + G;\n return G;\n }\n function E(y, P) {\n return T(y, P, \"0\");\n }\n function O(y, P) {\n function N(Se) {\n return Se < 0 ? -1 : Se > 0 ? 1 : 0;\n }\n var G;\n return (G = N(y.getFullYear() - P.getFullYear())) === 0 && (G = N(y.getMonth() - P.getMonth())) === 0 && (G = N(y.getDate() - P.getDate())), G;\n }\n function L(y) {\n switch (y.getDay()) {\n case 0:\n return new Date(y.getFullYear() - 1, 11, 29);\n case 1:\n return y;\n case 2:\n return new Date(y.getFullYear(), 0, 3);\n case 3:\n return new Date(y.getFullYear(), 0, 2);\n case 4:\n return new Date(y.getFullYear(), 0, 1);\n case 5:\n return new Date(y.getFullYear() - 1, 11, 31);\n case 6:\n return new Date(y.getFullYear() - 1, 11, 30);\n }\n }\n function q(y) {\n var P = Ba(new Date(y.tm_year + 1900, 0, 1), y.tm_yday), N = new Date(P.getFullYear(), 0, 4), G = new Date(P.getFullYear() + 1, 0, 4), Se = L(N), rt = L(G);\n return O(Se, P) <= 0 ? O(rt, P) <= 0 ? P.getFullYear() + 1 : P.getFullYear() : P.getFullYear() - 1;\n }\n var I = {\n \"%a\": (y) => w[y.tm_wday].substring(0, 3),\n \"%A\": (y) => w[y.tm_wday],\n \"%b\": (y) => _[y.tm_mon].substring(0, 3),\n \"%B\": (y) => _[y.tm_mon],\n \"%C\": (y) => {\n var P = y.tm_year + 1900;\n return E(P / 100 | 0, 2);\n },\n \"%d\": (y) => E(y.tm_mday, 2),\n \"%e\": (y) => T(y.tm_mday, 2, \" \"),\n \"%g\": (y) => q(y).toString().substring(2),\n \"%G\": (y) => q(y),\n \"%H\": (y) => E(y.tm_hour, 2),\n \"%I\": (y) => {\n var P = y.tm_hour;\n return P == 0 ? P = 12 : P > 12 && (P -= 12), E(P, 2);\n },\n \"%j\": (y) => E(y.tm_mday + Ha(et(y.tm_year + 1900) ? ur : lr, y.tm_mon - 1), 3),\n \"%m\": (y) => E(y.tm_mon + 1, 2),\n \"%M\": (y) => E(y.tm_min, 2),\n \"%n\": () => `\n`,\n \"%p\": (y) => y.tm_hour >= 0 && y.tm_hour < 12 ? \"AM\" : \"PM\",\n \"%S\": (y) => E(y.tm_sec, 2),\n \"%t\": () => \"\t\",\n \"%u\": (y) => y.tm_wday || 7,\n \"%U\": (y) => {\n var P = y.tm_yday + 7 - y.tm_wday;\n return E(Math.floor(P / 7), 2);\n },\n \"%V\": (y) => {\n var P = Math.floor((y.tm_yday + 7 - (y.tm_wday + 6) % 7) / 7);\n if ((y.tm_wday + 371 - y.tm_yday - 2) % 7 <= 2 && P++, P) {\n if (P == 53) {\n var N = (y.tm_wday + 371 - y.tm_yday) % 7;\n N != 4 && (N != 3 || !et(y.tm_year)) && (P = 1);\n }\n } else {\n P = 52;\n var G = (y.tm_wday + 7 - y.tm_yday - 1) % 7;\n (G == 4 || G == 5 && et(y.tm_year % 400 - 1)) && P++;\n }\n return E(P, 2);\n },\n \"%w\": (y) => y.tm_wday,\n \"%W\": (y) => {\n var P = y.tm_yday + 7 - (y.tm_wday + 6) % 7;\n return E(Math.floor(P / 7), 2);\n },\n \"%y\": (y) => (y.tm_year + 1900).toString().substring(2),\n \"%Y\": (y) => y.tm_year + 1900,\n \"%z\": (y) => {\n var P = y.tm_gmtoff, N = P >= 0;\n return P = Math.abs(P) / 60, P = P / 60 * 100 + P % 60, (N ? \"+\" : \"-\") + (\"0000\" + P).slice(-4);\n },\n \"%Z\": (y) => y.tm_zone,\n \"%%\": () => \"%\"\n };\n d = d.replace(/%%/g, \"\\0\\0\");\n for (var m in I)\n d.includes(m) && (d = d.replace(new RegExp(m, \"g\"), I[m](u)));\n d = d.replace(/\\0\\0/g, \"%\");\n var J = Va(d);\n return J.length > t ? 0 : (qa(J, e), J.length - 1);\n }, za = (e, t, n, a, s) => Na(e, t, n, a);\n qt = i.InternalError = class extends Error {\n constructor(e) {\n super(e), this.name = \"InternalError\";\n }\n }, gn(), _e = i.BindingError = class extends Error {\n constructor(e) {\n super(e), this.name = \"BindingError\";\n }\n }, Mn(), Tn(), Wn(), er = i.UnboundTypeError = Bn(Error, \"UnboundTypeError\"), Gn(), Jn();\n var Ga = {\n s: sn,\n u: cn,\n b: ln,\n g: dn,\n q: fn,\n J: hn,\n f: pn,\n V: mn,\n d: un,\n da: vn,\n Q: yn,\n _: bn,\n ca: Vn,\n ba: Nn,\n w: zn,\n Y: Qn,\n x: Zn,\n h: Kn,\n L: ta,\n M: ra,\n t: aa,\n o: oa,\n K: ca,\n C: ma,\n A: va,\n ea: ya,\n $: ga,\n R: wa,\n ha: Mt,\n fa: $a,\n Z: Ea,\n N: Oa,\n O: Da,\n aa: Ma,\n B: Aa,\n X: xa,\n W: Ia,\n T: Wa,\n U: ja,\n E: uo,\n D: Za,\n F: co,\n n: lo,\n a: Ya,\n e: eo,\n m: Xa,\n k: ro,\n H: io,\n v: ao,\n G: so,\n z: ho,\n P: mo,\n l: to,\n j: Ka,\n c: Qa,\n p: Ja,\n I: oo,\n r: fo,\n i: no,\n y: po,\n ga: La,\n S: za\n }, z = on(), ce = i._free = (e) => (ce = i._free = z.ka)(e), Ft = i._malloc = (e) => (Ft = i._malloc = z.la)(e), dr = (e) => (dr = z.na)(e), j = (e, t) => (j = z.oa)(e, t), Ue = (e) => (Ue = z.pa)(e), B = () => (B = z.qa)(), V = (e) => (V = z.ra)(e), fr = (e) => (fr = z.sa)(e), hr = (e) => (hr = z.ta)(e), pr = (e, t, n) => (pr = z.ua)(e, t, n), mr = (e) => (mr = z.va)(e);\n i.dynCall_viijii = (e, t, n, a, s, u, d) => (i.dynCall_viijii = z.wa)(e, t, n, a, s, u, d);\n var vr = i.dynCall_jiiii = (e, t, n, a, s) => (vr = i.dynCall_jiiii = z.xa)(e, t, n, a, s);\n i.dynCall_iiiiij = (e, t, n, a, s, u, d) => (i.dynCall_iiiiij = z.ya)(e, t, n, a, s, u, d), i.dynCall_iiiiijj = (e, t, n, a, s, u, d, f, m) => (i.dynCall_iiiiijj = z.za)(e, t, n, a, s, u, d, f, m), i.dynCall_iiiiiijj = (e, t, n, a, s, u, d, f, m, w) => (i.dynCall_iiiiiijj = z.Aa)(e, t, n, a, s, u, d, f, m, w);\n function Ya(e, t) {\n var n = B();\n try {\n return H(e)(t);\n } catch (a) {\n if (V(n), a !== a + 0)\n throw a;\n j(1, 0);\n }\n }\n function Ja(e, t, n, a) {\n var s = B();\n try {\n H(e)(t, n, a);\n } catch (u) {\n if (V(s), u !== u + 0)\n throw u;\n j(1, 0);\n }\n }\n function Qa(e, t, n) {\n var a = B();\n try {\n H(e)(t, n);\n } catch (s) {\n if (V(a), s !== s + 0)\n throw s;\n j(1, 0);\n }\n }\n function Xa(e, t, n, a) {\n var s = B();\n try {\n return H(e)(t, n, a);\n } catch (u) {\n if (V(s), u !== u + 0)\n throw u;\n j(1, 0);\n }\n }\n function Za(e, t, n, a, s) {\n var u = B();\n try {\n return H(e)(t, n, a, s);\n } catch (d) {\n if (V(u), d !== d + 0)\n throw d;\n j(1, 0);\n }\n }\n function Ka(e, t) {\n var n = B();\n try {\n H(e)(t);\n } catch (a) {\n if (V(n), a !== a + 0)\n throw a;\n j(1, 0);\n }\n }\n function eo(e, t, n) {\n var a = B();\n try {\n return H(e)(t, n);\n } catch (s) {\n if (V(a), s !== s + 0)\n throw s;\n j(1, 0);\n }\n }\n function to(e) {\n var t = B();\n try {\n H(e)();\n } catch (n) {\n if (V(t), n !== n + 0)\n throw n;\n j(1, 0);\n }\n }\n function ro(e, t, n, a, s) {\n var u = B();\n try {\n return H(e)(t, n, a, s);\n } catch (d) {\n if (V(u), d !== d + 0)\n throw d;\n j(1, 0);\n }\n }\n function no(e, t, n, a, s, u, d, f, m, w, _) {\n var T = B();\n try {\n H(e)(t, n, a, s, u, d, f, m, w, _);\n } catch (E) {\n if (V(T), E !== E + 0)\n throw E;\n j(1, 0);\n }\n }\n function ao(e, t, n, a, s, u, d) {\n var f = B();\n try {\n return H(e)(t, n, a, s, u, d);\n } catch (m) {\n if (V(f), m !== m + 0)\n throw m;\n j(1, 0);\n }\n }\n function oo(e, t, n, a, s) {\n var u = B();\n try {\n H(e)(t, n, a, s);\n } catch (d) {\n if (V(u), d !== d + 0)\n throw d;\n j(1, 0);\n }\n }\n function io(e, t, n, a, s, u) {\n var d = B();\n try {\n return H(e)(t, n, a, s, u);\n } catch (f) {\n if (V(d), f !== f + 0)\n throw f;\n j(1, 0);\n }\n }\n function so(e, t, n, a, s, u, d, f) {\n var m = B();\n try {\n return H(e)(t, n, a, s, u, d, f);\n } catch (w) {\n if (V(m), w !== w + 0)\n throw w;\n j(1, 0);\n }\n }\n function co(e, t, n, a) {\n var s = B();\n try {\n return H(e)(t, n, a);\n } catch (u) {\n if (V(s), u !== u + 0)\n throw u;\n j(1, 0);\n }\n }\n function uo(e, t, n, a) {\n var s = B();\n try {\n return H(e)(t, n, a);\n } catch (u) {\n if (V(s), u !== u + 0)\n throw u;\n j(1, 0);\n }\n }\n function lo(e) {\n var t = B();\n try {\n return H(e)();\n } catch (n) {\n if (V(t), n !== n + 0)\n throw n;\n j(1, 0);\n }\n }\n function fo(e, t, n, a, s, u, d, f) {\n var m = B();\n try {\n H(e)(t, n, a, s, u, d, f);\n } catch (w) {\n if (V(m), w !== w + 0)\n throw w;\n j(1, 0);\n }\n }\n function ho(e, t, n, a, s, u, d, f, m, w, _, T) {\n var E = B();\n try {\n return H(e)(t, n, a, s, u, d, f, m, w, _, T);\n } catch (O) {\n if (V(E), O !== O + 0)\n throw O;\n j(1, 0);\n }\n }\n function po(e, t, n, a, s, u, d, f, m, w, _, T, E, O, L, q) {\n var I = B();\n try {\n H(e)(t, n, a, s, u, d, f, m, w, _, T, E, O, L, q);\n } catch (J) {\n if (V(I), J !== J + 0)\n throw J;\n j(1, 0);\n }\n }\n function mo(e, t, n, a, s) {\n var u = B();\n try {\n return vr(e, t, n, a, s);\n } catch (d) {\n if (V(u), d !== d + 0)\n throw d;\n j(1, 0);\n }\n }\n var tt;\n ve = function e() {\n tt || yr(), tt || (ve = e);\n };\n function yr() {\n if (te > 0 || (Le(), te > 0))\n return;\n function e() {\n tt || (tt = !0, i.calledRun = !0, !W && (dt(), c(i), i.onRuntimeInitialized && i.onRuntimeInitialized(), ft()));\n }\n i.setStatus ? (i.setStatus(\"Running...\"), setTimeout(function() {\n setTimeout(function() {\n i.setStatus(\"\");\n }, 1), e();\n }, 1)) : e();\n }\n if (i.preInit)\n for (typeof i.preInit == \"function\" && (i.preInit = [i.preInit]); i.preInit.length > 0; )\n i.preInit.pop()();\n return yr(), o.ready;\n };\n})();\nfunction Yo(r) {\n return Bt(\n lt,\n r\n );\n}\nfunction Hi(r) {\n return No(\n lt,\n r\n );\n}\nasync function Jo(r, o) {\n return zo(\n lt,\n r,\n o\n );\n}\nasync function Qo(r, o) {\n return Go(\n lt,\n r,\n o\n );\n}\nvar je;\nclass ct extends EventTarget {\n constructor(o = {}) {\n var i;\n super(), Co(this, je, void 0);\n try {\n const c = (i = o == null ? void 0 : o.formats) == null ? void 0 : i.filter(\n (l) => l !== \"unknown\"\n );\n if ((c == null ? void 0 : c.length) === 0)\n throw new TypeError(\"Hint option provided, but is empty.\");\n c == null || c.forEach((l) => {\n if (!it.has(l))\n throw new TypeError(\n `Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${l}' is not a valid enum value of type BarcodeFormat.`\n );\n }), $o(this, je, c != null ? c : []), Yo().then((l) => {\n this.dispatchEvent(\n new CustomEvent(\"load\", {\n detail: l\n })\n );\n }).catch((l) => {\n this.dispatchEvent(new CustomEvent(\"error\", { detail: l }));\n });\n } catch (c) {\n throw Cr(\n c,\n \"Failed to construct 'BarcodeDetector'\"\n );\n }\n }\n static async getSupportedFormats() {\n return _o.filter((o) => o !== \"unknown\");\n }\n async detect(o) {\n try {\n const i = await Mo(o);\n if (i === null)\n return [];\n let c;\n try {\n jr(i) ? c = await Jo(i, {\n tryHarder: !0,\n formats: br(this, je).map((l) => it.get(l))\n }) : c = await Qo(i, {\n tryHarder: !0,\n formats: br(this, je).map((l) => it.get(l))\n });\n } catch (l) {\n throw console.error(l), new DOMException(\n \"Barcode detection service unavailable.\",\n \"NotSupportedError\"\n );\n }\n return c.map((l) => {\n const {\n topLeft: { x: h, y: v },\n topRight: { x: g, y: b },\n bottomLeft: { x: p, y: C },\n bottomRight: { x: S, y: $ }\n } = l.position, F = Math.min(h, g, p, S), U = Math.min(v, b, C, $), W = Math.max(h, g, p, S), R = Math.max(v, b, C, $);\n return {\n boundingBox: new DOMRectReadOnly(\n F,\n U,\n W - F,\n R - U\n ),\n rawValue: l.text,\n format: So(l.format),\n cornerPoints: [\n {\n x: h,\n y: v\n },\n {\n x: g,\n y: b\n },\n {\n x: S,\n y: $\n },\n {\n x: p,\n y: C\n }\n ]\n };\n });\n } catch (i) {\n throw Cr(\n i,\n \"Failed to execute 'detect' on 'BarcodeDetector'\"\n );\n }\n }\n}\nje = /* @__PURE__ */ new WeakMap();\nconst Vt = (r, o, i = \"error\") => {\n let c, l;\n const h = new Promise(\n (v, g) => {\n c = v, l = g, r.addEventListener(o, c), r.addEventListener(i, l);\n }\n );\n return h.finally(() => {\n r.removeEventListener(o, c), r.removeEventListener(i, l);\n }), h;\n}, Sr = (r) => new Promise((o) => setTimeout(o, r));\nclass Xo extends Error {\n constructor() {\n super(\"can't process cross-origin image\"), this.name = \"DropImageFetchError\";\n }\n}\nclass Vr extends Error {\n constructor() {\n super(\"this browser has no Stream API support\"), this.name = \"StreamApiNotSupportedError\";\n }\n}\nclass Zo extends Error {\n constructor() {\n super(\n \"camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.\"\n ), this.name = \"InsecureContextError\";\n }\n}\nclass Ko extends Error {\n constructor() {\n super(\n \"Loading camera stream timed out after 6 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)\"\n ), this.name = \"StreamLoadTimeoutError\";\n }\n}\nlet qr;\nasync function ei(r) {\n if (window.BarcodeDetector === void 0)\n return console.debug(\"[vue-qrcode-reader] Native BarcodeDetector not supported. Will use polyfill.\"), new ct({ formats: r });\n const o = await window.BarcodeDetector.getSupportedFormats(), i = r.filter((c) => !o.includes(c));\n return i.length > 0 ? (console.debug(`[vue-qrcode-reader] Native BarcodeDetector does not support formats ${JSON.stringify(i)}. Will use polyfill.`), new ct({ formats: r })) : (console.debug(\"[vue-qrcode-reader] Will use native BarcodeDetector.\"), new window.BarcodeDetector({ formats: r }));\n}\nasync function Nr(r) {\n qr = await ei(r);\n}\nconst ti = async (r, {\n detectHandler: o,\n locateHandler: i,\n minDelay: c,\n formats: l\n}) => {\n console.debug(\"[vue-qrcode-reader] start scanning\"), await Nr(l);\n const h = (v) => async (g) => {\n if (r.readyState === 0)\n console.debug(\"[vue-qrcode-reader] stop scanning: video element readyState is 0\");\n else {\n const { lastScanned: b, contentBefore: p, lastScanHadContent: C } = v;\n if (g - b < c)\n window.requestAnimationFrame(h(v));\n else {\n const S = await qr.detect(r), $ = S.some((W) => !p.includes(W.rawValue));\n $ && o(S);\n const F = S.length > 0;\n F && i(S), !F && C && i(S);\n const U = {\n lastScanned: g,\n lastScanHadContent: F,\n // It can happen that a QR code is constantly in view of the camera but\n // maybe a scanned frame is a bit blurry and we detect nothing but in the\n // next frame we detect the code again. We also want to avoid emitting\n // a `detect` event in such a case. So we don't reset `contentBefore`,\n // if we detect nothing, only if we detect something new.\n contentBefore: $ ? S.map((W) => W.rawValue) : p\n };\n window.requestAnimationFrame(h(U));\n }\n }\n };\n h({\n lastScanned: performance.now(),\n contentBefore: [],\n lastScanHadContent: !1\n })(performance.now());\n}, ri = async (r) => {\n if (r.startsWith(\"http\") && r.includes(location.host) === !1)\n throw new Xo();\n const o = document.createElement(\"img\");\n return o.src = r, await Vt(o, \"load\"), o;\n}, zr = async (r, o = [\"qr_code\"]) => await new ct({ formats: o }).detect(r), ni = async (r, o = [\"qr_code\"]) => {\n const i = new ct({ formats: o }), c = await ri(r);\n return await i.detect(c);\n};\nvar Gr = {}, Q = {};\nObject.defineProperty(Q, \"__esModule\", {\n value: !0\n});\nQ.compactObject = Qr;\nQ.deprecated = fi;\nvar ai = Q.detectBrowser = hi;\nQ.disableLog = ui;\nQ.disableWarnings = li;\nQ.extractVersion = st;\nQ.filterStats = pi;\nQ.log = di;\nQ.walkStats = ut;\nQ.wrapPeerConnectionEvent = ci;\nfunction oi(r, o, i) {\n return o = ii(o), o in r ? Object.defineProperty(r, o, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : r[o] = i, r;\n}\nfunction ii(r) {\n var o = si(r, \"string\");\n return pe(o) === \"symbol\" ? o : String(o);\n}\nfunction si(r, o) {\n if (pe(r) !== \"object\" || r === null)\n return r;\n var i = r[Symbol.toPrimitive];\n if (i !== void 0) {\n var c = i.call(r, o || \"default\");\n if (pe(c) !== \"object\")\n return c;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (o === \"string\" ? String : Number)(r);\n}\nfunction pe(r) {\n \"@babel/helpers - typeof\";\n return pe = typeof Symbol == \"function\" && typeof Symbol.iterator == \"symbol\" ? function(o) {\n return typeof o;\n } : function(o) {\n return o && typeof Symbol == \"function\" && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, pe(r);\n}\nvar Yr = !0, Jr = !0;\nfunction st(r, o, i) {\n var c = r.match(o);\n return c && c.length >= i && parseInt(c[i], 10);\n}\nfunction ci(r, o, i) {\n if (r.RTCPeerConnection) {\n var c = r.RTCPeerConnection.prototype, l = c.addEventListener;\n c.addEventListener = function(v, g) {\n if (v !== o)\n return l.apply(this, arguments);\n var b = function(C) {\n var S = i(C);\n S && (g.handleEvent ? g.handleEvent(S) : g(S));\n };\n return this._eventMap = this._eventMap || {}, this._eventMap[o] || (this._eventMap[o] = /* @__PURE__ */ new Map()), this._eventMap[o].set(g, b), l.apply(this, [v, b]);\n };\n var h = c.removeEventListener;\n c.removeEventListener = function(v, g) {\n if (v !== o || !this._eventMap || !this._eventMap[o])\n return h.apply(this, arguments);\n if (!this._eventMap[o].has(g))\n return h.apply(this, arguments);\n var b = this._eventMap[o].get(g);\n return this._eventMap[o].delete(g), this._eventMap[o].size === 0 && delete this._eventMap[o], Object.keys(this._eventMap).length === 0 && delete this._eventMap, h.apply(this, [v, b]);\n }, Object.defineProperty(c, \"on\" + o, {\n get: function() {\n return this[\"_on\" + o];\n },\n set: function(g) {\n this[\"_on\" + o] && (this.removeEventListener(o, this[\"_on\" + o]), delete this[\"_on\" + o]), g && this.addEventListener(o, this[\"_on\" + o] = g);\n },\n enumerable: !0,\n configurable: !0\n });\n }\n}\nfunction ui(r) {\n return typeof r != \"boolean\" ? new Error(\"Argument type: \" + pe(r) + \". Please use a boolean.\") : (Yr = r, r ? \"adapter.js logging disabled\" : \"adapter.js logging enabled\");\n}\nfunction li(r) {\n return typeof r != \"boolean\" ? new Error(\"Argument type: \" + pe(r) + \". Please use a boolean.\") : (Jr = !r, \"adapter.js deprecation warnings \" + (r ? \"disabled\" : \"enabled\"));\n}\nfunction di() {\n if ((typeof window > \"u\" ? \"undefined\" : pe(window)) === \"object\") {\n if (Yr)\n return;\n typeof console < \"u\" && typeof console.log == \"function\" && console.log.apply(console, arguments);\n }\n}\nfunction fi(r, o) {\n Jr && console.warn(r + \" is deprecated, please use \" + o + \" instead.\");\n}\nfunction hi(r) {\n var o = {\n browser: null,\n version: null\n };\n if (typeof r > \"u\" || !r.navigator || !r.navigator.userAgent)\n return o.browser = \"Not a browser.\", o;\n var i = r.navigator;\n if (i.mozGetUserMedia)\n o.browser = \"firefox\", o.version = st(i.userAgent, /Firefox\\/(\\d+)\\./, 1);\n else if (i.webkitGetUserMedia || r.isSecureContext === !1 && r.webkitRTCPeerConnection)\n o.browser = \"chrome\", o.version = st(i.userAgent, /Chrom(e|ium)\\/(\\d+)\\./, 2);\n else if (r.RTCPeerConnection && i.userAgent.match(/AppleWebKit\\/(\\d+)\\./))\n o.browser = \"safari\", o.version = st(i.userAgent, /AppleWebKit\\/(\\d+)\\./, 1), o.supportsUnifiedPlan = r.RTCRtpTransceiver && \"currentDirection\" in r.RTCRtpTransceiver.prototype;\n else\n return o.browser = \"Not a supported browser.\", o;\n return o;\n}\nfunction Pr(r) {\n return Object.prototype.toString.call(r) === \"[object Object]\";\n}\nfunction Qr(r) {\n return Pr(r) ? Object.keys(r).reduce(function(o, i) {\n var c = Pr(r[i]), l = c ? Qr(r[i]) : r[i], h = c && !Object.keys(l).length;\n return l === void 0 || h ? o : Object.assign(o, oi({}, i, l));\n }, {}) : r;\n}\nfunction ut(r, o, i) {\n !o || i.has(o.id) || (i.set(o.id, o), Object.keys(o).forEach(function(c) {\n c.endsWith(\"Id\") ? ut(r, r.get(o[c]), i) : c.endsWith(\"Ids\") && o[c].forEach(function(l) {\n ut(r, r.get(l), i);\n });\n }));\n}\nfunction pi(r, o, i) {\n var c = i ? \"outbound-rtp\" : \"inbound-rtp\", l = /* @__PURE__ */ new Map();\n if (o === null)\n return l;\n var h = [];\n return r.forEach(function(v) {\n v.type === \"track\" && v.trackIdentifier === o.id && h.push(v);\n }), h.forEach(function(v) {\n r.forEach(function(g) {\n g.type === c && g.trackId === v.id && ut(r, g, l);\n });\n }), l;\n}\nObject.defineProperty(Gr, \"__esModule\", {\n value: !0\n});\nvar mi = Gr.shimGetUserMedia = gi, vi = yi(Q);\nfunction Xr(r) {\n if (typeof WeakMap != \"function\")\n return null;\n var o = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap();\n return (Xr = function(l) {\n return l ? i : o;\n })(r);\n}\nfunction yi(r, o) {\n if (r && r.__esModule)\n return r;\n if (r === null || he(r) !== \"object\" && typeof r != \"function\")\n return { default: r };\n var i = Xr(o);\n if (i && i.has(r))\n return i.get(r);\n var c = {}, l = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var h in r)\n if (h !== \"default\" && Object.prototype.hasOwnProperty.call(r, h)) {\n var v = l ? Object.getOwnPropertyDescriptor(r, h) : null;\n v && (v.get || v.set) ? Object.defineProperty(c, h, v) : c[h] = r[h];\n }\n return c.default = r, i && i.set(r, c), c;\n}\nfunction he(r) {\n \"@babel/helpers - typeof\";\n return he = typeof Symbol == \"function\" && typeof Symbol.iterator == \"symbol\" ? function(o) {\n return typeof o;\n } : function(o) {\n return o && typeof Symbol == \"function\" && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, he(r);\n}\nvar Tr = vi.log;\nfunction gi(r, o) {\n var i = r && r.navigator;\n if (i.mediaDevices) {\n var c = function(p) {\n if (he(p) !== \"object\" || p.mandatory || p.optional)\n return p;\n var C = {};\n return Object.keys(p).forEach(function(S) {\n if (!(S === \"require\" || S === \"advanced\" || S === \"mediaSource\")) {\n var $ = he(p[S]) === \"object\" ? p[S] : {\n ideal: p[S]\n };\n $.exact !== void 0 && typeof $.exact == \"number\" && ($.min = $.max = $.exact);\n var F = function(R, A) {\n return R ? R + A.charAt(0).toUpperCase() + A.slice(1) : A === \"deviceId\" ? \"sourceId\" : A;\n };\n if ($.ideal !== void 0) {\n C.optional = C.optional || [];\n var U = {};\n typeof $.ideal == \"number\" ? (U[F(\"min\", S)] = $.ideal, C.optional.push(U), U = {}, U[F(\"max\", S)] = $.ideal, C.optional.push(U)) : (U[F(\"\", S)] = $.ideal, C.optional.push(U));\n }\n $.exact !== void 0 && typeof $.exact != \"number\" ? (C.mandatory = C.mandatory || {}, C.mandatory[F(\"\", S)] = $.exact) : [\"min\", \"max\"].forEach(function(W) {\n $[W] !== void 0 && (C.mandatory = C.mandatory || {}, C.mandatory[F(W, S)] = $[W]);\n });\n }\n }), p.advanced && (C.optional = (C.optional || []).concat(p.advanced)), C;\n }, l = function(p, C) {\n if (o.version >= 61)\n return C(p);\n if (p = JSON.parse(JSON.stringify(p)), p && he(p.audio) === \"object\") {\n var S = function(R, A, X) {\n A in R && !(X in R) && (R[X] = R[A], delete R[A]);\n };\n p = JSON.parse(JSON.stringify(p)), S(p.audio, \"autoGainControl\", \"googAutoGainControl\"), S(p.audio, \"noiseSuppression\", \"googNoiseSuppression\"), p.audio = c(p.audio);\n }\n if (p && he(p.video) === \"object\") {\n var $ = p.video.facingMode;\n $ = $ && (he($) === \"object\" ? $ : {\n ideal: $\n });\n var F = o.version < 66;\n if ($ && ($.exact === \"user\" || $.exact === \"environment\" || $.ideal === \"user\" || $.ideal === \"environment\") && !(i.mediaDevices.getSupportedConstraints && i.mediaDevices.getSupportedConstraints().facingMode && !F)) {\n delete p.video.facingMode;\n var U;\n if ($.exact === \"environment\" || $.ideal === \"environment\" ? U = [\"back\", \"rear\"] : ($.exact === \"user\" || $.ideal === \"user\") && (U = [\"front\"]), U)\n return i.mediaDevices.enumerateDevices().then(function(W) {\n W = W.filter(function(A) {\n return A.kind === \"videoinput\";\n });\n var R = W.find(function(A) {\n return U.some(function(X) {\n return A.label.toLowerCase().includes(X);\n });\n });\n return !R && W.length && U.includes(\"back\") && (R = W[W.length - 1]), R && (p.video.deviceId = $.exact ? {\n exact: R.deviceId\n } : {\n ideal: R.deviceId\n }), p.video = c(p.video), Tr(\"chrome: \" + JSON.stringify(p)), C(p);\n });\n }\n p.video = c(p.video);\n }\n return Tr(\"chrome: \" + JSON.stringify(p)), C(p);\n }, h = function(p) {\n return o.version >= 64 ? p : {\n name: {\n PermissionDeniedError: \"NotAllowedError\",\n PermissionDismissedError: \"NotAllowedError\",\n InvalidStateError: \"NotAllowedError\",\n DevicesNotFoundError: \"NotFoundError\",\n ConstraintNotSatisfiedError: \"OverconstrainedError\",\n TrackStartError: \"NotReadableError\",\n MediaDeviceFailedDueToShutdown: \"NotAllowedError\",\n MediaDeviceKillSwitchOn: \"NotAllowedError\",\n TabCaptureError: \"AbortError\",\n ScreenCaptureError: \"AbortError\",\n DeviceCaptureError: \"AbortError\"\n }[p.name] || p.name,\n message: p.message,\n constraint: p.constraint || p.constraintName,\n toString: function() {\n return this.name + (this.message && \": \") + this.message;\n }\n };\n }, v = function(p, C, S) {\n l(p, function($) {\n i.webkitGetUserMedia($, C, function(F) {\n S && S(h(F));\n });\n });\n };\n if (i.getUserMedia = v.bind(i), i.mediaDevices.getUserMedia) {\n var g = i.mediaDevices.getUserMedia.bind(i.mediaDevices);\n i.mediaDevices.getUserMedia = function(b) {\n return l(b, function(p) {\n return g(p).then(function(C) {\n if (p.audio && !C.getAudioTracks().length || p.video && !C.getVideoTracks().length)\n throw C.getTracks().forEach(function(S) {\n S.stop();\n }), new DOMException(\"\", \"NotFoundError\");\n return C;\n }, function(C) {\n return Promise.reject(h(C));\n });\n });\n };\n }\n }\n}\nvar Zr = {};\nObject.defineProperty(Zr, \"__esModule\", {\n value: !0\n});\nvar wi = Zr.shimGetUserMedia = $i, bi = Ci(Q);\nfunction Kr(r) {\n if (typeof WeakMap != \"function\")\n return null;\n var o = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap();\n return (Kr = function(l) {\n return l ? i : o;\n })(r);\n}\nfunction Ci(r, o) {\n if (r && r.__esModule)\n return r;\n if (r === null || Pe(r) !== \"object\" && typeof r != \"function\")\n return { default: r };\n var i = Kr(o);\n if (i && i.has(r))\n return i.get(r);\n var c = {}, l = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var h in r)\n if (h !== \"default\" && Object.prototype.hasOwnProperty.call(r, h)) {\n var v = l ? Object.getOwnPropertyDescriptor(r, h) : null;\n v && (v.get || v.set) ? Object.defineProperty(c, h, v) : c[h] = r[h];\n }\n return c.default = r, i && i.set(r, c), c;\n}\nfunction Pe(r) {\n \"@babel/helpers - typeof\";\n return Pe = typeof Symbol == \"function\" && typeof Symbol.iterator == \"symbol\" ? function(o) {\n return typeof o;\n } : function(o) {\n return o && typeof Symbol == \"function\" && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, Pe(r);\n}\nfunction $i(r, o) {\n var i = r && r.navigator, c = r && r.MediaStreamTrack;\n if (i.getUserMedia = function(b, p, C) {\n bi.deprecated(\"navigator.getUserMedia\", \"navigator.mediaDevices.getUserMedia\"), i.mediaDevices.getUserMedia(b).then(p, C);\n }, !(o.version > 55 && \"autoGainControl\" in i.mediaDevices.getSupportedConstraints())) {\n var l = function(p, C, S) {\n C in p && !(S in p) && (p[S] = p[C], delete p[C]);\n }, h = i.mediaDevices.getUserMedia.bind(i.mediaDevices);\n if (i.mediaDevices.getUserMedia = function(b) {\n return Pe(b) === \"object\" && Pe(b.audio) === \"object\" && (b = JSON.parse(JSON.stringify(b)), l(b.audio, \"autoGainControl\", \"mozAutoGainControl\"), l(b.audio, \"noiseSuppression\", \"mozNoiseSuppression\")), h(b);\n }, c && c.prototype.getSettings) {\n var v = c.prototype.getSettings;\n c.prototype.getSettings = function() {\n var b = v.apply(this, arguments);\n return l(b, \"mozAutoGainControl\", \"autoGainControl\"), l(b, \"mozNoiseSuppression\", \"noiseSuppression\"), b;\n };\n }\n if (c && c.prototype.applyConstraints) {\n var g = c.prototype.applyConstraints;\n c.prototype.applyConstraints = function(b) {\n return this.kind === \"audio\" && Pe(b) === \"object\" && (b = JSON.parse(JSON.stringify(b)), l(b, \"autoGainControl\", \"mozAutoGainControl\"), l(b, \"noiseSuppression\", \"mozNoiseSuppression\")), g.apply(this, [b]);\n };\n }\n }\n}\nvar ae = {};\nObject.defineProperty(ae, \"__esModule\", {\n value: !0\n});\nae.shimAudioContext = xi;\nae.shimCallbacksAPI = Ei;\nae.shimConstraints = rn;\nae.shimCreateOfferLegacy = Ai;\nvar _i = ae.shimGetUserMedia = Oi;\nae.shimLocalStreamsAPI = Pi;\nae.shimRTCIceServerUrls = Di;\nae.shimRemoteStreamsAPI = Ti;\nae.shimTrackEventTransceiver = Mi;\nvar en = Si(Q);\nfunction tn(r) {\n if (typeof WeakMap != \"function\")\n return null;\n var o = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap();\n return (tn = function(l) {\n return l ? i : o;\n })(r);\n}\nfunction Si(r, o) {\n if (r && r.__esModule)\n return r;\n if (r === null || me(r) !== \"object\" && typeof r != \"function\")\n return { default: r };\n var i = tn(o);\n if (i && i.has(r))\n return i.get(r);\n var c = {}, l = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var h in r)\n if (h !== \"default\" && Object.prototype.hasOwnProperty.call(r, h)) {\n var v = l ? Object.getOwnPropertyDescriptor(r, h) : null;\n v && (v.get || v.set) ? Object.defineProperty(c, h, v) : c[h] = r[h];\n }\n return c.default = r, i && i.set(r, c), c;\n}\nfunction me(r) {\n \"@babel/helpers - typeof\";\n return me = typeof Symbol == \"function\" && typeof Symbol.iterator == \"symbol\" ? function(o) {\n return typeof o;\n } : function(o) {\n return o && typeof Symbol == \"function\" && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, me(r);\n}\nfunction Pi(r) {\n if (!(me(r) !== \"object\" || !r.RTCPeerConnection)) {\n if (\"getLocalStreams\" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.getLocalStreams = function() {\n return this._localStreams || (this._localStreams = []), this._localStreams;\n }), !(\"addStream\" in r.RTCPeerConnection.prototype)) {\n var o = r.RTCPeerConnection.prototype.addTrack;\n r.RTCPeerConnection.prototype.addStream = function(c) {\n var l = this;\n this._localStreams || (this._localStreams = []), this._localStreams.includes(c) || this._localStreams.push(c), c.getAudioTracks().forEach(function(h) {\n return o.call(l, h, c);\n }), c.getVideoTracks().forEach(function(h) {\n return o.call(l, h, c);\n });\n }, r.RTCPeerConnection.prototype.addTrack = function(c) {\n for (var l = this, h = arguments.length, v = new Array(h > 1 ? h - 1 : 0), g = 1; g < h; g++)\n v[g - 1] = arguments[g];\n return v && v.forEach(function(b) {\n l._localStreams ? l._localStreams.includes(b) || l._localStreams.push(b) : l._localStreams = [b];\n }), o.apply(this, arguments);\n };\n }\n \"removeStream\" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.removeStream = function(c) {\n var l = this;\n this._localStreams || (this._localStreams = []);\n var h = this._localStreams.indexOf(c);\n if (h !== -1) {\n this._localStreams.splice(h, 1);\n var v = c.getTracks();\n this.getSenders().forEach(function(g) {\n v.includes(g.track) && l.removeTrack(g);\n });\n }\n });\n }\n}\nfunction Ti(r) {\n if (!(me(r) !== \"object\" || !r.RTCPeerConnection) && (\"getRemoteStreams\" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.getRemoteStreams = function() {\n return this._remoteStreams ? this._remoteStreams : [];\n }), !(\"onaddstream\" in r.RTCPeerConnection.prototype))) {\n Object.defineProperty(r.RTCPeerConnection.prototype, \"onaddstream\", {\n get: function() {\n return this._onaddstream;\n },\n set: function(c) {\n var l = this;\n this._onaddstream && (this.removeEventListener(\"addstream\", this._onaddstream), this.removeEventListener(\"track\", this._onaddstreampoly)), this.addEventListener(\"addstream\", this._onaddstream = c), this.addEventListener(\"track\", this._onaddstreampoly = function(h) {\n h.streams.forEach(function(v) {\n if (l._remoteStreams || (l._remoteStreams = []), !l._remoteStreams.includes(v)) {\n l._remoteStreams.push(v);\n var g = new Event(\"addstream\");\n g.stream = v, l.dispatchEvent(g);\n }\n });\n });\n }\n });\n var o = r.RTCPeerConnection.prototype.setRemoteDescription;\n r.RTCPeerConnection.prototype.setRemoteDescription = function() {\n var c = this;\n return this._onaddstreampoly || this.addEventListener(\"track\", this._onaddstreampoly = function(l) {\n l.streams.forEach(function(h) {\n if (c._remoteStreams || (c._remoteStreams = []), !(c._remoteStreams.indexOf(h) >= 0)) {\n c._remoteStreams.push(h);\n var v = new Event(\"addstream\");\n v.stream = h, c.dispatchEvent(v);\n }\n });\n }), o.apply(c, arguments);\n };\n }\n}\nfunction Ei(r) {\n if (!(me(r) !== \"object\" || !r.RTCPeerConnection)) {\n var o = r.RTCPeerConnection.prototype, i = o.createOffer, c = o.createAnswer, l = o.setLocalDescription, h = o.setRemoteDescription, v = o.addIceCandidate;\n o.createOffer = function(p, C) {\n var S = arguments.length >= 2 ? arguments[2] : arguments[0], $ = i.apply(this, [S]);\n return C ? ($.then(p, C), Promise.resolve()) : $;\n }, o.createAnswer = function(p, C) {\n var S = arguments.length >= 2 ? arguments[2] : arguments[0], $ = c.apply(this, [S]);\n return C ? ($.then(p, C), Promise.resolve()) : $;\n };\n var g = function(p, C, S) {\n var $ = l.apply(this, [p]);\n return S ? ($.then(C, S), Promise.resolve()) : $;\n };\n o.setLocalDescription = g, g = function(p, C, S) {\n var $ = h.apply(this, [p]);\n return S ? ($.then(C, S), Promise.resolve()) : $;\n }, o.setRemoteDescription = g, g = function(p, C, S) {\n var $ = v.apply(this, [p]);\n return S ? ($.then(C, S), Promise.resolve()) : $;\n }, o.addIceCandidate = g;\n }\n}\nfunction Oi(r) {\n var o = r && r.navigator;\n if (o.mediaDevices && o.mediaDevices.getUserMedia) {\n var i = o.mediaDevices, c = i.getUserMedia.bind(i);\n o.mediaDevices.getUserMedia = function(l) {\n return c(rn(l));\n };\n }\n !o.getUserMedia && o.mediaDevices && o.mediaDevices.getUserMedia && (o.getUserMedia = (function(h, v, g) {\n o.mediaDevices.getUserMedia(h).then(v, g);\n }).bind(o));\n}\nfunction rn(r) {\n return r && r.video !== void 0 ? Object.assign({}, r, {\n video: en.compactObject(r.video)\n }) : r;\n}\nfunction Di(r) {\n if (r.RTCPeerConnection) {\n var o = r.RTCPeerConnection;\n r.RTCPeerConnection = function(c, l) {\n if (c && c.iceServers) {\n for (var h = [], v = 0; v < c.iceServers.length; v++) {\n var g = c.iceServers[v];\n g.urls === void 0 && g.url ? (en.deprecated(\"RTCIceServer.url\", \"RTCIceServer.urls\"), g = JSON.parse(JSON.stringify(g)), g.urls = g.url, delete g.url, h.push(g)) : h.push(c.iceServers[v]);\n }\n c.iceServers = h;\n }\n return new o(c, l);\n }, r.RTCPeerConnection.prototype = o.prototype, \"generateCertificate\" in o && Object.defineProperty(r.RTCPeerConnection, \"generateCertificate\", {\n get: function() {\n return o.generateCertificate;\n }\n });\n }\n}\nfunction Mi(r) {\n me(r) === \"object\" && r.RTCTrackEvent && \"receiver\" in r.RTCTrackEvent.prototype && !(\"transceiver\" in r.RTCTrackEvent.prototype) && Object.defineProperty(r.RTCTrackEvent.prototype, \"transceiver\", {\n get: function() {\n return {\n receiver: this.receiver\n };\n }\n });\n}\nfunction Ai(r) {\n var o = r.RTCPeerConnection.prototype.createOffer;\n r.RTCPeerConnection.prototype.createOffer = function(c) {\n if (c) {\n typeof c.offerToReceiveAudio < \"u\" && (c.offerToReceiveAudio = !!c.offerToReceiveAudio);\n var l = this.getTransceivers().find(function(v) {\n return v.receiver.track.kind === \"audio\";\n });\n c.offerToReceiveAudio === !1 && l ? l.direction === \"sendrecv\" ? l.setDirection ? l.setDirection(\"sendonly\") : l.direction = \"sendonly\" : l.direction === \"recvonly\" && (l.setDirection ? l.setDirection(\"inactive\") : l.direction = \"inactive\") : c.offerToReceiveAudio === !0 && !l && this.addTransceiver(\"audio\", {\n direction: \"recvonly\"\n }), typeof c.offerToReceiveVideo < \"u\" && (c.offerToReceiveVideo = !!c.offerToReceiveVideo);\n var h = this.getTransceivers().find(function(v) {\n return v.receiver.track.kind === \"video\";\n });\n c.offerToReceiveVideo === !1 && h ? h.direction === \"sendrecv\" ? h.setDirection ? h.setDirection(\"sendonly\") : h.direction = \"sendonly\" : h.direction === \"recvonly\" && (h.setDirection ? h.setDirection(\"inactive\") : h.direction = \"inactive\") : c.offerToReceiveVideo === !0 && !h && this.addTransceiver(\"video\", {\n direction: \"recvonly\"\n });\n }\n return o.apply(this, arguments);\n };\n}\nfunction xi(r) {\n me(r) !== \"object\" || r.AudioContext || (r.AudioContext = r.webkitAudioContext);\n}\nconst Ri = (r) => {\n let o = !1, i;\n return (...c) => (o || (i = r(c), o = !0), i);\n};\nfunction ue(r, o) {\n if (r === !1)\n throw new Error(o != null ? o : \"assertion failure\");\n}\nfunction Er(r) {\n throw new Error(\"this code should be unreachable\");\n}\nconst ki = Ri(() => {\n const r = ai(window);\n switch (r.browser) {\n case \"chrome\":\n mi(window, r);\n break;\n case \"firefox\":\n wi(window, r);\n break;\n case \"safari\":\n _i(window, r);\n break;\n default:\n throw new Vr();\n }\n});\nlet Te = Promise.resolve({ type: \"stop\", data: {} });\nasync function Or(r, o, i) {\n var g, b, p;\n if (console.debug(\n \"[vue-qrcode-reader] starting camera with constraints: \",\n JSON.stringify(o)\n ), window.isSecureContext !== !0)\n throw new Zo();\n if (((g = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : g.getUserMedia) === void 0)\n throw new Vr();\n ki(), console.debug(\"[vue-qrcode-reader] calling getUserMedia\");\n const c = await navigator.mediaDevices.getUserMedia({\n audio: !1,\n video: o\n });\n r.srcObject !== void 0 ? r.srcObject = c : r.mozSrcObject !== void 0 ? r.mozSrcObject = c : window.URL.createObjectURL ? r.src = window.URL.createObjectURL(c) : window.webkitURL ? r.src = window.webkitURL.createObjectURL(c) : r.src = c.id, r.play(), console.debug(\"[vue-qrcode-reader] waiting for video element to load\"), await Promise.race([\n Vt(r, \"loadeddata\"),\n // On iOS devices in PWA mode, QrcodeStream works initially, but after\n // killing and restarting the PWA, all video elements fail to load camera\n // streams and never emit the `loadeddata` event. Looks like this is\n // related to a WebKit issue (see #298). No workarounds at the moment.\n // To at least detect this situation, we throw an error if the event\n // has not been emitted after a 6 second timeout.\n Sr(6e3).then(() => {\n throw new Ko();\n })\n ]), console.debug(\"[vue-qrcode-reader] video element loaded\"), await Sr(500);\n const [l] = c.getVideoTracks(), h = (p = (b = l == null ? void 0 : l.getCapabilities) == null ? void 0 : b.call(l)) != null ? p : {};\n let v = !1;\n return i && h.torch && (await l.applyConstraints({ advanced: [{ torch: !0 }] }), v = !0), console.debug(\"[vue-qrcode-reader] camera ready\"), {\n type: \"start\",\n data: {\n videoEl: r,\n stream: c,\n capabilities: h,\n constraints: o,\n isTorchOn: v\n }\n };\n}\nasync function Ii(r, {\n constraints: o,\n torch: i,\n restart: c = !1\n}) {\n Te = Te.then((h) => {\n if (h.type === \"start\") {\n const {\n data: {\n videoEl: v,\n stream: g,\n constraints: b,\n isTorchOn: p\n }\n } = h;\n return !c && r === v && o === b && i === p ? h : nn(v, g, p).then(\n () => Or(r, o, i)\n );\n } else if (h.type === \"stop\" || h.type === \"failed\")\n return Or(r, o, i);\n Er();\n }).catch((h) => (console.debug(`[vue-qrcode-reader] starting camera failed with \"${h}\"`), { type: \"failed\", error: h }));\n const l = await Te;\n if (l.type === \"stop\")\n throw new Error(\"Something went wrong with the camera task queue (start task).\");\n if (l.type === \"failed\")\n throw l.error;\n if (l.type === \"start\")\n return l.data.capabilities;\n Er();\n}\nasync function nn(r, o, i) {\n console.debug(\"[vue-qrcode-reader] stopping camera\"), r.src = \"\", r.srcObject = null, r.load(), await Vt(r, \"error\");\n for (const c of o.getTracks())\n i != null || await c.applyConstraints({ advanced: [{ torch: !1 }] }), o.removeTrack(c), c.stop();\n return {\n type: \"stop\",\n data: {}\n };\n}\nasync function ot() {\n if (Te = Te.then((o) => {\n if (o.type === \"stop\" || o.type === \"failed\")\n return o;\n const {\n data: { videoEl: i, stream: c, isTorchOn: l }\n } = o;\n return nn(i, c, l);\n }), (await Te).type === \"start\")\n throw new Error(\"Something went wrong with the camera task queue (stop task).\");\n}\nconst Fi = /* @__PURE__ */ jt({\n __name: \"QrcodeStream\",\n props: {\n // in this file: don't use `props.constraints` directly. Use `constraintsCached`.\n constraints: {\n type: Object,\n default() {\n return { facingMode: \"environment\" };\n }\n },\n // in this file: don't use `props.formats` directly. Use `formatsCached`.\n formats: {\n type: Array,\n default: () => [\"qr_code\"]\n },\n paused: {\n type: Boolean,\n default: !1\n },\n torch: {\n type: Boolean,\n default: !1\n },\n track: {\n type: Function\n }\n },\n emits: [\"detect\", \"camera-on\", \"camera-off\", \"error\"],\n setup(r, { emit: o }) {\n const i = r, c = o, l = we(i.constraints), h = we(i.formats);\n We(\n () => i.constraints,\n (k, D) => {\n JSON.stringify(k) !== JSON.stringify(D) && (l.value = k);\n },\n { deep: !0 }\n ), We(\n () => i.formats,\n (k, D) => {\n JSON.stringify(k) !== JSON.stringify(D) && (h.value = k);\n },\n { deep: !0 }\n );\n const v = we(), g = we(), b = we(), p = we(!1), C = we(!1);\n vo(() => {\n C.value = !0;\n }), yo(() => {\n ot();\n });\n const S = Ut(() => ({\n torch: i.torch,\n constraints: l.value,\n shouldStream: C.value && !i.paused\n }));\n We(\n S,\n async (k) => {\n const D = b.value;\n ue(\n D !== void 0,\n \"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.\"\n );\n const M = v.value;\n ue(\n M !== void 0,\n \"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.\"\n );\n const le = M.getContext(\"2d\");\n if (ue(le !== null, \"if cavnas is defined, canvas 2d context should also be non-null\"), k.shouldStream) {\n ot(), p.value = !1;\n try {\n const oe = await Ii(D, k);\n C.value ? (p.value = !0, c(\"camera-on\", oe)) : await ot();\n } catch (oe) {\n c(\"error\", oe);\n }\n } else\n M.width = D.videoWidth, M.height = D.videoHeight, le.drawImage(D, 0, 0, D.videoWidth, D.videoHeight), ot(), p.value = !1, c(\"camera-off\");\n },\n { deep: !0 }\n ), We(h, async (k) => {\n C.value && await Nr(k);\n });\n const $ = Ut(() => S.value.shouldStream && p.value);\n We($, (k) => {\n if (k) {\n ue(\n v.value !== void 0,\n \"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined\"\n ), F(v.value), ue(\n g.value !== void 0,\n \"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined\"\n ), F(g.value);\n const D = () => i.track === void 0 ? 500 : 40;\n ue(\n b.value !== void 0,\n \"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined\"\n ), ti(b.value, {\n detectHandler: (M) => c(\"detect\", M),\n formats: h.value,\n locateHandler: U,\n minDelay: D()\n });\n }\n });\n const F = (k) => {\n const D = k.getContext(\"2d\");\n ue(D !== null, \"canvas 2d context should always be non-null\"), D.clearRect(0, 0, k.width, k.height);\n }, U = (k) => {\n const D = g.value;\n ue(\n D !== void 0,\n \"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.\"\n );\n const M = b.value;\n if (ue(\n M !== void 0,\n \"onLocate handler should only be called when component is mounted. Thus video element is always defined.\"\n ), k.length === 0 || i.track === void 0)\n F(D);\n else {\n const le = M.offsetWidth, oe = M.offsetHeight, be = M.videoWidth, Ce = M.videoHeight, Oe = Math.max(le / be, oe / Ce), De = be * Oe, Le = Ce * Oe, dt = De / be, ft = Le / Ce, ht = (le - De) / 2, pt = (oe - Le) / 2, Me = ({ x: de, y: Z }) => ({\n x: Math.floor(de * dt),\n y: Math.floor(Z * ft)\n }), te = ({ x: de, y: Z }) => ({\n x: Math.floor(de + ht),\n y: Math.floor(Z + pt)\n }), ve = k.map((de) => {\n const { boundingBox: Z, cornerPoints: vt } = de, { x: He, y: fe } = te(\n Me({\n x: Z.x,\n y: Z.y\n })\n ), { x: Be, y: yt } = Me({\n x: Z.width,\n y: Z.height\n });\n return {\n ...de,\n cornerPoints: vt.map((Ve) => te(Me(Ve))),\n boundingBox: DOMRectReadOnly.fromRect({ x: He, y: fe, width: Be, height: yt })\n };\n });\n D.width = M.offsetWidth, D.height = M.offsetHeight;\n const mt = D.getContext(\"2d\");\n i.track(ve, mt);\n }\n }, W = {\n width: \"100%\",\n height: \"100%\",\n position: \"relative\",\n // notice that we use z-index only once for the wrapper div.\n // If z-index is not defined, elements are stacked in the order they appear in the DOM.\n // The first element is at the very bottom and subsequent elements are added on top.\n \"z-index\": \"0\"\n }, R = {\n width: \"100%\",\n height: \"100%\",\n position: \"absolute\",\n top: \"0\",\n left: \"0\"\n }, A = {\n width: \"100%\",\n height: \"100%\",\n \"object-fit\": \"cover\"\n }, X = Ut(() => $.value ? A : {\n ...A,\n visibility: \"hidden\",\n position: \"absolute\"\n });\n return (k, D) => (Lt(), Ht(\"div\", { style: W }, [\n nt(\"video\", {\n ref_key: \"videoRef\",\n ref: b,\n style: go(X.value),\n autoplay: \"\",\n muted: \"\",\n playsinline: \"\"\n }, null, 4),\n wo(nt(\"canvas\", {\n id: \"qrcode-stream-pause-frame\",\n ref_key: \"pauseFrameRef\",\n ref: v,\n style: A\n }, null, 512), [\n [bo, !$.value]\n ]),\n nt(\"canvas\", {\n id: \"qrcode-stream-tracking-layer\",\n ref_key: \"trackingLayerRef\",\n ref: g,\n style: R\n }, null, 512),\n nt(\"div\", { style: R }, [\n Dr(k.$slots, \"default\")\n ])\n ]));\n }\n}), Ui = /* @__PURE__ */ jt({\n __name: \"QrcodeCapture\",\n props: {\n formats: {\n type: Array,\n default: () => [\"qr_code\"]\n }\n },\n emits: [\"detect\"],\n setup(r, { emit: o }) {\n const i = r, c = o, l = (h) => {\n if (!(!(h.target instanceof HTMLInputElement) || !h.target.files))\n for (const v of Array.from(h.target.files))\n zr(v, i.formats).then((g) => {\n c(\"detect\", g);\n });\n };\n return (h, v) => (Lt(), Ht(\"input\", {\n onChange: l,\n type: \"file\",\n name: \"image\",\n accept: \"image/*\",\n capture: \"environment\",\n multiple: \"\"\n }, null, 32));\n }\n}), Wi = /* @__PURE__ */ jt({\n __name: \"QrcodeDropZone\",\n props: {\n formats: {\n type: Array,\n default: () => [\"qr_code\"]\n }\n },\n emits: [\"detect\", \"dragover\", \"error\"],\n setup(r, { emit: o }) {\n const i = r, c = o, l = async (g) => {\n try {\n const b = await g;\n c(\"detect\", b);\n } catch (b) {\n c(\"error\", b);\n }\n }, h = (g) => {\n c(\"dragover\", g);\n }, v = ({ dataTransfer: g }) => {\n if (!g)\n return;\n h(!1);\n const b = [...Array.from(g.files)], p = g.getData(\"text/uri-list\");\n b.forEach((C) => {\n l(zr(C, i.formats));\n }), p !== \"\" && l(ni(p, i.formats));\n };\n return (g, b) => (Lt(), Ht(\"div\", {\n onDrop: at(v, [\"prevent\", \"stop\"]),\n onDragenter: b[0] || (b[0] = at((p) => h(!0), [\"prevent\", \"stop\"])),\n onDragleave: b[1] || (b[1] = at((p) => h(!1), [\"prevent\", \"stop\"])),\n onDragover: b[2] || (b[2] = at(() => {\n }, [\"prevent\", \"stop\"]))\n }, [\n Dr(g.$slots, \"default\")\n ], 32));\n }\n});\nfunction ji(r) {\n r.component(\"qrcode-stream\", Fi), r.component(\"qrcode-capture\", Ui), r.component(\"qrcode-drop-zone\", Wi);\n}\nconst Bi = { install: ji };\nexport {\n Ui as QrcodeCapture,\n Wi as QrcodeDropZone,\n Fi as QrcodeStream,\n Bi as VueQrcodeReader,\n ji as install,\n Hi as setZXingModuleOverrides\n};\n","\n\n"],"names":["Mr","o","i","br","Co","$o","Ar","_o","it","So","Po","xr","Rr","kr","Fr","Wr","Ir","Ur","jr","To","Eo","Lr","Ao","xo","Ro","Io","Oo","Do","Mo","ko","Cr","$r","Fo","Uo","_r","l","h","Wo","jo","Lo","Ho","Bo","Vo","Ee","Hr","Br","qo","Wt","Bt","zo","g","b","p","C","Go","S","$","lt","F","Z","U","W","R","A","X","k","D","le","oe","be","Ce","Oe","De","Le","ht","gt","dt","ft","Me","pt","te","ve","mt","de","vt","He","fe","Be","yt","Ve","a","an","d","on","Ga","z","Kt","qe","Ne","sn","wt","ie","cn","j","un","bt","Ue","ln","dn","fn","hn","pn","mn","ze","Ct","$e","ye","Ge","qt","Ye","ge","f","w","re","vn","_","T","E","O","L","q","I","J","P","ne","yn","gn","Nt","Y","_e","x","wn","bn","Cn","_t","St","zt","$n","Gt","Yt","Jt","_n","Re","Sn","Ae","Pt","xe","Pn","Tn","En","On","Je","ke","Dn","Mn","Qe","Ie","Tt","An","xn","Rn","kn","Et","In","xt","Fn","se","Un","Wn","Xe","Zt","jn","Ze","H","Ln","Hn","ee","Bn","ce","Ke","Vn","N","G","Se","rt","Ot","qn","Dt","Nn","zn","Gn","K","Mt","Yn","Jn","Qn","Xn","Zn","At","Kn","ea","ta","ra","na","aa","oa","ia","sa","ca","Ft","ua","la","da","fa","ha","pa","ma","va","ya","ga","kt","wa","ba","Ca","$a","_a","Sa","Pa","Ta","Ea","Oa","Da","Ma","Aa","xa","Ra","ka","Ia","Fa","Fe","Ua","Wa","ja","La","et","Ha","Ba","Va","qa","Na","za","uo","Za","co","lo","Ya","eo","Xa","ro","io","ao","so","ho","mo","to","Ka","Qa","Ja","oo","fo","no","po","B","V","tt","Yo","Jo","Qo","je","ct","Vt","Sr","Vr","Zo","Ko","qr","ei","Nr","ti","Gr","Q","Qr","fi","ai","hi","ui","li","st","pi","di","ut","ci","oi","ii","si","pe","Yr","Jr","Pr","mi","gi","vi","yi","Xr","he","Tr","Zr","wi","$i","bi","Ci","Kr","Pe","ae","xi","Ei","rn","Ai","_i","Oi","Pi","Di","Ti","Mi","en","Si","tn","me","c","v","Ri","ue","Er","ki","Te","Or","Ii","nn","ot","Fi","jt","we","We","vo","yo","Ut","Lt","Ht","nt","go","wo","bo","Dr","router","useRouter","bus","useBusStore","notify","useNotifyStore","cameraIsOn","ref","selectedCamera","cameras","errorPhrase","form","reactive","Form","showQrContent","onMounted","devices","kind","err","onError","error","onDetect","detectedCodes","firstCode","trans","cameraOn","event","cameraOff","exitStream","paintOutline","ctx","detectedCode","firstPoint","otherPoints","y","reloadLocation"],"mappings":"2hBACA,IAAIA,GAAK,CAAC,EAAGC,EAAGC,IAAM,CACpB,GAAI,CAACD,EAAE,IAAI,CAAC,EACV,MAAM,UAAU,UAAYC,CAAC,CACjC,EAAGC,GAAK,CAAC,EAAGF,EAAGC,KAAOF,GAAG,EAAGC,EAAG,yBAAyB,EAAGC,EAAIA,EAAE,KAAK,CAAC,EAAID,EAAE,IAAI,CAAC,GAAIG,GAAK,CAAC,EAAGH,EAAGC,I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,EAC3B,CAKI,SAASsB,GAAa,CAElB5B,EAAO,GAAG,EAAE,CACpB,CAKI,MAAM6B,EAAe,CAACP,EAAeQ,IAAQ,CACzC,UAAWC,KAAgBT,EAAe,CACtC,KAAM,CAACU,EAAY,GAAGC,CAAW,EAAIF,EAAa,aAElDD,EAAI,YAAc,MAElBA,EAAI,UAAS,EACbA,EAAI,OAAOE,EAAW,EAAGA,EAAW,CAAC,EACrC,SAAW,CAAE,EAAAzQ,EAAG,EAAA2Q,EAAC,IAAMD,EACvBH,EAAI,OAAOvQ,EAAG2Q,EAAC,EAEfJ,EAAI,OAAOE,EAAW,EAAGA,EAAW,CAAC,EACrCF,EAAI,UAAS,EACbA,EAAI,OAAM,CACtB,CACA,EAEI,SAASK,GAAiB,CACtB,SAAS,OAAM,CACvB","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/public/build/assets/CopyButton-B9az3SKR.js b/public/build/assets/CopyButton-B9az3SKR.js new file mode 100644 index 00000000..bb5eae87 --- /dev/null +++ b/public/build/assets/CopyButton-B9az3SKR.js @@ -0,0 +1,2 @@ +import{a as p,S as r,l,m,d as u,j as _,G as d,H as b}from"./app-CzxRjCVM.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const y=["aria-label","title"],C={__name:"CopyButton",props:{token:String},setup(e){const s=p(),{copy:n}=r({legacy:!0}),c=e;function a(){n(c.token),s.success({text:b("commons.copied_to_clipboard")})}return(o,t)=>{const i=l("FontAwesomeIcon");return m(),u("button",{type:"button","aria-label":o.$t("commons.copy_to_clipboard"),title:o.$t("commons.copy_to_clipboard"),class:"button is-like-text is-pulled-right is-small is-text",onClick:t[0]||(t[0]=d(f=>a(),["stop"]))},[_(i,{icon:["fas","copy"]})],8,y)}}};export{C as _}; +//# sourceMappingURL=CopyButton-B9az3SKR.js.map diff --git a/public/build/assets/CopyButton-B9az3SKR.js.map b/public/build/assets/CopyButton-B9az3SKR.js.map new file mode 100644 index 00000000..b47b6b00 --- /dev/null +++ b/public/build/assets/CopyButton-B9az3SKR.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CopyButton-B9az3SKR.js","sources":["../../../resources/js/components/CopyButton.vue"],"sourcesContent":["\n\n"],"names":["notify","useNotifyStore","copy","useClipboard","props","__props","copyToClipboard","trans"],"mappings":"yPAGI,MAAMA,EAASC,EAAc,EACvB,CAAE,KAAAC,CAAM,EAAGC,EAAa,CAAE,OAAQ,EAAM,CAAA,EAExCC,EAAQC,EAId,SAASC,GAAkB,CACvBJ,EAAKE,EAAM,KAAK,EAChBJ,EAAO,QAAQ,CAAE,KAAMO,EAAM,6BAA6B,CAAG,CAAA,CACrE"} \ No newline at end of file diff --git a/public/build/assets/CopyButton-C1eOxUvy.js b/public/build/assets/CopyButton-C1eOxUvy.js deleted file mode 100644 index a6b23526..00000000 --- a/public/build/assets/CopyButton-C1eOxUvy.js +++ /dev/null @@ -1 +0,0 @@ -import{b as r,T as p,e as l,f as m,g as _,m as u,C as b,H as d}from"./app-CuhK3jij.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const y=["aria-label","title"],C={__name:"CopyButton",props:{token:String},setup(e){const s=r(),{copy:n}=p({legacy:!0}),c=e;function a(){n(c.token),s.success({text:d("commons.copied_to_clipboard")})}return(o,t)=>{const i=l("FontAwesomeIcon");return m(),_("button",{"aria-label":o.$t("commons.copy_to_clipboard"),title:o.$t("commons.copy_to_clipboard"),class:"button is-like-text is-pulled-right is-small is-text",onClick:t[0]||(t[0]=b(f=>a(),["stop"]))},[u(i,{icon:["fas","copy"]})],8,y)}}};export{C as _}; diff --git a/public/build/assets/Create-BIFngwFl.js b/public/build/assets/Create-BIFngwFl.js new file mode 100644 index 00000000..636dd64a --- /dev/null +++ b/public/build/assets/Create-BIFngwFl.js @@ -0,0 +1,2 @@ +import{a as _,c as F,d as V,j as r,k as b,l as n,m as y,e as x,f as o,G as B,p as g,H as C}from"./app-CzxRjCVM.js";import{F as E}from"./Form-EFIuWKGI.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const k={__name:"Create",setup(N){const m=_(),l=g(),e=F(new E({name:"",email:"",password:"",password_confirmation:"",is_admin:!1}));async function i(d){e.password_confirmation=e.password,e.post("/api/v1/users").then(a=>{const t=a.data;m.success({text:C("admin.user_created")}),l.push({name:"admin.manageUser",params:{userId:t.info.id}})})}return(d,a)=>{const t=n("FormField"),u=n("FormPasswordField"),p=n("FormCheckbox"),f=n("FormButtons"),c=n("FormWrapper"),w=n("VueFooter");return y(),V("div",null,[r(c,{title:"admin.new_user"},{default:b(()=>[x("form",{onSubmit:B(i,["prevent"]),onKeydown:a[4]||(a[4]=s=>o(e).onKeydown(s))},[r(t,{modelValue:o(e).name,"onUpdate:modelValue":a[0]||(a[0]=s=>o(e).name=s),fieldName:"name",fieldError:o(e).errors.get("name"),inputType:"text",label:"auth.forms.name",autocomplete:"username",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),r(t,{modelValue:o(e).email,"onUpdate:modelValue":a[1]||(a[1]=s=>o(e).email=s),fieldName:"email",fieldError:o(e).errors.get("email"),inputType:"email",label:"auth.forms.email",autocomplete:"email",maxLength:255},null,8,["modelValue","fieldError"]),r(u,{modelValue:o(e).password,"onUpdate:modelValue":a[2]||(a[2]=s=>o(e).password=s),fieldName:"password",fieldError:o(e).errors.get("password"),showRules:!0,label:"auth.forms.password",autocomplete:"new-password"},null,8,["modelValue","fieldError"]),r(p,{modelValue:o(e).is_admin,"onUpdate:modelValue":a[3]||(a[3]=s=>o(e).is_admin=s),fieldName:"is_admin",label:"admin.forms.is_admin.label",help:"admin.forms.is_admin.help"},null,8,["modelValue"]),r(f,{isBusy:o(e).isBusy,isDisabled:o(e).isDisabled,showCancelButton:!0,cancelLandingView:"admin.users",caption:"commons.create",submitId:"btnCreateUser"},null,8,["isBusy","isDisabled"])],32)]),_:1}),r(w)])}}};export{k as default}; +//# sourceMappingURL=Create-BIFngwFl.js.map diff --git a/public/build/assets/Create-BIFngwFl.js.map b/public/build/assets/Create-BIFngwFl.js.map new file mode 100644 index 00000000..da3c83a5 --- /dev/null +++ b/public/build/assets/Create-BIFngwFl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Create-BIFngwFl.js","sources":["../../../resources/js/views/admin/users/Create.vue"],"sourcesContent":["\n\n\n"],"names":["notify","useNotifyStore","router","useRouter","registerForm","reactive","Form","createUser","e","response","user","trans"],"mappings":"oRAII,MAAMA,EAASC,EAAc,EACvBC,EAASC,EAAS,EAElBC,EAAeC,EAAS,IAAIC,EAAK,CACnC,KAAO,GACP,MAAQ,GACR,SAAW,GACX,sBAAwB,GACxB,SAAW,EACnB,CAAK,CAAC,EAKF,eAAeC,EAAWC,EAAG,CACzBJ,EAAa,sBAAwBA,EAAa,SAElDA,EAAa,KAAK,eAAe,EAAE,KAAKK,GAAY,CAChD,MAAMC,EAAOD,EAAS,KACtBT,EAAO,QAAQ,CAAE,KAAMW,EAAM,oBAAoB,CAAG,CAAA,EACpDT,EAAO,KAAK,CAAE,KAAM,mBAAoB,OAAQ,CAAE,OAAQQ,EAAK,KAAK,GAAM,CAAA,CAC7E,CAAA,CACT"} \ No newline at end of file diff --git a/public/build/assets/Create-CLPvbaW4.js b/public/build/assets/Create-CLPvbaW4.js deleted file mode 100644 index 4e149abc..00000000 --- a/public/build/assets/Create-CLPvbaW4.js +++ /dev/null @@ -1 +0,0 @@ -import{b as _,u as F,d as V,e as n,f as b,g,m as r,p as y,h as x,i as o,C as B,H as C}from"./app-CuhK3jij.js";import{F as h}from"./Form-o2lWAB-o.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const v={__name:"Create",setup(E){const m=_(),l=F(),e=V(new h({name:"",email:"",password:"",password_confirmation:"",is_admin:!1}));async function i(d){e.password_confirmation=e.password,e.post("/api/v1/users").then(a=>{const t=a.data;m.success({text:C("admin.user_created")}),l.push({name:"admin.manageUser",params:{userId:t.info.id}})})}return(d,a)=>{const t=n("FormField"),u=n("FormPasswordField"),p=n("FormCheckbox"),f=n("FormButtons"),c=n("FormWrapper"),w=n("VueFooter");return b(),g("div",null,[r(c,{title:"admin.new_user"},{default:y(()=>[x("form",{onSubmit:B(i,["prevent"]),onKeydown:a[4]||(a[4]=s=>o(e).onKeydown(s))},[r(t,{modelValue:o(e).name,"onUpdate:modelValue":a[0]||(a[0]=s=>o(e).name=s),fieldName:"name",fieldError:o(e).errors.get("name"),inputType:"text",label:"auth.forms.name",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),r(t,{modelValue:o(e).email,"onUpdate:modelValue":a[1]||(a[1]=s=>o(e).email=s),fieldName:"email",fieldError:o(e).errors.get("email"),inputType:"email",label:"auth.forms.email",maxLength:255},null,8,["modelValue","fieldError"]),r(u,{modelValue:o(e).password,"onUpdate:modelValue":a[2]||(a[2]=s=>o(e).password=s),fieldName:"password",fieldError:o(e).errors.get("password"),showRules:!0,label:"auth.forms.password",autocomplete:"new-password"},null,8,["modelValue","fieldError"]),r(p,{modelValue:o(e).is_admin,"onUpdate:modelValue":a[3]||(a[3]=s=>o(e).is_admin=s),fieldName:"is_admin",label:"admin.forms.is_admin.label",help:"admin.forms.is_admin.help"},null,8,["modelValue"]),r(f,{isBusy:o(e).isBusy,isDisabled:o(e).isDisabled,showCancelButton:!0,cancelLandingView:"admin.users",caption:"commons.create",submitId:"btnCreateUser"},null,8,["isBusy","isDisabled","cancelLandingView"])],32)]),_:1}),r(w)])}}};export{v as default}; diff --git a/public/build/assets/CreateUpdate-BlUdhaWn.js b/public/build/assets/CreateUpdate-BlUdhaWn.js deleted file mode 100644 index bc98e74f..00000000 --- a/public/build/assets/CreateUpdate-BlUdhaWn.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as Ne,r as d,e as h,f as a,g as u,h as s,i as e,n as E,W as G,k as b,p as y,C as O,m as r,U as R,l as c,F as ce,L as qe,u as De,$ as Pe,a as He,c as Ke,b as Qe,d as se,x as Ve,o as Ge,J as T,Q as ne,s as Q,D as ae,E as $e,V as Re,H as M,t as k,j as Ee,w as Fe}from"./app-CuhK3jij.js";import{F as re}from"./Form-o2lWAB-o.js";import{_ as ie}from"./OtpDisplay-D1Cg2JBE.js";import{_ as je}from"./QrContentDisplay-CyBGNU2O.js";import{u as ze}from"./bus-BalNs30H.js";import"./Spinner-WULdfd4I.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const We=["for","innerHTML"],Je=["disabled","id","type","value","placeholder","maxlength"],Xe={key:0,class:"control"},Ye=["title"],Ze={class:"icon"},eo={key:1,class:"control"},oo=["title"],to={class:"icon has-text-danger"},lo=["innerHTML"],Ie=Object.assign({inheritAttrs:!1},{__name:"FormLockField",props:{modelValue:String,modelModifiers:{default:()=>({})},isEditMode:{type:Boolean,default:!1},label:{type:String,default:""},fieldName:{type:String,default:"",required:!0},fieldError:[String],inputType:{type:String,default:"text"},placeholder:{type:String,default:""},help:{type:String,default:""},hasOffset:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!0},maxLength:{type:Number,default:null}},emits:["input:modelValue"],setup(p,{emit:j}){const g=p,{inputId:q}=Ne(g.inputType,g.fieldName),m=d(g.isDisabled||g.isEditMode),F=d(!1),x=d(0),w=j;function o(f){let v=f.target.value;g.modelModifiers.trimAll&&(v=v.replace(/\s+/g,"")),w("update:modelValue",v)}function S(f){let v=f.target.value;F.value=v.includes(" "),w("update:modelValue",v)}function $(f){F.value=f.target.value.includes(" "),x.value+=1}return(f,v)=>{const D=h("FontAwesomeIcon"),P=h("FieldError");return a(),u(ce,null,[s("label",{for:e(q),class:"label",innerHTML:f.$t(p.label)},null,8,We),s("div",{class:E(["field has-addons mb-0",{"pt-3":p.hasOffset}])},[s("div",{class:E(["control",{"is-expanded":p.isExpanded}])},[(a(),u("input",G({key:e(x),disabled:e(m),id:e(q),type:p.inputType,class:"input",value:p.modelValue,placeholder:p.placeholder},f.$attrs,{onInput:S,onChange:o,onBlur:$,maxlength:p.maxLength}),null,16,Je))],2),p.isEditMode?(a(),b(e(R),{key:0},{default:y(({mode:V})=>[e(m)?(a(),u("div",Xe,[s("button",{type:"button",class:E(["button field-lock",{"is-dark":V=="dark"}]),onClick:v[0]||(v[0]=O(i=>m.value=!1,["stop"])),title:f.$t("twofaccounts.forms.unlock.title")},[s("span",Ze,[r(D,{icon:["fas","lock"]})])],10,Ye)])):(a(),u("div",eo,[s("button",{type:"button",class:E(["button field-unlock",{"is-dark":V=="dark"}]),onClick:v[1]||(v[1]=O(i=>m.value=!0,["stop"])),title:f.$t("twofaccounts.forms.lock.title")},[s("span",to,[r(D,{icon:["fas","lock-open"]})])],10,oo)]))]),_:1})):c("",!0)],2),e(F)?(a(),b(P,{key:0,error:f.$t("twofaccounts.forms.spaces_are_ignored"),field:"spaces",alertType:"is-warning"},null,8,["error"])):c("",!0),p.fieldError!=null?(a(),b(P,{key:1,error:p.fieldError,field:p.fieldName},null,8,["error","field"])):c("",!0),p.help?(a(),u("p",{key:2,class:"help",innerHTML:f.$t(p.help)},null,8,lo)):c("",!0)],64)}}}),so={class:"container preview has-text-centered"},no={class:"columns is-mobile"},ao={class:"column"},ro={key:1,class:"add-icon-button"},io={class:"columns is-mobile",role:"alert"},co={key:0,class:"column"},uo={class:"columns is-mobile"},fo={class:"column quickform-footer"},po={class:"field is-grouped is-grouped-centered"},mo={class:"control"},vo={key:0,class:"field is-grouped"},ho={class:"control"},go=["title"],_o={class:"file-cta"},yo={class:"file-icon"},wo={class:"file-label"},bo={class:"label"},ko={class:"field is-grouped"},Vo={key:0,class:"control"},$o={class:"icon is-small"},Eo={class:"control is-flex"},Fo={class:"file-cta"},Io={class:"file-icon"},Co={class:"file-label"},To=["src","alt"],Mo=["aria-label"],xo={class:"field"},So=["innerHTML"],Lo={key:3},Ao={key:0},Oo={class:"title is-4 mt-5 mb-2"},Uo={class:"help mb-4"},Bo={class:"control"},No={key:0,class:"control"},Go={__name:"CreateUpdate",props:{twofaccountId:[Number,String]},setup(p){const j=qe("2fauth"),g=De(),q=Pe(),m=He(),F=Ke(),x=ze(),w=Qe(),o=se(new re({service:"",account:"",otp_type:"",icon:"",group_id:m.preferences.defaultGroup==-1?m.preferences.activeGroup:m.preferences.defaultGroup,secret:"",algorithm:"",digits:null,counter:null,period:null,image:""})),S=se(new re({qrcode:null})),$=se(new re({icon:null})),f=d({otp_type:"",account:"",service:"",icon:""}),v=[{text:"TOTP",value:"totp"},{text:"HOTP",value:"hotp"},{text:"STEAM",value:"steamtotp"}],D=[{text:"6",value:6},{text:"7",value:7},{text:"8",value:8},{text:"9",value:9},{text:"10",value:10}],P=[{text:"sha1",value:"sha1"},{text:"sha256",value:"sha256"},{text:"sha512",value:"sha512"},{text:"md5",value:"md5"}],V=d(),i=d(""),U=d(!1),L=d(!1),B=d(!1),N=d(!1),I=d(!1),z=d(!1),W=d(null),J=d(null),H=d(null),X=d(null),ue=d(null),de=d(null),fe=d(null),Y=p,_=Ve(()=>Y.twofaccountId!=null),pe=Ve(()=>Re().items.map(t=>({text:t.id>0?t.name:"- "+M("groups.no_group")+" -",value:t.id})));Ge(()=>{q.name=="editAccount"?T.get(Y.twofaccountId).then(t=>{o.fill(t.data),o.group_id==null&&(o.group_id=0),o.setOriginal(),i.value=o.icon,N.value=!0}):x.decodedUri?(V.value=x.decodedUri,x.decodedUri=null,m.preferences.AutoSaveQrcodedAccount?T.storeFromUri(V.value).then(t=>{xe(t.data)}).catch(t=>{t.response.data.errors.uri&&(L.value=!0,N.value=!0)}):T.preview(V.value).then(t=>{o.fill(t.data),i.value=t.data.icon?t.data.icon:"",U.value=!0,ne().then(()=>{H.value.show()})}).catch(t=>{t.response.data.errors.uri&&(L.value=!0,N.value=!0)})):N.value=!0}),Q(i,t=>{U.value&&ne().then(()=>{H.value.icon=t})}),Q(I,t=>{var l,A;t==!1&&((l=X.value)==null||l.clearOTP(),(A=H.value)==null||A.clearOTP())}),Q(B,t=>{var l;t==!1&&((l=J.value)==null||l.clearOTP(),g.push({name:"accounts"}))}),Q(()=>o.otp_type,(t,l)=>{t==="steamtotp"?(o.service="Steam",ye()):l==="steamtotp"&&(o.service="",C())});function Ce(){_.value?Te():me()}async function me(){o.icon=i.value;const{data:t}=await o.post("/api/v1/twofaccounts");o.errors.any()===!1&&(F.items.push(t),w.success({text:M("twofaccounts.account_created")}),g.push({name:"accounts"}))}async function Te(){if(i.value!==o.icon){let l="";l=o.icon,o.icon=i.value,i.value=l,C()}const{data:t}=await o.put("/api/v1/twofaccounts/"+Y.twofaccountId);if(o.errors.any()===!1){const l=F.items.findIndex(A=>A.id===t.id);F.items.splice(l,1,t),w.success({text:M("twofaccounts.account_updated")}),g.push({name:"accounts"})}}function Me(){o.clear(),I.value=!0,X.value.show()}function xe(t){f.value.otp_type=t.otp_type,f.value.service=t.service,f.value.account=t.account,f.value.icon=t.icon,ne().then(()=>{B.value=!0,J.value.show(t.id)})}function ve(){o.hasChanged()||i.value!=o.icon?confirm(M("twofaccounts.confirm.cancel"))===!0&&((!_.value||i.value!=o.icon)&&C(),g.push({name:"accounts"})):g.push({name:"accounts"})}function he(){C(),$.icon=W.value.files[0],$.upload("/api/v1/icons",{returnError:!0}).then(t=>{i.value=t.data.filename,U.value&&(o.icon=i.value)}).catch(t=>{t.response.status!==422&&w.alert({text:t.response.data.message})})}function C(){_.value?i.value&&(i.value!==o.icon&&T.deleteIcon(i.value),i.value=""):i.value&&(T.deleteIcon(i.value),i.value="",U.value&&(o.icon=""))}function ge(t){o.counter=t.nextHotpCounter}function _e(t){o.errors.set(o.extractErrors(t))}function Se(){S.qrcode=de.value.files[0],S.upload("/api/v1/qrcode/decode",{returnError:!0}).then(t=>{V.value=t.data.data,T.preview(V.value,{returnError:!0}).then(l=>{o.fill(l.data),i.value=l.data.icon?l.data.icon:null}).catch(l=>{l.response.status===422?l.response.data.errors.uri?L.value=!0:w.alert({text:M(l.response.data.message)}):w.error(l)})}).catch(t=>{t.response.status!==422&&w.alert({text:t.response.data.message})})}function ye(){m.preferences.getOfficialIcons&&(z.value=!0,T.getLogo(o.service,{returnError:!0}).then(t=>{t.status===201?(C(),i.value=t.data.filename):w.warn({text:M("errors.no_logo_found_for_x",{service:we(o.service)})})}).catch(()=>{w.warn({text:M("errors.no_logo_found_for_x",{service:we(o.service)})})}).finally(()=>{z.value=!1}))}function we(t){return t.replace(/(<([^> ]+)>)/ig,"")}return(t,l)=>{const A=h("Modal"),Z=h("FieldError"),K=h("FontAwesomeIcon"),ee=h("VueButton"),be=h("ButtonBackCloseCancel"),oe=h("FormField"),Le=h("FormSelect"),te=h("FormToggle"),Ae=h("VueFooter"),ke=h("modal"),Oe=h("FormWrapper");return a(),u("div",null,[e(m).preferences.AutoSaveQrcodedAccount?(a(),b(A,{key:0,modelValue:e(B),"onUpdate:modelValue":l[1]||(l[1]=n=>ae(B)?B.value=n:null)},{default:y(()=>[r(ie,G({ref_key:"OtpDisplayForAutoSave",ref:J},e(f),{onPleaseCloseMe:l[0]||(l[0]=n=>e(g).push({name:"accounts"}))}),null,16)]),_:1},8,["modelValue"])):c("",!0),!e(_)&&e(U)?(a(),u("form",{key:1,onSubmit:O(me,["prevent"]),onKeydown:l[3]||(l[3]=n=>e(o).onKeydown(n))},[s("div",so,[s("div",no,[s("div",ao,[e($).errors.hasAny("icon")?(a(),b(Z,{key:0,error:e($).errors.get("icon"),field:"icon",class:"help-for-file"},null,8,["error"])):c("",!0),e(i)?c("",!0):(a(),u("label",ro,[s("input",{class:"file-input",type:"file",accept:"image/*",onChange:he,ref_key:"iconInput",ref:W},null,544),r(K,{icon:["fas","image"],size:"2x"})])),e(i)?(a(),u("button",{key:2,class:"delete delete-icon-button is-medium",onClick:O(C,["prevent"])})):c("",!0),r(ie,G({ref_key:"OtpDisplayForQuickForm",ref:H},e(o).data(),{onIncrementHotp:ge,onValidationError:_e,onPleaseCloseMe:l[2]||(l[2]=n=>I.value=!1)}),null,16)])]),s("div",io,[e(o).errors.any()?(a(),u("div",co,[(a(!0),u(ce,null,$e(e(o).errors.errors,(n,le)=>(a(),u("p",{key:le,class:"help is-danger"},[s("ul",null,[(a(!0),u(ce,null,$e(n,(Ue,Be)=>(a(),u("li",{key:Be},k(Ue),1))),128))])]))),128))])):c("",!0)]),s("div",uo,[s("div",fo,[s("div",po,[s("div",mo,[r(ee,{isLoading:e(o).isBusy},{default:y(()=>[Ee(k(t.$t("commons.save")),1)]),_:1},8,["isLoading"])]),r(be,{action:"cancel",isText:!0,isRounded:!1,useLinkTag:!1,onCanceled:ve})])])])])],32)):c("",!0),e(N)?(a(),b(Oe,{key:2,title:t.$t(e(_)?"twofaccounts.forms.edit_account":"twofaccounts.forms.new_account")},{default:y(()=>[s("form",{onSubmit:O(Ce,["prevent"]),onKeydown:l[15]||(l[15]=n=>e(o).onKeydown(n))},[e(_)?c("",!0):(a(),u("div",vo,[s("div",ho,[r(e(R),null,{default:y(({mode:n})=>[s("div",{role:"button",tabindex:"0",class:E(["file is-small",{"is-black":n=="dark"}]),onKeyup:l[4]||(l[4]=Fe(le=>e(ue).click(),["enter"]))},[s("label",{class:"file-label",title:t.$t("twofaccounts.forms.use_qrcode.title"),ref_key:"qrcodeInputLabel",ref:ue},[s("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:Se,ref_key:"qrcodeInput",ref:de},null,544),s("span",_o,[s("span",yo,[r(K,{icon:["fas","qrcode"],size:"lg"})]),s("span",wo,k(t.$t("twofaccounts.forms.prefill_using_qrcode")),1)])],8,go)],34)]),_:1})])])),e(S).errors.hasAny("qrcode")?(a(),b(Z,{key:1,error:e(S).errors.get("qrcode"),field:"qrcode",class:"help-for-file"},null,8,["error"])):c("",!0),r(oe,{modelValue:e(o).service,"onUpdate:modelValue":l[5]||(l[5]=n=>e(o).service=n),fieldName:"service",fieldError:e(o).errors.get("email"),isDisabled:e(o).otp_type==="steamtotp",label:"twofaccounts.service",placeholder:t.$t("twofaccounts.forms.service.placeholder"),autofocus:""},null,8,["modelValue","fieldError","isDisabled","placeholder"]),r(oe,{modelValue:e(o).account,"onUpdate:modelValue":l[6]||(l[6]=n=>e(o).account=n),fieldName:"account",fieldError:e(o).errors.get("account"),label:"twofaccounts.account",placeholder:t.$t("twofaccounts.forms.account.placeholder")},null,8,["modelValue","fieldError","placeholder"]),s("label",bo,k(t.$t("twofaccounts.icon")),1),s("div",ko,[e(m).preferences.getOfficialIcons?(a(),u("div",Vo,[r(e(R),null,{default:y(({mode:n})=>[r(ee,{onClick:ye,color:n=="dark"?"is-dark":"",nativeType:"button","is-loading":e(z),isDisabled:!e(o).service},{default:y(()=>[s("span",$o,[r(K,{icon:["fas","globe"]})]),s("span",null,k(t.$t("twofaccounts.forms.i_m_lucky")),1)]),_:2},1032,["color","is-loading","isDisabled"])]),_:1})])):c("",!0),s("div",Eo,[r(e(R),null,{default:y(({mode:n})=>[s("div",{role:"button",tabindex:"0",class:E(["file mr-3",n=="dark"?"is-dark":"is-white"]),onKeyup:l[7]||(l[7]=Fe(le=>e(fe).click(),["enter"]))},[s("label",{class:"file-label",ref_key:"iconInputLabel",ref:fe},[s("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:he,ref_key:"iconInput",ref:W},null,544),s("span",Fo,[s("span",Io,[r(K,{icon:["fas","upload"]})]),s("span",Co,k(t.$t("twofaccounts.forms.choose_image")),1)])],512)],34),e(i)?(a(),u("span",{key:0,class:E(["tag is-large",n=="dark"?"is-dark":"is-white"])},[s("img",{class:"icon-preview",src:e(j).config.subdirectory+"/storage/icons/"+e(i),alt:t.$t("twofaccounts.icon_to_illustrate_the_account")},null,8,To),s("button",{class:"clear-selection delete is-small",onClick:O(C,["prevent"]),"aria-label":t.$t("twofaccounts.remove_icon")},null,8,Mo)],2)):c("",!0)]),_:1})])]),s("div",xo,[e($).errors.hasAny("icon")?(a(),b(Z,{key:0,error:e($).errors.get("icon"),field:"icon",class:"help-for-file"},null,8,["error"])):c("",!0),e(m).preferences.getOfficialIcons?(a(),u("p",{key:1,class:"help",innerHTML:t.$t("twofaccounts.forms.i_m_lucky_legend")},null,8,So)):c("",!0)]),e(pe).length>0?(a(),b(Le,{key:2,modelValue:e(o).group_id,"onUpdate:modelValue":l[8]||(l[8]=n=>e(o).group_id=n),options:e(pe),fieldName:"group_id",label:"twofaccounts.forms.group.label",help:"twofaccounts.forms.group.help"},null,8,["modelValue","options"])):c("",!0),r(te,{modelValue:e(o).otp_type,"onUpdate:modelValue":l[9]||(l[9]=n=>e(o).otp_type=n),isDisabled:e(_),choices:v,fieldName:"otp_type",fieldError:e(o).errors.get("otp_type"),label:"twofaccounts.forms.otp_type.label",help:"twofaccounts.forms.otp_type.help",hasOffset:!0},null,8,["modelValue","isDisabled","fieldError"]),e(o).otp_type!=""?(a(),u("div",Lo,[r(Ie,{isEditMode:e(_),modelValue:e(o).secret,"onUpdate:modelValue":l[10]||(l[10]=n=>e(o).secret=n),modelModifiers:{trimAll:!0},fieldName:"secret",fieldError:e(o).errors.get("secret"),label:"twofaccounts.forms.secret.label",help:"twofaccounts.forms.secret.help"},null,8,["isEditMode","modelValue","fieldError"]),e(o).otp_type!=="steamtotp"?(a(),u("div",Ao,[s("h2",Oo,k(t.$t("commons.options")),1),s("p",Uo,k(t.$t("twofaccounts.forms.options_help")),1),r(te,{modelValue:e(o).digits,"onUpdate:modelValue":l[11]||(l[11]=n=>e(o).digits=n),choices:D,fieldName:"digits",fieldError:e(o).errors.get("digits"),label:"twofaccounts.forms.digits.label",help:"twofaccounts.forms.digits.help"},null,8,["modelValue","fieldError"]),r(te,{modelValue:e(o).algorithm,"onUpdate:modelValue":l[12]||(l[12]=n=>e(o).algorithm=n),choices:P,fieldName:"algorithm",fieldError:e(o).errors.get("algorithm"),label:"twofaccounts.forms.algorithm.label",help:"twofaccounts.forms.algorithm.help"},null,8,["modelValue","fieldError"]),e(o).otp_type==="totp"?(a(),b(oe,{key:0,pattern:"[0-9]{1,4}",class:E("is-third-width-field"),modelValue:e(o).period,"onUpdate:modelValue":l[13]||(l[13]=n=>e(o).period=n),fieldName:"period",fieldError:e(o).errors.get("period"),label:"twofaccounts.forms.period.label",help:"twofaccounts.forms.period.help",placeholder:t.$t("twofaccounts.forms.period.placeholder")},null,8,["modelValue","fieldError","placeholder"])):c("",!0),e(o).otp_type==="hotp"?(a(),b(Ie,{key:1,pattern:"[0-9]{1,4}",isEditMode:e(_),isExpanded:!1,modelValue:e(o).counter,"onUpdate:modelValue":l[14]||(l[14]=n=>e(o).counter=n),fieldName:"counter",fieldError:e(o).errors.get("counter"),label:"twofaccounts.forms.counter.label",placeholder:t.$t("twofaccounts.forms.counter.placeholder"),help:e(_)?"twofaccounts.forms.counter.help_lock":"twofaccounts.forms.counter.help"},null,8,["isEditMode","modelValue","fieldError","placeholder","help"])):c("",!0)])):c("",!0)])):c("",!0),r(Ae,{showButtons:!0},{default:y(()=>[s("p",Bo,[r(ee,{id:e(_)?"btnUpdate":"btnCreate",isLoading:e(o).isBusy,class:"is-rounded"},{default:y(()=>[Ee(k(e(_)?t.$t("commons.save"):t.$t("commons.create")),1)]),_:1},8,["id","isLoading"])]),e(o).otp_type&&e(o).secret?(a(),u("p",No,[s("button",{id:"btnPreview",type:"button",class:"button is-success is-rounded",onClick:Me},k(t.$t("twofaccounts.forms.test")),1)])):c("",!0),r(be,{action:"cancel",useLinkTag:!1,onCanceled:ve})]),_:1})],32),r(ke,{modelValue:e(I),"onUpdate:modelValue":l[17]||(l[17]=n=>ae(I)?I.value=n:null)},{default:y(()=>[r(ie,G({ref_key:"OtpDisplayForAdvancedForm",ref:X},e(o).data(),{onIncrementHotp:ge,onValidationError:_e,onPleaseCloseMe:l[16]||(l[16]=n=>I.value=!1)}),null,16)]),_:1},8,["modelValue"])]),_:1},8,["title"])):c("",!0),r(ke,{modelValue:e(L),"onUpdate:modelValue":l[18]||(l[18]=n=>ae(L)?L.value=n:null)},{default:y(()=>[r(je,{qrContent:e(V)},null,8,["qrContent"])]),_:1},8,["modelValue"])])}}};export{Go as default}; diff --git a/public/build/assets/CreateUpdate-Bshdf4W1.js b/public/build/assets/CreateUpdate-Bshdf4W1.js new file mode 100644 index 00000000..1bdfb08b --- /dev/null +++ b/public/build/assets/CreateUpdate-Bshdf4W1.js @@ -0,0 +1,2 @@ +import{T as v,x as w,c as h,a0 as y,K as N,h as _,k as E,f as t,$ as I,l as m,m as V,e as C,j as i,G as S,p as $}from"./app-CzxRjCVM.js";import{F as k}from"./Form-EFIuWKGI.js";import{u as K}from"./bus-BNAtGMCo.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const U={__name:"CreateUpdate",props:{groupId:[Number,String]},setup(c){const p=v(),d=$(),l=I(),s=K(),a=c,r=w(()=>a.groupId!=null),o=h(new k({name:""}));y(()=>{l.name=="editGroup"&&(s.editedGroupName?(o.name=s.editedGroupName,s.editedGroupName=void 0):N.get(a.groupId).then(e=>{o.name=e.data.name}))});function f(){r.value?B():g()}async function g(){o.post("/api/v1/groups").then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}async function B(){o.put("/api/v1/groups/"+a.groupId).then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}return(e,n)=>{const F=m("FormField"),G=m("FormButtons"),b=m("FormWrapper");return V(),_(b,{title:t(r)?e.$t("groups.forms.rename_group"):e.$t("groups.forms.new_group")},{default:E(()=>[C("form",{onSubmit:S(f,["prevent"]),onKeydown:n[1]||(n[1]=u=>t(o).onKeydown(u))},[i(F,{modelValue:t(o).name,"onUpdate:modelValue":n[0]||(n[0]=u=>t(o).name=u),fieldName:"name",fieldError:t(o).errors.get("name"),label:"commons.name",autofocus:""},null,8,["modelValue","fieldError"]),i(G,{submitId:t(r)?"btnEditGroup":"btnCreateGroup",isBusy:t(o).isBusy,caption:t(r)?e.$t("commons.save"):e.$t("commons.create"),showCancelButton:!0,cancelLandingView:"groups"},null,8,["submitId","isBusy","caption"])],32)]),_:1},8,["title"])}}};export{U as default}; +//# sourceMappingURL=CreateUpdate-Bshdf4W1.js.map diff --git a/public/build/assets/CreateUpdate-Bshdf4W1.js.map b/public/build/assets/CreateUpdate-Bshdf4W1.js.map new file mode 100644 index 00000000..1f71261b --- /dev/null +++ b/public/build/assets/CreateUpdate-Bshdf4W1.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CreateUpdate-Bshdf4W1.js","sources":["../../../resources/js/views/groups/CreateUpdate.vue"],"sourcesContent":["\n\n"],"names":["groups","useGroups","router","useRouter","route","useRoute","bus","useBusStore","props","__props","isEditMode","computed","form","reactive","Form","onBeforeMount","groupService","response","handleSubmit","updateGroup","createGroup"],"mappings":"sXAMI,MAAMA,EAASC,EAAS,EAClBC,EAASC,EAAS,EAClBC,EAAQC,EAAQ,EAChBC,EAAMC,EAAW,EAEjBC,EAAQC,EAIRC,EAAaC,EAAS,IACjBH,EAAM,SAAW,IAC3B,EAEKI,EAAOC,EAAS,IAAIC,EAAK,CAC3B,KAAM,EACd,CAAK,CAAC,EAEFC,EAAc,IAAM,CAEZX,EAAM,MAAQ,cACVE,EAAI,iBACJM,EAAK,KAAON,EAAI,gBAChBA,EAAI,gBAAkB,QAGtBU,EAAa,IAAIR,EAAM,OAAO,EAAE,KAAKS,GAAY,CAC7CL,EAAK,KAAOK,EAAS,KAAK,IAC7B,CAAA,EAGZ,CAAA,EAKD,SAASC,GAAe,CACpBR,EAAW,MAAQS,EAAW,EAAKC,EAAW,CACtD,CAKI,eAAeA,GAAc,CACzBR,EAAK,KAAK,gBAAgB,EAAE,KAAKK,GAAY,CACzCjB,EAAO,UAAUiB,EAAS,IAAI,EAC9Bf,EAAO,KAAK,CAAE,KAAM,QAAU,CAAA,CACjC,CAAA,CACT,CAKI,eAAeiB,GAAc,CACzBP,EAAK,IAAI,kBAAoBJ,EAAM,OAAO,EAAE,KAAKS,GAAY,CACzDjB,EAAO,UAAUiB,EAAS,IAAI,EAC9Bf,EAAO,KAAK,CAAE,KAAM,QAAU,CAAA,CACjC,CAAA,CACT"} \ No newline at end of file diff --git a/public/build/assets/CreateUpdate-DXqb6Ftc.js b/public/build/assets/CreateUpdate-DXqb6Ftc.js deleted file mode 100644 index 00f32329..00000000 --- a/public/build/assets/CreateUpdate-DXqb6Ftc.js +++ /dev/null @@ -1 +0,0 @@ -import{V as v,u as w,$ as h,x as y,d as N,a0 as V,K as _,e as m,f as C,k as E,p as I,i as t,h as S,m as i,C as $}from"./app-CuhK3jij.js";import{F as k}from"./Form-o2lWAB-o.js";import{u as K}from"./bus-BalNs30H.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const U={__name:"CreateUpdate",props:{groupId:[Number,String]},setup(c){const p=v(),d=w(),l=h(),s=K(),a=c,r=y(()=>a.groupId!=null),o=N(new k({name:""}));V(()=>{l.name=="editGroup"&&(s.editedGroupName?(o.name=s.editedGroupName,s.editedGroupName=void 0):_.get(a.groupId).then(e=>{o.name=e.data.name}))});function f(){r.value?B():g()}async function g(){o.post("/api/v1/groups").then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}async function B(){o.put("/api/v1/groups/"+a.groupId).then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}return(e,n)=>{const F=m("FormField"),b=m("FormButtons"),G=m("FormWrapper");return C(),E(G,{title:t(r)?e.$t("groups.forms.rename_group"):e.$t("groups.forms.new_group")},{default:I(()=>[S("form",{onSubmit:$(f,["prevent"]),onKeydown:n[1]||(n[1]=u=>t(o).onKeydown(u))},[i(F,{modelValue:t(o).name,"onUpdate:modelValue":n[0]||(n[0]=u=>t(o).name=u),fieldName:"name",fieldError:t(o).errors.get("name"),label:"commons.name",autofocus:""},null,8,["modelValue","fieldError"]),i(b,{submitId:t(r)?"btnEditGroup":"btnCreateGroup",isBusy:t(o).isBusy,caption:t(r)?e.$t("commons.save"):e.$t("commons.create"),showCancelButton:!0,cancelLandingView:"groups"},null,8,["submitId","isBusy","caption"])],32)]),_:1},8,["title"])}}};export{U as default}; diff --git a/public/build/assets/CreateUpdate-erSWwknc.js b/public/build/assets/CreateUpdate-erSWwknc.js new file mode 100644 index 00000000..db273303 --- /dev/null +++ b/public/build/assets/CreateUpdate-erSWwknc.js @@ -0,0 +1,2 @@ +import{Z as ke,_ as De,r as f,l as h,m as n,d as u,e as s,f as e,n as T,V as Q,h as _,k,G as N,j as i,U as Te,i as c,F as ie,u as Pe,b as He,a as Ke,c as le,x as Ve,o as Ge,J as L,P as se,s as G,$ as Qe,C as ae,D as Ee,t as w,g as $e,w as Ie,L as Re,p as je,T as ze,H as A}from"./app-CzxRjCVM.js";import{F as ne}from"./Form-EFIuWKGI.js";import{_ as re}from"./OtpDisplay-ytUtG8ZN.js";import{_ as We}from"./QrContentDisplay-C2fFtz-5.js";import{u as Je}from"./bus-BNAtGMCo.js";import"./Spinner-C-V0HKYn.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const Ze=["for","innerHTML"],Xe=["disabled","id","type","value","placeholder","maxlength","aria-describedby","aria-invalid","aria-errormessage"],Ye={key:0,class:"control"},eo=["title"],oo={class:"icon"},to={key:1,class:"control"},lo=["title"],so={class:"icon has-text-danger"},ao=["id","innerHTML"],Fe=Object.assign({inheritAttrs:!1},{__name:"FormLockField",props:{modelValue:String,modelModifiers:{default:()=>({})},isEditMode:{type:Boolean,default:!1},label:{type:String,default:""},fieldName:{type:String,default:"",required:!0},fieldError:[String],inputType:{type:String,default:"text"},placeholder:{type:String,default:""},help:{type:String,default:""},hasOffset:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!0},maxLength:{type:Number,default:null},idSuffix:{type:String,default:""}},emits:["update:modelValue"],setup(d,{emit:R}){const p=d,{inputId:D}=ke(p.inputType,p.fieldName+p.idSuffix),{valErrorId:b}=De(p.fieldName),U=ke("legend",p.fieldName).inputId,E=f(p.isDisabled||p.isEditMode),g=f(!1),o=f(0),C=R;function $(m){let v=m.target.value;p.modelModifiers.trimAll&&(v=v.replace(/\s+/g,"")),C("update:modelValue",v)}function M(m){let v=m.target.value;g.value=v.includes(" "),C("update:modelValue",v)}function j(m){g.value=m.target.value.includes(" "),o.value+=1}return(m,v)=>{const V=h("FontAwesomeIcon"),r=h("FieldError");return n(),u(ie,null,[s("label",{for:e(D),class:"label",innerHTML:m.$t(d.label)},null,8,Ze),s("div",{class:T(["field has-addons mb-0",{"pt-3":d.hasOffset}])},[s("div",{class:T(["control",{"is-expanded":d.isExpanded}])},[(n(),u("input",Q({key:e(o),disabled:e(E),id:e(D),type:d.inputType,class:"input",value:d.modelValue,placeholder:d.placeholder},m.$attrs,{onInput:M,onChange:$,onBlur:j,maxlength:d.maxLength,"aria-describedby":d.help?e(U):void 0,"aria-invalid":d.fieldError!=null,"aria-errormessage":d.fieldError!=null?e(b):void 0}),null,16,Xe))],2),d.isEditMode?(n(),_(e(Te),{key:0},{default:k(({mode:I})=>[e(E)?(n(),u("div",Ye,[s("button",{type:"button",class:T(["button field-lock",{"is-dark":I=="dark"}]),onClick:v[0]||(v[0]=N(F=>E.value=!1,["stop"])),title:m.$t("twofaccounts.forms.unlock.title")},[s("span",oo,[i(V,{icon:["fas","lock"]})])],10,eo)])):(n(),u("div",to,[s("button",{type:"button",class:T(["button field-unlock",{"is-dark":I=="dark"}]),onClick:v[1]||(v[1]=N(F=>E.value=!0,["stop"])),title:m.$t("twofaccounts.forms.lock.title")},[s("span",so,[i(V,{icon:["fas","lock-open"]})])],10,lo)]))]),_:1})):c("",!0)],2),e(g)?(n(),_(r,{key:0,error:m.$t("twofaccounts.forms.spaces_are_ignored"),field:"spaces",alertType:"is-warning"},null,8,["error"])):c("",!0),d.fieldError!=null?(n(),_(r,{key:1,error:d.fieldError,field:d.fieldName},null,8,["error","field"])):c("",!0),d.help?(n(),u("p",{key:2,id:e(U),class:"help",innerHTML:m.$t(d.help)},null,8,ao)):c("",!0)],64)}}}),no={class:"container preview has-text-centered"},ro={class:"columns is-mobile"},io={class:"column"},co={key:1,class:"add-icon-button"},uo={class:"columns is-mobile",role:"alert"},fo={key:0,class:"column"},po={class:"columns is-mobile"},mo={class:"column quickform-footer"},vo={class:"field is-grouped is-grouped-centered"},ho={class:"control"},go={key:0,class:"field is-grouped"},yo={class:"control"},_o=["title"],bo={class:"file-cta"},wo={class:"file-icon"},ko={class:"file-label"},Vo={for:"filUploadIcon",class:"label"},Eo={class:"field is-grouped"},$o={key:0,class:"control"},Io={class:"icon is-small"},Fo={class:"control is-flex"},To={class:"file-cta"},Co={class:"file-icon"},Mo={class:"file-label"},So=["src","alt"],xo=["aria-label"],Lo={class:"field"},Ao=["innerHTML"],Uo={key:3},Oo={key:0},No={class:"title is-4 mt-5 mb-2"},Bo={class:"help mb-4"},qo={class:"control"},Do={key:0,class:"control"},jo={__name:"CreateUpdate",props:{twofaccountId:[Number,String]},setup(d){const R=Re("2fauth"),p=je(),D=Qe(),b=Pe(),U=He(),E=Je(),g=Ke(),o=le(new ne({service:"",account:"",otp_type:"",icon:"",group_id:b.preferences.defaultGroup==-1?b.preferences.activeGroup:b.preferences.defaultGroup,secret:"",algorithm:"",digits:null,counter:null,period:null,image:""})),C=le(new ne({qrcode:null})),$=le(new ne({icon:null})),M=f({otp_type:"",account:"",service:"",icon:""}),j=[{text:"TOTP",value:"totp"},{text:"HOTP",value:"hotp"},{text:"STEAM",value:"steamtotp"}],m=[{text:"6",value:6},{text:"7",value:7},{text:"8",value:8},{text:"9",value:9},{text:"10",value:10}],v=[{text:"sha1",value:"sha1"},{text:"sha256",value:"sha256"},{text:"sha512",value:"sha512"},{text:"md5",value:"md5"}],V=f(),r=f(""),I=f(!1),F=f(!1),B=f(!1),q=f(!1),S=f(!1),z=f(!1),W=f(null),J=f(null),P=f(null),Z=f(null),ce=f(null),ue=f(null),de=f(null),X=d,y=Ve(()=>X.twofaccountId!=null),fe=Ve(()=>ze().items.map(t=>({text:t.id>0?t.name:"- "+A("groups.no_group")+" -",value:t.id})));Ge(()=>{D.name=="editAccount"?L.get(X.twofaccountId).then(t=>{o.fill(t.data),o.group_id==null&&(o.group_id=0),o.setOriginal(),r.value=o.icon,q.value=!0}):E.decodedUri?(V.value=E.decodedUri,E.decodedUri=null,b.preferences.AutoSaveQrcodedAccount?L.storeFromUri(V.value).then(t=>{xe(t.data)}).catch(t=>{t.response.data.errors.uri&&(F.value=!0,q.value=!0)}):L.preview(V.value).then(t=>{o.fill(t.data),r.value=t.data.icon?t.data.icon:"",I.value=!0,se().then(()=>{P.value.show()})}).catch(t=>{t.response.data.errors.uri&&(F.value=!0,q.value=!0)})):q.value=!0}),G(r,t=>{I.value&&se().then(()=>{P.value.icon=t})}),G(S,t=>{var l,O;t==!1&&((l=Z.value)==null||l.clearOTP(),(O=P.value)==null||O.clearOTP())}),G(B,t=>{var l;t==!1&&((l=J.value)==null||l.clearOTP(),p.push({name:"accounts"}))}),G(()=>o.otp_type,(t,l)=>{t==="steamtotp"?(o.service="Steam",ye()):l==="steamtotp"&&(o.service="",x())});function Ce(){y.value?Me():pe()}async function pe(){o.icon=r.value;const{data:t}=await o.post("/api/v1/twofaccounts");o.errors.any()===!1&&(U.items.push(t),g.success({text:A("twofaccounts.account_created")}),p.push({name:"accounts"}))}async function Me(){if(r.value!==o.icon){let l="";l=o.icon,o.icon=r.value,r.value=l,x()}const{data:t}=await o.put("/api/v1/twofaccounts/"+X.twofaccountId);if(o.errors.any()===!1){const l=U.items.findIndex(O=>O.id===t.id);U.items.splice(l,1,t),g.success({text:A("twofaccounts.account_updated")}),p.push({name:"accounts"})}}function Se(){o.clear(),S.value=!0,Z.value.show()}function xe(t){M.value.otp_type=t.otp_type,M.value.service=t.service,M.value.account=t.account,M.value.icon=t.icon,se().then(()=>{B.value=!0,J.value.show(t.id)})}function me(){o.hasChanged()||r.value!=o.icon?confirm(A("twofaccounts.confirm.cancel"))===!0&&((!y.value||r.value!=o.icon)&&x(),p.push({name:"accounts"})):p.push({name:"accounts"})}function ve(){x(),$.icon=W.value.files[0],$.upload("/api/v1/icons",{returnError:!0}).then(t=>{r.value=t.data.filename,I.value&&(o.icon=r.value)}).catch(t=>{t.response.status!==422&&g.alert({text:t.response.data.message})})}function x(){y.value?r.value&&(r.value!==o.icon&&L.deleteIcon(r.value),r.value=""):r.value&&(L.deleteIcon(r.value),r.value="",I.value&&(o.icon=""))}function he(t){o.counter=t.nextHotpCounter}function ge(t){o.errors.set(o.extractErrors(t))}function Le(){C.qrcode=ue.value.files[0],C.upload("/api/v1/qrcode/decode",{returnError:!0}).then(t=>{V.value=t.data.data,L.preview(V.value,{returnError:!0}).then(l=>{o.fill(l.data),r.value=l.data.icon?l.data.icon:null}).catch(l=>{l.response.status===422?l.response.data.errors.uri?F.value=!0:g.alert({text:A(l.response.data.message)}):g.error(l)})}).catch(t=>{t.response.status!==422&&g.alert({text:t.response.data.message})})}function ye(){b.preferences.getOfficialIcons&&(z.value=!0,L.getLogo(o.service,{returnError:!0}).then(t=>{t.status===201?(x(),r.value=t.data.filename):g.warn({text:A("errors.no_logo_found_for_x",{service:_e(o.service)})})}).catch(()=>{g.warn({text:A("errors.no_logo_found_for_x",{service:_e(o.service)})})}).finally(()=>{z.value=!1}))}function _e(t){return t.replace(/(<([^> ]+)>)/ig,"")}return(t,l)=>{const O=h("Modal"),Y=h("FieldError"),H=h("FontAwesomeIcon"),ee=h("VueButton"),be=h("ButtonBackCloseCancel"),oe=h("FormField"),Ae=h("FormSelect"),te=h("FormToggle"),Ue=h("VueFooter"),we=h("modal"),Oe=h("FormWrapper");return n(),_(e(Te),null,{default:k(({mode:K})=>[s("div",null,[e(b).preferences.AutoSaveQrcodedAccount?(n(),_(O,{key:0,modelValue:e(B),"onUpdate:modelValue":l[1]||(l[1]=a=>ae(B)?B.value=a:null)},{default:k(()=>[i(re,Q({ref_key:"OtpDisplayForAutoSave",ref:J},e(M),{onPleaseCloseMe:l[0]||(l[0]=a=>e(p).push({name:"accounts"}))}),null,16)]),_:1},8,["modelValue"])):c("",!0),!e(y)&&e(I)?(n(),u("form",{key:1,onSubmit:N(pe,["prevent"]),onKeydown:l[3]||(l[3]=a=>e(o).onKeydown(a))},[s("div",no,[s("div",ro,[s("div",io,[e($).errors.hasAny("icon")?(n(),_(Y,{key:0,error:e($).errors.get("icon"),field:"icon",class:"help-for-file"},null,8,["error"])):c("",!0),e(r)?c("",!0):(n(),u("label",co,[s("input",{inert:"",class:"file-input",type:"file",accept:"image/*",onChange:ve,ref_key:"iconInput",ref:W},null,544),i(H,{icon:["fas","image"],size:"2x"})])),e(r)?(n(),u("button",{key:2,type:"button",class:"delete delete-icon-button is-medium",onClick:N(x,["prevent"])})):c("",!0),i(re,Q({ref_key:"OtpDisplayForQuickForm",ref:P},e(o).data(),{onIncrementHotp:he,onValidationError:ge,onPleaseCloseMe:l[2]||(l[2]=a=>S.value=!1)}),null,16)])]),s("div",uo,[e(o).errors.any()?(n(),u("div",fo,[(n(!0),u(ie,null,Ee(e(o).errors.errors,(a,Ne)=>(n(),u("p",{key:Ne,class:"help is-danger"},[s("ul",null,[(n(!0),u(ie,null,Ee(a,(Be,qe)=>(n(),u("li",{key:qe},w(Be),1))),128))])]))),128))])):c("",!0)]),s("div",po,[s("div",mo,[s("div",vo,[s("div",ho,[i(ee,{isLoading:e(o).isBusy},{default:k(()=>[$e(w(t.$t("commons.save")),1)]),_:1},8,["isLoading"])]),i(be,{action:"cancel",isText:!0,isRounded:!1,useLinkTag:!1,onCanceled:me})])])])])],32)):c("",!0),e(q)?(n(),_(Oe,{key:2,title:t.$t(e(y)?"twofaccounts.forms.edit_account":"twofaccounts.forms.new_account")},{default:k(()=>[s("form",{onSubmit:N(Ce,["prevent"]),onKeydown:l[15]||(l[15]=a=>e(o).onKeydown(a))},[e(y)?c("",!0):(n(),u("div",go,[s("div",yo,[s("div",{role:"button",tabindex:"0",class:T(["file is-small",{"is-black":K=="dark"}]),onKeyup:l[4]||(l[4]=Ie(a=>e(ce).click(),["enter"]))},[s("label",{class:"file-label",title:t.$t("twofaccounts.forms.use_qrcode.title"),ref_key:"qrcodeInputLabel",ref:ce},[s("input",{inert:"",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:Le,ref_key:"qrcodeInput",ref:ue},null,544),s("span",bo,[s("span",wo,[i(H,{icon:["fas","qrcode"],size:"lg"})]),s("span",ko,w(t.$t("twofaccounts.forms.prefill_using_qrcode")),1)])],8,_o)],34)])])),e(C).errors.hasAny("qrcode")?(n(),_(Y,{key:1,error:e(C).errors.get("qrcode"),field:"qrcode",class:"help-for-file"},null,8,["error"])):c("",!0),i(oe,{modelValue:e(o).service,"onUpdate:modelValue":l[5]||(l[5]=a=>e(o).service=a),fieldName:"service",fieldError:e(o).errors.get("email"),isDisabled:e(o).otp_type==="steamtotp",label:"twofaccounts.service",placeholder:t.$t("twofaccounts.forms.service.placeholder"),autofocus:""},null,8,["modelValue","fieldError","isDisabled","placeholder"]),i(oe,{modelValue:e(o).account,"onUpdate:modelValue":l[6]||(l[6]=a=>e(o).account=a),fieldName:"account",fieldError:e(o).errors.get("account"),label:"twofaccounts.account",placeholder:t.$t("twofaccounts.forms.account.placeholder")},null,8,["modelValue","fieldError","placeholder"]),s("label",Vo,w(t.$t("twofaccounts.icon")),1),s("div",Eo,[e(b).preferences.getOfficialIcons?(n(),u("div",$o,[i(ee,{onClick:ye,color:K=="dark"?"is-dark":"",nativeType:"button","is-loading":e(z),isDisabled:!e(o).service,"aria-describedby":"lgdTryMyLuck"},{default:k(()=>[s("span",Io,[i(H,{icon:["fas","globe"]})]),s("span",null,w(t.$t("twofaccounts.forms.i_m_lucky")),1)]),_:2},1032,["color","is-loading","isDisabled"])])):c("",!0),s("div",Fo,[s("div",{role:"button",tabindex:"0",class:T(["file mr-3",K=="dark"?"is-dark":"is-white"]),onKeyup:l[7]||(l[7]=Ie(a=>e(de).click(),["enter"]))},[s("label",{for:"filUploadIcon",class:"file-label",ref_key:"iconInputLabel",ref:de},[s("input",{id:"filUploadIcon",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:ve,ref_key:"iconInput",ref:W},null,544),s("span",To,[s("span",Co,[i(H,{icon:["fas","upload"]})]),s("span",Mo,w(t.$t("twofaccounts.forms.choose_image")),1)])],512)],34),e(r)?(n(),u("span",{key:0,class:T(["tag is-large",K=="dark"?"is-dark":"is-white"])},[s("img",{class:"icon-preview",src:e(R).config.subdirectory+"/storage/icons/"+e(r),alt:t.$t("twofaccounts.icon_to_illustrate_the_account")},null,8,So),s("button",{type:"button",class:"clear-selection delete is-small",onClick:N(x,["prevent"]),"aria-label":t.$t("twofaccounts.remove_icon")},null,8,xo)],2)):c("",!0)])]),s("div",Lo,[e($).errors.hasAny("icon")?(n(),_(Y,{key:0,error:e($).errors.get("icon"),field:"icon",class:"help-for-file"},null,8,["error"])):c("",!0),e(b).preferences.getOfficialIcons?(n(),u("p",{key:1,id:"lgdTryMyLuck",class:"help",innerHTML:t.$t("twofaccounts.forms.i_m_lucky_legend")},null,8,Ao)):c("",!0)]),e(fe).length>0?(n(),_(Ae,{key:2,modelValue:e(o).group_id,"onUpdate:modelValue":l[8]||(l[8]=a=>e(o).group_id=a),options:e(fe),fieldName:"group_id",label:"twofaccounts.forms.group.label",help:"twofaccounts.forms.group.help"},null,8,["modelValue","options"])):c("",!0),i(te,{modelValue:e(o).otp_type,"onUpdate:modelValue":l[9]||(l[9]=a=>e(o).otp_type=a),isDisabled:e(y),choices:j,fieldName:"otp_type",fieldError:e(o).errors.get("otp_type"),label:"twofaccounts.forms.otp_type.label",help:"twofaccounts.forms.otp_type.help",hasOffset:!0},null,8,["modelValue","isDisabled","fieldError"]),e(o).otp_type!=""?(n(),u("div",Uo,[i(Fe,{isEditMode:e(y),modelValue:e(o).secret,"onUpdate:modelValue":l[10]||(l[10]=a=>e(o).secret=a),modelModifiers:{trimAll:!0},fieldName:"secret",fieldError:e(o).errors.get("secret"),label:"twofaccounts.forms.secret.label",help:"twofaccounts.forms.secret.help"},null,8,["isEditMode","modelValue","fieldError"]),e(o).otp_type!=="steamtotp"?(n(),u("div",Oo,[s("h2",No,w(t.$t("commons.options")),1),s("p",Bo,w(t.$t("twofaccounts.forms.options_help")),1),i(te,{modelValue:e(o).digits,"onUpdate:modelValue":l[11]||(l[11]=a=>e(o).digits=a),choices:m,fieldName:"digits",fieldError:e(o).errors.get("digits"),label:"twofaccounts.forms.digits.label",help:"twofaccounts.forms.digits.help"},null,8,["modelValue","fieldError"]),i(te,{modelValue:e(o).algorithm,"onUpdate:modelValue":l[12]||(l[12]=a=>e(o).algorithm=a),choices:v,fieldName:"algorithm",fieldError:e(o).errors.get("algorithm"),label:"twofaccounts.forms.algorithm.label",help:"twofaccounts.forms.algorithm.help"},null,8,["modelValue","fieldError"]),e(o).otp_type==="totp"?(n(),_(oe,{key:0,pattern:"[0-9]{1,4}",class:T("is-third-width-field"),modelValue:e(o).period,"onUpdate:modelValue":l[13]||(l[13]=a=>e(o).period=a),fieldName:"period",fieldError:e(o).errors.get("period"),label:"twofaccounts.forms.period.label",help:"twofaccounts.forms.period.help",placeholder:t.$t("twofaccounts.forms.period.placeholder")},null,8,["modelValue","fieldError","placeholder"])):c("",!0),e(o).otp_type==="hotp"?(n(),_(Fe,{key:1,pattern:"[0-9]{1,4}",isEditMode:e(y),isExpanded:!1,modelValue:e(o).counter,"onUpdate:modelValue":l[14]||(l[14]=a=>e(o).counter=a),fieldName:"counter",fieldError:e(o).errors.get("counter"),label:"twofaccounts.forms.counter.label",placeholder:t.$t("twofaccounts.forms.counter.placeholder"),help:e(y)?"twofaccounts.forms.counter.help_lock":"twofaccounts.forms.counter.help"},null,8,["isEditMode","modelValue","fieldError","placeholder","help"])):c("",!0)])):c("",!0)])):c("",!0),i(Ue,{showButtons:!0},{default:k(()=>[s("p",qo,[i(ee,{id:e(y)?"btnUpdate":"btnCreate",isLoading:e(o).isBusy,class:"is-rounded"},{default:k(()=>[$e(w(e(y)?t.$t("commons.save"):t.$t("commons.create")),1)]),_:1},8,["id","isLoading"])]),e(o).otp_type&&e(o).secret?(n(),u("p",Do,[s("button",{id:"btnPreview",type:"button",class:"button is-success is-rounded",onClick:Se},w(t.$t("twofaccounts.forms.test")),1)])):c("",!0),i(be,{action:"cancel",useLinkTag:!1,onCanceled:me})]),_:1})],32),i(we,{modelValue:e(S),"onUpdate:modelValue":l[17]||(l[17]=a=>ae(S)?S.value=a:null)},{default:k(()=>[i(re,Q({ref_key:"OtpDisplayForAdvancedForm",ref:Z},e(o).data(),{onIncrementHotp:he,onValidationError:ge,onPleaseCloseMe:l[16]||(l[16]=a=>S.value=!1)}),null,16)]),_:1},8,["modelValue"])]),_:2},1032,["title"])):c("",!0),i(we,{modelValue:e(F),"onUpdate:modelValue":l[18]||(l[18]=a=>ae(F)?F.value=a:null)},{default:k(()=>[i(We,{qrContent:e(V)},null,8,["qrContent"])]),_:1},8,["modelValue"])])]),_:1})}}};export{jo as default}; +//# sourceMappingURL=CreateUpdate-erSWwknc.js.map diff --git a/public/build/assets/CreateUpdate-erSWwknc.js.map b/public/build/assets/CreateUpdate-erSWwknc.js.map new file mode 100644 index 00000000..ba8f9e73 --- /dev/null +++ b/public/build/assets/CreateUpdate-erSWwknc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CreateUpdate-erSWwknc.js","sources":["../../../resources/js/components/formElements/FormLockField.vue","../../../resources/js/views/twofaccounts/CreateUpdate.vue"],"sourcesContent":["\n\n\n","\n\n\n"],"names":["props","__props","inputId","useIdGenerator","valErrorId","useValidationErrorIdGenerator","legendId","fieldIsLocked","ref","hasBeenTrimmed","componentKey","emit","__emit","emitValue","e","value","alertOnSpace","forceRefresh","$2fauth","inject","router","useRouter","route","useRoute","user","useUserStore","twofaccounts","useTwofaccounts","bus","useBusStore","notify","useNotifyStore","form","reactive","Form","qrcodeForm","iconForm","otpDisplayProps","otp_types","digitsChoices","algorithms","uri","tempIcon","showQuickForm","showAlternatives","showOtpInModal","showAdvancedForm","ShowTwofaccountInModal","fetchingLogo","iconInput","OtpDisplayForAutoSave","OtpDisplayForQuickForm","OtpDisplayForAdvancedForm","qrcodeInputLabel","qrcodeInput","iconInputLabel","isEditMode","computed","groups","useGroups","item","trans","onMounted","twofaccountService","response","showOTP","error","nextTick","watch","val","_a","_b","to","from","fetchLogo","deleteTempIcon","handleSubmit","updateAccount","createAccount","data","oldIcon","index","acc","previewOTP","otp","cancelCreation","uploadIcon","incrementHotp","payload","mapDisplayerErrors","errorResponse","uploadQrcode","strip_tags","str"],"mappings":"s8CAQI,MAAMA,EAAQC,EAmDR,CAAE,QAAAC,CAAS,EAAGC,GAAeH,EAAM,UAAWA,EAAM,UAAYA,EAAM,QAAQ,EAC9E,CAAE,WAAAI,CAAU,EAAKC,GAA8BL,EAAM,SAAS,EAC9DM,EAAWH,GAAe,SAAUH,EAAM,SAAS,EAAE,QAErDO,EAAgBC,EAAIR,EAAM,YAAcA,EAAM,UAAU,EACxDS,EAAiBD,EAAI,EAAK,EAC1BE,EAAeF,EAAI,CAAC,EAEpBG,EAAOC,EAKb,SAASC,EAAUC,EAAG,CAClB,IAAIC,EAAQD,EAAE,OAAO,MAGjBd,EAAM,eAAe,UACrBe,EAAQA,EAAM,QAAQ,OAAQ,EAAE,GAGpCJ,EAAK,oBAAqBI,CAAK,CACvC,CAEI,SAASC,EAAaF,EAAG,CACrB,IAAIC,EAAQD,EAAE,OAAO,MACrBL,EAAe,MAAQM,EAAM,SAAS,GAAG,EAEzCJ,EAAK,oBAAqBI,CAAK,CACvC,CAEI,SAASE,EAAaH,EAAG,CACrBL,EAAe,MAAQK,EAAE,OAAO,MAAM,SAAS,GAAG,EAClDJ,EAAa,OAAS,CAC9B,k9EChFI,MAAMQ,EAAUC,GAAO,QAAQ,EACzBC,EAASC,GAAS,EAClBC,EAAQC,GAAQ,EAChBC,EAAOC,GAAY,EACnBC,EAAeC,GAAe,EAC9BC,EAAMC,GAAW,EACjBC,EAASC,GAAc,EACvBC,EAAOC,GAAS,IAAIC,GAAK,CAC3B,QAAS,GACT,QAAS,GACT,SAAU,GACV,KAAM,G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AAK,QAAS,CAAE,YAAa,EAAM,CAAA,EAC7D,KAAKgC,GAAY,CACVA,EAAS,SAAW,KAEpBW,EAAc,EACdjC,EAAS,MAAQsB,EAAS,KAAK,UAE9BlC,EAAO,KAAM,CAAC,KAAM+B,EAAM,6BAA8B,CAAC,QAAS+B,GAAW5D,EAAK,OAAO,CAAC,CAAC,CAAG,CAAA,CACtG,CAAA,EACA,MAAM,IAAM,CACTF,EAAO,KAAK,CAAE,KAAM+B,EAAM,6BAA8B,CAAC,QAAS+B,GAAW5D,EAAK,OAAO,CAAC,CAAC,CAAG,CAAA,CACjG,CAAA,EACA,QAAQ,IAAM,CACXgB,EAAa,MAAQ,EACxB,CAAA,EAEb,CAOI,SAAS4C,GAAWC,EAAK,CACrB,OAAOA,EAAI,QAAQ,iBAAkB,EAAE,CAC/C"} \ No newline at end of file diff --git a/public/build/assets/Edit-BxX3QJ9W.js b/public/build/assets/Edit-CvZ7PTDc.js similarity index 61% rename from public/build/assets/Edit-BxX3QJ9W.js rename to public/build/assets/Edit-CvZ7PTDc.js index 163ad4e8..2640ebef 100644 --- a/public/build/assets/Edit-BxX3QJ9W.js +++ b/public/build/assets/Edit-CvZ7PTDc.js @@ -1 +1,2 @@ -import{u as h,b as _,d as b,H as s,e as a,f as y,k as F,p as v,h as B,m as r,i as t,C as g}from"./app-CuhK3jij.js";import{F as C}from"./Form-o2lWAB-o.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const E={__name:"Edit",props:{credentialId:{type:String,default:""}},setup(i){const u=h(),m=_(),e=b(new C({name:s("auth.webauthn.my_device")})),d=i;function c(){e.patch("/webauthn/credentials/"+d.credentialId+"/name").then(()=>{m.success({text:s("auth.webauthn.device_successfully_registered")}),u.push({name:"settings.webauthn.devices"})})}return(l,n)=>{const p=a("FormField"),f=a("FormButtons"),w=a("FormWrapper");return y(),F(w,{title:"auth.webauthn.rename_device"},{default:v(()=>[B("form",{onSubmit:g(c,["prevent"]),onKeydown:n[1]||(n[1]=o=>t(e).onKeydown(o))},[r(p,{modelValue:t(e).name,"onUpdate:modelValue":n[0]||(n[0]=o=>t(e).name=o),fieldName:"name",fieldError:t(e).errors.get("name"),inputType:"text",label:"commons.new_name",autofocus:""},null,8,["modelValue","fieldError"]),r(f,{submitId:"btnEditCredential",isBusy:t(e).isBusy,caption:l.$t("commons.save"),showCancelButton:!0,cancelLandingView:"settings.webauthn.devices"},null,8,["isBusy","caption"])],32)]),_:1})}}};export{E as default}; +import{a as h,c as _,H as s,h as y,k as b,l as a,m as F,e as v,j as r,f as t,G as B,p as g}from"./app-CzxRjCVM.js";import{F as V}from"./Form-EFIuWKGI.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const E={__name:"Edit",props:{credentialId:{type:String,default:""}},setup(i){const u=g(),m=h(),e=_(new V({name:s("auth.webauthn.my_device")})),c=i;function d(){e.patch("/webauthn/credentials/"+c.credentialId+"/name").then(()=>{m.success({text:s("auth.webauthn.device_successfully_registered")}),u.push({name:"settings.webauthn.devices"})})}return(l,n)=>{const p=a("FormField"),f=a("FormButtons"),w=a("FormWrapper");return F(),y(w,{title:"auth.webauthn.rename_device"},{default:b(()=>[v("form",{onSubmit:B(d,["prevent"]),onKeydown:n[1]||(n[1]=o=>t(e).onKeydown(o))},[r(p,{modelValue:t(e).name,"onUpdate:modelValue":n[0]||(n[0]=o=>t(e).name=o),fieldName:"name",fieldError:t(e).errors.get("name"),inputType:"text",label:"commons.new_name",autofocus:""},null,8,["modelValue","fieldError"]),r(f,{submitId:"btnEditCredential",isBusy:t(e).isBusy,caption:l.$t("commons.save"),showCancelButton:!0,cancelLandingView:"settings.webauthn.devices"},null,8,["isBusy","caption"])],32)]),_:1})}}};export{E as default}; +//# sourceMappingURL=Edit-CvZ7PTDc.js.map diff --git a/public/build/assets/Edit-CvZ7PTDc.js.map b/public/build/assets/Edit-CvZ7PTDc.js.map new file mode 100644 index 00000000..c38ca486 --- /dev/null +++ b/public/build/assets/Edit-CvZ7PTDc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Edit-CvZ7PTDc.js","sources":["../../../resources/js/views/settings/Credentials/Edit.vue"],"sourcesContent":["\n\n"],"names":["router","useRouter","notify","useNotifyStore","form","reactive","Form","trans","props","__props","updateCredential"],"mappings":"gUAII,MAAMA,EAASC,EAAS,EAClBC,EAASC,EAAc,EACvBC,EAAOC,EAAS,IAAIC,EAAK,CAC3B,KAAMC,EAAM,yBAAyB,CAC7C,CAAK,CAAC,EAEIC,EAAQC,EAOd,SAASC,GAAmB,CACxBN,EAAK,MAAM,yBAA2BI,EAAM,aAAe,OAAO,EACjE,KAAK,IAAM,CACRN,EAAO,QAAQ,CAAE,KAAMK,EAAM,8CAA8C,CAAG,CAAA,EAC9EP,EAAO,KAAK,CAAE,KAAM,2BAA6B,CAAA,CACpD,CAAA,CACT"} \ No newline at end of file diff --git a/public/build/assets/Error-7hWphpNC.js b/public/build/assets/Error-7hWphpNC.js new file mode 100644 index 00000000..4f647c6d --- /dev/null +++ b/public/build/assets/Error-7hWphpNC.js @@ -0,0 +1,2 @@ +import{a as h,r as b,x as k,s as V,o as w,H as v,d as t,j as N,k as $,f as s,C as x,$ as B,l as C,m as a,e as n,t as u,i,g as M,p as q}from"./app-CzxRjCVM.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const R={key:0,class:"error-message"},D={key:1,class:"error-message"},E={key:0,class:"has-text-grey-lighter"},F={key:1,class:"has-text-grey-lighter"},H={key:2,class:"is-size-7 is-family-code"},j={__name:"Error",props:{closable:{type:Boolean,default:!0}},setup(c){const o=h(),m=q(),l=B(),d=b(!0),p=k(()=>!1),g=c;V(d,r=>{r==!1&&f()}),w(()=>{l.query.err&&(o.message=v("errors."+l.query.err))});function f(){window.history.length>1&&l.name!=="404"&&l.name!=="notFound"&&!l.query.err?m.go(-1):m.push({name:"accounts"})}return(r,e)=>{const y=C("modal");return a(),t("div",null,[N(y,{modelValue:s(d),"onUpdate:modelValue":e[0]||(e[0]=_=>x(d)?d.value=_:null),closable:g.closable},{default:$(()=>[r.$route.name=="404"||r.$route.name=="notFound"?(a(),t("div",R,[e[1]||(e[1]=n("p",{class:"error-404"},null,-1)),n("p",null,u(r.$t("errors.resource_not_found")),1)])):(a(),t("div",D,[e[3]||(e[3]=n("p",{class:"error-generic"},null,-1)),n("p",null,u(r.$t("errors.error_occured")),1),s(o).message?(a(),t("p",E,u(s(o).message),1)):i("",!0),s(o).originalMessage?(a(),t("p",F,u(s(o).originalMessage),1)):i("",!0),s(p)&&s(o).debug?(a(),t("p",H,[e[2]||(e[2]=n("br",null,null,-1)),M(u(s(o).debug),1)])):i("",!0)]))]),_:1},8,["modelValue","closable"])])}}};export{j as default}; +//# sourceMappingURL=Error-7hWphpNC.js.map diff --git a/public/build/assets/Error-7hWphpNC.js.map b/public/build/assets/Error-7hWphpNC.js.map new file mode 100644 index 00000000..bebc84ec --- /dev/null +++ b/public/build/assets/Error-7hWphpNC.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Error-7hWphpNC.js","sources":["../../../resources/js/views/Error.vue"],"sourcesContent":["\n\n"],"names":["errorHandler","useNotifyStore","router","useRouter","route","useRoute","showModal","ref","showDebug","computed","props","__props","watch","val","exit","onMounted","trans"],"mappings":"8fAGI,MAAMA,EAAeC,EAAe,EAC9BC,EAASC,EAAU,EACnBC,EAAQC,EAAS,EAEjBC,EAAYC,EAAI,EAAI,EACpBC,EAAYC,EAAS,IAAM,EAAsC,EAEjEC,EAAQC,EAORC,EAAAN,EAAYO,GAAQ,CAClBA,GAAO,IACFC,EAAA,CACT,CACH,EAEDC,EAAU,IAAM,CACRX,EAAM,MAAM,MACZJ,EAAa,QAAUgB,EAAM,UAAYZ,EAAM,MAAM,GAAG,EAC5D,CACH,EAKD,SAASU,GAAO,CACL,OAAA,QAAQ,OAAS,GAAKV,EAAM,OAAS,OAASA,EAAM,OAAS,YAAc,CAACA,EAAM,MAAM,IACzFF,EAAO,GAAG,EAAE,EACZA,EAAO,KAAK,CAAE,KAAM,WAAY,CAAA"} \ No newline at end of file diff --git a/public/build/assets/Error-rNpmSIEZ.js b/public/build/assets/Error-rNpmSIEZ.js deleted file mode 100644 index 95e0a7c8..00000000 --- a/public/build/assets/Error-rNpmSIEZ.js +++ /dev/null @@ -1 +0,0 @@ -import{b as y,u as b,$ as k,r as V,x as w,s as v,o as N,H as $,e as x,f as r,g as t,m as B,p as M,i as e,D as q,h as l,t as n,l as c,j as C}from"./app-CuhK3jij.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const D={key:0,class:"error-message"},R=l("p",{class:"error-404"},null,-1),E={key:1,class:"error-message"},F=l("p",{class:"error-generic"},null,-1),H={key:0,class:"has-text-grey-lighter"},S={key:1,class:"has-text-grey-lighter"},j={key:2,class:"is-size-7 is-family-code"},z=l("br",null,null,-1),U={__name:"Error",props:{closable:{type:Boolean,default:!0}},setup(m){const s=y(),d=b(),a=k(),u=V(!0),p=w(()=>!1),_=m;v(u,o=>{o==!1&&g()}),N(()=>{a.query.err&&(s.message=$("errors."+a.query.err))});function g(){window.history.length>1&&a.name!=="404"&&a.name!=="notFound"&&!a.query.err?d.go(-1):d.push({name:"accounts"})}return(o,i)=>{const h=x("modal");return r(),t("div",null,[B(h,{modelValue:e(u),"onUpdate:modelValue":i[0]||(i[0]=f=>q(u)?u.value=f:null),closable:_.closable},{default:M(()=>[o.$route.name=="404"||o.$route.name=="notFound"?(r(),t("div",D,[R,l("p",null,n(o.$t("errors.resource_not_found")),1)])):(r(),t("div",E,[F,l("p",null,n(o.$t("errors.error_occured")),1),e(s).message?(r(),t("p",H,n(e(s).message),1)):c("",!0),e(s).originalMessage?(r(),t("p",S,n(e(s).originalMessage),1)):c("",!0),e(p)&&e(s).debug?(r(),t("p",j,[z,C(n(e(s).debug),1)])):c("",!0)]))]),_:1},8,["modelValue","closable"])])}}};export{U as default}; diff --git a/public/build/assets/Form-o2lWAB-o.js b/public/build/assets/Form-EFIuWKGI.js similarity index 96% rename from public/build/assets/Form-o2lWAB-o.js rename to public/build/assets/Form-EFIuWKGI.js index 6dafd710..179cc0a6 100644 --- a/public/build/assets/Form-o2lWAB-o.js +++ b/public/build/assets/Form-EFIuWKGI.js @@ -1 +1,2 @@ -import{a4 as l}from"./app-CuhK3jij.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */class f{constructor(){this.errors={}}set(t,s){typeof t=="object"?this.errors=t:this.set({...this.errors,[t]:c(s)})}all(){return this.errors}has(t){return this.errors.hasOwnProperty(t)}hasAny(...t){return t.some(s=>this.has(s))}any(){return Object.keys(this.errors).length>0}get(t){if(this.has(t))return this.getAll(t)[0]}getAll(t){return c(this.errors[t]||[])}only(...t){const s=[];return t.forEach(r=>{const e=this.get(r);e&&s.push(e)}),s}flatten(){return Object.values(this.errors).reduce((t,s)=>t.concat(s),[])}clear(t){const s={};t&&Object.keys(this.errors).forEach(r=>{r!==t&&(s[r]=this.errors[r])}),this.set(s)}}function c(o){return Array.isArray(o)?o:[o]}class i{constructor(t={}){this.axios=l("web"),this.isBusy=!1,this.isDisabled=!1,this.errors=new f,this.originalData=this.deepCopy(t),Object.assign(this,t)}fill(t){this.keys().forEach(s=>{this[s]=t[s]})}setOriginal(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this.originalData[t]=this.deepCopy(this[t])})}hasChanged(){return this.keys().some(t=>this[t]!==this.originalData[t])}fillWithKeyValueObject(t){this.keys().forEach(s=>{const r=t.find(e=>e.key===s.toString());r!=null&&(this[s]=r.value)})}data(){return this.keys().reduce((t,s)=>({...t,[s]:this[s]}),{})}keys(){return Object.keys(this).filter(t=>!i.ignore.includes(t))}startProcessing(){this.errors.clear(),this.isBusy=!0}finishProcessing(){this.isBusy=!1}clear(){this.errors.clear()}reset(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this[t]=this.deepCopy(this.originalData[t])})}get(t,s={}){return this.submit("get",t,s)}post(t,s={}){return this.submit("post",t,s)}patch(t,s={}){return this.submit("patch",t,s)}put(t,s={}){return this.submit("put",t,s)}delete(t,s={}){return this.submit("delete",t,s)}submit(t,s,r={}){this.startProcessing();const e=t==="get"?{params:this.data()}:this.data();return new Promise((a,u)=>{this.axios.request({url:this.route(s),method:t,data:e,...r}).then(h=>{this.finishProcessing(),a(h)}).catch(h=>{var n;this.isBusy=!1,h.response&&this.errors.set(this.extractErrors(h.response)),((n=h.response)==null?void 0:n.status)!=422&&u(h)})})}upload(t,s={}){return this.startProcessing(),new Promise((r,e)=>{this.axios.post(this.route(t),this.data(),{headers:{"Content-Type":"multipart/form-data"},...s}).then(a=>{this.finishProcessing(),r(a)}).catch(a=>{this.isBusy=!1,a.response&&this.errors.set(this.extractErrors(a.response)),e(a)})})}extractErrors(t){return!t.data||typeof t.data!="object"?{error:i.errorMessage}:t.data.errors?{...t.data.errors}:t.data.message?{error:t.data.message}:{...t.data}}route(t,s={}){let r=t;return i.routes.hasOwnProperty(t)&&(r=decodeURI(i.routes[t])),typeof s!="object"&&(s={id:s}),Object.keys(s).forEach(e=>{r=r.replace(`{${e}}`,s[e])}),r}onKeydown(t){t.target.name&&this.errors.clear(t.target.name)}deepCopy(t){if(t===null||typeof t!="object")return t;const s=Array.isArray(t)?[]:{};return Object.keys(t).forEach(r=>{s[r]=this.deepCopy(t[r])}),s}}i.routes={};i.errorMessage="Something went wrong. Please try again.";i.ignore=["isBusy","isDisabled","errors","originalData","axios"];export{i as F}; +import{a4 as l}from"./app-CzxRjCVM.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */class f{constructor(){this.errors={}}set(t,s){typeof t=="object"?this.errors=t:this.set({...this.errors,[t]:c(s)})}all(){return this.errors}has(t){return this.errors.hasOwnProperty(t)}hasAny(...t){return t.some(s=>this.has(s))}any(){return Object.keys(this.errors).length>0}get(t){if(this.has(t))return this.getAll(t)[0]}getAll(t){return c(this.errors[t]||[])}only(...t){const s=[];return t.forEach(r=>{const e=this.get(r);e&&s.push(e)}),s}flatten(){return Object.values(this.errors).reduce((t,s)=>t.concat(s),[])}clear(t){const s={};t&&Object.keys(this.errors).forEach(r=>{r!==t&&(s[r]=this.errors[r])}),this.set(s)}}function c(o){return Array.isArray(o)?o:[o]}class i{constructor(t={}){this.axios=l("web"),this.isBusy=!1,this.isDisabled=!1,this.errors=new f,this.originalData=this.deepCopy(t),Object.assign(this,t)}fill(t){this.keys().forEach(s=>{this[s]=t[s]})}setOriginal(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this.originalData[t]=this.deepCopy(this[t])})}hasChanged(){return this.keys().some(t=>this[t]!==this.originalData[t])}fillWithKeyValueObject(t){this.keys().forEach(s=>{const r=t.find(e=>e.key===s.toString());r!=null&&(this[s]=r.value)})}data(){return this.keys().reduce((t,s)=>({...t,[s]:this[s]}),{})}keys(){return Object.keys(this).filter(t=>!i.ignore.includes(t))}startProcessing(){this.errors.clear(),this.isBusy=!0}finishProcessing(){this.isBusy=!1}clear(){this.errors.clear()}reset(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this[t]=this.deepCopy(this.originalData[t])})}get(t,s={}){return this.submit("get",t,s)}post(t,s={}){return this.submit("post",t,s)}patch(t,s={}){return this.submit("patch",t,s)}put(t,s={}){return this.submit("put",t,s)}delete(t,s={}){return this.submit("delete",t,s)}submit(t,s,r={}){this.startProcessing();const e=t==="get"?{params:this.data()}:this.data();return new Promise((a,u)=>{this.axios.request({url:this.route(s),method:t,data:e,...r}).then(h=>{this.finishProcessing(),a(h)}).catch(h=>{var n;this.isBusy=!1,h.response&&this.errors.set(this.extractErrors(h.response)),((n=h.response)==null?void 0:n.status)!=422&&u(h)})})}upload(t,s={}){return this.startProcessing(),new Promise((r,e)=>{this.axios.post(this.route(t),this.data(),{headers:{"Content-Type":"multipart/form-data"},...s}).then(a=>{this.finishProcessing(),r(a)}).catch(a=>{this.isBusy=!1,a.response&&this.errors.set(this.extractErrors(a.response)),e(a)})})}extractErrors(t){return!t.data||typeof t.data!="object"?{error:i.errorMessage}:t.data.errors?{...t.data.errors}:t.data.message?{error:t.data.message}:{...t.data}}route(t,s={}){let r=t;return i.routes.hasOwnProperty(t)&&(r=decodeURI(i.routes[t])),typeof s!="object"&&(s={id:s}),Object.keys(s).forEach(e=>{r=r.replace(`{${e}}`,s[e])}),r}onKeydown(t){t.target.name&&this.errors.clear(t.target.name)}deepCopy(t){if(t===null||typeof t!="object")return t;const s=Array.isArray(t)?[]:{};return Object.keys(t).forEach(r=>{s[r]=this.deepCopy(t[r])}),s}}i.routes={};i.errorMessage="Something went wrong. Please try again.";i.ignore=["isBusy","isDisabled","errors","originalData","axios"];export{i as F}; +//# sourceMappingURL=Form-EFIuWKGI.js.map diff --git a/public/build/assets/Form-EFIuWKGI.js.map b/public/build/assets/Form-EFIuWKGI.js.map new file mode 100644 index 00000000..5479edfa --- /dev/null +++ b/public/build/assets/Form-EFIuWKGI.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Form-EFIuWKGI.js","sources":["../../../resources/js/components/formElements/FormErrors.js","../../../resources/js/components/formElements/Form.js"],"sourcesContent":["\nexport default class Errors {\n /**\n * Create a new error bag instance.\n */\n constructor () {\n this.errors = {}\n }\n\n /**\n * Set the errors object or field error messages.\n *\n * @param {Object|String} field\n * @param {Array|String|undefined} messages\n */\n set (field, messages) {\n if (typeof field === 'object') {\n this.errors = field\n } else {\n this.set({ ...this.errors, [field]: arrayWrap(messages) })\n }\n }\n\n /**\n * Get all the errors.\n *\n * @return {Object}\n */\n all () {\n return this.errors\n }\n\n /**\n * Determine if there is an error for the given field.\n *\n * @param {String} field\n * @return {Boolean}\n */\n has (field) {\n return this.errors.hasOwnProperty(field)\n }\n\n /**\n * Determine if there are any errors for the given fields.\n *\n * @param {...String} fields\n * @return {Boolean}\n */\n hasAny (...fields) {\n return fields.some(field => this.has(field))\n }\n\n /**\n * Determine if there are any errors.\n *\n * @return {Boolean}\n */\n any () {\n return Object.keys(this.errors).length > 0\n }\n\n /**\n * Get the first error message for the given field.\n *\n * @param String} field\n * @return {String|undefined}\n */\n get (field) {\n if (this.has(field)) {\n return this.getAll(field)[0]\n }\n }\n\n /**\n * Get all the error messages for the given field.\n *\n * @param {String} field\n * @return {Array}\n */\n getAll (field) {\n return arrayWrap(this.errors[field] || [])\n }\n\n /**\n * Get the error message for the given fields.\n *\n * @param {...String} fields\n * @return {Array}\n */\n only (...fields) {\n const messages = []\n\n fields.forEach(field => {\n const message = this.get(field)\n\n if (message) {\n messages.push(message)\n }\n })\n\n return messages\n }\n\n /**\n * Get all the errors in a flat array.\n *\n * @return {Array}\n */\n flatten () {\n return Object.values(this.errors).reduce((a, b) => a.concat(b), [])\n }\n\n /**\n * Clear one or all error fields.\n *\n * @param {String|undefined} field\n */\n clear (field) {\n const errors = {}\n\n if (field) {\n Object.keys(this.errors).forEach(key => {\n if (key !== field) {\n errors[key] = this.errors[key]\n }\n })\n }\n\n this.set(errors)\n }\n}\n\n/**\n * If the given value is not an array, wrap it in one.\n *\n * @param {Any} value\n * @return {Array}\n */\nfunction arrayWrap (value) {\n return Array.isArray(value) ? value : [value]\n}","import { httpClientFactory } from '@/services/httpClientFactory'\nimport Errors from './FormErrors'\n\nclass Form {\n /**\n * Create a new form instance.\n *\n * @param {Object} data\n */\n constructor (data = {}) {\n this.axios = httpClientFactory('web')\n this.isBusy = false\n this.isDisabled = false\n // this.successful = false\n this.errors = new Errors()\n this.originalData = this.deepCopy(data)\n\n Object.assign(this, data)\n }\n\n /**\n * Fill form data.\n *\n * @param {Object} data\n */\n fill (data) {\n this.keys().forEach(key => {\n this[key] = data[key]\n })\n }\n\n /**\n * Update original form data.\n */\n setOriginal () {\n Object.keys(this)\n .filter(key => !Form.ignore.includes(key))\n .forEach(key => {\n this.originalData[key] = this.deepCopy(this[key])\n })\n }\n\n /**\n * Fill form data.\n *\n * @param {Object} data\n */\n hasChanged () {\n return this.keys().some(key => this[key] !== this.originalData[key])\n }\n\n /**\n * Fill form data.\n *\n * @param {Object} data\n */\n fillWithKeyValueObject (data) {\n this.keys().forEach(key => {\n const keyValueObject = data.find(s => s.key === key.toString())\n if(keyValueObject != undefined) {\n this[key] = keyValueObject.value\n }\n })\n }\n\n /**\n * Get the form data.\n *\n * @return {Object}\n */\n data () {\n return this.keys().reduce((data, key) => (\n { ...data, [key]: this[key] }\n ), {})\n }\n\n /**\n * Get the form data keys.\n *\n * @return {Array}\n */\n keys () {\n return Object.keys(this)\n .filter(key => !Form.ignore.includes(key))\n }\n\n /**\n * Start processing the form.\n */\n startProcessing () {\n this.errors.clear()\n this.isBusy = true\n // this.successful = false\n }\n\n /**\n * Finish processing the form.\n */\n finishProcessing () {\n this.isBusy = false\n // this.successful = true\n }\n\n /**\n * Clear the form errors.\n */\n clear () {\n this.errors.clear()\n // this.successful = false\n }\n\n /**\n * Reset the form fields.\n */\n reset () {\n Object.keys(this)\n .filter(key => !Form.ignore.includes(key))\n .forEach(key => {\n this[key] = this.deepCopy(this.originalData[key])\n })\n }\n\n /**\n * Submit the form via a GET request.\n *\n * @param {String} url\n * @param {Object} config (axios config)\n * @return {Promise}\n */\n get (url, config = {}) {\n return this.submit('get', url, config)\n }\n\n /**\n * Submit the form via a POST request.\n *\n * @param {String} url\n * @param {Object} config (axios config)\n * @return {Promise}\n */\n post (url, config = {}) {\n return this.submit('post', url, config)\n }\n\n /**\n * Submit the form via a PATCH request.\n *\n * @param {String} url\n * @param {Object} config (axios config)\n * @return {Promise}\n */\n patch (url, config = {}) {\n return this.submit('patch', url, config)\n }\n\n /**\n * Submit the form via a PUT request.\n *\n * @param {String} url\n * @param {Object} config (axios config)\n * @return {Promise}\n */\n put (url, config = {}) {\n return this.submit('put', url, config)\n }\n\n /**\n * Submit the form via a DELETE request.\n *\n * @param {String} url\n * @param {Object} config (axios config)\n * @return {Promise}\n */\n delete (url, config = {}) {\n return this.submit('delete', url, config)\n }\n\n /**\n * Submit the form data via an HTTP request.\n *\n * @param {String} method (get, post, patch, put)\n * @param {String} url\n * @param {Object} config (axios config)\n * @return {Promise}\n */\n submit (method, url, config = {}) {\n this.startProcessing()\n\n const data = method === 'get'\n ? { params: this.data() }\n : this.data()\n\n return new Promise((resolve, reject) => {\n // (Form.axios || axios).request({ url: this.route(url), method, data, ...config })\n this.axios.request({ url: this.route(url), method, data, ...config })\n .then(response => {\n this.finishProcessing()\n\n resolve(response)\n })\n .catch(error => {\n this.isBusy = false\n\n if (error.response) {\n this.errors.set(this.extractErrors(error.response))\n }\n if (error.response?.status != 422) {\n reject(error)\n }\n })\n })\n }\n\n /**\n * Submit the form data via an HTTP request.\n *\n * @param {String} method (get, post, patch, put)\n * @param {String} url\n * @param {Object} config (axios config)\n * @return {Promise}\n */\n upload (url, config = {}) {\n this.startProcessing()\n\n return new Promise((resolve, reject) => {\n // https://www.npmjs.com/package/axios#-automatic-serialization-to-formdata\n this.axios.post(this.route(url), this.data(), { headers: {'Content-Type' : 'multipart/form-data'}, ...config })\n .then(response => {\n this.finishProcessing()\n\n resolve(response)\n })\n .catch(error => {\n this.isBusy = false\n\n if (error.response) {\n this.errors.set(this.extractErrors(error.response))\n }\n // if (error.response?.status != 422) {\n reject(error)\n // }\n })\n })\n }\n\n /**\n * Extract the errors from the response object.\n *\n * @param {Object} response\n * @return {Object}\n */\n extractErrors (response) {\n if (!response.data || typeof response.data !== 'object') {\n return { error: Form.errorMessage }\n }\n\n if (response.data.errors) {\n return { ...response.data.errors }\n }\n\n if (response.data.message) {\n return { error: response.data.message }\n }\n\n return { ...response.data }\n }\n\n /**\n * Get a named route.\n *\n * @param {String} name\n * @return {Object} parameters\n * @return {String}\n */\n route (name, parameters = {}) {\n let url = name\n\n if (Form.routes.hasOwnProperty(name)) {\n url = decodeURI(Form.routes[name])\n }\n\n if (typeof parameters !== 'object') {\n parameters = { id: parameters }\n }\n\n Object.keys(parameters).forEach(key => {\n url = url.replace(`{${key}}`, parameters[key])\n })\n\n return url\n }\n\n /**\n * Clear errors on keydown.\n *\n * @param {KeyboardEvent} event\n */\n onKeydown (event) {\n if (event.target.name) {\n this.errors.clear(event.target.name)\n }\n }\n\n /**\n * Deep copy the given object.\n *\n * @param {Object} obj\n * @return {Object}\n */\n deepCopy (obj) {\n if (obj === null || typeof obj !== 'object') {\n return obj\n }\n \n const copy = Array.isArray(obj) ? [] : {}\n \n Object.keys(obj).forEach(key => {\n copy[key] = this.deepCopy(obj[key])\n })\n \n return copy\n }\n}\n\nForm.routes = {}\nForm.errorMessage = 'Something went wrong. Please try again.'\nForm.ignore = ['isBusy', 'isDisabled', 'errors', 'originalData', 'axios']\n\nexport default Form\n"],"names":["Errors","field","messages","arrayWrap","fields","message","a","b","errors","key","value","Form","data","httpClientFactory","keyValueObject","s","url","config","method","resolve","reject","response","error","_a","name","parameters","event","obj","copy"],"mappings":"+HACe,MAAMA,CAAO,CAI1B,aAAe,CACb,KAAK,OAAS,CAAA,CAClB,CAQE,IAAKC,EAAOC,EAAU,CAChB,OAAOD,GAAU,SACnB,KAAK,OAASA,EAEd,KAAK,IAAI,CAAE,GAAG,KAAK,OAAQ,CAACA,CAAK,EAAGE,EAAUD,CAAQ,CAAG,CAAA,CAE/D,CAOE,KAAO,CACL,OAAO,KAAK,MAChB,CAQE,IAAKD,EAAO,CACV,OAAO,KAAK,OAAO,eAAeA,CAAK,CAC3C,CAQE,UAAWG,EAAQ,CACjB,OAAOA,EAAO,KAAKH,GAAS,KAAK,IAAIA,CAAK,CAAC,CAC/C,CAOE,KAAO,CACL,OAAO,OAAO,KAAK,KAAK,MAAM,EAAE,OAAS,CAC7C,CAQE,IAAKA,EAAO,CACV,GAAI,KAAK,IAAIA,CAAK,EAChB,OAAO,KAAK,OAAOA,CAAK,EAAE,CAAC,CAEjC,CAQE,OAAQA,EAAO,CACb,OAAOE,EAAU,KAAK,OAAOF,CAAK,GAAK,CAAE,CAAA,CAC7C,CAQE,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EAAa,GAAI,CAC1B,IAAIT,EAAMQ,EAEV,OAAIb,EAAK,OAAO,eAAea,CAAI,IAC/BR,EAAM,UAAUL,EAAK,OAAOa,CAAI,CAAC,GAGjC,OAAOC,GAAe,WACtBA,EAAa,CAAE,GAAIA,CAAU,GAGjC,OAAO,KAAKA,CAAU,EAAE,QAAQhB,GAAO,CACnCO,EAAMA,EAAI,QAAQ,IAAIP,CAAG,IAAKgB,EAAWhB,CAAG,CAAC,CAChD,CAAA,EAEMO,CACf,CAOI,UAAWU,EAAO,CACVA,EAAM,OAAO,MACb,KAAK,OAAO,MAAMA,EAAM,OAAO,IAAI,CAE/C,CAQI,SAAUC,EAAK,CACX,GAAIA,IAAQ,MAAQ,OAAOA,GAAQ,SAC/B,OAAOA,EAGX,MAAMC,EAAO,MAAM,QAAQD,CAAG,EAAI,CAAA,EAAK,CAAA,EAEvC,cAAO,KAAKA,CAAG,EAAE,QAAQlB,GAAO,CAC5BmB,EAAKnB,CAAG,EAAI,KAAK,SAASkB,EAAIlB,CAAG,CAAC,CACrC,CAAA,EAEMmB,CACf,CACA,CAEAjB,EAAK,OAAS,CAAA,EACdA,EAAK,aAAe,0CACpBA,EAAK,OAAS,CAAC,SAAU,aAAc,SAAU,eAAgB,OAAO"} \ No newline at end of file diff --git a/public/build/assets/Groups-CF7f2juX.js b/public/build/assets/Groups-CF7f2juX.js deleted file mode 100644 index 840709d4..00000000 --- a/public/build/assets/Groups-CF7f2juX.js +++ /dev/null @@ -1 +0,0 @@ -import{u as C,V as $,r as w,o as z,a1 as b,e as c,f as l,k as F,p as u,h as o,t as a,m as s,j as _,i,g as m,F as G,E as V,n as R,U as E,l as h}from"./app-CuhK3jij.js";import{u as N}from"./bus-BalNs30H.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const I={class:"title has-text-grey-dark"},L={class:"is-size-7-mobile"},W={class:"mt-3 mb-6"},A={key:0},T=["onClick","title"],x={class:"is-family-primary is-size-6 is-size-7-mobile has-text-grey"},M={class:"mt-2 is-size-7 is-pulled-right"},S={key:1,class:"has-text-centered"},U={class:"is-size-4"},J={__name:"Groups",setup(j){C();const t=$(),f=N(),p=w(!1);return z(async()=>{p.value=t.isEmpty,await t.fetch().finally(()=>{p.value=!1})}),b((e,g)=>{var n;e.name=="editGroup"&&(f.editedGroupName=(n=t.items.find(d=>d.id==e.params.groupId))==null?void 0:n.name)}),(e,g)=>{const n=c("FontAwesomeIcon"),d=c("RouterLink"),k=c("ButtonBackCloseCancel"),y=c("VueFooter"),v=c("ResponsiveWidthWrapper");return l(),F(v,null,{default:u(()=>[o("h1",I,a(e.$t("groups.groups")),1),o("div",L,a(e.$t("groups.manage_groups_legend")),1),o("div",W,[s(d,{class:"is-link mt-5",to:{name:"createGroup"}},{default:u(()=>[s(n,{icon:["fas","plus-circle"]}),_(" "+a(e.$t("groups.create_group")),1)]),_:1})]),i(t).isEmpty?h("",!0):(l(),m("div",A,[(l(!0),m(G,null,V(i(t).withoutTheAllGroup,r=>(l(),m("div",{key:r.id,class:"group-item is-size-5 is-size-6-mobile"},[_(a(r.name)+" ",1),s(i(E),null,{default:u(({mode:B})=>[o("button",{class:R(["button tag is-pulled-right",B=="dark"?"is-dark":"is-white"]),onClick:q=>i(t).delete(r.id),title:e.$t("commons.delete")},a(e.$t("commons.delete")),11,T)]),_:2},1024),s(d,{to:{name:"editGroup",params:{groupId:r.id}},class:"has-text-grey px-1",title:e.$t("commons.rename")},{default:u(()=>[s(n,{icon:["fas","pen-square"]})]),_:2},1032,["to","title"]),o("span",x,a(e.$t("groups.x_accounts",{count:r.twofaccounts_count})),1)]))),128)),o("div",M,a(e.$t("groups.deleting_group_does_not_delete_accounts")),1)])),i(p)&&i(t).isEmpty?(l(),m("div",S,[o("span",U,[s(n,{icon:["fas","spinner"],spin:""})])])):h("",!0),s(y,{showButtons:!0},{default:u(()=>[s(k,{returnTo:{name:"accounts"},action:"close"})]),_:1})]),_:1})}}};export{J as default}; diff --git a/public/build/assets/Groups-Dk16tBRO.js b/public/build/assets/Groups-Dk16tBRO.js new file mode 100644 index 00000000..47f5719a --- /dev/null +++ b/public/build/assets/Groups-Dk16tBRO.js @@ -0,0 +1,2 @@ +import{T as C,r as $,o as b,a1 as w,h as z,k as c,l,m as u,e as o,t as a,j as s,g as _,f as i,d as p,F,D as G,n as R,U as V,i as h,p as N}from"./app-CzxRjCVM.js";import{u as E}from"./bus-BNAtGMCo.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const I={class:"title has-text-grey-dark"},L={class:"is-size-7-mobile"},T={class:"mt-3 mb-6"},W={key:0},A=["onClick","title"],x={class:"is-family-primary is-size-6 is-size-7-mobile has-text-grey"},D={class:"mt-2 is-size-7 is-pulled-right"},M={key:1,class:"has-text-centered"},S={class:"is-size-4"},J={__name:"Groups",setup(U){N();const t=C(),f=E(),m=$(!1);return b(async()=>{m.value=t.isEmpty,await t.fetch().finally(()=>{m.value=!1})}),w((e,g)=>{var n;e.name=="editGroup"&&(f.editedGroupName=(n=t.items.find(d=>d.id==e.params.groupId))==null?void 0:n.name)}),(e,g)=>{const n=l("FontAwesomeIcon"),d=l("RouterLink"),k=l("ButtonBackCloseCancel"),y=l("VueFooter"),v=l("ResponsiveWidthWrapper");return u(),z(v,null,{default:c(()=>[o("h1",I,a(e.$t("groups.groups")),1),o("div",L,a(e.$t("groups.manage_groups_legend")),1),o("div",T,[s(d,{class:"is-link mt-5",to:{name:"createGroup"}},{default:c(()=>[s(n,{icon:["fas","plus-circle"]}),_(" "+a(e.$t("groups.create_group")),1)]),_:1})]),i(t).isEmpty?h("",!0):(u(),p("div",W,[(u(!0),p(F,null,G(i(t).withoutTheAllGroup,r=>(u(),p("div",{key:r.id,class:"group-item is-size-5 is-size-6-mobile"},[_(a(r.name)+" ",1),s(i(V),null,{default:c(({mode:B})=>[o("button",{type:"button",class:R(["button tag is-pulled-right",B=="dark"?"is-dark":"is-white"]),onClick:j=>i(t).delete(r.id),title:e.$t("commons.delete")},a(e.$t("commons.delete")),11,A)]),_:2},1024),s(d,{to:{name:"editGroup",params:{groupId:r.id}},class:"has-text-grey px-1",title:e.$t("commons.rename")},{default:c(()=>[s(n,{icon:["fas","pen-square"]})]),_:2},1032,["to","title"]),o("span",x,a(e.$t("groups.x_accounts",{count:r.twofaccounts_count})),1)]))),128)),o("div",D,a(e.$t("groups.deleting_group_does_not_delete_accounts")),1)])),i(m)&&i(t).isEmpty?(u(),p("div",M,[o("span",S,[s(n,{icon:["fas","spinner"],spin:""})])])):h("",!0),s(y,{showButtons:!0},{default:c(()=>[s(k,{returnTo:{name:"accounts"},action:"close"})]),_:1})]),_:1})}}};export{J as default}; +//# sourceMappingURL=Groups-Dk16tBRO.js.map diff --git a/public/build/assets/Groups-Dk16tBRO.js.map b/public/build/assets/Groups-Dk16tBRO.js.map new file mode 100644 index 00000000..d2ec0943 --- /dev/null +++ b/public/build/assets/Groups-Dk16tBRO.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Groups-Dk16tBRO.js","sources":["../../../resources/js/views/groups/Groups.vue"],"sourcesContent":["\n\n"],"names":["useRouter","groups","useGroups","bus","useBusStore","isFetching","ref","onMounted","onBeforeRouteLeave","to","from","_a","g"],"mappings":"smBAKmBA,EAAS,EACxB,MAAMC,EAASC,EAAS,EAClBC,EAAMC,EAAW,EAEjBC,EAAaC,EAAI,EAAK,EAE5B,OAAAC,EAAU,SAAY,CAElBF,EAAW,MAAQJ,EAAO,QAE1B,MAAMA,EAAO,MAAK,EACjB,QAAQ,IAAM,CACXI,EAAW,MAAQ,EACtB,CAAA,CACJ,CAAA,EAMDG,EAAmB,CAACC,EAAIC,IAAS,OACzBD,EAAG,MAAQ,cACXN,EAAI,iBAAkBQ,EAAAV,EAAO,MAAM,KAAKW,GAAKA,EAAE,IAAMH,EAAG,OAAO,OAAO,IAAhD,YAAAE,EAAmD,KAEhF,CAAA"} \ No newline at end of file diff --git a/public/build/assets/Import-C-7ayGrw.js b/public/build/assets/Import-C-7ayGrw.js deleted file mode 100644 index ecf1e7a5..00000000 --- a/public/build/assets/Import-C-7ayGrw.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as ft,e as v,f as n,g as r,y as mt,m as a,l as f,h as t,i as l,n as C,W as X,k as U,L as pt,b as ht,a as _t,c as vt,r as k,d as O,H as p,x as D,s as gt,o as yt,J as kt,p as w,D as W,t as i,U as q,j as _,w as G,C as wt,F as K,E as Q,Q as bt}from"./app-CuhK3jij.js";import{F as H}from"./Form-o2lWAB-o.js";import{_ as $t}from"./OtpDisplay-D1Cg2JBE.js";import{S as Ct}from"./Spinner-WULdfd4I.js";import{u as xt}from"./bus-BalNs30H.js";/*! 2FAuth version 5.4.2 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const At=["for","innerHTML"],Ft=["disabled","id","value","placeholder","maxlength"],St=["innerHTML"],zt=Object.assign({inheritAttrs:!1},{__name:"FormTextarea",props:{modelValue:[String,Number,Boolean],label:{type:String,default:""},fieldName:{type:String,default:"",required:!0},fieldError:[String],placeholder:{type:String,default:""},help:{type:String,default:""},size:{type:String,default:""},hasOffset:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},maxLength:{type:Number,default:null},isIndented:Boolean},setup(d){const T=d,{inputId:m}=ft(T.inputType,T.fieldName);return(h,g)=>{const N=v("FontAwesomeIcon"),b=v("FieldError");return n(),r("div",{class:C(["mb-3",{"pt-3":d.hasOffset,"is-flex":d.isIndented}])},[d.isIndented?(n(),r("div",{key:0,class:"mx-2 pr-1",style:mt({opacity:d.isDisabled?"0.5":"1"})},[a(N,{class:"has-text-grey",icon:["fas","chevron-right"],transform:"rotate-135"})],4)):f("",!0),t("div",{class:C(["field",{"is-flex-grow-5":d.isIndented}])},[t("label",{for:l(m),class:"label",innerHTML:h.$t(d.label)},null,8,At),t("div",{class:C(["control",{"has-icons-left":h.leftIcon,"has-icons-right":h.rightIcon}])},[t("textarea",X({disabled:d.isDisabled,id:l(m),class:["textarea",d.size],value:d.modelValue,placeholder:d.placeholder},h.$attrs,{onInput:g[0]||(g[0]=$=>h.$emit("update:modelValue",$.target.value)),onChange:g[1]||(g[1]=$=>h.$emit("change:modelValue",$.target.value)),maxlength:d.maxLength}),null,16,Ft)],2),d.fieldError!=null?(n(),U(b,{key:0,error:d.fieldError,field:d.fieldName},null,8,["error","field"])):f("",!0),d.help?(n(),r("p",{key:1,class:"help",innerHTML:h.$t(d.help)},null,8,St)):f("",!0)],2)],2)}}}),Et={class:"title has-text-grey-dark"},It={key:0},Tt={class:"block is-size-7-mobile"},Vt={class:"mb-2"},qt={class:"columns"},Nt={class:"column"},Bt={class:"block"},Lt={class:"card"},Mt={class:"card-content"},Ot={class:"media"},Dt={class:"media-left"},Ht={class:"image is-32x32"},Ut={class:"media-content"},Pt=["innerHTML"],Rt={class:"subtitle is-6 is-size-7-mobile"},jt={class:"card-footer"},Jt={class:"block"},Wt={class:"card"},Gt={class:"card-content"},Kt={class:"media"},Qt={class:"media-left"},Xt={class:"image is-32x32"},Yt={class:"media-content"},Zt={class:"title is-5 has-text-grey"},te={class:"subtitle is-6 is-size-7-mobile"},ee={class:"card-footer"},se={class:"block"},oe={class:"card"},ie={class:"card-content"},le={class:"media"},ne={class:"media-left"},ae={class:"image is-32x32"},re={class:"media-content"},ce=["innerHTML"],de={class:"subtitle is-6 is-size-7-mobile"},ue={class:"content"},fe={class:"card-footer"},me={class:"title is-5 has-text-grey-dark"},pe={class:"block is-size-7-mobile"},he={class:"table is-size-7-mobile is-fullwidth"},_e=t("thead",null,[t("tr",null,[t("th"),t("th",null,"Plain text"),t("th",null,"QR code"),t("th",null,"JSON")])],-1),ve=t("th",null,"Google Authenticator",-1),ge=t("td",null,null,-1),ye=t("td",null,null,-1),ke=t("th",null,"Aegis Auth",-1),we=t("td",null,null,-1),be=t("th",null,"2FAS auth",-1),$e=t("td",null,null,-1),Ce=t("td",null,null,-1),xe=t("th",null,"FreeOTP+",-1),Ae=t("td",null,null,-1),Fe=t("td",null,null,-1),Se=t("th",null,"2FAuth",-1),ze=t("td",null,null,-1),Ee=t("td",null,null,-1),Ie={key:1},Te={key:2},Ve={class:"block is-size-7-mobile"},qe={class:"mb-2"},Ne={class:"is-flex is-justify-content-space-between"},Be=["onClick","title"],Le=["src"],Me={key:1,class:"is-flex-grow-1 has-ellipsis"},Oe={key:2,class:"tags is-flex-wrap-nowrap"},De=["onClick","title"],He=["onClick","title"],Ue={key:3,class:"has-nowrap"},Pe={key:0,class:"has-text-success"},Re={key:1,class:"has-text-danger"},je={class:"is-size-6 is-size-7-mobile"},Je={class:"is-family-primary has-text-grey"},We={key:0,class:"has-text-danger"},Ge={key:1,class:"has-text-warning"},Ke={key:2},Qe={key:0,class:"mt-2 is-size-7 is-pulled-right"},Xe={key:1,class:"mt-2 is-size-7 is-pulled-right"},Ye={key:0,class:"control"},ls={__name:"Import",setup(d){const T=pt("2fauth"),m=ht(),h=_t(),g=xt(),N=vt(),b=k(null),$=k(null),B=k(null),x=k(null),V=k(null),S=O(new H({service:"",account:"",otp_type:"",icon:"",secret:"",algorithm:"",digits:null,counter:null,period:null})),z=O(new H({file:null,withSecret:!0})),E=O(new H({qrcode:null,withSecret:!0})),A=k(!1);p("twofaccounts.import.qr_code"),p("twofaccounts.import.plain_text");const c=k([]),y=k(!1),I=D(()=>c.value.filter(e=>e.imported==-1&&e.id>-2).length),P=D(()=>c.value.filter(e=>e.id===-1&&e.imported===-1).length),Y=D(()=>c.value.filter(e=>e.imported===1).length);gt(A,e=>{var s;e==!1&&((s=b.value)==null||s.clearOTP())}),yt(()=>{g.migrationUri&&(L(g.migrationUri),g.migrationUri=null)});async function L(e){y.value=!0,await kt.migrate(e,{returnError:!0}).then(s=>{s.data.forEach(u=>{u.imported=-1,c.value.push(u)}),j(),x.value=V.value=null}).catch(s=>{m.alert({text:p(s.response.data.message)})}),y.value=!1}function Z(){var e;confirm(p("twofaccounts.confirm.discard_duplicates"))&&(m.clear(),(e=b.value)==null||e.clearOTP(),c.value=c.value.filter(s=>s.id!==-1))}function tt(){var e;confirm(p("twofaccounts.confirm.discard_all"))&&(m.clear(),(e=b.value)==null||e.clearOTP(),c.value=[])}function et(e){confirm(p("twofaccounts.confirm.discard"))&&c.value.splice(e,1)}async function st(){for(let e=0;e{c.value[e].imported=1,c.value[e].id=s.data.id,delete s.data.secret,N.items.push(s.data)}).catch(s=>{c.value[e].imported=0,c.value[e].id=0,c.value[e].errors=S.errors.flatten()})}function ot(e){S.fill(c.value[e]),A.value=!0,bt().then(()=>{b.value.show()})}function it(){z.clear(),y.value=!0,z.file=$.value.files[0],z.upload("/api/v1/twofaccounts/migration",{returnError:!0}).then(e=>{e.data.forEach(s=>{s.imported=-1,c.value.push(s)}),j()}).catch(e=>{e.response.status===422?e.response.data.errors.file==null&&m.alert({text:p("errors.invalid_2fa_data")}):m.alert({text:e.response.data.message})}),y.value=!1}function lt(){E.clear(),y.value=!0,E.qrcode=B.value.files[0],E.upload("/api/v1/qrcode/decode",{returnError:!0}).then(e=>{L(e.data.data)}).catch(e=>{e.response.status===422?e.response.data.errors.qrcode==null&&m.alert({text:p("errors.invalid_2fa_data")}):m.alert({text:e.response.data.message})}),y.value=!1}function j(){m.success({text:p("twofaccounts.import.x_valid_accounts_found",{count:I.value})})}function nt(){V.value=null,x.value?L(x.value):V.value=p("validation.required",{attribute:"Direct input"})}return(e,s)=>{const u=v("FontAwesomeIcon"),J=v("FieldError"),at=v("RouterLink"),rt=v("ButtonBackCloseCancel"),ct=v("VueFooter"),dt=v("ResponsiveWidthWrapper"),ut=v("modal");return n(),r("div",null,[a(dt,null,{default:w(()=>[t("h1",Et,i(e.$t("twofaccounts.import.import")),1),!l(y)&&l(c).length==0?(n(),r("div",It,[t("div",Tt,[t("p",Vt,i(e.$t("twofaccounts.import.import_legend")),1),t("p",null,i(e.$t("twofaccounts.import.import_legend_afterpart")),1)]),t("div",qt,[t("div",Nt,[t("div",Bt,[t("div",Lt,[t("div",Mt,[t("div",Ot,[t("div",Dt,[t("figure",Ht,[a(l(q),null,{default:w(({mode:o})=>[a(u,{icon:["fas","qrcode"],size:"2x",class:C(o=="dark"?"has-text-grey-darker":"has-text-grey-lighter")},null,8,["class"])]),_:1})])]),t("div",Ut,[t("p",{class:"title is-5 has-text-grey",innerHTML:e.$t("twofaccounts.import.qr_code")},null,8,Pt),t("p",Rt,i(e.$t("twofaccounts.import.supported_formats_for_qrcode_upload")),1)])]),l(E).errors.hasAny("qrcode")?(n(),U(J,{key:0,error:l(E).errors.get("qrcode"),field:"qrcode"},null,8,["error"])):f("",!0)]),t("footer",jt,[a(at,{id:"btnCapture",to:{name:"capture"},class:"card-footer-item"},{default:w(()=>[_(i(e.$t("twofaccounts.import.scan")),1)]),_:1}),t("a",{role:"button",tabindex:"0",class:"card-footer-item is-relative",onKeyup:s[0]||(s[0]=G(o=>l(B).click(),["enter"]))},[t("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:lt,ref_key:"qrcodeInput",ref:B},null,544),_(" "+i(e.$t("twofaccounts.import.upload")),1)],32)])])]),t("div",Jt,[t("div",Wt,[t("div",Gt,[t("div",Kt,[t("div",Qt,[t("figure",Xt,[a(l(q),null,{default:w(({mode:o})=>[a(u,{icon:["fas","file-lines"],size:"2x",class:C(o=="dark"?"has-text-grey-darker":"has-text-grey-lighter")},null,8,["class"])]),_:1})])]),t("div",Yt,[t("p",Zt,i(e.$t("twofaccounts.import.text_file")),1),t("p",te,i(e.$t("twofaccounts.import.supported_formats_for_file_upload")),1)])]),l(z).errors.hasAny("file")?(n(),U(J,{key:0,error:l(z).errors.get("file"),field:"file"},null,8,["error"])):f("",!0)]),t("footer",ee,[t("a",{role:"button",tabindex:"0",class:"card-footer-item is-relative",onKeyup:s[1]||(s[1]=G(o=>l($).click(),["enter"]))},[t("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"text/plain,application/json,text/csv,.2fas",onChange:it,ref_key:"fileInput",ref:$},null,544),_(" "+i(e.$t("twofaccounts.import.upload")),1)],32)])])]),t("div",se,[t("div",oe,[t("div",ie,[t("div",le,[t("div",ne,[t("figure",ae,[a(l(q),null,{default:w(({mode:o})=>[a(u,{icon:["fas","align-left"],size:"2x",class:C(o=="dark"?"has-text-grey-darker":"has-text-grey-lighter")},null,8,["class"])]),_:1})])]),t("div",re,[t("p",{class:"title is-5 has-text-grey",innerHTML:e.$t("twofaccounts.import.direct_input")},null,8,ce),t("p",de,i(e.$t("twofaccounts.import.expected_format_for_direct_input")),1)])]),t("div",ue,[a(zt,{modelValue:l(x),"onUpdate:modelValue":s[2]||(s[2]=o=>W(x)?x.value=o:null),fieldError:l(V),fieldName:"payload",rows:"5",size:"is-small"},null,8,["modelValue","fieldError"])])]),t("footer",fe,[t("a",{role:"button",tabindex:"0",class:"card-footer-item is-relative",onClick:wt(nt,["stop"])},i(e.$t("commons.submit")),1)])])])])]),t("h2",me,i(e.$t("twofaccounts.import.supported_migration_formats")),1),t("div",pe,[a(u,{icon:["fas","fa-triangle-exclamation"],class:"has-text-warning-dark"}),_(" "+i(e.$t("twofaccounts.import.do_not_set_password_or_encryption")),1)]),t("table",he,[_e,t("tbody",null,[t("tr",null,[ve,ge,t("td",null,[a(u,{icon:["fas","circle-check"]})]),ye]),t("tr",null,[ke,t("td",null,[a(u,{icon:["fas","circle-check"]})]),we,t("td",null,[a(u,{icon:["fas","circle-check"]})])]),t("tr",null,[be,$e,Ce,t("td",null,[a(u,{icon:["fas","circle-check"]})])]),t("tr",null,[xe,t("td",null,[a(u,{icon:["fas","circle-check"]})]),Ae,Fe]),t("tr",null,[Se,ze,Ee,t("td",null,[a(u,{icon:["fas","circle-check"]})])])])])])):l(y)&&l(c).length===0?(n(),r("div",Ie,[a(Ct,{type:"fullscreen-overlay",isVisible:!0,message:"twofaccounts.import.parsing_data"},null,8,["message"])])):(n(),r("div",Te,[t("div",Ve,[t("p",qe,i(e.$t("twofaccounts.import.submitted_data_parsed_now_accounts_are_awaiting_import")),1),t("p",null,i(e.$t("twofaccounts.import.use_buttons_to_save_or_discard")),1)]),(n(!0),r(K,null,Q(l(c),(o,M)=>(n(),r("div",{key:o.name,class:"group-item is-size-5 is-size-6-mobile"},[t("div",Ne,[o.id>-2&&o.imported!==0?(n(),r("div",{key:0,class:"is-flex-grow-1 has-ellipsis is-clickable",onClick:F=>ot(M),title:e.$t("twofaccounts.import.generate_a_test_password")},[o.icon&&l(h).preferences.showAccountsIcons?(n(),r("img",{key:0,role:"presentation",class:"import-icon",src:l(T).config.subdirectory+"/storage/icons/"+o.icon,alt:""},null,8,Le)):f("",!0),_(" "+i(o.account),1)],8,Be)):(n(),r("div",Me,i(o.account),1)),o.imported===-1?(n(),r("div",Oe,[a(l(q),null,{default:w(({mode:F})=>[t("button",{class:C(["button tag",{"is-dark has-text-grey-light":F=="dark"}]),onClick:Ze=>et(M),title:e.$t("twofaccounts.import.discard_this_account")},[a(u,{icon:["fas","trash"]})],10,De)]),_:2},1024),o.id>-2?(n(),r("button",{key:0,class:"button tag is-link",onClick:F=>R(M),title:e.$t("twofaccounts.import.import_this_account")},i(e.$t("twofaccounts.import.to_import")),9,He)):f("",!0)])):(n(),r("div",Ue,[o.imported===1?(n(),r("span",Pe,[_(i(e.$t("twofaccounts.import.imported"))+" ",1),a(u,{icon:["fas","check"]})])):(n(),r("span",Re,[_(i(e.$t("twofaccounts.import.failure"))+" ",1),a(u,{icon:["fas","times"]})]))]))]),t("div",je,[t("div",Je,i(e.$t("twofaccounts.import.issuer"))+": "+i(o.service),1),o.id===-2?(n(),r("div",We,[a(u,{class:"mr-1",icon:["fas","times-circle"]}),_(i(o.secret),1)])):f("",!0),o.id===-1&&o.imported!==1&&!o.errors?(n(),r("div",Ge,[a(u,{class:"mr-1",icon:["fas","exclamation-circle"]}),_(i(e.$t("twofaccounts.import.possible_duplicate")),1)])):f("",!0),o.errors?(n(),r("ul",Ke,[(n(!0),r(K,null,Q(o.errors,F=>(n(),r("li",{key:F,class:"has-text-danger"},i(F),1))),128))])):f("",!0)])]))),128)),l(I)>0?(n(),r("div",Qe,[l(P)?(n(),r("button",{key:0,onClick:s[3]||(s[3]=o=>Z()),class:"has-text-grey button is-small is-ghost"},i(e.$t("twofaccounts.import.discard_duplicates"))+" ("+i(l(P))+")",1)):f("",!0),t("button",{onClick:s[4]||(s[4]=o=>tt()),class:"has-text-grey button is-small is-ghost"},i(e.$t("twofaccounts.import.discard_all")),1)])):f("",!0),l(Y)==l(c).length?(n(),r("div",Xe,[t("button",{onClick:s[5]||(s[5]=o=>c.value=[]),class:"has-text-grey button is-small is-ghost"},i(e.$t("commons.clear")),1)])):f("",!0)])),a(ct,{showButtons:!0},{default:w(()=>[l(I)>0?(n(),r("p",Ye,[t("button",{class:"button is-link is-rounded is-focus",onClick:st},[t("span",null,i(e.$t("twofaccounts.import.import_all"))+" ("+i(l(I))+")",1)])])):f("",!0),a(rt,{returnTo:{name:"accounts"},action:l(I)>0?"cancel":"close"},null,8,["action"])]),_:1})]),_:1}),a(ut,{modelValue:l(A),"onUpdate:modelValue":s[9]||(s[9]=o=>W(A)?A.value=o:null)},{default:w(()=>[a($t,X({ref_key:"otpDisplay",ref:b},l(S).data(),{onIncrementHotp:s[6]||(s[6]=()=>{}),onValidationError:s[7]||(s[7]=()=>{}),onPleaseCloseMe:s[8]||(s[8]=o=>A.value=!1)}),null,16)]),_:1},8,["modelValue"])])}}};export{ls as default}; diff --git a/public/build/assets/Import-CWswmNcW.js b/public/build/assets/Import-CWswmNcW.js new file mode 100644 index 00000000..b4ccf061 --- /dev/null +++ b/public/build/assets/Import-CWswmNcW.js @@ -0,0 +1,2 @@ +import{Z as J,_ as mt,l as _,m as n,d as a,y as pt,j as d,i as f,e as t,f as o,n as $,V as X,h as B,a as ht,u as vt,b as gt,r as b,c as D,H as v,x as H,s as _t,o as yt,J as bt,k as T,t as i,g,w as W,C as K,G as kt,F as Q,D as Z,U as wt,L as $t,P as xt}from"./app-CzxRjCVM.js";import{F as P}from"./Form-EFIuWKGI.js";import{_ as Ct}from"./OtpDisplay-ytUtG8ZN.js";import{S as At}from"./Spinner-C-V0HKYn.js";import{u as St}from"./bus-BNAtGMCo.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const Ft=["for","innerHTML"],It=["disabled","id","value","placeholder","maxlength","aria-describedby","aria-invalid","aria-errormessage"],Et=["id","innerHTML"],zt=Object.assign({inheritAttrs:!1},{__name:"FormTextarea",props:{modelValue:[String,Number,Boolean],label:{type:String,default:""},fieldName:{type:String,default:"",required:!0},fieldError:[String],placeholder:{type:String,default:""},help:{type:String,default:""},size:{type:String,default:""},hasOffset:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},maxLength:{type:Number,default:null},isIndented:Boolean,leftIcon:"",rightIcon:"",idSuffix:{type:String,default:""}},setup(r){const k=r,{inputId:m}=J(k.inputType,k.fieldName+k.idSuffix),{valErrorId:L}=mt(k.fieldName),x=J("legend",k.fieldName).inputId;return(w,p)=>{const C=_("FontAwesomeIcon"),A=_("FieldError");return n(),a("div",{class:$(["mb-3",{"pt-3":r.hasOffset,"is-flex":r.isIndented}])},[r.isIndented?(n(),a("div",{key:0,class:"mx-2 pr-1",style:pt({opacity:r.isDisabled?"0.5":"1"})},[d(C,{class:"has-text-grey",icon:["fas","chevron-right"],transform:"rotate-135"})],4)):f("",!0),t("div",{class:$(["field",{"is-flex-grow-5":r.isIndented}])},[r.label?(n(),a("label",{key:0,for:o(m),class:"label",innerHTML:w.$t(r.label)},null,8,Ft)):f("",!0),t("div",{class:$(["control",{"has-icons-left":r.leftIcon,"has-icons-right":r.rightIcon}])},[t("textarea",X({disabled:r.isDisabled,id:o(m),class:["textarea",r.size],value:r.modelValue,placeholder:r.placeholder},w.$attrs,{onInput:p[0]||(p[0]=h=>w.$emit("update:modelValue",h.target.value)),onChange:p[1]||(p[1]=h=>w.$emit("change:modelValue",h.target.value)),maxlength:r.maxLength,"aria-describedby":r.help?o(x):void 0,"aria-invalid":r.fieldError!=null,"aria-errormessage":r.fieldError!=null?o(L):void 0}),null,16,It)],2),r.fieldError!=null?(n(),B(A,{key:1,error:r.fieldError,field:r.fieldName},null,8,["error","field"])):f("",!0),r.help?(n(),a("p",{key:2,id:o(x),class:"help",innerHTML:w.$t(r.help)},null,8,Et)):f("",!0)],2)],2)}}}),Vt={class:"title has-text-grey-dark"},Tt={key:0},Nt={class:"block is-size-7-mobile"},qt={class:"mb-2"},Bt={class:"columns"},Lt={class:"column"},Mt={class:"block"},Ot={class:"card"},Dt={class:"card-content"},Ht={class:"media"},Pt={class:"media-left"},Ut={class:"image is-32x32"},Rt={class:"media-content"},jt=["innerHTML"],Gt={class:"subtitle is-6 is-size-7-mobile"},Jt={class:"card-footer"},Wt={class:"block"},Kt={class:"card"},Qt={class:"card-content"},Zt={class:"media"},Xt={class:"media-left"},Yt={class:"image is-32x32"},te={class:"media-content"},ee={class:"title is-5 has-text-grey"},se={class:"subtitle is-6 is-size-7-mobile"},oe={class:"card-footer"},ie={class:"block"},le={class:"card"},ne={class:"card-content"},ae={class:"media"},re={class:"media-left"},de={class:"image is-32x32"},ue={class:"media-content"},ce=["innerHTML"],fe={class:"subtitle is-6 is-size-7-mobile"},me={class:"content"},pe={class:"card-footer"},he={class:"title is-5 has-text-grey-dark"},ve={class:"block is-size-7-mobile"},ge={class:"table is-size-7-mobile is-fullwidth"},_e={key:1},ye={key:2},be={class:"block is-size-7-mobile"},ke={class:"mb-2"},we={class:"is-flex is-justify-content-space-between"},$e=["onClick","title"],xe=["src"],Ce={key:1,class:"is-flex-grow-1 has-ellipsis"},Ae={key:2,class:"tags is-flex-wrap-nowrap"},Se=["onClick","title"],Fe=["onClick","title"],Ie={key:3,class:"has-nowrap"},Ee={key:0,class:"has-text-success"},ze={key:1,class:"has-text-danger"},Ve={class:"is-size-6 is-size-7-mobile"},Te={class:"is-family-primary has-text-grey"},Ne={key:0,class:"has-text-danger"},qe={key:1,class:"has-text-warning"},Be={key:2},Le={key:0,class:"mt-2 is-size-7 is-pulled-right"},Me={key:1,class:"mt-2 is-size-7 is-pulled-right"},Oe={key:0,class:"control"},je={__name:"Import",setup(r){const k=$t("2fauth"),m=ht(),L=vt(),x=St(),w=gt(),p=b(null),C=b(null),A=b(null),h=b(null),N=b(null),F=D(new P({service:"",account:"",otp_type:"",icon:"",secret:"",algorithm:"",digits:null,counter:null,period:null})),I=D(new P({file:null,withSecret:!0})),E=D(new P({qrcode:null,withSecret:!0})),S=b(!1);v("twofaccounts.import.qr_code"),v("twofaccounts.import.plain_text");const u=b([]),y=b(!1),z=H(()=>u.value.filter(e=>e.imported==-1&&e.id>-2).length),U=H(()=>u.value.filter(e=>e.id===-1&&e.imported===-1).length),Y=H(()=>u.value.filter(e=>e.imported===1).length);_t(S,e=>{var s;e==!1&&((s=p.value)==null||s.clearOTP())}),yt(()=>{x.migrationUri&&(M(x.migrationUri),x.migrationUri=null)});async function M(e){y.value=!0,await bt.migrate(e,{returnError:!0}).then(s=>{s.data.forEach(c=>{c.imported=-1,u.value.push(c)}),j(),h.value=N.value=null}).catch(s=>{m.alert({text:v(s.response.data.message)})}),y.value=!1}function tt(){var e;confirm(v("twofaccounts.confirm.discard_duplicates"))&&(m.clear(),(e=p.value)==null||e.clearOTP(),u.value=u.value.filter(s=>s.id!==-1))}function et(){var e;confirm(v("twofaccounts.confirm.discard_all"))&&(m.clear(),(e=p.value)==null||e.clearOTP(),u.value=[])}function st(e){confirm(v("twofaccounts.confirm.discard"))&&u.value.splice(e,1)}async function ot(){for(let e=0;e{u.value[e].imported=1,u.value[e].id=s.data.id,delete s.data.secret,w.items.push(s.data)}).catch(s=>{u.value[e].imported=0,u.value[e].id=0,u.value[e].errors=F.errors.flatten()})}function it(e){F.fill(u.value[e]),S.value=!0,xt().then(()=>{p.value.show()})}function lt(){I.clear(),y.value=!0,I.file=C.value.files[0],I.upload("/api/v1/twofaccounts/migration",{returnError:!0}).then(e=>{e.data.forEach(s=>{s.imported=-1,u.value.push(s)}),j()}).catch(e=>{e.response.status===422?e.response.data.errors.file==null&&m.alert({text:v("errors.invalid_2fa_data")}):m.alert({text:e.response.data.message})}),y.value=!1}function nt(){E.clear(),y.value=!0,E.qrcode=A.value.files[0],E.upload("/api/v1/qrcode/decode",{returnError:!0}).then(e=>{M(e.data.data)}).catch(e=>{e.response.status===422?e.response.data.errors.qrcode==null&&m.alert({text:v("errors.invalid_2fa_data")}):m.alert({text:e.response.data.message})}),y.value=!1}function j(){m.success({text:v("twofaccounts.import.x_valid_accounts_found",{count:z.value})})}function at(){N.value=null,h.value?M(h.value):N.value=v("validation.required",{attribute:"Direct input"})}return(e,s)=>{const c=_("FontAwesomeIcon"),G=_("FieldError"),rt=_("RouterLink"),dt=_("ButtonBackCloseCancel"),ut=_("VueFooter"),ct=_("ResponsiveWidthWrapper"),ft=_("modal");return n(),B(o(wt),null,{default:T(({mode:q})=>[t("div",null,[d(ct,null,{default:T(()=>[t("h1",Vt,i(e.$t("twofaccounts.import.import")),1),!o(y)&&o(u).length==0?(n(),a("div",Tt,[t("div",Nt,[t("p",qt,i(e.$t("twofaccounts.import.import_legend")),1),t("p",null,i(e.$t("twofaccounts.import.import_legend_afterpart")),1)]),t("div",Bt,[t("div",Lt,[t("div",Mt,[t("div",Ot,[t("div",Dt,[t("div",Ht,[t("div",Pt,[t("figure",Ut,[d(c,{icon:["fas","qrcode"],size:"2x",class:$(q=="dark"?"has-text-grey-darker":"has-text-grey-lighter")},null,8,["class"])])]),t("div",Rt,[t("p",{class:"title is-5 has-text-grey",innerHTML:e.$t("twofaccounts.import.qr_code")},null,8,jt),t("p",Gt,i(e.$t("twofaccounts.import.supported_formats_for_qrcode_upload")),1)])]),o(E).errors.hasAny("qrcode")?(n(),B(G,{key:0,error:o(E).errors.get("qrcode"),field:"qrcode"},null,8,["error"])):f("",!0)]),t("footer",Jt,[d(rt,{id:"btnCapture",to:{name:"capture"},class:"card-footer-item"},{default:T(()=>[g(i(e.$t("twofaccounts.import.scan")),1)]),_:1}),t("a",{role:"button",tabindex:"0",class:"card-footer-item is-relative",onClick:s[0]||(s[0]=l=>o(A).click()),onKeyup:s[1]||(s[1]=W(l=>o(A).click(),["enter"]))},[t("input",{inert:"",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:nt,ref_key:"qrcodeInput",ref:A},null,544),g(" "+i(e.$t("twofaccounts.import.upload")),1)],32)])])]),t("div",Wt,[t("div",Kt,[t("div",Qt,[t("div",Zt,[t("div",Xt,[t("figure",Yt,[d(c,{icon:["fas","file-lines"],size:"2x",class:$(q=="dark"?"has-text-grey-darker":"has-text-grey-lighter")},null,8,["class"])])]),t("div",te,[t("p",ee,i(e.$t("twofaccounts.import.text_file")),1),t("p",se,i(e.$t("twofaccounts.import.supported_formats_for_file_upload")),1)])]),o(I).errors.hasAny("file")?(n(),B(G,{key:0,error:o(I).errors.get("file"),field:"file"},null,8,["error"])):f("",!0)]),t("footer",oe,[t("a",{role:"button",tabindex:"0",class:"card-footer-item is-relative",onClick:s[2]||(s[2]=l=>o(C).click()),onKeyup:s[3]||(s[3]=W(l=>o(C).click(),["enter"]))},[t("input",{inert:"",tabindex:"-1",class:"file-input",type:"file",accept:"text/plain,application/json,text/csv,.2fas",onChange:lt,ref_key:"fileInput",ref:C},null,544),g(" "+i(e.$t("twofaccounts.import.upload")),1)],32)])])]),t("div",ie,[t("div",le,[t("div",ne,[t("div",ae,[t("div",re,[t("figure",de,[d(c,{icon:["fas","align-left"],size:"2x",class:$(q=="dark"?"has-text-grey-darker":"has-text-grey-lighter")},null,8,["class"])])]),t("div",ue,[t("p",{class:"title is-5 has-text-grey",innerHTML:e.$t("twofaccounts.import.direct_input")},null,8,ce),t("p",fe,i(e.$t("twofaccounts.import.expected_format_for_direct_input")),1)])]),t("div",me,[d(zt,{modelValue:o(h),"onUpdate:modelValue":s[4]||(s[4]=l=>K(h)?h.value=l:null),fieldError:o(N),fieldName:"payload",rows:"5",size:"is-small"},null,8,["modelValue","fieldError"])])]),t("footer",pe,[t("a",{role:"button",tabindex:"0",class:"card-footer-item is-relative",onClick:kt(at,["stop"])},i(e.$t("commons.submit")),1)])])])])]),t("h2",he,i(e.$t("twofaccounts.import.supported_migration_formats")),1),t("div",ve,[d(c,{icon:["fas","fa-triangle-exclamation"],class:"has-text-warning-dark"}),g(" "+i(e.$t("twofaccounts.import.do_not_set_password_or_encryption")),1)]),t("table",ge,[s[26]||(s[26]=t("thead",null,[t("tr",null,[t("th"),t("th",null,"Plain text"),t("th",null,"QR code"),t("th",null,"JSON")])],-1)),t("tbody",null,[t("tr",null,[s[12]||(s[12]=t("th",null,"Google Authenticator",-1)),s[13]||(s[13]=t("td",null,null,-1)),t("td",null,[d(c,{icon:["fas","circle-check"]})]),s[14]||(s[14]=t("td",null,null,-1))]),t("tr",null,[s[15]||(s[15]=t("th",null,"Aegis Auth",-1)),t("td",null,[d(c,{icon:["fas","circle-check"]})]),s[16]||(s[16]=t("td",null,null,-1)),t("td",null,[d(c,{icon:["fas","circle-check"]})])]),t("tr",null,[s[17]||(s[17]=t("th",null,"2FAS auth",-1)),s[18]||(s[18]=t("td",null,null,-1)),s[19]||(s[19]=t("td",null,null,-1)),t("td",null,[d(c,{icon:["fas","circle-check"]})])]),t("tr",null,[s[20]||(s[20]=t("th",null,"FreeOTP+",-1)),t("td",null,[d(c,{icon:["fas","circle-check"]})]),s[21]||(s[21]=t("td",null,null,-1)),s[22]||(s[22]=t("td",null,null,-1))]),t("tr",null,[s[23]||(s[23]=t("th",null,"2FAuth",-1)),s[24]||(s[24]=t("td",null,null,-1)),s[25]||(s[25]=t("td",null,null,-1)),t("td",null,[d(c,{icon:["fas","circle-check"]})])])])])])):o(y)&&o(u).length===0?(n(),a("div",_e,[d(At,{type:"fullscreen-overlay",isVisible:!0,message:"twofaccounts.import.parsing_data"})])):(n(),a("div",ye,[t("div",be,[t("p",ke,i(e.$t("twofaccounts.import.submitted_data_parsed_now_accounts_are_awaiting_import")),1),t("p",null,i(e.$t("twofaccounts.import.use_buttons_to_save_or_discard")),1)]),(n(!0),a(Q,null,Z(o(u),(l,O)=>(n(),a("div",{key:l.name,class:"group-item is-size-5 is-size-6-mobile"},[t("div",we,[l.id>-2&&l.imported!==0?(n(),a("div",{key:0,class:"is-flex-grow-1 has-ellipsis is-clickable",onClick:V=>it(O),title:e.$t("twofaccounts.import.generate_a_test_password")},[l.icon&&o(L).preferences.showAccountsIcons?(n(),a("img",{key:0,role:"presentation",class:"import-icon",src:o(k).config.subdirectory+"/storage/icons/"+l.icon,alt:""},null,8,xe)):f("",!0),g(" "+i(l.account),1)],8,$e)):(n(),a("div",Ce,i(l.account),1)),l.imported===-1?(n(),a("div",Ae,[t("button",{type:"button",class:$(["button tag",{"is-dark has-text-grey-light":q=="dark"}]),onClick:V=>st(O),title:e.$t("twofaccounts.import.discard_this_account")},[d(c,{icon:["fas","trash"]})],10,Se),l.id>-2?(n(),a("button",{key:0,type:"button",class:"button tag is-link",onClick:V=>R(O),title:e.$t("twofaccounts.import.import_this_account")},i(e.$t("twofaccounts.import.to_import")),9,Fe)):f("",!0)])):(n(),a("div",Ie,[l.imported===1?(n(),a("span",Ee,[g(i(e.$t("twofaccounts.import.imported"))+" ",1),d(c,{icon:["fas","check"]})])):(n(),a("span",ze,[g(i(e.$t("twofaccounts.import.failure"))+" ",1),d(c,{icon:["fas","times"]})]))]))]),t("div",Ve,[t("div",Te,i(e.$t("twofaccounts.import.issuer"))+": "+i(l.service),1),l.id===-2?(n(),a("div",Ne,[d(c,{class:"mr-1",icon:["fas","times-circle"]}),g(i(l.secret),1)])):f("",!0),l.id===-1&&l.imported!==1&&!l.errors?(n(),a("div",qe,[d(c,{class:"mr-1",icon:["fas","exclamation-circle"]}),g(i(e.$t("twofaccounts.import.possible_duplicate")),1)])):f("",!0),l.errors?(n(),a("ul",Be,[(n(!0),a(Q,null,Z(l.errors,V=>(n(),a("li",{key:V,class:"has-text-danger"},i(V),1))),128))])):f("",!0)])]))),128)),o(z)>0?(n(),a("div",Le,[o(U)?(n(),a("button",{key:0,onClick:s[5]||(s[5]=l=>tt()),type:"button",class:"has-text-grey button is-small is-ghost"},i(e.$t("twofaccounts.import.discard_duplicates"))+" ("+i(o(U))+")",1)):f("",!0),t("button",{onClick:s[6]||(s[6]=l=>et()),type:"button",class:"has-text-grey button is-small is-ghost"},i(e.$t("twofaccounts.import.discard_all")),1)])):f("",!0),o(Y)==o(u).length?(n(),a("div",Me,[t("button",{onClick:s[7]||(s[7]=l=>u.value=[]),type:"button",class:"has-text-grey button is-small is-ghost"},i(e.$t("commons.clear")),1)])):f("",!0)])),d(ut,{showButtons:!0},{default:T(()=>[o(z)>0?(n(),a("p",Oe,[t("button",{type:"button",class:"button is-link is-rounded is-focus",onClick:ot},[t("span",null,i(e.$t("twofaccounts.import.import_all"))+" ("+i(o(z))+")",1)])])):f("",!0),d(dt,{returnTo:{name:"accounts"},action:o(z)>0?"cancel":"close"},null,8,["action"])]),_:1})]),_:2},1024),d(ft,{modelValue:o(S),"onUpdate:modelValue":s[11]||(s[11]=l=>K(S)?S.value=l:null)},{default:T(()=>[d(Ct,X({ref_key:"otpDisplay",ref:p},o(F).data(),{onIncrementHotp:s[8]||(s[8]=()=>{}),onValidationError:s[9]||(s[9]=()=>{}),onPleaseCloseMe:s[10]||(s[10]=l=>S.value=!1)}),null,16)]),_:1},8,["modelValue"])])]),_:1})}}};export{je as default}; +//# sourceMappingURL=Import-CWswmNcW.js.map diff --git a/public/build/assets/Import-CWswmNcW.js.map b/public/build/assets/Import-CWswmNcW.js.map new file mode 100644 index 00000000..8a6ed39a --- /dev/null +++ b/public/build/assets/Import-CWswmNcW.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Import-CWswmNcW.js","sources":["../../../resources/js/components/formElements/FormTextarea.vue","../../../resources/js/views/twofaccounts/Import.vue"],"sourcesContent":["\n\n