const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('contacts', '', 'js/style-BSeD2-8B.chunk.mjs'),window.OC.filePath('contacts', '', 'js/index-BgGcM4Fs.chunk.mjs'),window.OC.filePath('contacts', '', 'js/modulepreload-polyfill-DS8mCOmY.chunk.mjs'),window.OC.filePath('contacts', '', 'css/index-acqBj34t.chunk.css'),window.OC.filePath('contacts', '', 'css/style-DzPuc6kN.chunk.css')])))=>i.map(i=>d[i]); import{o as Ls,p as Og,q as ei,k as Ct,w as up,x as Lg,y as Dg,M as Rg,z as Yn,A as hp,B as cl,D as dl,P as Pg,E as za,S as sr,N as go,F as Vg,G as Le,H as Br,J as Bg,K as $g,L as ul,I as Ga,a as bo,O as Hg,Q as Ug,R as zg,T as ec,U as nc,V as Zr,W as Gg,X as pp,b as oc,Y as Fg,Z as Yg,_ as Ir,$ as Fa,r as bn,a0 as Xg,a1 as fp,a2 as Wg,a3 as jg,a4 as qg,a5 as Zg,a6 as ni,a7 as Jg,a8 as Kg,a9 as mp,C as gp,v as Qg,e as lu,m as rc,aa as yp,c as Xi,ab as t0,u as vp,f as e0,ac as Ds,ad as Rs,ae as hl,af as Wi,ag as n0,ah as ji,ai as o0,aj as r0,ak as qi,al as i0,d as a0,s as s0}from"./style-BSeD2-8B.chunk.mjs";import{_ as ot,r as w,f as I,o as f,U as l0,C as Ne,E as be,a5 as c0,a6 as Ya,a7 as Un,z as ic,D as Bt,S as _n,M as zo,Z as d0,a8 as Zi,c as k,n as Pt,q as ne,a9 as bp,T as _p,aa as u0,a as D,t as L,I as h0,ab as p0,k as R,i as S,s as J,u as gt,ac as yo,W as gr,X as ac,m as Cp,w as zn,h as E,v as f0,ad as sc,ae as pl,af as m0,ag as g0,a1 as lc,ah as y0,e as wp,L as kp,ai as v0,a3 as Qe,F as bt,aj as cc,V as yr,a4 as Bo,j as Wt,x as ce,ak as dc,$ as cu,B as ma,al as b0,b as ve,am as On,d as Go,O as _i,an as uc,a2 as Xa,ao as Jr,ap as Pn,aq as _e,ar as Oi,as as hc,at as _0,au as Sp,av as po,aw as C0,ax as xp,ay as w0,az as so,aA as Np,aB as du,aC as k0,aD as S0,aE as x0,aF as N0,aG as E0,aH as Wa,aI as M0,aJ as pc,aK as T0,aL as A0,l as Fo,P as Ep,aM as Mp,aN as fl,aO as I0,aP as O0}from"./modulepreload-polyfill-DS8mCOmY.chunk.mjs";import{r as ga,s as Tp,t as L0,v as D0,_ as tn,w as R0,A as P0,x as V0,y as B0,z as $0,c as Ap,B as H0,C as U0,D as z0,b as _o,E as G0,o as F0,F as Y0,G as Xn,p as Co,H as fc,I as mc,a as ue,m as ja,n as gc,g as Ip,q as Wn,N as je,J as yc,f as jn,K as uu,L as X0,d as qa,M as W0,O as Op,k as j0,j as q0,Q as vc,l as bc,R as Z0,S as J0,T as K0,U as Q0}from"./index-BgGcM4Fs.chunk.mjs";const Ag="contacts",Ig="8.4.0",ty={name:"ContactsRoot"};function ey(e,o,r,i,a,s){const l=w("RouterView");return f(),I(l)}const ny=ot(ty,[["render",ey]]),rr=typeof document<"u";function Lp(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function oy(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Lp(e.default)}const Ht=Object.assign;function Ps(e,o){const r={};for(const i in o){const a=o[i];r[i]=cn(a)?a.map(e):e(a)}return r}const Kr=()=>{},cn=Array.isArray;function hu(e,o){const r={};for(const i in e)r[i]=i in o?o[i]:e[i];return r}const Dp=/#/g,ry=/&/g,iy=/\//g,ay=/=/g,sy=/\?/g,Rp=/\+/g,ly=/%5B/g,cy=/%5D/g,Pp=/%5E/g,dy=/%60/g,Vp=/%7B/g,uy=/%7C/g,Bp=/%7D/g,hy=/%20/g;function _c(e){return e==null?"":encodeURI(""+e).replace(uy,"|").replace(ly,"[").replace(cy,"]")}function py(e){return _c(e).replace(Vp,"{").replace(Bp,"}").replace(Pp,"^")}function ml(e){return _c(e).replace(Rp,"%2B").replace(hy,"+").replace(Dp,"%23").replace(ry,"%26").replace(dy,"`").replace(Vp,"{").replace(Bp,"}").replace(Pp,"^")}function fy(e){return ml(e).replace(ay,"%3D")}function my(e){return _c(e).replace(Dp,"%23").replace(sy,"%3F")}function gy(e){return my(e).replace(iy,"%2F")}function oi(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const yy=/\/$/,vy=e=>e.replace(yy,"");function Vs(e,o,r="/"){let i,a={},s="",l="";const c=o.indexOf("#");let d=o.indexOf("?");return d=c>=0&&d>c?-1:d,d>=0&&(i=o.slice(0,d),s=o.slice(d,c>0?c:o.length),a=e(s.slice(1))),c>=0&&(i=i||o.slice(0,c),l=o.slice(c,o.length)),i=wy(i??o,r),{fullPath:i+s+l,path:i,query:a,hash:oi(l)}}function by(e,o){const r=o.query?e(o.query):"";return o.path+(r&&"?")+r+(o.hash||"")}function pu(e,o){return!o||!e.toLowerCase().startsWith(o.toLowerCase())?e:e.slice(o.length)||"/"}function _y(e,o,r){const i=o.matched.length-1,a=r.matched.length-1;return i>-1&&i===a&&vr(o.matched[i],r.matched[a])&&$p(o.params,r.params)&&e(o.query)===e(r.query)&&o.hash===r.hash}function vr(e,o){return(e.aliasOf||e)===(o.aliasOf||o)}function $p(e,o){if(Object.keys(e).length!==Object.keys(o).length)return!1;for(var r in e)if(!Cy(e[r],o[r]))return!1;return!0}function Cy(e,o){return cn(e)?fu(e,o):cn(o)?fu(o,e):e?.valueOf()===o?.valueOf()}function fu(e,o){return cn(o)?e.length===o.length&&e.every((r,i)=>r===o[i]):e.length===1&&e[0]===o}function wy(e,o){if(e.startsWith("/"))return e;if(!e)return o;const r=o.split("/"),i=e.split("/"),a=i[i.length-1];(a===".."||a===".")&&i.push("");let s=r.length-1,l,c;for(l=0;l1&&s--;else break;return r.slice(0,s).join("/")+"/"+i.slice(l).join("/")}const no={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let gl=(function(e){return e.pop="pop",e.push="push",e})({}),Bs=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function ky(e){if(!e)if(rr){const o=document.querySelector("base");e=o&&o.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),vy(e)}const Sy=/^[^#]+#/;function xy(e,o){return e.replace(Sy,"#")+o}function Ny(e,o){const r=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:o.behavior,left:i.left-r.left-(o.left||0),top:i.top-r.top-(o.top||0)}}const Za=()=>({left:window.scrollX,top:window.scrollY});function Ey(e){let o;if("el"in e){const r=e.el,i=typeof r=="string"&&r.startsWith("#"),a=typeof r=="string"?i?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!a)return;o=Ny(a,e)}else o=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(o):window.scrollTo(o.left!=null?o.left:window.scrollX,o.top!=null?o.top:window.scrollY)}function mu(e,o){return(history.state?history.state.position-o:-1)+e}const yl=new Map;function My(e,o){yl.set(e,o)}function Ty(e){const o=yl.get(e);return yl.delete(e),o}function Ay(e){return typeof e=="string"||e&&typeof e=="object"}function Hp(e){return typeof e=="string"||typeof e=="symbol"}let oe=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Up=Symbol("");oe.MATCHER_NOT_FOUND+"",oe.NAVIGATION_GUARD_REDIRECT+"",oe.NAVIGATION_ABORTED+"",oe.NAVIGATION_CANCELLED+"",oe.NAVIGATION_DUPLICATED+"";function br(e,o){return Ht(new Error,{type:e,[Up]:!0},o)}function Nn(e,o){return e instanceof Error&&Up in e&&(o==null||!!(e.type&o))}function Iy(e){const o={};if(e===""||e==="?")return o;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;ia&&ml(a)):[i&&ml(i)]).forEach(a=>{a!==void 0&&(o+=(o.length?"&":"")+r,a!=null&&(o+="="+a))})}return o}function Oy(e){const o={};for(const r in e){const i=e[r];i!==void 0&&(o[r]=cn(i)?i.map(a=>a==null?null:""+a):i==null?i:""+i)}return o}const Ly=Symbol(""),yu=Symbol(""),Cc=Symbol(""),zp=Symbol(""),vl=Symbol("");function $r(){let e=[];function o(i){return e.push(i),()=>{const a=e.indexOf(i);a>-1&&e.splice(a,1)}}function r(){e=[]}return{add:o,list:()=>e.slice(),reset:r}}function ro(e,o,r,i,a,s=l=>l()){const l=i&&(i.enterCallbacks[a]=i.enterCallbacks[a]||[]);return()=>new Promise((c,d)=>{const u=m=>{m===!1?d(br(oe.NAVIGATION_ABORTED,{from:r,to:o})):m instanceof Error?d(m):Ay(m)?d(br(oe.NAVIGATION_GUARD_REDIRECT,{from:o,to:m})):(l&&i.enterCallbacks[a]===l&&typeof m=="function"&&l.push(m),c())},h=s(()=>e.call(i&&i.instances[a],o,r,u));let p=Promise.resolve(h);e.length<3&&(p=p.then(u)),p.catch(m=>d(m))})}function $s(e,o,r,i,a=s=>s()){const s=[];for(const l of e)for(const c in l.components){let d=l.components[c];if(!(o!=="beforeRouteEnter"&&!l.instances[c]))if(Lp(d)){const u=(d.__vccOpts||d)[o];u&&s.push(ro(u,r,i,l,c,a))}else{let u=d();s.push(()=>u.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${c}" at "${l.path}"`);const p=oy(h)?h.default:h;l.mods[c]=h,l.components[c]=p;const m=(p.__vccOpts||p)[o];return m&&ro(m,r,i,l,c,a)()}))}}return s}function Dy(e,o){const r=[],i=[],a=[],s=Math.max(o.matched.length,e.matched.length);for(let l=0;lvr(u,c))?i.push(c):r.push(c));const d=e.matched[l];d&&(o.matched.find(u=>vr(u,d))||a.push(d))}return[r,i,a]}let Ry=()=>location.protocol+"//"+location.host;function Gp(e,o){const{pathname:r,search:i,hash:a}=o,s=e.indexOf("#");if(s>-1){let l=a.includes(e.slice(s))?e.slice(s).length:1,c=a.slice(l);return c[0]!=="/"&&(c="/"+c),pu(c,"")}return pu(r,e)+i+a}function Py(e,o,r,i){let a=[],s=[],l=null;const c=({state:m})=>{const y=Gp(e,location),_=r.value,C=o.value;let A=0;if(m){if(r.value=y,o.value=m,l&&l===_){l=null;return}A=C?m.position-C.position:0}else i(y);a.forEach(T=>{T(r.value,_,{delta:A,type:gl.pop,direction:A?A>0?Bs.forward:Bs.back:Bs.unknown})})};function d(){l=r.value}function u(m){a.push(m);const y=()=>{const _=a.indexOf(m);_>-1&&a.splice(_,1)};return s.push(y),y}function h(){if(document.visibilityState==="hidden"){const{history:m}=window;if(!m.state)return;m.replaceState(Ht({},m.state,{scroll:Za()}),"")}}function p(){for(const m of s)m();s=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:d,listen:u,destroy:p}}function vu(e,o,r,i=!1,a=!1){return{back:e,current:o,forward:r,replaced:i,position:window.history.length,scroll:a?Za():null}}function Vy(e){const{history:o,location:r}=window,i={value:Gp(e,r)},a={value:o.state};a.value||s(i.value,{back:null,current:i.value,forward:null,position:o.length-1,replaced:!0,scroll:null},!0);function s(d,u,h){const p=e.indexOf("#"),m=p>-1?(r.host&&document.querySelector("base")?e:e.slice(p))+d:Ry()+e+d;try{o[h?"replaceState":"pushState"](u,"",m),a.value=u}catch(y){console.error(y),r[h?"replace":"assign"](m)}}function l(d,u){s(d,Ht({},o.state,vu(a.value.back,d,a.value.forward,!0),u,{position:a.value.position}),!0),i.value=d}function c(d,u){const h=Ht({},a.value,o.state,{forward:d,scroll:Za()});s(h.current,h,!0),s(d,Ht({},vu(i.value,d,null),{position:h.position+1},u),!1),i.value=d}return{location:i,state:a,push:c,replace:l}}function By(e){e=ky(e);const o=Vy(e),r=Py(e,o.state,o.location,o.replace);function i(s,l=!0){l||r.pauseListeners(),history.go(s)}const a=Ht({location:"",base:e,go:i,createHref:xy.bind(null,e)},o,r);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>o.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>o.state.value}),a}let Lo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var ge=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(ge||{});const $y={type:Lo.Static,value:""},Hy=/[a-zA-Z0-9_]/;function Uy(e){if(!e)return[[]];if(e==="/")return[[$y]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function o(y){throw new Error(`ERR (${r})/"${u}": ${y}`)}let r=ge.Static,i=r;const a=[];let s;function l(){s&&a.push(s),s=[]}let c=0,d,u="",h="";function p(){u&&(r===ge.Static?s.push({type:Lo.Static,value:u}):r===ge.Param||r===ge.ParamRegExp||r===ge.ParamRegExpEnd?(s.length>1&&(d==="*"||d==="+")&&o(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:Lo.Param,value:u,regexp:h,repeatable:d==="*"||d==="+",optional:d==="*"||d==="?"})):o("Invalid state to consume buffer"),u="")}function m(){u+=d}for(;co.length?o.length===1&&o[0]===De.Static+De.Segment?1:-1:0}function Fp(e,o){let r=0;const i=e.score,a=o.score;for(;r0&&o[o.length-1]<0}const Xy={strict:!1,end:!0,sensitive:!1};function Wy(e,o,r){const i=Fy(Uy(e.path),r),a=Ht(i,{record:e,parent:o,children:[],alias:[]});return o&&!a.record.aliasOf==!o.record.aliasOf&&o.children.push(a),a}function jy(e,o){const r=[],i=new Map;o=hu(Xy,o);function a(p){return i.get(p)}function s(p,m,y){const _=!y,C=wu(p);C.aliasOf=y&&y.record;const A=hu(o,p),T=[C];if("alias"in p){const Z=typeof p.alias=="string"?[p.alias]:p.alias;for(const W of Z)T.push(wu(Ht({},C,{components:y?y.record.components:C.components,path:W,aliasOf:y?y.record:C})))}let V,B;for(const Z of T){const{path:W}=Z;if(m&&W[0]!=="/"){const rt=m.record.path,ct=rt[rt.length-1]==="/"?"":"/";Z.path=m.record.path+(W&&ct+W)}if(V=Wy(Z,m,A),y?y.alias.push(V):(B=B||V,B!==V&&B.alias.push(V),_&&p.name&&!ku(V)&&l(p.name)),Yp(V)&&d(V),C.children){const rt=C.children;for(let ct=0;ct{l(B)}:Kr}function l(p){if(Hp(p)){const m=i.get(p);m&&(i.delete(p),r.splice(r.indexOf(m),1),m.children.forEach(l),m.alias.forEach(l))}else{const m=r.indexOf(p);m>-1&&(r.splice(m,1),p.record.name&&i.delete(p.record.name),p.children.forEach(l),p.alias.forEach(l))}}function c(){return r}function d(p){const m=Jy(p,r);r.splice(m,0,p),p.record.name&&!ku(p)&&i.set(p.record.name,p)}function u(p,m){let y,_={},C,A;if("name"in p&&p.name){if(y=i.get(p.name),!y)throw br(oe.MATCHER_NOT_FOUND,{location:p});A=y.record.name,_=Ht(Cu(m.params,y.keys.filter(B=>!B.optional).concat(y.parent?y.parent.keys.filter(B=>B.optional):[]).map(B=>B.name)),p.params&&Cu(p.params,y.keys.map(B=>B.name))),C=y.stringify(_)}else if(p.path!=null)C=p.path,y=r.find(B=>B.re.test(C)),y&&(_=y.parse(C),A=y.record.name);else{if(y=m.name?i.get(m.name):r.find(B=>B.re.test(m.path)),!y)throw br(oe.MATCHER_NOT_FOUND,{location:p,currentLocation:m});A=y.record.name,_=Ht({},m.params,p.params),C=y.stringify(_)}const T=[];let V=y;for(;V;)T.unshift(V.record),V=V.parent;return{name:A,path:C,params:_,matched:T,meta:Zy(T)}}e.forEach(p=>s(p));function h(){r.length=0,i.clear()}return{addRoute:s,resolve:u,removeRoute:l,clearRoutes:h,getRoutes:c,getRecordMatcher:a}}function Cu(e,o){const r={};for(const i of o)i in e&&(r[i]=e[i]);return r}function wu(e){const o={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:qy(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(o,"mods",{value:{}}),o}function qy(e){const o={},r=e.props||!1;if("component"in e)o.default=r;else for(const i in e.components)o[i]=typeof r=="object"?r[i]:r;return o}function ku(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Zy(e){return e.reduce((o,r)=>Ht(o,r.meta),{})}function Jy(e,o){let r=0,i=o.length;for(;r!==i;){const s=r+i>>1;Fp(e,o[s])<0?i=s:r=s+1}const a=Ky(e);return a&&(i=o.lastIndexOf(a,i-1)),i}function Ky(e){let o=e;for(;o=o.parent;)if(Yp(o)&&Fp(e,o)===0)return o}function Yp({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Su(e){const o=Un(Cc),r=Un(zp),i=Bt(()=>{const d=be(e.to);return o.resolve(d)}),a=Bt(()=>{const{matched:d}=i.value,{length:u}=d,h=d[u-1],p=r.matched;if(!h||!p.length)return-1;const m=p.findIndex(vr.bind(null,h));if(m>-1)return m;const y=xu(d[u-2]);return u>1&&xu(h)===y&&p[p.length-1].path!==y?p.findIndex(vr.bind(null,d[u-2])):m}),s=Bt(()=>a.value>-1&&ov(r.params,i.value.params)),l=Bt(()=>a.value>-1&&a.value===r.matched.length-1&&$p(r.params,i.value.params));function c(d={}){if(nv(d)){const u=o[be(e.replace)?"replace":"push"](be(e.to)).catch(Kr);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:i,href:Bt(()=>i.value.href),isActive:s,isExactActive:l,navigate:c}}function Qy(e){return e.length===1?e[0]:e}const tv=Ne({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Su,setup(e,{slots:o}){const r=Ya(Su(e)),{options:i}=Un(Cc),a=Bt(()=>({[Nu(e.activeClass,i.linkActiveClass,"router-link-active")]:r.isActive,[Nu(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const s=o.default&&Qy(o.default(r));return e.custom?s:ic("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},s)}}}),ev=tv;function nv(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const o=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(o))return}return e.preventDefault&&e.preventDefault(),!0}}function ov(e,o){for(const r in o){const i=o[r],a=e[r];if(typeof i=="string"){if(i!==a)return!1}else if(!cn(a)||a.length!==i.length||i.some((s,l)=>s.valueOf()!==a[l].valueOf()))return!1}return!0}function xu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Nu=(e,o,r)=>e??o??r,rv=Ne({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:o,slots:r}){const i=Un(vl),a=Bt(()=>e.route||i.value),s=Un(yu,0),l=Bt(()=>{let u=be(s);const{matched:h}=a.value;let p;for(;(p=h[u])&&!p.components;)u++;return u}),c=Bt(()=>a.value.matched[l.value]);Zi(yu,Bt(()=>l.value+1)),Zi(Ly,c),Zi(vl,a);const d=zo();return _n(()=>[d.value,c.value,e.name],([u,h,p],[m,y,_])=>{h&&(h.instances[p]=u,y&&y!==h&&u&&u===m&&(h.leaveGuards.size||(h.leaveGuards=y.leaveGuards),h.updateGuards.size||(h.updateGuards=y.updateGuards))),u&&h&&(!y||!vr(h,y)||!m)&&(h.enterCallbacks[p]||[]).forEach(C=>C(u))},{flush:"post"}),()=>{const u=a.value,h=e.name,p=c.value,m=p&&p.components[h];if(!m)return Eu(r.default,{Component:m,route:u});const y=p.props[h],_=y?y===!0?u.params:typeof y=="function"?y(u):y:null,C=ic(m,Ht({},_,o,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(p.instances[h]=null)},ref:d}));return Eu(r.default,{Component:C,route:u})||C}}});function Eu(e,o){if(!e)return null;const r=e(o);return r.length===1?r[0]:r}const iv=rv;function av(e){const o=jy(e.routes,e),r=e.parseQuery||Iy,i=e.stringifyQuery||gu,a=e.history,s=$r(),l=$r(),c=$r(),d=l0(no);let u=no;rr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=Ps.bind(null,F=>""+F),p=Ps.bind(null,gy),m=Ps.bind(null,oi);function y(F,dt){let lt,vt;return Hp(F)?(lt=o.getRecordMatcher(F),vt=dt):vt=F,o.addRoute(vt,lt)}function _(F){const dt=o.getRecordMatcher(F);dt&&o.removeRoute(dt)}function C(){return o.getRoutes().map(F=>F.record)}function A(F){return!!o.getRecordMatcher(F)}function T(F,dt){if(dt=Ht({},dt||d.value),typeof F=="string"){const wt=Vs(r,F,dt.path),ie=o.resolve({path:wt.path},dt),ko=a.createHref(wt.fullPath);return Ht(wt,ie,{params:m(ie.params),hash:oi(wt.hash),redirectedFrom:void 0,href:ko})}let lt;if(F.path!=null)lt=Ht({},F,{path:Vs(r,F.path,dt.path).path});else{const wt=Ht({},F.params);for(const ie in wt)wt[ie]==null&&delete wt[ie];lt=Ht({},F,{params:p(wt)}),dt.params=p(dt.params)}const vt=o.resolve(lt,dt),xt=F.hash||"";vt.params=h(m(vt.params));const Jt=by(i,Ht({},F,{hash:py(xt),path:vt.path})),St=a.createHref(Jt);return Ht({fullPath:Jt,hash:xt,query:i===gu?Oy(F.query):F.query||{}},vt,{redirectedFrom:void 0,href:St})}function V(F){return typeof F=="string"?Vs(r,F,d.value.path):Ht({},F)}function B(F,dt){if(u!==F)return br(oe.NAVIGATION_CANCELLED,{from:dt,to:F})}function Z(F){return ct(F)}function W(F){return Z(Ht(V(F),{replace:!0}))}function rt(F,dt){const lt=F.matched[F.matched.length-1];if(lt&<.redirect){const{redirect:vt}=lt;let xt=typeof vt=="function"?vt(F,dt):vt;return typeof xt=="string"&&(xt=xt.includes("?")||xt.includes("#")?xt=V(xt):{path:xt},xt.params={}),Ht({query:F.query,hash:F.hash,params:xt.path!=null?{}:F.params},xt)}}function ct(F,dt){const lt=u=T(F),vt=d.value,xt=F.state,Jt=F.force,St=F.replace===!0,wt=rt(lt,vt);if(wt)return ct(Ht(V(wt),{state:typeof wt=="object"?Ht({},xt,wt.state):xt,force:Jt,replace:St}),dt||lt);const ie=lt;ie.redirectedFrom=dt;let ko;return!Jt&&_y(i,vt,lt)&&(ko=br(oe.NAVIGATION_DUPLICATED,{to:ie,from:vt}),nt(vt,vt,!0,!1)),(ko?Promise.resolve(ko):ut(ie,vt)).catch(Ee=>Nn(Ee)?Nn(Ee,oe.NAVIGATION_GUARD_REDIRECT)?Ee:st(Ee):pt(Ee,ie,vt)).then(Ee=>{if(Ee){if(Nn(Ee,oe.NAVIGATION_GUARD_REDIRECT))return ct(Ht({replace:St},V(Ee.to),{state:typeof Ee.to=="object"?Ht({},xt,Ee.to.state):xt,force:Jt}),dt||ie)}else Ee=G(ie,vt,!0,St,xt);return O(ie,vt,Ee),Ee})}function it(F,dt){const lt=B(F,dt);return lt?Promise.reject(lt):Promise.resolve()}function et(F){const dt=Ot.values().next().value;return dt&&typeof dt.runWithContext=="function"?dt.runWithContext(F):F()}function ut(F,dt){let lt;const[vt,xt,Jt]=Dy(F,dt);lt=$s(vt.reverse(),"beforeRouteLeave",F,dt);for(const wt of vt)wt.leaveGuards.forEach(ie=>{lt.push(ro(ie,F,dt))});const St=it.bind(null,F,dt);return lt.push(St),ee(lt).then(()=>{lt=[];for(const wt of s.list())lt.push(ro(wt,F,dt));return lt.push(St),ee(lt)}).then(()=>{lt=$s(xt,"beforeRouteUpdate",F,dt);for(const wt of xt)wt.updateGuards.forEach(ie=>{lt.push(ro(ie,F,dt))});return lt.push(St),ee(lt)}).then(()=>{lt=[];for(const wt of Jt)if(wt.beforeEnter)if(cn(wt.beforeEnter))for(const ie of wt.beforeEnter)lt.push(ro(ie,F,dt));else lt.push(ro(wt.beforeEnter,F,dt));return lt.push(St),ee(lt)}).then(()=>(F.matched.forEach(wt=>wt.enterCallbacks={}),lt=$s(Jt,"beforeRouteEnter",F,dt,et),lt.push(St),ee(lt))).then(()=>{lt=[];for(const wt of l.list())lt.push(ro(wt,F,dt));return lt.push(St),ee(lt)}).catch(wt=>Nn(wt,oe.NAVIGATION_CANCELLED)?wt:Promise.reject(wt))}function O(F,dt,lt){c.list().forEach(vt=>et(()=>vt(F,dt,lt)))}function G(F,dt,lt,vt,xt){const Jt=B(F,dt);if(Jt)return Jt;const St=dt===no,wt=rr?history.state:{};lt&&(vt||St?a.replace(F.fullPath,Ht({scroll:St&&wt&&wt.scroll},xt)):a.push(F.fullPath,xt)),d.value=F,nt(F,dt,lt,St),st()}let H;function M(){H||(H=a.listen((F,dt,lt)=>{if(!Yt.listening)return;const vt=T(F),xt=rt(vt,Yt.currentRoute.value);if(xt){ct(Ht(xt,{replace:!0,force:!0}),vt).catch(Kr);return}u=vt;const Jt=d.value;rr&&My(mu(Jt.fullPath,lt.delta),Za()),ut(vt,Jt).catch(St=>Nn(St,oe.NAVIGATION_ABORTED|oe.NAVIGATION_CANCELLED)?St:Nn(St,oe.NAVIGATION_GUARD_REDIRECT)?(ct(Ht(V(St.to),{force:!0}),vt).then(wt=>{Nn(wt,oe.NAVIGATION_ABORTED|oe.NAVIGATION_DUPLICATED)&&!lt.delta&<.type===gl.pop&&a.go(-1,!1)}).catch(Kr),Promise.reject()):(lt.delta&&a.go(-lt.delta,!1),pt(St,vt,Jt))).then(St=>{St=St||G(vt,Jt,!1),St&&(lt.delta&&!Nn(St,oe.NAVIGATION_CANCELLED)?a.go(-lt.delta,!1):lt.type===gl.pop&&Nn(St,oe.NAVIGATION_ABORTED|oe.NAVIGATION_DUPLICATED)&&a.go(-1,!1)),O(vt,Jt,St)}).catch(Kr)}))}let U=$r(),z=$r(),Q;function pt(F,dt,lt){st(F);const vt=z.list();return vt.length?vt.forEach(xt=>xt(F,dt,lt)):console.error(F),Promise.reject(F)}function ft(){return Q&&d.value!==no?Promise.resolve():new Promise((F,dt)=>{U.add([F,dt])})}function st(F){return Q||(Q=!F,M(),U.list().forEach(([dt,lt])=>F?lt(F):dt()),U.reset()),F}function nt(F,dt,lt,vt){const{scrollBehavior:xt}=e;if(!rr||!xt)return Promise.resolve();const Jt=!lt&&Ty(mu(F.fullPath,0))||(vt||!lt)&&history.state&&history.state.scroll||null;return d0().then(()=>xt(F,dt,Jt)).then(St=>St&&Ey(St)).catch(St=>pt(St,F,dt))}const At=F=>a.go(F);let Ft;const Ot=new Set,Yt={currentRoute:d,listening:!0,addRoute:y,removeRoute:_,clearRoutes:o.clearRoutes,hasRoute:A,getRoutes:C,resolve:T,options:e,push:Z,replace:W,go:At,back:()=>At(-1),forward:()=>At(1),beforeEach:s.add,beforeResolve:l.add,afterEach:c.add,onError:z.add,isReady:ft,install(F){F.component("RouterLink",ev),F.component("RouterView",iv),F.config.globalProperties.$router=Yt,Object.defineProperty(F.config.globalProperties,"$route",{enumerable:!0,get:()=>be(d)}),rr&&!Ft&&d.value===no&&(Ft=!0,Z(a.location).catch(vt=>{}));const dt={};for(const vt in no)Object.defineProperty(dt,vt,{get:()=>d.value[vt],enumerable:!0});F.provide(Cc,Yt),F.provide(zp,c0(dt)),F.provide(vl,d);const lt=F.unmount;Ot.add(F),F.unmount=function(){Ot.delete(F),Ot.size<1&&(u=no,H&&H(),H=null,d.value=no,Ft=!1,Q=!1),lt()}}};function ee(F){return F.reduce((dt,lt)=>dt.then(()=>et(lt)),Promise.resolve())}return Yt}function Mu(e,o){return(e.aliasOf||e)===(o.aliasOf||o)}function sv(e,o){if(Object.keys(e).length!==Object.keys(o).length)return!1;for(var r in e)if(!lv(e[r],o[r]))return!1;return!0}function lv(e,o){return ga(e)?Tu(e,o):ga(o)?Tu(o,e):(e&&e.valueOf())===(o&&o.valueOf())}function Tu(e,o){return ga(o)?e.length===o.length&&e.every((r,i)=>r===o[i]):e.length===1&&e[0]===o}function Au(e){const o=Un(Tp),r=Un(L0),i=Bt(()=>{const d=be(e.to);return o.resolve(d)}),a=Bt(()=>{const{matched:d}=i.value,{length:u}=d,h=d[u-1],p=r.matched;if(!h||!p.length)return-1;const m=p.findIndex(Mu.bind(null,h));if(m>-1)return m;const y=Iu(d[u-2]);return u>1&&Iu(h)===y&&p[p.length-1].path!==y?p.findIndex(Mu.bind(null,d[u-2])):m}),s=Bt(()=>a.value>-1&&pv(r.params,i.value.params)),l=Bt(()=>a.value>-1&&a.value===r.matched.length-1&&sv(r.params,i.value.params));function c(d={}){if(hv(d)){const u=o[be(e.replace)?"replace":"push"](be(e.to)).catch(D0);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:i,href:Bt(()=>i.value.href),isActive:s,isExactActive:l,navigate:c}}function cv(e){return e.length===1?e[0]:e}const dv=Ne({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Au,setup(e,{slots:o}){const r=Ya(Au(e)),{options:i}=Un(Tp),a=Bt(()=>({[Ou(e.activeClass,i.linkActiveClass,"router-link-active")]:r.isActive,[Ou(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const s=o.default&&cv(o.default(r));return e.custom?s:ic("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},s)}}}),uv=dv;function hv(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const o=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(o))return}return e.preventDefault&&e.preventDefault(),!0}}function pv(e,o){for(const r in o){const i=o[r],a=e[r];if(typeof i=="string"){if(i!==a)return!1}else if(!ga(a)||a.length!==i.length||i.some((s,l)=>s.valueOf()!==a[l].valueOf()))return!1}return!0}function Iu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ou=(e,o,r)=>e??o??r,fv={name:"NcActionSeparator"},mv={class:"action action-separator action--disabled",role:"separator"};function gv(e,o,r,i,a,s){return f(),k("li",mv)}const yv=tn(fv,[["render",gv],["__scopeId","data-v-3e2324b7"]]),vv={class:"app-content-details"},bv=Ne({__name:"NcAppContentDetails",setup(e){return(o,r)=>(f(),k("div",vv,[Pt(o.$slots,"default")]))}}),_v={name:"NcAppContentList",props:{selection:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1}}};function Cv(e,o,r,i,a,s){return f(),k("div",{class:ne(["app-content-list",{selection:r.selection,showdetails:r.showDetails}])},[Pt(e.$slots,"default")],2)}const wv=tn(_v,[["render",Cv]]),kv=["id","aria-labelledby"],Sv=["id"],xv={class:"app-settings-section__description"},Nv={class:"app-settings-section__content"},Ev=Ne({__name:"NcAppSettingsSection",props:{name:{},description:{},id:{},order:{}},setup(e){const o=e,r=bp(),{registerSection:i,unregisterSection:a}=R0(),s=Un(P0),l=Bt(()=>"settings-section_"+o.id);return _n(()=>o.id,()=>{/^[a-z0-9\-_]+$/.test(o.id)||V0.warn(`Invalid id prop: ${o.id}. Only alphanumeric, dash and underscore are allowed.`)},{immediate:!0}),_n([()=>o.id,()=>o.name,()=>o.order],([c,d,u],[h,,])=>{a(h),i(c,d,u,r?.icon?.())}),_p(()=>{i(o.id,o.name,o.order,r?.icon?.())}),u0(()=>{a(o.id)}),(c,d)=>(f(),k("section",{id:l.value,"aria-labelledby":`${l.value}--label`,class:ne(["app-settings-section",{"app-settings-section__legacy":be(s)}])},[D("h3",{id:`${l.value}--label`,class:"app-settings-section__name"},L(c.name),9,Sv),D("div",xv,L(c.description),1),D("div",Nv,[Pt(c.$slots,"default",{},void 0,!0)])],10,kv))}}),Mv=tn(Ev,[["__scopeId","data-v-4095bb7f"]]),Tv=["title"],Av=Ne({__name:"NcCounterBubble",props:{count:{},active:{type:Boolean},type:{default:""},raw:{type:Boolean}},setup(e){const o=e,r=Bt(()=>o.raw?o.count.toString():new Intl.NumberFormat(h0(),{notation:"compact",compactDisplay:"short"}).format(o.count)),i=Bt(()=>{if(o.raw)return;const a=o.count.toString();if(a!==r.value)return a});return(a,s)=>(f(),k("div",{class:ne(["counter-bubble__counter",{active:a.active,"counter-bubble__counter--highlighted":a.type==="highlighted","counter-bubble__counter--outlined":a.type==="outlined"}]),title:i.value},L(r.value),11,Tv))}}),Ja=tn(Av,[["__scopeId","data-v-36ffc13f"]]),Iv=Ne({__name:"NcFormBox",props:{row:{type:Boolean}},setup(e){const o=p0();return Zi(B0,{isInFormBox:!0,formBoxItemClass:o.ncFormBox__item}),(r,i)=>(f(),k("div",{class:ne([r.$style.ncFormBox,r.row?r.$style.ncFormBox_row:r.$style.ncFormBox_col])},[Pt(r.$slots,"default",{itemClass:r.$style.ncFormBox__item})],2))}}),Ov="_ncFormBox_TawZT",Lv="_ncFormBox_row_ZnhfS",Dv="_ncFormBox__item_7zc34",Rv="_ncFormBox_col_wHCZx",Pv={"material-design-icon":"_material-design-icon_mubdv",ncFormBox:Ov,ncFormBox_row:Lv,ncFormBox__item:Dv,ncFormBox_col:Rv},Vv={$style:Pv},Xp=tn(Iv,[["__cssModules",Vv]]),Bv=["id"],$v=Ne({inheritAttrs:!1,__name:"NcFormBoxItem",props:{tag:{},label:{default:()=>{}},description:{default:()=>{}},invertedAccent:{type:Boolean,default:!1},class:{default:()=>{}},itemClasses:{default:()=>{}}},emits:["click"],setup(e){const o=bp(),{formBoxItemClass:r}=$0(),i=Ap(),a=()=>!!e.description||!!o.description;return(s,l)=>(f(),k("div",{class:ne([e.class,s.$style.formBoxItem,be(r),{[s.$style.formBoxItem_inverted]:s.invertedAccent&&a(),[s.$style.formBoxItem_legacy]:be(H0)}])},[D("span",{class:ne(s.$style.formBoxItem__content)},[(f(),I(yo(s.tag),gt({class:[s.$style.formBoxItem__element,s.itemClasses]},s.$attrs,{onClick:l[0]||(l[0]=c=>s.$emit("click",c))}),{default:S(()=>[Pt(s.$slots,"default",{descriptionId:be(i)},()=>[J(L(s.label||"⚠️ Label is missing"),1)])]),_:3},16,["class"])),a()?(f(),k("span",{key:0,id:be(i),class:ne(s.$style.formBoxItem__description)},[Pt(s.$slots,"description",{},()=>[J(L(s.description),1)])],10,Bv)):R("",!0)],2),D("span",{class:ne(s.$style.formBoxItem__icon)},[Pt(s.$slots,"icon",{descriptionId:be(i)},()=>[l[1]||(l[1]=J(" ⚠️ Icon is missing ",-1))])],2)],2))}}),Hv="_formBoxItem_74l6r",Uv="_formBoxItem_legacy_IgNr3",zv="_formBoxItem_inverted_9GGkh",Gv="_formBoxItem__element_YEZDA",Fv="_formBoxItem__description_1GjPD",Yv="_formBoxItem__content_CcZbG",Xv="_formBoxItem__icon_eZXNE",Wv={"material-design-icon":"_material-design-icon_D2F-K",formBoxItem:Hv,formBoxItem_legacy:Uv,formBoxItem_inverted:zv,formBoxItem__element:Gv,formBoxItem__description:Fv,formBoxItem__content:Yv,formBoxItem__icon:Xv},jv={$style:Wv},qv=tn($v,[["__cssModules",jv]]),Zv=["id","aria-describedby","disabled"],Jv=Ne({__name:"NcFormBoxSwitch",props:gr({label:{default:()=>{}},description:{default:()=>{}},disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:gr(["enable","disable"],["update:modelValue"]),setup(e,{emit:o}){const r=ac(e,"modelValue"),i=o,a=Ap();return _n(r,()=>{r.value?i("enable"):i("disable")},{flush:"sync"}),(s,l)=>(f(),I(qv,{tag:"label",for:be(a)},Cp({icon:S(({descriptionId:c})=>[zn(D("input",{id:be(a),"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),class:ne(s.$style.formBoxSwitch__input),type:"checkbox",role:"switch","aria-describedby":c,disabled:s.disabled},null,10,Zv),[[f0,r.value]]),E(U0,{checked:r.value,inline:""},null,8,["checked"])]),_:2},[s.$slots.default||s.label?{name:"default",fn:S(()=>[Pt(s.$slots,"default",{},()=>[J(L(s.label),1)])]),key:"0"}:void 0,s.$slots.description||s.description?{name:"description",fn:S(()=>[Pt(s.$slots,"description",{},()=>[J(L(s.description),1)])]),key:"1"}:void 0]),1032,["for"]))}}),Kv="_formBoxSwitch__input_e7y7s",Qv={"material-design-icon":"_material-design-icon_YAxyJ",formBoxSwitch__input:Kv},t2={$style:Qv},e2=tn(Jv,[["__cssModules",t2]]),n2={name:"NcListItem",components:{NcActions:_o,NcCounterBubble:Ja,NcVNodes:z0},inheritAttrs:!1,props:{details:{type:String,default:""},name:{type:String,default:void 0},to:{type:[String,Object],default:null},href:{type:String,default:"#"},target:{type:String,default:""},anchorId:{type:String,default:""},bold:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},active:{type:Boolean,default:void 0},linkAriaLabel:{type:String,default:""},actionsAriaLabel:{type:String,default:void 0},counterNumber:{type:[Number,String],default:0},counterType:{type:String,default:"",validator(e){return["highlighted","outlined",""].indexOf(e)!==-1}},forceDisplayActions:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},oneLine:{type:Boolean,default:!1}},emits:["click","dragstart","update:menuOpen"],data(){return{hovered:!1,hasActions:!1,hasSubname:!1,displayActionsOnHoverFocus:!1,menuOpen:!1,hasIndicator:!1,hasDetails:!1}},computed:{showAdditionalElements(){return!this.displayActionsOnHoverFocus||this.forceDisplayActions},showDetails(){return(this.details!==""||this.hasDetails)&&(!this.displayActionsOnHoverFocus||this.forceDisplayActions)}},watch:{menuOpen(e){!e&&!this.hovered&&(this.displayActionsOnHoverFocus=!1)}},mounted(){this.checkSlots()},updated(){this.checkSlots()},methods:{onClick(e,o,r){this.$emit("click",e),!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&r&&(o?.(e),e.preventDefault())},showActions(){this.hasActions&&(this.displayActionsOnHoverFocus=!0),this.hovered=!1},hideActions(){this.displayActionsOnHoverFocus=!1},handleBlur(e){this.menuOpen||this.$refs["list-item"]?.contains(e.relatedTarget)||this.hideActions()},handleMouseleave(){this.menuOpen||(this.displayActionsOnHoverFocus=!1),this.hovered=!1},handleMouseover(){this.showActions(),this.hovered=!0},handleActionsUpdateOpen(e){this.menuOpen=e,this.$emit("update:menuOpen",e)},checkSlots(){this.hasActions!==!!this.$slots.actions&&(this.hasActions=!!this.$slots.actions),this.hasSubname!==!!this.$slots.subname&&(this.hasSubname=!!this.$slots.subname),this.hasIndicator!==!!this.$slots.indicator&&(this.hasIndicator=!!this.$slots.indicator),this.hasDetails!==!!this.$slots.details&&(this.hasDetails=!!this.$slots.details)}}},o2=["id","aria-label","href","target","rel","onClick"],r2={class:"list-item-content"},i2={class:"list-item-content__main"},a2={class:"list-item-content__name"},s2={class:"list-item-content__details"},l2={key:0,class:"list-item-details__details"},c2={key:1,class:"list-item-details__extra"},d2={key:1,class:"list-item-details__indicator"},u2={key:0,class:"list-item-content__extra-actions"},h2={key:2,class:"list-item__extra"};function p2(e,o,r,i,a,s){const l=w("NcCounterBubble"),c=w("NcActions");return f(),I(yo(r.to?"router-link":"NcVNodes"),m0(g0({...r.to&&{custom:!0,to:r.to}})),{default:S(({href:d,navigate:u,isActive:h})=>[D("li",gt({class:["list-item__wrapper",{"list-item__wrapper--active":r.active??h}]},e.$attrs),[D("div",{ref:"list-item",class:ne(["list-item",{"list-item--compact":r.compact,"list-item--one-line":r.oneLine}]),onMouseover:o[5]||(o[5]=(...p)=>s.handleMouseover&&s.handleMouseover(...p)),onMouseleave:o[6]||(o[6]=(...p)=>s.handleMouseleave&&s.handleMouseleave(...p))},[D("a",{id:r.anchorId||void 0,"aria-label":r.linkAriaLabel,class:"list-item__anchor",href:d||r.href,target:r.target||(r.href==="#"?void 0:"_blank"),rel:r.href==="#"?void 0:"noopener noreferrer",onFocus:o[0]||(o[0]=(...p)=>s.showActions&&s.showActions(...p)),onFocusout:o[1]||(o[1]=(...p)=>s.handleBlur&&s.handleBlur(...p)),onClick:p=>s.onClick(p,u,d),onDragstart:o[2]||(o[2]=p=>e.$emit("dragstart",p)),onKeydown:o[3]||(o[3]=sc((...p)=>s.hideActions&&s.hideActions(...p),["esc"]))},[Pt(e.$slots,"icon",{},void 0,!0),D("div",r2,[D("div",i2,[D("div",a2,[Pt(e.$slots,"name",{},()=>[J(L(r.name),1)],!0)]),a.hasSubname?(f(),k("div",{key:0,class:ne(["list-item-content__subname",{"list-item-content__subname--bold":r.bold}])},[Pt(e.$slots,"subname",{},void 0,!0)],2)):R("",!0)]),D("div",s2,[s.showDetails?(f(),k("div",l2,[Pt(e.$slots,"details",{},()=>[J(L(r.details),1)],!0)])):R("",!0),r.counterNumber!==0||a.hasIndicator?zn((f(),k("div",c2,[r.counterNumber!==0?(f(),I(l,{key:0,count:r.counterNumber,active:r.active??h,class:"list-item-details__counter",type:r.counterType},null,8,["count","active","type"])):R("",!0),a.hasIndicator?(f(),k("span",d2,[Pt(e.$slots,"indicator",{},void 0,!0)])):R("",!0)],512)),[[pl,s.showAdditionalElements]]):R("",!0)])])],40,o2),e.$slots["extra-actions"]?(f(),k("div",u2,[Pt(e.$slots,"extra-actions",{},void 0,!0)])):R("",!0),r.forceDisplayActions||a.displayActionsOnHoverFocus?(f(),k("div",{key:1,class:"list-item-content__actions",onFocusout:o[4]||(o[4]=(...p)=>s.handleBlur&&s.handleBlur(...p))},[E(c,{ref:"actions",primary:r.active??h,forceMenu:r.forceMenu,"aria-label":r.actionsAriaLabel,"onUpdate:open":s.handleActionsUpdateOpen},Cp({default:S(()=>[Pt(e.$slots,"actions",{},void 0,!0)]),_:2},[e.$slots["actions-icon"]?{name:"icon",fn:S(()=>[Pt(e.$slots,"actions-icon",{},void 0,!0)]),key:"0"}:void 0]),1032,["primary","forceMenu","aria-label","onUpdate:open"])],32)):R("",!0),e.$slots.extra?(f(),k("div",h2,[Pt(e.$slots,"extra",{},void 0,!0)])):R("",!0)],34)],16)]),_:3},16)}const Wp=tn(n2,[["render",p2],["__scopeId","data-v-bc710154"]]),f2=8,Lu=32,m2={name:"NcListItemIcon",components:{NcAvatar:Xn,NcHighlight:Y0,NcIconSvgWrapper:F0},mixins:[G0],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:Lu},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:f2,defaultSize:Lu}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const e=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*e+"px","--margin":this.margin+"px"}},searchParts(){const e=/^([^<]*)<([^>]+)>?$/,o=this.search.match(e);return this.isNoUser||!o?[this.search,this.search]:[o[1].trim(),o[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}},g2=["id"],y2={class:"option__details"},v2={key:1},b2=["aria-label"];function _2(e,o,r,i,a,s){const l=w("NcAvatar"),c=w("NcHighlight"),d=w("NcIconSvgWrapper");return f(),k("span",{id:r.id,class:ne(["option",{"option--compact":r.avatarSize[s.hasIconSvg?(f(),I(d,{key:0,class:"option__icon",svg:r.iconSvg,name:r.iconName},null,8,["svg","name"])):s.hasIcon?(f(),k("span",{key:1,class:ne(["icon option__icon",r.icon]),"aria-label":r.iconName},null,10,b2)):R("",!0)],!0)],14,g2)}const Du=tn(m2,[["render",_2],["__scopeId","data-v-0ee94269"]]),C2=Ne({__name:"NcSelectUsers",props:gr({ariaLabelClearSelected:{},ariaLabelListbox:{},ariaLabelDeselectOption:{type:Function},disabled:{type:Boolean},inputId:{},inputLabel:{},labelOutside:{type:Boolean},keepOpen:{type:Boolean},loading:{type:Boolean},multiple:{type:Boolean},noWrap:{type:Boolean},options:{},placeholder:{},required:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:gr(["search"],["update:modelValue"]),setup(e,{emit:o}){const r=ac(e,"modelValue"),i=o,a=zo("");_n(a,()=>i("search",a.value));const s=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),l=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),c=s-2*l;function d(u,h,p){const m=/[^<]*<([^>]+)/,y=p.match(m),_=u.subname?.toLocaleLowerCase()??"";return y&&_.indexOf(y[1].toLocaleLowerCase())>-1||`${h} ${u.subname}`.toLocaleLowerCase().indexOf(p.toLocaleLowerCase())>-1}return(u,h)=>(f(),I(be(Co),gt({modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=p=>r.value=p),class:"nc-select-users"},u.$props,{filterBy:d,label:"displayName",onSearch:h[1]||(h[1]=p=>a.value=p)}),{option:S(p=>[E(be(Du),gt(p,{avatarSize:32,name:p.displayName,search:a.value}),null,16,["name","search"])]),"selected-option":S(p=>[E(be(Du),gt(p,{avatarSize:c,name:p.displayName,noMargin:"",search:a.value}),null,16,["name","search"])]),_:1},16,["modelValue"]))}}),w2=tn(C2,[["__scopeId","data-v-e8e18fd3"]]),k2={};function S2(e,o){return f(),k("div",null,[Pt(e.$slots,"trigger")])}const x2=tn(k2,[["render",S2]]),N2={class:"user-bubble__name"},E2={key:0,class:"user-bubble__secondary"},M2=Ne({__name:"NcUserBubble",props:gr({avatarImage:{default:void 0},user:{default:void 0},displayName:{default:void 0},showUserStatus:{type:Boolean},url:{default:void 0},to:{default:void 0},primary:{type:Boolean},size:{default:20},margin:{default:2}},{open:{type:Boolean},openModifiers:{}}),emits:gr(["click"],["update:open"]),setup(e,{emit:o}){const r=ac(e,"open"),i=e,a=o,s=Bt(()=>{if(!i.avatarImage)return!1;try{return!!new URL(i.avatarImage)}catch{return!1}}),l=Bt(()=>!!i.avatarImage),c=Bt(()=>({marginInlineStart:`${i.margin}px`})),d=Bt(()=>{if(!i.url||i.url.trim()==="")return!1;try{return!!new URL(i.url,i.url?.startsWith?.("/")?window.location.href:void 0)}catch{return y0("[NcUserBubble] Invalid URL passed",{url:i.url}),!1}}),u=Bt(()=>d.value?i.url:void 0),h=Bt(()=>d.value?"a":i.to?uv:"div"),p=Bt(()=>({height:`${i.size}px`,lineHeight:`${i.size}px`,borderRadius:`${i.size/2}px`}));return _n([()=>i.displayName,()=>i.user],()=>{!i.displayName&&i.user}),(m,y)=>(f(),I(yo(m.$slots.default?fc:x2),{shown:r.value,"onUpdate:shown":y[1]||(y[1]=_=>r.value=_),class:"user-bubble__wrapper",trigger:"hover focus"},{trigger:S(({attrs:_})=>[(f(),I(yo(h.value),gt({class:["user-bubble__content",{"user-bubble__content--primary":m.primary}],style:p.value,to:m.to,href:u.value},_,{onClick:y[0]||(y[0]=C=>a("click",C))}),{default:S(()=>[E(Xn,{url:l.value&&s.value?m.avatarImage:void 0,iconClass:l.value&&!s.value?m.avatarImage:void 0,user:m.user,displayName:m.displayName,size:m.size-m.margin*2,style:lc(c.value),disableTooltip:"",disableMenu:"",hideStatus:!m.showUserStatus,class:"user-bubble__avatar"},null,8,["url","iconClass","user","displayName","size","style","hideStatus"]),D("span",N2,L(m.displayName||m.user),1),m.$slots.name?(f(),k("span",E2,[Pt(m.$slots,"name",{},void 0,!0)])):R("",!0)]),_:2},1040,["class","style","to","href"]))]),default:S(()=>[Pt(m.$slots,"default",{},void 0,!0)]),_:3},40,["shown"]))}}),wc=tn(M2,[["__scopeId","data-v-9189d023"]]);function T2(e,o){var r=0,i=0;return Float64Array.from(e,o===void 0?a=>r+=+a||0:a=>r+=+o(a,i++,e)||0)}function A2(e,o){let r;if(o===void 0)for(const i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let a of e)(a=o(a,++i,e))!=null&&(r=a)&&(r=a)}return r}function I2(e,o){let r;if(o===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of e)(a=o(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function O2(e,o){let r=0;if(o===void 0)for(let i of e)(i=+i)&&(r+=i);else{let i=-1;for(let a of e)(a=+o(a,++i,e))&&(r+=a)}return r}var L2={value:()=>{}};function kc(){for(var e=0,o=arguments.length,r={},i;e=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!o.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ji.prototype=kc.prototype={constructor:Ji,on:function(e,o){var r=this._,i=D2(e+"",r),a,s=-1,l=i.length;if(arguments.length<2){for(;++s0)for(var r=new Array(a),i=0,a,s;i=0&&(o=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Pu.hasOwnProperty(o)?{space:Pu[o],local:e}:e}function P2(e){return function(){var o=this.ownerDocument,r=this.namespaceURI;return r===bl&&o.documentElement.namespaceURI===bl?o.createElement(e):o.createElementNS(r,e)}}function V2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function jp(e){var o=Ka(e);return(o.local?V2:P2)(o)}function B2(){}function Sc(e){return e==null?B2:function(){return this.querySelector(e)}}function $2(e){typeof e!="function"&&(e=Sc(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a=B&&(B=V+1);!(W=A[B])&&++B<_;);Z._next=W||null}}return l=new We(l,i),l._enter=c,l._exit=d,l}function ib(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ab(){return new We(this._exit||this._groups.map(Kp),this._parents)}function sb(e,o,r){var i=this.enter(),a=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),o!=null&&(a=o(a),a&&(a=a.selection())),r==null?s.remove():r(s),i&&a?i.merge(a).order():a}function lb(e){for(var o=e.selection?e.selection():e,r=this._groups,i=o._groups,a=r.length,s=i.length,l=Math.min(a,s),c=new Array(a),d=0;d=0;)(l=i[a])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function db(e){e||(e=ub);function o(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var r=this._groups,i=r.length,a=new Array(i),s=0;so?1:e>=o?0:NaN}function hb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function pb(){return Array.from(this)}function fb(){for(var e=this._groups,o=0,r=e.length;o1?this.each((o==null?xb:typeof o=="function"?Eb:Nb)(e,o,r??"")):_r(this.node(),e)}function _r(e,o){return e.style.getPropertyValue(o)||Qp(e).getComputedStyle(e,null).getPropertyValue(o)}function Tb(e){return function(){delete this[e]}}function Ab(e,o){return function(){this[e]=o}}function Ib(e,o){return function(){var r=o.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Ob(e,o){return arguments.length>1?this.each((o==null?Tb:typeof o=="function"?Ib:Ab)(e,o)):this.node()[e]}function tf(e){return e.trim().split(/^|\s+/)}function xc(e){return e.classList||new ef(e)}function ef(e){this._node=e,this._names=tf(e.getAttribute("class")||"")}ef.prototype={add:function(e){var o=this._names.indexOf(e);o<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var o=this._names.indexOf(e);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function nf(e,o){for(var r=xc(e),i=-1,a=o.length;++i=0&&(r=o.slice(i+1),o=o.slice(0,i)),{type:o,name:r}})}function a_(e){return function(){var o=this.__on;if(o){for(var r=0,i=-1,a=o.length,s;r>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):r===8?Li(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):r===4?Li(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=v_.exec(e))?new ze(o[1],o[2],o[3],1):(o=b_.exec(e))?new ze(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=__.exec(e))?Li(o[1],o[2],o[3],o[4]):(o=C_.exec(e))?Li(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=w_.exec(e))?Gu(o[1],o[2]/100,o[3]/100,1):(o=k_.exec(e))?Gu(o[1],o[2]/100,o[3]/100,o[4]):Vu.hasOwnProperty(e)?Hu(Vu[e]):e==="transparent"?new ze(NaN,NaN,NaN,0):null}function Hu(e){return new ze(e>>16&255,e>>8&255,e&255,1)}function Li(e,o,r,i){return i<=0&&(e=o=r=NaN),new ze(e,o,r,i)}function N_(e){return e instanceof Ci||(e=ai(e)),e?(e=e.rgb(),new ze(e.r,e.g,e.b,e.opacity)):new ze}function wl(e,o,r,i){return arguments.length===1?N_(e):new ze(e,o,r,i??1)}function ze(e,o,r,i){this.r=+e,this.g=+o,this.b=+r,this.opacity=+i}Nc(ze,wl,sf(Ci,{brighter(e){return e=e==null?va:Math.pow(va,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ri:Math.pow(ri,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ze($o(this.r),$o(this.g),$o(this.b),ba(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Uu,formatHex:Uu,formatHex8:E_,formatRgb:zu,toString:zu}));function Uu(){return`#${Do(this.r)}${Do(this.g)}${Do(this.b)}`}function E_(){return`#${Do(this.r)}${Do(this.g)}${Do(this.b)}${Do((isNaN(this.opacity)?1:this.opacity)*255)}`}function zu(){const e=ba(this.opacity);return`${e===1?"rgb(":"rgba("}${$o(this.r)}, ${$o(this.g)}, ${$o(this.b)}${e===1?")":`, ${e})`}`}function ba(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $o(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Do(e){return e=$o(e),(e<16?"0":"")+e.toString(16)}function Gu(e,o,r,i){return i<=0?e=o=r=NaN:r<=0||r>=1?e=o=NaN:o<=0&&(e=NaN),new an(e,o,r,i)}function lf(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);if(e instanceof Ci||(e=ai(e)),!e)return new an;if(e instanceof an)return e;e=e.rgb();var o=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(o,r,i),s=Math.max(o,r,i),l=NaN,c=s-a,d=(s+a)/2;return c?(o===s?l=(r-i)/c+(r0&&d<1?0:l,new an(l,c,d,e.opacity)}function M_(e,o,r,i){return arguments.length===1?lf(e):new an(e,o,r,i??1)}function an(e,o,r,i){this.h=+e,this.s=+o,this.l=+r,this.opacity=+i}Nc(an,M_,sf(Ci,{brighter(e){return e=e==null?va:Math.pow(va,e),new an(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ri:Math.pow(ri,e),new an(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,o=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*o,a=2*r-i;return new ze(Hs(e>=240?e-240:e+120,a,i),Hs(e,a,i),Hs(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new an(Fu(this.h),Di(this.s),Di(this.l),ba(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ba(this.opacity);return`${e===1?"hsl(":"hsla("}${Fu(this.h)}, ${Di(this.s)*100}%, ${Di(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fu(e){return e=(e||0)%360,e<0?e+360:e}function Di(e){return Math.max(0,Math.min(1,e||0))}function Hs(e,o,r){return(e<60?o+(r-o)*e/60:e<180?r:e<240?o+(r-o)*(240-e)/60:o)*255}const cf=e=>()=>e;function T_(e,o){return function(r){return e+r*o}}function A_(e,o,r){return e=Math.pow(e,r),o=Math.pow(o,r)-e,r=1/r,function(i){return Math.pow(e+i*o,r)}}function I_(e){return(e=+e)==1?df:function(o,r){return r-o?A_(o,r,e):cf(isNaN(o)?r:o)}}function df(e,o){var r=o-e;return r?T_(e,r):cf(isNaN(e)?o:e)}const Yu=(function e(o){var r=I_(o);function i(a,s){var l=r((a=wl(a)).r,(s=wl(s)).r),c=r(a.g,s.g),d=r(a.b,s.b),u=df(a.opacity,s.opacity);return function(h){return a.r=l(h),a.g=c(h),a.b=d(h),a.opacity=u(h),a+""}}return i.gamma=e,i})(1);function io(e,o){return e=+e,o=+o,function(r){return e*(1-r)+o*r}}var kl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Us=new RegExp(kl.source,"g");function O_(e){return function(){return e}}function L_(e){return function(o){return e(o)+""}}function D_(e,o){var r=kl.lastIndex=Us.lastIndex=0,i,a,s,l=-1,c=[],d=[];for(e=e+"",o=o+"";(i=kl.exec(e))&&(a=Us.exec(o));)(s=a.index)>r&&(s=o.slice(r,s),c[l]?c[l]+=s:c[++l]=s),(i=i[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,d.push({i:l,x:io(i,a)})),r=Us.lastIndex;return r180?h+=360:h-u>180&&(u+=360),m.push({i:p.push(a(p)+"rotate(",null,i)-2,x:io(u,h)})):h&&p.push(a(p)+"rotate("+h+i)}function c(u,h,p,m){u!==h?m.push({i:p.push(a(p)+"skewX(",null,i)-2,x:io(u,h)}):h&&p.push(a(p)+"skewX("+h+i)}function d(u,h,p,m,y,_){if(u!==p||h!==m){var C=y.push(a(y)+"scale(",null,",",null,")");_.push({i:C-4,x:io(u,p)},{i:C-2,x:io(h,m)})}else(p!==1||m!==1)&&y.push(a(y)+"scale("+p+","+m+")")}return function(u,h){var p=[],m=[];return u=e(u),h=e(h),s(u.translateX,u.translateY,h.translateX,h.translateY,p,m),l(u.rotate,h.rotate,p,m),c(u.skewX,h.skewX,p,m),d(u.scaleX,u.scaleY,h.scaleX,h.scaleY,p,m),u=h=null,function(y){for(var _=-1,C=m.length,A;++_=0&&e._call.call(void 0,o),e=e._next;--wr}function ju(){Yo=(Ca=si.now())+Qa,wr=Wr=0;try{F_()}finally{wr=0,X_(),Yo=0}}function Y_(){var e=si.now(),o=e-Ca;o>ff&&(Qa-=o,Ca=e)}function X_(){for(var e,o=_a,r,i=1/0;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(r=o._next,o._next=null,o=e?e._next=r:_a=r);jr=e,Sl(i)}function Sl(e){if(!wr){Wr&&(Wr=clearTimeout(Wr));var o=e-Yo;o>24?(e<1/0&&(Wr=setTimeout(ju,e-si.now()-Qa)),Hr&&(Hr=clearInterval(Hr))):(Hr||(Ca=si.now(),Hr=setInterval(Y_,ff)),wr=1,mf(ju))}}function qu(e,o,r){var i=new wa;return o=o==null?0:+o,i.restart(a=>{i.stop(),e(a+o)},o,r),i}var W_=kc("start","end","cancel","interrupt"),j_=[],yf=0,Zu=1,xl=2,Ki=3,Ju=4,Nl=5,Qi=6;function ts(e,o,r,i,a,s){var l=e.__transition;if(!l)e.__transition={};else if(r in l)return;q_(e,r,{name:o,index:i,group:a,on:W_,tween:j_,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:yf})}function Mc(e,o){var r=pn(e,o);if(r.state>yf)throw new Error("too late; already scheduled");return r}function wn(e,o){var r=pn(e,o);if(r.state>Ki)throw new Error("too late; already running");return r}function pn(e,o){var r=e.__transition;if(!r||!(r=r[o]))throw new Error("transition not found");return r}function q_(e,o,r){var i=e.__transition,a;i[o]=r,r.timer=gf(s,0,r.time);function s(u){r.state=Zu,r.timer.restart(l,r.delay,r.time),r.delay<=u&&l(u-r.delay)}function l(u){var h,p,m,y;if(r.state!==Zu)return d();for(h in i)if(y=i[h],y.name===r.name){if(y.state===Ki)return qu(l);y.state===Ju?(y.state=Qi,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete i[h]):+hxl&&i.state=0&&(o=o.slice(0,r)),!o||o==="start"})}function xC(e,o,r){var i,a,s=SC(o)?Mc:wn;return function(){var l=s(this,e),c=l.on;c!==i&&(a=(i=c).copy()).on(o,r),l.on=a}}function NC(e,o){var r=this._id;return arguments.length<2?pn(this.node(),r).on.on(e):this.each(xC(r,e,o))}function EC(e){return function(){var o=this.parentNode;for(var r in this.__transition)if(+r!==e)return;o&&o.removeChild(this)}}function MC(){return this.on("end.remove",EC(this._id))}function TC(e){var o=this._name,r=this._id;typeof e!="function"&&(e=Sc(e));for(var i=this._groups,a=i.length,s=new Array(a),l=0;lIo)if(!(Math.abs(h*c-d*u)>Io)||!a)this._+="L"+(this._x1=e)+","+(this._y1=o);else{var m=r-s,y=i-l,_=c*c+d*d,C=m*m+y*y,A=Math.sqrt(_),T=Math.sqrt(p),V=a*Math.tan((El-Math.acos((_+p-C)/(2*A*T)))/2),B=V/T,Z=V/A;Math.abs(B-1)>Io&&(this._+="L"+(e+B*u)+","+(o+B*h)),this._+="A"+a+","+a+",0,0,"+ +(h*m>u*y)+","+(this._x1=e+Z*c)+","+(this._y1=o+Z*d)}},arc:function(e,o,r,i,a,s){e=+e,o=+o,r=+r,s=!!s;var l=r*Math.cos(i),c=r*Math.sin(i),d=e+l,u=o+c,h=1^s,p=s?i-a:a-i;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+d+","+u:(Math.abs(this._x1-d)>Io||Math.abs(this._y1-u)>Io)&&(this._+="L"+d+","+u),r&&(p<0&&(p=p%Ml+Ml),p>ew?this._+="A"+r+","+r+",0,1,"+h+","+(e-l)+","+(o-c)+"A"+r+","+r+",0,1,"+h+","+(this._x1=d)+","+(this._y1=u):p>Io&&(this._+="A"+r+","+r+",0,"+ +(p>=El)+","+h+","+(this._x1=e+r*Math.cos(a))+","+(this._y1=o+r*Math.sin(a))))},rect:function(e,o,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+o)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},toString:function(){return this._}};function nw(e){var o=0,r=e.children,i=r&&r.length;if(!i)o=1;else for(;--i>=0;)o+=r[i].value;e.value=o}function ow(){return this.eachAfter(nw)}function rw(e,o){let r=-1;for(const i of this)e.call(o,i,++r,this);return this}function iw(e,o){for(var r=this,i=[r],a,s,l=-1;r=i.pop();)if(e.call(o,r,++l,this),a=r.children)for(s=a.length-1;s>=0;--s)i.push(a[s]);return this}function aw(e,o){for(var r=this,i=[r],a=[],s,l,c,d=-1;r=i.pop();)if(a.push(r),s=r.children)for(l=0,c=s.length;l=0;)r+=i[a].value;o.value=r})}function cw(e){return this.eachBefore(function(o){o.children&&o.children.sort(e)})}function dw(e){for(var o=this,r=uw(o,e),i=[o];o!==r;)o=o.parent,i.push(o);for(var a=i.length;e!==r;)i.splice(a,0,e),e=e.parent;return i}function uw(e,o){if(e===o)return e;var r=e.ancestors(),i=o.ancestors(),a=null;for(e=r.pop(),o=i.pop();e===o;)a=e,e=r.pop(),o=i.pop();return a}function hw(){for(var e=this,o=[e];e=e.parent;)o.push(e);return o}function pw(){return Array.from(this)}function fw(){var e=[];return this.eachBefore(function(o){o.children||e.push(o)}),e}function mw(){var e=this,o=[];return e.each(function(r){r!==e&&o.push({source:r.parent,target:r})}),o}function*gw(){var e=this,o,r=[e],i,a,s;do for(o=r.reverse(),r=[];e=o.pop();)if(yield e,i=e.children)for(a=0,s=i.length;a=0;--c)a.push(s=l[c]=new kr(l[c])),s.parent=i,s.depth=i.depth+1;return r.eachBefore(kf)}function yw(){return wf(this).eachBefore(_w)}function vw(e){return e.children}function bw(e){return Array.isArray(e)?e[1]:null}function _w(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function kf(e){var o=0;do e.height=o;while((e=e.parent)&&e.height<++o)}function kr(e){this.data=e,this.depth=this.height=0,this.parent=null}kr.prototype=wf.prototype={constructor:kr,count:ow,each:rw,eachAfter:aw,eachBefore:iw,find:sw,sum:lw,sort:cw,path:dw,ancestors:hw,descendants:pw,leaves:fw,links:mw,copy:yw,[Symbol.iterator]:gw};function zs(e){return e==null?null:Cw(e)}function Cw(e){if(typeof e!="function")throw new Error;return e}var ww={depth:-1},Ku={},Gs={};function kw(e){return e.id}function Sw(e){return e.parentId}function xw(){var e=kw,o=Sw,r;function i(a){var s=Array.from(a),l=e,c=o,d,u,h,p,m,y,_,C,A=new Map;if(r!=null){const T=s.map((Z,W)=>Nw(r(Z,W,a))),V=T.map(Qu),B=new Set(T).add("");for(const Z of V)B.has(Z)||(B.add(Z),T.push(Z),V.push(Qu(Z)),s.push(Gs));l=(Z,W)=>T[W],c=(Z,W)=>V[W]}for(h=0,d=s.length;h=0&&(y=s[T],y.data===Gs);--T)y.data=null}if(p.parent=ww,p.eachBefore(function(T){T.depth=T.parent.depth+1,--d}).eachBefore(kf),p.parent=null,d>0)throw new Error("cycle");return p}return i.id=function(a){return arguments.length?(e=zs(a),i):e},i.parentId=function(a){return arguments.length?(o=zs(a),i):o},i.path=function(a){return arguments.length?(r=zs(a),i):r},i}function Nw(e){e=`${e}`;let o=e.length;return Al(e,o-1)&&!Al(e,o-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Qu(e){let o=e.length;if(o<2)return"";for(;--o>1&&!Al(e,o););return e.slice(0,o)}function Al(e,o){if(e[o]==="/"){let r=0;for(;o>0&&e[--o]==="\\";)++r;if((r&1)===0)return!0}return!1}function Ew(e,o){return e.parent===o.parent?1:2}function Fs(e){var o=e.children;return o?o[0]:e.t}function Ys(e){var o=e.children;return o?o[o.length-1]:e.t}function Mw(e,o,r){var i=r/(o.i-e.i);o.c-=i,o.s+=r,e.c+=i,o.z+=r,o.m+=r}function Tw(e){for(var o=0,r=0,i=e.children,a=i.length,s;--a>=0;)s=i[a],s.z+=o,s.m+=o,o+=s.s+(r+=s.c)}function Aw(e,o,r){return e.a.parent===o.parent?e.a:r}function ea(e,o){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=o}ea.prototype=Object.create(kr.prototype);function Iw(e){for(var o=new ea(e,0),r,i=[o],a,s,l,c;r=i.pop();)if(s=r._.children)for(r.children=new Array(c=s.length),l=c-1;l>=0;--l)i.push(a=r.children[l]=new ea(s[l],l)),a.parent=r;return(o.parent=new ea(null,0)).children=[o],o}function Ow(){var e=Ew,o=1,r=1,i=null;function a(u){var h=Iw(u);if(h.eachAfter(s),h.parent.m=-h.z,h.eachBefore(l),i)u.eachBefore(d);else{var p=u,m=u,y=u;u.eachBefore(function(V){V.xm.x&&(m=V),V.depth>y.depth&&(y=V)});var _=p===m?1:e(p,m)/2,C=_-p.x,A=o/(m.x+_+C),T=r/(y.depth||1);u.eachBefore(function(V){V.x=(V.x+C)*A,V.y=V.depth*T})}return u}function s(u){var h=u.children,p=u.parent.children,m=u.i?p[u.i-1]:null;if(h){Tw(u);var y=(h[0].z+h[h.length-1].z)/2;m?(u.z=m.z+e(u._,m._),u.m=u.z-y):u.z=y}else m&&(u.z=m.z+e(u._,m._));u.parent.A=c(u,m,u.parent.A||p[0])}function l(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function c(u,h,p){if(h){for(var m=u,y=u,_=h,C=m.parent.children[0],A=m.m,T=y.m,V=_.m,B=C.m,Z;_=Ys(_),m=Fs(m),_&&m;)C=Fs(C),y=Ys(y),y.a=u,Z=_.z+V-m.z-A+e(_._,m._),Z>0&&(Mw(Aw(_,u,p),u,Z),A+=Z,T+=Z),V+=_.m,A+=m.m,B+=C.m,T+=y.m;_&&!Ys(y)&&(y.t=_,y.m+=V-T),m&&!Fs(C)&&(C.t=m,C.m+=A-B,p=u)}return p}function d(u){u.x*=o,u.y=u.depth*r}return a.separation=function(u){return arguments.length?(e=u,a):e},a.size=function(u){return arguments.length?(i=!1,o=+u[0],r=+u[1],a):i?null:[o,r]},a.nodeSize=function(u){return arguments.length?(i=!0,o=+u[0],r=+u[1],a):i?[o,r]:null},a}function th(e){return function(){return e}}var Lw=Array.prototype.slice;function Dw(e){return e[0]}function Rw(e){return e[1]}class Pw{constructor(o,r){this._context=o,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(o,r){switch(o=+o,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(o,r):this._context.moveTo(o,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+o)/2,this._y0,this._x0,r,o,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,o,this._y0,o,r);break}}this._x0=o,this._y0=r}}function Vw(e){return new Pw(e,!0)}function Bw(e){return e.source}function $w(e){return e.target}function Hw(e){let o=Bw,r=$w,i=Dw,a=Rw,s=null,l=null;function c(){let d;const u=Lw.call(arguments),h=o.apply(this,u),p=r.apply(this,u);if(s==null&&(l=e(d=Cf())),l.lineStart(),u[0]=h,l.point(+i.apply(this,u),+a.apply(this,u)),u[0]=p,l.point(+i.apply(this,u),+a.apply(this,u)),l.lineEnd(),d)return l=null,d+""||null}return c.source=function(d){return arguments.length?(o=d,c):o},c.target=function(d){return arguments.length?(r=d,c):r},c.x=function(d){return arguments.length?(i=typeof d=="function"?d:th(+d),c):i},c.y=function(d){return arguments.length?(a=typeof d=="function"?d:th(+d),c):a},c.context=function(d){return arguments.length?(d==null?s=l=null:l=e(s=d),c):s},c}function Uw(){return Hw(Vw)}const Pi=e=>()=>e;function zw(e,{sourceEvent:o,target:r,transform:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Ln(e,o,r){this.k=e,this.x=o,this.y=r}Ln.prototype={constructor:Ln,scale:function(e){return e===1?this:new Ln(this.k*e,this.x,this.y)},translate:function(e,o){return e===0&o===0?this:new Ln(this.k,this.x+this.k*e,this.y+this.k*o)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ac=new Ln(1,0,0);Ln.prototype;function Xs(e){e.stopImmediatePropagation()}function Ur(e){e.preventDefault(),e.stopImmediatePropagation()}function Gw(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Fw(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function eh(){return this.__zoom||Ac}function Yw(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Xw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ww(e,o,r){var i=e.invertX(o[0][0])-r[0][0],a=e.invertX(o[1][0])-r[1][0],s=e.invertY(o[0][1])-r[0][1],l=e.invertY(o[1][1])-r[1][1];return e.translate(a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function jw(){var e=Gw,o=Fw,r=Ww,i=Yw,a=Xw,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,d=z_,u=kc("start","zoom","end"),h,p,m,y=500,_=150,C=0,A=10;function T(M){M.property("__zoom",eh).on("wheel.zoom",it,{passive:!1}).on("mousedown.zoom",et).on("dblclick.zoom",ut).filter(a).on("touchstart.zoom",O).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(M,U,z,Q){var pt=M.selection?M.selection():M;pt.property("__zoom",eh),M!==pt?W(M,U,z,Q):pt.interrupt().each(function(){rt(this,arguments).event(Q).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},T.scaleBy=function(M,U,z,Q){T.scaleTo(M,function(){var pt=this.__zoom.k,ft=typeof U=="function"?U.apply(this,arguments):U;return pt*ft},z,Q)},T.scaleTo=function(M,U,z,Q){T.transform(M,function(){var pt=o.apply(this,arguments),ft=this.__zoom,st=z==null?Z(pt):typeof z=="function"?z.apply(this,arguments):z,nt=ft.invert(st),At=typeof U=="function"?U.apply(this,arguments):U;return r(B(V(ft,At),st,nt),pt,l)},z,Q)},T.translateBy=function(M,U,z,Q){T.transform(M,function(){return r(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof z=="function"?z.apply(this,arguments):z),o.apply(this,arguments),l)},null,Q)},T.translateTo=function(M,U,z,Q,pt){T.transform(M,function(){var ft=o.apply(this,arguments),st=this.__zoom,nt=Q==null?Z(ft):typeof Q=="function"?Q.apply(this,arguments):Q;return r(Ac.translate(nt[0],nt[1]).scale(st.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof z=="function"?-z.apply(this,arguments):-z),ft,l)},Q,pt)};function V(M,U){return U=Math.max(s[0],Math.min(s[1],U)),U===M.k?M:new Ln(U,M.x,M.y)}function B(M,U,z){var Q=U[0]-z[0]*M.k,pt=U[1]-z[1]*M.k;return Q===M.x&&pt===M.y?M:new Ln(M.k,Q,pt)}function Z(M){return[(+M[0][0]+ +M[1][0])/2,(+M[0][1]+ +M[1][1])/2]}function W(M,U,z,Q){M.on("start.zoom",function(){rt(this,arguments).event(Q).start()}).on("interrupt.zoom end.zoom",function(){rt(this,arguments).event(Q).end()}).tween("zoom",function(){var pt=this,ft=arguments,st=rt(pt,ft).event(Q),nt=o.apply(pt,ft),At=z==null?Z(nt):typeof z=="function"?z.apply(pt,ft):z,Ft=Math.max(nt[1][0]-nt[0][0],nt[1][1]-nt[0][1]),Ot=pt.__zoom,Yt=typeof U=="function"?U.apply(pt,ft):U,ee=d(Ot.invert(At).concat(Ft/Ot.k),Yt.invert(At).concat(Ft/Yt.k));return function(F){if(F===1)F=Yt;else{var dt=ee(F),lt=Ft/dt[2];F=new Ln(lt,At[0]-dt[0]*lt,At[1]-dt[1]*lt)}st.zoom(null,F)}})}function rt(M,U,z){return!z&&M.__zooming||new ct(M,U)}function ct(M,U){this.that=M,this.args=U,this.active=0,this.sourceEvent=null,this.extent=o.apply(M,U),this.taps=0}ct.prototype={event:function(M){return M&&(this.sourceEvent=M),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(M,U){return this.mouse&&M!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&M!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&M!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(M){var U=Ue(this.that).datum();u.call(M,this.that,new zw(M,{sourceEvent:this.sourceEvent,target:T,transform:this.that.__zoom,dispatch:u}),U)}};function it(M,...U){if(!e.apply(this,arguments))return;var z=rt(this,U).event(M),Q=this.__zoom,pt=Math.max(s[0],Math.min(s[1],Q.k*Math.pow(2,i.apply(this,arguments)))),ft=Mo(M);if(z.wheel)(z.mouse[0][0]!==ft[0]||z.mouse[0][1]!==ft[1])&&(z.mouse[1]=Q.invert(z.mouse[0]=ft)),clearTimeout(z.wheel);else{if(Q.k===pt)return;z.mouse=[ft,Q.invert(ft)],ta(this),z.start()}Ur(M),z.wheel=setTimeout(st,_),z.zoom("mouse",r(B(V(Q,pt),z.mouse[0],z.mouse[1]),z.extent,l));function st(){z.wheel=null,z.end()}}function et(M,...U){if(m||!e.apply(this,arguments))return;var z=M.currentTarget,Q=rt(this,U,!0).event(M),pt=Ue(M.view).on("mousemove.zoom",At,!0).on("mouseup.zoom",Ft,!0),ft=Mo(M,z),st=M.clientX,nt=M.clientY;m_(M.view),Xs(M),Q.mouse=[ft,this.__zoom.invert(ft)],ta(this),Q.start();function At(Ot){if(Ur(Ot),!Q.moved){var Yt=Ot.clientX-st,ee=Ot.clientY-nt;Q.moved=Yt*Yt+ee*ee>C}Q.event(Ot).zoom("mouse",r(B(Q.that.__zoom,Q.mouse[0]=Mo(Ot,z),Q.mouse[1]),Q.extent,l))}function Ft(Ot){pt.on("mousemove.zoom mouseup.zoom",null),g_(Ot.view,Q.moved),Ur(Ot),Q.event(Ot).end()}}function ut(M,...U){if(e.apply(this,arguments)){var z=this.__zoom,Q=Mo(M.changedTouches?M.changedTouches[0]:M,this),pt=z.invert(Q),ft=z.k*(M.shiftKey?.5:2),st=r(B(V(z,ft),Q,pt),o.apply(this,U),l);Ur(M),c>0?Ue(this).transition().duration(c).call(W,st,Q,M):Ue(this).call(T.transform,st,Q,M)}}function O(M,...U){if(e.apply(this,arguments)){var z=M.touches,Q=z.length,pt=rt(this,U,M.changedTouches.length===Q).event(M),ft,st,nt,At;for(Xs(M),st=0;st=0;)o+=r[i].value;e.value=o}function Zw(){return this.eachAfter(qw)}function Jw(e){var o=this,r,i=[o],a,s,l;do for(r=i.reverse(),i=[];o=r.pop();)if(e(o),a=o.children,a)for(s=0,l=a.length;s=0;--a)r.push(i[a]);return this}function Qw(e){for(var o=this,r=[o],i=[],a,s,l;o=r.pop();)if(i.push(o),a=o.children,a)for(s=0,l=a.length;s=0;)r+=i[a].value;o.value=r})}function ek(e){return this.eachBefore(function(o){o.children&&o.children.sort(e)})}function nk(e){for(var o=this,r=ok(o,e),i=[o];o!==r;)o=o.parent,i.push(o);for(var a=i.length;e!==r;)i.splice(a,0,e),e=e.parent;return i}function ok(e,o){if(e===o)return e;var r=e.ancestors(),i=o.ancestors(),a=null;for(e=r.pop(),o=i.pop();e===o;)a=e,e=r.pop(),o=i.pop();return a}function rk(){for(var e=this,o=[e];e=e.parent;)o.push(e);return o}function ik(){var e=[];return this.each(function(o){e.push(o)}),e}function ak(){var e=[];return this.eachBefore(function(o){o.children||e.push(o)}),e}function sk(){var e=this,o=[];return e.each(function(r){r!==e&&o.push({source:r.parent,target:r})}),o}function Ic(e,o){var r=new ka(e),i=+e.value&&(r.value=e.value),a,s=[r],l,c,d,u;for(o==null&&(o=ck);a=s.pop();)if(i&&(a.value=+a.data.value),(c=o(a.data))&&(u=c.length))for(a.children=new Array(u),d=u-1;d>=0;--d)s.push(l=a.children[d]=new ka(c[d])),l.parent=a,l.depth=a.depth+1;return r.eachBefore(uk)}function lk(){return Ic(this).eachBefore(dk)}function ck(e){return e.children}function dk(e){e.data=e.data.data}function uk(e){var o=0;do e.height=o;while((e=e.parent)&&e.height<++o)}function ka(e){this.data=e,this.depth=this.height=0,this.parent=null}ka.prototype=Ic.prototype={constructor:ka,count:Zw,each:Jw,eachAfter:Qw,eachBefore:Kw,sum:tk,sort:ek,path:nk,ancestors:rk,descendants:ik,leaves:ak,links:sk,copy:lk};const hk="2.1.2",pk={version:hk},{version:fk}=pk,mk=Object.freeze({children:e=>e.children,nodeSize:e=>e.data.size,spacing:0});function Oc(e){const o=Object.assign({},mk,e);function r(c){const d=o[c];return typeof d=="function"?d:()=>d}function i(c){const d=l(s(),c,u=>u.children);return d.update(),d.data}function a(){const c=r("nodeSize"),d=r("spacing");return class Sf extends Ic.prototype.constructor{constructor(h){super(h)}copy(){const h=l(this.constructor,this,p=>p.children);return h.each(p=>p.data=p.data.data),h}get size(){return c(this)}spacing(h){return d(this,h)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const h=this.ancestors();return h[h.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return this.children===null}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((h,p)=>Sf.maxExtents(h,p.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(h,p){return{top:Math.min(h.top,p.top),bottom:Math.max(h.bottom,p.bottom),left:Math.min(h.left,p.left),right:Math.max(h.right,p.right)}}}}function s(){const c=a(),d=r("nodeSize"),u=r("spacing");return class extends c{constructor(h){super(h),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return d(this.data)}spacing(h){return u(this.data,h.data)}get x(){return this.data.x}set x(h){this.data.x=h}get y(){return this.data.y}set y(h){this.data.y=h}update(){return xf(this),Nf(this),this}}}function l(c,d,u){const h=(p,m)=>{const y=new c(p);Object.assign(y,{parent:m,depth:m===null?0:m.depth+1,height:0,length:1});const _=u(p)||[];return y.children=_.length===0?null:_.map(C=>h(C,y)),y.children&&Object.assign(y,y.children.reduce((C,A)=>({height:Math.max(C.height,A.height+1),length:C.length+A.length}),y)),y};return h(d,null)}return Object.assign(i,{nodeSize(c){return arguments.length?(o.nodeSize=c,i):o.nodeSize},spacing(c){return arguments.length?(o.spacing=c,i):o.spacing},children(c){return arguments.length?(o.children=c,i):o.children},hierarchy(c,d){const u=typeof d>"u"?o.children:d;return l(a(),c,u)},dump(c){const d=r("nodeSize"),u=h=>p=>{const m=h+" ",y=h+" ",{x:_,y:C}=p,A=d(p),T=p.children||[],V=T.length===0?" ":`,${m}children: [${y}${T.map(u(y)).join(y)}${m}],${h}`;return`{ size: [${A.join(", ")}],${m}x: ${_}, y: ${C}${V}},`};return u(` `)(c)}}),i}Oc.version=fk;const xf=(e,o=0)=>(e.y=o,(e.children||[]).reduce((r,i)=>{const[a,s]=r;xf(i,e.y+e.ySize);const l=(a===0?i.lExt:i.rExt).bottom;a!==0&&yk(e,a,s);const c=xk(l,a,s);return[a+1,c]},[0,null]),gk(e),Sk(e),e),Nf=(e,o,r)=>{typeof o>"u"&&(o=-e.relX-e.prelim,r=0);const i=o+e.relX;return e.relX=i+e.prelim-r,e.prelim=0,e.x=r+e.relX,(e.children||[]).forEach(a=>Nf(a,i,e.x)),e},gk=e=>{(e.children||[]).reduce((o,r)=>{const[i,a]=o,s=i+r.shift,l=a+s+r.change;return r.relX+=l,[s,l]},[0,0])},yk=(e,o,r)=>{const i=e.children[o-1],a=e.children[o];let s=i,l=i.relX,c=a,d=a.relX,u=!0;for(;s&&c;){s.bottom>r.lowY&&(r=r.next);const h=l+s.prelim-(d+c.prelim)+s.xSize/2+c.xSize/2+s.spacing(c);(h>0||h<0&&u)&&(d+=h,vk(a,h),bk(e,o,r.index,h)),u=!1;const p=s.bottom,m=c.bottom;p<=m&&(s=Ck(s),s&&(l+=s.relX)),p>=m&&(c=_k(c),c&&(d+=c.relX))}!s&&c?wk(e,o,c,d):s&&!c&&kk(e,o,s,l)},vk=(e,o)=>{e.relX+=o,e.lExtRelX+=o,e.rExtRelX+=o},bk=(e,o,r,i)=>{const a=e.children[o],s=o-r;if(s>1){const l=i/s;e.children[r+1].shift+=l,a.shift-=l,a.change-=i-l}},_k=e=>e.hasChildren?e.firstChild:e.lThr,Ck=e=>e.hasChildren?e.lastChild:e.rThr,wk=(e,o,r,i)=>{const a=e.firstChild,s=a.lExt,l=e.children[o];s.lThr=r;const c=i-r.relX-a.lExtRelX;s.relX+=c,s.prelim-=c,a.lExt=l.lExt,a.lExtRelX=l.lExtRelX},kk=(e,o,r,i)=>{const a=e.children[o],s=a.rExt,l=e.children[o-1];s.rThr=r;const c=i-r.relX-a.rExtRelX;s.relX+=c,s.prelim-=c,a.rExt=l.rExt,a.rExtRelX=l.rExtRelX},Sk=e=>{if(e.hasChildren){const o=e.firstChild,r=e.lastChild,i=(o.prelim+o.relX-o.xSize/2+r.relX+r.prelim+r.xSize/2)/2;Object.assign(e,{prelim:i,lExt:o.lExt,lExtRelX:o.lExtRelX,rExt:r.rExt,rExtRelX:r.rExtRelX})}},xk=(e,o,r)=>{for(;r!==null&&e>=r.lowY;)r=r.next;return{lowY:e,index:o,next:r}},Xt={selection:Cr,select:Ue,max:A2,min:I2,sum:O2,cumsum:T2,tree:Ow,stratify:xw,zoom:jw,zoomIdentity:Ac,linkHorizontal:Uw,flextree:Oc};let Nk=class{constructor(){const e={id:`ID${Math.floor(Math.random()*1e6)}`,firstDraw:!0,ctx:document.createElement("canvas").getContext("2d"),initialExpandLevel:1,nodeDefaultBackground:"none",lastTransform:{x:0,y:0,k:1},allowedNodesCount:{},zoomBehavior:null,generateRoot:null,svgWidth:800,svgHeight:window.innerHeight-100,container:"body",data:null,connections:[],defaultFont:"Helvetica",nodeId:o=>o.nodeId||o.id,parentNodeId:o=>o.parentNodeId||o.parentId,rootMargin:40,nodeWidth:o=>250,nodeHeight:o=>150,neighbourMargin:(o,r)=>80,siblingsMargin:o=>20,childrenMargin:o=>60,compactMarginPair:o=>100,compactMarginBetween:o=>20,nodeButtonWidth:o=>40,nodeButtonHeight:o=>40,nodeButtonX:o=>-20,nodeButtonY:o=>-20,linkYOffset:30,pagingStep:o=>5,minPagingVisibleNodes:o=>2e3,scaleExtent:[.001,20],duration:400,imageName:"Chart",setActiveNodeCentered:!0,layout:"top",compact:!0,createZoom:o=>Xt.zoom(),onZoomStart:o=>{},onZoom:o=>{},onZoomEnd:o=>{},onNodeClick:o=>o,onExpandOrCollapse:o=>o,nodeContent:o=>`
Sample Node(id=${o.id}), override using
chart.nodeContent({data}=>{
    return '' // Custom HTML
})

Or check different layout examples
`,buttonContent:({node:o,state:r})=>`
${{left:i=>i?`
${o.data._directSubordinatesPaging}
`:`
${o.data._directSubordinatesPaging}
`,bottom:i=>i?`
${o.data._directSubordinatesPaging}
`:`
${o.data._directSubordinatesPaging}
`,right:i=>i?`
${o.data._directSubordinatesPaging}
`:`
${o.data._directSubordinatesPaging}
`,top:i=>i?`
${o.data._directSubordinatesPaging}
`:`
${o.data._directSubordinatesPaging}
`}[r.layout](o.children)}
`,pagingButton:(o,r,i,a)=>{const s=a.pagingStep(o.parent),l=o.parent.data._pagingStep,c=o.parent.data._directSubordinatesPaging-l;return`
Show next ${Math.min(c,s)} nodes
`},nodeUpdate:function(o,r,i){Xt.select(this).select(".node-rect").attr("stroke",a=>a.data._highlighted||a.data._upToTheRootHighlighted?"#E27396":"none").attr("stroke-width",o.data._highlighted||o.data._upToTheRootHighlighted?10:1)},nodeEnter:o=>o,nodeExit:o=>o,linkUpdate:function(o,r,i){Xt.select(this).attr("stroke",a=>a.data._upToTheRootHighlighted?"#E27396":"#E4E2E9").attr("stroke-width",a=>a.data._upToTheRootHighlighted?5:1),o.data._upToTheRootHighlighted&&Xt.select(this).raise()},hdiagonal:function(o,r,i){const a=o.x,s=o.y,l=r.x,c=r.y;let d=i&&i.x!=null?i.x:a,u=i&&i.y!=null?i.y:s,h=l-a<0?-1:1,p=c-s<0?-1:1,m=35,y=Math.abs(l-a)/2 ${r.map(i=>{const a=this.getTextWidth(i.label,{ctx:o.ctx,fontSize:2,defaultFont:o.defaultFont});return` ${i.label||""} `}).join("")} `},connectionsUpdate:function(o,r,i){Xt.select(this).attr("stroke",a=>"#E27396").attr("stroke-linecap","round").attr("stroke-width",a=>"5").attr("pointer-events","none").attr("marker-start",a=>`url(#${a.from+"_"+a.to})`).attr("marker-end",a=>`url(#arrow-${a.from+"_"+a.to})`)},linkGroupArc:Xt.linkHorizontal().x(o=>o.x).y(o=>o.y),layoutBindings:{left:{nodeLeftX:o=>0,nodeRightX:o=>o.width,nodeTopY:o=>-o.height/2,nodeBottomY:o=>o.height/2,nodeJoinX:o=>o.x+o.width,nodeJoinY:o=>o.y-o.height/2,linkJoinX:o=>o.x+o.width,linkJoinY:o=>o.y,linkX:o=>o.x,linkY:o=>o.y,linkCompactXStart:o=>o.x+o.width/2,linkCompactYStart:o=>o.y+(o.compactEven?o.height/2:-o.height/2),compactLinkMidX:(o,r)=>o.firstCompactNode.x,compactLinkMidY:(o,r)=>o.firstCompactNode.y+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,linkParentX:o=>o.parent.x+o.parent.width,linkParentY:o=>o.parent.y,buttonX:o=>o.width,buttonY:o=>o.height/2,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s})=>`translate(${r},${i}) scale(${a})`,compactDimension:{sizeColumn:o=>o.height,sizeRow:o=>o.width,reverse:o=>o.slice().reverse()},nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[o+i,r+a],zoomTransform:({centerY:o,scale:r})=>`translate(0,${o}) scale(${r})`,diagonal:this.hdiagonal.bind(this),swap:o=>{const r=o.x;o.x=o.y,o.y=r},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o},${r-a/2})`},top:{nodeLeftX:o=>-o.width/2,nodeRightX:o=>o.width/2,nodeTopY:o=>0,nodeBottomY:o=>o.height,nodeJoinX:o=>o.x-o.width/2,nodeJoinY:o=>o.y+o.height,linkJoinX:o=>o.x,linkJoinY:o=>o.y+o.height,linkCompactXStart:o=>o.x+(o.compactEven?o.width/2:-o.width/2),linkCompactYStart:o=>o.y+o.height/2,compactLinkMidX:(o,r)=>o.firstCompactNode.x+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,compactLinkMidY:o=>o.firstCompactNode.y,compactDimension:{sizeColumn:o=>o.width,sizeRow:o=>o.height,reverse:o=>o},linkX:o=>o.x,linkY:o=>o.y,linkParentX:o=>o.parent.x,linkParentY:o=>o.parent.y+o.parent.height,buttonX:o=>o.width/2,buttonY:o=>o.height,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s})=>`translate(${s},${r}) scale(${a})`,nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l,compactViewIndex:c})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[r+i,o+a],zoomTransform:({centerX:o,scale:r})=>`translate(${o},0}) scale(${r})`,diagonal:this.diagonal.bind(this),swap:o=>{},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o-i/2},${r})`},bottom:{nodeLeftX:o=>-o.width/2,nodeRightX:o=>o.width/2,nodeTopY:o=>-o.height,nodeBottomY:o=>0,nodeJoinX:o=>o.x-o.width/2,nodeJoinY:o=>o.y-o.height-o.height,linkJoinX:o=>o.x,linkJoinY:o=>o.y-o.height,linkCompactXStart:o=>o.x+(o.compactEven?o.width/2:-o.width/2),linkCompactYStart:o=>o.y-o.height/2,compactLinkMidX:(o,r)=>o.firstCompactNode.x+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,compactLinkMidY:o=>o.firstCompactNode.y,linkX:o=>o.x,linkY:o=>o.y,compactDimension:{sizeColumn:o=>o.width,sizeRow:o=>o.height,reverse:o=>o},linkParentX:o=>o.parent.x,linkParentY:o=>o.parent.y-o.parent.height,buttonX:o=>o.width/2,buttonY:o=>0,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s,chartHeight:l})=>`translate(${s},${l-r}) scale(${a})`,nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[r+i,o+a],zoomTransform:({centerX:o,scale:r})=>`translate(${o},0}) scale(${r})`,diagonal:this.diagonal.bind(this),swap:o=>{o.y=-o.y},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o-i/2},${r-a})`},right:{nodeLeftX:o=>-o.width,nodeRightX:o=>0,nodeTopY:o=>-o.height/2,nodeBottomY:o=>o.height/2,nodeJoinX:o=>o.x-o.width-o.width,nodeJoinY:o=>o.y-o.height/2,linkJoinX:o=>o.x-o.width,linkJoinY:o=>o.y,linkX:o=>o.x,linkY:o=>o.y,linkParentX:o=>o.parent.x-o.parent.width,linkParentY:o=>o.parent.y,buttonX:o=>0,buttonY:o=>o.height/2,linkCompactXStart:o=>o.x-o.width/2,linkCompactYStart:o=>o.y+(o.compactEven?o.height/2:-o.height/2),compactLinkMidX:(o,r)=>o.firstCompactNode.x,compactLinkMidY:(o,r)=>o.firstCompactNode.y+o.firstCompactNode.flexCompactDim[0]/4+r.compactMarginPair(o)/4,centerTransform:({root:o,rootMargin:r,centerY:i,scale:a,centerX:s,chartWidth:l})=>`translate(${l-r},${i}) scale(${a})`,nodeFlexSize:({height:o,width:r,siblingsMargin:i,childrenMargin:a,state:s,node:l})=>s.compact&&l.flexCompactDim?[l.flexCompactDim[0],l.flexCompactDim[1]]:[o+i,r+a],compactDimension:{sizeColumn:o=>o.height,sizeRow:o=>o.width,reverse:o=>o.slice().reverse()},zoomTransform:({centerY:o,scale:r})=>`translate(0,${o}) scale(${r})`,diagonal:this.hdiagonal.bind(this),swap:o=>{const r=o.x;o.x=-o.y,o.y=r},nodeUpdateTransform:({x:o,y:r,width:i,height:a})=>`translate(${o-i},${r-a/2})`}}};this.getChartState=()=>e,Object.keys(e).forEach(o=>{this[o]=function(r){if(arguments.length)e[o]=r;else return e[o];return this}}),this.initializeEnterExitUpdatePattern()}initializeEnterExitUpdatePattern(){Xt.selection.prototype.patternify=function(e){var o=this,r=e.selector,i=e.tag,a=e.data||[r],s=o.selectAll("."+r).data(a,(l,c)=>typeof l=="object"&&l.id?l.id:c);return s.exit().remove(),s=s.enter().append(i).merge(s),s.attr("class",r),s}}getNodeChildren({data:e,children:o,_children:r},i){return i.push(e),o&&o.forEach(a=>{this.getNodeChildren(a,i)}),r&&r.forEach(a=>{this.getNodeChildren(a,i)}),i}initialZoom(e){const o=this.getChartState();return o.lastTransform.k=e,this}render(){const e=this.getChartState();if(!e.data||e.data.length==0)return console.log("ORG CHART - Data is empty"),e.container&&(Ue(e.container).select(".nodes-wrapper").remove(),Ue(e.container).select(".links-wrapper").remove(),Ue(e.container).select(".connections-wrapper").remove()),this;const o=Xt.select(e.container),r=o.node().getBoundingClientRect();r.width>0&&(e.svgWidth=r.width);const i={id:`ID${Math.floor(Math.random()*1e6)}`,chartWidth:e.svgWidth,chartHeight:e.svgHeight};if(e.calc=i,i.centerX=i.chartWidth/2,i.centerY=i.chartHeight/2,e.firstDraw){const l={zoom:null};l.zoom=e.createZoom().clickDistance(10).on("start",(c,d)=>e.onZoomStart(c)).on("end",(c,d)=>e.onZoomEnd(c)).on("zoom",(c,d)=>{e.onZoom(c),this.zoomed(c,d)}).scaleExtent(e.scaleExtent),e.zoomBehavior=l.zoom}e.flexTreeLayout=Oc({nodeSize:l=>{const c=e.nodeWidth(l),d=e.nodeHeight(l),u=e.siblingsMargin(l),h=e.childrenMargin(l);return e.layoutBindings[e.layout].nodeFlexSize({state:e,node:l,width:c,height:d,siblingsMargin:u,childrenMargin:h})}}).spacing((l,c)=>l.parent==c.parent?0:e.neighbourMargin(l,c)),this.setLayouts({expandNodesFirst:!1});const a=o.patternify({tag:"svg",selector:"svg-chart-container"}).attr("width",e.svgWidth).attr("height",e.svgHeight).attr("font-family",e.defaultFont);e.firstDraw&&a.call(e.zoomBehavior).on("dblclick.zoom",null).attr("cursor","move"),e.svg=a;const s=a.patternify({tag:"g",selector:"chart"});return e.centerG=s.patternify({tag:"g",selector:"center-group"}),e.linksWrapper=e.centerG.patternify({tag:"g",selector:"links-wrapper"}),e.nodesWrapper=e.centerG.patternify({tag:"g",selector:"nodes-wrapper"}),e.connectionsWrapper=e.centerG.patternify({tag:"g",selector:"connections-wrapper"}),e.defsWrapper=a.patternify({tag:"g",selector:"defs-wrapper"}),e.firstDraw&&e.centerG.attr("transform",()=>e.layoutBindings[e.layout].centerTransform({centerX:i.centerX,centerY:i.centerY,scale:e.lastTransform.k,rootMargin:e.rootMargin,root:e.root,chartHeight:i.chartHeight,chartWidth:i.chartWidth})),e.chart=s,this.update(e.root),Xt.select(window).on(`resize.${e.id}`,()=>{const l=Xt.select(e.container).node().getBoundingClientRect();e.svg.attr("width",l.width)}),e.firstDraw&&(e.firstDraw=!1),this}addNode(e){const o=this.getChartState();if(e&&(o.parentNodeId(e)==null||o.parentNodeId(e)==o.nodeId(e))&&o.data.length==0)return o.data.push(e),this.render(),this;const r=o.generateRoot(o.data).descendants(),i=r.filter(({data:a})=>o.nodeId(a).toString()===o.nodeId(e).toString())[0];return r.filter(({data:a})=>o.nodeId(a).toString()===o.parentNodeId(e).toString())[0],i?(console.log(`ORG CHART - ADD - Node with id "${o.nodeId(e)}" already exists in tree`),this):(e._centered&&!e._expanded&&(e._expanded=!0),o.data.push(e),this.updateNodesState(),this)}removeNode(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(({data:i})=>o.nodeId(i)==e)[0];return r?(r.descendants().forEach(i=>i.data._filteredOut=!0),o.data=o.data.filter(i=>!i._filteredOut),o.data.length==0?this.render():this.updateNodesState.bind(this)(),this):(console.log(`ORG CHART - REMOVE - Node with id "${e}" not found in the tree`),this)}groupBy(e,o,r){const i={};return e.forEach(a=>{const s=o(a);i[s]||(i[s]=[]),i[s].push(a)}),Object.keys(i).forEach(a=>{i[a]=r(i[a])}),Object.entries(i)}calculateCompactFlexDimensions(e){const o=this.getChartState();e.eachBefore(r=>{r.firstCompact=null,r.compactEven=null,r.flexCompactDim=null,r.firstCompactNode=null}),e.eachBefore(r=>{if(r.children&&r.children.length>1){const i=r.children.filter(u=>!u.children);if(i.length<2)return;i.forEach((u,h)=>{h||(u.firstCompact=!0),h%2?u.compactEven=!1:u.compactEven=!0,u.row=Math.floor(h/2)});const a=Xt.max(i.filter(u=>u.compactEven),o.layoutBindings[o.layout].compactDimension.sizeColumn),s=Xt.max(i.filter(u=>!u.compactEven),o.layoutBindings[o.layout].compactDimension.sizeColumn),l=Math.max(a,s)*2,c=this.groupBy(i,u=>u.row,u=>Xt.max(u,h=>o.layoutBindings[o.layout].compactDimension.sizeRow(h)+o.compactMarginBetween(h))),d=Xt.sum(c.map(u=>u[1]));i.forEach(u=>{u.firstCompactNode=i[0],u.firstCompact?u.flexCompactDim=[l+o.compactMarginPair(u),d-o.compactMarginBetween(u)]:u.flexCompactDim=[0,0]}),r.flexCompactDim=null}})}calculateCompactFlexPositions(e){const o=this.getChartState();e.eachBefore(r=>{if(r.children){const i=r.children.filter(u=>u.flexCompactDim),a=i[0];if(!a)return;i.forEach((u,h,p)=>{h==0&&(a.x-=a.flexCompactDim[0]/2),h&h%2-1?u.x=a.x+a.flexCompactDim[0]*.25-o.compactMarginPair(u)/4:h&&(u.x=a.x+a.flexCompactDim[0]*.75+o.compactMarginPair(u)/4)});const s=a.x+a.flexCompactDim[0]*.5;a.x=a.x+a.flexCompactDim[0]*.25-o.compactMarginPair(a)/4;const l=r.x-s;Math.abs(l)<10&&i.forEach(u=>u.x+=l);const c=this.groupBy(i,u=>u.row,u=>Xt.max(u,h=>o.layoutBindings[o.layout].compactDimension.sizeRow(h))),d=Xt.cumsum(c.map(u=>u[1]+o.compactMarginBetween(u)));i.forEach((u,h)=>{u.row?u.y=a.y+d[u.row-1]:u.y=a.y})}})}update({x0:e,y0:o,x:r=0,y:i=0,width:a,height:s}){const l=this.getChartState();l.calc,l.compact&&this.calculateCompactFlexDimensions(l.root);const c=l.flexTreeLayout(l.root);l.compact&&this.calculateCompactFlexPositions(l.root);const d=c.descendants(),u=c.descendants().slice(1);d.forEach(l.layoutBindings[l.layout].swap);const h=l.connections,p={};l.allNodes.forEach(O=>p[l.nodeId(O.data)]=O);const m={};d.forEach(O=>m[l.nodeId(O.data)]=O),h.forEach(O=>{const G=p[O.from],H=p[O.to];O._source=G,O._target=H});const y=h.filter(O=>m[O.from]&&m[O.to]),_=l.defs.bind(this)(l,y),C=l.defsWrapper.html();_!==C&&l.defsWrapper.html(_);const A=l.linksWrapper.selectAll("path.link").data(u,O=>l.nodeId(O.data)),T=A.enter().insert("path","g").attr("class","link").attr("d",O=>{const G=l.layoutBindings[l.layout].linkJoinX({x:e,y:o,width:a,height:s}),H=l.layoutBindings[l.layout].linkJoinY({x:e,y:o,width:a,height:s}),M={x:G,y:H};return l.layoutBindings[l.layout].diagonal(M,M,M)}).merge(A);T.attr("fill","none"),this.isEdge()?T.style("display",O=>O.data._pagingButton?"none":"auto"):T.attr("display",O=>O.data._pagingButton?"none":"auto"),T.each(l.linkUpdate),T.transition().duration(l.duration).attr("d",O=>{const G=l.compact&&O.flexCompactDim?{x:l.layoutBindings[l.layout].compactLinkMidX(O,l),y:l.layoutBindings[l.layout].compactLinkMidY(O,l)}:{x:l.layoutBindings[l.layout].linkX(O),y:l.layoutBindings[l.layout].linkY(O)},H={x:l.layoutBindings[l.layout].linkParentX(O),y:l.layoutBindings[l.layout].linkParentY(O)},M=l.compact&&O.flexCompactDim?{x:l.layoutBindings[l.layout].linkCompactXStart(O),y:l.layoutBindings[l.layout].linkCompactYStart(O)}:G;return l.layoutBindings[l.layout].diagonal(G,H,M,{sy:l.linkYOffset})}),A.exit().transition().duration(l.duration).attr("d",O=>{const G=l.layoutBindings[l.layout].linkJoinX({x:r,y:i,width:a,height:s}),H=l.layoutBindings[l.layout].linkJoinY({x:r,y:i,width:a,height:s}),M={x:G,y:H};return l.layoutBindings[l.layout].diagonal(M,M,null,{sy:l.linkYOffset})}).remove();const V=l.connectionsWrapper.selectAll("path.connection").data(y),B=V.enter().insert("path","g").attr("class","connection").attr("d",O=>{const G=l.layoutBindings[l.layout].linkJoinX({x:e,y:o,width:a,height:s}),H=l.layoutBindings[l.layout].linkJoinY({x:e,y:o,width:a,height:s}),M={x:G,y:H};return l.layoutBindings[l.layout].diagonal(M,M,null,{sy:l.linkYOffset})}).merge(V);B.attr("fill","none"),B.transition().duration(l.duration).attr("d",O=>{const G=l.layoutBindings[l.layout].linkX({x:O._source.x,y:O._source.y,width:O._source.width,height:O._source.height}),H=l.layoutBindings[l.layout].linkY({x:O._source.x,y:O._source.y,width:O._source.width,height:O._source.height}),M=l.layoutBindings[l.layout].linkJoinX({x:O._target.x,y:O._target.y,width:O._target.width,height:O._target.height}),U=l.layoutBindings[l.layout].linkJoinY({x:O._target.x,y:O._target.y,width:O._target.width,height:O._target.height});return l.linkGroupArc({source:{x:G,y:H},target:{x:M,y:U}})}),B.each(l.connectionsUpdate),V.exit().transition().duration(l.duration).attr("opacity",0).remove();const Z=l.nodesWrapper.selectAll("g.node").data(d,({data:O})=>l.nodeId(O)),W=Z.enter().append("g").attr("class","node").attr("transform",O=>{if(O==l.root)return`translate(${e},${o})`;const G=l.layoutBindings[l.layout].nodeJoinX({x:e,y:o,width:a,height:s}),H=l.layoutBindings[l.layout].nodeJoinY({x:e,y:o,width:a,height:s});return`translate(${G},${H})`}).attr("cursor","pointer").on("click.node",(O,G)=>{const{data:H}=G;if(![...O.srcElement.classList].includes("node-button-foreign-object")){if([...O.srcElement.classList].includes("paging-button-wrapper")){this.loadPagingNodes(G);return}if(!H._pagingButton){l.onNodeClick(G);return}console.log("event fired, no handlers")}}).on("keydown.node",(O,G)=>{const{data:H}=G;if(O.key==="Enter"||O.key===" "||O.key==="Spacebar"){if([...O.srcElement.classList].includes("node-button-foreign-object"))return;if([...O.srcElement.classList].includes("paging-button-wrapper")){this.loadPagingNodes(G);return}(O.key==="Enter"||O.key===" "||O.key==="Spacebar")&&this.onButtonClick(O,G)}});W.each(l.nodeEnter),W.patternify({tag:"rect",selector:"node-rect",data:O=>[O]});const rt=W.merge(Z).style("font","12px sans-serif");rt.patternify({tag:"foreignObject",selector:"node-foreign-object",data:O=>[O]}).style("overflow","visible").patternify({tag:"xhtml:div",selector:"node-foreign-object-div",data:O=>[O]}),this.restyleForeignObjectElements();const ct=W.patternify({tag:"g",selector:"node-button-g",data:O=>[O]}).on("click",(O,G)=>this.onButtonClick(O,G)).on("keydown",(O,G)=>{(O.key==="Enter"||O.key===" "||O.key==="Spacebar")&&this.onButtonClick(O,G)});ct.patternify({tag:"rect",selector:"node-button-rect",data:O=>[O]}).attr("opacity",0).attr("pointer-events","all").attr("width",O=>l.nodeButtonWidth(O)).attr("height",O=>l.nodeButtonHeight(O)).attr("x",O=>l.nodeButtonX(O)).attr("y",O=>l.nodeButtonY(O)),ct.patternify({tag:"foreignObject",selector:"node-button-foreign-object",data:O=>[O]}).attr("width",O=>l.nodeButtonWidth(O)).attr("height",O=>l.nodeButtonHeight(O)).attr("x",O=>l.nodeButtonX(O)).attr("y",O=>l.nodeButtonY(O)).style("overflow","visible").patternify({tag:"xhtml:div",selector:"node-button-div",data:O=>[O]}).style("pointer-events","none").style("display","flex").style("width","100%").style("height","100%"),rt.transition().attr("opacity",0).duration(l.duration).attr("transform",({x:O,y:G,width:H,height:M})=>l.layoutBindings[l.layout].nodeUpdateTransform({x:O,y:G,width:H,height:M})).attr("opacity",1),rt.select(".node-rect").attr("width",({width:O})=>O).attr("height",({height:O})=>O).attr("x",({width:O})=>0).attr("y",({height:O})=>0).attr("cursor","pointer").attr("rx",3).attr("fill",l.nodeDefaultBackground),rt.select(".node-button-g").attr("transform",({data:O,width:G,height:H})=>{const M=l.layoutBindings[l.layout].buttonX({width:G,height:H}),U=l.layoutBindings[l.layout].buttonY({width:G,height:H});return`translate(${M},${U})`}).attr("display",({data:O})=>O._directSubordinates>0?null:"none").attr("opacity",({data:O,children:G,_children:H})=>O._pagingButton?0:G||H?1:0),rt.select(".node-button-foreign-object .node-button-div").html(O=>l.buttonContent({node:O,state:l})),rt.select(".node-button-text").attr("text-anchor","middle").attr("alignment-baseline","middle").attr("font-size",({children:O})=>O?40:26).text(({children:O})=>O?"-":"+").attr("y",this.isEdge()?10:0),rt.each(l.nodeUpdate);const it=Z.exit();it.each(l.nodeExit);const et=it.data().reduce((O,G)=>O.depth{let{x:G,y:H,width:M,height:U}=et.parent||{};const z=l.layoutBindings[l.layout].nodeJoinX({x:G,y:H,width:M,height:U}),Q=l.layoutBindings[l.layout].nodeJoinY({x:G,y:H,width:M,height:U});return`translate(${z},${Q})`}).on("end",function(){Xt.select(this).remove()}).attr("opacity",0),d.forEach(O=>{O.x0=O.x,O.y0=O.y});const ut=l.allNodes.filter(O=>O.data._centered)[0];if(ut){let O=[ut];ut.data._centeredWithDescendants&&(l.compact?O=ut.descendants().filter((G,H)=>H<7):O=ut.descendants().filter((G,H,M)=>{const U=Math.round(M.length/2),z=2;return M.length%2?H>U-z&&HU-z&&Ho).attr("height",({height:o})=>o).attr("x",({width:o})=>0).attr("y",({height:o})=>0),e.svg.selectAll(".node-foreign-object-div").style("width",({width:o})=>`${o}px`).style("height",({height:o})=>`${o}px`).html(function(o,r,i){return o.data._pagingButton?`
${e.pagingButton(o,r,i,e)}
`:e.nodeContent.bind(this)(o,r,i,e)})}onButtonClick(e,o){const r=this.getChartState();o.data._pagingButton||(r.setActiveNodeCentered&&(o.data._centered=!0,o.data._centeredWithDescendants=!0),o.children?(o._children=o.children,o.children=null,this.setExpansionFlagToChildren(o,!1)):(o.children=o._children,o._children=null,o.children&&o.children.forEach(({data:i})=>i._expanded=!0)),this.update(o),e.stopPropagation(),r.onExpandOrCollapse(o))}setExpansionFlagToChildren({data:e,children:o,_children:r},i){e._expanded=i,o&&o.forEach(a=>{this.setExpansionFlagToChildren(a,i)}),r&&r.forEach(a=>{this.setExpansionFlagToChildren(a,i)})}expandSomeNodes(e){if(e.data._expanded){let o=e.parent;for(;o&&o._children;)o.children=o._children,o._children=null,o=o.parent}e._children&&e._children.forEach(o=>this.expandSomeNodes(o)),e.children&&e.children.forEach(o=>this.expandSomeNodes(o))}updateNodesState(){const e=this.getChartState();this.setLayouts({expandNodesFirst:!0}),this.update(e.root)}setLayouts({expandNodesFirst:e=!0}){const o=this.getChartState();o.generateRoot=Xt.stratify().id(a=>o.nodeId(a)).parentId(a=>o.parentNodeId(a)),o.root=o.generateRoot(o.data);const r=o.root.descendants();o.initialExpandLevel>1&&r.length>0&&(r.forEach(a=>{a.depth<=o.initialExpandLevel&&(a.data._expanded=!0)}),o.initialExpandLevel=1);const i={};o.root.descendants().filter(a=>a.children).filter(a=>!a.data._pagingStep).forEach(a=>{a.data._pagingStep=o.minPagingVisibleNodes(a)}),o.root.eachBefore((a,s)=>{a.data._directSubordinatesPaging=a.children?a.children.length:0,a.children&&a.children.forEach((l,c)=>{if(l.data._pagingButton=!1,c>a.data._pagingStep&&(i[l.id]=!0),c===a.data._pagingStep&&a.children.length-1>a.data._pagingStep&&(l.data._pagingButton=!0),i[l.parent.id]&&(i[l.id]=!0),l.data._expanded||l.data._centered||l.data._highlighted||l.data._upToTheRootHighlighted){let d=l;for(;d&&(i[d.id]||d.data._pagingButton);)i[d.id]=!1,d.data._pagingButton&&(d.data._pagingButton=!1,d.parent.children.forEach(u=>{u.data._expanded=!0,i[u.id]=!1})),d=d.parent}})}),o.root=Xt.stratify().id(a=>o.nodeId(a)).parentId(a=>o.parentNodeId(a))(o.data.filter(a=>i[a.id]!==!0)),o.root.each((a,s,l)=>{let c=a._hierarchyHeight||a.height,d=o.nodeWidth(a),u=o.nodeHeight(a);Object.assign(a,{width:d,height:u,_hierarchyHeight:c})}),o.root.x0=0,o.root.y0=0,o.allNodes=o.root.descendants(),o.allNodes.forEach(a=>{Object.assign(a.data,{_directSubordinates:a.children?a.children.length:0,_totalSubordinates:a.descendants().length-1})}),o.root.children&&(e&&o.root.children.forEach(this.expand),o.root.children.forEach(a=>this.collapse(a)),o.initialExpandLevel==0&&(o.root._children=o.root.children,o.root.children=null),[o.root].forEach(a=>this.expandSomeNodes(a)))}collapse(e){e.children&&(e._children=e.children,e._children.forEach(o=>this.collapse(o)),e.children=null)}expand(e){e._children&&(e.children=e._children,e.children.forEach(o=>this.expand(o)),e._children=null)}zoomed(e,o){const r=this.getChartState(),i=r.chart,a=e.transform;r.lastTransform=a,i.attr("transform",a),this.isEdge()&&this.restyleForeignObjectElements()}zoomTreeBounds({x0:e,x1:o,y0:r,y1:i,params:a={animate:!0,scale:!0,onCompleted:()=>{}}}){const{centerG:s,svgWidth:l,svgHeight:c,svg:d,zoomBehavior:u,duration:h,lastTransform:p}=this.getChartState();let m=Math.min(8,.9/Math.max((o-e)/l,(i-r)/c)),y=Xt.zoomIdentity.translate(l/2,c/2);y=y.scale(a.scale?m:p.k),y=y.translate(-(e+o)/2,-(r+i)/2),d.transition().duration(a.animate?h:0).call(u.transform,y),s.transition().duration(a.animate?h:0).attr("transform","translate(0,0)").on("end",function(){a.onCompleted&&a.onCompleted()})}fit({animate:e=!0,nodes:o,scale:r=!0,onCompleted:i=()=>{}}={}){const a=this.getChartState(),{root:s}=a;let l=o||s.descendants();const c=Xt.min(l,p=>p.x+a.layoutBindings[a.layout].nodeLeftX(p)),d=Xt.max(l,p=>p.x+a.layoutBindings[a.layout].nodeRightX(p)),u=Xt.min(l,p=>p.y+a.layoutBindings[a.layout].nodeTopY(p)),h=Xt.max(l,p=>p.y+a.layoutBindings[a.layout].nodeBottomY(p));return this.zoomTreeBounds({params:{animate:e,scale:r,onCompleted:i},x0:c-50,x1:d+50,y0:u-50,y1:h+50}),this}loadPagingNodes(e){const o=this.getChartState();e.data._pagingButton=!1;const r=e.parent.data._pagingStep,i=o.pagingStep(e.parent),a=r+i;e.parent.data._pagingStep=a,this.updateNodesState()}setExpanded(e,o=!0){const r=this.getChartState(),i=r.allNodes.filter(({data:a})=>r.nodeId(a)==e)[0];if(!i)return console.log(`ORG CHART - ${o?"EXPAND":"COLLAPSE"} - Node with id (${e}) not found in the tree`),this;if(i.data._expanded=o,o==!1){const a=i.parent||{descendants:()=>[]};a.descendants().filter(s=>s!=a).forEach(s=>s.data._expanded=!1)}return this}setCentered(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(({data:i})=>o.nodeId(i).toString()==e.toString())[0];return r?(r.ancestors().forEach(i=>i.data._expanded=!0),r.data._centered=!0,r.data._expanded=!0,this):(console.log(`ORG CHART - CENTER - Node with id (${e}) not found in the tree`),this)}setHighlighted(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(i=>o.nodeId(i.data).toString()===e.toString())[0];return r?(r.ancestors().forEach(i=>i.data._expanded=!0),r.data._highlighted=!0,r.data._expanded=!0,r.data._centered=!0,this):(console.log(`ORG CHART - HIGHLIGHT - Node with id (${e}) not found in the tree`),this)}setUpToTheRootHighlighted(e){const o=this.getChartState(),r=o.generateRoot(o.data).descendants().filter(i=>o.nodeId(i.data).toString()===e.toString())[0];return r?(r.ancestors().forEach(i=>i.data._expanded=!0),r.data._upToTheRootHighlighted=!0,r.data._expanded=!0,r.ancestors().forEach(i=>i.data._upToTheRootHighlighted=!0),this):(console.log(`ORG CHART - HIGHLIGHTROOT - Node with id (${e}) not found in the tree`),this)}clearHighlighting(){const e=this.getChartState();return e.allNodes.forEach(o=>{o.data._highlighted=!1,o.data._upToTheRootHighlighted=!1}),this.update(e.root),this}fullscreen(e){const o=this.getChartState(),r=Xt.select(e||o.container).node();Xt.select(document).on("fullscreenchange."+o.id,function(i){(document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement)==r?setTimeout(a=>{o.svg.attr("height",window.innerHeight-40)},500):o.svg.attr("height",o.svgHeight)}),r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen()}zoomIn(){const{svg:e,zoomBehavior:o}=this.getChartState();e.transition().call(o.scaleBy,1.3)}zoomOut(){const{svg:e,zoomBehavior:o}=this.getChartState();e.transition().call(o.scaleBy,.78)}toDataURL(e,o){var r=new XMLHttpRequest;r.onload=function(){var i=new FileReader;i.onloadend=function(){o(i.result)},i.readAsDataURL(r.response)},r.open("GET",e),r.responseType="blob",r.send()}exportImg({full:e=!1,scale:o=3,onLoad:r=s=>s,save:i=!0,backgroundColor:a="#FAFAFA"}={}){const s=this,l=this.getChartState(),{svg:c,root:d}=l;let u=0;const h=c.selectAll("img");let p=h.size();const m=()=>{JSON.parse(JSON.stringify(s.lastTransform()));const y=s.duration();e&&s.fit();const{svg:_}=s.getChartState();setTimeout(C=>{s.downloadImage({node:_.node(),scale:o,isSvg:!1,backgroundColor:a,onAlreadySerialized:A=>{s.update(d)},imageName:l.imageName,onLoad:r,save:i})},e?y+10:0)};p>0?h.each(function(){s.toDataURL(this.src,y=>{this.src=y,++u==p&&m()})}):m()}exportSvg(){const{svg:e,imageName:o}=this.getChartState();return this.downloadImage({imageName:o,node:e.node(),scale:3,isSvg:!0}),this}expandAll(){const{allNodes:e,root:o,data:r}=this.getChartState();return r.forEach(i=>i._expanded=!0),this.render(),this}collapseAll(){const{allNodes:e,root:o}=this.getChartState();return e.forEach(r=>r.data._expanded=!1),this.initialExpandLevel(0),this.render(),this}downloadImage({node:e,scale:o=2,imageName:r="graph",isSvg:i=!1,save:a=!0,backgroundColor:s="#FAFAFA",onAlreadySerialized:l=d=>{},onLoad:c=d=>{}}){const d=e;function u(_,C){var A=document.createElement("a");typeof A.download=="string"?(document.body.appendChild(A),A.download=C,A.href=_,A.click(),document.body.removeChild(A)):location.replace(_)}function h(_){const C="http://www.w3.org/2000/xmlns/",A="http://www.w3.org/1999/xlink",T="http://www.w3.org/2000/svg";_=_.cloneNode(!0);const V=window.location.href+"#",B=document.createTreeWalker(_,NodeFilter.SHOW_ELEMENT,null,!1);for(;B.nextNode();)for(const Z of B.currentNode.attributes)Z.value.includes(V)&&(Z.value=Z.value.replace(V,"#"));return _.setAttributeNS(C,"xmlns",T),_.setAttributeNS(C,"xmlns:xlink",A),new XMLSerializer().serializeToString(_)}if(i){let _=h(d);_=`\r `+_;var y="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(_);u(y,r+".svg"),l();return}const p=o,m=document.createElement("img");m.onload=function(){const _=document.createElement("canvas"),C=d.getBoundingClientRect();_.width=C.width*p,_.height=C.height*p;const A=_.getContext("2d");A.fillStyle=s,A.fillRect(0,0,C.width*p,C.height*p),A.drawImage(m,0,0,C.width*p,C.height*p);let T=_.toDataURL("image/png");c&&c(T),a&&u(T,r+".png")};var y="data:image/svg+xml; charset=utf8, "+encodeURIComponent(h(d));l(),m.src=y}getTextWidth(e,{fontSize:o=14,fontWeight:r=400,defaultFont:i="Helvetice",ctx:a}={}){return a.font=`${r||""} ${o}px ${i} `,a.measureText(e).width}clear(){const e=this.getChartState();Xt.select(window).on(`resize.${e.id}`,null),e.svg&&e.svg.selectAll("*").remove()}};const Ek={name:"ChartTemplate",components:{Avatar:Xn},props:{chartData:{type:Object,default:()=>{}},onAvatarClick:{type:Function,default:()=>{}}},computed:{selectedChart(){return this.$route.params.selectedChart}}},Mk={class:"org-chart-node"},Tk={class:"inner-box"},Ak={class:"main-container"},Ik={class:"fullName"},Ok={class:"title"},Lk={class:"description"},Dk={key:0},Rk={key:1};function Pk(e,o,r,i,a,s){const l=w("Avatar"),c=w("router-link");return f(),k("div",Mk,[D("div",Tk,[E(c,{to:{name:"contact",params:{selectedGroup:s.selectedChart,selectedContact:r.chartData.key}}},{default:S(()=>[E(l,{"disable-tooltip":!0,"display-name":r.chartData.fullName,"is-no-user":!0,size:60,url:r.chartData.photoUrl,class:"org-chart-node__avatar"},null,8,["display-name","url"])]),_:1},8,["to"]),o[0]||(o[0]=D("div",{class:"panel"},null,-1)),D("div",Ak,[D("h3",Ik,L(r.chartData.fullName),1),D("h4",Ok,L(r.chartData.title),1)]),D("div",Lk,[r.chartData._directSubordinates?(f(),k("p",Dk,L(e.t("contacts","Manages"))+": "+L(r.chartData._directSubordinates),1)):R("",!0),r.chartData._totalSubordinates?(f(),k("p",Rk,L(e.t("contacts","Oversees"))+": "+L(r.chartData._totalSubordinates),1)):R("",!0)])])])}const Vk=ot(Ek,[["render",Pk],["__scopeId","data-v-c955ad94"]]),Bk={name:"OrgChart",components:{NcSelect:Co},props:{data:{type:Array,default:()=>[]}},data(){return{chartReference:null,chart:0}},computed:{charts(){return this.data.map((e,o)=>{const r=e.find(i=>i.parentNodeId===null);return{id:o,label:r.org?`${r.org} (${r.fullName})`:r.fullName}}).sort((e,o)=>e.label.localeCompare(o.label,v0().replace("_","-"),{sensitivity:"base"}))},placeholder(){return t("contacts","Select chart …")}},watch:{data(){this.data[this.chart]?.length&&this.renderChart(this.data[this.chart])}},mounted(){this.data[this.chart]?.length&&this.renderChart(this.data[this.chart])},methods:{chartChanged(e){this.renderChart(this.data[e.id])},goToContact(e){this.$router.push({name:"contact",params:{selectedGroup:this.$route.params.selectedChart,selectedContact:e}})},renderChart(e){const o=this;this.chartReference||(this.chartReference=new Nk),this.chartReference.container(this.$refs.svgElementContainer).data(e).nodeWidth(()=>250).initialZoom(1).nodeHeight(()=>200).childrenMargin(()=>70).compactMarginBetween(()=>15).compactMarginPair(()=>80).nodeContent(()=>"").nodeUpdate(function(r){const i=this.querySelector(".node-foreign-object-div");if(i)if(r.data.rendered)i.appendChild(r.data.rendered);else{const a=wp(Vk,{chartData:r.data,onAvatarClick:l=>o.goToContact(l)});a.use(tc),a.mixin(kp);const s=document.createElement("div");a.mount(s),r.data.rendered=s,i.appendChild(s)}Ue(this).select(".inner-box").attr("class",a=>a.data._highlighted||a.data._upToTheRootHighlighted?"inner-box inner-box-highlight":"inner-box")}).linkUpdate(function(r){Ue(this).attr("stroke",()=>"var(--color-primary-element)").attr("stroke-width",i=>i.data._upToTheRootHighlighted?2:1),r.data._upToTheRootHighlighted&&Ue(this).raise()}).onNodeClick(r=>{this.chartReference.data().filter(i=>i.nodeId===r.id)[0]?._upToTheRootHighlighted?this.chartReference.clearHighlighting():(this.chartReference.clearHighlighting(),this.chartReference.setUpToTheRootHighlighted(r.id).render())}).render()}}},$k={class:"org-chart"},Hk={key:0,class:"org-chart__menu"},Uk={ref:"svgElementContainer",class:"org-chart__container"};function zk(e,o,r,i,a,s){const l=w("NcSelect");return f(),k("div",$k,[r.data.length>1?(f(),k("div",Hk,[D("h3",null,L(e.t("contacts","Chart"))+": ",1),E(l,{modelValue:a.chart,"onUpdate:modelValue":[o[0]||(o[0]=c=>a.chart=c),s.chartChanged],class:"chart-selection",disabled:r.data.length===1,options:s.charts,"allow-empty":!1,searchable:!1,placeholder:s.placeholder,"input-id":"select-chart-input",label:"label"},null,8,["modelValue","disabled","options","placeholder","onUpdate:modelValue"])])):R("",!0),D("div",Uk,null,512)])}const Gk=ot(Bk,[["render",zk]]),Fk={name:"ChartContent",components:{AppContent:mc,OrgChart:Gk},props:{contactsList:{type:Object,required:!0}},data(){return{data:[],searchQuery:""}},computed:{transformData(){const e={},o=Object.keys(this.contactsList).map(s=>{const[l,c]=Qe.from(s,"base64").toString("utf-8").split("~");return e[c]||(e[c]={}),e[c][l]=this.contactsList[s]}),r=[],i=o.filter(s=>s.managersName).reduce((s,l)=>{s.push(Ls(l));const c=e[l.addressbook.id][l.managersName];return c&&!c.managersName&&!r.some(d=>d.nodeId===c.uid)&&(s.push(Ls(c)),r.push(Ls(c))),s},[]),a=r.map(s=>Og(i,s));return console.debug("Org charts",a.map((s,l)=>s.map(c=>`list ${l} ${c.nodeId} (${c.fullName}) -> ${c.parentNodeId}`))),a}}};function Yk(e,o,r,i,a,s){const l=w("OrgChart"),c=w("AppContent");return f(),I(c,null,{default:S(()=>[E(l,{data:s.transformData},null,8,["data"])]),_:1})}const Xk=ot(Fk,[["render",Yk]]),Wk={name:"AccountGroupOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},jk=["aria-hidden","aria-label"],qk=["fill","width","height"],Zk={d:"M12,5A3.5,3.5 0 0,0 8.5,8.5A3.5,3.5 0 0,0 12,12A3.5,3.5 0 0,0 15.5,8.5A3.5,3.5 0 0,0 12,5M12,7A1.5,1.5 0 0,1 13.5,8.5A1.5,1.5 0 0,1 12,10A1.5,1.5 0 0,1 10.5,8.5A1.5,1.5 0 0,1 12,7M5.5,8A2.5,2.5 0 0,0 3,10.5C3,11.44 3.53,12.25 4.29,12.68C4.65,12.88 5.06,13 5.5,13C5.94,13 6.35,12.88 6.71,12.68C7.08,12.47 7.39,12.17 7.62,11.81C6.89,10.86 6.5,9.7 6.5,8.5C6.5,8.41 6.5,8.31 6.5,8.22C6.2,8.08 5.86,8 5.5,8M18.5,8C18.14,8 17.8,8.08 17.5,8.22C17.5,8.31 17.5,8.41 17.5,8.5C17.5,9.7 17.11,10.86 16.38,11.81C16.5,12 16.63,12.15 16.78,12.3C16.94,12.45 17.1,12.58 17.29,12.68C17.65,12.88 18.06,13 18.5,13C18.94,13 19.35,12.88 19.71,12.68C20.47,12.25 21,11.44 21,10.5A2.5,2.5 0 0,0 18.5,8M12,14C9.66,14 5,15.17 5,17.5V19H19V17.5C19,15.17 14.34,14 12,14M4.71,14.55C2.78,14.78 0,15.76 0,17.5V19H3V17.07C3,16.06 3.69,15.22 4.71,14.55M19.29,14.55C20.31,15.22 21,16.06 21,17.07V19H24V17.5C24,15.76 21.22,14.78 19.29,14.55M12,16C13.53,16 15.24,16.5 16.23,17H7.77C8.76,16.5 10.47,16 12,16Z"},Jk={key:0};function Kk(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-group-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",Zk,[r.title?(f(),k("title",Jk,L(r.title),1)):R("",!0)])],8,qk))],16,jk)}const es=ot(Wk,[["render",Kk]]),Qk={name:"AccountPlusOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},tS=["aria-hidden","aria-label"],eS=["fill","width","height"],nS={d:"M15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4M15,5.9C16.16,5.9 17.1,6.84 17.1,8C17.1,9.16 16.16,10.1 15,10.1A2.1,2.1 0 0,1 12.9,8A2.1,2.1 0 0,1 15,5.9M4,7V10H1V12H4V15H6V12H9V10H6V7H4M15,13C12.33,13 7,14.33 7,17V20H23V17C23,14.33 17.67,13 15,13M15,14.9C17.97,14.9 21.1,16.36 21.1,17V18.1H8.9V17C8.9,16.36 12,14.9 15,14.9Z"},oS={key:0};function rS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon account-plus-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",nS,[r.title?(f(),k("title",oS,L(r.title),1)):R("",!0)])],8,eS))],16,tS)}const Ef=ot(Qk,[["render",rS]]),iS={name:"BookOpenPageVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},aS=["aria-hidden","aria-label"],sS=["fill","width","height"],lS={d:"M19 2L14 6.5V17.5L19 13V2M6.5 5C4.55 5 2.45 5.4 1 6.5V21.16C1 21.41 1.25 21.66 1.5 21.66C1.6 21.66 1.65 21.59 1.75 21.59C3.1 20.94 5.05 20.5 6.5 20.5C8.45 20.5 10.55 20.9 12 22C13.35 21.15 15.8 20.5 17.5 20.5C19.15 20.5 20.85 20.81 22.25 21.56C22.35 21.61 22.4 21.59 22.5 21.59C22.75 21.59 23 21.34 23 21.09V6.5C22.4 6.05 21.75 5.75 21 5.5V19C19.9 18.65 18.7 18.5 17.5 18.5C15.8 18.5 13.35 19.15 12 20V6.5C10.55 5.4 8.45 5 6.5 5Z"},cS={key:0};function dS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon book-open-page-variant-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",lS,[r.title?(f(),k("title",cS,L(r.title),1)):R("",!0)])],8,sS))],16,aS)}const uS=ot(iS,[["render",dS]]),hS={name:"CalendarOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},pS=["aria-hidden","aria-label"],fS=["fill","width","height"],mS={d:"M12 12H17V17H12V12M19 3H18V1H16V3H8V1H6V3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M19 5V7H5V5H19M5 19V9H19V19H5Z"},gS={key:0};function yS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon calendar-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",mS,[r.title?(f(),k("title",gS,L(r.title),1)):R("",!0)])],8,fS))],16,pS)}const vS=ot(hS,[["render",yS]]),bS={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},_S=["aria-hidden","aria-label"],CS=["fill","width","height"],wS={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},kS={key:0};function SS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon check-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",wS,[r.title?(f(),k("title",kS,L(r.title),1)):R("",!0)])],8,CS))],16,_S)}const ns=ot(bS,[["render",SS]]),xS={name:"CogOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},NS=["aria-hidden","aria-label"],ES=["fill","width","height"],MS={d:"M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z"},TS={key:0};function AS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon cog-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",MS,[r.title?(f(),k("title",TS,L(r.title),1)):R("",!0)])],8,ES))],16,NS)}const Lc=ot(xS,[["render",AS]]),IS={name:"FileDocumentOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},OS=["aria-hidden","aria-label"],LS=["fill","width","height"],DS={d:"M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z"},RS={key:0};function PS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon file-document-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",DS,[r.title?(f(),k("title",RS,L(r.title),1)):R("",!0)])],8,LS))],16,OS)}const VS=ot(IS,[["render",PS]]),BS={name:"FolderOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},$S=["aria-hidden","aria-label"],HS=["fill","width","height"],US={d:"M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z"},zS={key:0};function GS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon folder-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",US,[r.title?(f(),k("title",zS,L(r.title),1)):R("",!0)])],8,HS))],16,$S)}const Dc=ot(BS,[["render",GS]]),FS={name:"LoginIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},YS=["aria-hidden","aria-label"],XS=["fill","width","height"],WS={d:"M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7M20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z"},jS={key:0};function qS(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon login-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",WS,[r.title?(f(),k("title",jS,L(r.title),1)):R("",!0)])],8,XS))],16,YS)}const ZS=ot(FS,[["render",qS]]),JS={name:"LogoutIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},KS=["aria-hidden","aria-label"],QS=["fill","width","height"],t5={d:"M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z"},e5={key:0};function n5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon logout-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",t5,[r.title?(f(),k("title",e5,L(r.title),1)):R("",!0)])],8,QS))],16,KS)}const Mf=ot(JS,[["render",n5]]),o5={name:"MessageOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},r5=["aria-hidden","aria-label"],i5=["fill","width","height"],a5={d:"M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H5.2L4 17.2V4H20V16Z"},s5={key:0};function l5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon message-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",a5,[r.title?(f(),k("title",s5,L(r.title),1)):R("",!0)])],8,i5))],16,r5)}const c5=ot(o5,[["render",l5]]),d5={name:"ViewDashboardIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},u5=["aria-hidden","aria-label"],h5=["fill","width","height"],p5={d:"M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z"},f5={key:0};function m5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon view-dashboard-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",p5,[r.title?(f(),k("title",f5,L(r.title),1)):R("",!0)])],8,h5))],16,u5)}const g5=ot(d5,[["render",m5]]),zr="enforce_password",Gr="password_single_enabled",Vi="password_single",y5={name:"CirclePasswordSettings",components:{CheckboxRadioSwitch:ja,NcButton:ue},props:{circle:{type:Object,required:!0}},data(){return{ENFORCE_PASSWORD_PROTECTION:zr,USE_UNIQUE_PASSWORD:Gr,UNIQUE_PASSWORD:Vi,loading:[],uniquePassword:"",uniquePasswordError:!1,showUniquePasswordInput:!1}},computed:{circleId(){return this.circle._data.id},enforcePasswordProtection(){const e=this.circle._data.settings[zr];return e==="1"||e==="true"},useUniquePassword(){const e=this.circle._data.settings[Gr];return e==="1"||e==="true"}},methods:{async changePasswordProtection(){this.loading.push(zr);try{const e=!this.enforcePasswordProtection;!e&&this.useUniquePassword&&await this.saveUseUniquePassword(!1),!e&&this.showUniquePasswordInput&&(this.showUniquePasswordInput=!1),await this.$store.dispatch("editCircleSetting",{circleId:this.circleId,setting:{setting:zr,value:e.toString()}})}finally{this.loading=this.loading.filter(e=>e!==zr)}},async changeUseUniquePassword(){if(!this.useUniquePassword){this.showUniquePasswordInput=!this.showUniquePasswordInput;return}await this.saveUseUniquePassword(!this.useUniquePassword)},async saveUseUniquePassword(e){this.loading.push(Gr);try{await this.$store.dispatch("editCircleSetting",{circleId:this.circleId,setting:{setting:Gr,value:e.toString()}}),e||(this.uniquePassword="",this.showUniquePasswordInput=!1)}finally{this.loading=this.loading.filter(o=>o!==Gr)}},async saveUniquePassword(){if(this.uniquePassword.length!==0){this.loading.push(Vi),this.uniquePasswordError=!1;try{this.useUniquePassword||await this.saveUseUniquePassword(!0),await this.$store.dispatch("editCircleSetting",{circleId:this.circleId,setting:{setting:Vi,value:this.uniquePassword}}),this.showUniquePasswordInput=!1,this.uniquePassword=""}catch{this.uniquePasswordError=!0}finally{this.loading=this.loading.filter(e=>e!==Vi)}}},onClickChangePassword(){this.showUniquePasswordInput=!0}}},v5={class:"circle-config"},b5={class:"circle-config__list"},_5={class:"unique-password"},C5=["disabled","placeholder"],w5={key:2,class:"unique-password-error"};function k5(e,o,r,i,a,s){const l=w("CheckboxRadioSwitch"),c=w("NcButton");return f(),k("ul",null,[D("li",v5,[D("ul",b5,[E(l,{"model-value":s.enforcePasswordProtection,loading:a.loading.includes(a.ENFORCE_PASSWORD_PROTECTION),disabled:a.loading.length>0,"wrapper-element":"li","onUpdate:modelValue":s.changePasswordProtection},{default:S(()=>[J(L(e.t("contacts","Enforce password protection on files shared to this team")),1)]),_:1},8,["model-value","loading","disabled","onUpdate:modelValue"]),s.enforcePasswordProtection?(f(),I(l,{key:0,"model-value":s.useUniquePassword||a.showUniquePasswordInput,loading:a.loading.includes(a.USE_UNIQUE_PASSWORD),disabled:a.loading.length>0,"wrapper-element":"li","onUpdate:modelValue":s.changeUseUniquePassword},{default:S(()=>[J(L(e.t("contacts","Use a unique password for all shares to this team")),1)]),_:1},8,["model-value","loading","disabled","onUpdate:modelValue"])):R("",!0),D("li",_5,[a.showUniquePasswordInput?(f(),k(bt,{key:0},[zn(D("input",{"onUpdate:modelValue":o[0]||(o[0]=d=>a.uniquePassword=d),disabled:a.loading.length>0,placeholder:e.t("contacts","Unique password …"),type:"text",onKeyup:o[1]||(o[1]=sc((...d)=>s.saveUniquePassword&&s.saveUniquePassword(...d),["enter"]))},null,40,C5),[[cc,a.uniquePassword]]),E(c,{variant:"tertiary-no-background",disabled:a.loading.length>0||a.uniquePassword.length===0,onClick:s.saveUniquePassword},{default:S(()=>[J(L(e.t("contacts","Save")),1)]),_:1},8,["disabled","onClick"])],64)):s.useUniquePassword?(f(),I(c,{key:1,class:"change-unique-password",onClick:s.onClickChangePassword},{default:S(()=>[J(L(e.t("contacts","Change unique password")),1)]),_:1},8,["onClick"])):R("",!0),a.uniquePasswordError?(f(),k("div",w5,L(e.t("contacts","Failed to save password. Please try again later.")),1)):R("",!0)])])])])}const S5=ot(y5,[["render",k5],["__scopeId","data-v-93191071"]]),x5={name:"ContentHeading",props:{loading:{type:Boolean,default:!1}}},N5={class:"app-content-heading"},E5={key:0,class:"app-content-heading__loader icon-loading-small"};function M5(e,o,r,i,a,s){return f(),k("h3",N5,[Pt(e.$slots,"default",{},void 0,!0),r.loading?(f(),k("div",E5)):R("",!0)])}const Tf=ot(x5,[["render",M5],["__scopeId","data-v-614dccab"]]),Rc={data(){return{copied:!1,copyLoading:!1,copySuccess:!1}},computed:{copyLinkIcon(){return this.copySuccess?"icon-checkmark":this.copyLoading?"icon-loading-small":"icon-public"}},methods:{async copyToClipboard(e){this.copyLoading=!0;try{await navigator.clipboard.writeText(e),this.copySuccess=!0,this.copied=!0,ei(t("contacts","Link copied to the clipboard"))}catch{this.copySuccess=!1,this.copied=!0,Ct(t("contacts","Could not copy link to the clipboard."))}finally{this.copyLoading=!1,setTimeout(()=>{this.copied=!1,this.copySuccess=!1},2e3)}}}},Pc={props:{circle:{type:up,required:!0}},mixins:[Rc],data(){return{loadingAction:!1,loadingJoin:!1}},computed:{copyButtonText(){return this.copied?this.copySuccess?t("contacts","Copied"):t("contacts","Could not copy"):t("contacts","Copy link")},circleUrl(){const e=this.$router.resolve(this.circle.router);return window.location.origin+e.href},joinButtonTitle(){return this.circle.requireJoinAccept?t("contacts","Request to join"):t("contacts","Join team")}},methods:{confirmLeaveCircle(){window.OC.dialogs.confirmDestructive(t("contacts",`You are about to leave {circle}. Are you sure?`,{circle:this.circle.displayName}),t("contacts","Please confirm team leave"),window.OC.dialogs.YES_NO_BUTTONS,this.leaveCircle,!0)},async leaveCircle(e){if(!e){this.logger.debug("Circle leave cancelled");return}this.loadingAction=!0;const o=this.circle.initiator;try{await this.$store.dispatch("deleteMemberFromCircle",{member:o,leave:!0}),this.circle.initiator=null}catch(r){console.error("Could not leave the circle",o,r),Ct(t("contacts","Could not leave the team {displayName}",this.circle))}finally{this.loadingAction=!1}},async joinCircle(){this.loadingJoin=!0;try{const e=await Dg(this.circle.id),o=new Rg(e,this.circle);this.circle.initiator=o,o.circle.addMember(o)}catch(e){Ct(t("contacts","Unable to join the team")),console.error("Unable to join the circle",e)}finally{this.loadingJoin=!1}},confirmDeleteCircle(){window.OC.dialogs.confirmDestructive(t("contacts",`You are about to delete {circle}. Are you sure?`,{circle:this.circle.displayName}),t("contacts","Please confirm team deletion"),window.OC.dialogs.YES_NO_BUTTONS,this.deleteCircle,!0)},async deleteCircle(e){if(!e){this.logger.debug("Circle deletion cancelled");return}this.loadingAction=!0;try{this.$store.dispatch("deleteCircle",this.circle.id)}catch{Ct(t("contacts","Unable to delete the team"))}finally{this.loadingAction=!1}},async confirmEnableFederationForCircle(){return await Lg({name:t("contacts","Confirm enabling federation"),text:t("contacts",`Enabling this will prevent {circle} from being a member of other teams. Are you sure?`,{circle:this.circle.displayName}),labelConfirm:t("contacts","Enable federation"),labelReject:t("contacts","Cancel"),severity:"warning"})?!0:(this.logger.debug("Enable federation cancelled"),!1)},async addMemberToCircle(){try{await this.$router.push(this.circle.router)}catch(e){console.error("Could not open circle member picker",e)}yr("contacts:circles:append",this.circle.id)}}},T5=Ne({name:"CircleSettings",components:{ContentHeading:Tf,CirclePasswordSettings:S5,IconDelete:Yn,IconLogout:Mf,NcButton:ue,NcCheckboxRadioSwitch:ja},mixins:[Pc],props:{circle:{type:Object,required:!0}},emits:["leave","delete","close-settings-popover"],setup(){return{t:Bo}},data(){return{PUBLIC_CIRCLE_CONFIG:Pg,loading:!1}},methods:{isChecked(e){return(this.circle.config&e)!==0},async onChange(e,o){if(this.logger.debug(`Circle config ${e} is set to ${o}`),o&&e===hp.FEDERATED&&(this.$emit("close-settings-popover"),!await this.confirmEnableFederationForCircle()))return;this.loading=e;const r=this.circle.config;o?e=r|e:e=r&~e;try{const i=await cl(this.circle.id,dl.Config,e);this.circle.config=i.config}catch(i){this.logger.error("Unable to edit circle config",{prevConfig:r,config:e,error:i}),Ct(Bo("contacts","An error happened during the config change"))}finally{this.loading=!1}}}}),A5={class:"circle-settings"},I5={class:"circle-config__list"};function O5(e,o,r,i,a,s){const l=w("ContentHeading"),c=w("NcCheckboxRadioSwitch"),d=w("CirclePasswordSettings"),u=w("IconLogout"),h=w("NcButton"),p=w("IconDelete");return f(),k("div",A5,[D("ul",null,[(f(!0),k(bt,null,Wt(e.PUBLIC_CIRCLE_CONFIG,(m,y)=>(f(),k("li",{key:y,class:"circle-config"},[E(l,{class:"circle-config__title"},{default:S(()=>[J(L(y),1)]),_:2},1024),D("ul",I5,[(f(!0),k(bt,null,Wt(m,(_,C)=>(f(),I(c,{key:"circle-config"+C,"model-value":e.isChecked(C),loading:e.loading===C,disabled:e.loading!==!1,"wrapper-element":"li","onUpdate:modelValue":A=>e.onChange(Number(C),A)},{default:S(()=>[J(L(_),1)]),_:2},1032,["model-value","loading","disabled","onUpdate:modelValue"]))),128))])]))),128))]),E(d,{circle:e.circle},null,8,["circle"]),e.circle.canLeave?(f(),I(h,{key:0,variant:"warning",onClick:o[0]||(o[0]=m=>e.$emit("leave"))},{icon:S(()=>[E(u,{size:16})]),default:S(()=>[J(" "+L(e.t("contacts","Leave team")),1)]),_:1})):R("",!0),e.circle.canDelete?(f(),I(h,{key:1,variant:"error",href:"#",onClick:o[1]||(o[1]=ce(m=>e.$emit("delete"),["prevent","stop"]))},{icon:S(()=>[E(p,{size:20})]),default:S(()=>[J(" "+L(e.t("contacts","Delete team")),1)]),_:1})):R("",!0)])}const L5=ot(T5,[["render",O5],["__scopeId","data-v-c76e33fa"]]),D5={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},R5=["aria-hidden","aria-label"],P5=["fill","width","height"],V5={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},B5={key:0};function $5(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon close-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",V5,[r.title?(f(),k("title",B5,L(r.title),1)):R("",!0)])],8,P5))],16,R5)}const H5=ot(D5,[["render",$5]]),U5={name:"TeamResourceButton",components:{NcButton:ue,NcNoteCard:za,NcPopover:fc,NcTextField:gc,CloseOutlineIcon:H5,CheckOutlineIcon:ns},props:{resourceType:{type:Object,required:!0},value:{type:String,default:""},isOpen:{type:Boolean,default:!1}},emits:["update:value","update:isOpen","create"],computed:{inputValue(){return this.value},isPopoverOpen:{get(){return this.isOpen},set(e){this.$emit("update:isOpen",e)}},canCreate(){if(this.resourceType.noInput)return this.resourceType.enabled!==!1;const e=this.inputValue;return typeof e=="string"&&e.trim().length>0&&this.resourceType.enabled!==!1}},methods:{openPopover(){this.resourceType.noInput?this.createResource():this.isPopoverOpen=!0},closePopover(){this.isPopoverOpen=!1},handlePopoverToggle(e){this.isPopoverOpen=e},updateInput(e){const o=typeof e=="string"?e:e?.target?.value||e?.value||"";this.$emit("update:value",o)},createResource(){if(this.canCreate)if(this.resourceType.noInput)this.$emit("create",{resourceType:this.resourceType,name:""});else{const e=this.inputValue,o=typeof e=="string"?e.trim():"";o&&this.$emit("create",{resourceType:this.resourceType,name:o})}}}},z5={key:0,class:"resource-creation-popover"},G5={class:"popover-content"},F5={class:"popover-actions"},Y5={key:0,class:"popover-helper-text"};function X5(e,o,r,i,a,s){const l=w("NcButton"),c=w("NcTextField"),d=w("CloseOutlineIcon"),u=w("CheckOutlineIcon"),h=w("NcNoteCard"),p=w("NcPopover");return f(),I(p,{shown:s.isPopoverOpen,"popup-role":"dialog","onUpdate:shown":s.handlePopoverToggle},{trigger:S(()=>[E(l,{variant:"secondary","aria-describedby":`tooltip-${r.resourceType.id}`,onClick:s.openPopover},{icon:S(()=>[Pt(e.$slots,"icon",{},void 0,!0)]),default:S(()=>[J(" "+L(r.resourceType.label),1)]),_:3},8,["aria-describedby","onClick"])]),default:S(()=>[r.resourceType.noInput?R("",!0):(f(),k("div",z5,[D("div",G5,[E(c,{"model-value":s.inputValue,placeholder:r.resourceType.placeholder,label:r.resourceType.inputLabel,"onUpdate:value":s.updateInput,onInput:s.updateInput},null,8,["model-value","placeholder","label","onUpdate:value","onInput"]),D("div",F5,[E(l,{variant:"secondary","aria-label":e.t("contacts","Close"),onClick:s.closePopover},{icon:S(()=>[E(d,{size:20})]),_:1},8,["aria-label","onClick"]),E(l,{variant:"primary","aria-label":e.t("contacts","Save"),disabled:!s.canCreate,onClick:s.createResource},{icon:S(()=>[E(u,{size:20})]),_:1},8,["aria-label","disabled","onClick"])])]),r.resourceType.helperText?(f(),k("div",Y5,[E(h,{type:"info"},{default:S(()=>[J(L(r.resourceType.helperText),1)]),_:1})])):R("",!0)]))]),_:3},8,["shown","onUpdate:shown"])}const W5=ot(U5,[["render",X5],["__scopeId","data-v-d459b596"]]),li=null,{min:Ro,max:rn,abs:nh,floor:j5}=Math,Af=(e,o,r)=>Ro(r,rn(o,e)),If=e=>[...e].sort((o,r)=>o-r),q5=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)},Il=()=>{let e;return[new Promise(o=>{e=o}),e]},Of=e=>{let o;return()=>(e&&(o=e(),e=void 0),o)},Qr=(e,o,r)=>{const i=r?"unshift":"push";for(let a=0;a{const r=e.t[o];return r===-1?e.o:r},Z5=(e,o,r)=>{const i=e.t[o]===-1;return e.t[o]=r,e.i=Ro(o,e.i),i},na=(e,o)=>{if(!e.l)return 0;if(e.i>=o)return e.u[o];e.i<0&&(e.u[0]=0,e.i=0);let r=e.i,i=e.u[r];for(;r{let a=r;for(;r<=i;){const s=j5((r+i)/2);na(e,s)<=o?(a=s,r=s+1):i=s-1}return Af(a,0,e.l-1)},oh=(e,o,r)=>{const i=o-e.l;return e.i=r?-1:Ro(o-1,e.i),e.l=o,i>0?(Qr(e.u,i),Qr(e.t,i,r),e.o*i):(e.u.splice(i),(r?e.t.splice(0,-i):e.t.splice(i)).reduce((a,s)=>a-(s===-1?e.o:s),0))},J5=e=>e.documentElement,K5=e=>e.ownerDocument,Q5=e=>e.defaultView,Df=Of(()=>!!/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>0),t4=Of(()=>"scrollBehavior"in J5(document).style),e4=(e,o=40,r=0,i,a=!1)=>{let s=!!r,l=1,c=0,d=0,u=0,h=0,p=0,m=0,y=0,_=0,C=li,A=[0,s?rn(r-1,0):-1],T=0,V=!1;const B=((H,M,U)=>({o:M,t:U?Qr(U.slice(0,Ro(H,U.length)),rn(0,H-U.length)):Qr([],H),l:H,i:-1,u:Qr([],H+1)}))(e,i?i[1]:o,i&&i[0]),Z=new Set,W=()=>u-d,rt=()=>W()+p+h,ct=(H,M)=>((U,z,Q,pt)=>{if(pt=Ro(pt,U.l-1),na(U,pt)<=z){const ft=er(U,Q,pt);return[er(U,z,pt,ft),ft]}{const ft=er(U,z,void 0,pt);return[ft,er(U,Q,ft)]}})(B,H,M,A[0]),it=()=>na(B,B.l),et=(H,M)=>{const U=na(B,H)-p;return M?it()-U-ut(H):U},ut=H=>Lf(B,H),O=(H,M=-1)=>B.t[H]===M,G=H=>{H&&(Df()&&y!==0||C&&_===1?p+=H:h+=H)};return{p:()=>{Z.clear()},m:()=>l,h:()=>(H=>[H.t.slice(),H.o])(B),v:(H=200)=>{if(!V||s)return A;let M,U;if(m)[M,U]=A;else{let z=rn(0,rt()),Q=z+c;a||(H=rn(0,H),y!==1&&(z-=H),y!==2&&(Q+=H)),[M,U]=A=ct(rn(0,z),rn(0,Q)),C&&(M=Ro(M,C[0]),U=rn(U,C[1]))}return[rn(M,0),Ro(U,B.l-1)]},S:H=>er(B,H-d),I:O,O:et,k:ut,j:()=>B.l,N:()=>u,B:()=>y!==0,T:()=>c,q:()=>d,M:it,P:()=>(m=h,h=0,[m,_===2]),R:(H,M)=>{const U=[H,M];return Z.add(U),()=>{Z.delete(U)}},A:(H,M)=>{let U,z,Q=0;switch(H){case 1:{if(M===u&&_===0)break;const pt=m;m=0;const ft=M-u,st=nh(ft);pt&&st=-c&&nt<=it()&&(Q+=1,z=st>c);break}case 2:Q=8,y!==0&&(U=!0,Q+=1),y=0,_=0,C=li;break;case 3:{const pt=M.filter(([ft,st])=>!O(ft,st));if(!pt.length)break;G(pt.reduce((ft,[st,nt])=>((_===2||(C&&_===1?stc&&(G(((ft,st)=>{let nt=0;const At=[];ft.t.forEach((dt,lt)=>{dt!==-1&&(At.push(dt),lt{Q&pt&&ft(z)}))}}},Vc=setTimeout,Ws=(e,o)=>o?-e:e,n4=(e,o,r,i,a,s)=>{const l=Date.now;let c=0,d=!1,u=!1,h=!1,p=!1;const m=(()=>{let T;const V=()=>{T!=li&&clearTimeout(T)},B=()=>{V(),T=Vc(()=>{T=li,(()=>{if(d||u)return d=!1,void m();h=!1,e.A(2)})()},150)};return B.C=V,B})(),y=()=>{c=l(),h&&(p=!0),e.A(1,i()),m()},_=T=>{if(d||!e.B()||T.ctrlKey)return;const V=l()-c;150>V&&50{u=!0,h=p=!1},A=()=>{u=!1,Df()&&(h=!0)};return o.addEventListener("scroll",y),o.addEventListener("wheel",_,{passive:!0}),o.addEventListener("touchstart",C,{passive:!0}),o.addEventListener("touchend",A,{passive:!0}),{H:()=>{o.removeEventListener("scroll",y),o.removeEventListener("wheel",_),o.removeEventListener("touchstart",C),o.removeEventListener("touchend",A),m.C()},V:()=>{const[T,V]=e.P();T&&(a(T,V,p),p=!1,V&&e.T()>e.M()&&e.A(1,i()))}}},o4=(e,o,r)=>{let i;return[async(a,s)=>{if(!await o())return;i&&i();const l=()=>{const[c,d]=Il();return i=()=>{d(!1)},e.T()&&Vc(i,150),[c,e.R(2,()=>{d(!0)})]};if(s&&t4())e.A(8,a()),q5(async()=>{for(;;){let c=!0;for(let[h,p]=e.v();h<=p;h++)if(e.I(h)){c=!1;break}if(c)break;const[d,u]=l();try{if(!await d)return}finally{u()}}e.A(7),r(a(),s)});else for(;;){const[c,d]=l();try{if(e.A(7),r(a()),!await c)return}finally{d()}}},()=>{i&&i()}]},r4=e=>{let o;return{F(r){(o||(o=new(Q5(K5(r))).ResizeObserver(e))).observe(r)},J(r){o.unobserve(r)},H(){o&&o.disconnect()}}},i4=Ne({props:{L:{type:Object,required:!0},W:{type:Object,required:!0},X:{type:Object,required:!0},Y:{type:Function,required:!0},D:{type:Number,required:!0},U:{type:Boolean},G:{type:Boolean},K:{type:Boolean},Z:{type:String,required:!0},ee:Object},setup(e){const o=zo(),r=Bt(()=>e.L.value&&e.W.O(e.D,e.K)),i=Bt(()=>e.L.value&&e.W.I(e.D));return _n(()=>o.value&&e.D,(a,s,l)=>{l(e.Y(o.value,e.D))},{flush:"post"}),()=>{var a;const{X:s,U:l,G:c,Z:d}=e,u=i.value,{style:h,...p}=(a=e.ee)!==null&&a!==void 0?a:{},m={contain:"layout style",position:u&&c?void 0:"absolute",[l?"height":"width"]:"100%",[l?"top":"left"]:"0px",[l?"left":"top"]:r.value+"px",visibility:!u||c?void 0:"hidden",...h};return l&&(m.display="inline-flex"),E(d,gt({ref:o,style:m},p),typeof(y=s)=="function"||Object.prototype.toString.call(y)==="[object Object]"&&!dc(y)?s:{default:()=>[s],_:2},16,["style"]);var y}}}),a4=(e,o)=>{if(e.length===1){const r=e[0].key;if(r!=null)return r}return"_"+o},s4=(e,o)=>e[0]===o[0]&&e[1]===o[1],l4=Ne({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,startMargin:{type:Number,default:0},ssrCount:Number,scrollRef:Object,as:{type:String,default:"div"},item:{type:String,default:"div"},itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(e,{emit:o,expose:r,slots:i}){let a=!!e.ssrCount;const s=e.horizontal,l=zo(),c=e4(e.data.length,e.itemSize,e.ssrCount,e.cache,!e.itemSize),d=((_,C)=>{let A;const T=C?"width":"height",V=new WeakMap,B=r4(Z=>{const W=[];for(const{target:rt,contentRect:ct}of Z)if(rt.offsetParent)if(rt===A)_.A(4,ct[T]);else{const it=V.get(rt);it!=li&&W.push([it,ct[T]])}W.length&&_.A(3,W)});return{te(Z){B.F(A=Z)},re:(Z,W)=>(V.set(Z,W),B.F(Z),()=>{V.delete(Z),B.J(Z)}),p:B.H}})(c,s),u=((_,C)=>{let A,T,V=Il(),B=!1;const Z=C?"scrollLeft":"scrollTop",W=C?"overflowX":"overflowY",[rt,ct]=o4(_,()=>V[0],(it,et)=>{it=Ws(it,B),et?A.scrollTo({[C?"left":"top"]:it,behavior:"smooth"}):A[Z]=it});return{oe(it,et){A=et,C&&(B=getComputedStyle(et).direction==="rtl"),T=n4(_,et,C,()=>Ws(et[Z],B),(ut,O,G)=>{if(G){const H=et.style,M=H[W];H[W]="hidden",Vc(()=>{H[W]=M})}et[Z]=Ws(_.N()+ut,B),O&&ct()}),V[1](!0)},p(){T&&T.H(),V[1](!1),V=Il()},ne:()=>B,se(it){rt(()=>it)},ie(it){it+=_.N(),rt(()=>it)},le(it,{align:et,smooth:ut,offset:O=0}={}){if(it=Af(it,0,_.j()-1),et==="nearest"){const G=_.O(it),H=_.N();if(GH+_.T()))return;et="end"}}rt(()=>O+_.q()+_.O(it)+(et==="end"?_.k(it)-_.T():et==="center"?(_.k(it)-_.T())/2:0),ut)},ce:()=>{T&&T.V()}}})(c,s),h=zo(c.m());c.R(1,()=>{h.value=c.m()}),c.R(4,()=>{o("scroll",c.N())}),c.R(8,()=>{o("scrollEnd")});const p=Bt(_=>{h.value;const C=c.v(e.bufferSize);return _&&s4(_,C)?_:C}),m=Bt(()=>h.value&&c.B()),y=Bt(()=>h.value&&c.M());return _p(()=>{a=!1;const _=l.value,C=requestAnimationFrame(()=>{const A=T=>{d.te(T),u.oe(_,T)};e.scrollRef?A(e.scrollRef):A(_.parentElement)});cu(()=>{cancelAnimationFrame(C)})}),cu(()=>{c.p(),d.p(),u.p()}),_n(()=>e.data.length,_=>{c.A(5,[_,e.shift])}),_n(()=>e.startMargin,_=>{c.A(6,_)},{immediate:!0}),_n([h],()=>{u.ce()},{flush:"post"}),r({get cache(){return c.h()},get scrollOffset(){return c.N()},get scrollSize(){return(_=>rn(_.M(),_.T()))(c)},get viewportSize(){return c.T()},findItemIndex:c.S,getItemOffset:c.O,getItemSize:c.k,scrollToIndex:u.le,scrollTo:u.se,scrollBy:u.ie}),()=>{const _=e.as,C=e.item,A=y.value,T=u.ne(),V=[],B=W=>{var rt;const ct=i.default({item:e.data[W],index:W});return E(i4,{key:a4(ct,W),L:h,W:c,Y:d.re,D:W,X:ct,U:s,K:T,G:a,Z:C,ee:(rt=e.itemProps)===null||rt===void 0?void 0:rt.call(e,{item:e.data[W],index:W})},null,8,["L","W","Y","D","X","U","K","G","Z","ee"])};if(e.keepMounted){const W=new Set(e.keepMounted);for(let[rt,ct]=p.value;rt<=ct;rt++)W.add(rt);If([...W]).forEach(rt=>{V.push(B(rt))})}else for(let[W,rt]=p.value;W<=rt;W++)V.push(B(W));return E(_,{ref:l,style:{contain:"size style",overflowAnchor:"none",flex:"none",position:"relative",width:s?A+"px":"100%",height:s?"100%":A+"px",pointerEvents:m.value?"none":void 0}},typeof(Z=V)=="function"||Object.prototype.toString.call(Z)==="[object Object]"&&!dc(Z)?V:{default:()=>[V],_:2},8,["style"]);var Z}}}),Rf=Ne({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,ssrCount:Number,itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(e,{emit:o,expose:r,slots:i}){const a=e.horizontal,s=d=>{o("scroll",d)},l=()=>{o("scrollEnd")},c=zo();return r({get cache(){return c.value.cache},get scrollOffset(){return c.value.scrollOffset},get scrollSize(){return c.value.scrollSize},get viewportSize(){return c.value.viewportSize},findItemIndex:(...d)=>c.value.findItemIndex(...d),getItemOffset:(...d)=>c.value.getItemOffset(...d),getItemSize:(...d)=>c.value.getItemSize(...d),scrollToIndex:(...d)=>c.value.scrollToIndex(...d),scrollTo:(...d)=>c.value.scrollTo(...d),scrollBy:(...d)=>c.value.scrollBy(...d)}),()=>{return E("div",{style:{display:a?"inline-block":"block",[a?"overflowX":"overflowY"]:"auto",contain:"strict",width:"100%",height:"100%"}},[E(l4,{ref:c,data:e.data,bufferSize:e.bufferSize,itemSize:e.itemSize,itemProps:e.itemProps,shift:e.shift,ssrCount:e.ssrCount,horizontal:a,keepMounted:e.keepMounted,cache:e.cache,onScroll:s,onScrollEnd:l},(d=i,typeof d=="function"||Object.prototype.toString.call(d)==="[object Object]"&&!dc(d)?i:{default:()=>[i],_:2}),8,["data","bufferSize","itemSize","itemProps","shift","ssrCount","horizontal","keepMounted","cache","onScroll","onScrollEnd"])],4);var d}}}),c4={name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},d4=["aria-hidden","aria-label"],u4=["fill","width","height"],h4={d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"},p4={key:0};function f4(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon magnify-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",h4,[r.title?(f(),k("title",p4,L(r.title),1)):R("",!0)])],8,u4))],16,d4)}const m4=ot(c4,[["render",f4]]),g4={name:"EntityBubble",components:{UserBubble:wc},props:{id:{type:String,required:!0},label:{type:String,required:!0},type:{type:String,required:!0},shareType:{type:Number,default:void 0},user:{type:String,default:void 0}},setup(){return{ShareType:sr}},methods:{onDelete(){this.$emit("delete",{id:this.id,type:this.type})}}},y4=["title"];function v4(e,o,r,i,a,s){const l=w("UserBubble");return f(),I(l,{class:"entity-picker__bubble",margin:0,size:22,"display-name":r.label,user:r.shareType===i.ShareType.User?r.user:void 0},{name:S(()=>[D("a",{href:"#",title:e.t("contacts","Remove {type}",{type:r.type}),class:"entity-picker__bubble-delete icon-close",onClick:o[0]||(o[0]=(...c)=>s.onDelete&&s.onDelete(...c))},null,8,y4)]),_:1},8,["display-name","user"])}const b4=ot(g4,[["render",v4],["__scopeId","data-v-2330057e"]]),_4={name:"EntitySearchResult",components:{UserBubble:wc},props:{source:{type:Object,default(){return{}}},onClick:{type:Function,default(){}},selection:{type:Object,default:()=>({})}},setup(){return{ShareType:sr}},computed:{isSelected(){return this.source.id in this.selection}}};function C4(e,o,r,i,a,s){const l=w("UserBubble");return r.source.heading?(f(),k("h4",{key:r.source.id,class:"entity-picker__option-caption"},L(e.t("contacts","Add {type}",{type:r.source.label.toLowerCase()})),1)):(f(),I(l,{key:1,class:ne(["entity-picker__bubble",{"entity-picker__bubble--selected":s.isSelected}]),"display-name":r.source.label,user:r.source.shareType===i.ShareType.User?r.source.user:void 0,margin:6,size:44,url:"#",onClick:o[0]||(o[0]=ce(c=>r.onClick(r.source),["stop","prevent"]))},{title:S(()=>[...o[1]||(o[1]=[D("span",{class:"entity-picker__bubble-checkmark icon-checkmark"},null,-1)])]),_:1},8,["class","display-name","user"]))}const w4=ot(_4,[["render",C4],["__scopeId","data-v-d0c44a5f"]]),k4={name:"EntityPicker",components:{NcButton:ue,EmptyContent:go,EntityBubble:b4,IconAccountPlusOutline:Ef,IconSearch:m4,IconLoading:je,Modal:Wn,VList:Rf,EntitySearchResult:w4},props:{loading:{type:Boolean,default:!1},dataTypes:{type:Array,required:!0,validator:e=>{const o=e.filter(r=>!r.id&&!r.label);return o.length>0?(console.error("The following types MUST have a proper id and label key",o),!1):!0}},dataSet:{type:Array,required:!0,validator:e=>(e.forEach(o=>{(!o.id||!o.label)&&console.error("The following source MUST have a proper id and label key",o)}),!0)},sort:{type:String,default:"label"},confirmLabel:{type:String,default:t("contacts","Add to group")},titleLabel:{type:String,default:t("contacts","Add members to group")},internalSearch:{type:Boolean,default:!0},selection:{type:Object,default:null},emptyDataSetDescription:{type:String,default:""}},data(){return{canInviteGuests:!!window?.OCA?.Guests?.openGuestDialog,searchQuery:"",localSelection:{}}},computed:{selectionSet:{get(){return this.selection!==null?this.selection:this.localSelection},set(e){this.selection!==null&&this.$emit("update:selection",e),this.localSelection=e}},isSingleType(){return!(this.dataTypes.length>1)},isEmptySelection(){return Object.keys(this.selectionSet).length===0},searchPlaceholderTypes(){return`${this.dataTypes.map(e=>e.label).join(", ")}…`},searchSet(){return this.internalSearch&&this.searchQuery&&this.searchQuery.trim!==""?this.dataSet.filter(e=>e.label.toLowerCase().indexOf(this.searchQuery.toLowerCase())>-1):this.dataSet},availableEntities(){return this.isSingleType?this.searchSet:this.dataTypes.map(e=>{const o=this.searchSet.filter(i=>i.type===e.id),r=[{id:e.id,label:e.label,heading:!0},...o];return o.length===0?[]:r}).flat()}},mounted(){this.$nextTick(()=>{this.$refs.input.focus(),this.$refs.input.select()}),this.canInviteGuests&&ma("guests:user:created",this.addGuest)},methods:{onCancel(){this.$emit("close")},onSubmit(){this.$emit("submit",Object.values(this.selectionSet))},onSearch:Ip(function(){this.$emit("search",this.searchQuery)},200),onDelete(e){delete this.selectionSet[e.id],console.debug("Removing entity from selection",e)},onClick(e){if(e.id in this.selectionSet){delete this.selectionSet[e.id],console.debug("Removed entity to selection",e);return}this.selectionSet[e.id]=e,console.debug("Added entity to selection",e)},onToggle(e){e.id in this.selectionSet?this.onDelete(e):this.onPick(e)},onGuestButtonClick(){this.canInviteGuests&&window?.OCA?.Guests?.openGuestDialog("contacts")}}},S4={class:"entity-picker"},x4={class:"entity-picker__heading"},N4={class:"entity-picker__title"},E4={class:"entity-picker__search-container"},M4={class:"entity-picker__search"},T4=["placeholder"],A4={class:"entity-picker__navigation"};function I4(e,o,r,i,a,s){const l=w("IconAccountPlusOutline"),c=w("NcButton"),d=w("IconLoading"),u=w("EmptyContent"),h=w("EntityBubble"),p=w("IconSearch"),m=w("EntitySearchResult"),y=w("VList"),_=w("Modal");return f(),I(_,{size:"normal",onClose:s.onCancel},{default:S(()=>[D("div",S4,[D("div",x4,[D("h3",N4,L(r.titleLabel),1)]),D("div",E4,[D("div",M4,[o[2]||(o[2]=D("div",{class:"entity-picker__search-icon icon-search"},null,-1)),zn(D("input",{ref:"input","onUpdate:modelValue":o[0]||(o[0]=C=>a.searchQuery=C),placeholder:e.t("contacts","Search {types}",{types:s.searchPlaceholderTypes}),class:"entity-picker__search-input",type:"search",onInput:o[1]||(o[1]=(...C)=>s.onSearch&&s.onSearch(...C))},null,40,T4),[[cc,a.searchQuery]])]),a.canInviteGuests?(f(),I(c,{key:0,type:"button",variant:"tertiary-no-background",title:e.t("contacts","Add guest"),"aria-label":e.t("contacts","Add guest"),onClick:s.onGuestButtonClick},{default:S(()=>[E(l,{size:20})]),_:1},8,["title","aria-label","onClick"])):R("",!0)]),r.loading?(f(),I(u,{key:0,name:e.t("contacts","Loading …")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])):(f(),k(bt,{key:1},[Object.keys(s.selectionSet).length>0?(f(),I(b0,{key:0,name:"zoom",tag:"ul",class:"entity-picker__selection"},{default:S(()=>[(f(!0),k(bt,null,Wt(s.selectionSet,C=>(f(),I(h,gt({key:C.key||`entity-${C.type}-${C.id}`},{ref_for:!0},C,{onDelete:A=>s.onDelete(C)}),null,16,["onDelete"]))),128))]),_:1})):R("",!0),r.dataSet.length===0?(f(),I(u,{key:1,name:e.t("contacts","Search for people to add"),description:r.emptyDataSetDescription},{icon:S(()=>[E(p,{size:20})]),_:1},8,["name","description"])):s.searchSet.length>0&&s.availableEntities.length>0?(f(),I(y,{key:2,class:"entity-picker__options",data:s.availableEntities},{default:S(({item:C})=>[(f(),I(m,{key:C.id,source:C,selection:s.selectionSet,"on-click":s.onClick},null,8,["source","selection","on-click"]))]),_:1},8,["data"])):a.searchQuery?(f(),I(u,{key:3,name:e.t("contacts","No results")},{icon:S(()=>[E(p,{size:20})]),_:1},8,["name"])):R("",!0),D("div",A4,[E(c,{disabled:r.loading,class:"navigation__button-left",onClick:s.onCancel},{default:S(()=>[J(L(e.t("contacts","Cancel")),1)]),_:1},8,["disabled","onClick"]),E(c,{disabled:s.isEmptySelection||r.loading,class:"navigation__button-right primary",onClick:s.onSubmit},{default:S(()=>[J(L(r.confirmLabel),1)]),_:1},8,["disabled","onClick"])])],64))])]),_:1},8,["onClose"])}const Pf=ot(k4,[["render",I4],["__scopeId","data-v-76578209"]]),O4={name:"CheckOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},L4=["aria-hidden","aria-label"],D4=["fill","width","height"],R4={d:"M19.78,2.2L24,6.42L8.44,22L0,13.55L4.22,9.33L8.44,13.55L19.78,2.2M19.78,5L8.44,16.36L4.22,12.19L2.81,13.55L8.44,19.17L21.19,6.42L19.78,5Z"},P4={key:0};function V4(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon check-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",R4,[r.title?(f(),k("title",P4,L(r.title),1)):R("",!0)])],8,D4))],16,L4)}const B4=ot(O4,[["render",V4]]),$4={name:"CloseOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},H4=["aria-hidden","aria-label"],U4=["fill","width","height"],z4={d:"M3,16.74L7.76,12L3,7.26L7.26,3L12,7.76L16.74,3L21,7.26L16.24,12L21,16.74L16.74,21L12,16.24L7.26,21L3,16.74M12,13.41L16.74,18.16L18.16,16.74L13.41,12L18.16,7.26L16.74,5.84L12,10.59L7.26,5.84L5.84,7.26L10.59,12L5.84,16.74L7.26,18.16L12,13.41Z"},G4={key:0};function F4(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon close-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",z4,[r.title?(f(),k("title",G4,L(r.title),1)):R("",!0)])],8,U4))],16,H4)}const Y4=ot($4,[["render",F4]]),X4={name:"ExitToAppIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},W4=["aria-hidden","aria-label"],j4=["fill","width","height"],q4={d:"M19,3H5C3.89,3 3,3.89 3,5V9H5V5H19V19H5V15H3V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M10.08,15.58L11.5,17L16.5,12L11.5,7L10.08,8.41L12.67,11H3V13H12.67L10.08,15.58Z"},Z4={key:0};function J4(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon exit-to-app-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",q4,[r.title?(f(),k("title",Z4,L(r.title),1)):R("",!0)])],8,j4))],16,W4)}const Vf=ot(X4,[["render",J4]]),K4={name:"ShieldCheckOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Q4=["aria-hidden","aria-label"],t3=["fill","width","height"],e3={d:"M21,11C21,16.55 17.16,21.74 12,23C6.84,21.74 3,16.55 3,11V5L12,1L21,5V11M12,21C15.75,20 19,15.54 19,11.22V6.3L12,3.18L5,6.3V11.22C5,15.54 8.25,20 12,21M10,17L6,13L7.41,11.59L10,14.17L16.59,7.58L18,9"},n3={key:0};function o3(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon shield-check-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",e3,[r.title?(f(),k("title",n3,L(r.title),1)):R("",!0)])],8,t3))],16,Q4)}const r3=ot(K4,[["render",o3]]),wo={computed:{selectedContact(){return this.$route.params.selectedContact},selectedGroup(){return this.$route.params.selectedGroup},selectedCircle(){return this.$route.params.selectedCircle},selectedUserGroup(){return this.$route.params.selectedUserGroup},selectedChart(){return this.$route.params.selectedChart}}},i3={name:"MemberGridItem",components:{NcAvatar:Xn,IconAccountGroupOutline:es,NcActions:_o,NcActionButton:jn,NcActionSeparator:yv,NcActionText:yc,IconDeleteOutline:Yn,IconExitToApp:Vf,IconShieldCheckOutline:r3,IconCheckOutline:B4,IconCloseOutline:Y4,NcButton:ue},mixins:[wo],props:{member:{type:Object,required:!0},isTeam:{type:Boolean,default:!1}},data(){return{loading:!1}},computed:{circle(){return this.$store.getters.getCircle(this.selectedCircle)},currentUserLevel(){return this.circle?.initiator?.level||Le.MEMBER},currentUserId(){return this.circle?.initiator?.singleId},availableLevelsChange(){const e=[];return this.member.level===Le.OWNER||this.isCurrentUser||(this.currentUserLevel>=Le.MODERATOR&&this.member.level!==Le.ADMIN&&e.push(Le.ADMIN),this.currentUserLevel>=Le.ADMIN&&(this.member.level!==Le.MODERATOR&&e.push(Le.MODERATOR),this.member.level!==Le.MEMBER&&e.push(Le.MEMBER)),this.circle.isOwner&&e.push(Le.OWNER)),e},isCurrentUser(){return this.member.id===this.currentUserId},isPendingApproval(){return this.member.level===Le.NONE&&this.member.status===$g.PENDING},canChangeLevel(){return this.circle.canManageMembers&&this.availableLevelsChange.length>0&&!this.isCurrentUser},canDelete(){return this.circle.canManageMembers&&this.member.level<=this.currentUserLevel&&!this.isCurrentUser},memberRole(){return!this.member.level||this.member.level===Le.NONE?null:Br[this.member.level]||null}},methods:{levelChangeLabel(e){return e===Le.OWNER?t("contacts","Promote as sole owner"):this.member.level{}},{label:t("contacts","Leave team"),type:"error",callback:async()=>{try{await this.doDeleteMember()}catch(e){this.logger.error("Error in delete member callback",{e}),Ct(t("contacts","Leave team failed."))}}}]).build().show()}catch{}},async doDeleteMember(){this.loading=!0;try{await this.$store.dispatch("deleteMemberFromCircle",{member:this.member,leave:this.isCurrentUser})}catch(e){if(e?.response?.status===404){this.logger.debug("Member is not in circle");return}this.logger.error("Could not delete the member",{member:this.member,error:e}),Ct(t("contacts","Could not delete the member {displayName}",this.member))}finally{this.loading=!1}},async changeLevel(e){this.loading=!0;try{if(await Vg(this.circle.id,this.member.id,e),this.showLevelMenu=!1,e===Le.OWNER){await this.$store.dispatch("getCircle",this.circle.id),await this.$store.dispatch("getCircleMembers",this.circle.id);return}this.member.level=e}catch(o){this.logger.error("Could not change the member level",{level:Br[e],error:o}),Ct(t("contacts","Could not change the member level to {level}",{level:Br[e]}))}finally{this.loading=!1}},async acceptMember(){this.loading=!0;try{await await this.$store.dispatch("acceptCircleMember",{circleId:this.circle.id,memberId:this.member.id})}catch(e){this.logger.error("Could not accept membership request",{member:this.member,error:e}),Ct(t("contacts","Could not accept membership request"))}finally{this.loading=!1}}}},a3={class:"member-grid-item"},s3={class:"member-info"},l3={class:"member-name"},c3={key:0,class:"member-role"},d3={key:2,class:"member-grid-item__actions"};function u3(e,o,r,i,a,s){const l=w("IconAccountGroupOutline"),c=w("NcAvatar"),d=w("IconCheckOutline"),u=w("NcButton"),h=w("IconCloseOutline"),p=w("NcActionText"),m=w("IconShieldCheckOutline"),y=w("NcActionButton"),_=w("NcActionSeparator"),C=w("IconExitToApp"),A=w("IconDeleteOutline"),T=w("NcActions");return f(),k("div",a3,[r.isTeam?(f(),I(c,{key:0,"display-name":r.member.displayName,"is-no-user":!0,size:32},{icon:S(()=>[E(l,{size:20})]),_:1},8,["display-name"])):(f(),I(c,{key:1,user:r.member.userId,"display-name":r.member.displayName,size:32},null,8,["user","display-name"])),D("div",s3,[D("span",l3,L(r.member.displayName),1),s.memberRole?(f(),k("span",c3,L(s.memberRole),1)):R("",!0)]),!a.loading&&s.isPendingApproval&&s.circle.canManageMembers?(f(),k("div",d3,[E(u,{"aria-label":e.t("contacts","Accept membership request"),onClick:s.acceptMember},{icon:S(()=>[E(d,{size:20})]),_:1},8,["aria-label","onClick"]),E(u,{"aria-label":e.t("contacts","Reject membership request"),onClick:s.deleteMember},{icon:S(()=>[E(h,{size:20})]),_:1},8,["aria-label","onClick"])])):(f(),I(T,{key:3},{default:S(()=>[a.loading?(f(),I(p,{key:0,icon:"icon-loading-small"},{default:S(()=>[J(L(e.t("contacts","Loading …")),1)]),_:1})):(f(),k(bt,{key:1},[s.canChangeLevel?(f(),k(bt,{key:0},[E(p,null,{icon:S(()=>[E(m,{size:16})]),default:S(()=>[J(L(e.t("contacts","Manage level"))+" ",1)]),_:1}),(f(!0),k(bt,null,Wt(s.availableLevelsChange,V=>(f(),I(y,{key:V,icon:"",onClick:B=>s.changeLevel(V)},{default:S(()=>[J(L(s.levelChangeLabel(V)),1)]),_:2},1032,["onClick"]))),128)),E(_)],64)):R("",!0),s.isCurrentUser&&!s.circle.isOwner?(f(),I(y,{key:1,onClick:s.deleteMember},{icon:S(()=>[E(C,{size:16})]),default:S(()=>[J(L(e.t("contacts","Leave team"))+" ",1)]),_:1},8,["onClick"])):s.canDelete?(f(),I(y,{key:2,onClick:s.deleteMember},{icon:S(()=>[E(A,{size:20})]),default:S(()=>[J(" "+L(e.t("contacts","Remove member")),1)]),_:1},8,["onClick"])):R("",!0)],64))]),_:1}))])}const h3=ot(i3,[["render",u3],["__scopeId","data-v-2a4da73d"]]),Bf=Object.keys(ul),p3=parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25;async function rh(e,o=null){const r=await ve.get(On("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"teams",search:e,perPage:p3,shareType:Bf,lookup:!1}}),i=r.data.ocs.data,a=r.data.ocs.data.exact;i.exact=[];let s=Object.values(a).reduce((m,y)=>m.concat(y),[]),l=Object.values(i).reduce((m,y)=>m.concat(y),[]);o&&(o.config&hp.FEDERATED)!==0?(s=s.filter(m=>!(m.value?.shareType===sr.Remote&&m.value?.isTrustedServer===!1)),l=l.filter(m=>!(m.value?.shareType===sr.Remote&&m.value?.isTrustedServer===!1))):(s=s.filter(m=>m.value?.shareType!==sr.Remote),l=l.filter(m=>m.value?.shareType!==sr.Remote));const c=s.filter(m=>typeof m=="object").map(m=>Ol(m)).sort((m,y)=>m.shareType-y.shareType),d=l.filter(m=>typeof m=="object").map(m=>Ol(m)).sort((m,y)=>m.shareType-y.shareType),u=c.concat(d),h=u.reduce((m,y)=>(y.displayName&&(m[y.displayName]||(m[y.displayName]=0),m[y.displayName]++),m),{}),p=u.map(m=>h[m.displayName]>1&&!m.desc?{...m,desc:m.shareWithDisplayNameUnique}:m);return console.info("suggestions",p),p}async function f3(){const e=(await ve.get(On("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:"contacts",shareType:Bf}})).data.ocs.data.exact,o=Object.values(e).reduce((r,i)=>r.concat(i),[]).map(r=>Ol(r));return console.info("recommendations",o),o}function Ol(e){const o=`picker-${e.value.shareType}`;return{label:e.label,id:`${o}-${e.value.shareWith}`,user:[window.OC.Share.SHARE_TYPE_USER,window.OC.Share.SHARE_TYPE_REMOTE].indexOf(e.value.shareType)>-1?e.value.shareWith:null,type:o,...e.value}}const m3=Ne({name:"MemberList",components:{EntityPicker:Pf,IconContact:bo,MemberGridItem:h3,NcEmptyContent:go},mixins:[Ga,wo],props:{list:{type:Array,required:!0},loading:{type:Boolean,default:!1}},data(){return{pickerLoading:!1,showPicker:!1,showPickerIntro:!0,recommendations:[],pickerCircle:null,pickerData:[],pickerSelection:{},pickerTypes:Ug}},computed:{circle(){return this.$store.getters.getCircle(this.selectedCircle)},filteredPickerData(){return this.pickerData.filter(e=>{const o=ul[e.shareType],r=this.list.filter(({userType:i})=>i===o);return r?r.find(i=>i.userId===e.shareWith)===void 0:!0})},flatList(){const e=this.list.filter(r=>!r.isUser),o=this.list.filter(r=>r.isUser);return[...e,...o]},hasMembers(){return this.flatList.length>0}},mounted(){ma("contacts:circles:append",this.onShowPicker),ma("guests:user:created",this.onGuestCreated)},methods:{async onShowPicker(e){this.showPicker=!0,this.pickerLoading=!0,this.pickerCircle=e;try{const o=await f3();this.recommendations=o,this.pickerData=o}catch(o){console.error("Unable to get the recommendations list",o)}finally{this.pickerLoading=!1}},async onSearch(e){if(e.trim()===""){this.pickerData=this.recommendations;return}this.pickerLoading=!0;try{const o=await rh(e,this.circle);this.pickerData=o}catch(o){console.error("Unable to get the results",o),Ct(Bo("contacts","Unable to get the results"))}finally{this.pickerLoading=!1}},async onPickerPick(e){this.logger.info("Adding selection to circle",{selection:e,pickerCircle:this.pickerCircle}),this.pickerLoading=!0,e=e.map(o=>({id:o.shareWith,type:ul[o.shareType]}));try{if((await this.$store.dispatch("addMembersToCircle",{circleId:this.pickerCircle,selection:e})).length[E(l,{size:20})]),_:1},8,["name"])):e.circle.isMember?e.hasMembers?(f(),k("div",y3,[(f(!0),k(bt,null,Wt(e.flatList,p=>(f(),I(u,{key:`member-grid-item-${p.id}`,member:p,"is-team":!p.isUser},null,8,["member","is-team"]))),128))])):(f(),I(c,{key:2,class:"empty-content",name:e.t("contacts","You currently have no access to the member list")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])):(f(),I(c,{key:1,class:"empty-content",name:e.t("contacts","The list of members is only visible to members of this team")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])),e.showPicker?(f(),I(h,{key:4,ref:"entityPicker",selection:e.pickerSelection,"onUpdate:selection":o[0]||(o[0]=p=>e.pickerSelection=p),"confirm-label":e.t("contacts","Add to {team}",{team:e.circle.displayName}),"title-label":e.t("contacts","Invite members to {team}",{team:e.circle.displayName}),"data-types":e.pickerTypes,"data-set":e.filteredPickerData,"internal-search":!1,loading:e.pickerLoading,onClose:e.resetPicker,onSearch:e.onSearch,onSubmit:e.onPickerPick},null,8,["selection","confirm-label","title-label","data-types","data-set","loading","onClose","onSearch","onSubmit"])):R("",!0)])}const b3=ot(m3,[["render",v3],["__scopeId","data-v-39e7cd51"]]),_3={name:"CircleDetails",components:{AccountPlusIcon:Ef,Avatar:Xn,NcButton:ue,ContentHeading:Tf,ListItem:Wp,CogIcon:Lc,CopyIcon:nc,IconAccountGroup:es,FileDocumentOutline:VS,LoginIcon:ZS,LogoutIcon:Mf,MemberList:b3,CircleSettings:L5,TeamResourceButton:W5,NcEmptyContent:go,NcLoadingIcon:je,NcPopover:fc,PencilIcon:ec,UserBubble:wc,NcTextField:gc,NcTextArea:zg,NcActions:_o,NcActionButton:jn,FolderIcon:Dc,MessageIcon:c5,CalendarIcon:vS,ViewDashboardIcon:g5,BookOpenPageVariantIcon:uS,CheckIcon:ns},mixins:[Pc],setup(){const e=zo(),{width:o}=X0(e);return{avatarList:e,width:o}},data(){return{active:!1,isEditing:!1,showMembersModal:!1,loading:!1,loadingJoin:!1,loadingLeave:!1,loadingName:!1,loadingDescription:!1,isSettingsPopoverShown:!1,resources:[],originalDisplayName:"",originalDescription:"",activePopover:null,resourceInputs:Ya({}),popoverBoundary:null,createdCalendar:null,showCalendarSuccessNotification:!1,createdCalendarName:""}},computed:{descriptionPlaceholder(){return this.circle.description.trim()===""?t("contacts","There is no description for this team"):t("contacts","Enter a description for the team")},isEmptyDescription(){return this.circle.description.trim()===""},showDescription(){return this.circle.isOwner?!0:!this.isEmptyDescription},members(){return Object.values(this.$store.getters.getCircle(this.circle.id)?.members||[])},circleUrl(){return window.location.href},canManageTeam(){return(this.circle.isOwner||this.circle.isAdmin)&&!this.circle.isPersonal},teamHasCollective(){return this.resourcesForProvider("collectives").length>0},maxMembers(){const e=parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area"))+12,o=Math.floor(this.width/e);return this.members.length>o?o-1:o},memberLimit(){return Math.min(this.members.length,this.maxMembers)},membersLimited(){return this.members.slice(0,this.memberLimit)},hasExtraMembers(){return this.members.length>this.maxMembers},groupedResources(){return this.resources.reduce((e,o)=>{const r=o.provider.id;return e[r]||(e[r]={name:o.provider.name,resources:[]}),e[r].resources.push(o),e},{})},resourcesForProvider(){return e=>this.resources?.filter(o=>o.provider.id===e)??[]},resourceTypes(){const e=window.OC?.appswebroots||{};return[{id:"folder",label:t("contacts","Folder"),inputLabel:t("contacts","New folder"),placeholder:t("contacts","Folder name"),helperText:t("contacts","This will create a regular folder shared with the team. To create a Team Folder, please contact your {productName} administrator",{productName:OC.theme.name}),icon:"FolderIcon",apiPath:"files",enabled:e.files!==void 0},{id:"talk",label:t("contacts","Talk conversation"),inputLabel:t("contacts","New Talk conversation"),placeholder:t("contacts","Conversation name"),icon:"MessageIcon",apiPath:"spreed",enabled:e.spreed!==void 0},{id:"collective",label:t("contacts","Collective"),inputLabel:null,placeholder:null,icon:"BookOpenPageVariantIcon",apiPath:"collectives",enabled:e.collectives!==void 0&&!this.teamHasCollective,noInput:!0},{id:"calendar",label:t("contacts","Calendar"),inputLabel:t("contacts","New calendar"),placeholder:t("contacts","Calendar name"),icon:"CalendarIcon",apiPath:"calendar",enabled:e.calendar!==void 0},{id:"deck",label:t("contacts","Deck board"),inputLabel:t("contacts","New Deck board"),placeholder:t("contacts","Board name"),icon:"ViewDashboardIcon",apiPath:"deck",enabled:e.deck!==void 0}].filter(o=>o.enabled)}},watch:{"circle.id":{handler(){this.fetchTeamResources()},immediate:!0}},methods:{addMembers(){this.$refs.memberList.onShowPicker(this.circle.id)},setActivePopover(e,o){this.activePopover=o?e:null},updateResourceInput(e,o){this.resourceInputs[e]=o},async handleResourceCreation({resourceType:e,name:o}){try{let r;switch(e.id){case"folder":{const i=`/remote.php/dav/files/${_i().uid}/${o}`;await ve.request({method:"MKCOL",url:i,headers:{"Content-Type":"application/xml"}}),r=o;break}case"talk":{const i=On("/apps/spreed/api/v4/room");r=(await ve.post(i,{roomName:o,roomType:2})).data.ocs.data.token;break}case"collective":{const i=this.circle.sanitizedName||this.circle.name||this.circle.displayName;if(!i)throw new Error("Cannot create collective: team has no valid name");const a=On("/apps/collectives/api/v1.0/collectives");if(r=(await ve.post(a,{name:i})).data.ocs.data.collective.id,!r)throw new Error("Failed to get collective ID from creation response");break}case"calendar":{const i=(await uu(async()=>{const{default:c}=await import("./style-BSeD2-8B.chunk.mjs").then(d=>d.am);return{default:c}},__vite__mapDeps([0,1,2,3,4]),import.meta.url)).default,{generateRemoteUrl:a}=await uu(async()=>{const{generateRemoteUrl:c}=await import("./modulepreload-polyfill-DS8mCOmY.chunk.mjs").then(d=>d.bk);return{generateRemoteUrl:c}},[],import.meta.url),s=new i({rootUrl:a("dav"),defaultHeaders:{"X-NC-CalDAV-Webcal-Caching":"On"}});await s.connect({enableCalDAV:!0});const l=s.calendarHomes[0];try{const c=await l.createCalendarCollection(o,"#0082c9",["VEVENT","VTODO"],0);this.createdCalendar=c,r=c.url}catch{throw console.error("Calendar creation failed for name:",o),new Error(`CALENDAR_EXISTS:${o}`)}break}case"deck":{Ct(t("contacts","Deck app is not installed. Please install it to create team boards."));return}default:{Ct(t("contacts","Unknown resource type"));return}}await this.shareResourceWithTeam(e,r),this.resourceInputs[e.id]="",this.activePopover=null,e.id==="calendar"?(this.createdCalendar=null,ei(t("contacts",'Team calendar "{resourceName}" created and shared with team',{resourceName:o})),this.createdCalendarName=o,this.showCalendarSuccessNotification=!0,setTimeout(()=>{this.showCalendarSuccessNotification=!1},1e4)):(ei(t("contacts",'{resourceType} "{resourceName}" created and shared with team',{resourceType:e.label,resourceName:o})),this.fetchTeamResources())}catch(r){if(console.error("Failed to create resource:",r),r.message&&r.message.startsWith("CALENDAR_EXISTS:")){const i=r.message.replace("CALENDAR_EXISTS:","");Ct(t("contacts",'A calendar named "{name}" already exists. Please choose a different name.',{name:i}))}else Ct(t("contacts","Failed to create {resourceType}: {error}",{resourceType:e.label.toLowerCase(),error:r.response?.data?.ocs?.data?.message||r.response?.data?.message||r.message}))}},async shareResourceWithTeam(e,o){switch(e.id){case"folder":{const r=On("/apps/files_sharing/api/v1/shares");await ve.post(r,{path:`/${o}`,shareType:7,shareWith:this.circle.id,permissions:31});break}case"talk":{const r=On(`/apps/spreed/api/v4/room/${o}/participants`);await ve.post(r,{source:"circles",newParticipant:this.circle.id});break}case"collective":break;case"calendar":{if(!this.createdCalendar||!this.createdCalendar.share)throw new Error("No calendar object available for sharing");const r=`principal:principals/circles/${this.circle.id}`;await this.createdCalendar.share(r);break}}},onLeave(){this.isSettingsPopoverShown=!1,this.confirmLeaveCircle()},onDelete(){this.isSettingsPopoverShown=!1,this.confirmDeleteCircle()},onCloseSettingsPopover(){this.isSettingsPopoverShown=!1},startEditing(){this.originalDisplayName=this.circle.displayName,this.originalDescription=this.circle.description,this.isEditing=!0},cancelEditing(){this.circle.displayName=this.originalDisplayName,this.circle.description=this.originalDescription,this.isEditing=!1},async fetchTeamResources(){const e=await ve.get(On(`/teams/${this.circle.id}/resources`));this.resources=e.data.ocs.data.resources,console.debug("Team resources",this.resources)},onAutocomplete(e,o){o([])},async saveChanges(){const e=[];if(this.circle.displayName!==this.originalDisplayName){this.loadingName=!0;try{await cl(this.circle.id,dl.Name,this.circle.displayName),this.originalDisplayName=this.circle.displayName}catch(o){console.error("Unable to edit name",this.circle.displayName,o),e.push("name"),this.circle.displayName=this.originalDisplayName}finally{this.loadingName=!1}}if(this.circle.description!==this.originalDescription){this.loadingDescription=!0;try{await cl(this.circle.id,dl.Description,this.circle.description),this.originalDescription=this.circle.description}catch(o){console.error("Unable to edit team description",this.circle.description,o),e.push("description"),this.circle.description=this.originalDescription}finally{this.loadingDescription=!1}}if(e.length>0){const o=e.join(" and ");Ct(t("contacts","An error happened while saving {fields}",{fields:o}));return}this.isEditing=!1},openCalendarApp(){window.open(Go("/apps/calendar/"),"_blank"),this.showCalendarSuccessNotification=!1}}},C3={class:"circle-details-container"},w3={class:"circle-details__header-wrapper"},k3={class:"circle-details-grid__avatar"},S3={class:"circle-details__header"},x3={class:"circle-name-wrapper"},N3={key:0,class:"circle-name"},E3=["title"],M3={key:0,class:"subtitle"},T3={key:1,class:"circle-description-wrapper"},A3={key:0,class:"circle-description"},I3={class:"actions"},O3={key:2,class:"resource-shortcuts"},L3={class:"resource-shortcuts__title"},D3={class:"resource-shortcuts__buttons"},R3={class:"circle-details__main-content"},P3={key:1},V3={class:"section-header"},B3={class:"item-list"},$3=["innerHTML"],H3=["src"],U3={class:"circle-details-section"},z3={class:"member-section-layout"},G3={class:"section-header"};function F3(e,o,r,i,a,s){const l=w("Avatar"),c=w("NcLoadingIcon"),d=w("NcTextField"),u=w("UserBubble"),h=w("NcTextArea"),p=w("PencilIcon"),m=w("NcButton"),y=w("CopyIcon"),_=w("CogIcon"),C=w("CircleSettings"),A=w("NcPopover"),T=w("LoginIcon"),V=w("LogoutIcon"),B=w("CheckIcon"),Z=w("TeamResourceButton"),W=w("NcEmptyContent"),rt=w("IconAccountGroup"),ct=w("ContentHeading"),it=w("FileDocumentOutline"),et=w("ListItem"),ut=w("AccountPlusIcon"),O=w("MemberList");return f(),k("div",C3,[D("div",{class:ne(["circle-details-grid",{"is-editing":a.isEditing}])},[D("div",w3,[D("div",k3,[E(l,{"disable-tooltip":!0,"display-name":e.circle.displayName,"is-no-user":!0,size:75},null,8,["display-name"])]),D("div",S3,[D("div",x3,[a.isEditing?(f(),I(d,{key:1,modelValue:e.circle.displayName,"onUpdate:modelValue":o[0]||(o[0]=G=>e.circle.displayName=G),placeholder:e.t("contacts","Team name"),label:"Team name"},null,8,["modelValue","placeholder"])):(f(),k("h2",N3,[D("span",{title:e.circle.displayName},L(e.circle.displayName),9,E3),a.loadingName?(f(),I(c,{key:0,size:24})):R("",!0)]))]),a.isEditing?R("",!0):(f(),k("div",M3,[D("span",null,L(e.t("files","Team owner")),1),o[5]||(o[5]=J()),E(u,{user:e.circle.owner.userId,"display-name":e.circle.isOwner?"you":e.circle.owner.displayName},null,8,["user","display-name"])])),s.showDescription?(f(),k("div",T3,[a.isEditing?(f(),I(h,{key:1,modelValue:e.circle.description,"onUpdate:modelValue":o[1]||(o[1]=G=>e.circle.description=G),placeholder:s.descriptionPlaceholder,label:"Description",maxlength:1024},null,8,["modelValue","placeholder"])):(f(),k("div",A3,L(e.circle.description),1))])):R("",!0),D("div",I3,[a.isEditing?(f(),k(bt,{key:1},[E(m,{variant:"secondary",onClick:s.cancelEditing},{default:S(()=>[J(L(e.t("contacts","Cancel")),1)]),_:1},8,["onClick"]),E(m,{variant:"primary",onClick:s.saveChanges},{default:S(()=>[J(L(e.t("contacts","Save")),1)]),_:1},8,["onClick"])],64)):(f(),k(bt,{key:0},[s.canManageTeam?(f(),I(m,{key:0,variant:"primary",onClick:s.startEditing},{icon:S(()=>[E(p,{size:20})]),default:S(()=>[J(" "+L(e.t("contacts","Edit")),1)]),_:1},8,["onClick"])):R("",!0),E(m,{variant:"secondary",href:s.circleUrl,onClick:o[2]||(o[2]=ce(G=>e.copyToClipboard(s.circleUrl),["stop","prevent"]))},{icon:S(()=>[E(y,{size:20})]),default:S(()=>[J(" "+L(e.t("contacts","Copy link")),1)]),_:1},8,["href"]),s.canManageTeam?(f(),I(A,{key:1,shown:a.isSettingsPopoverShown,"popup-role":"dialog","onUpdate:shown":o[4]||(o[4]=G=>a.isSettingsPopoverShown=G)},{trigger:S(()=>[E(m,{onClick:o[3]||(o[3]=G=>a.isSettingsPopoverShown=!0)},{icon:S(()=>[E(_,{size:20})]),_:1})]),default:S(()=>[E(C,{circle:e.circle,onLeave:s.onLeave,onDelete:s.onDelete,onCloseSettingsPopover:s.onCloseSettingsPopover},null,8,["circle","onLeave","onDelete","onCloseSettingsPopover"])]),_:1},8,["shown"])):R("",!0)],64)),!e.circle.isPendingMember&&!e.circle.isMember&&e.circle.canJoin?(f(),I(m,{key:2,disabled:a.loadingJoin,class:"primary",onClick:e.joinCircle},{icon:S(()=>[E(T,{size:16})]),default:S(()=>[J(" "+L(e.t("contacts","Request to join")),1)]),_:1},8,["disabled","onClick"])):R("",!0),e.circle.isMember&&e.circle.canLeave?(f(),I(m,{key:3,disabled:a.loadingLeave,variant:"warning",onClick:e.confirmLeaveCircle},{icon:S(()=>[E(V,{size:16})]),default:S(()=>[J(" "+L(e.t("contacts","Leave team")),1)]),_:1},8,["disabled","onClick"])):R("",!0)]),e.circle.isMember?(f(),k("div",O3,[D("h3",L3,L(e.t("contacts","Create")),1),D("div",D3,[(f(!0),k(bt,null,Wt(s.resourceTypes,G=>(f(),k(bt,{key:G.id},[G.id==="calendar"&&a.showCalendarSuccessNotification?(f(),I(m,{key:0,variant:"success",onClick:s.openCalendarApp},{icon:S(()=>[E(B,{size:20})]),default:S(()=>[J(" "+L(e.t("contacts","Show in Calendar")),1)]),_:1},8,["onClick"])):(f(),I(Z,{key:1,"resource-type":G,value:a.resourceInputs[G.id]||"","is-open":a.activePopover===G.id,"helper-text":G.helperText,"onUpdate:value":H=>s.updateResourceInput(G.id,H),"onUpdate:isOpen":H=>s.setActivePopover(G.id,H),onCreate:s.handleResourceCreation},{icon:S(()=>[(f(),I(yo(G.icon),{size:20}))]),_:2},1032,["resource-type","value","is-open","helper-text","onUpdate:value","onUpdate:isOpen","onCreate"]))],64))),128))])])):R("",!0)])]),D("div",R3,[e.circle.isMember?(f(),k("section",P3,[(f(!0),k(bt,null,Wt(s.groupedResources,(G,H)=>(f(),k("div",{key:H,class:"circle-details-section"},[D("div",V3,[E(ct,null,{default:S(()=>[J(L(G.name),1)]),_:2},1024)]),D("ul",B3,[(f(!0),k(bt,null,Wt(G.resources,M=>(f(),I(et,{key:M.id,href:M.url,name:M.label},{icon:S(()=>[M.iconSvg?(f(),k("div",{key:0,class:"resource__icon",innerHTML:M.iconSvg},null,8,$3)):M.iconURL?(f(),k("img",{key:1,src:M.iconURL,class:"resource__icon"},null,8,H3)):(f(),I(it,{key:2,size:20}))]),_:2},1032,["href","name"]))),128))])]))),128)),D("div",U3,[D("div",z3,[D("div",G3,[E(ct,null,{default:S(()=>[J(L(e.t("contacts","Members")),1)]),_:1}),e.circle.canManageMembers?(f(),I(m,{key:0,variant:"tertiary",onClick:s.addMembers},{icon:S(()=>[E(ut,{size:20})]),default:S(()=>[J(" "+L(e.t("contacts","Add")),1)]),_:1},8,["onClick"])):R("",!0)]),E(O,{ref:"memberList",list:s.members},null,8,["list"])])])])):(f(),k(bt,{key:0},[e.circle.isPendingMember?(f(),I(W,{key:0,name:e.t("contacts","Your request to join this team is pending approval")},{icon:S(()=>[E(c,{size:20})]),_:1},8,["name"])):(f(),I(W,{key:1,name:e.t("contacts","You are not a member of {circle}",{circle:e.circle.displayName})},{icon:S(()=>[E(rt,{size:20})]),_:1},8,["name"]))],64))])],2)])}const Y3=ot(_3,[["render",F3],["__scopeId","data-v-42f4f7bf"]]),X3={name:"UserGroupMember",components:{NcAvatar:Xn},props:{member:{type:String,required:!0}},data(){return{loading:!0,displayName:""}},mounted(){this.fetchMemberInfo()},methods:{async fetchMemberInfo(){const e=encodeURIComponent(this.member),{data:o}=await ve.post(Go("contactsmenu/findOne"),`shareType=0&shareWith=${e}`);this.displayName=o.fullName,this.loading=!1}}},W3={class:"usergroup-member__container"},j3={class:"usergroup-member__info"},q3={key:0,class:"usergroup-member__name"},Z3={class:"usergroup-member__role"};function J3(e,o,r,i,a,s){const l=w("NcAvatar");return f(),k("div",W3,[E(l,{user:r.member,size:32},null,8,["user"]),D("div",j3,[a.loading?R("",!0):(f(),k("div",q3,L(a.displayName),1)),D("div",Z3,L(e.t("contacts","Member")),1)])])}const K3=ot(X3,[["render",J3],["__scopeId","data-v-7b48e627"]]);class Bc{_data;_members;constructor(o){this._data=o,this._members=[]}addMember(o){this._members.includes(o)||this._members.push(o)}get id(){return this._data.id}get displayName(){return this._data.displayname}get population(){return this._data.usercount}get canLeave(){return!1}get isOwner(){return!1}get isMember(){return!0}get canManageMembers(){return!1}get canJoin(){return!1}get members(){return this._members}get router(){return{name:"user_group",params:{selectedUserGroup:this.id,selectedGroup:Zr}}}toString(){return this.displayName}}const Q3={name:"UserGroupDetails",components:{CopyIcon:nc,NcAvatar:Xn,NcButton:ue,UserGroupMember:K3},mixins:[Rc],props:{userGroup:{type:Bc,required:!0}},computed:{userGroupUrl(){return window.location.href}}},tx={class:"usergroup-details-container"},ex={class:"usergroup-details-grid"},nx={class:"usergroup-details__header-wrapper"},ox={class:"usergroup-details-grid__avatar"},rx={class:"usergroup-details__header"},ix={class:"usergroup-name-wrapper"},ax={class:"usergroup-name"},sx=["title"],lx={class:"usergroup-details__subtitle"},cx={class:"actions"},dx={class:"usergroup-details__main-content"},ux={class:"usergroup-details__content-heading"},hx={class:"usergroup-details__member-grid"};function px(e,o,r,i,a,s){const l=w("NcAvatar"),c=w("CopyIcon"),d=w("NcButton"),u=w("UserGroupMember");return f(),k("div",tx,[D("div",ex,[D("div",nx,[D("div",ox,[E(l,{"disable-tooltip":!0,"display-name":r.userGroup.displayName,"is-no-user":!0,size:75},null,8,["display-name"])]),D("div",rx,[D("div",ix,[D("h2",ax,[D("span",{title:r.userGroup.displayName},L(r.userGroup.displayName),9,sx)]),D("div",lx,L(e.t("contacts","This is a read-only group managed by administrators. Group members can only view this group.")),1)]),D("div",cx,[E(d,{variant:"secondary",onClick:o[0]||(o[0]=ce(h=>e.copyToClipboard(s.userGroupUrl),["stop","prevent"]))},{icon:S(()=>[E(c,{size:20})]),default:S(()=>[J(" "+L(e.t("contacts","Copy link")),1)]),_:1})])])]),D("div",dx,[D("h3",ux,L(e.t("contacts","Members")),1),D("div",hx,[(f(!0),k(bt,null,Wt(r.userGroup.members,h=>(f(),I(u,{key:`user-group-member-${h}`,member:h},null,8,["member"]))),128))])])])])}const fx=ot(Q3,[["render",px],["__scopeId","data-v-c6692938"]]);async function mx(e){return(await ve.get(On("/cloud/users/{userId}/groups/details",{userId:e}))).data.ocs.data.groups}async function gx(e){return(await ve.get(On("/cloud/groups/{groupId}/users",{groupId:e}))).data.ocs.data.users}const $c=Gg("userGroup",{state:()=>({userGroups:{}}),getters:{userGroupList:e=>Object.values(e.userGroups),getUserGroup:e=>o=>e.userGroups[o]},actions:{async getUserGroups(e){const o=await mx(e);return o.forEach(r=>{try{const i=new Bc(r);this.userGroups[i.id]=i}catch(i){uc.error("Failed to add group",{group:r,error:i})}}),o},async getUserGroupMembers(e){const o=await gx(e);return o.forEach(r=>{this.getUserGroup(e).addMember(r)}),o}}}),yx={name:"CircleContent",components:{AppContent:mc,CircleDetails:Y3,EmptyContent:go,AccountGroup:es,IconLoading:je,UserGroupDetails:fx},mixins:[Ga,wo],props:{loading:{type:Boolean,default:!0}},data(){return{loadingList:!1}},computed:{circles(){return this.$store.getters.getCircles},circle(){return this.$store.getters.getCircle(this.selectedCircle)},userGroup(){return this.userGroupStore.getUserGroup(this.selectedUserGroup)},members(){return Object.values(this.circle?.members||[])},isEmptyCircle(){return this.members.length===0},...pp($c)},watch:{circle(e){e?.id&&this.fetchCircleMembers(e.id)},userGroup(e){e?.id&&this.fetchUserGroupMembers(e.id)}},beforeMount(){this.circle?.id&&this.fetchCircleMembers(this.circle.id),this.userGroup?.id&&this.fetchUserGroupMembers(this.userGroup.id)},methods:{async fetchCircleMembers(e){this.loadingList=!0,this.logger.debug("Fetching members for",{circleId:e});try{await this.$store.dispatch("getCircleMembers",e)}catch(o){console.error(o),Ct(t("contacts","There was an error fetching the member list"))}finally{this.loadingList=!1}},async fetchUserGroupMembers(e){this.loadingList=!0;try{await this.userGroupStore.getUserGroupMembers(e)}catch(o){console.error(o),Ct(t("contacts","There was an error fetching the member list"))}finally{this.loadingList=!1}}}};function vx(e,o,r,i,a,s){const l=w("AccountGroup"),c=w("EmptyContent"),d=w("IconLoading"),u=w("UserGroupDetails"),h=w("CircleDetails"),p=w("AppContent");return f(),I(p,null,{default:S(()=>[!s.circle&&!s.userGroup?(f(),I(c,{key:0,name:e.t("contacts","Please select a team")},{icon:S(()=>[E(l,{size:20})]),_:1},8,["name"])):r.loading?(f(),I(c,{key:1,class:"empty-content",name:e.t("contacts","Loading team…")},{icon:S(()=>[E(d,{size:20})]),_:1},8,["name"])):s.userGroup?(f(),I(u,{key:2,"user-group":s.userGroup},null,8,["user-group"])):(f(),I(h,{key:3,circle:s.circle},null,8,["circle"]))]),_:1})}const bx=ot(yx,[["render",vx],["__scopeId","data-v-62e499e6"]]);function _x(e){e=structuredClone(e);const o=e.length,r=0;for(let i=-3;i<=3;i++)for(let a=-3;a<=3;a++)e[3+i][3+a]=r,e[3+i][o-4+a]=r,e[o-4+i][3+a]=r;for(let i=0;i<8;i++)e[7][i]=e[i][7]=e[7][o-i-1]=e[i][o-8]=e[o-8][i]=e[o-1-i][7]=r;return e}function Cx(e,o,r){e=structuredClone(e);const i=e.length,a=Math.ceil((i*o/100+i%2)/2)*2-i%2,s=e[0]?.length??0,l=Math.ceil((s*r/100+s%2)/2)*2-s%2,c=Math.round((i-a)/2),d=Math.round((s-l)/2);for(let u=c;u7089)throw new Error("Too much data");return Nx(r)}if(/^[0-9A-Z \$%\*\+\.\/\:\-]+$/.test(r)){if(i.byteLength>4296)throw new Error("Too much data");return xx(r)}if(o&&/^https?:/i.test(r))return Ex(r);if(i.byteLength>2953)throw new Error("Too much data");return Sx(new Uint8Array(i))}function sn(e,o,r){for(let i=1<>>=1)e.push(i&r?1:0)}function Sx(e){const o=e.byteLength,r=[];for(let s=0;s=e.length)return r;const i=Ll(e.slice(o),!1);return r.data27=r.data27.concat(i.data27),r.data10&&i.data10&&(r.data10=r.data10.concat(i.data10)),r.data1&&i.data1&&(r.data1=r.data1.concat(i.data1)),r}function Mx(e,o){e=[].slice.call(e);const r=Uf(o);for(let i=0;io;){if(!e[0]){e.shift();continue}const i=Hf(e[0]);for(let a=0;a<=o;a++)e[a]=e[a]^Dl(r[a]+i);e.shift()}return new Uint8Array(e)}const Tx=285,Sa=[1],$f=[];for(let e=1;e<256;e++){let o=Sa[e-1]<<1;o>255&&(o^=Tx),Sa[e]=o}for(let e=0;e<255;e++)$f[Sa[e]]=e;function Dl(e){for(;e<0;)e+=255;for(;e>255;)e-=255;return Sa[e]}function Hf(e){if(e<1||e>255)throw Error(`Bad log(${e})`);return $f[e]}const js=[[0],[0,0],[0,25,1]];function Uf(e){if(js[e])return js[e];const o=Uf(e-1),r=[];r[0]=o[0];for(let i=1;i<=e;i++)r[i]=Hf(Dl(o[i])^Dl(o[i-1]+e-1));return js[e]=r,r}function Ax(e){const o=(e<<2)+17;return Array(o).fill(null).map(()=>Array(o).fill(0))}function Ix(e){const o=e.length;for(let r=-3;r<=3;r++)for(let i=-3;i<=3;i++){const a=Math.max(r,i),s=Math.min(r,i),l=a==2&&s>=-2||s==-2&&a<=2?128:129;e[3+r][3+i]=l,e[3+r][o-4+i]=l,e[o-4+r][3+i]=l}for(let r=0;r<8;r++)e[7][r]=e[r][7]=e[7][o-r-1]=e[r][o-8]=e[o-8][r]=e[o-1-r][7]=128}function Ox(e){const o=e.length;if(o>21){const i=o-13;let a=Math.round(i/Math.ceil(i/28));a%2&&a++;const s=[];for(let l=i+6;l>10;l-=a)s.unshift(l);s.unshift(6);for(var r=0;r=-1||m==-1&&p<=1?128:129;e[c+u][d+h]=y}}}for(var r=8;r0;d--)c>>>9+d&&(c^=r<0;d--)c>>>11+d&&(c^=i<>C&1?129:128}for(var m=0;m<8;m++)l[8][u-1-m]=p(m),m<6&&(l[m][8]=p(m));for(var m=8;m<15;m++)l[u-15+m][8]=p(m),m>8&&(l[8][14-m]=p(m));l[7][8]=p(6),l[8][8]=p(7),l[8][7]=p(8);const y=o[(u-17)/4];if(!y)return;function _(C){return y>>C&1?129:128}for(var m=0;m<6;m++)for(let A=0;A<3;A++)l[u-11+A][m]=l[m][u-11+A]=_(m*3+A)}})(),sh=(function(){const e=[(o,r)=>(o+r)%2==0,(o,r)=>o%2==0,(o,r)=>r%3==0,(o,r)=>(o+r)%3==0,(o,r)=>(Math.floor(o/2)+Math.floor(r/3))%2==0,(o,r)=>o*r%2+o*r%3==0,(o,r)=>(o*r%2+o*r%3)%2==0,(o,r)=>(o*r%3+(o+r)%2)%2==0];return function(o,r,i){const a=o.length;let s,l,c=-1;s=l=a-1;const d=e[i];let u=r.blocks[r.blocks.length-1].length;for(var h=0;h-1)do o[s][l]=d(s,l)?1:0;while(y());function m(_){for(let C=128;C;C>>=1){let A=!!(C&_);d(s,l)&&(A=!A),o[s][l]=A?1:0,y()}}function y(){do if(l%2^+(l<6)?c<0&&s==0||c>0&&s==a-1?(l--,c=-c):(l++,s+=c):l--,l==6&&l--,l<0)return!1;while(o[s][l]&240);return!0}}})();function Dx(e){const o=e.length;let r=0;for(var i=0;i=5&&(r+=s-2),a=c,s=1}s>=5&&(r+=s-2)}for(var l=0;l=5&&(r+=s-2),a=c,s=1}s>=5&&(r+=s-2)}for(var i=0;i=4&&!(d(-4)||d(-3)||d(-2)||d(-1))&&(r+=40),l=4&&!(u(-4)||u(-3)||u(-2)||u(-1))&&(r+=40),ia.map(s=>s&1))}const zf=["L","M","Q","H"];function Px(e,o){let r=1,i;for(e.data1?i=Math.ceil(e.data1.length/8):r=10;r<10;r++){let a=Zs[r][o];if(a.data_len>=i)return qs(a)}for(e.data10?i=Math.ceil(e.data10.length/8):r=27;r<27;r++){let a=Zs[r][o];if(a.data_len>=i)return qs(a)}for(i=Math.ceil(e.data27.length/8);r<41;r++){let a=Zs[r][o];if(a.data_len>=i)return qs(a)}throw new Error("Too much data")}function Vx(e,o){const r=new Uint8ClampedArray(o.data_len);let i;o.version<10?i=e.data1:o.version<27?i=e.data10:i=e.data27;const a=i.length;for(let c=0;c{const d=r.slice(l,l+c);return l+=c,o.ec.push(Mx(d,o.ec_len)),d}),o}function Bx(e,o,r){o=zf.includes(o)?o:"M";const i=Ll(e,r),a=Vx(i,Px(i,o));return Rx(a)}const qs=typeof structuredClone<"u"?structuredClone:e=>JSON.parse(JSON.stringify(e)),$x=[[],[26,7,1,10,1,13,1,17,1],[44,10,1,16,1,22,1,28,1],[70,15,1,26,1,36,2,44,2],[100,20,1,36,2,52,2,64,4],[134,26,1,48,2,72,4,88,4],[172,36,2,64,4,96,4,112,4],[196,40,2,72,4,108,6,130,5],[242,48,2,88,4,132,6,156,6],[292,60,2,110,5,160,8,192,8],[346,72,4,130,5,192,8,224,8],[404,80,4,150,5,224,8,264,11],[466,96,4,176,8,260,10,308,11],[532,104,4,198,9,288,12,352,16],[581,120,4,216,9,320,16,384,16],[655,132,6,240,10,360,12,432,18],[733,144,6,280,10,408,17,480,16],[815,168,6,308,11,448,16,532,19],[901,180,6,338,13,504,18,588,21],[991,196,7,364,14,546,21,650,25],[1085,224,8,416,16,600,20,700,25],[1156,224,8,442,17,644,23,750,25],[1258,252,9,476,17,690,23,816,34],[1364,270,9,504,18,750,25,900,30],[1474,300,10,560,20,810,27,960,32],[1588,312,12,588,21,870,29,1050,35],[1706,336,12,644,23,952,34,1110,37],[1828,360,12,700,25,1020,34,1200,40],[1921,390,13,728,26,1050,35,1260,42],[2051,420,14,784,28,1140,38,1350,45],[2185,450,15,812,29,1200,40,1440,48],[2323,480,16,868,31,1290,43,1530,51],[2465,510,17,924,33,1350,45,1620,54],[2611,540,18,980,35,1440,48,1710,57],[2761,570,19,1036,37,1530,51,1800,60],[2876,570,19,1064,38,1590,53,1890,63],[3034,600,20,1120,40,1680,56,1980,66],[3196,630,21,1204,43,1770,59,2100,70],[3362,660,22,1260,45,1860,62,2220,74],[3532,720,24,1316,47,1950,65,2310,77],[3706,750,25,1372,49,2040,68,2430,81]],Zs=$x.map((e,o)=>{if(!o)return Object.create(null);const r=Object.create(null);for(let i=1;i<8;i+=2){const a=e[0]-e[i],s=e[i+1],l=zf[i/2|0],c={version:o,ec_level:l,data_len:a,ec_len:e[i]/s,blocks:[],ec:[]};for(let d=s,u=a;d>0;d--){const h=u/d|0;c.blocks.push(h),u-=h}r[l]=c}return r});var Js={exports:{}},lh,ch;function Hx(){return ch||(ch=1,lh={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),lh}var Ks={exports:{}},dh,uh;function Ux(){return uh||(uh=1,dh=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}),dh}var hh;function zx(){if(hh)return Ks.exports;hh=1;var e=Ux(),o=Array.prototype.concat,r=Array.prototype.slice,i=Ks.exports=function(a){for(var s=[],l=0,c=a.length;l=4&&d[3]!==1&&(u=", "+d[3]),"hwb("+d[0]+", "+d[1]+"%, "+d[2]+"%"+u+")"},s.to.keyword=function(d){return i[d.slice(0,3)]};function l(d,u,h){return Math.min(Math.max(u,d),h)}function c(d){var u=Math.round(d).toString(16).toUpperCase();return u.length<2?"0"+u:u}return Js.exports}var Fx=Gx();const fh=Xa(Fx);function Yx(e){return{...(e?.type??"png")==="png"?jx:qx,...e}}function Qs(e){return typeof e=="string"?fh.to.hex(fh.get.rgb(e)):`#${(e>>>8).toString(16).padStart(6,"0")}`}const Gf=(e,o)=>["M",e,o],Ff=()=>["z"],lo=(e,o,r,i=0)=>e>0?["a",e,e,0,0,i,o,r]:[],xa=e=>["v",e],Na=e=>["h",e];function Xx(e,o=0,r=0,i=0){const a=e.length*o+r*2;let s=7;const l=[[0,0],[1,0],[0,1]],c=[];for(const d of l){const[u,h]=d.map(p=>p==0?1:-1);for(const p of[0,1,2]){let m=a*d[0]+u*(r+o*p),y=a*d[1]+h*(r+o*p);const _=u*(o*(s-2*p)-2*i),C=h*(o*(s-2*p)-2*i);let A=[Gf(m,y+i*h),xa(C),lo(i,i*u,i*h,d[1]|d[0]),Na(_),lo(i,i*u,-i*h,d[1]|d[0]),xa(-C),lo(i,-i*u,-i*h,d[1]|d[0]),Na(-_),lo(i,-i*u,i*h,d[1]|d[0]),Ff()];c.push(...A.flat())}}return c.join(" ")}function Wx(e,o,r=0,i=0){let a=[];for(let s=0;s{let o={};return e.forEach((r,i)=>o[r]=i),o})(qr),Kx=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,xe=String.fromCharCode.bind(String),yh=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Wf=e=>e.replace(/=/g,"").replace(/[+\/]/g,o=>o=="+"?"-":"_"),jf=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),qf=e=>{let o,r,i,a,s="";const l=e.length%3;for(let c=0;c255||(i=e.charCodeAt(c++))>255||(a=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");o=r<<16|i<<8|a,s+=qr[o>>18&63]+qr[o>>12&63]+qr[o>>6&63]+qr[o&63]}return l?s.slice(0,l-3)+"===".substring(l):s},Hc=typeof btoa=="function"?e=>btoa(e):Or?e=>Qe.from(e,"binary").toString("base64"):qf,Rl=Or?e=>Qe.from(e).toString("base64"):e=>{let o=[];for(let r=0,i=e.length;ro?Wf(Rl(e)):Rl(e),Qx=e=>{if(e.length<2){var o=e.charCodeAt(0);return o<128?e:o<2048?xe(192|o>>>6)+xe(128|o&63):xe(224|o>>>12&15)+xe(128|o>>>6&63)+xe(128|o&63)}else{var o=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return xe(240|o>>>18&7)+xe(128|o>>>12&63)+xe(128|o>>>6&63)+xe(128|o&63)}},tN=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Zf=e=>e.replace(tN,Qx),vh=Or?e=>Qe.from(e,"utf8").toString("base64"):gh?e=>Rl(gh.encode(e)):e=>Hc(Zf(e)),ur=(e,o=!1)=>o?Wf(vh(e)):vh(e),bh=e=>ur(e,!0),eN=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,nN=e=>{switch(e.length){case 4:var o=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=o-65536;return xe((r>>>10)+55296)+xe((r&1023)+56320);case 3:return xe((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return xe((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Jf=e=>e.replace(eN,nN),Kf=e=>{if(e=e.replace(/\s+/g,""),!Kx.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let o,r="",i,a;for(let s=0;s>16&255):a===64?xe(o>>16&255,o>>8&255):xe(o>>16&255,o>>8&255,o&255);return r},Uc=typeof atob=="function"?e=>atob(jf(e)):Or?e=>Qe.from(e,"base64").toString("binary"):Kf,Qf=Or?e=>yh(Qe.from(e,"base64")):e=>yh(Uc(e).split("").map(o=>o.charCodeAt(0))),t1=e=>Qf(e1(e)),oN=Or?e=>Qe.from(e,"base64").toString("utf8"):mh?e=>mh.decode(Qf(e)):e=>Jf(Uc(e)),e1=e=>jf(e.replace(/[-_]/g,o=>o=="-"?"+":"/")),Pl=e=>oN(e1(e)),rN=e=>{if(typeof e!="string")return!1;const o=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(o)||!/[^\s0-9a-zA-Z\-_]/.test(o)},n1=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),o1=function(){const e=(o,r)=>Object.defineProperty(String.prototype,o,n1(r));e("fromBase64",function(){return Pl(this)}),e("toBase64",function(o){return ur(this,o)}),e("toBase64URI",function(){return ur(this,!0)}),e("toBase64URL",function(){return ur(this,!0)}),e("toUint8Array",function(){return t1(this)})},r1=function(){const e=(o,r)=>Object.defineProperty(Uint8Array.prototype,o,n1(r));e("toBase64",function(o){return oa(this,o)}),e("toBase64URI",function(){return oa(this,!0)}),e("toBase64URL",function(){return oa(this,!0)})},iN=()=>{o1(),r1()},aN={version:Xf,VERSION:Zx,atob:Uc,atobPolyfill:Kf,btoa:Hc,btoaPolyfill:qf,fromBase64:Pl,toBase64:ur,encode:ur,encodeURI:bh,encodeURL:bh,utob:Zf,btou:Jf,decode:Pl,isValid:rN,fromUint8Array:oa,toUint8Array:t1,extendString:o1,extendUint8Array:r1,extendBuiltins:iN};function sN(e,o={}){const r=Yx({...o,type:"svg"});let i=Bx(e,r.ec_level,r.parse_url);return i=_x(i),r.logo&&r.logoWidth&&r.logoHeight&&!r.noExcavate&&(i=Cx(i,r.logoWidth,r.logoHeight)),cN({matrix:i,...r})}const lN=new TextEncoder;function cN({matrix:e,margin:o,size:r,logo:i,logoWidth:a,logoHeight:s,color:l,bgColor:c,imageWidth:d,imageHeight:u,borderRadius:h}){const p=r||9,m=e.length*p,y=o*p,_=m+2*y,C=d?` width="${d}"`:"",A=u?` height="${d}"`:"",T='',V=``,B=dN(e,{color:l,bgColor:c,size:_,margin:o,blockSize:p,borderRadius:h}),Z="",W=i?uN(i,y,m,a,s):"";return lN.encode(T+V+B+W+Z)}function dN(e,o){const r=Wx(e,o.blockSize,o.margin*o.blockSize,o.borderRadius),i=Xx(e,o.blockSize,o.margin*o.blockSize,o.borderRadius);let a=``;return a+=``,a+=``,a}function uN(e,o,r,i,a){const s=`data:image/png;base64,${aN.fromUint8Array(new Uint8Array(e))}`,l=i/100*r,c=a/100*r;return``}const hN={name:"CakeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},pN=["aria-hidden","aria-label"],fN=["fill","width","height"],mN={d:"M11.5,0.5C12,0.75 13,2.4 13,3.5C13,4.6 12.33,5 11.5,5C10.67,5 10,4.85 10,3.75C10,2.65 11,2 11.5,0.5M18.5,9C21,9 23,11 23,13.5C23,15.06 22.21,16.43 21,17.24V23H12L3,23V17.24C1.79,16.43 1,15.06 1,13.5C1,11 3,9 5.5,9H10V6H13V9H18.5M12,16A2.5,2.5 0 0,0 14.5,13.5H16A2.5,2.5 0 0,0 18.5,16A2.5,2.5 0 0,0 21,13.5A2.5,2.5 0 0,0 18.5,11H5.5A2.5,2.5 0 0,0 3,13.5A2.5,2.5 0 0,0 5.5,16A2.5,2.5 0 0,0 8,13.5H9.5A2.5,2.5 0 0,0 12,16Z"},gN={key:0};function yN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon cake-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",mN,[r.title?(f(),k("title",gN,L(r.title),1)):R("",!0)])],8,fN))],16,pN)}const vN=ot(hN,[["render",yN]]),bN={name:"EyeCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},_N=["aria-hidden","aria-label"],CN=["fill","width","height"],wN={d:"M12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,11A1,1 0 0,1 13,12A1,1 0 0,1 12,13A1,1 0 0,1 11,12A1,1 0 0,1 12,11M12,8C14.63,8 17,9.57 18,12C16.62,15.31 12.81,16.88 9.5,15.5C7.92,14.84 6.66,13.58 6,12C7,9.57 9.37,8 12,8M12,9.5A2.5,2.5 0 0,0 9.5,12A2.5,2.5 0 0,0 12,14.5A2.5,2.5 0 0,0 14.5,12A2.5,2.5 0 0,0 12,9.5"},kN={key:0};function SN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon eye-circle-outline-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",wN,[r.title?(f(),k("title",kN,L(r.title),1)):R("",!0)])],8,CN))],16,_N)}const xN=ot(bN,[["render",SN]]),NN={name:"FolderMultipleImageIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},EN=["aria-hidden","aria-label"],MN=["fill","width","height"],TN={d:"M7,15L11.5,9L15,13.5L17.5,10.5L21,15M22,4H14L12,2H6A2,2 0 0,0 4,4V16A2,2 0 0,0 6,18H22A2,2 0 0,0 24,16V6A2,2 0 0,0 22,4M2,6H0V11H0V20A2,2 0 0,0 2,22H20V20H2V6Z"},AN={key:0};function IN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon folder-multiple-image-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",TN,[r.title?(f(),k("title",AN,L(r.title),1)):R("",!0)])],8,MN))],16,EN)}const ON=ot(NN,[["render",IN]]),LN={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},DN=["aria-hidden","aria-label"],RN=["fill","width","height"],PN={d:"M3,11H5V13H3V11M11,5H13V9H11V5M9,11H13V15H11V13H9V11M15,11H17V13H19V11H21V13H19V15H21V19H19V21H17V19H13V21H11V17H15V15H17V13H15V11M19,19V15H17V19H19M15,3H21V9H15V3M17,5V7H19V5H17M3,3H9V9H3V3M5,5V7H7V5H5M3,15H9V21H3V15M5,17V19H7V17H5Z"},VN={key:0};function BN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon qrcode-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",PN,[r.title?(f(),k("title",VN,L(r.title),1)):R("",!0)])],8,RN))],16,DN)}const $N=ot(LN,[["render",BN]]),HN={name:"TrayArrowDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},UN=["aria-hidden","aria-label"],zN=["fill","width","height"],GN={d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 15L17.55 9.54L16.13 8.13L13 11.25V2H11V11.25L7.88 8.13L6.46 9.55L12 15Z"},FN={key:0};function YN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon tray-arrow-down-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",GN,[r.title?(f(),k("title",FN,L(r.title),1)):R("",!0)])],8,zN))],16,UN)}const os=ot(HN,[["render",YN]]),XN={name:"ChevronLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},WN=["aria-hidden","aria-label"],jN=["fill","width","height"],qN={d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},ZN={key:0};function JN(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon chevron-left-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",qN,[r.title?(f(),k("title",ZN,L(r.title),1)):R("",!0)])],8,jN))],16,WN)}const KN=ot(XN,[["render",JN]]),QN={name:"DotsHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},t6=["aria-hidden","aria-label"],e6=["fill","width","height"],n6={d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"},o6={key:0};function r6(e,o,r,i,a,s){return f(),k("span",gt(e.$attrs,{"aria-hidden":r.title?null:"true","aria-label":r.title,class:"material-design-icon dots-horizontal-icon",role:"img",onClick:o[0]||(o[0]=l=>e.$emit("click",l))}),[(f(),k("svg",{fill:r.fillColor,class:"material-design-icon__svg",width:r.size,height:r.size,viewBox:"0 0 24 24"},[D("path",n6,[r.title?(f(),k("title",o6,L(r.title),1)):R("",!0)])],8,e6))],16,t6)}const i6=ot(QN,[["render",r6]]),a6={name:"ContactDetailsAddNewProp",components:{IconAdd:Ir,PropertyTitleIcon:Yg,Actions:_o,ActionButton:jn,ChevronLeft:KN,DotsHorizontalIcon:i6},mixins:[Fg],props:{contact:{type:oc,default:null},bus:{type:Object,required:!0}},data(){return{moreActionsOpen:!1}},computed:{properties(){return bn.properties},propertiesOrder(){return bn.fieldOrder},usedProperties(){return this.contact.jCal[1].map(e=>e[0])},availablePrimaryProperties(){return Object.keys(this.properties).filter(e=>this.properties[e].primary).map(e=>({id:e,name:this.properties[e].readableName,icon:this.properties[e].icon})).sort((e,o)=>this.propertiesOrder.indexOf(e.id)-this.propertiesOrder.indexOf(o.id))},availableSecondaryProperties(){return Object.keys(this.properties).filter(e=>!this.properties[e].primary).map(e=>({id:e,name:this.properties[e].readableName,icon:this.properties[e].icon})).sort((e,o)=>e.name.localeCompare(o.name))}},created(){this.bus.on("add-prop",this.addProp)},unmounted(){this.bus.off("add-prop",this.addProp)},methods:{async addProp(e){if(this.usedProperties.includes(e)&&!this.properties[e].multiple){this.bus.emit("focus-prop",e);return}if(e==="x-managersname"){const o=this.otherContacts(this.contact);o.length===1?(await this.contact.vCard.addPropertyWithValue(e,o[0].key),await this.$store.dispatch("updateContact",this.contact)):await this.contact.vCard.addPropertyWithValue(e,"")}else if(this.properties[e]&&this.properties[e].defaultjCal&&this.properties[e].defaultjCal[this.contact.version]){const o=this.properties[e].defaultjCal[this.contact.version],r=new Fa.Property([e,...o]);await this.contact.vCard.addProperty(r)}else{const o=this.properties[e].defaultValue;let r=o?o.value:"";Array.isArray(r)&&(r=[...r]);const i=await this.contact.vCard.addPropertyWithValue(e,r);o&&o.type&&i.setParameter("type",o.type)}this.moreActionsOpen=!1,this.bus.emit("focus-prop",e)}}},s6={class:"property__row"},l6={class:"property__value"};function c6(e,o,r,i,a,s){const l=w("IconAdd"),c=w("PropertyTitleIcon"),d=w("ActionButton"),u=w("DotsHorizontalIcon"),h=w("ChevronLeft"),p=w("Actions");return f(),k("div",s6,[o[3]||(o[3]=D("div",{class:"property__label"},null,-1)),D("div",l6,[E(p,{"menu-align":"right",event:"",variant:"secondary","menu-name":e.t("contacts","Add more info"),onClick:o[2]||(o[2]=ce(()=>{},["prevent"]))},{icon:S(()=>[E(l,{size:20})]),default:S(()=>[a.moreActionsOpen?R("",!0):(f(),k(bt,{key:0},[(f(!0),k(bt,null,Wt(s.availablePrimaryProperties,m=>(f(),I(d,{key:m.id,class:"action--primary","close-after-click":!0,onClick:ce(y=>s.addProp(m.id),["prevent"])},{icon:S(()=>[E(c,{icon:m.icon},null,8,["icon"])]),default:S(()=>[J(" "+L(m.name),1)]),_:2},1032,["onClick"]))),128)),E(d,{"close-after-click":!1,onClick:o[0]||(o[0]=m=>a.moreActionsOpen=!0)},{icon:S(()=>[E(u,{title:e.t("contacts","More fields"),size:20},null,8,["title"])]),default:S(()=>[J(" "+L(e.t("contacts","More fields")),1)]),_:1})],64)),a.moreActionsOpen?(f(),k(bt,{key:1},[E(d,{"close-after-click":!1,onClick:o[1]||(o[1]=m=>a.moreActionsOpen=!1)},{icon:S(()=>[E(h,{title:e.t("contacts","More fields"),size:20},null,8,["title"]),J(" "+L(e.t("contacts","More fields")),1)]),_:1}),(f(!0),k(bt,null,Wt(s.availableSecondaryProperties,m=>(f(),I(d,{key:m.id,class:"action--primary","close-after-click":!0,onClick:ce(y=>s.addProp(m.id),["prevent"])},{icon:S(()=>[E(c,{icon:m.icon},null,8,["icon"])]),default:S(()=>[J(" "+L(m.name),1)]),_:2},1032,["onClick"]))),128))],64)):R("",!0)]),_:1},8,["menu-name"])]),o[4]||(o[4]=D("div",{class:"property__actions"},null,-1))])}const d6=ot(a6,[["render",c6]]);var $i={},_h={exports:{}},Ch={};const Sr=Symbol(""),hr=Symbol(""),rs=Symbol(""),ci=Symbol(""),zc=Symbol(""),vo=Symbol(""),Gc=Symbol(""),Fc=Symbol(""),is=Symbol(""),as=Symbol(""),Lr=Symbol(""),ss=Symbol(""),Yc=Symbol(""),ls=Symbol(""),cs=Symbol(""),ds=Symbol(""),us=Symbol(""),hs=Symbol(""),ps=Symbol(""),Xc=Symbol(""),Wc=Symbol(""),wi=Symbol(""),di=Symbol(""),fs=Symbol(""),ms=Symbol(""),xr=Symbol(""),Dr=Symbol(""),gs=Symbol(""),Ea=Symbol(""),i1=Symbol(""),Ma=Symbol(""),ui=Symbol(""),a1=Symbol(""),s1=Symbol(""),ys=Symbol(""),l1=Symbol(""),c1=Symbol(""),vs=Symbol(""),jc=Symbol(""),Xo={[Sr]:"Fragment",[hr]:"Teleport",[rs]:"Suspense",[ci]:"KeepAlive",[zc]:"BaseTransition",[vo]:"openBlock",[Gc]:"createBlock",[Fc]:"createElementBlock",[is]:"createVNode",[as]:"createElementVNode",[Lr]:"createCommentVNode",[ss]:"createTextVNode",[Yc]:"createStaticVNode",[ls]:"resolveComponent",[cs]:"resolveDynamicComponent",[ds]:"resolveDirective",[us]:"resolveFilter",[hs]:"withDirectives",[ps]:"renderList",[Xc]:"renderSlot",[Wc]:"createSlots",[wi]:"toDisplayString",[di]:"mergeProps",[fs]:"normalizeClass",[ms]:"normalizeStyle",[xr]:"normalizeProps",[Dr]:"guardReactiveProps",[gs]:"toHandlers",[Ea]:"camelize",[i1]:"capitalize",[Ma]:"toHandlerKey",[ui]:"setBlockTracking",[a1]:"pushScopeId",[s1]:"popScopeId",[ys]:"withCtx",[l1]:"unref",[c1]:"isRef",[vs]:"withMemo",[jc]:"isMemoSame"};function d1(e){Object.getOwnPropertySymbols(e).forEach(o=>{Xo[o]=e[o]})}const u6={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},h6={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},p6={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},f6={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},Ce={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function u1(e,o=""){return{type:0,source:o,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Ce}}function Nr(e,o,r,i,a,s,l,c=!1,d=!1,u=!1,h=Ce){return e&&(c?(e.helper(vo),e.helper(qo(e.inSSR,u))):e.helper(jo(e.inSSR,u)),l&&e.helper(hs)),{type:13,tag:o,props:r,children:i,patchFlag:a,dynamicProps:s,directives:l,isBlock:c,disableTracking:d,isComponent:u,loc:h}}function fo(e,o=Ce){return{type:17,loc:o,elements:e}}function Ye(e,o=Ce){return{type:15,loc:o,properties:e}}function de(e,o){return{type:16,loc:Ce,key:_e(e)?_t(e,!0):e,value:o}}function _t(e,o=!1,r=Ce,i=0){return{type:4,loc:r,content:e,isStatic:o,constType:o?3:i}}function m6(e,o){return{type:5,loc:o,content:_e(e)?_t(e,!1,o):e}}function Ke(e,o=Ce){return{type:8,loc:o,children:e}}function me(e,o=[],r=Ce){return{type:14,loc:r,callee:e,arguments:o}}function Wo(e,o=void 0,r=!1,i=!1,a=Ce){return{type:18,params:e,returns:o,newline:r,isSlot:i,loc:a}}function Ta(e,o,r,i=!0){return{type:19,test:e,consequent:o,alternate:r,newline:i,loc:Ce}}function h1(e,o,r=!1,i=!1){return{type:20,index:e,value:o,needPauseTracking:r,inVOnce:i,needArraySpread:!1,loc:Ce}}function p1(e){return{type:21,body:e,loc:Ce}}function g6(e){return{type:22,elements:e,loc:Ce}}function y6(e,o,r){return{type:23,test:e,consequent:o,alternate:r,loc:Ce}}function v6(e,o){return{type:24,left:e,right:o,loc:Ce}}function b6(e){return{type:25,expressions:e,loc:Ce}}function _6(e){return{type:26,returns:e,loc:Ce}}function jo(e,o){return e||o?is:as}function qo(e,o){return e||o?Gc:Fc}function bs(e,{helper:o,removeHelper:r,inSSR:i}){e.isBlock||(e.isBlock=!0,r(jo(i,e.isComponent)),o(vo),o(qo(i,e.isComponent)))}const wh=new Uint8Array([123,123]),kh=new Uint8Array([125,125]);function Sh(e){return e>=97&&e<=122||e>=65&&e<=90}function Fe(e){return e===32||e===10||e===9||e===12||e===13}function oo(e){return e===47||e===62||Fe(e)}function Aa(e){const o=new Uint8Array(e.length);for(let r=0;r100){let l=-1,c=a;for(;l+1>>1;this.newlines[d]=0;l--)if(o>this.newlines[l]){s=l;break}return s>=0&&(r=s+2,i=o-this.newlines[s]),{column:i,line:r,offset:o}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(o){o===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&o===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(o))}stateInterpolationOpen(o){if(o===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const r=this.index+1-this.delimiterOpen.length;r>this.sectionStart&&this.cbs.ontext(this.sectionStart,r),this.state=3,this.sectionStart=r}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(o)):(this.state=1,this.stateText(o))}stateInterpolation(o){o===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(o))}stateInterpolationClose(o){o===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(o))}stateSpecialStartSequence(o){const r=this.sequenceIndex===this.currentSequence.length;if(!(r?oo(o):(o|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(o)}stateInRCDATA(o){if(this.sequenceIndex===this.currentSequence.length){if(o===62||Fe(o)){const r=this.index-this.currentSequence.length;if(this.sectionStart=o||(this.state===28?this.currentSequence===Te.CdataEnd?this.cbs.oncdata(this.sectionStart,o):this.cbs.oncomment(this.sectionStart,o):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,o))}emitCodePoint(o,r){}}const w6={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},k6={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with