2FAuth/public/build/assets/Accounts-bb06e0ef.js

7 lines
54 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{a as Ft,e as Q,f as w,g as k,h as v,F as ut,G as dt,m as I,p as B,n as q,t as M,i as p,U as Me,j as ze,r as te,J as nt,K as hn,o as Bt,s as mn,k as ve,z as gn,u as Zt,l as Y,L as vn,M as bn,N as _n,O as We,E as ot,P as yn,b as wn,Q as Sn,R as En,c as Dn,S as kn,x as bt,v as Cn,I as _t,D as Ie,T as Tn,A as yt,V as In,w as wt,W as Ge,B as Yt,X as On}from"./app-1b332c21.js";import{_ as $n,a as An,b as Mn}from"./OtpDisplay-ec83b57b.js";import{u as xn}from"./userService-5f2b5050.js";import{u as Pn}from"./bus-84126a4e.js";import"./Spinner-b3cbad3a.js";/*! 2FAuth version 5.0.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const Nn={id:"groupSwitch",class:"container groups"},Fn={class:"columns is-centered"},Bn={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Rn={class:"columns is-multiline"},Gn=["onClick"],Ln={class:"columns is-centered"},Xn={class:"column has-text-centered"},Yn={__name:"GroupSwitch",props:{showGroupSwitch:Boolean,groups:Array},emits:["update:showGroupSwitch"],setup(t,{emit:e}){const n=Ft();function o(i){n.preferences.activeGroup=i,n.preferences.rememberActiveGroup&&xn.updatePreference("activeGroup",i),e("update:showGroupSwitch",!1)}return(i,r)=>{const s=Q("RouterLink"),l=Q("ButtonBackCloseCancel"),u=Q("VueFooter");return w(),k("div",Nn,[v("div",Fn,[v("div",Bn,[v("div",Rn,[(w(!0),k(ut,null,dt(t.groups,a=>(w(),k("div",{class:"column is-full",key:a.id},[I(p(Me),null,{default:B(({mode:c})=>[v("button",{class:q(["button is-fullwidth",{"is-dark has-text-light is-outlined":c=="dark"}]),onClick:f=>o(a.id)},M(a.name),11,Gn)]),_:2},1024)]))),128))]),v("div",Ln,[v("div",Xn,[I(s,{to:{name:"groups"}},{default:B(()=>[ze(M(i.$t("groups.manage_groups")),1)]),_:1})])])])]),I(u,{showButtons:!0},{default:B(()=>[I(l,{action:"close",useLinkTag:!1,onClosed:r[0]||(r[0]=a=>i.$emit("update:showGroupSwitch",!1))})]),_:1})])}}},zn={class:"container group-selector"},Wn={class:"columns is-centered is-multiline"},Un={class:"column is-full has-text-centered"},qn={class:"column is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},Hn={class:"columns is-multiline"},jn=["onClick"],Vn={key:0,class:"is-italic"},Kn={key:1},Qn={class:"columns is-centered"},Zn={class:"column has-text-centered"},Jn={class:"control"},eo={__name:"DestinationGroupSelector",props:{showDestinationGroupSelector:Boolean,selectedAccountsIds:Array,groups:Array},emits:["update:showDestinationGroupSelector","accounts-moved"],setup(t,{emit:e}){const n=t,o=te(null);async function i(){o.value===0?await nt.withdraw(n.selectedAccountsIds):await hn.assign(n.selectedAccountsIds,o.value),e("accounts-moved")}return(r,s)=>{const l=Q("RouterLink"),u=Q("ButtonBackCloseCancel"),a=Q("VueFooter");return w(),k("div",zn,[v("div",Wn,[v("div",Un,M(r.$t("groups.move_selected_to")),1),v("div",qn,[v("div",Hn,[(w(!0),k(ut,null,dt(t.groups,c=>(w(),k("div",{class:"column is-full",key:c.id},[I(p(Me),null,{default:B(({mode:f})=>[v("button",{class:q(["button is-fullwidth",{"is-link":p(o)===c.id,"is-dark has-text-light is-outlined":f=="dark"}]),onClick:y=>o.value=c.id},[c.id===0?(w(),k("span",Vn,M(r.$t("groups.no_group")),1)):(w(),k("span",Kn,M(c.name),1))],10,jn)]),_:2},1024)]))),128))]),v("div",Qn,[v("div",Zn,[I(l,{to:{name:"groups"}},{default:B(()=>[ze(M(r.$t("groups.manage_groups")),1)]),_:1})])])])]),I(a,{showButtons:!0},{default:B(()=>[v("p",Jn,[v("button",{class:"button is-link is-rounded",onClick:i},M(r.$t("commons.move")),1)]),I(u,{action:"cancel",useLinkTag:!1,onCanceled:s[0]||(s[0]=c=>r.$emit("update:showDestinationGroupSelector",!1))})]),_:1})])}}},to={role:"search",class:"field"},no={class:"control has-icons-right"},oo=["aria-label","title","value"],io={class:"icon is-small is-right"},ro=["title"],so={__name:"SearchBox",props:{keyword:String},setup(t){const e=te(null);Bt(()=>{document.addEventListener("keydown",n)}),mn(()=>{document.removeEventListener("keydown",n)});function n(o){var i;o.key==="f"&&(o.ctrlKey||o.metaKey)&&(o.preventDefault(),(i=e.value)==null||i.focus())}return(o,i)=>{const r=Q("FontAwesomeIcon");return w(),k("div",to,[v("div",no,[v("input",{ref_key:"searchInput",ref:e,id:"txtSearch",type:"search",tabindex:"1","aria-label":o.$t("commons.search"),title:o.$t("commons.search"),class:"input is-rounded is-search",value:t.keyword,onKeyup:i[0]||(i[0]=s=>o.$emit("update:keyword",s.target.value))},null,40,oo),v("span",io,[t.keyword!=""?(w(),k("button",{key:0,id:"btnClearSearch",tabindex:"1",title:o.$t("commons.clear_search"),class:"clear-selection delete",onClick:i[1]||(i[1]=s=>o.$emit("update:keyword",""))},null,8,ro)):(w(),ve(r,{key:1,icon:["fas","search"]}))])])])}}},ao={class:"toolbar has-text-centered"},lo={class:"columns"},uo={class:"column has-nowrap px-0"},co={class:"has-text-grey mr-1"},fo=["title"],po=["title"],ho=["title"],mo=["title"],go={__name:"Toolbar",props:{selectedCount:Number},setup(t){return(e,n)=>{const o=Q("FontAwesomeIcon");return w(),k("div",ao,[v("div",lo,[v("div",uo,[v("span",co,M(t.selectedCount)+" "+M(e.$t("commons.selected")),1),v("button",{id:"btnUnselectAll",onClick:n[0]||(n[0]=i=>e.$emit("clear-selected")),class:"clear-selection delete mr-4",style:gn({visibility:t.selectedCount>0?"visible":"hidden"}),title:e.$t("commons.clear_selection")},null,12,fo),v("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")},[v("span",null,M(e.$t("commons.all")),1),I(o,{class:"ml-1",icon:["fas","check-square"]})],8,po),v("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")},[I(o,{icon:["fas","sort-alpha-down"]})],8,ho),v("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")},[I(o,{icon:["fas","sort-alpha-up"]})],8,mo)])])])}}},vo={key:0,class:"control"},bo={class:"icon is-small"},_o={key:1,class:"control"},yo={key:2,class:"control"},wo=["disabled","title"],So={key:3,class:"control"},Eo=["disabled"],Do={key:4,class:"control"},ko=["disabled","title"],Co={__name:"ActionButtons",props:{inManagementMode:Boolean,areDisabled:Boolean},emits:["update:inManagementMode","move-button-clicked","delete-button-clicked","export-button-clicked"],setup(t,{emit:e}){const n=Zt(),o=Ft();function i(){o.preferences.useDirectCapture&&o.preferences.defaultCaptureMode==="advancedForm"?n.push({name:"createAccount"}):o.preferences.useDirectCapture&&o.preferences.defaultCaptureMode==="livescan"?n.push({name:"capture"}):n.push({name:"start"})}return(r,s)=>{const l=Q("FontAwesomeIcon");return w(),ve(p(Me),null,{default:B(({mode:u})=>[t.inManagementMode?Y("",!0):(w(),k("p",vo,[v("button",{class:"button is-link is-rounded is-focus",onClick:i},[v("span",null,M(r.$t("commons.new")),1),v("span",bo,[I(l,{icon:["fas","qrcode"]})])])])),t.inManagementMode?Y("",!0):(w(),k("p",_o,[v("button",{id:"btnManage",class:q(["button is-rounded",{"is-dark":u=="dark"}]),onClick:s[0]||(s[0]=a=>r.$emit("update:inManagementMode",!0))},M(r.$t("commons.manage")),3)])),t.inManagementMode?(w(),k("p",yo,[v("button",{id:"btnMove",disabled:t.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||t.areDisabled},t.areDisabled?"is-dark":"is-link"]]),onClick:s[1]||(s[1]=a=>r.$emit("move-button-clicked")),title:r.$t("groups.move_selected_to_group")},M(r.$t("commons.move")),11,wo)])):Y("",!0),t.inManagementMode?(w(),k("p",So,[v("button",{id:"btnDelete",disabled:t.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||t.areDisabled},t.areDisabled?"is-dark":"is-link"]]),onClick:s[2]||(s[2]=a=>r.$emit("delete-button-clicked"))},M(r.$t("commons.delete")),11,Eo)])):Y("",!0),t.inManagementMode?(w(),k("p",Do,[v("button",{id:"btnExport",disabled:t.areDisabled,class:q(["button is-rounded",[{"is-outlined":u=="dark"||t.areDisabled},t.areDisabled?"is-dark":"is-link"]]),onClick:s[3]||(s[3]=a=>r.$emit("export-button-clicked")),title:r.$t("twofaccounts.export_selected_to_json")},M(r.$t("commons.export")),11,ko)])):Y("",!0)]),_:1})}}};function To(t){return vn()?(bn(t),!0):!1}function At(t){return typeof t=="function"?t():p(t)}const Io=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Oo(t,e=!0){_n()?Bt(t):e?t():We(t)}function $o(t){var e;const n=At(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Ao=Io?window.document:void 0;/**!
* Sortable 1.15.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function me(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zt(Object(n),!0).forEach(function(o){Mo(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function it(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?it=function(e){return typeof e}:it=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(t)}function Mo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _e(){return _e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_e.apply(this,arguments)}function xo(t,e){if(t==null)return{};var n={},o=Object.keys(t),i,r;for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Po(t,e){if(t==null)return{};var n=xo(t,e),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(n[o]=t[o])}return n}var No="1.15.0";function be(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var ye=be(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ke=be(/Edge/i),Wt=be(/firefox/i),Ue=be(/safari/i)&&!be(/chrome/i)&&!be(/android/i),Jt=be(/iP(ad|od|hone)/i),en=be(/chrome/i)&&be(/android/i),tn={capture:!1,passive:!1};function O(t,e,n){t.addEventListener(e,n,!ye&&tn)}function T(t,e,n){t.removeEventListener(e,n,!ye&&tn)}function ct(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function Fo(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function pe(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&ct(t,e):ct(t,e))||o&&t===n)return t;if(t===n)break}while(t=Fo(t))}return null}var Ut=/\s+/g;function ee(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Ut," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Ut," ")}}function b(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function Be(t,e){var n="";if(typeof t=="string")n=t;else do{var o=b(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function nn(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function he(){var t=document.scrollingElement;return t||document.documentElement}function G(t,e,n,o,i){if(!(!t.getBoundingClientRect&&t!==window)){var r,s,l,u,a,c,f;if(t!==window&&t.parentNode&&t!==he()?(r=t.getBoundingClientRect(),s=r.top,l=r.left,u=r.bottom,a=r.right,c=r.height,f=r.width):(s=0,l=0,u=window.innerHeight,a=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!ye))do if(i&&i.getBoundingClientRect&&(b(i,"transform")!=="none"||n&&b(i,"position")!=="static")){var y=i.getBoundingClientRect();s-=y.top+parseInt(b(i,"border-top-width")),l-=y.left+parseInt(b(i,"border-left-width")),u=s+r.height,a=l+r.width;break}while(i=i.parentNode);if(o&&t!==window){var E=Be(i||t),D=E&&E.a,C=E&&E.d;E&&(s/=C,l/=D,f/=D,c/=C,u=s+c,a=l+f)}return{top:s,left:l,bottom:u,right:a,width:f,height:c}}}function qt(t,e,n){for(var o=ke(t,!0),i=G(t)[e];o;){var r=G(o)[n],s=void 0;if(n==="top"||n==="left"?s=i>=r:s=i<=r,!s)return o;if(o===he())break;o=ke(o,!1)}return!1}function Re(t,e,n,o){for(var i=0,r=0,s=t.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==_.ghost&&(o||s[r]!==_.dragged)&&pe(s[r],n.draggable,t,!1)){if(i===e)return s[r];i++}r++}return null}function Rt(t,e){for(var n=t.lastElementChild;n&&(n===_.ghost||b(n,"display")==="none"||e&&!ct(n,e));)n=n.previousElementSibling;return n||null}function ie(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==_.clone&&(!e||ct(t,e))&&n++;return n}function Ht(t){var e=0,n=0,o=he();if(t)do{var i=Be(t),r=i.a,s=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,n]}function Bo(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n)}return-1}function ke(t,e){if(!t||!t.getBoundingClientRect)return he();var n=t,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=b(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return he();if(o||e)return n;o=!0}}while(n=n.parentNode);return he()}function Ro(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function St(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var qe;function on(t,e){return function(){if(!qe){var n=arguments,o=this;n.length===1?t.call(o,n[0]):t.apply(o,n),qe=setTimeout(function(){qe=void 0},e)}}}function Go(){clearTimeout(qe),qe=void 0}function rn(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function sn(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var oe="Sortable"+new Date().getTime();function Lo(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(b(i,"display")==="none"||i===_.ghost)){t.push({target:i,rect:G(i)});var r=me({},t[t.length-1].rect);if(i.thisAnimationDuration){var s=Be(i,!0);s&&(r.top-=s.f,r.left-=s.e)}i.fromRect=r}})}},addAnimationState:function(o){t.push(o)},removeAnimationState:function(o){t.splice(Bo(t,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var r=!1,s=0;t.forEach(function(l){var u=0,a=l.target,c=a.fromRect,f=G(a),y=a.prevFromRect,E=a.prevToRect,D=l.rect,C=Be(a,!0);C&&(f.top-=C.f,f.left-=C.e),a.toRect=f,a.thisAnimationDuration&&St(y,f)&&!St(c,f)&&(D.top-f.top)/(D.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(u=Yo(D,y,E,i.options)),St(f,c)||(a.prevFromRect=c,a.prevToRect=f,u||(u=i.options.animation),i.animate(a,D,f,u)),u&&(r=!0,s=Math.max(s,u),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},u),a.thisAnimationDuration=u)}),clearTimeout(e),r?e=setTimeout(function(){typeof o=="function"&&o()},s):typeof o=="function"&&o(),t=[]},animate:function(o,i,r,s){if(s){b(o,"transition",""),b(o,"transform","");var l=Be(this.el),u=l&&l.a,a=l&&l.d,c=(i.left-r.left)/(u||1),f=(i.top-r.top)/(a||1);o.animatingX=!!c,o.animatingY=!!f,b(o,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=Xo(o),b(o,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),b(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){b(o,"transition",""),b(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},s)}}}}function Xo(t){return t.offsetWidth}function Yo(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}var xe=[],Et={initializeByDefault:!0},Qe={mount:function(e){for(var n in Et)Et.hasOwnProperty(n)&&!(n in e)&&(e[n]=Et[n]);xe.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),xe.push(e)},pluginEvent:function(e,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=e+"Global";xe.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][r]&&n[s.pluginName][r](me({sortable:n},o)),n.options[s.pluginName]&&n[s.pluginName][e]&&n[s.pluginName][e](me({sortable:n},o)))})},initializePlugins:function(e,n,o,i){xe.forEach(function(l){var u=l.pluginName;if(!(!e.options[u]&&!l.initializeByDefault)){var a=new l(e,n,e.options);a.sortable=e,a.options=e.options,e[u]=a,_e(o,a.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var s=this.modifyOption(e,r,e.options[r]);typeof s<"u"&&(e.options[r]=s)}},getEventProperties:function(e,n){var o={};return xe.forEach(function(i){typeof i.eventProperties=="function"&&_e(o,i.eventProperties.call(n[i.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return xe.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(i=r.optionListeners[n].call(e[r.pluginName],o))}),i}};function zo(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,s=t.toEl,l=t.fromEl,u=t.oldIndex,a=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,y=t.originalEvent,E=t.putSortable,D=t.extraEventProperties;if(e=e||n&&n[oe],!!e){var C,z=e.options,Z="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!ye&&!Ke?C=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(C=document.createEvent("Event"),C.initEvent(o,!0,!0)),C.to=s||n,C.from=l||n,C.item=i||n,C.clone=r,C.oldIndex=u,C.newIndex=a,C.oldDraggableIndex=c,C.newDraggableIndex=f,C.originalEvent=y,C.pullMode=E?E.lastPutMode:void 0;var P=me(me({},D),Qe.getEventProperties(o,e));for(var V in P)C[V]=P[V];n&&n.dispatchEvent(C),z[Z]&&z[Z].call(e,C)}}var Wo=["evt"],K=function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Po(o,Wo);Qe.pluginEvent.bind(_)(e,n,me({dragEl:d,parentEl:x,ghostEl:S,rootEl:$,nextEl:Ae,lastDownEl:rt,cloneEl:A,cloneHidden:De,dragStarted:Le,putSortable:X,activeSortable:_.active,originalEvent:i,oldIndex:Fe,oldDraggableIndex:He,newIndex:ne,newDraggableIndex:Ee,hideGhostForTarget:dn,unhideGhostForTarget:cn,cloneNowHidden:function(){De=!0},cloneNowShown:function(){De=!1},dispatchSortableEvent:function(l){j({sortable:n,name:l,originalEvent:i})}},r))};function j(t){zo(me({putSortable:X,cloneEl:A,targetEl:d,rootEl:$,oldIndex:Fe,oldDraggableIndex:He,newIndex:ne,newDraggableIndex:Ee},t))}var d,x,S,$,Ae,rt,A,De,Fe,ne,He,Ee,Ze,X,Ne=!1,ft=!1,pt=[],Oe,se,Dt,kt,jt,Vt,Le,Pe,je,Ve=!1,Je=!1,st,U,Ct=[],Mt=!1,ht=[],gt=typeof document<"u",et=Jt,Kt=Ke||ye?"cssFloat":"float",Uo=gt&&!en&&!Jt&&"draggable"in document.createElement("div"),an=function(){if(gt){if(ye)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),ln=function(e,n){var o=b(e),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=Re(e,0,n),s=Re(e,1,n),l=r&&b(r),u=s&&b(s),a=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+G(r).width,c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+G(s).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var f=l.float==="left"?"left":"right";return s&&(u.clear==="both"||u.clear===f)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||a>=i&&o[Kt]==="none"||s&&o[Kt]==="none"&&a+c>i)?"vertical":"horizontal"},qo=function(e,n,o){var i=o?e.left:e.top,r=o?e.right:e.bottom,s=o?e.width:e.height,l=o?n.left:n.top,u=o?n.right:n.bottom,a=o?n.width:n.height;return i===l||r===u||i+s/2===l+a/2},Ho=function(e,n){var o;return pt.some(function(i){var r=i[oe].options.emptyInsertThreshold;if(!(!r||Rt(i))){var s=G(i),l=e>=s.left-r&&e<=s.right+r,u=n>=s.top-r&&n<=s.bottom+r;if(l&&u)return o=i}}),o},un=function(e){function n(r,s){return function(l,u,a,c){var f=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(r==null&&(s||f))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,c),s)(l,u,a,c);var y=(s?l:u).options.group.name;return r===!0||typeof r=="string"&&r===y||r.join&&r.indexOf(y)>-1}}var o={},i=e.group;(!i||it(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=n(i.pull,!0),o.checkPut=n(i.put),o.revertClone=i.revertClone,e.group=o},dn=function(){!an&&S&&b(S,"display","none")},cn=function(){!an&&S&&b(S,"display","")};gt&&!en&&document.addEventListener("click",function(t){if(ft)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ft=!1,!1},!0);var $e=function(e){if(d){e=e.touches?e.touches[0]:e;var n=Ho(e.clientX,e.clientY);if(n){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[oe]._onDragOver(o)}}},jo=function(e){d&&d.parentNode[oe]._isOutsideThisEl(e.target)};function _(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=_e({},e),t[oe]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ln(t,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&&!Ue,emptyInsertThreshold:5};Qe.initializePlugins(this,t,n);for(var o in n)!(o in e)&&(e[o]=n[o]);un(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:Uo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?O(t,"pointerdown",this._onTapStart):(O(t,"mousedown",this._onTapStart),O(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(t,"dragover",this),O(t,"dragenter",this)),pt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_e(this,Lo())}_.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,o=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,c=i.filter;if(ni(o),!d&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&Ue&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=pe(u,i.draggable,o,!1),!(u&&u.animated)&&rt!==u)){if(Fe=ie(u),He=ie(u,i.draggable),typeof c=="function"){if(c.call(this,e,u,this)){j({sortable:n,rootEl:a,name:"filter",targetEl:u,toEl:o,fromEl:o}),K("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=pe(a,f.trim(),o,!1),f)return j({sortable:n,rootEl:f,name:"filter",targetEl:u,fromEl:o,toEl:o}),K("filter",n,{evt:e}),!0}),c)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!pe(a,i.handle,o,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,n,o){var i=this,r=i.el,s=i.options,l=r.ownerDocument,u;if(o&&!d&&o.parentNode===r){var a=G(o);if($=r,d=o,x=d.parentNode,Ae=d.nextSibling,rt=o,Ze=s.group,_.dragged=d,Oe={target:d,clientX:(n||e).clientX,clientY:(n||e).clientY},jt=Oe.clientX-a.left,Vt=Oe.clientY-a.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,d.style["will-change"]="all",u=function(){if(K("delayEnded",i,{evt:e}),_.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Wt&&i.nativeDraggable&&(d.draggable=!0),i._triggerDragStart(e,n),j({sortable:i,name:"choose",originalEvent:e}),ee(d,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){nn(d,c.trim(),Tt)}),O(l,"dragover",$e),O(l,"mousemove",$e),O(l,"touchmove",$e),O(l,"mouseup",i._onDrop),O(l,"touchend",i._onDrop),O(l,"touchcancel",i._onDrop),Wt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),K("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Ke||ye))){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($,"dragstart",this._onDragStart));try{document.selection?at(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ne=!1,$&&d){K("dragStarted",this,{evt:n}),this.nativeDraggable&&O(document,"dragover",jo);var o=this.options;!e&&ee(d,o.dragClass,!1),ee(d,o.ghostClass,!0),_.active=this,e&&this._appendGhost(),j({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(se){this._lastX=se.clientX,this._lastY=se.clientY,dn();for(var e=document.elementFromPoint(se.clientX,se.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(se.clientX,se.clientY),e!==n);)n=e;if(d.parentNode[oe]._isOutsideThisEl(e),n)do{if(n[oe]){var o=void 0;if(o=n[oe]._onDragOver({clientX:se.clientX,clientY:se.clientY,target:e,rootEl:n}),o&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);cn()}},_onTouchMove:function(e){if(Oe){var n=this.options,o=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,s=S&&Be(S,!0),l=S&&s&&s.a,u=S&&s&&s.d,a=et&&U&&Ht(U),c=(r.clientX-Oe.clientX+i.x)/(l||1)+(a?a[0]-Ct[0]:0)/(l||1),f=(r.clientY-Oe.clientY+i.y)/(u||1)+(a?a[1]-Ct[1]:0)/(u||1);if(!_.active&&!Ne){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(S){s?(s.e+=c-(Dt||0),s.f+=f-(kt||0)):s={a:1,b:0,c:0,d:1,e:c,f};var y="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(S,"webkitTransform",y),b(S,"mozTransform",y),b(S,"msTransform",y),b(S,"transform",y),Dt=c,kt=f,se=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!S){var e=this.options.fallbackOnBody?document.body:$,n=G(d,!0,et,!0,e),o=this.options;if(et){for(U=e;b(U,"position")==="static"&&b(U,"transform")==="none"&&U!==document;)U=U.parentNode;U!==document.body&&U!==document.documentElement?(U===document&&(U=he()),n.top+=U.scrollTop,n.left+=U.scrollLeft):U=he(),Ct=Ht(U)}S=d.cloneNode(!0),ee(S,o.ghostClass,!1),ee(S,o.fallbackClass,!0),ee(S,o.dragClass,!0),b(S,"transition",""),b(S,"transform",""),b(S,"box-sizing","border-box"),b(S,"margin",0),b(S,"top",n.top),b(S,"left",n.left),b(S,"width",n.width),b(S,"height",n.height),b(S,"opacity","0.8"),b(S,"position",et?"absolute":"fixed"),b(S,"zIndex","100000"),b(S,"pointerEvents","none"),_.ghost=S,e.appendChild(S),b(S,"transform-origin",jt/parseInt(S.style.width)*100+"% "+Vt/parseInt(S.style.height)*100+"%")}},_onDragStart:function(e,n){var o=this,i=e.dataTransfer,r=o.options;if(K("dragStart",this,{evt:e}),_.eventCanceled){this._onDrop();return}K("setupClone",this),_.eventCanceled||(A=sn(d),A.removeAttribute("id"),A.draggable=!1,A.style["will-change"]="",this._hideClone(),ee(A,this.options.chosenClass,!1),_.clone=A),o.cloneId=at(function(){K("clone",o),!_.eventCanceled&&(o.options.removeCloneOnHide||$.insertBefore(A,d),o._hideClone(),j({sortable:o,name:"clone"}))}),!n&&ee(d,r.dragClass,!0),n?(ft=!0,o._loopId=setInterval(o._emulateDragOver,50)):(T(document,"mouseup",o._onDrop),T(document,"touchend",o._onDrop),T(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,d)),O(document,"drop",o),b(d,"transform","translateZ(0)")),Ne=!0,o._dragStartId=at(o._dragStarted.bind(o,n,e)),O(document,"selectstart",o),Le=!0,Ue&&b(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,o=e.target,i,r,s,l=this.options,u=l.group,a=_.active,c=Ze===u,f=l.sort,y=X||a,E,D=this,C=!1;if(Mt)return;function z(m,R){K(m,D,me({evt:e,isOwner:c,axis:E?"vertical":"horizontal",revert:s,dragRect:i,targetRect:r,canSort:f,fromSortable:y,target:o,completed:P,onMove:function(H,Te){return tt($,n,d,i,H,G(H),e,Te)},changed:V},R))}function Z(){z("dragOverAnimationCapture"),D.captureAnimationState(),D!==y&&y.captureAnimationState()}function P(m){return z("dragOverCompleted",{insertion:m}),m&&(c?a._hideClone():a._showClone(D),D!==y&&(ee(d,X?X.options.ghostClass:a.options.ghostClass,!1),ee(d,l.ghostClass,!0)),X!==D&&D!==_.active?X=D:D===_.active&&X&&(X=null),y===D&&(D._ignoreWhileAnimating=o),D.animateAll(function(){z("dragOverAnimationComplete"),D._ignoreWhileAnimating=null}),D!==y&&(y.animateAll(),y._ignoreWhileAnimating=null)),(o===d&&!d.animated||o===n&&!o.animated)&&(Pe=null),!l.dragoverBubble&&!e.rootEl&&o!==document&&(d.parentNode[oe]._isOutsideThisEl(e.target),!m&&$e(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),C=!0}function V(){ne=ie(d),Ee=ie(d,l.draggable),j({sortable:D,name:"change",toEl:n,newIndex:ne,newDraggableIndex:Ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=pe(o,l.draggable,n,!0),z("dragOver"),_.eventCanceled)return C;if(d.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||D._ignoreWhileAnimating===o)return P(!1);if(ft=!1,a&&!l.disabled&&(c?f||(s=x!==$):X===this||(this.lastPutMode=Ze.checkPull(this,a,d,e))&&u.checkPut(this,a,d,e))){if(E=this._getDirection(e,o)==="vertical",i=G(d),z("dragOverValid"),_.eventCanceled)return C;if(s)return x=$,Z(),this._hideClone(),z("revert"),_.eventCanceled||(Ae?$.insertBefore(d,Ae):$.appendChild(d)),P(!0);var L=Rt(n,l.draggable);if(!L||Zo(e,E,this)&&!L.animated){if(L===d)return P(!1);if(L&&n===e.target&&(o=L),o&&(r=G(o)),tt($,n,d,i,o,r,e,!!o)!==!1)return Z(),L&&L.nextSibling?n.insertBefore(d,L.nextSibling):n.appendChild(d),x=n,V(),P(!0)}else if(L&&Qo(e,E,this)){var ae=Re(n,0,l,!0);if(ae===d)return P(!1);if(o=ae,r=G(o),tt($,n,d,i,o,r,e,!1)!==!1)return Z(),n.insertBefore(d,ae),x=n,V(),P(!0)}else if(o.parentNode===n){r=G(o);var J=0,ge,we=d.parentNode!==n,W=!qo(d.animated&&d.toRect||i,o.animated&&o.toRect||r,E),le=E?"top":"left",ue=qt(o,"top","top")||qt(d,"top","top"),Se=ue?ue.scrollTop:void 0;Pe!==o&&(ge=r[le],Ve=!1,Je=!W&&l.invertSwap||we),J=Jo(e,o,r,E,W?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Je,Pe===o);var re;if(J!==0){var de=ie(d);do de-=J,re=x.children[de];while(re&&(b(re,"display")==="none"||re===S))}if(J===0||re===o)return P(!1);Pe=o,je=J;var Ce=o.nextElementSibling,ce=!1;ce=J===1;var g=tt($,n,d,i,o,r,e,ce);if(g!==!1)return(g===1||g===-1)&&(ce=g===1),Mt=!0,setTimeout(Ko,30),Z(),ce&&!Ce?n.appendChild(d):o.parentNode.insertBefore(d,ce?Ce:o),ue&&rn(ue,0,Se-ue.scrollTop),x=d.parentNode,ge!==void 0&&!Je&&(st=Math.abs(ge-G(o)[le])),V(),P(!0)}if(n.contains(d))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){T(document,"mousemove",this._onTouchMove),T(document,"touchmove",this._onTouchMove),T(document,"pointermove",this._onTouchMove),T(document,"dragover",$e),T(document,"mousemove",$e),T(document,"touchmove",$e)},_offUpEvents:function(){var e=this.el.ownerDocument;T(e,"mouseup",this._onDrop),T(e,"touchend",this._onDrop),T(e,"pointerup",this._onDrop),T(e,"touchcancel",this._onDrop),T(document,"selectstart",this)},_onDrop:function(e){var n=this.el,o=this.options;if(ne=ie(d),Ee=ie(d,o.draggable),K("drop",this,{evt:e}),x=d&&d.parentNode,ne=ie(d),Ee=ie(d,o.draggable),_.eventCanceled){this._nulling();return}Ne=!1,Je=!1,Ve=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),xt(this.cloneId),xt(this._dragStartId),this.nativeDraggable&&(T(document,"drop",this),T(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ue&&b(document.body,"user-select",""),b(d,"transform",""),e&&(Le&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),S&&S.parentNode&&S.parentNode.removeChild(S),($===x||X&&X.lastPutMode!=="clone")&&A&&A.parentNode&&A.parentNode.removeChild(A),d&&(this.nativeDraggable&&T(d,"dragend",this),Tt(d),d.style["will-change"]="",Le&&!Ne&&ee(d,X?X.options.ghostClass:this.options.ghostClass,!1),ee(d,this.options.chosenClass,!1),j({sortable:this,name:"unchoose",toEl:x,newIndex:null,newDraggableIndex:null,originalEvent:e}),$!==x?(ne>=0&&(j({rootEl:x,name:"add",toEl:x,fromEl:$,originalEvent:e}),j({sortable:this,name:"remove",toEl:x,originalEvent:e}),j({rootEl:x,name:"sort",toEl:x,fromEl:$,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),X&&X.save()):ne!==Fe&&ne>=0&&(j({sortable:this,name:"update",toEl:x,originalEvent:e}),j({sortable:this,name:"sort",toEl:x,originalEvent:e})),_.active&&((ne==null||ne===-1)&&(ne=Fe,Ee=He),j({sortable:this,name:"end",toEl:x,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){K("nulling",this),$=d=x=S=Ae=A=rt=De=Oe=se=Le=ne=Ee=Fe=He=Pe=je=X=Ze=_.dragged=_.ghost=_.clone=_.active=null,ht.forEach(function(e){e.checked=!0}),ht.length=Dt=kt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),Vo(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,o=this.el.children,i=0,r=o.length,s=this.options;i<r;i++)n=o[i],pe(n,s.draggable,this.el,!1)&&e.push(n.getAttribute(s.dataIdAttr)||ti(n));return e},sort:function(e,n){var o={},i=this.el;this.toArray().forEach(function(r,s){var l=i.children[s];pe(l,this.options.draggable,i,!1)&&(o[r]=l)},this),n&&this.captureAnimationState(),e.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return pe(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var o=this.options;if(n===void 0)return o[e];var i=Qe.modifyOption(this,e,n);typeof i<"u"?o[e]=i:o[e]=n,e==="group"&&un(o)},destroy:function(){K("destroy",this);var e=this.el;e[oe]=null,T(e,"mousedown",this._onTapStart),T(e,"touchstart",this._onTapStart),T(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(T(e,"dragover",this),T(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),pt.splice(pt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!De){if(K("hideClone",this),_.eventCanceled)return;b(A,"display","none"),this.options.removeCloneOnHide&&A.parentNode&&A.parentNode.removeChild(A),De=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(De){if(K("showClone",this),_.eventCanceled)return;d.parentNode==$&&!this.options.group.revertClone?$.insertBefore(A,d):Ae?$.insertBefore(A,Ae):$.appendChild(A),this.options.group.revertClone&&this.animate(d,A),b(A,"display",""),De=!1}}};function Vo(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function tt(t,e,n,o,i,r,s,l){var u,a=t[oe],c=a.options.onMove,f;return window.CustomEvent&&!ye&&!Ke?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=t,u.dragged=n,u.draggedRect=o,u.related=i||e,u.relatedRect=r||G(e),u.willInsertAfter=l,u.originalEvent=s,t.dispatchEvent(u),c&&(f=c.call(a,u,s)),f}function Tt(t){t.draggable=!1}function Ko(){Mt=!1}function Qo(t,e,n){var o=G(Re(n.el,0,n.options,!0)),i=10;return e?t.clientX<o.left-i||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-i||t.clientY<o.bottom&&t.clientX<o.left}function Zo(t,e,n){var o=G(Rt(n.el,n.options.draggable)),i=10;return e?t.clientX>o.right+i||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+i}function Jo(t,e,n,o,i,r,s,l){var u=o?t.clientY:t.clientX,a=o?n.height:n.width,c=o?n.top:n.left,f=o?n.bottom:n.right,y=!1;if(!s){if(l&&st<a*i){if(!Ve&&(je===1?u>c+a*r/2:u<f-a*r/2)&&(Ve=!0),Ve)y=!0;else if(je===1?u<c+st:u>f-st)return-je}else if(u>c+a*(1-i)/2&&u<f-a*(1-i)/2)return ei(e)}return y=y||s,y&&(u<c+a*r/2||u>f-a*r/2)?u>c+a/2?1:-1:0}function ei(t){return ie(d)<ie(t)?1:-1}function ti(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function ni(t){ht.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&ht.push(o)}}function at(t){return setTimeout(t,0)}function xt(t){return clearTimeout(t)}gt&&O(document,"touchmove",function(t){(_.active||Ne)&&t.cancelable&&t.preventDefault()});_.utils={on:O,off:T,css:b,find:nn,is:function(e,n){return!!pe(e,n,e,!1)},extend:Ro,throttle:on,closest:pe,toggleClass:ee,clone:sn,index:ie,nextTick:at,cancelNextTick:xt,detectDirection:ln,getChild:Re};_.get=function(t){return t[oe]};_.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(_.utils=me(me({},_.utils),o.utils)),Qe.mount(o)})};_.create=function(t,e){return new _(t,e)};_.version=No;var F=[],Xe,Pt,Nt=!1,It,Ot,mt,Ye;function oi(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?O(document,"dragover",this._handleAutoScroll):this.options.supportPointer?O(document,"pointermove",this._handleFallbackAutoScroll):o.touches?O(document,"touchmove",this._handleFallbackAutoScroll):O(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?T(document,"dragover",this._handleAutoScroll):(T(document,"pointermove",this._handleFallbackAutoScroll),T(document,"touchmove",this._handleFallbackAutoScroll),T(document,"mousemove",this._handleFallbackAutoScroll)),Qt(),lt(),Go()},nulling:function(){mt=Pt=Xe=Nt=Ye=It=Ot=null,F.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var i=this,r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(r,s);if(mt=n,o||this.options.forceAutoScrollFallback||Ke||ye||Ue){$t(n,this.options,l,o);var u=ke(l,!0);Nt&&(!Ye||r!==It||s!==Ot)&&(Ye&&Qt(),Ye=setInterval(function(){var a=ke(document.elementFromPoint(r,s),!0);a!==u&&(u=a,lt()),$t(n,i.options,a,o)},10),It=r,Ot=s)}else{if(!this.options.bubbleScroll||ke(l,!0)===he()){lt();return}$t(n,this.options,ke(l,!1),!1)}}},_e(t,{pluginName:"scroll",initializeByDefault:!0})}function lt(){F.forEach(function(t){clearInterval(t.pid)}),F=[]}function Qt(){clearInterval(Ye)}var $t=on(function(t,e,n,o){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=he(),a=!1,c;Pt!==n&&(Pt=n,lt(),Xe=e.scroll,c=e.scrollFn,Xe===!0&&(Xe=ke(n,!0)));var f=0,y=Xe;do{var E=y,D=G(E),C=D.top,z=D.bottom,Z=D.left,P=D.right,V=D.width,L=D.height,ae=void 0,J=void 0,ge=E.scrollWidth,we=E.scrollHeight,W=b(E),le=E.scrollLeft,ue=E.scrollTop;E===u?(ae=V<ge&&(W.overflowX==="auto"||W.overflowX==="scroll"||W.overflowX==="visible"),J=L<we&&(W.overflowY==="auto"||W.overflowY==="scroll"||W.overflowY==="visible")):(ae=V<ge&&(W.overflowX==="auto"||W.overflowX==="scroll"),J=L<we&&(W.overflowY==="auto"||W.overflowY==="scroll"));var Se=ae&&(Math.abs(P-i)<=s&&le+V<ge)-(Math.abs(Z-i)<=s&&!!le),re=J&&(Math.abs(z-r)<=s&&ue+L<we)-(Math.abs(C-r)<=s&&!!ue);if(!F[f])for(var de=0;de<=f;de++)F[de]||(F[de]={});(F[f].vx!=Se||F[f].vy!=re||F[f].el!==E)&&(F[f].el=E,F[f].vx=Se,F[f].vy=re,clearInterval(F[f].pid),(Se!=0||re!=0)&&(a=!0,F[f].pid=setInterval((function(){o&&this.layer===0&&_.active._onTouchMove(mt);var Ce=F[this.layer].vy?F[this.layer].vy*l:0,ce=F[this.layer].vx?F[this.layer].vx*l:0;typeof c=="function"&&c.call(_.dragged.parentNode[oe],ce,Ce,t,mt,F[this.layer].el)!=="continue"||rn(F[this.layer].el,ce,Ce)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&y!==u&&(y=ke(y,!1)));Nt=a}},30),fn=function(e){var n=e.originalEvent,o=e.putSortable,i=e.dragEl,r=e.activeSortable,s=e.dispatchSortableEvent,l=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(n){var a=o||r;l();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(c.clientX,c.clientY);u(),a&&!a.el.contains(f)&&(s("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function Gt(){}Gt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=Re(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:fn};_e(Gt,{pluginName:"revertOnSpill"});function Lt(){}Lt.prototype={onSpill:function(e){var n=e.dragEl,o=e.putSortable,i=o||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:fn};_e(Lt,{pluginName:"removeOnSpill"});_.mount(new oi);_.mount(Lt,Gt);function ii(t,e,n={}){let o;const{document:i=Ao,...r}=n,s={onUpdate:c=>{pn(e,c.oldIndex,c.newIndex)}},l=()=>{const c=typeof t=="string"?i==null?void 0:i.querySelector(t):$o(t);!c||o!==void 0||(o=new _(c,{...s,...r}))},u=()=>{o==null||o.destroy(),o=void 0},a=(c,f)=>{if(f!==void 0)o==null||o.option(c,f);else return o==null?void 0:o.option(c)};return Oo(l),To(u),{stop:u,start:l,option:a}}function pn(t,e,n){const o=ot(t),i=o?[...At(t)]:At(t);if(n>=0&&n<i.length){const r=i.splice(e,1)[0];We(()=>{i.splice(n,0,r),o&&(t.value=i)})}}const ri={key:2,class:"header"},si={class:"columns is-gapless is-mobile is-centered"},ai={class:"column is-three-quarters-mobile is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd"},li={key:1,class:"has-text-centered"},ui={class:"columns"},di={key:0,class:"column"},ci=["title"],fi={key:1,class:"column"},pi=["title"],hi={key:3},mi={class:"accounts"},gi={class:"tfa-container"},vi={key:0,class:"tfa-cell tfa-checkbox"},bi={class:"field"},_i=["id","value","name"],yi=["for","onKeypress"],wi=["onClick","onKeyup"],Si={class:"tfa-text has-ellipsis"},Ei=["src","alt"],Di={class:"has-ellipsis is-family-primary is-size-6 is-size-7-mobile has-text-grey"},ki={class:"has-text-right"},Ci={key:0},Ti={key:0,class:"has-nowrap has-text-grey has-text-centered is-size-5"},Ii=["onClick","onKeyup","title"],Oi={key:1},$i=["onClick","title"],Ai={class:"has-text-right"},Mi=["onClick"],xi={key:0,class:"tfa-cell tfa-edit has-text-grey"},Pi={key:0,class:"drag-handle tfa-cell tfa-dots has-text-grey"},Li={__name:"Accounts",setup(t){const e=yn("2fauth"),n=Zt(),o=wn(),i=Ft(),r=Pn(),s=Sn(),{copy:l,copied:u}=En({legacy:!0}),a=Dn(),c=kn(),f=te(!1),y=te(!1),E=te(!1);te(!1);const D=te(!1),C=te(null),z=te(null),Z=te(null),P=te({otp_type:"",account:"",service:"",icon:""}),V=te([]),L=te([]);bt(f,g=>{var m;g==!1&&((m=Z.value)==null||m.clearOTP())}),bt(()=>a.items,g=>{r.inManagementMode&&J()}),bt(()=>r.inManagementMode,g=>{g&&J()});const ae=Cn(()=>!a.isEmpty&&!y.value&&!E.value);Bt(async()=>{i.preferences.getOtpOnRequest?a.fetch().then(()=>{a.backendWasNewer&&o.info({text:_t("commons.data_refreshed_to_reflect_server_changes"),duration:1e4})}):de(),c.fetch()});function J(){ii("#dv",a.filtered,{animation:200,handle:".drag-handle",onUpdate:g=>{const m=a.filtered[g.oldIndex].id,R=a.items.findIndex(fe=>fe.id==m);pn(a.items,R,g.newIndex),We(()=>{a.saveOrder()})}})}function ge(){a.fetch(),a.selectNone(),E.value=!1,o.success({text:_t("twofaccounts.accounts_moved")})}function we(g){P.value.otp_type=g.otp_type,P.value.service=g.service,P.value.account=g.account,P.value.icon=g.icon,We().then(()=>{f.value=!0,Z.value.show(g.id)})}function W(g){r.inManagementMode?a.select(g.id):!i.preferences.getOtpOnRequest&&g.otp_type.includes("totp")?le(g.otp.password):we(g)}function le(g){l(g),u&&(i.preferences.kickUserAfter==-1&&i.logout({kicked:!0}),o.success({text:_t("commons.copied_to_clipboard")}))}async function ue(g){nt.getOtpById(g.id).then(m=>{let R=m.data;if(le(R.password),R.otp_type=="hotp"){let fe=accounts.value.find(H=>H.id==g.id);fe!=null&&(fe.counter=R.counter)}})}function Se(g,m){L.value.filter(R=>R.props.period==g||g==null).forEach(R=>{R.turnOn(m)})}function re(g){L.value.filter(m=>m.props.period==g||g==null).forEach(m=>{m.turnOff()})}async function de(g){D.value=!0,re(g);let m;g==null?(C.value=-1,m=nt.getAll(!0)):(C.value=g,m=nt.getByIds(a.accountIdsWithPeriod(g).join(","),!0)),m.then(R=>{let fe=0;R.data.forEach(H=>{const Te=a.items.findIndex(vt=>vt.id===H.id);a.items[Te]==null?a.items.push(H):a.items[Te].otp=H.otp,fe=H.otp.generated_at}),V.value.forEach(H=>{(H.props.period==g||g==null)&&We().then(()=>{H.startLoop(fe)})})}).finally(()=>{D.value=!1,C.value=null})}async function Ce(){await a.deleteSelected(),a.isEmpty&&(r.inManagementMode=!1,n.push({name:"start"}))}function ce(){r.inManagementMode=!1,a.selectNone()}return(g,m)=>{const R=Q("FontAwesomeIcon"),fe=Q("Modal"),H=Q("font-awesome-icon"),Te=Q("RouterLink"),vt=Q("VueFooter");return w(),k("div",null,[p(y)?(w(),ve(Yn,{key:0,showGroupSwitch:p(y),"onUpdate:showGroupSwitch":m[0]||(m[0]=h=>ot(y)?y.value=h:null),groups:p(c).items,"onUpdate:groups":m[1]||(m[1]=h=>p(c).items=h)},null,8,["showGroupSwitch","groups"])):Y("",!0),p(E)?(w(),ve(eo,{key:1,showDestinationGroupSelector:p(E),"onUpdate:showDestinationGroupSelector":m[2]||(m[2]=h=>ot(E)?E.value=h:null),selectedAccountsIds:p(a).selectedIds,"onUpdate:selectedAccountsIds":m[3]||(m[3]=h=>p(a).selectedIds=h),groups:p(c).items,onAccountsMoved:ge},null,8,["showDestinationGroupSelector","selectedAccountsIds","groups"])):Y("",!0),p(ae)||p(y)?(w(),k("div",ri,[v("div",si,[v("div",ai,[I(so,{keyword:p(a).filter,"onUpdate:keyword":m[4]||(m[4]=h=>p(a).filter=h)},null,8,["keyword"]),p(r).inManagementMode?(w(),ve(go,{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",li,[v("div",ui,[I(p(Me),null,{default:B(({mode:h})=>[p(y)?(w(),k("div",di,[v("button",{id:"btnHideGroupSwitch",title:g.$t("groups.hide_group_selector"),tabindex:"1",class:q(["button is-text is-like-text",{"has-text-grey":h!="dark"}]),onClick:m[9]||(m[9]=Ie(N=>y.value=!p(y),["stop"]))},M(g.$t("groups.select_accounts_to_show")),11,ci)])):(w(),k("div",fi,[v("button",{id:"btnShowGroupSwitch",title:g.$t("groups.show_group_selector"),tabindex:"1",class:q(["button is-text is-like-text",{"has-text-grey":h!="dark"}]),onClick:m[10]||(m[10]=Ie(N=>y.value=!p(y),["stop"]))},[ze(M(p(c).current)+" ("+M(p(a).filteredCount)+")  ",1),I(R,{icon:["fas","caret-down"]})],10,pi)]))]),_:1})])]))])])])):Y("",!0),I(fe,{modelValue:p(f),"onUpdate:modelValue":m[12]||(m[12]=h=>ot(f)?f.value=h:null)},{default:B(()=>[I($n,Tn({ref_key:"otpDisplay",ref:Z},p(P),{onPleaseCloseMe:m[11]||(m[11]=h=>f.value=!1)}),null,16)]),_:1},8,["modelValue"]),p(i).preferences.getOtpOnRequest?Y("",!0):(w(),k("span",hi,[(w(!0),k(ut,null,dt(p(a).periods,h=>(w(),ve(An,{key:h.period,autostart:!1,period:h.period,generated_at:h.generated_at,onLoopEnded:N=>de(h.period),onLoopStarted:N=>Se(h.period,N),onSteppedUp:N=>Se(h.period,N),ref_for:!0,ref_key:"looperRefs",ref:V},null,8,["period","generated_at","onLoopEnded","onLoopStarted","onSteppedUp"]))),128))])),p(ae)?(w(),k("div",{key:4,class:q(["container",p(r).inManagementMode?"is-edit-mode":""])},[v("div",mi,[v("span",{id:"dv",class:q(["columns is-multiline",{"is-centered":p(i).preferences.displayMode==="grid"}])},[(w(!0),k(ut,null,dt(p(a).filtered,h=>(w(),k("div",{class:q([[p(i).preferences.displayMode==="grid"?"tfa-grid":"tfa-list"],"column is-narrow"]),key:h.id},[v("div",gi,[I(Ge,{name:"slideCheckbox"},{default:B(()=>[p(r).inManagementMode?(w(),k("div",vi,[v("div",bi,[I(p(Me),null,{default:B(({mode:N})=>[yt(v("input",{class:q(["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[13]||(m[13]=Xt=>p(a).selectedIds=Xt)},null,10,_i),[[In,p(a).selectedIds]])]),_:2},1024),v("label",{tabindex:"0",for:"ckb_"+h.id,onKeypress:wt(Ie(N=>p(a).select(h.id),["prevent"]),["space"])},null,40,yi)])])):Y("",!0)]),_:2},1024),v("div",{tabindex:"0",class:"tfa-cell tfa-content is-size-3 is-size-4-mobile",onClick:[Ie(N=>W(h),["exact"]),Ie(N=>ue(h),["ctrl"])],onKeyup:wt(N=>W(h),["enter"]),role:"button"},[v("div",Si,[h.icon&&p(i).preferences.showAccountsIcons?(w(),k("img",{key:0,class:"tfa-icon",src:p(e).config.subdirectory+"/storage/icons/"+h.icon,alt:g.$t("twofaccounts.icon_for_account_x_at_service_y",{account:h.account,service:h.service})},null,8,Ei)):Y("",!0),ze(" "+M(h.service?h.service:g.$t("twofaccounts.no_service")),1),p(s).useEncryption&&h.account===g.$t("errors.indecipherable")?(w(),ve(R,{key:1,class:"has-text-danger is-size-5 ml-2",icon:["fas","exclamation-circle"]})):Y("",!0),v("span",Di,M(h.account),1)])],40,wi),I(Ge,{name:"popLater"},{default:B(()=>[yt(v("div",ki,[h.otp!=null?(w(),k("span",Ci,[p(D)==!0&&(p(C)==-1||p(C)==h.period)?(w(),k("span",Ti,[I(R,{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:N=>le(h.otp.password),onKeyup:wt(N=>le(h.otp.password),["enter"]),title:g.$t("commons.copy_to_clipboard")},M(p(On)(h.otp.password,p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP&&p(z)==h.id)),41,Ii)),h.otp_type.includes("totp")?(w(),ve(Mn,{key:2,class:q("condensed"),ref_for:!0,ref_key:"dotsRefs",ref:L,period:h.period},null,8,["period"])):Y("",!0)])):(w(),k("span",Oi,[I(p(Me),null,{default:B(({mode:N})=>[v("button",{class:q(["button tag",N=="dark"?"is-dark":"is-white"]),onClick:Xt=>we(h),title:g.$t("twofaccounts.import.import_this_account")},M(g.$t("commons.generate")),11,$i)]),_:2},1024)]))],512),[[Yt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024),p(i).preferences.showOtpAsDot&&p(i).preferences.revealDottedOTP?(w(),ve(Ge,{key:0,name:"popLater"},{default:B(()=>[yt(v("div",Ai,[p(z)==h.id?(w(),k("button",{key:0,class:"pr-0 button is-ghost has-text-grey-dark",onClick:m[14]||(m[14]=Ie(N=>z.value=null,["stop"]))},[I(H,{icon:["fas","eye"]})])):(w(),k("button",{key:1,class:"pr-0 button is-ghost has-text-grey-dark",onClick:Ie(N=>z.value=h.id,["stop"])},[I(H,{icon:["fas","eye-slash"]})],8,Mi))],512),[[Yt,p(i).preferences.getOtpOnRequest==!1&&!p(r).inManagementMode]])]),_:2},1024)):Y("",!0),I(Ge,{name:"fadeInOut"},{default:B(()=>[p(r).inManagementMode?(w(),k("div",xi,[I(p(Me),null,{default:B(({mode:N})=>[I(Te,{to:{name:"editAccount",params:{twofaccountId:h.id}},class:q(["tag is-rounded mr-1",N=="dark"?"is-dark":"is-white"])},{default:B(()=>[ze(M(g.$t("commons.edit")),1)]),_:2},1032,["to","class"]),I(Te,{to:{name:"showQRcode",params:{twofaccountId:h.id}},class:q(["tag is-rounded",N=="dark"?"is-dark":"is-white"]),title:g.$t("twofaccounts.show_qrcode")},{default:B(()=>[I(R,{icon:["fas","qrcode"]})]),_:2},1032,["to","class","title"])]),_:2},1024)])):Y("",!0)]),_:2},1024),I(Ge,{name:"fadeInOut"},{default:B(()=>[p(r).inManagementMode?(w(),k("div",Pi,[I(R,{icon:["fas","bars"]})])):Y("",!0)]),_:1})])],2))),128))],2)]),I(vt,{showButtons:!0,internalFooterType:p(r).inManagementMode&&!p(E)?"doneButton":"navLinks",onDoneButtonClicked:ce},{default:B(()=>[I(Co,{inManagementMode:p(r).inManagementMode,"onUpdate:inManagementMode":m[15]||(m[15]=h=>p(r).inManagementMode=h),areDisabled:p(a).hasNoneSelected,onMoveButtonClicked:m[16]||(m[16]=h=>E.value=!0),onDeleteButtonClicked:Ce,onExportButtonClicked:m[17]||(m[17]=h=>p(a).export())},null,8,["inManagementMode","areDisabled"])]),_:1},8,["internalFooterType"])],2)):Y("",!0)])}}};export{Li as default};