Viewing File: /usr/local/cpanel/base/frontend/jupiter/koality/_nuxt/DjRJSITw.js
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D7qtAg9b.js","./EJiqiqZX.js","./entry.D7E-n75W.css","./88opOQSr.js","./iik6CYzq.js","./T6C-Yz8C.js","./8R23gm1P.js","./DPX3lXZf.js","./CSwwpV8A.js","./CC92fphK.js","./B3XbUJXz.js","./NwK2Pm4d.js","./DP2TcMhG.js","./BfhOLfqp.js","./qv9l9arW.js","./CASzI7RK.js","./C3miKDOS.js","./b6minSIt.js","./BBOQFEVZ.js","./lBS7YjNH.js","./BiEw5mdv.js","./COaTHx-9.js","./NkNhW2e0.js","./C7N-0LoA.js","./DdwpRztj.js","./DafFd-NR.js"])))=>i.map(i=>d[i]);
import{_ as ma}from"./BG5HN8sx.js";import{d as ue,o as p,c as G,w as z,ag as le,ah as _e,k as i,ai as Qo,s as Y,am as Yt,an as Jt,v as mt,h as st,cE as fa,J as bt,I as Zt,a1 as yt,f as es,e as v,b as a,aB as Xt,D,a as q,_ as xe,n as we,l as de,t as E,p as T,F as oe,r as ce,B as ts,A as N,aa as ga,N as Un,i as ye,cF as va,u as tt,z as Ge,a9 as ba,q as it,a6 as Kn,cG as ya,cH as xa,ab as ks,ac as Ss,j as ss,H as Zo,m as be,cI as _a,a8 as Wn,y as Cs,ao as os,aq as ns,aC as wa,as as oo,aS as en,at as ht,a4 as qn,cJ as ka,R as Vn,P as tn,K as Sa,aH as Yn,cK as Ca,cL as $a,E as Kt,aI as Lo,cM as vn,cN as Aa,ck as go,bj as nt,aQ as sn,ad as Bo,ar as $s,aj as Ea,al as Ta,bM as La,aO as kt,ch as Ba,aP as no,bb as Jn,bc as Qt,bd as Pa,b_ as Ra,b8 as on,G as bn,ap as Xn,cO as Ia,bN as Qn,aG as Ne,a7 as nn,cq as Zn,cP as er,cQ as tr,bR as Oa,aF as rn,be as Po,cR as Ha,bC as Fa,cS as sr,cT as Da,cU as Ma,cV as ja,cW as Na,L as Ga,cX as za,cY as or,cZ as nr,c_ as Ua,c$ as rr,d0 as yn,d1 as ar,d2 as Rt,d3 as vs,d4 as Ka,d5 as Wa,d6 as qa,d7 as Va,d8 as Ya,ct as vo,a0 as ir,d9 as Ja,da as Xa,db as Qa,dc as Za,dd as Ro,de as ei,a2 as lr,df as ti,dg as si,dh as oi,di as Fs,c0 as ni,dj as bo,dk as ri,dl as xn,dm as ai,dn as ii,X as li,aJ as ci,Q as cr,cn as ui,dp as _n,ay as wn,au as kn,av as di,S as Sn,M as pi,aR as hi}from"./EJiqiqZX.js";import{_ as ur,u as dr}from"./B3eT7fP4.js";import{_ as mi,a as fi}from"./D7qtAg9b.js";import{_ as an}from"./b6minSIt.js";import{_ as ln,D as ot,a as gi,b as vi,c as bi}from"./Bd9WPADb.js";import{u as cn}from"./558z3Na8.js";import{u as yi}from"./Cg_EhOYR.js";import{_ as Ks}from"./D_7mLYJ8.js";import{_ as pr}from"./BfhOLfqp.js";import{i as xi,_ as _i,L as wi,a as ki,b as Si,c as Ci,d as $i,e as Ai,f as Ei,g as Ti}from"./nktVwxwq.js";import{t as Li}from"./DTYT2AtJ.js";import{_ as Bi}from"./BiEw5mdv.js";import{d as Pi,D as Ri,a as Cn,b as $n}from"./CASzI7RK.js";import{b as Ii,D as Oi,a as Hi}from"./qv9l9arW.js";import{_ as un}from"./deQQpL8V.js";import{_ as Fi}from"./DPX3lXZf.js";import{_ as hr}from"./DFn9I5Nm.js";import{d as ro,s as xs}from"./DYAeJWb9.js";import{_ as Di}from"./CPUUPkX6.js";import{u as Mi}from"./CcxZmWN0.js";import{u as mr}from"./CyytCdLd.js";import"./88opOQSr.js";import"./iik6CYzq.js";import"./B3XbUJXz.js";import"./CSwwpV8A.js";import"./CC92fphK.js";import"./CB5_IlOE.js";import"./Cqd5VgjX.js";import"./NwK2Pm4d.js";import"./iLxCpTU2.js";import"./BdHYZYxo.js";import"./CZ4rlL_s.js";var ji=ue({__name:"ListboxGroupLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,s=xi({id:""});return(o,n)=>(p(),G(i(Qo),_e(t,{id:i(s).id}),{default:z(()=>[le(o.$slots,"default")]),_:3},16,["id"]))}}),Ni=ji,Gi=ue({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,s=["horizontal","vertical"];function o(u){return s.includes(u)}const n=Y(()=>o(t.orientation)?t.orientation:"horizontal"),r=Y(()=>n.value==="vertical"?t.orientation:void 0),l=Y(()=>t.decorative?{role:"none"}:{"aria-orientation":r.value,role:"separator"});return(u,d)=>(p(),G(i(Qo),_e({as:u.as,"as-child":u.asChild,"data-orientation":n.value},l.value),{default:z(()=>[le(u.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),zi=Gi,Ui=ue({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(s,o)=>(p(),G(zi,Yt(Jt(t)),{default:z(()=>[le(s.$slots,"default")]),_:3},16))}}),Ki=Ui;const Wi={slots:{root:"data-[disabled]:opacity-75",picker:"flex gap-4",selector:"rounded-md touch-none",selectorBackground:"w-full h-full relative rounded-md",selectorThumb:"-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-white rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",track:"w-[8px] relative rounded-md touch-none",trackThumb:"absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-white cursor-pointer data-[disabled]:cursor-not-allowed"},variants:{size:{xs:{selector:"w-38 h-38",track:"h-38"},sm:{selector:"w-40 h-40",track:"h-40"},md:{selector:"w-42 h-42",track:"h-42"},lg:{selector:"w-44 h-44",track:"h-44"},xl:{selector:"w-46 h-46",track:"h-46"}}},compoundVariants:[],defaultVariants:{size:"md"}},qi={slots:{root:"flex flex-col min-h-0 min-w-0 divide-y divide-default",input:"",close:"",back:"p-0",content:"relative overflow-hidden flex flex-col",footer:"p-1",viewport:"relative scroll-py-1 overflow-y-auto flex-1 focus:outline-none",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex items-center",itemTrailingIcon:"shrink-0",itemTrailingHighlightedIcon:"shrink-0 text-dimmed hidden group-data-highlighted:inline-flex",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate space-x-1 text-dimmed",itemDescription:"truncate text-muted",itemLabelBase:"text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary",itemLabelPrefix:"text-default",itemLabelSuffix:"text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary"},variants:{virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}},size:{xs:{input:"[&>input]:h-10",empty:"py-3 text-xs",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailing:"gap-1",itemTrailingIcon:"size-4",itemTrailingHighlightedIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{input:"[&>input]:h-11",empty:"py-4 text-xs",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailing:"gap-1.5",itemTrailingIcon:"size-4",itemTrailingHighlightedIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{input:"[&>input]:h-12",empty:"py-6 text-sm",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailing:"gap-1.5",itemTrailingIcon:"size-5",itemTrailingHighlightedIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{input:"[&>input]:h-13",empty:"py-7 text-sm",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailing:"gap-2",itemTrailingIcon:"size-5",itemTrailingHighlightedIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},xl:{input:"[&>input]:h-14",empty:"py-8 text-base",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailing:"gap-2",itemTrailingIcon:"size-6",itemTrailingHighlightedIcon:"size-6",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"lg"}},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}}},defaultVariants:{size:"md"}},Vi={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}},snapPoints:{true:""}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["top","bottom"],snapPoints:!0,class:{content:"h-full"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:["right","left"],snapPoints:!0,class:{content:"w-full"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},Yi={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-dropdown-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",arrow:"fill-default",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},Ji={slots:{root:"flex items-center align-center text-center",border:"",container:"font-medium text-default flex",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xs",label:"text-sm"},variants:{color:{primary:{border:"border-primary"},secondary:{border:"border-secondary"},success:{border:"border-success"},info:{border:"border-info"},warning:{border:"border-warning"},error:{border:"border-error"},neutral:{border:"border-default"}},orientation:{horizontal:{root:"w-full flex-row",border:"w-full",container:"mx-3 whitespace-nowrap"},vertical:{root:"h-full flex-col",border:"h-full",container:"my-2"}},size:{xs:"",sm:"",md:"",lg:"",xl:""},type:{solid:{border:"border-solid"},dashed:{border:"border-dashed"},dotted:{border:"border-dotted"}}},compoundVariants:[{orientation:"horizontal",size:"xs",class:{border:"border-t"}},{orientation:"horizontal",size:"sm",class:{border:"border-t-[2px]"}},{orientation:"horizontal",size:"md",class:{border:"border-t-[3px]"}},{orientation:"horizontal",size:"lg",class:{border:"border-t-[4px]"}},{orientation:"horizontal",size:"xl",class:{border:"border-t-[5px]"}},{orientation:"vertical",size:"xs",class:{border:"border-s"}},{orientation:"vertical",size:"sm",class:{border:"border-s-[2px]"}},{orientation:"vertical",size:"md",class:{border:"border-s-[3px]"}},{orientation:"vertical",size:"lg",class:{border:"border-s-[4px]"}},{orientation:"vertical",size:"xl",class:{border:"border-s-[5px]"}}],defaultVariants:{color:"neutral",size:"xs",type:"solid"}},Xi={key:1,class:"relative"},Qi=["aria-expanded","aria-label"],Zi={class:"m-px o_px-3 rounded-sm w-full leading-tight flex items-center justify-between transition-all duration-300 text-uiText hover:text-uiText-highlighted hover:bg-uiBg-30"},el={class:"flex o_gap-2 items-center"},tl={key:0,class:"bg-uiBg o_z-1 h-[50px] absolute bottom-0 left-0 right-0 mask-t-from-20% mask-t-to-100% o_opacity-70 pointer-events-none"},sl={class:"max-h-[290px] overflow-y-auto hide-scrollbar"},ol={role:"navigation",class:"bg-uiBg-20 select-none cursor-pointer transition-all duration-300 flex flex-col gap-px"},nl={key:0},rl={class:"font-medium block o_pb-1"},al={key:0,class:"italic block"},il={key:1,class:"flex items-center o_gap-2 truncate -o_ml-2"},ll={class:"block w-[calc(100%-16px)]"},cl={class:"truncate block font-medium o_opacity-90"},ul={class:"text-sm truncate leading-relaxed min-h-4 o_opacity-90 block"},dl=ue({__name:"ProjectSelector",setup(e){const t=mt(),s=st(),o=t.allSystems,n=N(!1),r=N(null);fa(r,()=>{n.value=!1});const{t:l}=bt(),u=Zt(),{stateColor:d}=dr(),c=(w,y,S)=>{if(!w)return d.unboarded;const C=u.simpleScores.find(R=>R.pid===y&&R.sid===S);return d[C?.status??"incomplete"]},{inProjectLevel:h}=yt(),{policyGuard:f}=es(),m=Y(()=>f("customer.addNewProject",{trackingContext:{components:"ProjectSelector"}})),g=Y(()=>{const w=t.allSystems.map(y=>({name:y.name,subtitle:y.domain,key:`${y.pid}-${y.sid}`,to:{name:"p-pid-sid",params:{pid:y.pid,sid:y.sid}},isActive:h.value&&t.currentPid===y.pid&&t.currentSid===y.sid,mainStateColor:c(y.onboarded,y.pid,y.sid)}));return w.unshift({name:l("pages.projectsOverview"),subtitle:m.value?l("addNewMainProject"):"",key:"overview",to:{name:"index"},isActive:h.value}),w}),b=Y(()=>s.params.pid!==void 0);return(w,y)=>{const S=ma,C=xe,R=ts,F=ur;return p(),v("div",{ref_key:"projectSelectorRef",ref:r,class:"w-full"},[i(t).projectsLoaded?(p(),v("div",Xi,[a("div",{"data-cy":"trigger",class:D([[i(o).length?"cursor-pointer":"",i(b)?"font-medium":""],"o_h-11 flex items-stretch"]),tabindex:"0",role:"button","data-testid":"ta-project-selector","aria-expanded":i(n),"aria-label":w.$t("projects"),onClick:y[0]||(y[0]=M=>n.value=!i(n)),onKeydown:y[1]||(y[1]=Xt(M=>n.value=!i(n),["enter"]))},[a("div",Zi,[a("div",el,[q(C,{name:i(we).icoSuitcase,class:"size-4"},null,8,["name"]),de(" "+E(w.$t("projects")),1)]),q(C,{name:i(we).icoChevron,class:D(["size-4 o_opacity-60",[i(n)?"rotate-180":""]])},null,8,["name","class"])])],42,Qi),q(F,{open:i(n),class:"absolute left-0 right-0 w-full bottom-[-1px] o_z-30 rounded-b o_overflow-hidden o_shadow-lg dark:shadow-gray-950/60 translate-y-full"},{default:z(()=>[i(g).length>4?(p(),v("div",tl)):T("",!0),a("div",sl,[a("nav",ol,[(p(!0),v(oe,null,ce(i(g),(M,U)=>(p(),G(R,{key:M.key,to:M.to,class:D(["o_py-2 o_px-4 transition-all duration-200 ease-in-out",[M.isActive&&U!==0?"italic bg-uiPrime-10 text-uiText-muted":"bg-uiBg hover:bg-uiBg-10 text-uiText hover:text-uiText-muted"]]),"data-testid":U===0?"ta-add-new-project":`ta-project-${U}`,onClick:y[2]||(y[2]=I=>n.value=!1)},{default:z(()=>[U===0?(p(),v("span",nl,[a("span",rl,E(M.name),1),i(m)?(p(),v("span",al,"+ "+E(M.subtitle),1)):T("",!0)])):(p(),v("span",il,[a("span",{class:D(["o_w-2 o_h-10 rounded-sm block shrink-0",[M.mainStateColor]])},null,2),a("span",ll,[a("span",cl,E(M.name),1),a("span",ul,E(M.subtitle),1)])]))]),_:2},1032,["to","data-testid","class"]))),128))])])]),_:1},8,["open"])])):(p(),G(S,{key:0,class:"w-full h-11"}))],512)}}}),pl=Object.assign(dl,{__name:"ProjectSelector"}),hl={class:"bg-uiPrime-400 max-w-screen o_py-4 o_text-white h-(--kiv-currentproject) flex items-center grow-0"},ml={key:0,class:"o_px-4 w-full"},fl={class:"truncate block font-medium","data-testid":"current-project-name"},gl={class:"text-sm truncate leading-relaxed min-h-4","data-testid":"current-project-domain"},vl=ue({__name:"CurrentProject",setup(e){const t=mt();return(s,o)=>(p(),v("div",hl,[i(t)?.currentProject?(p(),v("div",ml,[a("div",fl,E(i(t).currentProject.name),1),a("div",gl,E(i(t).currentProject.system.domain),1)])):T("",!0)]))}}),fr=Object.assign(vl,{__name:"CurrentProject"}),Ws=ga("TestrunnerStore",()=>{const e=N({}),t=N(!0),{kapi:s}=Un(),o=st(),n=N(null),r=async(c,h=!1)=>{if(c){t.value=!0;try{const{lastRunInSeconds:f,nextRunInSeconds:m,isFirstRun:g}=await s("System").then(S=>S.getNextLastFullRun(Number(c)));console.log("getNextLastFullRun",f,m,g);const b=f+m,w=Math.floor(f/b*100),y=100/b;e.value[String(c)]={nextRunInMs:m*1e3,progress:w,progressPerSecond:y,isFirstRun:g}}catch(f){console.error(f)}finally{t.value=!1,n.value=c}}},l=(c,h)=>{if(!c||!e.value[c])return;const f=e.value[c],m=f.progress+f.progressPerSecond*h,g=f.nextRunInMs-h*1e3;e.value[c].nextRunInMs=g,e.value[c].progress=m};return ye(()=>o.params.sid,c=>{c&&c!==n.value&&(n.value=c,r(c))},{immediate:!0}),{runnerState:e,polling:t,initiateRunner:r,overrideSidRunner:l,getRunnerState:c=>e.value[c],overrideFirstRunState:c=>{c&&e.value[c]&&(e.value[c].isFirstRun=!1)}}}),bl={class:"bg-uiBg o_py-1 o_px-2 rounded-sm shrink-0 w-[160px]"},yl={class:"text-xs text-uiText-toned o_mb-1 truncate w-[160px]"},xl={class:"o_p-3 text-sm max-w-[300px]"},_l={class:"text-sm text-uiText-toned"},wl={class:"flex flex-col o_gap-2"},kl={class:"text-sm text-center"},Sl={class:"flex justify-center"},Cl=ue({__name:"NextCheckProgress",setup(e){const{runnerState:t,initiateRunner:s}=Ws(),o=st(),n=Y(()=>{if(!t)return null;const{sid:S}=o.params;return S?t[String(S)]:null}),r=Y(()=>n.value?Math.round(n.value.nextRunInMs/1e3/60):0),{formatLocaleTimeAgo:l}=cn(),u=Y(()=>{const S=Date.now(),C=n.value?.nextRunInMs??0,R=new Date(S+C);return l(R)}),d=N(0);setTimeout(()=>{n.value&&(d.value=n.value?.progress??0)},1e3);const c=N(!1),h=N(!1),f=S=>{n.value&&(S>=49&&S<=51&&!c.value&&(s(String(o.params.sid),!0),c.value=!0),S>=98&&S<=100&&!h.value&&(s(String(o.params.sid),!0),h.value=!0),S<50&&(c.value=!1,h.value=!1))};va(()=>{if(!n.value)return;const S=n.value?.progressPerSecond??0,C=d.value+S*60;d.value=C>100?100:C,f(d.value)},6e4,{immediate:!0});const{policyGuard:m}=es(),g=tt(),b=mt(),w=()=>{y.value=!1,g.setActiveSlideover("showUpgradeCurrentProject")},y=N(!1);return ye(()=>b.currentPid,()=>{n.value&&(d.value=n.value?.progress??0)}),(S,C)=>{const R=ba,F=mi,M=it,U=an,I=ln;return i(n)?(p(),G(I,{key:0,open:i(y),"onUpdate:open":C[1]||(C[1]=B=>Ge(y)?y.value=B:null),mode:"hover",arrow:"",delay:"100"},{content:z(()=>[a("div",xl,[a("p",_l,[q(F,{text:S.$t("nextCheckIn.long",{time:i(u)}),markdown:""},null,8,["text"])]),i(m)("nextCheck.upsellInformation",{trackingContext:{components:"NextCheckProgress (show alert)"}})?(p(),G(U,{key:0,variant:"subtle",color:"info",size:"sm",class:"o_mt-4",ui:{root:"p-00 o_p-2"}},{description:z(()=>[a("div",wl,[a("p",kl,E(S.$t("nextCheckIn.upsell")),1),a("div",Sl,[q(M,{size:"sm",variant:"solid",color:"primary",onClick:w},{default:z(()=>[de(E(S.$t("nextCheckIn.upgrade",{name:S.$t("planNames.pro.name")})),1)]),_:1})])])]),_:1})):T("",!0)])]),default:z(()=>[a("div",bl,[a("p",yl,[i(r)>0?(p(),v(oe,{key:0},[de(E(S.$t("nextCheckIn.short",{time:i(u)})),1)],64)):(p(),v(oe,{key:1},[de(E(S.$t("nextCheckIn.noData")),1)],64))]),q(R,{modelValue:i(d),"onUpdate:modelValue":C[0]||(C[0]=B=>Ge(d)?d.value=B:null),max:100,size:"sm",color:"success"},null,8,["modelValue"])])]),_:1},8,["open"])):T("",!0)}}}),$l=Object.assign(Cl,{__name:"NextCheckProgress"}),Al=ks(()=>Ss(()=>import("./D7qtAg9b.js").then(e=>e.R),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(e=>e.default||e)),El={key:0},Tl={class:"o_p-3"},Ll={key:0,class:"gap-px bg-uiBg-20 grid grid-cols-[auto_1fr] gap-x-2 o_mt-4"},Bl={class:"text-sm"},Pl=ue({__name:"OverallScores",setup(e){const t=Zt(),{stateColor:s,extraColor:o}=dr(),n=Y(()=>m=>({good:"bg-uiSuccess dark:bg-uiSuccess-200 outline-uiSuccess-600",medium:"bg-uiWarning dark:bg-uiWarning-200 outline-uiWarning-600",bad:"bg-uiError dark:bg-uiError-200 outline-uiError-600",incomplete:"bg-uiNeutral dark:bg-uiNeutral-200 outline-uiNeutral-600"})[m]),r=N(!1),l={good:"bg-uiSuccess-100/30",medium:"bg-uiWarning-100/30",bad:"bg-uiError-100/30",incomplete:"bg-uiNeutral-100/30"},{flatNavigationStructure:u,generateLink:d}=yt(),{t:c}=bt(),h=Kn(),f=Y(()=>{if(!t.currentProjectScores)return[];const m={bad:0,medium:1,good:2,incomplete:3},g=new Map(u.value.map(y=>[y.pathName,y])),b=new Map(Object.entries(ya).map(([y,S])=>[S,y])),w=[];for(const[y,S]of Object.entries(h.getAllPolicies)){if(!S?.enabled)continue;const C=xa[y];if(!C)continue;const[R,F]=C,M=g.get(F);if(!M)continue;const U=b.get(R);if(!U)continue;const I=t.currentProjectScores.find(j=>j.scoreName===U),B=I?.score?I.score===-1?"NA":I.score:0,A=I?.status??"incomplete";w.push({scoreName:U,score:B,status:A,id:M.id,title:c(`pageName.${M.id}`).split(" ")[0]||"",path:d(M.path)})}return w.sort((y,S)=>m[y.status]-m[S.status])});return(m,g)=>{const b=Al,w=ts,y=ln;return i(t).overallCurrentScore?(p(),v("div",El,[q(y,{open:i(r),"onUpdate:open":g[0]||(g[0]=S=>Ge(r)?r.value=S:null),mode:"hover",arrow:"","open-delay":200},{content:z(()=>[a("div",Tl,[a("div",{class:D(["text-sm max-w-[30ch] text-pretty leading-relaxed o_p-2 rounded",[l[i(t).overallCurrentScore.status||"incomplete"]]])},[q(b,{text:m.$t("OverallProjectCondition",{status:i(t).overallCurrentScore.status,score:i(t).overallCurrentScore.score}),markdown:""},null,8,["text"])],2),i(f)?.length?(p(),v("div",Ll,[(p(!0),v(oe,null,ce(i(f),S=>(p(),G(w,{key:S.scoreName,class:"font-medium bg-uiBg col-span-full grid grid-cols-subgrid py-1 transition-all duration-300 hover:bg-uiBg-10",to:S.path},{default:z(()=>[a("span",{class:D(["text-sm leading-none o_text-white o_text-shadow-sm px-2 py-1 rounded-sm text-center",i(n)(S.status)])},E(S.score),3),a("span",Bl,E(S.title),1)]),_:2},1032,["to"]))),128))])):T("",!0)])]),default:z(()=>[a("button",{class:D(["font-medium text-sm rounded-sm size-7 leading-none flex items-center justify-center o_text-white outline shrink-0 o_text-shadow-sm",[i(t).overallCurrentScore.onboarded?i(s)[i(t).overallCurrentScore.status||"incomplete"]:i(s).unboarded,i(t).overallCurrentScore.onboarded?i(o)[i(t).overallCurrentScore.status||"incomplete"]:i(o).unboarded]])},E(i(t).overallCurrentScore.score),3)]),_:1},8,["open"])])):T("",!0)}}}),Rl=Object.assign(Pl,{__name:"OverallScores"}),Il={key:0,class:"flex justify-center items-center"},Ol={class:"flex justify-center items-center"},Hl=ue({__name:"IncidentAlert",setup(e){const{tippyTheme:t}=tt(),{generateLink:s}=yt(),{data:o}=yi("current"),{t:n}=bt();return(r,l)=>{const u=xe,d=it,c=Zo,h=ss("tippy");return i(o)?.count>0?(p(),v("div",Il,[q(c,{text:i(o)?.count,color:"error",size:"xl",ui:{base:"h-3 min-w-[0.5rem] px-1.5 py-2 inline-flex text-xs top-1 -right-[.15rem]"}},{default:z(()=>[i(o)?.count>0?(p(),G(d,{key:0,variant:"subtle",color:"neutral",size:"sm",to:i(s)("/p/incidents-current-")},{default:z(()=>[be((p(),v("span",Ol,[q(u,{name:i(we).icoNotification,class:"size-5"},null,8,["name"])])),[[h,{content:i(n)("incidentAlert",{count:i(o)?.count}),theme:i(t)}]])]),_:1},8,["to"])):T("",!0)]),_:1},8,["text"])])):T("",!0)}}}),Fl=Object.assign(Hl,{__name:"IncidentAlert"}),Dl={key:0,class:"text-sm"},Ml={class:"border-b border-uiBorder-muted"},jl={class:"font-medium text-base o_p-1"},Nl={key:0,class:"flex flex-col gap-px bg-uiBg-20 overflow-hidden"},Gl={class:"truncate w-[200px]"},zl={key:0,class:"flex items-center o_gap-1"},Ul={key:0},Kl=ue({__name:"JobQueueEntry",props:{project:{},pidsid:{}},setup(e){const t=e,s=mt(),o=Y(()=>{const[c,h]=t.pidsid.split("-");return!c||!h?null:{pid:parseInt(c),sid:parseInt(h)}}),n=Y(()=>{const[c,h]=t.pidsid.split("-");return!c||!h?null:s.allSystems.find(f=>f.pid===parseInt(c)&&f.sid===parseInt(h))}),r=c=>{const h={finder:"/p/settings/list-",deadLinks:"/p/crawler/deadlinks-",missingFiles:"/p/crawler/missingFiles-",oversizeFiles:"/p/crawler/oversizeFiles-",fsc:"/p/crawler/recent-"};return o.value?`${h[c]}${o.value.pid}-${o.value.sid}`:""},{t:l}=bt(),u={running:we.icoLoadingSpinner,finished:we.icoFinished,waiting:we.icoInfo,error:we.icoError,none:we.icoInfo,unfinished:we.icoError},d=Y(()=>Object.entries(t.project).map(([c,h])=>{if(h){const f=h.status||"none",m=u[f],g=h.startedAt instanceof Date?h.startedAt:new Date,b=_a(g);if(c==="finder")return{to:r(c),name:l(`JobQueue.${c}`),status:f,icon:m,timeAgo:b,runId:h.runId};if(["deadLinks","missingFiles","oversizeFiles","fsc"].includes(c))return{to:r(c),name:l(`JobQueue.${c}`),status:f,icon:m,timeAgo:b,runId:h.runId,finishedAt:h.finishedAt}}}));return(c,h)=>{const f=Ks,m=ts,g=ss("tippy");return i(n)?(p(),v("div",Dl,[a("div",Ml,[a("h4",jl,E(i(n).name),1)]),i(d).length>0?(p(),v("div",Nl,[(p(!0),v(oe,null,ce(i(d),(b,w)=>(p(),G(m,{key:w,to:b?.to,class:"bg-uiBg dark:bg-uiBg--5 o_py-1 text-xs flex items-center justify-between o_gap-4 hover:bg-uiPrime-10 transition-all duration-300 ease-out o_px-2"},{default:z(()=>[a("span",Gl,"- "+E(b?.name),1),b?.status?(p(),v("span",zl,[q(f,{label:b?.status!=="running"?i(l)(`JobQueue.${b?.status}`):void 0,color:b?.status==="finished"?"success":b?.status==="error"?"error":"info",variant:"subtle",size:"sm",icon:b?.icon},{default:z(()=>[b?.status==="running"?be((p(),v("span",Ul,[de(E(i(l)("JobQueue.running")),1)])),[[g,{content:i(l)("JobQueue.jobRunning",{time:b?.timeAgo.value})}]]):T("",!0)]),_:2},1032,["label","color","icon"])])):T("",!0)]),_:2},1032,["to"]))),128))])):T("",!0)])):T("",!0)}}}),Wl=Object.assign(Kl,{__name:"JobQueueEntry"}),ql={key:0},Vl={class:"flex justify-center items-center text-uiText-toned"},Yl={class:"text-pretty o_mb-4"},Jl={class:"flex items-center o_mb-4"},Xl={class:"flex flex-col o_gap-3"},Ql=ue({__name:"JobQueue",setup(e){const{tippyTheme:t}=tt(),s=N(!1),o=Wn();Cs(()=>{s.value===!1&&o.newJobsSeen()});const n=st();return ye(n,()=>{s.value=!1}),(r,l)=>{const u=xe,d=it,c=Zo,h=Wl,f=pr,m=ss("tippy");return Object.keys(i(o).globalJobs).length?(p(),v("div",ql,[q(f,{open:i(s),"onUpdate:open":l[1]||(l[1]=g=>Ge(s)?s.value=g:null),arrow:"",title:"Job Queue",ui:{content:"max-w-[440px]"}},{body:z(()=>[a("p",Yl,E(r.$t("JobQueue.description")),1),a("div",Jl,[q(d,{color:"neutral",variant:"subtle",size:"sm",icon:i(we).icoSweep,onClick:l[0]||(l[0]=g=>i(o).flushJobQueue())},{default:z(()=>[de(E(r.$t("JobQueue.flushJobQueue")),1)]),_:1},8,["icon"])]),a("div",Xl,[(p(!0),v(oe,null,ce(i(o).globalJobs,(g,b)=>(p(),G(h,{key:b,project:g,pidsid:b,class:""},null,8,["project","pidsid"]))),128))])]),default:z(()=>[q(c,{color:"success",size:"xl",inset:"",show:i(o).newJobs,text:i(o).seenJobCount},{default:z(()=>[q(d,{color:"neutral",variant:"link",size:"sm"},{default:z(()=>[be((p(),v("span",Vl,[q(u,{name:"hugeicons:job-link",class:"size-5"})])),[[m,{content:r.$t("JobQueue.jobRunner"),theme:i(t)}]])]),_:1})]),_:1},8,["show","text"])]),_:1},8,["open"])])):T("",!0)}}}),Zl=Object.assign(Ql,{__name:"JobQueue"}),ec={__name:"USeparator",props:{as:{type:null,required:!1},label:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},type:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},class:{type:null,required:!1},ui:{type:null,required:!1},decorative:{type:Boolean,required:!1}},setup(e){const t=e,s=os(),o=ns(),n=wa(oo(t,"as","decorative","orientation")),r=Y(()=>ht({extend:ht(Ji),...o.ui?.separator||{}})({color:t.color,orientation:t.orientation,size:t.size,type:t.type}));return(l,u)=>(p(),G(i(Ki),_e(i(n),{"data-slot":"root",class:r.value.root({class:[t.ui?.root,t.class]})}),{default:z(()=>[a("div",{"data-slot":"border",class:D(r.value.border({class:t.ui?.border}))},null,2),e.label||e.icon||e.avatar||s.default?(p(),v(oe,{key:0},[a("div",{"data-slot":"container",class:D(r.value.container({class:t.ui?.container}))},[le(l.$slots,"default",{ui:r.value},()=>[e.label?(p(),v("span",{key:0,"data-slot":"label",class:D(r.value.label({class:t.ui?.label}))},E(e.label),3)):e.icon?(p(),G(xe,{key:1,name:e.icon,"data-slot":"icon",class:D(r.value.icon({class:t.ui?.icon}))},null,8,["name","class"])):e.avatar?(p(),G(en,_e({key:2,size:t.ui?.avatarSize||r.value.avatarSize()},e.avatar,{"data-slot":"avatar",class:r.value.avatar({class:t.ui?.avatar})}),null,16,["size","class"])):T("",!0)])],2),a("div",{"data-slot":"border",class:D(r.value.border({class:t.ui?.border}))},null,2)],64)):T("",!0)]),_:3},16,["class"]))}};function tc(e){const t=[];return e.split(/^## Version /gm).filter(o=>o.trim()).forEach((o,n)=>{const r=o.split(`
`),l=r[0];if(!l)return;const u=l.trim(),d=n===0,h=r.slice(1).filter(f=>!f.includes("*Latest Release*")&&!f.trim().startsWith("*Released:")).join(`
`).trim();t.push({version:u,isLatest:d,content:h})}),{entries:t}}const sc=()=>{const{addTimeToProcessedData:e,setCachedData:t}=qn(),{data:s,pending:o,error:n,refresh:r}=ka("changelog",async()=>{const{content:l}=await $fetch("https://api.koalityguide.com/?identifier=marketing.changelog.changelog&language=en&format=md&fallbackLanguage=en");if(!l)throw new Error("No changelog content found");return tc(l)},{transform:l=>e(l),getCachedData:(l,u,d)=>{if(!(d.cause==="refresh:manual"||d.cause==="refresh:hook"))return t(l)}});return{data:s,pending:o,error:n,refresh:r}},oc={key:0,class:"flex items-center justify-center o_py-8"},nc={key:1,class:"o_pb-4"},rc={key:2,class:"flex flex-col o_gap-6 o_pb-4"},ac={class:"flex items-center o_gap-2 o_mb-4 flex-wrap"},ic={class:"text-xl font-bold text-gray-900 dark:text-gray-100"},lc={key:1,class:"text-sm font-normal text-gray-500"},cc={class:"changelog-content"},uc={key:3,class:"o_py-8 text-center"},dc=ue({__name:"ChangeLog",setup(e){const{tippyTheme:t}=tt(),s=N(!1),o=N(!0),{data:n,pending:r,error:l}=sc();return(u,d)=>{const c=xe,h=it,f=an,m=Ks,g=fi,b=ec,w=pr,y=ss("tippy");return p(),v("div",null,[q(w,{open:i(s),"onUpdate:open":d[0]||(d[0]=S=>Ge(s)?s.value=S:null),title:u.$t("ChangeLog"),ui:{content:"max-w-[440px]"}},{body:z(()=>[i(r)?(p(),v("div",oc,[q(c,{name:"svg-spinners:90-ring-with-bg",class:"size-6"}),d[1]||(d[1]=a("span",{class:"o_ml-2 text-uiText-muted"},"Loading changelog...",-1))])):i(l)?(p(),v("div",nc,[q(f,{color:"error",variant:"soft",title:"Error loading changelog",description:"Please try again later"})])):i(n)?.entries?(p(),v("div",rc,[(p(!0),v(oe,null,ce(i(n).entries,(S,C)=>(p(),v("div",{key:S.version,class:D(["border-l-4 o_pl-4 rounded-md shadow-md o_p-4",[S.isLatest?"border-green-500 bg-green-50 dark:bg-green-950/30":"border-blue-500 bg-blue-50 dark:bg-blue-950/30"]])},[a("div",ac,[S.isLatest?(p(),G(m,{key:0,color:"success",variant:"solid",size:"sm"},{default:z(()=>[...d[2]||(d[2]=[de(" LATEST ",-1)])]),_:1})):T("",!0),a("h2",ic," Version "+E(S.version),1),S.date?(p(),v("span",lc,E(S.date),1)):T("",!0)]),a("div",cc,[q(g,{value:S.content,tag:"article",class:"prose prose-sm dark:prose-invert prose-headings:font-semibold prose-headings:text-gray-800 dark:prose-headings:text-gray-200 prose-p:text-gray-700 dark:prose-p:text-gray-300 prose-li:text-gray-700 dark:prose-li:text-gray-300 prose-strong:text-gray-900 dark:prose-strong:text-gray-100"},null,8,["value"])]),C<i(n).entries.length-1?(p(),G(b,{key:0,class:"o_mt-6"})):T("",!0)],2))),128))])):(p(),v("div",uc,[q(c,{name:"material-symbols:article-outline",class:"size-12 text-gray-400 o_mb-2"}),d[3]||(d[3]=a("p",{class:"text-gray-500"}," No changelog entries available ",-1))]))]),default:z(()=>[q(h,{color:"neutral",variant:"link",size:"sm"},{default:z(()=>[be((p(),v("span",{class:D(["flex justify-center items-center text-uiText-toned",[i(o)?"animate-pulse text-uiPrime-400":"text-uiText-muted"]])},[q(c,{name:"material-symbols:published-with-changes",class:"size-5"})],2)),[[y,{content:u.$t("ChangeLog"),theme:i(t)}]])]),_:1})]),_:1},8,["open","title"])])}}}),pc=Object.assign(dc,{__name:"ChangeLog"}),hc={class:"text-uiText-muted font-normal text-xs o_mb-1"},mc=ue({__name:"TimezoneSwitcher",setup(e){const t=Vn(),s=N(Object.entries(Li).map(([r,l])=>({value:r,label:l}))),{tracker:o}=tn(),n=async r=>{t.storeTimezone(r),o("timezone_switcher","click","Change timezone")};return(r,l)=>{const u=_i;return p(),v("div",null,[a("div",hc,E(r.$t("Timezone")),1),q(u,{modelValue:i(t).timeZone,"onUpdate:modelValue":[l[0]||(l[0]=d=>i(t).timeZone=d),l[1]||(l[1]=d=>n(d))],items:i(s),"value-key":"value","search-input":!0,color:"neutral",variant:"outline",class:"w-full text-uiText font-normal"},null,8,["modelValue","items"])])}}}),fc=Object.assign(mc,{__name:"TimezoneSwitcher"}),te=255,Ze=100,wt=125,Wt=150;var X,at,qe,qs;(function(e){e.HEX="HEX",e.RGB="RGB",e.HWB="HWB",e.HSL="HSL",e.CIELab="CIELab",e.LCH="LCH",e.CMYK="CMYK"})(X||(X={})),(function(e){e.ANALOGOUS="ANALOGOUS",e.COMPLEMENTARY="COMPLEMENTARY",e.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",e.TRIADIC="TRIADIC",e.TETRADIC="TETRADIC",e.SQUARE="SQUARE"})(at||(at={})),(function(e){e.ADDITIVE="ADDITIVE",e.SUBTRACTIVE="SUBTRACTIVE"})(qe||(qe={})),(function(e){e.black="#000000",e.silver="#C0C0C0",e.gray="#808080",e.white="#FFFFFF",e.maroon="#800000",e.red="#FF0000",e.purple="#800080",e.fuchsia="#FF00FF",e.green="#008000",e.lime="#00FF00",e.olive="#808000",e.yellow="#FFFF00",e.navy="#000080",e.blue="#0000FF",e.teal="#008080",e.aqua="#00FFFF",e.orange="#FFA500",e.aliceblue="#F0F8FF",e.antiquewhite="#FAEBD7",e.aquamarine="#7FFFD4",e.azure="#F0FFFF",e.beige="#F5F5DC",e.bisque="#FFE4C4",e.blanchedalmond="#FFEBCD",e.blueviolet="#8A2BE2",e.brown="#A52A2A",e.burlywood="#DEB887",e.cadetblue="#5F9EA0",e.chartreuse="#7FFF00",e.chocolate="#D2691E",e.coral="#FF7F50",e.cornflowerblue="#6495ED",e.cornsilk="#FFF8DC",e.crimson="#DC143C",e.cyan="#00FFFF",e.darkblue="#00008B",e.darkcyan="#008B8B",e.darkgoldenrod="#B8860B",e.darkgray="#A9A9A9",e.darkgreen="#006400",e.darkgrey="#A9A9A9",e.darkkhaki="#BDB76B",e.darkmagenta="#8B008B",e.darkolivegreen="#556B2F",e.darkorange="#FF8C00",e.darkorchid="#9932CC",e.darkred="#8B0000",e.darksalmon="#E9967A",e.darkseagreen="#8FBC8F",e.darkslateblue="#483D8B",e.darkslategray="#2F4F4F",e.darkslategrey="#2F4F4F",e.darkturquoise="#00CED1",e.darkviolet="#9400D3",e.deeppink="#FF1493",e.deepskyblue="#00BFFF",e.dimgray="#696969",e.dimgrey="#696969",e.dodgerblue="#1E90FF",e.firebrick="#B22222",e.floralwhite="#FFFAF0",e.forestgreen="#228B22",e.gainsboro="#DCDCDC",e.ghostwhite="#F8F8FF",e.gold="#FFD700",e.goldenrod="#DAA520",e.greenyellow="#ADFF2F",e.grey="#808080",e.honeydew="#F0FFF0",e.hotpink="#FF69B4",e.indianred="#CD5C5C",e.indigo="#4B0082",e.ivory="#FFFFF0",e.khaki="#F0E68C",e.lavender="#E6E6FA",e.lavenderblush="#FFF0F5",e.lawngreen="#7CFC00",e.lemonchiffon="#FFFACD",e.lightblue="#ADD8E6",e.lightcoral="#F08080",e.lightcyan="#E0FFFF",e.lightgoldenrodyellow="#FAFAD2",e.lightgray="#D3D3D3",e.lightgreen="#90EE90",e.lightgrey="#D3D3D3",e.lightpink="#FFB6C1",e.lightsalmon="#FFA07A",e.lightseagreen="#20B2AA",e.lightskyblue="#87CEFA",e.lightslategray="#778899",e.lightslategrey="#778899",e.lightsteelblue="#B0C4DE",e.lightyellow="#FFFFE0",e.limegreen="#32CD32",e.linen="#FAF0E6",e.magenta="#FF00FF",e.mediumaquamarine="#66CDAA",e.mediumblue="#0000CD",e.mediumorchid="#BA55D3",e.mediumpurple="#9370DB",e.mediumseagreen="#3CB371",e.mediumslateblue="#7B68EE",e.mediumspringgreen="#00FA9A",e.mediumturquoise="#48D1CC",e.mediumvioletred="#C71585",e.midnightblue="#191970",e.mintcream="#F5FFFA",e.mistyrose="#FFE4E1",e.moccasin="#FFE4B5",e.navajowhite="#FFDEAD",e.oldlace="#FDF5E6",e.olivedrab="#6B8E23",e.orangered="#FF4500",e.orchid="#DA70D6",e.palegoldenrod="#EEE8AA",e.palegreen="#98FB98",e.paleturquoise="#AFEEEE",e.palevioletred="#DB7093",e.papayawhip="#FFEFD5",e.peachpuff="#FFDAB9",e.peru="#CD853F",e.pink="#FFC0CB",e.plum="#DDA0DD",e.powderblue="#B0E0E6",e.rosybrown="#BC8F8F",e.royalblue="#4169E1",e.saddlebrown="#8B4513",e.salmon="#FA8072",e.sandybrown="#F4A460",e.seagreen="#2E8B57",e.seashell="#FFF5EE",e.sienna="#A0522D",e.skyblue="#87CEEB",e.slateblue="#6A5ACD",e.slategray="#708090",e.slategrey="#708090",e.snow="#FFFAFA",e.springgreen="#00FF7F",e.steelblue="#4682B4",e.tan="#D2B48C",e.thistle="#D8BFD8",e.tomato="#FF6347",e.turquoise="#40E0D0",e.violet="#EE82EE",e.wheat="#F5DEB3",e.whitesmoke="#F5F5F5",e.yellowgreen="#9ACD32",e.rebeccapurple="#663399"})(qs||(qs={}));const gr=Object.keys(qs),gc={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],HWB:["H","W","B","A"],CIELab:["L","a","b","A"],LCH:["L","C","H","A"],CMYK:["C","M","Y","K","A"]},Io={ABGR:X.RGB,ABHW:X.HWB,ACHL:X.LCH,ACKMY:X.CMYK,AHLS:X.HSL,ALAB:X.CIELab,BGR:X.RGB,BHW:X.HWB,CHL:X.LCH,CKMY:X.CMYK,HLS:X.HSL,LAB:X.CIELab};var bs;(function(e){e.NUMBER="number",e.BOOLEAN="boolean"})(bs||(bs={}));const Je={[X.HEX]:/^#(?:(?<r>[a-f\d])(?<g>[a-f\d])(?<b>[a-f\d])(?<a>[a-f\d])?|(?<rr>[a-f\d]{2})(?<gg>[a-f\d]{2})(?<bb>[a-f\d]{2})(?<aa>[a-f\d]{2})?)$/i,[X.RGB]:/^rgba?\s*\(\s*(?:(?<r_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<g_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<b_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<r>(?:\d*\.)?\d+%?)\s+(?<g>(?:\d*\.)?\d+%?)\s+(?<b>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_r>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_g>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[X.HWB]:/^hwb\s*\(\s*(?:(?<h>(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<w>(?:\d*\.)?\d+)%\s+(?<b>(?:\d*\.)?\d+)%(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))\s+(?<relative_w>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?\s+(?<relative_b>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[X.HSL]:/^hsla?\s*\(\s*(?:(?<h_legacy>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*(?<s_legacy>(?:\d*\.)?\d+)%\s*,\s*(?<l_legacy>(?:\d*\.)?\d+)%(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<s>(?:\d*\.)?\d+)%?\s+(?<l>(?:\d*\.)?\d+)%?(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))\s+(?<relative_s>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?\s+(?<relative_l>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[X.CIELab]:/^lab\s*\(\s*(?:(?<L>(?:\d*\.)?\d+%?)\s+(?<a>-?(?:\d*\.)?\d+%?)\s+(?<b>-?(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<A>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_L>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_a>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_A>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[X.LCH]:/^lch\s*\(\s*(?:(?<l>(?:\d*\.)?\d+%?)\s+(?<c>-?(?:\d*\.)?\d+%?)\s+(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_l>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_c>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_h>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[X.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:(?<c_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<m_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<y_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<k_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<c>(?:\d*\.)?\d+%?)\s+(?<m>(?:\d*\.)?\d+%?)\s+(?<y>(?:\d*\.)?\d+%?)\s+(?<k>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?)\s*\)$/},Qe={REGEXP:/^calc\(\s*(?<operation>[\d./*+-\w\s]+)\s*\)$/,SCOPED:/\(\s*([^()]+)\s*\)/g,DIVISION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\/\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,MULTIPLICATION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\*\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,SUM:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\+\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,REST:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*-\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/},vr=/^(?<number>-?(?:\d*\.)?\d+)(?<units>(?:deg|grad|rad|turn)?)$/,Le=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,Oo=/^0x([a-f\d]{1,2})$/i,vc=/\{(\d+)\}/g,bc=/,( +|\d+)/g,yc=/ +/,xc="The provided string color doesn't have a correct format",_c="The provided color object doesn't have the proper keys or format",wc="is not a valid operation for a relative color";var ze,Oe,_s;(function(e){e.NONE="none",e.DEGREES="deg",e.GRADIANS="grad",e.RADIANS="rad",e.TURNS="turn"})(ze||(ze={})),(function(e){e.NONE="none",e.PERCENT="percent"})(Oe||(Oe={})),(function(e){e.DEVICE_CMYK="device-cmyk",e.CMYK="cmyk"})(_s||(_s={}));const dt={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:ze.NONE,rgbUnit:Oe.NONE,labUnit:Oe.NONE,lchUnit:Oe.NONE,cmykUnit:Oe.PERCENT,alphaUnit:Oe.NONE,cmykFunction:_s.DEVICE_CMYK},Ce=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),rs=e=>+`${e}`.replace(Le,"$1"),Ye=e=>Le.test(`${e}`)?rs(e):Math.min(+e,100),Ds=e=>(e.length===1&&(e+=e),parseInt(e,16)),Ms=e=>{const t=V(e,0).toString(16).toUpperCase();return t.length===1?`0x0${t}`:`0x${t}`},It=(e,t=!1)=>!t&&Le.test(e)?Math.min(te*rs(e)/100,te):Oo.test(e)?(e.length===3&&(e+=e.slice(-1)),t?V(e)/te:V(e)):Math.min(+e,t?1:te),Vs=e=>Le.test(e)?ie(wt*rs(e)/100,-125,wt):ie(+e,-125,wt),br=e=>Le.test(e)?ie(Wt*rs(e)/100,-150,Wt):ie(+e,-150,Wt),_t=e=>Math.min(Le.test(e)?rs(e)/100:+e,1),yr=e=>[...e].sort().join("").toUpperCase(),V=(e,t=6)=>{const s=Math.pow(10,t);return Math.round(+e*s)/s},ie=(e,t,s)=>Math.max(t,Math.min(e,s)),xr=e=>180*e/Math.PI,_r=e=>e*Math.PI/180,Us=360,et=e=>{if(typeof e=="string"){const t=e.match(vr).groups,s=+t.number;switch(t.units){case ze.RADIANS:e=V(xr(s));break;case ze.TURNS:e=V(s*Us);break;case ze.GRADIANS:e=V(.9*s);break;case ze.DEGREES:default:e=s}}return(e>360||e<0)&&(e-=Math.floor(e/Us)*Us),e},ve=e=>(typeof e=="string"&&(e=Le.test(e)?rs(e)/100:+e),isNaN(+e)||e>1?1:V(e)),wr=(e,t)=>{let s;switch(t){case ze.RADIANS:s=V(_r(e));break;case ze.TURNS:s=V(e/Us);break;case ze.GRADIANS:s=V(10/9*e);break;case ze.DEGREES:case ze.NONE:default:s=e}return s},yo=e=>`${e}`in qe,kr=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],kc=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],qt=kr.map((e=>e.reduce(((t,s)=>t+s),0))),xo=(e,t,s)=>(s<0&&(s+=6),s>=6&&(s-=6),V(s<1?((t-e)*s+e)*te:s<3?t*te:s<4?((t-e)*(4-s)+e)*te:e*te)),Sc=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,Cc=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,Sr=(e,t,s,o)=>{const n=[0,0,0],r=[e,t,s];return o.forEach(((l,u)=>{l.forEach(((d,c)=>{n[u]+=d*r[c]}))})),n},ge=(e,t,s)=>{t/=100;const o=(s/=100)<=.5?s*(t+1):s+t-s*t,n=2*s-o;return{R:xo(n,o,(e/=60)+2),G:xo(n,o,e),B:xo(n,o,e-2)}},St=(e,t,s,o=1)=>{e/=te,t/=te,s/=te,o=Math.min(o,1);const n=Math.max(e,t,s),r=Math.min(e,t,s),l=n-r;let u=0,d=0;const c=(n+r)/2;if(l!==0){switch(n){case e:u=(t-s)/l%6;break;case t:u=(s-e)/l+2;break;case s:u=(e-t)/l+4}u=V(60*u),u<0&&(u+=360),d=l/(1-Math.abs(2*c-1))}return{H:u,S:V(100*d),L:V(100*c),A:o}},Ct=(e,t,s)=>{const o=[e/te,t/te,s/te].map(Sc),n=Sr(o[0],o[1],o[2],kr),r=((l,u,d)=>{const c=m=>m>.008856451679035631?Math.cbrt(m):m/.12841854934601665+.13793103448275862,h=c(l/qt[0]),f=c(u/qt[1]);return[116*f-16,500*(h-f),200*(f-c(d/qt[2]))]})(n[0],n[1],n[2]);return{L:r[0],a:r[1],b:r[2]}},ws=(e,t,s)=>{const o=((r,l,u)=>{const d=m=>m>.20689655172413793?m**3:.12841854934601665*(m-.13793103448275862),c=(r+16)/116,h=l/500,f=u/200;return[qt[0]*d(c+h),qt[1]*d(c),qt[2]*d(c-f)]})(e,t,s),n=Sr(o[0],o[1],o[2],kc).map(Cc);return{R:ie(n[0]*te,0,te),G:ie(n[1]*te,0,te),B:ie(n[2]*te,0,te)}},Cr=(e,t,s)=>{const o=Math.sqrt(t**2+s**2),n=xr(Math.atan2(s,t));return{L:e,C:o,H:et(n)}},$r=(e,t,s)=>{const o=_r(s);return{L:e,a:t*Math.cos(o),b:t*Math.sin(o)}},$t=(e,t,s)=>{const o=Ct(e,t,s);return Cr(o.L,o.a,o.b)},Ys=(e,t,s)=>{const o=$r(e,t,s);return ws(o.L,o.a,o.b)},Ht=(e,t,s,o=1)=>({H:St(e,t,s,o).H,W:V(Math.min(e,t,s)/te*100),B:V(100*(1-Math.max(e,t,s)/te)),A:o}),Js=(e,t,s)=>{const o=1-(s/=100)-(t/=100),n=o*(1-Math.abs(e/60%2-1));let r=0,l=0,u=0;return e<60?(r=o,l=n,u=0):e>=60&&e<120?(r=n,l=o,u=0):e>=120&&e<180?(r=0,l=o,u=n):e>=180&&e<240?(r=0,l=n,u=o):e>=240&&e<300?(r=n,l=0,u=o):e>=300&&(r=o,l=0,u=n),r+=t,l+=t,u+=t,{R:ie(r*te,0,te),G:ie(l*te,0,te),B:ie(u*te,0,te)}},dn=(e,t,s,o)=>({R:V(te*(1-e)*(o=1-o)),G:V(te*(1-t)*o),B:V(te*(1-s)*o)}),Ar=(e,t,s)=>{e/=te,t/=te,s/=te;const o=1-Math.max(e,t,s),n=1-o,r=n&&(n-t)/n,l=n&&(n-s)/n;return{C:V(100*(n&&(n-e)/n)),M:V(100*r),Y:V(100*l),K:V(100*o)}},An=(e,t)=>{if(e<0&&(e+=360),e>360&&(e-=360),e===360||e===0)return e;const s=[[0,120],[120,180],[180,240],[240,360]],o=[[0,60],[60,120],[120,240],[240,360]],n=t?o:s;let r=0,l=0,u=0,d=0;return(t?s:o).find(((c,h)=>e>=c[0]&&e<c[1]&&(r=c[0],l=c[1],u=n[h][0],d=n[h][1],!0))),u+(d-u)/(l-r)*(e-r)};let Er=class{get rgb(){return this._rgb}};class $c extends Er{constructor(t){super();const s=t.match(Je.HEX).groups;this._r=s.r??s.rr,this._g=s.g??s.gg,this._b=s.b??s.bb,this._a=s.a??s.aa;const o={R:Ds(this._r),G:Ds(this._g),B:Ds(this._b)};this._a!==void 0&&(o.A=Ds(this._a)/te),this._rgb=o}}let He=class{constructor(t,s,o){this._operations=new Map([[Qe.DIVISION,this._division],[Qe.MULTIPLICATION,this._multiplication],[Qe.SUM,this._sum],[Qe.REST,this._rest]]),this._colorIndex=t;let n=s,r=0;if(Number.isNaN(+s))if(s in o)this._result=o[s];else if(Qe.REGEXP.test(n))Qe.REGEXP.lastIndex=0,this._result=this._getCalcValue(n,o);else{for(;Qe.SCOPED.test(n)&&r<100;){if(Qe.SCOPED.lastIndex=0,n=n.replace(Qe.SCOPED,((l,u)=>this._calculate(u,o).toString())),Qe.REGEXP.test(n)){Qe.REGEXP.lastIndex=0;break}r++}this._result=this._getCalcValue(n,o)}else this._result=+s}_division(t,s){return t/s}_multiplication(t,s){return t*s}_sum(t,s){return t+s}_rest(t,s){return t-s}_getCalcValue(t,s){const o=t.match(Qe.REGEXP).groups.operation,n=this._calculate(o,s);if(Number.isNaN(n))throw new Error(`Invalid value for ${this._colorIndex}. ${o} ${wc}`);return n}_calculate(t,s){return this._operations.forEach(((o,n)=>{let r=0;for(;n.test(t)&&r<100;)t=t.replace(n,((l,u,d)=>o(s[u]??+u,s[d]??+d).toString())),r++})),+t}get result(){return this._result}},ao=class extends Er{get hasPercentageAlpha(){return Le.test(this._a)}},Ho=class extends ao{constructor(t,s){super();const o=t.match(Je.RGB).groups,{r_legacy:n,g_legacy:r,b_legacy:l,a_legacy:u,r:d,g:c,b:h,a:f,from:m,relative_r:g,relative_g:b,relative_b:w,relative_a:y}=o;if(m){const S=s(m),C={r:S.R,g:S.G,b:S.B,alpha:S.A??1},R=new He("r",g,C).result,F=new He("g",b,C).result,M=new He("b",w,C).result,U={R:Math.min(R,te),G:Math.min(F,te),B:Math.min(M,te)};if(y){const I=new He("alpha",y,C).result;U.A=Math.min(I,1)}this._rgb=U}else{this._r=n??d,this._g=r??c,this._b=l??h,this._a=u??f;const S={R:Math.min(It(this._r),te),G:Math.min(It(this._g),te),B:Math.min(It(this._b),te)};this._a!==void 0&&(S.A=ve(this._a)),this._rgb=S}}get hasPercentageValues(){return Le.test(this._r)&&Le.test(this._g)&&Le.test(this._b)}static test(t){return Je.RGB.test(t)}};class pn extends ao{get angleUnit(){if(this._h){const t=this._h.match(vr).groups.units;return t===""?ze.NONE:t}return ze.NONE}}let Fo=class extends pn{constructor(t,s){super();const o=t.match(Je.HSL).groups,{h_legacy:n,s_legacy:r,l_legacy:l,a_legacy:u,h:d,s:c,l:h,a:f,from:m,relative_h:g,relative_s:b,relative_l:w,relative_a:y}=o;if(m){const S=s(m),C=St(S.R,S.G,S.B,S.A),R={h:C.H,s:C.S,l:C.L,alpha:C.A},F=new He("h",g,R).result,M=new He("s",b,R).result,U=new He("l",w,R).result,I=ge(ie(F,0,360),ie(M,0,Ze),ie(U,0,Ze));if(y){const B=new He("alpha",y,R).result;I.A=ie(B,0,1)}this._rgb=I}else{this._h=n??d,this._s=r??c,this._l=l??h,this._a=u??f;const S=ge(et(this._h),Ye(this._s),Ye(this._l));this._a!==void 0&&(S.A=ve(this._a)),this._rgb=S}}static test(t){return Je.HSL.test(t)}};class Do extends pn{constructor(t,s){super();const o=t.match(Je.HWB).groups,{h:n,w:r,b:l,a:u,from:d,relative_h:c,relative_w:h,relative_b:f,relative_a:m}=o;if(d){const g=s(d),b=Ht(g.R,g.G,g.B,g.A),w={h:b.H,w:b.W,b:b.B,alpha:b.A},y=new He("h",c,w).result,S=new He("w",h,w).result,C=new He("b",f,w).result,R=Js(ie(y,0,360),ie(S,0,Ze),ie(C,0,Ze));if(m){const F=new He("alpha",m,w).result;R.A=ie(F,0,1)}this._rgb=R}else{this._h=n,this._w=r,this._b=l,this._a=u;const g=Js(et(this._h),Ye(this._w),Ye(this._b));this._a!==void 0&&(g.A=ve(this._a)),this._rgb=g}}static test(t){return Je.HWB.test(t)}}let Mo=class extends ao{constructor(t,s){super();const o=t.match(Je.CIELab).groups,{L:n,a:r,b:l,A:u,from:d,relative_L:c,relative_a:h,relative_b:f,relative_A:m}=o;if(d){const g=s(d),b=Ct(g.R,g.G,g.B),w={l:b.L,a:b.a,b:b.b,alpha:g.A??1},y=new He("l",c,w).result,S=new He("a",h,w).result,C=new He("b",f,w).result,R=ws(ie(y,0,Ze),ie(S,-125,wt),ie(C,-125,wt));if(m){const F=new He("alpha",m,w).result;R.A=ie(F,0,1)}this._rgb=R}else{this._L=n,this._A=r,this._B=l,this._a=u;const g=ws(Ye(this._L),Vs(this._A),Vs(this._B));this._a!==void 0&&(g.A=ve(this._a)),this._rgb=g}}get hasPercentageValues(){return Le.test(this._L)&&Le.test(this._A)&&Le.test(this._B)}static test(t){return Je.CIELab.test(t)}};class jo extends pn{constructor(t,s){super();const o=t.match(Je.LCH).groups,{l:n,c:r,h:l,a:u,from:d,relative_l:c,relative_c:h,relative_h:f,relative_a:m}=o;if(d){const g=s(d),b=$t(g.R,g.G,g.B),w={l:b.L,c:b.C,h:b.H,alpha:g.A??1},y=new He("l",c,w).result,S=new He("c",h,w).result,C=new He("h",f,w).result,R=Ys(ie(y,0,Ze),ie(S,-150,Wt),et(C));if(m){const F=new He("alpha",m,w).result;R.A=ie(F,0,1)}this._rgb=R}else{this._l=n,this._c=r,this._h=l,this._a=u;const g=Ys(Ye(this._l),br(this._c),et(this._h));this._a!==void 0&&(g.A=ve(this._a)),this._rgb=g}}get hasPercentageValues(){return Le.test(this._l)&&Le.test(this._c)}static test(t){return Je.LCH.test(t)}}let No=class extends ao{constructor(t){super();const s=t.match(Je.CMYK).groups;this._c=s.c_legacy??s.c,this._m=s.m_legacy??s.m,this._y=s.y_legacy??s.y,this._k=s.k_legacy??s.k,this._a=s.a_legacy??s.a;const o=dn(_t(this._c),_t(this._m),_t(this._y),_t(this._k));this._a!==void 0&&(o.A=ve(this._a)),this._rgb=o}get hasPercentageValues(){return Le.test(this._c)&&Le.test(this._m)&&Le.test(this._y)&&Le.test(this._k)}static test(t){return Je.CMYK.test(t)}};const De=e=>typeof e=="string"?(t=>{let s;if(Object.keys(X).some((o=>{if(Je[o].test(t))return s=o,!0})),!s&&~gr.indexOf(t)&&(s=X.HEX),!s)throw new Error(xc);return s})(e):(t=>{let s,o=!1;const n=yr(Object.keys(t));if(Io[n]&&(s=Io[n]),s&&s===X.RGB){const r=Object.entries(t).some((u=>!Oo.test(`${u[1]}`))),l=Object.entries(t).some((u=>!(Le.test(`${u[1]}`)||!Oo.test(`${u[1]}`)&&!isNaN(+u[1])&&+u[1]<=te)));r&&l&&(o=!0),r||(s=X.HEX)}if(!s||o)throw new Error(_c);return s})(e),Ac={[X.HEX](e){const t=~gr.indexOf(e)?qs[e]:e;return new $c(t).rgb},[X.RGB]:e=>new Ho(e,Ue).rgb,[X.HSL]:e=>new Fo(e,Ue).rgb,[X.HWB]:e=>new Do(e,Ue).rgb,[X.CIELab]:e=>new Mo(e,Ue).rgb,[X.LCH]:e=>new jo(e,Ue).rgb,[X.CMYK]:e=>new No(e).rgb},Ec={[X.HEX](e){const t={R:It(`${e.R}`),G:It(`${e.G}`),B:It(`${e.B}`)};return Ce(e,"A")&&(t.A=Math.min(It(`${e.A}`,!0),1)),t},[X.RGB](e){return this.HEX(e)},[X.HSL](e){const t=Ye(`${e.S}`),s=Ye(`${e.L}`),o=ge(et(e.H),t,s);return Ce(e,"A")&&(o.A=ve(e.A)),o},[X.HWB](e){const t=Ye(`${e.W}`),s=Ye(`${e.B}`),o=Js(et(e.H),t,s);return Ce(e,"A")&&(o.A=ve(e.A)),o},[X.CIELab](e){const t=Ye(`${e.L}`),s=Vs(`${e.a}`),o=Vs(`${e.b}`),n=ws(t,s,o);return Ce(e,"A")&&(n.A=ve(e.A)),n},[X.LCH](e){const t=Ye(`${e.L}`),s=br(`${e.C}`),o=et(`${e.H}`),n=Ys(t,s,o);return Ce(e,"A")&&(n.A=ve(e.A)),n},[X.CMYK](e){const t=_t(`${e.C}`),s=_t(`${e.M}`),o=_t(`${e.Y}`),n=_t(`${e.K}`),r=dn(t,s,o,n);return Ce(e,"A")&&(r.A=ve(e.A)),r}},Ue=(e,t=De(e))=>typeof e=="string"?Ac[t](e):Ec[t](e),Ae=(e,...t)=>{const s=[],o=[],n=[],r=[],l=[],u=[],d=[],c=Object.values(ze),h=Object.values(Oe),f=Object.values(_s),m={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const g of t)if(typeof g=="string"){if(s.push(g),g.includes(",")){m.legacyCSS++;const b=g.match(bc);new Set(b).size===1&&yc.test(b[0].slice(1))&&m.spacesAfterCommas++}if(Fo.test(g)){const b=new Fo(g,Ue);o.push(b.angleUnit),d.push(b.hasPercentageAlpha);continue}if(Do.test(g)){const b=new Do(g,Ue);o.push(b.angleUnit),d.push(b.hasPercentageAlpha);continue}if(Ho.test(g)){const b=new Ho(g,Ue);n.push(b.hasPercentageValues),d.push(b.hasPercentageAlpha);continue}if(Mo.test(g)){const b=new Mo(g,Ue);r.push(b.hasPercentageValues),d.push(b.hasPercentageAlpha);continue}if(jo.test(g)){const b=new jo(g,Ue);o.push(b.angleUnit),l.push(b.hasPercentageValues),d.push(b.hasPercentageAlpha);continue}if(No.test(g)){const b=new No(g);u.push(b.hasPercentageValues),g.startsWith("cmyk")&&m.cmykFunction++,d.push(b.hasPercentageAlpha)}}return{decimals:typeof e.decimals===bs.NUMBER?e.decimals:dt.decimals,legacyCSS:typeof e.legacyCSS===bs.BOOLEAN?e.legacyCSS:!!(s.length&&m.legacyCSS===s.length)||dt.legacyCSS,spacesAfterCommas:typeof e.spacesAfterCommas===bs.BOOLEAN?e.spacesAfterCommas:!!(s.length&&m.spacesAfterCommas===s.length)||dt.spacesAfterCommas,anglesUnit:e.anglesUnit&&c.includes(e.anglesUnit)?e.anglesUnit:new Set(o).size===1?o[0]:dt.anglesUnit,rgbUnit:e.rgbUnit&&h.includes(e.rgbUnit)?e.rgbUnit:new Set(n).size===1&&n[0]?Oe.PERCENT:dt.rgbUnit,labUnit:e.labUnit&&h.includes(e.labUnit)?e.labUnit:new Set(r).size===1&&r[0]?Oe.PERCENT:dt.labUnit,lchUnit:e.lchUnit&&h.includes(e.lchUnit)?e.lchUnit:new Set(l).size===1&&l[0]?Oe.PERCENT:dt.lchUnit,cmykUnit:e.cmykUnit&&h.includes(e.cmykUnit)?e.cmykUnit:new Set(u).size!==1||u[0]?dt.cmykUnit:Oe.NONE,alphaUnit:e.alphaUnit&&h.includes(e.alphaUnit)?e.alphaUnit:new Set(d).size===1&&d[0]?Oe.PERCENT:dt.alphaUnit,cmykFunction:e.cmykFunction&&f.includes(e.cmykFunction)?e.cmykFunction:u.length&&u.length===m.cmykFunction?_s.CMYK:dt.cmykFunction}},Go=(e,t)=>({H:V(e.H,t),S:V(e.S,t),L:V(e.L,t)}),_o=e=>e?", ":",",Lt=(e,t)=>{const s=yr(Object.keys(e));return gc[Io[s]].reduce(((o,n,r)=>{const l=e[n];return l!==void 0&&o.push(t(l,r)),o}),[])},Bt=(e,t)=>e.replace(vc,((s,o)=>`${t[+o-1]}`)),fs=(e,t,s=!1)=>{const{alphaUnit:o,legacyCSS:n,decimals:r}=t;return o!==Oe.PERCENT||n&&!s?V(e,r):`${V(100*e,r)}%`},En=e=>{const{anglesUnit:t,decimals:s}=e;return(o,n)=>n===0&&t!==ze.NONE?`${V(wr(o,t),s)}${t}`:n===3?fs(o,e):V(o,s)},Q={[X.HEX]:e=>{const t=Lt(e,(o=>(n=>{let r=V(n,0).toString(16).toUpperCase();return r.length===1&&(r=`0${r}`),r})(V(o)))),s=t.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return Bt(s,t)},[X.RGB]:(e,t)=>{const{decimals:s,legacyCSS:o,spacesAfterCommas:n,rgbUnit:r}=t,l=_o(n),u=Lt(e,((c,h)=>r===Oe.PERCENT&&h<3?`${((f,m)=>V(f/te*100,m))(c,s)}%`:h===3?fs(c,t):V(c,s))),d=o?u.length===4?`rgba({1}${l}{2}${l}{3}${l}{4})`:`rgb({1}${l}{2}${l}{3})`:u.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return Bt(d,u)},[X.HSL]:(e,t)=>{const{legacyCSS:s,spacesAfterCommas:o}=t,n=_o(o),r=En(t),l=Lt(e,r),u=s?l.length===4?`hsla({1}${n}{2}%${n}{3}%${n}{4})`:`hsl({1}${n}{2}%${n}{3}%)`:l.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return Bt(u,l)},[X.HWB]:(e,t)=>{const s=En(t),o=Lt(e,s),n=o.length===4?"hwb({1} {2}% {3}% / {4})":"hwb({1} {2}% {3}%)";return Bt(n,o)},[X.CIELab]:(e,t)=>{const{decimals:s,labUnit:o}=t,n=Lt(e,((l,u)=>{if(u===0){const d=V(Ye(l),s);return o===Oe.PERCENT?`${d}%`:`${d}`}return u<3?o===Oe.PERCENT?`${((d,c)=>V(d/wt*100,c))(l,s)}%`:V(l,s):fs(l,t,!0)})),r=n.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return Bt(r,n)},[X.LCH]:(e,t)=>{const{decimals:s,lchUnit:o,anglesUnit:n}=t,r=Lt(e,((u,d)=>{if(d===0){const c=V(Ye(u),s);return o===Oe.PERCENT?`${c}%`:`${c}`}return d===1?o===Oe.PERCENT?`${((c,h)=>V(c/Wt*100,h))(u,s)}%`:V(u,s):d===2?n!==ze.NONE?`${V(wr(u,n),s)}${n}`:V(u,s):fs(u,t,!0)})),l=r.length===4?"lch({1} {2} {3} / {4})":"lch({1} {2} {3})";return Bt(l,r)},[X.CMYK]:(e,t)=>{const{decimals:s,legacyCSS:o,spacesAfterCommas:n,cmykUnit:r,cmykFunction:l}=t,u=_o(n),d=Lt(e,((h,f)=>r===Oe.PERCENT&&f<4?`${V(h,s)}%`:f===4?fs(h,t):V(h/100,s))),c=o?d.length===5?`${l}({1}${u}{2}${u}{3}${u}{4}${u}{5})`:`${l}({1}${u}{2}${u}{3}${u}{4})`:d.length===5?`${l}({1} {2} {3} {4} / {5})`:`${l}({1} {2} {3} {4})`;return Bt(c,d)}},as=(e,t,s)=>t.reduce(((o,n)=>[...o,{...e,H:s===qe.ADDITIVE?et(e.H+n):et(An(An(e.H,!1)+n,!0))}]),[{...e}]),Tc=(e,t)=>as(e,[30,-30],t),Lc=(e,t)=>as(e,[180],t),Bc=(e,t)=>as(e,[150,-150],t),Pc=(e,t)=>as(e,[120,-120],t),Rc=(e,t)=>as(e,[60,-120,180],t),Ic=(e,t)=>as(e,[90,-90,180],t),J={[X.HEX]:e=>({R:Ms(e.R),G:Ms(e.G),B:Ms(e.B)}),HEXA(e){const t=J.HEX(e);return t.A=Ce(e,"A")?Ms(e.A*te):"0xFF",t},[X.RGB](e,t){const s=Oc(e,t);return Ce(s,"A")&&delete s.A,s},RGBA(e,t){const s=J.RGB(e,t);return s.A=Ce(e,"A")?V(e.A):1,s},[X.HSL](e,t){const s=St(e.R,e.G,e.B);return delete s.A,Go(s,t)},HSLA(e,t){const s=J.HSL(e,t);return s.A=Ce(e,"A")?V(e.A,t):1,s},[X.HWB](e,t){const s=Ht(e.R,e.G,e.B);return delete s.A,((o,n)=>({H:V(o.H,n),W:V(o.W,n),B:V(o.B,n)}))(s,t)},HWBA(e,t){const s=J.HWB(e,t);return s.A=Ce(e,"A")?V(e.A,t):1,s},[X.CIELab]:(e,t)=>((s,o)=>({L:V(s.L,o),a:V(s.a,o),b:V(s.b,o)}))(Ct(e.R,e.G,e.B),t),CIELabA(e,t){const s=J.CIELab(e,t);return s.A=Ce(e,"A")?V(e.A,t):1,s},[X.LCH]:(e,t)=>((s,o)=>({L:V(s.L,o),C:V(s.C,o),H:V(s.H,o)}))($t(e.R,e.G,e.B),t),LCHA(e,t){const s=J.LCH(e,t);return s.A=Ce(e,"A")?V(e.A,t):1,s},[X.CMYK]:(e,t)=>((s,o)=>({C:V(s.C,o),M:V(s.M,o),Y:V(s.Y,o),K:V(s.K,o)}))(Ar(e.R,e.G,e.B),t),CMYKA(e,t){const s=J.CMYK(e,t);return s.A=Ce(e,"A")?V(e.A,t):1,s}},js=(e,t,s,o)=>{const n=De(e),r=typeof e=="string",l=Ue(e,n),u=typeof e=="string"&&Ce(l,"A")||typeof e!="string"&&Ce(e,"A"),d=St(l.R,l.G,l.B,l.A);u||delete d.A;const c=s?d.L/(t+1):(100-d.L)/(t+1),h=Array(t).fill(null).map(((f,m)=>({...d,L:d.L+c*(m+1)*(1-2*+s)})));switch(n){case X.HEX:default:return h.map((f=>{const m=ge(f.H,f.S,f.L);return u&&(m.A=f.A),r?u?Q.HEX({...m,A:V(m.A*te)}):Q.HEX(m):u?J.HEXA(m):J.HEX(m)}));case X.RGB:return h.map((f=>{const m=ge(f.H,f.S,f.L);return u&&(m.A=f.A),r?Q.RGB(m,o):u?J.RGBA(m,o.decimals):J.RGB(m,o.decimals)}));case X.HSL:return h.map((f=>r?Q.HSL(f,o):u?J.HSLA({...ge(f.H,f.S,f.L),A:f.A},o.decimals):J.HSL(ge(f.H,f.S,f.L),o.decimals)));case X.HWB:return h.map((f=>{const m=ge(f.H,f.S,f.L);u&&(m.A=f.A);const g=u?J.HWBA(m,o.decimals):J.HWB(m,o.decimals);return r?Q.HWB(g,o):g}));case X.CIELab:return h.map((f=>{const m=ge(f.H,f.S,f.L);u&&(m.A=f.A);const g=u?J.CIELabA(m,o.decimals):J.CIELab(m,o.decimals);return r?Q.CIELab(g,o):g}));case X.LCH:return h.map((f=>{const m=ge(f.H,f.S,f.L),g=$t(m.R,m.G,m.B);return u&&(g.A=f.A),r?Q.LCH(g,o):u?J.LCHA({...m,A:f.A},o.decimals):J.LCH(m,o.decimals)}))}},zt={buildHarmony(e,t,s,o){const n=De(e),r=Ue(e,n),l=St(r.R,r.G,r.B,r.A),u=typeof e=="string"&&Ce(r,"A")||typeof e!="string"&&Ce(e,"A"),d=typeof e=="string";switch(n){case X.HEX:default:return u?this.HEXA(Go(l,0),t,s,d):this.HEX(Go(l,0),t,s,d);case X.HSL:return u?this.HSLA(l,t,s,d,o):this.HSL(l,t,s,d,o);case X.HWB:return u?this.HWBA(l,t,s,d,o):this.HWB(l,t,s,d,o);case X.RGB:return u?this.RGBA(l,t,s,d,o):this.RGB(l,t,s,d,o);case X.CIELab:return u?this.CIELabA(l,t,s,d,o):this.CIELab(l,t,s,d,o);case X.LCH:return u?this.LCHA(l,t,s,d,o):this.LCH(l,t,s,d,o)}},[X.HEX]:(e,t,s,o)=>t(e,s).map((n=>o?Q.HEX(ge(n.H,n.S,n.L)):J.HEX(ge(n.H,n.S,n.L)))),HEXA:(e,t,s,o)=>t(e,s).map((n=>o?Q.HEX({...ge(n.H,n.S,n.L),A:ve(n.A)*te}):J.HEXA({...ge(n.H,n.S,n.L),A:ve(n.A)}))),[X.RGB]:(e,t,s,o,n)=>t(e,s).map((r=>o?Q.RGB(ge(r.H,r.S,r.L),n):J.RGB(ge(r.H,r.S,r.L),n.decimals))),RGBA:(e,t,s,o,n)=>t(e,s).map((r=>o?Q.RGB({...ge(r.H,r.S,r.L),A:ve(r.A)},n):J.RGBA({...ge(r.H,r.S,r.L),A:ve(r.A)},n.decimals))),[X.HSL]:(e,t,s,o,n)=>t(e,s).map((r=>o?Q.HSL({H:r.H,S:r.S,L:r.L},n):J.HSL(ge(r.H,r.S,r.L),n.decimals))),HSLA:(e,t,s,o,n)=>t(e,s).map((r=>o?Q.HSL({...r,A:ve(r.A)},n):J.HSLA({...ge(r.H,r.S,r.L),A:ve(r.A)},n.decimals))),[X.HWB]:(e,t,s,o,n)=>t(e,s).map((r=>{const l=ge(r.H,r.S,r.L),u=Ht(l.R,l.G,l.B);return o?Q.HWB({H:u.H,W:u.W,B:u.B},n):J.HWB(l,n.decimals)})),HWBA:(e,t,s,o,n)=>t(e,s).map((r=>{const l=ge(r.H,r.S,r.L),u=Ht(l.R,l.G,l.B);return o?Q.HWB({...u,A:ve(r.A)},n):J.HWBA({...l,A:ve(r.A)},n.decimals)})),[X.CIELab]:(e,t,s,o,n)=>t(e,s).map((r=>{const l=ge(r.H,r.S,r.L);return o?Q.CIELab(Ct(l.R,l.G,l.B),n):J.CIELab(l,n.decimals)})),CIELabA:(e,t,s,o,n)=>t(e,s).map((r=>{const l=ge(r.H,r.S,r.L);return o?Q.CIELab({...Ct(l.R,l.G,l.B),A:ve(r.A)},n):J.CIELabA({...l,A:ve(r.A)},n.decimals)})),[X.LCH]:(e,t,s,o,n)=>t(e,s).map((r=>{const l=ge(r.H,r.S,r.L);return o?Q.LCH($t(l.R,l.G,l.B),n):J.LCH(l,n.decimals)})),LCHA:(e,t,s,o,n)=>t(e,s).map((r=>{const l=ge(r.H,r.S,r.L);return o?Q.LCH({...$t(l.R,l.G,l.B),A:ve(r.A)},n):J.LCHA({...l,A:ve(r.A)},n.decimals)}))},Ut={mix(e,t){const s=e.map((l=>{const u=De(l);return Ue(l,u)})),o=t===qe.SUBTRACTIVE?s.map((l=>{const u=((d,c,h)=>{const f=Math.min(d,c,h),m=Math.min(te-d,te-c,te-h),g=d-f,b=c-f,w=h-f,y=Math.min(g,b),S=g-y,C=(b+y)/2,R=(w+b-y)/2,F=Math.max(S,C,R)/Math.max(g,b,w),M=isNaN(F)||F===1/0||F<=0?1:F;return{R:S/M+m,Y:C/M+m,B:R/M+m}})(l.R,l.G,l.B);return Ce(l,"A")&&(u.A=l.A),u})):null;function n(l){const u=t===qe.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return l.reduce(((d,c)=>{const h=Ce(c,"A")?c.A:1,f={R:Math.min(d.R+c.R*h,te),B:Math.min(d.B+c.B*h,te),A:1-(1-h)*(1-d.A)},m="G"in d?d.G:d.Y,g="G"in c?c.G:c.Y;return{...f,...t===qe.ADDITIVE?{G:Math.min(m+g*h,te)}:{Y:Math.min(m+g*h,te)}}}),u)}let r;if(t===qe.ADDITIVE)r=n(s);else{const l=n(o);r=((u,d,c)=>{const h=Math.min(u,d,c),f=Math.min(te-u,te-d,te-c),m=u-h,g=d-h,b=c-h,w=Math.min(g,b),y=m+g-w,S=g+w,C=2*(b-w),R=Math.max(y,S,C)/Math.max(m,g,b),F=isNaN(R)||R===1/0||R<=0?1:R;return{R:y/F+f,G:S/F+f,B:C/F+f}})(l.R,l.Y,l.B),r.A=l.A}return{R:V(r.R),G:V(r.G),B:V(r.B),A:ie(r.A,0,1)}},[X.HEX](e,t,s){const o=this.mix(e,t);return delete o.A,s?Q.HEX(o):J.HEX(o)},HEXA(e,t,s){const o=this.mix(e,t);return o.A=s?ve(o.A)*te:ve(o.A),s?Q.HEX(o):J.HEXA(o)},[X.RGB](e,t,s,o){const n=this.mix(e,t);return delete n.A,s?Q.RGB(n,o):J.RGB(n,o.decimals)},RGBA(e,t,s,o){const n=this.mix(e,t);return s?Q.RGB(n,o):J.RGBA(n,o.decimals)},[X.HSL](e,t,s,o){const n=this.mix(e,t),r=St(n.R,n.G,n.B);return delete n.A,delete r.A,s?Q.HSL(r,o):J.HSL(n,o.decimals)},HSLA(e,t,s,o){const n=this.mix(e,t),r=St(n.R,n.G,n.B,n.A);return s?Q.HSL(r,o):J.HSLA(n,o.decimals)},[X.HWB](e,t,s,o){const n=this.mix(e,t),r=Ht(n.R,n.G,n.B);return delete n.A,delete r.A,s?Q.HWB(r,o):J.HWB(n,o.decimals)},HWBA(e,t,s,o){const n=this.mix(e,t),r=Ht(n.R,n.G,n.B,n.A);return s?Q.HWB(r,o):J.HWBA(n,o.decimals)},[X.CIELab](e,t,s,o){const n=this.mix(e,t),r=Ct(n.R,n.G,n.B);return delete n.A,s?Q.CIELab(r,o):J.CIELab(n,o.decimals)},CIELabA(e,t,s,o){const n=this.mix(e,t),r=Ct(n.R,n.G,n.B);return Ce(n,"A")&&(r.A=n.A),s?Q.CIELab(r,o):J.CIELabA(n,o.decimals)},[X.LCH](e,t,s,o){const n=this.mix(e,t),r=$t(n.R,n.G,n.B);return delete n.A,s?Q.LCH(r,o):J.LCH(n,o.decimals)},LCHA(e,t,s,o){const n=this.mix(e,t),r=$t(n.R,n.G,n.B);return Ce(n,"A")&&(r.A=n.A),s?Q.LCH(r,o):J.LCHA(n,o.decimals)}},Oc=(e,t)=>({R:V(e.R,t),G:V(e.G,t),B:V(e.B,t),...Ce(e,"A")?{A:V(e.A,t)}:{}}),Ve=(e,t,s,o)=>o(Ue(e,t),s),Xs=(e,t,s,o,n)=>(s<1&&(s=5),((l,u,d)=>{const c=d-1,h=(u.R-l.R)/c,f=(u.G-l.G)/c,m=(u.B-l.B)/c,g=ve(l.A),b=(ve(u.A)-g)/c;return Array(d).fill(null).map(((w,y)=>y===0?l:y===c?u:{R:V(l.R+h*y),G:V(l.G+f*y),B:V(l.B+m*y),A:V(g+b*y)}))})(Ue(e),Ue(t),s).map((l=>n(l,o))));function Be(e){const{from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:r,cssFunction:l}=e,u=typeof o=="number"?Xs(t,s,o,n?.decimals,r):Xs(t,s,5,o?.decimals,r);return l?u.map((d=>l(d,Ae((typeof o=="number"?n:o)??{},t,s)))):u}function Pe(e){const{colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:n,css:r}=e,l=Ae((typeof s=="string"?o:s)??{},...t);return n(t,typeof s=="string"?s:qe.ADDITIVE,r,l)}const wo=(e,t,s,o)=>({[at.ANALOGOUS]:zt.buildHarmony(t,Tc,s,o),[at.COMPLEMENTARY]:zt.buildHarmony(t,Lc,s,o),[at.SPLIT_COMPLEMENTARY]:zt.buildHarmony(t,Bc,s,o),[at.TRIADIC]:zt.buildHarmony(t,Pc,s,o),[at.TETRADIC]:zt.buildHarmony(t,Rc,s,o),[at.SQUARE]:zt.buildHarmony(t,Ic,s,o)})[e],Re=Object.fromEntries(Object.entries(Ut).map((e=>{const[t,s]=e;return[t,s.bind(Ut)]})));class Te{constructor(t,s={}){this._options=Ae(s,t),this.rgb=Ue(t),this.update("rgb")}update(...t){t.includes("rgb")||this.updateRGB(),t.includes("hsl")||this.updateHSL(),t.includes("hwb")||this.updateHWB(),t.includes("lab")||this.updateLAB(),t.includes("lch")||this.updateLCH(),t.includes("cmyk")||this.updateCMYK()}updateRGB(){this.rgb={...ge(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateHSL(){this.hsl=St(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateHWB(){this.hwb=Ht(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLAB(){this.lab={...Ct(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateLCH(){this.lch={...$t(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=Ar(this.rgb.R,this.rgb.G,this.rgb.B)}updateRGBFromHWB(){this.rgb={...Js(this.hwb.H,this.hwb.W,this.hwb.B),A:this.rgb.A}}updateRGBFromLCH(){this.rgb={...Ys(this.lch.L,this.lch.C,this.lch.H),A:this.rgb.A}}updateRGBFromCMYK(){this.rgb={...dn(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLAB(){this.rgb={...ws(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateLCHFromLAB(){this.lch={...Cr(this.lab.L,this.lab.a,this.lab.b),A:this.lab.A}}updateLABromLCH(){this.lab={...$r(this.lch.L,this.lch.C,this.lch.H),A:this.lch.A}}setOptions(t={}){return this._options={...this._options,...t},this}setR(t){this.rgb.R=ie(t,0,te),this.update("rgb")}setG(t){return this.rgb.G=ie(t,0,te),this.update("rgb"),this}setB(t){return this.rgb.B=ie(t,0,te),this.update("rgb"),this}setH(t){return this.hsl.H=et(t),this.update("hsl"),this}setS(t){return this.hsl.S=ie(t,0,Ze),this.update("hsl"),this}setL(t){return this.hsl.L=ie(t,0,Ze),this.update("hsl"),this}setWhiteness(t){return this.hwb.W=ie(t,0,Ze),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setBlackness(t){return this.hwb.B=ie(t,0,Ze),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setCIEL(t){return this.lab.L=ie(t,0,Ze),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEa(t){return this.lab.a=ie(t,-125,wt),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEb(t){return this.lab.b=ie(t,-125,wt),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setLCHL(t){return this.lch.L=ie(t,0,Ze),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHC(t){return this.lch.C=ie(t,0,Wt),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHH(t){return this.lch.H=et(t),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setA(t){const s=ie(t,0,1);return this.rgb.A=s,this.hsl.A=s,this.hwb.A=s,this.lab.A=s,this.lch.A=s,this.cmyk.A=s,this}setC(t){return this.cmyk.C=ie(t,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setM(t){return this.cmyk.M=ie(t,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setY(t){return this.cmyk.Y=ie(t,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setK(t){return this.cmyk.K=ie(t,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}get options(){return this._options}get R(){return V(this.rgb.R,this.options.decimals)}get G(){return V(this.rgb.G,this.options.decimals)}get B(){return V(this.rgb.B,this.options.decimals)}get H(){return V(this.hsl.H,this.options.decimals)}get S(){return V(this.hsl.S,this.options.decimals)}get L(){return V(this.hsl.L,this.options.decimals)}get Whiteness(){return V(this.hwb.W,this.options.decimals)}get Blackness(){return V(this.hwb.B,this.options.decimals)}get CIEL(){return V(this.lab.L,this.options.decimals)}get CIEa(){return V(this.lab.a,this.options.decimals)}get CIEb(){return V(this.lab.b,this.options.decimals)}get LCHL(){return V(this.lch.L,this.options.decimals)}get LCHC(){return V(this.lch.C,this.options.decimals)}get LCHH(){return V(this.lch.H,this.options.decimals)}get A(){return V(this.hsl.A,this.options.decimals)}get C(){return V(this.cmyk.C,this.options.decimals)}get M(){return V(this.cmyk.M,this.options.decimals)}get Y(){return V(this.cmyk.Y,this.options.decimals)}get K(){return V(this.cmyk.K,this.options.decimals)}get HEXObject(){return J.HEX(this.rgb)}get HEXAObject(){return J.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get HWBObject(){return{H:this.H,W:this.Whiteness,B:this.Blackness}}get HWBAObject(){return{...this.HWBObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get LCHObject(){return{L:this.LCHL,C:this.LCHC,H:this.LCHH}}get LCHAObject(){return{...this.LCHObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return Q.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return Q.HEX({R:this.R,G:this.G,B:this.B,A:this.A*te})}get RGB(){return Q.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return Q.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return Q.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return Q.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get HWB(){return Q.HWB({H:this.H,W:this.Whiteness,B:this.Blackness},this.options)}get HWBA(){return Q.HWB({H:this.H,W:this.Whiteness,B:this.Blackness,A:this.A},this.options)}get CIELab(){return Q.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return Q.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get LCH(){return Q.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH},this.options)}get LCHA(){return Q.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH,A:this.A},this.options)}get CMYK(){return Q.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return Q.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(t){const s=De(t);return Ve(t,s,0,J.HEX)}static toHEX(t){return Q.HEX(Te.toHEXObject(t))}static toHEXAObject(t){const s=De(t);return Ve(t,s,0,J.HEXA)}static toHEXA(t){return Q.HEX(Te.toHEXAObject(t))}static toRGBObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.RGB)}static toRGB(t,s={}){const o=Te.toRGBObject(t,s),n=Ae(s,t);return Q.RGB(o,n)}static toRGBAObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.RGBA)}static toRGBA(t,s={}){const o=Te.toRGBAObject(t,s),n=Ae(s,t);return Q.RGB(o,n)}static toHSLObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.HSL)}static toHSL(t,s={}){const o=Te.toHSLObject(t,s),n=Ae(s,t);return Q.HSL(o,n)}static toHSLAObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.HSLA)}static toHSLA(t,s={}){const o=Te.toHSLAObject(t,s),n=Ae(s,t);return Q.HSL(o,n)}static toHWBObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.HWB)}static toHWB(t,s={}){const o=Te.toHWBObject(t,s),n=Ae(s,t);return Q.HWB(o,n)}static toHWBAObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.HWBA)}static toHWBA(t,s={}){const o=Te.toHWBAObject(t,s),n=Ae(s,t);return Q.HWB(o,n)}static toCIELabObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.CIELab)}static toCIELab(t,s={}){const o=Te.toCIELabObject(t,s),n=Ae(s,t);return Q.CIELab(o,n)}static toCIELabAObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.CIELabA)}static toCIELabA(t,s={}){const o=Te.toCIELabAObject(t,s),n=Ae(s,t);return Q.CIELab(o,n)}static toLCHObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.LCH)}static toLCH(t,s={}){const o=Te.toLCHObject(t,s),n=Ae(s,t);return Q.LCH(o,n)}static toLCHAObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.LCHA)}static toLCHA(t,s={}){const o=Te.toLCHAObject(t,s),n=Ae(s,t);return Q.LCH(o,n)}static toCMYKObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.CMYK)}static toCMYK(t,s={}){const o=Te.toCMYKObject(t,s),n=Ae(s,t);return Q.CMYK(o,n)}static toCMYKAObject(t,s={}){const o=De(t);return Ve(t,o,s.decimals,J.CMYKA)}static toCMYKA(t,s={}){const o=Te.toCMYKAObject(t,s),n=Ae(s,t);return Q.CMYK(o,n)}static getBlendHEXObject(t,s,o=5){return Xs(t,s,o,0,J.HEX)}static getBlendHEX(t,s,o=5){return Te.getBlendHEXObject(t,s,o).map((n=>Q.HEX(n)))}static getBlendHEXAObject(t,s,o=5){return Xs(t,s,o,0,J.HEXA)}static getBlendHEXA(t,s,o=5){return Te.getBlendHEXAObject(t,s,o).map((n=>Q.HEX(n)))}static getBlendRGBObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.RGB})}static getBlendRGB(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.RGB,cssFunction:Q.RGB})}static getBlendRGBAObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.RGBA})}static getBlendRGBA(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.RGBA,cssFunction:Q.RGB})}static getBlendHSLObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HSL})}static getBlendHSL(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HSL,cssFunction:Q.HSL})}static getBlendHSLAObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HSLA})}static getBlendHSLA(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HSLA,cssFunction:Q.HSL})}static getBlendHWBObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HWB})}static getBlendHWB(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HWB,cssFunction:Q.HWB})}static getBlendHWBAObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HWBA})}static getBlendHWBA(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.HWBA,cssFunction:Q.HWB})}static getBlendCIELabObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.CIELab})}static getBlendCIELab(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.CIELab,cssFunction:Q.CIELab})}static getBlendCIELabAObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.CIELabA})}static getBlendCIELabA(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.CIELabA,cssFunction:Q.CIELab})}static getBlendLCHObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.LCH})}static getBlendLCH(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.LCH,cssFunction:Q.LCH})}static getBlendLCHAObject(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.LCHA})}static getBlendLCHA(t,s,o,n){return Be({from:t,to:s,thirdParameter:o,fourthParameter:n,translateFunction:J.LCHA,cssFunction:Q.LCH})}static getMixHEXObject(t,s=qe.ADDITIVE){return Ut.HEX(t,s,!1)}static getMixHEX(t,s=qe.ADDITIVE){return Ut.HEX(t,s,!0)}static getMixHEXAObject(t,s=qe.ADDITIVE){return Ut.HEXA(t,s,!1)}static getMixHEXA(t,s=qe.ADDITIVE){return Ut.HEXA(t,s,!0)}static getMixRGBObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.RGB,css:!1})}static getMixRGB(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.RGB,css:!0})}static getMixRGBAObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.RGBA,css:!1})}static getMixRGBA(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.RGBA,css:!0})}static getMixHSLObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HSL,css:!1})}static getMixHSL(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HSL,css:!0})}static getMixHSLAObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HSLA,css:!1})}static getMixHSLA(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HSLA,css:!0})}static getMixHWBObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HWB,css:!1})}static getMixHWB(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HWB,css:!0})}static getMixHWBAObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HWBA,css:!1})}static getMixHWBA(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.HWBA,css:!0})}static getMixCIELabObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.CIELab,css:!1})}static getMixCIELab(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.CIELab,css:!0})}static getMixCIELabAObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.CIELabA,css:!1})}static getMixCIELabA(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.CIELabA,css:!0})}static getMixLCHObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.LCH,css:!1})}static getMixLCH(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.LCH,css:!0})}static getMixLCHAObject(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.LCHA,css:!1})}static getMixLCHA(t,s,o){return Pe({colors:t,secondParameter:s,thirdParameter:o,colorMixerFunction:Re.LCHA,css:!0})}static getShades(t,s,o){return typeof s=="number"?js(t,s,!0,Ae(o||{},t)):js(t,5,!0,Ae(s||{},t))}static getTints(t,s,o){return typeof s=="number"?js(t,s,!1,Ae(o||{},t)):js(t,5,!1,Ae(s||{},t))}static getHarmony(t,s,o,n){return`${s}`in at?wo(s,t,yo(o)?o:qe.ADDITIVE,Ae(yo(o)?n||{}:o||{},t)):yo(s)?wo(at.COMPLEMENTARY,t,s,Ae(o||{},t)):wo(at.COMPLEMENTARY,t,qe.ADDITIVE,Ae(s||{},t))}}const Hc=["data-disabled"],Fc=["data-disabled"];function Dc(e){const t=e.S*(e.L<50?e.L:100-e.L),s=e.L+t/100;return{h:e.H,s:e.L===0?e.S:2*t/s,v:s}}function Tn(e){const t=(200-e.s)*e.v/100;return{H:e.h,S:t===0||t===200?0:Math.round(e.s*e.v/(t<=100?t:200-t)),L:t/2}}const Mc={__name:"UColorPicker",props:Lo({as:{type:null,required:!1},throttle:{type:Number,required:!1,default:50},disabled:{type:Boolean,required:!1},defaultValue:{type:String,required:!1,default:"#FFFFFF"},format:{type:String,required:!1,default:"hex"},size:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,s=Yn(e,"modelValue",{type:String}),o=ns(),n=Y(()=>ht({extend:ht(Wi),...o.ui?.colorPicker||{}})({size:t.size})),r=Y({get(){try{const U=new Te(s.value||t.defaultValue);return Dc(U.HSLObject)}catch{return{h:0,s:0,v:100}}},set(U){const I=new Te(Tn(U),{labUnit:"percent",cmykUnit:"percent",cmykFunction:"cmyk"});switch(t.format){case"rgb":s.value=I.RGB;break;case"hsl":s.value=I.HSL;break;case"cmyk":s.value=I.CMYK;break;case"lab":s.value=I.CIELab;break;default:s.value=I.HEX}}});function l(U,I,B="both",A={x:0,y:0},j){const H=N(A),O=N(),Z=vn(U),L=vn(I);function se($){if(nt(j))return $.preventDefault();const W=nt(I);O.value={x:$.clientX-(W?$.clientX-L.left.value+W.scrollLeft:Z.left.value),y:$.clientY-(W?$.clientY-L.top.value+W.scrollTop:Z.top.value)},k($)}function k($){if(!O.value)return;const W=nt(I);let{x:re,y:pe}=H.value;W&&(B==="x"||B==="both")&&(re=Math.min(Math.max(0,($.clientX-O.value.x)/W.scrollWidth*100),100)),W&&(B==="y"||B==="both")&&(pe=Math.min(Math.max(0,($.clientY-O.value.y)/W.scrollHeight*100),100)),H.value={x:re,y:pe}}function _(){O.value&&(O.value=void 0)}return Aa&&(go(I,"pointerdown",se),go(window,"pointermove",k),go(window,"pointerup",_)),{position:H}}function u(U,I="left"){return I==="right"?U*100/360:U/100*360}function d(U){return 100-U}const c=N(null),h=N(null),f=N(null),m=N(null),g=Y(()=>t.disabled),{position:b}=l(h,c,"both",{x:r.value.s,y:d(r.value.v)},g),{position:w}=l(m,f,"y",{x:0,y:u(r.value.h,"right")},g),{pause:y,resume:S}=Ca(r,U=>{b.value={x:U.s,y:d(U.v)},w.value={x:0,y:u(U.h,"right")}});$a([b,w],()=>{y(),r.value={h:u(w.value.y),s:b.value.x,v:d(b.value.y)},sn(S)},{throttle:()=>t.throttle});const C=Y(()=>new Te(Tn({h:u(w.value.y),s:100,v:100})).HEX),R=Y(()=>({backgroundColor:C.value})),F=Y(()=>({backgroundColor:new Te(s.value||t.defaultValue).HEX,left:`${b.value.x}%`,top:`${b.value.y}%`})),M=Y(()=>({backgroundColor:C.value,top:`${w.value.y}%`}));return(U,I)=>(p(),G(i(Qo),{as:e.as,"data-slot":"root",class:D(n.value.root({class:[t.ui?.root,t.class]})),"data-disabled":g.value?!0:void 0},{default:z(()=>[a("div",{"data-slot":"picker",class:D(n.value.picker({class:t.ui?.picker}))},[a("div",{ref_key:"selectorRef",ref:c,"data-slot":"selector",class:D(n.value.selector({class:t.ui?.selector})),style:Kt(R.value)},[a("div",{"data-slot":"selectorBackground",class:D(n.value.selectorBackground({class:t.ui?.selectorBackground})),"data-color-picker-background":""},[a("div",{ref_key:"selectorThumbRef",ref:h,"data-slot":"selectorThumb",class:D(n.value.selectorThumb({class:t.ui?.selectorThumb})),style:Kt(F.value),"data-disabled":g.value?!0:void 0},null,14,Hc)],2)],6),a("div",{ref_key:"trackRef",ref:f,"data-slot":"track",class:D(n.value.track({class:t.ui?.track})),"data-color-picker-track":""},[a("div",{ref_key:"trackThumbRef",ref:m,"data-slot":"trackThumb",class:D(n.value.trackThumb({class:t.ui?.trackThumb})),style:Kt(M.value),"data-disabled":g.value?!0:void 0},null,14,Fc)],2)],2)]),_:1},8,["as","class","data-disabled"]))}},jc=Sa(Mc,[["__scopeId","data-v-b486f52e"]]),Nc={class:"flex gap-4 flex-wrap"},Gc=ue({__name:"EditColorTheme",setup(e){const{t}=bt(),s=document.documentElement,o={primeColor:{id:"primeColor",name:"--appui-primary",value:getComputedStyle(s).getPropertyValue("--appui-primary")},secondaryColor:{id:"secondaryColor",name:"--appui-secondary",value:getComputedStyle(s).getPropertyValue("--appui-secondary")},uibgColor:{id:"uibgColor",name:"--appui-uibg",value:getComputedStyle(s).getPropertyValue("--appui-uibg")},textColor:{id:"textColor",name:"--appui-text",value:getComputedStyle(s).getPropertyValue("--appui-text")},borderColor:{id:"borderColor",name:"--appui-border",value:getComputedStyle(s).getPropertyValue("--appui-border")},warningColor:{id:"warningColor",name:"--appui-warning",value:getComputedStyle(s).getPropertyValue("--appui-warning")},successColor:{id:"successColor",name:"--appui-success",value:getComputedStyle(s).getPropertyValue("--appui-success")},errorColor:{id:"errorColor",name:"--appui-error",value:getComputedStyle(s).getPropertyValue("--appui-error")},infoColor:{id:"infoColor",name:"--appui-info",value:getComputedStyle(s).getPropertyValue("--appui-info")},neutralColor:{id:"neutralColor",name:"--appui-neutral",value:getComputedStyle(s).getPropertyValue("--appui-neutral")}},n=N(o),r=()=>{const u=document.documentElement;Object.entries(n.value).forEach(([d,c])=>{u.style.setProperty(c.name,c.value)})},l=()=>{const u=document.documentElement;Object.entries(n.value).forEach(([d,c])=>{u.style.removeProperty(c.name)})};return ye(n,u=>{r()},{deep:!0}),(u,d)=>{const c=it,h=jc,f=ln;return p(),v("div",null,[q(c,{color:"neutral",variant:"outline",onClick:l},{default:z(()=>[de(E(u.$t("reset")),1)]),_:1}),a("div",Nc,[(p(!0),v(oe,null,ce(i(n),m=>(p(),v("div",{key:m.id},[q(f,null,{content:z(()=>[q(h,{modelValue:m.value,"onUpdate:modelValue":g=>m.value=g,class:"p-2"},null,8,["modelValue","onUpdate:modelValue"])]),default:z(()=>[q(c,{label:i(t)(m.id),color:"neutral",variant:"outline"},{leading:z(()=>[a("span",{style:Kt({backgroundColor:`var(${m.name})`}),class:"size-3 rounded-full"},null,4)]),_:2},1032,["label"])]),_:2},1024)]))),128))])])}}}),zc=Object.assign(Gc,{__name:"EditColorTheme"});(function(){var e;try{if(typeof document<"u"){var t=document.createElement("style");t.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,t.appendChild(document.createTextNode('[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}')),document.head.appendChild(t)}}catch(s){console.error("vite-plugin-css-injected-by-js",s)}})();const Uc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Kc=e=>typeof e<"u";function Wc(e){return JSON.parse(JSON.stringify(e))}function Ln(e,t,s,o={}){var n,r,l;const{clone:u=!1,passive:d=!1,eventName:c,deep:h=!1,defaultValue:f,shouldEmit:m}=o,g=La(),b=s||g?.emit||((n=g?.$emit)==null?void 0:n.bind(g))||((l=(r=g?.proxy)==null?void 0:r.$emit)==null?void 0:l.bind(g?.proxy));let w=c;t||(t="modelValue"),w=w||`update:${t.toString()}`;const y=R=>u?typeof u=="function"?u(R):Wc(R):R,S=()=>Kc(e[t])?y(e[t]):f,C=R=>{m?m(R)&&b(w,R):b(w,R)};if(d){const R=S(),F=N(R);let M=!1;return ye(()=>e[t],U=>{M||(M=!0,F.value=y(U),sn(()=>M=!1))}),ye(F,U=>{!M&&(U!==e[t]||h)&&C(U)},{deep:h}),F}else return Y({get(){return S()},set(R){C(R)}})}const[As,qc]=Ta("DrawerRoot"),Tr=new WeakMap;function Me(e,t,s=!1){if(!e||!(e instanceof HTMLElement)||!t)return;const o={};Object.entries(t).forEach(([n,r])=>{if(n.startsWith("--")){e.style.setProperty(n,r);return}o[n]=e.style[n],e.style[n]=r}),!s&&Tr.set(e,o)}function Vc(e,t){if(!e||!(e instanceof HTMLElement))return;const s=Tr.get(e);s&&Object.entries(s).forEach(([o,n])=>{e.style[o]=n})}function Ns(e,t){const s=window.getComputedStyle(e),o=s.transform||s.webkitTransform||s.mozTransform;let n=o.match(/^matrix3d\((.+)\)$/);return n?Number.parseFloat(n[1].split(", ")[Ie(t)?13:12]):(n=o.match(/^matrix\((.+)\)$/),n?Number.parseFloat(n[1].split(", ")[Ie(t)?5:4]):null)}function Yc(e){return 8*(Math.log(e+1)-2)}function Ie(e){switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}}function ko(e,t){if(!e)return()=>{};const s=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=s}}function Jc(...e){return(...t)=>{for(const s of e)typeof s=="function"&&s(...t)}}const Se={DURATION:.5,EASE:[.32,.72,0,1]},Lr=.4,Xc=.25,Qc=100,Br=8,Gs=16,Pr=26,Bn="vaul-dragging";function Zc({activeSnapPoint:e,snapPoints:t,drawerRef:s,overlayRef:o,fadeFromIndex:n,onSnapPointChange:r,direction:l}){const u=N(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function d(){u.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}kt(()=>{typeof window<"u"&&window.addEventListener("resize",d)}),Ba(()=>{typeof window<"u"&&window.removeEventListener("resize",d)});const c=Y(()=>(t.value&&e.value===t.value[t.value.length-1])??null),h=Y(()=>t.value&&t.value.length>0&&(n?.value||n?.value===0)&&!Number.isNaN(n?.value)&&t.value[n?.value??-1]===e.value||!t.value),f=Y(()=>{var C;return((C=t.value)==null?void 0:C.findIndex(R=>R===e.value))??null}),m=Y(()=>{var C;return((C=t.value)==null?void 0:C.map(R=>{const F=typeof R=="string";let M=0;if(F&&(M=Number.parseInt(R,10)),Ie(l.value)){const I=F?M:u.value?R*u.value.innerHeight:0;return u.value?l.value==="bottom"?u.value.innerHeight-I:-u.value.innerHeight+I:I}const U=F?M:u.value?R*u.value.innerWidth:0;return u.value?l.value==="right"?u.value.innerWidth-U:-u.value.innerWidth+U:U}))??[]}),g=Y(()=>{var C;return f.value!==null?(C=m.value)==null?void 0:C[f.value]:null}),b=C=>{var R,F,M,U;const I=((R=m.value)==null?void 0:R.findIndex(B=>B===C))??null;sn(()=>{var B;r(I,m.value),Me((B=s.value)==null?void 0:B.$el,{transition:`transform ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`,transform:Ie(l.value)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`})}),m.value&&I!==m.value.length-1&&I!==n?.value?Me((F=o.value)==null?void 0:F.$el,{transition:`opacity ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`,opacity:"0"}):Me((M=o.value)==null?void 0:M.$el,{transition:`opacity ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`,opacity:"1"}),e.value=I!==null?((U=t.value)==null?void 0:U[I])??null:null};ye([e,m,t],()=>{var C;if(e.value){const R=((C=t.value)==null?void 0:C.findIndex(F=>F===e.value))??-1;m.value&&R!==-1&&typeof m.value[R]=="number"&&b(m.value[R])}},{immediate:!0});function w({draggedDistance:C,closeDrawer:R,velocity:F,dismissible:M}){var U,I,B;if(n.value===void 0)return;const A=l.value==="bottom"||l.value==="right"?(g.value??0)-C:(g.value??0)+C,j=f.value===n.value-1,H=f.value===0,O=C>0;if(j&&Me((U=o.value)==null?void 0:U.$el,{transition:`opacity ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`}),F>2&&!O){M?R():b(m.value[0]);return}if(F>2&&O&&m&&t.value){b(m.value[t.value.length-1]);return}const Z=(I=m.value)==null?void 0:I.reduce((se,k)=>typeof se!="number"||typeof k!="number"?se:Math.abs(k-A)<Math.abs(se-A)?k:se),L=Ie(l.value)?window.innerHeight:window.innerWidth;if(F>Lr&&Math.abs(C)<L*.4){const se=O?1:-1;if(se>0&&c){b(m.value[(((B=t.value)==null?void 0:B.length)??0)-1]);return}if(H&&se<0&&M&&R(),f.value===null)return;b(m.value[f.value+se]);return}b(Z)}function y({draggedDistance:C}){var R;if(g.value===null)return;const F=l.value==="bottom"||l.value==="right"?g.value-C:g.value+C;(l.value==="bottom"||l.value==="right")&&F<m.value[m.value.length-1]||(l.value==="top"||l.value==="left")&&F>m.value[m.value.length-1]||Me((R=s.value)==null?void 0:R.$el,{transform:Ie(l.value)?`translate3d(0, ${F}px, 0)`:`translate3d(${F}px, 0, 0)`})}function S(C,R){if(!t.value||typeof f.value!="number"||!m.value||n.value===void 0)return null;const F=f.value===n.value-1;if(f.value>=n.value&&R)return 0;if(F&&!R)return 1;if(!h.value&&!F)return null;const M=F?f.value+1:f.value-1,U=F?m.value[M]-m.value[M-1]:m.value[M+1]-m.value[M],I=C/Math.abs(U);return F?1-I:I}return{isLastSnapPoint:c,shouldFade:h,getPercentageDragged:S,activeSnapPointIndex:f,onRelease:w,onDrag:y,snapPointsOffset:m}}function Pn(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let hs=null;function eu(e){const{isOpen:t,modal:s,nested:o,hasBeenOpened:n,preventScrollRestoration:r,noBodyStyles:l}=e,u=N(typeof window<"u"?window.location.href:""),d=N(0);function c(){if(Pn()&&hs===null&&t.value&&!l.value){hs={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:f,innerHeight:m}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.value}px`,left:`${-f}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const g=m-window.innerHeight;g&&d.value>=m&&(document.body.style.top=`-${d.value+g}px`)})},300)}}function h(){if(Pn()&&hs!==null&&!l.value){const f=-Number.parseInt(document.body.style.top,10),m=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,hs),window.requestAnimationFrame(()=>{if(r.value&&u.value!==window.location.href){u.value=window.location.href;return}window.scrollTo(m,f)}),hs=null}}return kt(()=>{function f(){d.value=window.scrollY}f(),window.addEventListener("scroll",f),no(()=>{window.removeEventListener("scroll",f)})}),ye([t,n,u],()=>{o.value||!n.value||(t.value?(window.matchMedia("(display-mode: standalone)").matches||c(),s.value||setTimeout(()=>{h()},500)):h())}),{restorePositionSetting:h}}function tu(e,t){return e&&e.value?e:t}function su(e){const{emitDrag:t,emitRelease:s,emitClose:o,emitOpenChange:n,open:r,dismissible:l,nested:u,modal:d,shouldScaleBackground:c,setBackgroundColorOnScale:h,scrollLockTimeout:f,closeThreshold:m,activeSnapPoint:g,fadeFromIndex:b,direction:w,noBodyStyles:y,handleOnly:S,preventScrollRestoration:C}=e,R=N(r.value??!1),F=N(!1),M=N(!1),U=N(!1),I=N(null),B=N(null),A=N(null),j=N(null),H=N(null),O=N(!1),Z=N(null),L=N(0),se=N(!1),k=N(null),_=Y(()=>{var ne;return((ne=k.value)==null?void 0:ne.$el.getBoundingClientRect().height)||0}),$=tu(e.snapPoints,N(void 0)),W=Y(()=>{var ne;return $&&(((ne=$.value)==null?void 0:ne.length)??0)>0}),re=N(null),{activeSnapPointIndex:pe,onRelease:Ee,snapPointsOffset:lt,onDrag:ls,shouldFade:Ts,getPercentageDragged:lo}=Zc({snapPoints:$,activeSnapPoint:g,drawerRef:k,fadeFromIndex:b,overlayRef:I,onSnapPointChange:co,direction:w});function co(ne,fe){$.value&&ne===fe.length-1&&(B.value=new Date)}eu({isOpen:R,modal:d,nested:u,hasBeenOpened:F,noBodyStyles:y,preventScrollRestoration:C});function Dt(){return(window.innerWidth-Pr)/window.innerWidth}function Ls(ne,fe){var ke;if(!ne)return!1;let he=ne;const Fe=(ke=window.getSelection())==null?void 0:ke.toString(),je=k.value?Ns(k.value.$el,w.value):null,We=new Date;if(he.hasAttribute("data-vaul-no-drag")||he.closest("[data-vaul-no-drag]"))return!1;if(w.value==="right"||w.value==="left")return!0;if(B.value&&We.getTime()-B.value.getTime()<500)return!1;if(je!==null&&(w.value==="bottom"?je>0:je<0))return!0;if(Fe&&Fe.length>0)return!1;if(H.value&&We.getTime()-H.value.getTime()<f.value&&je===0||fe)return H.value=We,!1;for(;he;){if(he.scrollHeight>he.clientHeight){if(he.scrollTop!==0)return H.value=new Date,!1;if(he.getAttribute("role")==="dialog")return!0}he=he.parentNode}return!0}function uo(ne){!l.value&&!$.value||k.value&&!k.value.$el.contains(ne.target)||(M.value=!0,A.value=new Date,ne.target.setPointerCapture(ne.pointerId),L.value=Ie(w.value)?ne.clientY:ne.clientX)}function cs(ne){var fe,ke,he,Fe,je,We;if(k.value&&M.value){const Ke=w.value==="bottom"||w.value==="right"?1:-1,jt=(L.value-(Ie(w.value)?ne.clientY:ne.clientX))*Ke,Tt=jt>0,Rs=$.value&&!l.value&&!Tt;if(Rs&&pe.value===0)return;const ds=Math.abs(jt),Is=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let ft=ds/_.value;const Os=lo(ds,Tt);if(Os!==null&&(ft=Os),Rs&&ft>=1||!O.value&&!Ls(ne.target,Tt))return;if((fe=k?.value)==null||fe.$el.classList.add(Bn),O.value=!0,Me((ke=k.value)==null?void 0:ke.$el,{transition:"none"}),Me((he=I.value)==null?void 0:he.$el,{transition:"none"}),$.value&&ls({draggedDistance:jt}),Tt&&!$.value){const gt=Yc(jt),Nt=Math.min(gt*-1,0)*Ke;Me((Fe=k.value)==null?void 0:Fe.$el,{transform:Ie(w.value)?`translate3d(0, ${Nt}px, 0)`:`translate3d(${Nt}px, 0, 0)`});return}const ho=1-ft;if((Ts.value||b.value&&pe.value===b.value-1)&&(t(ft),Me((je=I.value)==null?void 0:je.$el,{opacity:`${ho}`,transition:"none"},!0)),Is&&I.value&&c.value){const gt=Math.min(Dt()+ft*(1-Dt()),1),Nt=8-ft*8,Hs=Math.max(0,14-ft*14);Me(Is,{borderRadius:`${Nt}px`,transform:Ie(w.value)?`scale(${gt}) translate3d(0, ${Hs}px, 0)`:`scale(${gt}) translate3d(${Hs}px, 0, 0)`,transition:"none"},!0)}if(!$.value){const gt=ds*Ke;Me((We=k.value)==null?void 0:We.$el,{transform:Ie(w.value)?`translate3d(0, ${gt}px, 0)`:`translate3d(${gt}px, 0, 0)`})}}}function Bs(){var ne;if(!k.value)return;const fe=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),ke=Ns(k.value.$el,w.value);Me(k.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`}),Me((ne=I.value)==null?void 0:ne.$el,{transition:`opacity ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`,opacity:"1"}),c.value&&ke&&ke>0&&R.value&&Me(fe,{borderRadius:`${Br}px`,overflow:"hidden",...Ie(w.value)?{transform:`scale(${Dt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Dt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Se.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Se.EASE.join(",")})`},!0)}function Et(ne){k.value&&(o(),ne||(R.value=!1),window.setTimeout(()=>{$.value&&(g.value=$.value[0])},Se.DURATION*1e3))}Cs(()=>{if(!R.value&&c.value&&Uc){const ne=setTimeout(()=>{Vc(document.body)},200);return()=>clearTimeout(ne)}}),ye(r,()=>{R.value=r.value,r.value||Et()});function us(ne){if(!M.value||!k.value)return;k.value.$el.classList.remove(Bn),O.value=!1,M.value=!1,j.value=new Date;const fe=Ns(k.value.$el,w.value);if(!Ls(ne.target,!1)||!fe||Number.isNaN(fe)||A.value===null)return;const ke=j.value.getTime()-A.value.getTime(),he=L.value-(Ie(w.value)?ne.clientY:ne.clientX),Fe=Math.abs(he)/ke;if(Fe>.05&&(U.value=!0,window.setTimeout(()=>{U.value=!1},200)),$.value){const We=w.value==="bottom"||w.value==="right"?1:-1;Ee({draggedDistance:he*We,closeDrawer:Et,velocity:Fe,dismissible:l.value}),s(!0);return}if(w.value==="bottom"||w.value==="right"?he>0:he<0){Bs(),s(!0);return}if(Fe>Lr){Et(),s(!1);return}const je=Math.min(k.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(fe>=je*m.value){Et(),s(!1);return}s(!0),Bs()}ye(R,ne=>{ne&&(B.value=new Date),n(ne)},{immediate:!0});function po(ne){var fe,ke;const he=ne?(window.innerWidth-Gs)/window.innerWidth:1,Fe=ne?-16:0;Z.value&&window.clearTimeout(Z.value),Me((fe=k.value)==null?void 0:fe.$el,{transition:`transform ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`,transform:`scale(${he}) translate3d(0, ${Fe}px, 0)`}),!ne&&(ke=k.value)!=null&&ke.$el&&(Z.value=window.setTimeout(()=>{var je,We;const Ke=Ns((je=k.value)==null?void 0:je.$el,w.value);Me((We=k.value)==null?void 0:We.$el,{transition:"none",transform:Ie(w.value)?`translate3d(0, ${Ke}px, 0)`:`translate3d(${Ke}px, 0, 0)`})},500))}function Mt(ne){var fe;if(ne<0)return;const ke=Ie(w.value)?window.innerHeight:window.innerWidth,he=(ke-Gs)/ke,Fe=he+ne*(1-he),je=-16+ne*Gs;Me((fe=k.value)==null?void 0:fe.$el,{transform:Ie(w.value)?`scale(${Fe}) translate3d(0, ${je}px, 0)`:`scale(${Fe}) translate3d(${je}px, 0, 0)`,transition:"none"})}function Ps(ne){var fe;const ke=Ie(w.value)?window.innerHeight:window.innerWidth,he=ne?(ke-Gs)/ke:1,Fe=ne?-16:0;ne&&Me((fe=k.value)==null?void 0:fe.$el,{transition:`transform ${Se.DURATION}s cubic-bezier(${Se.EASE.join(",")})`,transform:Ie(w.value)?`scale(${he}) translate3d(0, ${Fe}px, 0)`:`scale(${he}) translate3d(${Fe}px, 0, 0)`})}return{open:r,isOpen:R,modal:d,keyboardIsOpen:se,hasBeenOpened:F,drawerRef:k,drawerHeightRef:_,overlayRef:I,handleRef:re,isDragging:M,dragStartTime:A,isAllowedToDrag:O,snapPoints:$,activeSnapPoint:g,hasSnapPoints:W,pointerStart:L,dismissible:l,snapPointsOffset:lt,direction:w,shouldFade:Ts,fadeFromIndex:b,shouldScaleBackground:c,setBackgroundColorOnScale:h,onPress:uo,onDrag:cs,onRelease:us,closeDrawer:Et,onNestedDrag:Mt,onNestedRelease:Ps,onNestedOpenChange:po,emitClose:o,emitDrag:t,emitRelease:s,emitOpenChange:n,nested:u,handleOnly:S,noBodyStyles:y}}const Rr=ue({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Xc},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:Qc},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{expose:t,emit:s}){const o=e,n=s;os();const r=Y(()=>o.fadeFromIndex??(o.snapPoints&&o.snapPoints.length-1)),l=Ln(o,"open",n,{defaultValue:o.defaultOpen,passive:o.open===void 0}),u=Ln(o,"activeSnapPoint",n,{passive:o.activeSnapPoint===void 0}),d={emitDrag:b=>n("drag",b),emitRelease:b=>n("release",b),emitClose:()=>n("close"),emitOpenChange:b=>{n("update:open",b),setTimeout(()=>{n("animationEnd",b)},Se.DURATION*1e3)}},{closeDrawer:c,hasBeenOpened:h,modal:f,isOpen:m}=qc(su({...d,...Ea(o),activeSnapPoint:u,fadeFromIndex:r,open:l}));function g(b){if(l.value!==void 0){d.emitOpenChange(b);return}m.value=b,b?h.value=!0:c()}return t({open:m}),(b,w)=>(p(),G(i(Ii),{open:i(m),modal:i(f),"onUpdate:open":g},{default:z(()=>[le(b.$slots,"default",{open:i(m)})]),_:3},8,["open","modal"]))}}),ou=ue({__name:"DrawerRootNested",props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const s=e,o=t,{onNestedDrag:n,onNestedOpenChange:r,onNestedRelease:l}=As();function u(){r(!1)}function d(f){n(f)}function c(f){f&&r(f),o("update:open",f)}const h=$s(s,o);return(f,m)=>(p(),G(Rr,_e(i(h),{nested:"",onClose:u,onDrag:d,onRelease:i(l),"onUpdate:open":c}),{default:z(()=>[le(f.$slots,"default")]),_:3},16,["onRelease"]))}}),nu=ue({__name:"DrawerOverlay",setup(e){const{overlayRef:t,hasSnapPoints:s,isOpen:o,shouldFade:n}=As();return(r,l)=>(p(),G(i(Pi),{ref_key:"overlayRef",ref:t,"data-vaul-overlay":"","data-vaul-snap-points":i(o)&&i(s)?"true":"false","data-vaul-snap-points-overlay":i(o)&&i(n)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),ru=()=>()=>{};function au(){const{direction:e,isOpen:t,shouldScaleBackground:s,setBackgroundColorOnScale:o,noBodyStyles:n}=As(),r=N(null),l=N(document.body.style.backgroundColor);function u(){return(window.innerWidth-Pr)/window.innerWidth}Cs(d=>{if(t.value&&s.value){r.value&&clearTimeout(r.value);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;Jc(o.value&&!n.value?ko(document.body,{background:"black"}):ru,ko(c,{transformOrigin:Ie(e.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Se.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Se.EASE.join(",")})`}));const h=ko(c,{borderRadius:`${Br}px`,overflow:"hidden",...Ie(e.value)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});d(()=>{h(),r.value=window.setTimeout(()=>{l.value?document.body.style.background=l.value:document.body.style.removeProperty("background")},Se.DURATION*1e3)})}},{flush:"pre"})}const iu=ue({__name:"DrawerContent",setup(e){const{open:t,isOpen:s,snapPointsOffset:o,hasSnapPoints:n,drawerRef:r,onPress:l,onDrag:u,onRelease:d,modal:c,emitOpenChange:h,dismissible:f,keyboardIsOpen:m,closeDrawer:g,direction:b,handleOnly:w}=As();au();const y=N(!1),S=Y(()=>o.value&&o.value.length>0?`${o.value[0]}px`:"0");function C(M){if(!c.value||M.defaultPrevented){M.preventDefault();return}m.value&&(m.value=!1),f.value?h(!1):M.preventDefault()}function R(M){w.value||l(M)}function F(M){w.value||u(M)}return Cs(()=>{n.value&&window.requestAnimationFrame(()=>{y.value=!0})}),(M,U)=>(p(),G(i(Ri),{ref_key:"drawerRef",ref:r,"data-vaul-drawer":"","data-vaul-drawer-direction":i(b),"data-vaul-delayed-snap-points":y.value?"true":"false","data-vaul-snap-points":i(s)&&i(n)?"true":"false",style:Kt({"--snap-point-height":S.value}),onPointerdown:R,onPointermove:F,onPointerup:i(d),onPointerDownOutside:C,onOpenAutoFocus:U[0]||(U[0]=Bo(()=>{},["prevent"])),onEscapeKeyDown:U[1]||(U[1]=I=>{i(f)||I.preventDefault()})},{default:z(()=>[le(M.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),lu=["data-vaul-drawer-visible"],cu={"data-vaul-handle-hitarea":"","aria-hidden":"true"},uu=250,du=120,pu=ue({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(e){const t=e,{onPress:s,onDrag:o,handleRef:n,handleOnly:r,isOpen:l,snapPoints:u,activeSnapPoint:d,isDragging:c,dismissible:h,closeDrawer:f}=As(),m=N(null),g=N(!1);function b(){if(g.value){S();return}window.setTimeout(()=>{w()},du)}function w(){if(c.value||t.preventCycle||g.value){S();return}if(S(),!u.value||u.value.length===0){h.value||f();return}const F=d.value===u.value[u.value.length-1];if(F&&h.value){f();return}const M=u.value.findIndex(I=>I===d.value);if(M===-1)return;const U=F?0:M+1;d.value=u.value[U]}function y(){m.value=window.setTimeout(()=>{g.value=!0},uu)}function S(){m.value&&window.clearTimeout(m.value),g.value=!1}function C(F){r.value&&s(F),y()}function R(F){r.value&&o(F)}return(F,M)=>(p(),v("div",{ref_key:"handleRef",ref:n,"data-vaul-drawer-visible":i(l)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:b,onPointercancel:S,onPointerdown:C,onPointermove:R},[a("span",cu,[le(F.$slots,"default")])],40,lu))}}),hu={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["close:prevent","drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const s=e,o=t,n=os(),r=ns(),l=$s(oo(s,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),o),u=Jn(Qt(()=>s.portal)),d=Qt(()=>s.content),c=Y(()=>s.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((m,g)=>(m[g]=b=>{b.preventDefault(),o("close:prevent")},m),{})),h=Y(()=>ht({extend:ht(Vi),...r.ui?.drawer||{}})({direction:s.direction,inset:s.inset,snapPoints:s.snapPoints&&s.snapPoints.length>0}));return(f,m)=>(p(),G(on(e.nested?i(ou):i(Rr)),Yt(Jt(i(l))),{default:z(()=>[n.default?(p(),G(i(Oi),{key:0,"as-child":"",class:D(s.class)},{default:z(()=>[le(f.$slots,"default")]),_:3},8,["class"])):T("",!0),q(i(Hi),Yt(Jt(i(u))),{default:z(()=>[e.overlay?(p(),G(i(nu),{key:0,"data-slot":"overlay",class:D(h.value.overlay({class:s.ui?.overlay}))},null,8,["class"])):T("",!0),q(i(iu),_e({"data-slot":"content",class:h.value.content({class:[!n.default&&s.class,s.ui?.content]})},d.value,Pa(c.value)),{default:z(()=>[e.handle?(p(),G(i(pu),{key:0,"data-slot":"handle",class:D(h.value.handle({class:s.ui?.handle}))},null,8,["class"])):T("",!0),n.content&&(e.title||n.title||e.description||n.description)?(p(),G(i(Ra),{key:1},{default:z(()=>[e.title||n.title?(p(),G(i(Cn),{key:0},{default:z(()=>[le(f.$slots,"title",{},()=>[de(E(e.title),1)])]),_:3})):T("",!0),e.description||n.description?(p(),G(i($n),{key:1},{default:z(()=>[le(f.$slots,"description",{},()=>[de(E(e.description),1)])]),_:3})):T("",!0)]),_:3})):T("",!0),le(f.$slots,"content",{},()=>[a("div",{"data-slot":"container",class:D(h.value.container({class:s.ui?.container}))},[n.header||e.title||n.title||e.description||n.description?(p(),v("div",{key:0,"data-slot":"header",class:D(h.value.header({class:s.ui?.header}))},[le(f.$slots,"header",{},()=>[e.title||n.title?(p(),G(i(Cn),{key:0,"data-slot":"title",class:D(h.value.title({class:s.ui?.title}))},{default:z(()=>[le(f.$slots,"title",{},()=>[de(E(e.title),1)])]),_:3},8,["class"])):T("",!0),e.description||n.description?(p(),G(i($n),{key:1,"data-slot":"description",class:D(h.value.description({class:s.ui?.description}))},{default:z(()=>[le(f.$slots,"description",{},()=>[de(E(e.description),1)])]),_:3},8,["class"])):T("",!0)])],2)):T("",!0),n.body?(p(),v("div",{key:1,"data-slot":"body",class:D(h.value.body({class:s.ui?.body}))},[le(f.$slots,"body")],2)):T("",!0),n.footer?(p(),v("div",{key:2,"data-slot":"footer",class:D(h.value.footer({class:s.ui?.footer}))},[le(f.$slots,"footer")],2)):T("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}},mu={key:0},fu={class:"text-uiText-muted font-normal text-xs o_mb-1"},gu={class:"flex o_gap-2"},vu={class:"flex items-center justify-center"},bu={class:"flex items-center justify-center"},yu={class:"flex items-center justify-center"},xu={class:"flex items-center justify-center"},_u={class:"flex items-center justify-center"},wu={class:"flex items-center justify-center"},ku={class:"flex items-center justify-center"},Su={class:"pb-6"},Cu=ue({__name:"ThemeSwitcher",setup(e){const t=bn(),{policyGuard:s,checkCombinedPolicyGuard:o}=es(),n=Y(()=>bn().value==="dark"?"light":"dark"),{tracker:r}=tn(),l=tt(),u=()=>{t.value=t.value==="dark"?"light":"dark",t.preference=t.value,r("color_theme_mode","click","Toggle color theme mode")},d=()=>{l.colorHighContrastMode=!l.colorHighContrastMode,r("color_contrast_mode","click","Toggle color contrast mode")},c=h=>{l.colorBlindMode=l.colorBlindMode===h?"neutral":h,r("color_theme_mode","click","Toggle color blind mode")};return(h,f)=>{const m=xe,g=it,b=Bi,w=zc,y=hu,S=ss("tippy");return i(o)(["usermenu.colorModeEntries.darkModeSwitch","usermenu.colorModeEntries.highContrastSwitch","usermenu.colorModeEntries.colorBlindSwitches","usermenu.colorModeEntries.customizeColorThemeMode"],"or",{trackingContext:{components:"ThemeSwitcher"}})?(p(),v("div",mu,[a("div",fu,E(h.$t("ColorModes")),1),a("div",gu,[q(b,null,{default:z(()=>[i(s)("usermenu.colorModeEntries.darkModeSwitch",{trackingContext:{components:"ThemeSwitcher (show dark mode switch)"}})?(p(),G(g,{key:0,color:i(n)==="dark"?"neutral":"primary",variant:"subtle",class:"flex justify-center items-center text-uiText-muted hover:text-uiText",onClick:u},{default:z(()=>[be((p(),v("span",vu,[q(m,{name:i(n)==="dark"?"material-symbols:dark-mode-outline":"material-symbols:light-mode-outline",class:"size-4"},null,8,["name"])])),[[S,{content:h.$t("SwitchLightDarkMode"),theme:i(n)}]])]),_:1},8,["color"])):T("",!0),i(s)("usermenu.colorModeEntries.highContrastSwitch",{trackingContext:{components:"ThemeSwitcher (show high contrast switch)"}})?(p(),G(g,{key:1,color:i(l).colorHighContrastMode?"primary":"neutral",variant:"subtle",class:"flex justify-center items-center text-uiText-muted hover:text-uiText",onClick:d},{default:z(()=>[be((p(),v("span",bu,[q(m,{name:i(l).colorHighContrastMode?"ri:contrast-drop-2-fill":"ri:contrast-drop-2-line",class:"size-4"},null,8,["name"])])),[[S,{content:h.$t("SwitchContrastMode"),theme:i(n)}]])]),_:1},8,["color"])):T("",!0),i(s)("usermenu.colorModeEntries.colorBlindSwitches",{trackingContext:{components:"ThemeSwitcher (show color blind mode)"}})?(p(),v(oe,{key:2},[q(g,{color:i(l).colorBlindMode==="protanopia"?"primary":"neutral",variant:"subtle",class:"flex justify-center items-center text-uiText-muted hover:text-uiText",onClick:f[0]||(f[0]=C=>c("protanopia"))},{default:z(()=>[be((p(),v("span",yu,[q(m,{name:"icon-park-twotone:color-filter",class:"size-4"})])),[[S,{content:h.$t("ProtanopiaMode"),theme:i(n)}]])]),_:1},8,["color"]),q(g,{color:i(l).colorBlindMode==="deuteranopia"?"primary":"neutral",variant:"subtle",class:"flex justify-center items-center text-uiText-muted hover:text-uiText",onClick:f[1]||(f[1]=C=>c("deuteranopia"))},{default:z(()=>[be((p(),v("span",xu,[q(m,{name:"icon-park-twotone:color-filter",class:"size-4 rotate-120"})])),[[S,{content:h.$t("DeuteranopiaMode"),theme:i(n)}]])]),_:1},8,["color"]),q(g,{color:i(l).colorBlindMode==="tritanopia"?"primary":"neutral",variant:"subtle",class:"flex justify-center items-center text-uiText-muted hover:text-uiText",onClick:f[2]||(f[2]=C=>c("tritanopia"))},{default:z(()=>[be((p(),v("span",_u,[q(m,{name:"icon-park-twotone:color-filter",class:"size-4 rotate-180"})])),[[S,{content:h.$t("TritanopiaMode"),theme:i(n)}]])]),_:1},8,["color"])],64)):T("",!0),i(s)("usermenu.colorModeEntries.customizeColorThemeMode",{trackingContext:{components:"ThemeSwitcher (show customize color theme mode)"}})?(p(),G(g,{key:3,color:i(l).colorBlindMode==="custom"?"primary":"neutral",variant:"subtle",class:"flex justify-center items-center text-uiText-muted hover:text-uiText",onClick:f[3]||(f[3]=C=>c("custom"))},{default:z(()=>[be((p(),v("span",wu,[q(m,{name:"ri:color-filter-line",class:"size-4"})])),[[S,{content:h.$t("CustomMode"),theme:i(n)}]])]),_:1},8,["color"])):T("",!0)]),_:1}),i(s)("usermenu.colorModeEntries.customizeColorThemeMode",{trackingContext:{components:"ThemeSwitcher (show customize color theme mode)"}})?(p(),G(y,{key:0,title:"Edit Color Mode",ui:{overlay:"bg-uiBg-inverted/0"}},{body:z(()=>[a("div",Su,[q(w)])]),default:z(()=>[i(l).colorBlindMode==="custom"?(p(),G(g,{key:0,color:"neutral",variant:"subtle",class:"flex justify-center items-center text-uiText-muted hover:text-uiText"},{default:z(()=>[be((p(),v("span",ku,[q(m,{name:"bxs:color",class:"size-4"})])),[[S,{content:h.$t("EditColorMode"),theme:i(n)}]])]),_:1})):T("",!0)]),_:1})):T("",!0)])])):T("",!0)}}}),$u=Object.assign(Cu,{__name:"ThemeSwitcher"}),Ir={__name:"UDropdownMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const s=e,o=t,n=os(),{dir:r}=Xn(),l=ns(),u=Jn(Qt(()=>s.portal)),d=$s(Ia(s,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),o),c=()=>rn(n,["default"]),[h,f]=Qn(),m=Y(()=>r.value==="rtl"?l.ui.icons.chevronLeft:l.ui.icons.chevronRight),g=Y(()=>s.items?.length?Oa(s.items)?s.items:[s.items]:[]);return(b,w)=>(p(),v(oe,null,[q(i(h),null,{default:z(({item:y,active:S,index:C})=>[le(b.$slots,y.slot||"item",{item:y,index:C,ui:e.ui},()=>[le(b.$slots,y.slot?`${y.slot}-leading`:"item-leading",{item:y,active:S,index:C,ui:e.ui},()=>[y.loading?(p(),G(xe,{key:0,name:e.loadingIcon||i(l).ui.icons.loading,"data-slot":"itemLeadingIcon",class:D(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,loading:!0}))},null,8,["name","class"])):y.icon?(p(),G(xe,{key:1,name:y.icon,"data-slot":"itemLeadingIcon",class:D(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,active:S}))},null,8,["name","class"])):y.avatar?(p(),G(en,_e({key:2,size:y.ui?.itemLeadingAvatarSize||e.uiOverride?.itemLeadingAvatarSize||e.ui.itemLeadingAvatarSize()},y.avatar,{"data-slot":"itemLeadingAvatar",class:e.ui.itemLeadingAvatar({class:[e.uiOverride?.itemLeadingAvatar,y.ui?.itemLeadingAvatar],active:S})}),null,16,["size","class"])):T("",!0)]),i(Ne)(y,s.labelKey)||n[y.slot?`${y.slot}-label`:"item-label"]||i(Ne)(y,s.descriptionKey)||n[y.slot?`${y.slot}-description`:"item-description"]?(p(),v("span",{key:0,"data-slot":"itemWrapper",class:D(e.ui.itemWrapper({class:[e.uiOverride?.itemWrapper,y.ui?.itemWrapper]}))},[a("span",{"data-slot":"itemLabel",class:D(e.ui.itemLabel({class:[e.uiOverride?.itemLabel,y.ui?.itemLabel],active:S}))},[le(b.$slots,y.slot?`${y.slot}-label`:"item-label",{item:y,active:S,index:C},()=>[de(E(i(Ne)(y,s.labelKey)),1)]),y.target==="_blank"&&e.externalIcon!==!1?(p(),G(xe,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:i(l).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:D(e.ui.itemLabelExternalIcon({class:[e.uiOverride?.itemLabelExternalIcon,y.ui?.itemLabelExternalIcon],color:y?.color,active:S}))},null,8,["name","class"])):T("",!0)],2),i(Ne)(y,s.descriptionKey)||n[y.slot?`${y.slot}-description`:"item-description"]?(p(),v("span",{key:0,"data-slot":"itemDescription",class:D(e.ui.itemDescription({class:[e.uiOverride?.itemDescription,y.ui?.itemDescription]}))},[le(b.$slots,y.slot?`${y.slot}-description`:"item-description",{item:y,active:S,index:C},()=>[de(E(i(Ne)(y,s.descriptionKey)),1)])],2)):T("",!0)],2)):T("",!0),a("span",{"data-slot":"itemTrailing",class:D(e.ui.itemTrailing({class:[e.uiOverride?.itemTrailing,y.ui?.itemTrailing]}))},[le(b.$slots,y.slot?`${y.slot}-trailing`:"item-trailing",{item:y,active:S,index:C,ui:e.ui},()=>[y.children?.length?(p(),G(xe,{key:0,name:m.value,"data-slot":"itemTrailingIcon",class:D(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color,active:S}))},null,8,["name","class"])):y.kbds?.length?(p(),v("span",{key:1,"data-slot":"itemTrailingKbds",class:D(e.ui.itemTrailingKbds({class:[e.uiOverride?.itemTrailingKbds,y.ui?.itemTrailingKbds]}))},[(p(!0),v(oe,null,ce(y.kbds,(R,F)=>(p(),G(un,_e({key:F,size:y.ui?.itemTrailingKbdsSize||e.uiOverride?.itemTrailingKbdsSize||e.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof R=="string"?{value:R}:R),null,16,["size"]))),128))],2)):T("",!0)]),q(i(ot).ItemIndicator,{"as-child":""},{default:z(()=>[q(xe,{name:e.checkedIcon||i(l).ui.icons.check,"data-slot":"itemTrailingIcon",class:D(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),q(i(ot).Portal,Yt(Jt(i(u))),{default:z(()=>[(p(),G(on(e.sub?i(ot).SubContent:i(ot).Content),_e({"data-slot":"content",class:e.ui.content({class:[e.uiOverride?.content,s.class]})},i(d)),{default:z(()=>[le(b.$slots,"content-top",{sub:e.sub??!1}),a("div",{role:"presentation","data-slot":"viewport",class:D(e.ui.viewport({class:e.uiOverride?.viewport}))},[(p(!0),v(oe,null,ce(g.value,(y,S)=>(p(),G(i(ot).Group,{key:`group-${S}`,"data-slot":"group",class:D(e.ui.group({class:e.uiOverride?.group}))},{default:z(()=>[(p(!0),v(oe,null,ce(y,(C,R)=>(p(),v(oe,{key:`group-${S}-${R}`},[C.type==="label"?(p(),G(i(ot).Label,{key:0,"data-slot":"label",class:D(e.ui.label({class:[e.uiOverride?.label,C.ui?.label,C.class]}))},{default:z(()=>[q(i(f),{item:C,index:R},null,8,["item","index"])]),_:2},1032,["class"])):C.type==="separator"?(p(),G(i(ot).Separator,{key:1,"data-slot":"separator",class:D(e.ui.separator({class:[e.uiOverride?.separator,C.ui?.separator,C.class]}))},null,8,["class"])):C?.children?.length?(p(),G(i(ot).Sub,{key:2,open:C.open,"default-open":C.defaultOpen},{default:z(()=>[q(i(ot).SubTrigger,{as:"button",type:"button",disabled:C.disabled,"text-value":i(Ne)(C,s.labelKey),"data-slot":"item",class:D(e.ui.item({class:[e.uiOverride?.item,C.ui?.item,C.class],color:C?.color}))},{default:z(()=>[q(i(f),{item:C,index:R},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),q(Ir,_e({sub:"",class:C.ui?.content,ui:e.ui,"ui-override":e.uiOverride,portal:e.portal,items:C.children,align:"start","align-offset":-4,"side-offset":3,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon},{ref_for:!0},C.content),nn({_:2},[ce(c(),(F,M)=>({name:M,fn:z(U=>[le(b.$slots,M,_e({ref_for:!0},U))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):C.type==="checkbox"?(p(),G(i(ot).CheckboxItem,{key:3,"model-value":C.checked,disabled:C.disabled,"text-value":i(Ne)(C,s.labelKey),"data-slot":"item",class:D(e.ui.item({class:[e.uiOverride?.item,C.ui?.item,C.class],color:C?.color})),"onUpdate:modelValue":C.onUpdateChecked,onSelect:C.onSelect},{default:z(()=>[q(i(f),{item:C,index:R},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(p(),G(Zn,_e({key:4,ref_for:!0},i(er)(C),{custom:""}),{default:z(({active:F,...M})=>[q(i(ot).Item,{"as-child":"",disabled:C.disabled,"text-value":i(Ne)(C,s.labelKey),onSelect:C.onSelect},{default:z(()=>[q(tr,_e({ref_for:!0},M,{"data-slot":"item",class:e.ui.item({class:[e.uiOverride?.item,C.ui?.item,C.class],color:C?.color,active:F})}),{default:z(()=>[q(i(f),{item:C,active:F,index:R},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1032,["disabled","text-value","onSelect"])]),_:2},1040))],64))),128))]),_:2},1032,["class"]))),128))],2),le(b.$slots,"default"),le(b.$slots,"content-bottom",{sub:e.sub??!1})]),_:3},16,["class"]))]),_:3},16)],64))}},Au={__name:"UDropdownMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const s=e,o=t,n=os(),r=ns(),l=$s(oo(s,"defaultOpen","open","modal"),o),u=Qt(()=>Po(s.content,{side:"bottom",sideOffset:8,collisionPadding:8})),d=Qt(()=>s.arrow),c=()=>rn(n,["default"]),h=Y(()=>ht({extend:ht(Yi),...r.ui?.dropdownMenu||{}})({size:s.size}));return(f,m)=>(p(),G(i(bi),Yt(Jt(i(l))),{default:z(({open:g})=>[n.default?(p(),G(i(gi),{key:0,"as-child":"",class:D(s.class),disabled:e.disabled},{default:z(()=>[le(f.$slots,"default",{open:g})]),_:2},1032,["class","disabled"])):T("",!0),q(Ir,_e({class:h.value.content({class:[!n.default&&s.class,s.ui?.content]}),ui:h.value,"ui-override":s.ui},u.value,{items:e.items,portal:e.portal,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon}),nn({default:z(()=>[e.arrow?(p(),G(i(vi),_e({key:0},d.value,{"data-slot":"arrow",class:h.value.arrow({class:s.ui?.arrow})}),null,16,["class"])):T("",!0)]),_:2},[ce(c(),(b,w)=>({name:w,fn:z(y=>[le(f.$slots,w,Yt(Jt(y)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}},Eu=ks(()=>Ss(()=>import("./T6C-Yz8C.js"),__vite__mapDeps([5,6,1,2,7,8,9,10,11]),import.meta.url).then(e=>e.default||e)),Tu={class:"hidden @[600px]/pagecontainer:block"},Lu={class:"flex flex-col o_gap-2 w-full"},Bu=ue({__name:"UserSettingsMenu",setup(e){const{t}=bt(),s=N([{label:t("Subscriptions"),slot:"subscriptions",icon:we.icoSubscription,color:"neutral",to:"/settings/customerSubscriptions",accessKey:"usermenu.subscriptions",policyKey:"usermenu.subscriptionEntry"},{label:t("Customer Details"),slot:"customerDetails",icon:we.icoUser,color:"neutral",to:"/settings/customerDetails",accessKey:"usermenu.customerDetails",policyKey:"usermenu.customerDetailsEntry"},{type:"separator",policyKey:"usermenu.customerDetailsEntry"},{label:t("quicksettings"),slot:"quicksettings",type:"label"},{type:"separator",accessKey:"usermenu.logout",policyKey:"usermenu.logoutEntry"},{label:"Logout",to:"/logout",icon:we.icoPower,color:"error",accessKey:"usermenu.logout",policyKey:"usermenu.logoutEntry"}]),{policyGuard:o}=es(),n=Y(()=>s.value.filter(r=>o(r.policyKey||"",{trackingContext:{components:"UserSettingsMenu"}})).map(r=>({...r,"data-testid":`user-settings-menu-${r.slot}`})));return(r,l)=>{const u=xe,d=it,c=fc,h=Eu,f=$u,m=Au;return i(n).length>0?(p(),G(m,{key:0,items:i(n),ui:{content:"w-[274px] divide-uiBorder-muted !outline !outline-uiBorder-subtle dark:bg-uiBg-10",item:"o_px-1.5",separator:"bg-uiBorder-muted"}},{quicksettings:z(()=>[a("div",Lu,[i(o)("usermenu.timezoneSelector",{trackingContext:{components:"UserSettingsMenu (show Timezone Switcher)"}})?(p(),G(c,{key:0})):T("",!0),i(o)("usermenu.languageSelector",{trackingContext:{components:"UserSettingsMenu (show Language Switcher)"}})?(p(),G(h,{key:1})):T("",!0),i(o)("usermenu.colorModeSelector",{trackingContext:{components:"UserSettingsMenu (show Theme Switcher)"}})?(p(),G(f,{key:2})):T("",!0)])]),default:z(()=>[q(d,{color:"neutral",variant:"ghost",size:"xl",class:"flex justify-center items-center shrink-0","data-testid":"user-settings-button",icon:i(we).icoUser},{leading:z(()=>[q(u,{name:i(we).icoUser,class:"size-5"},null,8,["name"])]),default:z(()=>[a("p",Tu,E(r.$t("pages.userSettings")),1)]),_:1},8,["icon"])]),_:1},8,["items"])):T("",!0)}}}),Pu=Object.assign(Bu,{__name:"UserSettingsMenu"});function vt(e){return Array.isArray?Array.isArray(e):Fr(e)==="[object Array]"}function Ru(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Iu(e){return e==null?"":Ru(e)}function pt(e){return typeof e=="string"}function Or(e){return typeof e=="number"}function Ou(e){return e===!0||e===!1||Hu(e)&&Fr(e)=="[object Boolean]"}function Hr(e){return typeof e=="object"}function Hu(e){return Hr(e)&&e!==null}function Xe(e){return e!=null}function So(e){return!e.trim().length}function Fr(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Fu="Incorrect 'index' type",Du=e=>`Invalid value for key ${e}`,Mu=e=>`Pattern length exceeds max of ${e}.`,ju=e=>`Missing ${e} property in key`,Nu=e=>`Property 'weight' in key '${e}' must be a positive integer`,Rn=Object.prototype.hasOwnProperty;class Gu{constructor(t){this._keys=[],this._keyMap={};let s=0;t.forEach(o=>{let n=Dr(o);this._keys.push(n),this._keyMap[n.id]=n,s+=n.weight}),this._keys.forEach(o=>{o.weight/=s})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Dr(e){let t=null,s=null,o=null,n=1,r=null;if(pt(e)||vt(e))o=e,t=In(e),s=zo(e);else{if(!Rn.call(e,"name"))throw new Error(ju("name"));const l=e.name;if(o=l,Rn.call(e,"weight")&&(n=e.weight,n<=0))throw new Error(Nu(l));t=In(l),s=zo(l),r=e.getFn}return{path:t,id:s,weight:n,src:o,getFn:r}}function In(e){return vt(e)?e:e.split(".")}function zo(e){return vt(e)?e.join("."):e}function zu(e,t){let s=[],o=!1;const n=(r,l,u)=>{if(Xe(r))if(!l[u])s.push(r);else{let d=l[u];const c=r[d];if(!Xe(c))return;if(u===l.length-1&&(pt(c)||Or(c)||Ou(c)))s.push(Iu(c));else if(vt(c)){o=!0;for(let h=0,f=c.length;h<f;h+=1)n(c[h],l,u+1)}else l.length&&n(c,l,u+1)}};return n(e,pt(t)?t.split("."):t,0),o?s:s[0]}const Uu={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Ku={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Wu={location:0,threshold:.6,distance:100},qu={useExtendedSearch:!1,getFn:zu,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ae={...Ku,...Uu,...Wu,...qu};const Vu=/[^ ]+/g;function Yu(e=1,t=3){const s=new Map,o=Math.pow(10,t);return{get(n){const r=n.match(Vu).length;if(s.has(r))return s.get(r);const l=1/Math.pow(r,.5*e),u=parseFloat(Math.round(l*o)/o);return s.set(r,u),u},clear(){s.clear()}}}class hn{constructor({getFn:t=ae.getFn,fieldNormWeight:s=ae.fieldNormWeight}={}){this.norm=Yu(s,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((s,o)=>{this._keysMap[s.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,pt(this.docs[0])?this.docs.forEach((t,s)=>{this._addString(t,s)}):this.docs.forEach((t,s)=>{this._addObject(t,s)}),this.norm.clear())}add(t){const s=this.size();pt(t)?this._addString(t,s):this._addObject(t,s)}removeAt(t){this.records.splice(t,1);for(let s=t,o=this.size();s<o;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(t,s){return t[this._keysMap[s]]}size(){return this.records.length}_addString(t,s){if(!Xe(t)||So(t))return;let o={v:t,i:s,n:this.norm.get(t)};this.records.push(o)}_addObject(t,s){let o={i:s,$:{}};this.keys.forEach((n,r)=>{let l=n.getFn?n.getFn(t):this.getFn(t,n.path);if(Xe(l)){if(vt(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:c,value:h}=d.pop();if(Xe(h))if(pt(h)&&!So(h)){let f={v:h,i:c,n:this.norm.get(h)};u.push(f)}else vt(h)&&h.forEach((f,m)=>{d.push({nestedArrIndex:m,value:f})})}o.$[r]=u}else if(pt(l)&&!So(l)){let u={v:l,n:this.norm.get(l)};o.$[r]=u}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function Mr(e,t,{getFn:s=ae.getFn,fieldNormWeight:o=ae.fieldNormWeight}={}){const n=new hn({getFn:s,fieldNormWeight:o});return n.setKeys(e.map(Dr)),n.setSources(t),n.create(),n}function Ju(e,{getFn:t=ae.getFn,fieldNormWeight:s=ae.fieldNormWeight}={}){const{keys:o,records:n}=e,r=new hn({getFn:t,fieldNormWeight:s});return r.setKeys(o),r.setIndexRecords(n),r}function zs(e,{errors:t=0,currentLocation:s=0,expectedLocation:o=0,distance:n=ae.distance,ignoreLocation:r=ae.ignoreLocation}={}){const l=t/e.length;if(r)return l;const u=Math.abs(o-s);return n?l+u/n:u?1:l}function Xu(e=[],t=ae.minMatchCharLength){let s=[],o=-1,n=-1,r=0;for(let l=e.length;r<l;r+=1){let u=e[r];u&&o===-1?o=r:!u&&o!==-1&&(n=r-1,n-o+1>=t&&s.push([o,n]),o=-1)}return e[r-1]&&r-o>=t&&s.push([o,r-1]),s}const Pt=32;function Qu(e,t,s,{location:o=ae.location,distance:n=ae.distance,threshold:r=ae.threshold,findAllMatches:l=ae.findAllMatches,minMatchCharLength:u=ae.minMatchCharLength,includeMatches:d=ae.includeMatches,ignoreLocation:c=ae.ignoreLocation}={}){if(t.length>Pt)throw new Error(Mu(Pt));const h=t.length,f=e.length,m=Math.max(0,Math.min(o,f));let g=r,b=m;const w=u>1||d,y=w?Array(f):[];let S;for(;(S=e.indexOf(t,b))>-1;){let I=zs(t,{currentLocation:S,expectedLocation:m,distance:n,ignoreLocation:c});if(g=Math.min(I,g),b=S+h,w){let B=0;for(;B<h;)y[S+B]=1,B+=1}}b=-1;let C=[],R=1,F=h+f;const M=1<<h-1;for(let I=0;I<h;I+=1){let B=0,A=F;for(;B<A;)zs(t,{errors:I,currentLocation:m+A,expectedLocation:m,distance:n,ignoreLocation:c})<=g?B=A:F=A,A=Math.floor((F-B)/2+B);F=A;let j=Math.max(1,m-A+1),H=l?f:Math.min(m+A,f)+h,O=Array(H+2);O[H+1]=(1<<I)-1;for(let L=H;L>=j;L-=1){let se=L-1,k=s[e.charAt(se)];if(w&&(y[se]=+!!k),O[L]=(O[L+1]<<1|1)&k,I&&(O[L]|=(C[L+1]|C[L])<<1|1|C[L+1]),O[L]&M&&(R=zs(t,{errors:I,currentLocation:se,expectedLocation:m,distance:n,ignoreLocation:c}),R<=g)){if(g=R,b=se,b<=m)break;j=Math.max(1,2*m-b)}}if(zs(t,{errors:I+1,currentLocation:m,expectedLocation:m,distance:n,ignoreLocation:c})>g)break;C=O}const U={isMatch:b>=0,score:Math.max(.001,R)};if(w){const I=Xu(y,u);I.length?d&&(U.indices=I):U.isMatch=!1}return U}function Zu(e){let t={};for(let s=0,o=e.length;s<o;s+=1){const n=e.charAt(s);t[n]=(t[n]||0)|1<<o-s-1}return t}const Qs=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class jr{constructor(t,{location:s=ae.location,threshold:o=ae.threshold,distance:n=ae.distance,includeMatches:r=ae.includeMatches,findAllMatches:l=ae.findAllMatches,minMatchCharLength:u=ae.minMatchCharLength,isCaseSensitive:d=ae.isCaseSensitive,ignoreDiacritics:c=ae.ignoreDiacritics,ignoreLocation:h=ae.ignoreLocation}={}){if(this.options={location:s,threshold:o,distance:n,includeMatches:r,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:c,ignoreLocation:h},t=d?t:t.toLowerCase(),t=c?Qs(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const f=(g,b)=>{this.chunks.push({pattern:g,alphabet:Zu(g),startIndex:b})},m=this.pattern.length;if(m>Pt){let g=0;const b=m%Pt,w=m-b;for(;g<w;)f(this.pattern.substr(g,Pt),g),g+=Pt;if(b){const y=m-Pt;f(this.pattern.substr(y),y)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:s,ignoreDiacritics:o,includeMatches:n}=this.options;if(t=s?t:t.toLowerCase(),t=o?Qs(t):t,this.pattern===t){let w={isMatch:!0,score:0};return n&&(w.indices=[[0,t.length-1]]),w}const{location:r,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:c,ignoreLocation:h}=this.options;let f=[],m=0,g=!1;this.chunks.forEach(({pattern:w,alphabet:y,startIndex:S})=>{const{isMatch:C,score:R,indices:F}=Qu(t,w,y,{location:r+S,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:c,includeMatches:n,ignoreLocation:h});C&&(g=!0),m+=R,C&&F&&(f=[...f,...F])});let b={isMatch:g,score:g?m/this.chunks.length:1};return g&&n&&(b.indices=f),b}}class At{constructor(t){this.pattern=t}static isMultiMatch(t){return On(t,this.multiRegex)}static isSingleMatch(t){return On(t,this.singleRegex)}search(){}}function On(e,t){const s=e.match(t);return s?s[1]:null}class ed extends At{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const s=t===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class td extends At{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const o=t.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class sd extends At{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const s=t.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class od extends At{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const s=!t.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class nd extends At{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const s=t.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class rd extends At{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const s=!t.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class Nr extends At{constructor(t,{location:s=ae.location,threshold:o=ae.threshold,distance:n=ae.distance,includeMatches:r=ae.includeMatches,findAllMatches:l=ae.findAllMatches,minMatchCharLength:u=ae.minMatchCharLength,isCaseSensitive:d=ae.isCaseSensitive,ignoreDiacritics:c=ae.ignoreDiacritics,ignoreLocation:h=ae.ignoreLocation}={}){super(t),this._bitapSearch=new jr(t,{location:s,threshold:o,distance:n,includeMatches:r,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:c,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Gr extends At{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let s=0,o;const n=[],r=this.pattern.length;for(;(o=t.indexOf(this.pattern,s))>-1;)s=o+r,n.push([o,s-1]);const l=!!n.length;return{isMatch:l,score:l?0:1,indices:n}}}const Uo=[ed,Gr,sd,od,rd,nd,td,Nr],Hn=Uo.length,ad=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,id="|";function ld(e,t={}){return e.split(id).map(s=>{let o=s.trim().split(ad).filter(r=>r&&!!r.trim()),n=[];for(let r=0,l=o.length;r<l;r+=1){const u=o[r];let d=!1,c=-1;for(;!d&&++c<Hn;){const h=Uo[c];let f=h.isMultiMatch(u);f&&(n.push(new h(f,t)),d=!0)}if(!d)for(c=-1;++c<Hn;){const h=Uo[c];let f=h.isSingleMatch(u);if(f){n.push(new h(f,t));break}}}return n})}const cd=new Set([Nr.type,Gr.type]);class ud{constructor(t,{isCaseSensitive:s=ae.isCaseSensitive,ignoreDiacritics:o=ae.ignoreDiacritics,includeMatches:n=ae.includeMatches,minMatchCharLength:r=ae.minMatchCharLength,ignoreLocation:l=ae.ignoreLocation,findAllMatches:u=ae.findAllMatches,location:d=ae.location,threshold:c=ae.threshold,distance:h=ae.distance}={}){this.query=null,this.options={isCaseSensitive:s,ignoreDiacritics:o,includeMatches:n,minMatchCharLength:r,findAllMatches:u,ignoreLocation:l,location:d,threshold:c,distance:h},t=s?t:t.toLowerCase(),t=o?Qs(t):t,this.pattern=t,this.query=ld(this.pattern,this.options)}static condition(t,s){return s.useExtendedSearch}searchIn(t){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:n,ignoreDiacritics:r}=this.options;t=n?t:t.toLowerCase(),t=r?Qs(t):t;let l=0,u=[],d=0;for(let c=0,h=s.length;c<h;c+=1){const f=s[c];u.length=0,l=0;for(let m=0,g=f.length;m<g;m+=1){const b=f[m],{isMatch:w,indices:y,score:S}=b.search(t);if(w){if(l+=1,d+=S,o){const C=b.constructor.type;cd.has(C)?u=[...u,...y]:u.push(y)}}else{d=0,l=0,u.length=0;break}}if(l){let m={isMatch:!0,score:d/l};return o&&(m.indices=u),m}}return{isMatch:!1,score:1}}}const Ko=[];function dd(...e){Ko.push(...e)}function Wo(e,t){for(let s=0,o=Ko.length;s<o;s+=1){let n=Ko[s];if(n.condition(e,t))return new n(e,t)}return new jr(e,t)}const Zs={AND:"$and",OR:"$or"},qo={PATH:"$path",PATTERN:"$val"},Vo=e=>!!(e[Zs.AND]||e[Zs.OR]),pd=e=>!!e[qo.PATH],hd=e=>!vt(e)&&Hr(e)&&!Vo(e),Fn=e=>({[Zs.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function zr(e,t,{auto:s=!0}={}){const o=n=>{let r=Object.keys(n);const l=pd(n);if(!l&&r.length>1&&!Vo(n))return o(Fn(n));if(hd(n)){const d=l?n[qo.PATH]:r[0],c=l?n[qo.PATTERN]:n[d];if(!pt(c))throw new Error(Du(d));const h={keyId:zo(d),pattern:c};return s&&(h.searcher=Wo(c,t)),h}let u={children:[],operator:r[0]};return r.forEach(d=>{const c=n[d];vt(c)&&c.forEach(h=>{u.children.push(o(h))})}),u};return Vo(e)||(e=Fn(e)),o(e)}function md(e,{ignoreFieldNorm:t=ae.ignoreFieldNorm}){e.forEach(s=>{let o=1;s.matches.forEach(({key:n,norm:r,score:l})=>{const u=n?n.weight:null;o*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(t?1:r))}),s.score=o})}function fd(e,t){const s=e.matches;t.matches=[],Xe(s)&&s.forEach(o=>{if(!Xe(o.indices)||!o.indices.length)return;const{indices:n,value:r}=o;let l={indices:n,value:r};o.key&&(l.key=o.key.src),o.idx>-1&&(l.refIndex=o.idx),t.matches.push(l)})}function gd(e,t){t.score=e.score}function vd(e,t,{includeMatches:s=ae.includeMatches,includeScore:o=ae.includeScore}={}){const n=[];return s&&n.push(fd),o&&n.push(gd),e.map(r=>{const{idx:l}=r,u={item:t[l],refIndex:l};return n.length&&n.forEach(d=>{d(r,u)}),u})}class is{constructor(t,s={},o){this.options={...ae,...s},this.options.useExtendedSearch,this._keyStore=new Gu(this.options.keys),this.setCollection(t,o)}setCollection(t,s){if(this._docs=t,s&&!(s instanceof hn))throw new Error(Fu);this._myIndex=s||Mr(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Xe(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const s=[];for(let o=0,n=this._docs.length;o<n;o+=1){const r=this._docs[o];t(r,o)&&(this.removeAt(o),o-=1,n-=1,s.push(r))}return s}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:s=-1}={}){const{includeMatches:o,includeScore:n,shouldSort:r,sortFn:l,ignoreFieldNorm:u}=this.options;let d=pt(t)?pt(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return md(d,{ignoreFieldNorm:u}),r&&d.sort(l),Or(s)&&s>-1&&(d=d.slice(0,s)),vd(d,this._docs,{includeMatches:o,includeScore:n})}_searchStringList(t){const s=Wo(t,this.options),{records:o}=this._myIndex,n=[];return o.forEach(({v:r,i:l,n:u})=>{if(!Xe(r))return;const{isMatch:d,score:c,indices:h}=s.searchIn(r);d&&n.push({item:r,idx:l,matches:[{score:c,value:r,norm:u,indices:h}]})}),n}_searchLogical(t){const s=zr(t,this.options),o=(u,d,c)=>{if(!u.children){const{keyId:f,searcher:m}=u,g=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(d,f),searcher:m});return g&&g.length?[{idx:c,item:d,matches:g}]:[]}const h=[];for(let f=0,m=u.children.length;f<m;f+=1){const g=u.children[f],b=o(g,d,c);if(b.length)h.push(...b);else if(u.operator===Zs.AND)return[]}return h},n=this._myIndex.records,r={},l=[];return n.forEach(({$:u,i:d})=>{if(Xe(u)){let c=o(s,u,d);c.length&&(r[d]||(r[d]={idx:d,item:u,matches:[]},l.push(r[d])),c.forEach(({matches:h})=>{r[d].matches.push(...h)}))}}),l}_searchObjectList(t){const s=Wo(t,this.options),{keys:o,records:n}=this._myIndex,r=[];return n.forEach(({$:l,i:u})=>{if(!Xe(l))return;let d=[];o.forEach((c,h)=>{d.push(...this._findMatches({key:c,value:l[h],searcher:s}))}),d.length&&r.push({idx:u,item:l,matches:d})}),r}_findMatches({key:t,value:s,searcher:o}){if(!Xe(s))return[];let n=[];if(vt(s))s.forEach(({v:r,i:l,n:u})=>{if(!Xe(r))return;const{isMatch:d,score:c,indices:h}=o.searchIn(r);d&&n.push({score:c,key:t,value:r,idx:l,norm:u,indices:h})});else{const{v:r,n:l}=s,{isMatch:u,score:d,indices:c}=o.searchIn(r);u&&n.push({score:d,key:t,value:r,norm:l,indices:c})}return n}}is.version="7.1.0";is.createIndex=Mr;is.parseIndex=Ju;is.config=ae;is.parseQuery=zr;dd(ud);function bd(e,t,s){const o=()=>{var r,l;return new is((r=nt(t))!==null&&r!==void 0?r:[],(l=nt(s))===null||l===void 0?void 0:l.fuseOptions)},n=N(o());return ye(()=>{var r;return(r=nt(s))===null||r===void 0?void 0:r.fuseOptions},()=>{n.value=o()},{deep:!0}),ye(()=>nt(t),r=>{n.value.setCollection(r)},{deep:!0}),{fuse:n,results:Y(()=>{const r=nt(s);if(r?.matchAllWhenSearchEmpty&&!nt(e))return nt(t).map((u,d)=>({item:u,refIndex:d}));const l=r?.resultLimit;return n.value.search(nt(e),l?{limit:l}:void 0)})}}const yd={"&":"&","<":"<",">":">",'"':""","'":"'"};function xd(e){return e.replace(/[&<>"']/g,t=>yd[t])}function _d(e){return/&(?:amp|lt|gt|quot|#39);/.test(e)}function Co(e){return _d(e)?e:xd(e)}function wd(e,t){let s="",o=0,n=!1;for(let r=e.length-1;r>=0;r--){if(e[r]===">")n=!0;else if(e[r]==="<"){n=!1,s=e[r]+s;continue}if(n||o++,o<=t)s=e[r]+s;else{s="..."+s;break}}return s}function Dn(e,t,s,o){function n(r,l=[]){r=r||"";let u="",d=0;l.forEach(h=>{if(h.length===2&&h[0]===h[1])return;const f=h[1]+1,m=f-h[0]>=t.length;u+=[Co(r.substring(d,h[0])),m&&"<mark>",Co(r.substring(h[0],f)),m&&"</mark>"].filter(Boolean).join(""),d=f}),u+=Co(r.substring(d));const c=u.indexOf("<mark>");return c!==-1&&(u=wd(u,u.length-c)),u}if(e.matches?.length){for(const r of e.matches)if(!(s&&r.key!==s)&&!o?.includes(r.key))return n(r.value,r.indices)}}const kd=["innerHTML"],Sd=["innerHTML"],Cd=Object.assign({inheritAttrs:!1},{__name:"UCommandPalette",props:Lo({as:{type:null,required:!1},size:{type:null,required:!1},icon:{type:null,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},childrenIcon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1,default:!0},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},back:{type:[Boolean,Object],required:!1,default:!0},backIcon:{type:null,required:!1},input:{type:[Boolean,Object],required:!1,default:!0},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},preserveGroupOrder:{type:Boolean,required:!1,default:!1},class:{type:null,required:!1},ui:{type:null,required:!1},multiple:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},selectionBehavior:{type:String,required:!1},by:{type:[String,Function],required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:Lo(["update:modelValue","highlight","entryFocus","leave","update:open"],["update:searchTerm"]),setup(e,{emit:t}){const s=e,o=t,n=os(),r=Yn(e,"searchTerm",{type:String,default:""}),{t:l}=Xn(),u=ns(),d=$s(oo(s,"as","disabled","multiple","modelValue","defaultValue","highlightOnHover","by"),o),c=Qt(()=>s.virtualize?Po(typeof s.virtualize=="boolean"?{}:s.virtualize,{estimateSize:Ti(U.value,"md",s.descriptionKey,!!n["item-description"])}):!1),[h,f]=Qn({props:{item:{type:Object,required:!0},group:{type:Object,required:!1},index:{type:Number,required:!1}}}),m=Y(()=>ht({extend:ht(qi),...u.ui?.commandPalette||{}})({size:s.size,virtualize:!!s.virtualize})),g=Y(()=>Po({},s.fuse,{fuseOptions:{ignoreLocation:!0,threshold:.1,keys:[s.labelKey,"suffix"]},resultLimit:12,matchAllWhenSearchEmpty:!0})),b=N([]),w=Y(()=>b.value[b.value.length-1]?.placeholder||s.placeholder||l("commandPalette.placeholder")),y=Y(()=>b.value?.length?[b.value[b.value.length-1]]:s.groups),S=Y(()=>y.value?.filter(O=>O.id?!O.ignoreFilter:(console.warn("[@nuxt/ui] CommandPalette group is missing an `id` property"),!1))?.flatMap(O=>O.items?.map(Z=>({...Z,group:O.id}))||[])||[]),{results:C}=bd(r,S,g),R=Ha(C,16,!0);function F(O,Z){let L=Z;return O?.postFilter&&typeof O.postFilter=="function"&&(L=O.postFilter(r.value,L)),{...O,items:L.slice(0,g.value.resultLimit).map(se=>({...se,labelHtml:Dn(se,r.value,s.labelKey),suffixHtml:Dn(se,r.value,void 0,[s.labelKey])}))}}const M=Y(()=>{const O=y.value,Z=R.value.reduce((k,_)=>{const{item:$,matches:W}=_;return $.group&&(k[$.group]||=[],k[$.group]?.push({...$,matches:W})),k},{});if(s.preserveGroupOrder){const k=[];for(const _ of O||[]){if(!_.items?.length)continue;const $=_.ignoreFilter?_.items:Z[_.id];if(!$?.length)continue;const W=F(_,$);W.items?.length&&k.push(W)}return k}const L=Object.entries(Z).map(([k,_])=>{const $=O?.find(re=>re.id===k);if(!$)return;const W=F($,_);return W.items?.length?W:void 0}).filter(k=>!!k);return(O?.map((k,_)=>({...k,index:_}))?.filter(k=>k.ignoreFilter&&k.items?.length)?.map(k=>({...F(k,k.items||[]),index:k.index}))?.filter(k=>k.items?.length)||[]).reduce((k,_)=>(k.splice(_.index,0,_),k),[...L])}),U=Y(()=>M.value.flatMap(O=>O.items||[])),I=Fa("rootRef");function B(O){O.children?.length&&(b.value.push({id:`history-${b.value.length}`,label:O.label,slot:O.slot,placeholder:O.placeholder,items:O.children}),r.value="",I.value?.highlightFirstItem())}function A(){b.value.length&&(b.value.pop(),r.value="",I.value?.highlightFirstItem())}function j(){r.value||A()}function H(O,Z){Z.children?.length?(O.preventDefault(),B(Z)):Z.onSelect?.(O)}return(O,Z)=>(p(),v(oe,null,[q(i(h),null,{default:z(({item:L,index:se,group:k})=>[q(Zn,_e(i(er)(L),{custom:""}),{default:z(({active:_,...$})=>[q(i(wi),{value:s.valueKey?i(Ne)(L,s.valueKey):i(rn)(L,["matches","group","onSelect","labelHtml","suffixHtml","children"]),disabled:L.disabled,"as-child":"",onSelect:W=>H(W,L)},{default:z(()=>[q(tr,_e($,{"data-slot":"item",class:m.value.item({class:[s.ui?.item,L.ui?.item,L.class],active:_||L.active})}),{default:z(()=>[le(O.$slots,L.slot||k?.slot||"item",{item:L,index:se,ui:m.value},()=>[le(O.$slots,L.slot?`${L.slot}-leading`:k?.slot?`${k.slot}-leading`:"item-leading",{item:L,index:se,ui:m.value},()=>[L.loading?(p(),G(xe,{key:0,name:e.loadingIcon||i(u).ui.icons.loading,"data-slot":"itemLeadingIcon",class:D(m.value.itemLeadingIcon({class:[s.ui?.itemLeadingIcon,L.ui?.itemLeadingIcon],loading:!0}))},null,8,["name","class"])):L.icon?(p(),G(xe,{key:1,name:L.icon,"data-slot":"itemLeadingIcon",class:D(m.value.itemLeadingIcon({class:[s.ui?.itemLeadingIcon,L.ui?.itemLeadingIcon],active:_||L.active}))},null,8,["name","class"])):L.avatar?(p(),G(en,_e({key:2,size:L.ui?.itemLeadingAvatarSize||s.ui?.itemLeadingAvatarSize||m.value.itemLeadingAvatarSize()},L.avatar,{"data-slot":"itemLeadingAvatar",class:m.value.itemLeadingAvatar({class:[s.ui?.itemLeadingAvatar,L.ui?.itemLeadingAvatar],active:_||L.active})}),null,16,["size","class"])):L.chip?(p(),G(Zo,_e({key:3,size:L.ui?.itemLeadingChipSize||s.ui?.itemLeadingChipSize||m.value.itemLeadingChipSize(),inset:"",standalone:""},L.chip,{"data-slot":"itemLeadingChip",class:m.value.itemLeadingChip({class:[s.ui?.itemLeadingChip,L.ui?.itemLeadingChip],active:_||L.active})}),null,16,["size","class"])):T("",!0)]),L.prefix||L.labelHtml||i(Ne)(L,s.labelKey)||L.suffixHtml||L.suffix||n[L.slot?`${L.slot}-label`:k?.slot?`${k.slot}-label`:"item-label"]||i(Ne)(L,s.descriptionKey)||n[L.slot?`${L.slot}-description`:k?.slot?`${k.slot}-description`:"item-description"]?(p(),v("span",{key:0,"data-slot":"itemWrapper",class:D(m.value.itemWrapper({class:[s.ui?.itemWrapper,L.ui?.itemWrapper]}))},[a("span",{"data-slot":"itemLabel",class:D(m.value.itemLabel({class:[s.ui?.itemLabel,L.ui?.itemLabel],active:_||L.active}))},[le(O.$slots,L.slot?`${L.slot}-label`:k?.slot?`${k.slot}-label`:"item-label",{item:L,index:se,ui:m.value},()=>[L.prefix?(p(),v("span",{key:0,"data-slot":"itemLabelPrefix",class:D(m.value.itemLabelPrefix({class:[s.ui?.itemLabelPrefix,L.ui?.itemLabelPrefix]}))},E(L.prefix),3)):T("",!0),L.labelHtml?(p(),v("span",{key:1,"data-slot":"itemLabelBase",class:D(m.value.itemLabelBase({class:[s.ui?.itemLabelBase,L.ui?.itemLabelBase],active:_||L.active})),innerHTML:L.labelHtml},null,10,kd)):(p(),v("span",{key:2,"data-slot":"itemLabelBase",class:D(m.value.itemLabelBase({class:[s.ui?.itemLabelBase,L.ui?.itemLabelBase],active:_||L.active}))},E(i(Ne)(L,s.labelKey)),3)),L.suffixHtml?(p(),v("span",{key:3,"data-slot":"itemLabelSuffix",class:D(m.value.itemLabelSuffix({class:[s.ui?.itemLabelSuffix,L.ui?.itemLabelSuffix],active:_||L.active})),innerHTML:L.suffixHtml},null,10,Sd)):L.suffix?(p(),v("span",{key:4,"data-slot":"itemLabelSuffix",class:D(m.value.itemLabelSuffix({class:[s.ui?.itemLabelSuffix,L.ui?.itemLabelSuffix],active:_||L.active}))},E(L.suffix),3)):T("",!0)])],2),i(Ne)(L,s.descriptionKey)||n[L.slot?`${L.slot}-description`:k?.slot?`${k.slot}-description`:"item-description"]?(p(),v("span",{key:0,"data-slot":"itemDescription",class:D(m.value.itemDescription({class:[s.ui?.itemDescription,L.ui?.itemDescription]}))},[le(O.$slots,L.slot?`${L.slot}-description`:k?.slot?`${k.slot}-description`:"item-description",{item:L,index:se,ui:m.value},()=>[de(E(i(Ne)(L,s.descriptionKey)),1)])],2)):T("",!0)],2)):T("",!0),a("span",{"data-slot":"itemTrailing",class:D(m.value.itemTrailing({class:[s.ui?.itemTrailing,L.ui?.itemTrailing]}))},[le(O.$slots,L.slot?`${L.slot}-trailing`:k?.slot?`${k.slot}-trailing`:"item-trailing",{item:L,index:se,ui:m.value},()=>[L.children&&L.children.length>0?(p(),G(xe,{key:0,name:e.childrenIcon||i(u).ui.icons.chevronRight,"data-slot":"itemTrailingIcon",class:D(m.value.itemTrailingIcon({class:[s.ui?.itemTrailingIcon,L.ui?.itemTrailingIcon]}))},null,8,["name","class"])):L.kbds?.length?(p(),v("span",{key:1,"data-slot":"itemTrailingKbds",class:D(m.value.itemTrailingKbds({class:[s.ui?.itemTrailingKbds,L.ui?.itemTrailingKbds]}))},[(p(!0),v(oe,null,ce(L.kbds,(W,re)=>(p(),G(un,_e({key:re,size:L.ui?.itemTrailingKbdsSize||s.ui?.itemTrailingKbdsSize||m.value.itemTrailingKbdsSize()},{ref_for:!0},typeof W=="string"?{value:W}:W),null,16,["size"]))),128))],2)):k?.highlightedIcon?(p(),G(xe,{key:2,name:k.highlightedIcon,"data-slot":"itemTrailingHighlightedIcon",class:D(m.value.itemTrailingHighlightedIcon({class:[s.ui?.itemTrailingHighlightedIcon,L.ui?.itemTrailingHighlightedIcon]}))},null,8,["name","class"])):T("",!0)]),L.children?.length?T("",!0):(p(),G(i(ki),{key:0,"as-child":""},{default:z(()=>[q(xe,{name:e.selectedIcon||i(u).ui.icons.check,"data-slot":"itemTrailingIcon",class:D(m.value.itemTrailingIcon({class:[s.ui?.itemTrailingIcon,L.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024))],2)])]),_:2},1040,["class"])]),_:2},1032,["value","disabled","onSelect"])]),_:2},1040)]),_:3}),q(i(Ei),_e({...i(d),...O.$attrs},{ref_key:"rootRef",ref:I,"selection-behavior":e.selectionBehavior,"data-slot":"root",class:m.value.root({class:[s.ui?.root,s.class]})}),{default:z(()=>[e.input?(p(),G(i(Si),{key:0,modelValue:r.value,"onUpdate:modelValue":Z[1]||(Z[1]=L=>r.value=L),"as-child":""},{default:z(()=>[q(Fi,_e({variant:"none",size:e.size},typeof s.input=="object"?s.input:{},{placeholder:w.value,autofocus:e.autofocus,loading:e.loading,"loading-icon":e.loadingIcon,"trailing-icon":e.trailingIcon,icon:e.icon||i(u).ui.icons.search,"data-slot":"input",class:m.value.input({class:s.ui?.input}),onKeydown:Xt(j,["backspace"])}),nn({_:2},[b.value?.length&&(e.back||n.back)?{name:"leading",fn:z(()=>[le(O.$slots,"back",{ui:m.value},()=>[q(it,_e({size:e.size,icon:e.backIcon||i(u).ui.icons.arrowLeft,color:"neutral",variant:"link","aria-label":i(l)("commandPalette.back")},typeof e.back=="object"?e.back:{},{"data-slot":"back",class:m.value.back({class:s.ui?.back}),onClick:A}),null,16,["size","icon","aria-label","class"])])]),key:"0"}:void 0,e.close||n.close?{name:"trailing",fn:z(()=>[le(O.$slots,"close",{ui:m.value},()=>[e.close?(p(),G(it,_e({key:0,size:e.size,icon:e.closeIcon||i(u).ui.icons.close,color:"neutral",variant:"ghost","aria-label":i(l)("commandPalette.close")},typeof e.close=="object"?e.close:{},{"data-slot":"close",class:m.value.close({class:s.ui?.close}),onClick:Z[0]||(Z[0]=L=>o("update:open",!1))}),null,16,["size","icon","aria-label","class"])):T("",!0)])]),key:"1"}:void 0]),1040,["size","placeholder","autofocus","loading","loading-icon","trailing-icon","icon","class"])]),_:3},8,["modelValue"])):T("",!0),q(i(Ci),{"data-slot":"content",class:D(m.value.content({class:s.ui?.content}))},{default:z(()=>[M.value?.length?(p(),v("div",{key:0,role:"presentation","data-slot":"viewport",class:D(m.value.viewport({class:s.ui?.viewport}))},[e.virtualize?(p(),G(i($i),_e({key:0,options:U.value,"text-content":L=>i(Ne)(L,s.labelKey)},c.value),{default:z(({option:L,virtualItem:se})=>[q(i(f),{item:L,index:se.index},null,8,["item","index"])]),_:1},16,["options","text-content"])):(p(!0),v(oe,{key:1},ce(M.value,L=>(p(),G(i(Ai),{key:`group-${L.id}`,"data-slot":"group",class:D(m.value.group({class:s.ui?.group}))},{default:z(()=>[i(Ne)(L,s.labelKey)?(p(),G(i(Ni),{key:0,"data-slot":"label",class:D(m.value.label({class:s.ui?.label}))},{default:z(()=>[de(E(i(Ne)(L,s.labelKey)),1)]),_:2},1032,["class"])):T("",!0),(p(!0),v(oe,null,ce(L.items,(se,k)=>(p(),G(i(f),{key:`group-${L.id}-${k}`,item:se,index:k,group:L},null,8,["item","index","group"]))),128))]),_:2},1032,["class"]))),128))],2)):(p(),v("div",{key:1,"data-slot":"empty",class:D(m.value.empty({class:s.ui?.empty}))},[le(O.$slots,"empty",{searchTerm:r.value},()=>[de(E(r.value?i(l)("commandPalette.noMatch",{searchTerm:r.value}):i(l)("commandPalette.noData")),1)])],2))]),_:3},8,["class"]),n.footer?(p(),v("div",{key:1,"data-slot":"footer",class:D(m.value.footer({class:s.ui?.footer}))},[le(O.$slots,"footer",{ui:m.value})],2)):T("",!0)]),_:3},16,["selection-behavior","class"])],64))}}),$d={class:"aspect-square aheader-selements flex items-center justify-center","aria-label":"Open command center",role:"button"},Ad=ue({__name:"CommandCenter",setup(e){const t=mt(),{finalNavigationStructure:s}=yt(),o=Y(()=>{const d=(c,h)=>c.flatMap(f=>{const m=[];return f.pathName&&m.push({...f,parent:h}),f.children?.length&&m.push(...d(f.children,f.id)),m});return d(s.value)}),n=st(),{t:r}=bt(),l=Y(()=>{const{pid:d,sid:c}=n.params;return[{id:"basePages",label:r("BasePages"),items:[...sr.map(h=>({id:h.id,label:r(`pageName.${h.id}`),to:h.path,icon:h.icon,suffix:r(`pageHeader.${h.id}.shortSubline`)}))]},{id:"projects",label:r("Projects"),items:[...t.allSystems.map(h=>({id:h.pid,label:h.name,icon:"heroicons:folder",to:`/p/${h.pid}-${h.sid}`}))]},{id:"monitoringPages",slot:"monitoringPages",label:r("MonitoringPages"),items:[...o.value.map(h=>{if(!h.path.startsWith("/p/")||!d||!c)return null;const f=`${h.parent?r(`pageName.${h.parent}`)+": ":null} <span class="text-uiText-highlighted">${r(`pageName.${h.id}`)}</span>`;return{id:h.id,label:f,suffix:r(`pageHeader.${h.id}.shortSubline`),to:`${h.path}${d}-${c}`,icon:"material-symbols:insert-chart-outline-sharp"}}).filter(Boolean)]}]}),u=N(!1);return ro({[xs.commandcenter]:()=>u.value=!u.value}),Cs(()=>{n.path&&(u.value=!1)}),(d,c)=>{const h=xe,f=Cd,m=hr;return p(),G(m,{open:i(u),"onUpdate:open":c[1]||(c[1]=g=>Ge(u)?u.value=g:null),ui:{content:"outline outline-uiBorder-muted"}},{content:z(()=>[q(f,{groups:i(l),fuse:{fuseOptions:{includeMatches:!0}},class:"o_h-80","onUpdate:open":c[0]||(c[0]=g=>u.value=g)},null,8,["groups"])]),default:z(()=>[a("a",$d,[q(h,{name:i(we).icoMagnifying,class:"size-5"},null,8,["name"])])]),_:1},8,["open"])}}}),Ed=Object.assign(Ad,{__name:"CommandCenter"}),Td={class:"grid-header__meta"},Ld={class:"grid-header__progress o_px-2 self-center h-(--kiv-appheader) flex o_gap-2 items-center bg-uiBg"},Bd={key:0,class:"w-[160px]"},Pd={class:"flex-1 truncate","data-testid":"finish-project-setup-button"},Rd={class:"grid-header__settings h-full self-center flex items-stretch justify-end o_px-4 sm:o_gap-2 @container/hset bg-uiBg"},Id={class:"hidden @[700px]/pagecontainer:block shrink-0"},Od=["aria-label","aria-expanded"],Hd=ue({__name:"AppHeader",setup(e){const t=tt(),s=mt(),{tippyTheme:o}=tt(),{generateLink:n,inProjectLevel:r,inSettingsLevel:l}=yt(),u=Zt(),d=Y(()=>s.currentProject?.onboarding?.completed),{policyGuard:c}=es();return(h,f)=>{const m=pl,g=fr,b=$l,w=it,y=Rl,S=Fl,C=xe,R=ts,F=Zl,M=pc,U=Pu,I=Ed,B=ss("tippy");return p(),v("header",{class:D(["grid border-b border-uiBorder-subtle bg-uiBg-30 sticky o_z-20 gap-y-px",[i(r)?"grid-header top-[-124px] @pnav/pagecontainer:top-[-45px] @[800px]/pagecontainer:o_top-0":"grid-header--outsideProject o_top-0"]])},[q(m,{class:"grid-header__selector bg-uiBg border-r border-uiBorder-muted"}),a("div",Td,[i(r)?(p(),G(g,{key:0})):T("",!0)]),a("div",Ld,[i(r)?(p(),v("div",Bd,[i(d)?(p(),G(b,{key:0})):(p(),G(w,{key:1,color:"secondary",variant:"solid",to:i(n)("/p/settings/list-")},{default:z(()=>[be((p(),v("span",Pd,[de(E(h.$t("FinishProjectSetup")),1)])),[[B,{content:h.$t("finishProjectTooltip"),theme:i(o)}]])]),_:1},8,["to"]))])):T("",!0),i(d)&&i(r)?(p(),v(oe,{key:1},[i(u).overallCurrentScore?(p(),G(y,{key:0})):T("",!0),q(S)],64)):T("",!0)]),a("div",Rd,[i(l)?(p(),G(R,{key:0,to:i(s).currentPidAndSid?`/p/${i(s).currentPidAndSid}`:"/",class:"flex items-center o_gap-1 aheader-selements"},{default:z(()=>[q(C,{name:"heroicons:arrow-left",class:"size-4 o_opacity-80"}),a("span",Id,E(i(s).currentPidAndSid?h.$t("backToLastProject"):h.$t("backToProject")),1)]),_:1},8,["to"])):T("",!0),i(c)("appheader.backgroundJobQueue",{trackingContext:{components:"AppHeader (show JobQueue)"}})?(p(),G(F,{key:1,class:"flex justify-center items-center aheader-selements"})):T("",!0),i(c)("appheader.changelog",{trackingContext:{components:"AppHeader (show ChangeLog)"}})?(p(),G(M,{key:2,class:"flex justify-center items-center aheader-selements"})):T("",!0),q(U,{class:"flex justify-center items-center aheader-selements"}),q(I),i(r)?(p(),v("div",{key:3,class:"flex @pnav/pagecontainer:hidden aheader-selements",tabindex:"0",role:"button","aria-label":h.$t("toggleMobileNavigation"),"aria-expanded":i(t).mobileNavigation,onClick:f[0]||(f[0]=A=>i(t).mobileNavigation=!i(t).mobileNavigation),onKeydown:f[1]||(f[1]=Xt(A=>i(t).mobileNavigation=!i(t).mobileNavigation,["enter"]))},[q(C,{name:i(t).mobileNavigation?"heroicons:x-mark":"heroicons:bars-3",class:"size-5 shrink-0"},null,8,["name"])],40,Od)):T("",!0)])],2)}}}),Fd=Object.assign(Hd,{__name:"AppHeader"}),Dd={viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Md={"clip-path":"url(#clip0_1_44)",fill:"currentColor"},jd={key:0,d:"M18 20H4a1 1 0 0 1-1-1v-9H0L10.327.612a1 1 0 0 1 1.346 0L22 10h-3v9a1 1 0 0 1-1 1ZM5 18h12V8.157l-6-5.454-6 5.454V18Zm2-4h8v2H7v-2Z"},Nd={key:1,d:"M2 2h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm1 2v14h16V4H3Zm3 8h2v4H6v-4Zm4-6h2v10h-2V6Zm4 3h2v7h-2V9Z"},Gd={key:2,d:"M14 3H4v16h14V7h-4V3ZM2 1.992C2 1.444 2.447 1 2.999 1H15l5 5v13.993A1 1 0 0 1 19.007 21H2.993A1 1 0 0 1 2 20.008V1.992Zm10.529 11.454a4.002 4.002 0 0 1-4.86-6.274 4 4 0 0 1 6.274 4.86l2.21 2.21-1.414 1.415-2.21-2.21v-.001Zm-.618-2.032a2 2 0 1 0-2.78-2.877 2 2 0 0 0 2.78 2.877Z"},zd={key:3,d:"M12 17v2h6v2h-6a2 2 0 0 1-2-2v-2H7a4 4 0 0 1-4-4V6a1 1 0 0 1 1-1h3V1h2v4h4V1h2v4h3a1 1 0 0 1 1 1v7a4 4 0 0 1-4 4h-3Zm-5-2h8a2 2 0 0 0 2-2v-3H5v3a2 2 0 0 0 2 2Zm10-8H5v1h12V7Zm-6 6.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"},Ud={key:4,d:"M1.213 13.06a9.945 9.945 0 0 1 0-4.12c1.11.13 2.08-.237 2.396-1.001.317-.765-.108-1.71-.986-2.403a9.945 9.945 0 0 1 2.913-2.913c.692.877 1.638 1.303 2.403.986.765-.317 1.132-1.286 1.001-2.396a9.945 9.945 0 0 1 4.12 0c-.13 1.11.237 2.08 1.001 2.396.765.317 1.71-.108 2.403-.986a9.944 9.944 0 0 1 2.913 2.913c-.877.692-1.303 1.638-.986 2.403.317.765 1.286 1.132 2.396 1.001a9.945 9.945 0 0 1 0 4.12c-1.11-.13-2.08.237-2.396 1.001-.317.765.108 1.71.986 2.403a9.943 9.943 0 0 1-2.913 2.913c-.692-.877-1.638-1.303-2.403-.986-.765.317-1.132 1.286-1.001 2.396a9.945 9.945 0 0 1-4.12 0c.13-1.11-.237-2.08-1.001-2.396-.765-.317-1.71.108-2.403.986a9.944 9.944 0 0 1-2.913-2.913c.877-.692 1.303-1.638.986-2.403-.317-.765-1.286-1.132-2.396-1.001ZM3 11.21c1.1.305 2.007 1.002 2.457 2.086.449 1.085.3 2.22-.262 3.212.096.102.195.201.297.297.993-.562 2.127-.71 3.212-.262 1.084.45 1.781 1.357 2.086 2.457.14.004.28.004.42 0 .305-1.1 1.002-2.007 2.086-2.457 1.085-.449 2.22-.3 3.212.262.102-.096.201-.195.297-.297-.562-.993-.71-2.127-.262-3.212.45-1.084 1.357-1.781 2.457-2.086.004-.14.004-.28 0-.42-1.1-.305-2.007-1.002-2.457-2.086-.449-1.085-.3-2.22.262-3.212a7.967 7.967 0 0 0-.297-.297c-.993.562-2.127.71-3.212.262C12.212 5.007 11.515 4.1 11.21 3a7.926 7.926 0 0 0-.42 0c-.305 1.1-1.002 2.007-2.086 2.457-1.085.449-2.22.3-3.212-.262a6.932 6.932 0 0 0-.297.297c.562.993.71 2.127.262 3.212C5.007 9.788 4.1 10.485 3 10.79c-.004.14-.004.28 0 .42ZM11 14a3 3 0 1 1 0-6 3 3 0 0 1 0 6Zm0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},Kd=ue({__name:"IconNavigation",props:{color:{},icon:{}},setup(e){return(t,s)=>(p(),v("svg",Dd,[a("g",Md,[e.icon==="overview"?(p(),v("path",jd)):T("",!0),e.icon==="monitoring"?(p(),v("path",Nd)):T("",!0),e.icon==="crawling"?(p(),v("path",Gd)):T("",!0),e.icon==="extras"?(p(),v("path",zd)):T("",!0),e.icon==="settings"?(p(),v("path",Ud)):T("",!0)]),s[0]||(s[0]=a("defs",null,[a("clipPath",{id:"clip0_1_44"},[a("path",{fill:"#fff",d:"M0 0h22v22H0z"})])],-1))]))}}),Wd=Object.assign(Kd,{__name:"IconNavigation"}),qd=["aria-label"],Vd=ue({__name:"NavMasterScore",props:{status:{default:"good"},score:{default:0},masterScore:{default:"basic-uptime"}},setup(e){const t=e,s=Zt(),{scoreColor:o}=Da(),n=Y(()=>s.currentProjectScores?s.currentProjectScores.find(l=>l.scoreName===t.masterScore):{status:t.status,score:t.score}),r=Y(()=>typeof t.masterScore=="string"?t.masterScore.split("-")[1]:"");return(l,u)=>(p(),v("div",{class:D(["font-medium text-xs rounded-sm size-7 flex items-center justify-center outline o_text-white leading-none [text-shadow:0_1px_2px_rgba(0,0,0,0.3)]",i(o)[i(n)?.status]]),"aria-live":"polite","aria-label":l.$t("srOnly.navMasterScore",{type:i(n)&&"scoreName"in i(n)?i(n).scoreName.split("-")[1]:i(r),score:i(n)?.score,status:i(n)?.status})},E(i(n)?.score===-1?"NA":i(n)?.score),11,qd))}}),Yd=Object.assign(Vd,{__name:"NavMasterScore"}),Jd={class:"truncate"},Xd={key:0,class:"flex items-center o_gap-1"},Qd=ue({__name:"SubNavigationEntry",props:{child:{},navigationExtras:{type:Boolean,default:!1},smallSize:{type:Boolean,default:!1},showAllEntries:{type:Boolean,default:!1}},setup(e){const t=e,s=tt(),{findMatchingNavigationEntry:o,generateLink:n}=yt(),r=()=>{t.child.children?.length&&s.toggleNavigationEntry(t.child.id),t.child?.path&&(s.mobileNavigation=!1)};return(l,u)=>{const d=Yd,c=xe;return p(),G(on(e.child.children?.length?"div":i(ts)),{to:i(n)(e.child?.path??""),class:D(["cursor-pointer o_py-2 o_pr-3 flex items-center justify-between w-full o_gap-1 text-sm bg-uiBg hover:bg-uiPrime-30 hover:text-uiText-highlighted",[e.smallSize?"o_py-3 o_pl-12":"o_pl-9",i(o)?.parents.includes(e.child.id)?"bg-uiPrime-30/60 dark:bg-uiPrime-50 text-uiText-highlighted":"",i(o)?.id===e.child.id?"bg-uiPrime-40/60 dark:bg-uiPrime-100 text-uiText-highlighted":""]]),onClick:r},{default:z(()=>[a("div",Jd,E(l.$t(`pageName.${e.child.id}`)),1),e.navigationExtras?(p(),v("div",Xd,[e.child.extras?.masterScore?(p(),G(d,{key:0,"master-score":e.child.extras.masterScore,status:"good",score:10},null,8,["master-score"])):T("",!0),e.child.children?.length?(p(),G(c,{key:1,name:i(we).icoChevron,class:D(["size-4 transition duration-200 o_opacity-70",[i(s).openNavigationEntries.includes(e.child.id)||e.showAllEntries?"rotate-0":"-rotate-90"]])},null,8,["name","class"])):T("",!0)])):T("",!0)]),_:1},8,["to","class"])}}}),Zd=Object.assign(Qd,{__name:"SubNavigationEntry"}),ep={key:0,"aria-label":"Page Navigation"},tp=["aria-expanded","data-testid","onClick","onKeydown"],sp={class:"flex gap-2 items-center"},op=["data-testid"],np=["data-testid"],rp=ue({__name:"PageNavigation",setup(e){const t=st(),{finalNavigationStructure:s,findMatchingNavigationEntry:o}=yt(),n=tt(),r=u=>{n.toggleNavigationEntry(u)};ye(()=>t.path,()=>{},{immediate:!0});const l=N(!1);return ro({[xs.showAllEntries]:()=>l.value=!l.value}),(u,d)=>{const c=Wd,h=xe,f=Zd,m=ur;return i(s)?.length?(p(),v("nav",ep,[(p(!0),v(oe,null,ce(i(s),g=>(p(),v("div",{key:g.id,class:"flex items-center justify-between flex-col transition-all duration-300 cursor-pointer text-uiText-muted"},[a("div",{class:D(["w-full bg-uiBg transition duration-300 ease-in-out",[{"":i(o)===g.id}]]),tabindex:"0",role:"button","aria-expanded":i(n).openNavigationEntries.includes(g.id),"data-testid":`page-navigation-entry-${g.id}`,onClick:b=>r(g.id),onKeydown:Xt(b=>r(g.id),["enter"])},[a("div",{class:D(["o_p-3 flex o_gap-2 items-center justify-between w-full hover:bg-uiPrime-30 hover:text-uiText-highlighted",[{"bg-uiPrime-20/50 dark:bg-uiPrime-40 text-uiText-highlighted":i(o)?.parents.includes(g.id)}]])},[a("span",sp,[g.icon?(p(),G(c,{key:0,icon:g.icon,class:"size-4 opacity-90","aria-hidden":"true"},null,8,["icon"])):T("",!0),de(" "+E(u.$t(`pageName.${g.id}`)),1)]),g.id!=="pMonitoring"&&g.children?.length?(p(),G(h,{key:0,name:"mdi:chevron-down",class:D(["size-4 transition duration-200 opacity-70",[i(n).openNavigationEntries.includes(g.id)||i(l)?"rotate-0":"-rotate-90"]]),"aria-hidden":"true"},null,8,["class"])):T("",!0)],2)],42,tp),g.children?.length?(p(),G(m,{key:0,open:g.id==="pMonitoring"||i(n).openNavigationEntries.includes(g.id)||i(l),class:"w-full border-b border-uiBorder-muted dark:border-uiBorder-light"},{default:z(()=>[(p(!0),v(oe,null,ce(g.children,b=>(p(),v("div",{key:b.id,class:"bg-uiBg border-t border-uiBorder-muted dark:border-uiBorder-light","data-testid":`page-navigation-child-${b.id}`},[q(f,{child:b,"navigation-extras":!0,"show-all-entries":i(l)},null,8,["child","show-all-entries"]),b.children?.length?(p(),G(m,{key:0,open:i(n).openNavigationEntries.includes(b.id)||i(l)},{default:z(()=>[(p(!0),v(oe,null,ce(b.children,w=>(p(),v("div",{key:w.id,class:"bg-uiBg border-t border-uiBorder-muted dark:border-uiBorder-light","data-testid":`page-navigation-subchild-${w.id}`},[q(f,{child:w,"small-size":!0,"show-all-entries":i(l)},null,8,["child","show-all-entries"])],8,np))),128))]),_:2},1032,["open"])):T("",!0)],8,op))),128))]),_:2},1032,["open"])):T("",!0)]))),128))])):T("",!0)}}}),ap=Object.assign(rp,{__name:"PageNavigation"}),ip={class:"relative @container/snote o_p-3 rounded-md bg-uiInfo-10 outline outline-uiInfo-100 text-uiText leading-relaxed text-sm text-pretty"},lp={class:"flex items-start o_gap-2 justify-between flex-col @[500px]/snote:flex-row @[500px]/snote:items-center"},cp={class:"font-medium text-uiInfo-600"},up={class:"relative @container/snote o_p-3 rounded-md bg-uiInfo-10 outline outline-uiInfo-100 text-uiText leading-relaxed text-sm text-pretty"},dp={class:"flex items-start o_gap-2 justify-between flex-col @[500px]/snote:flex-row @[500px]/snote:items-center"},pp=ue({__name:"SubscriptionNote",setup(e){const t=N(!1),s=tt(),o=st();ye(()=>o.path,()=>{o.path.includes("/p/")&&(t.value=!1)},{immediate:!0});const n=Y(()=>o.name||o.matched.find(u=>u.name)?.name),r={title:null,description:null},l=Y(()=>Object.values(r).every(u=>u!==null));return(u,d)=>{const c=Di,h=it;return p(),v(oe,null,[i(n)==="index"&&i(l)?(p(),G(c,{key:0,"flag-name":"dashboard.showServiceInfoNews",class:"mb-3","tracking-context":{components:"SubscriptionNote"}},{default:z(()=>[a("div",ip,[a("div",lp,[a("span",cp,E(r.title),1),a("span",null,E(r.description),1)])])]),_:1})):T("",!0),i(n)!=="index"?(p(),G(c,{key:1,"flag-name":"projectLevel.upgradeProjectInfoBox",class:"mb-3","tracking-context":{components:"SubscriptionNote"}},{default:z(()=>[a("div",up,[a("div",dp,[a("span",null,E(u.$t("liteUpsellExploreUpgrade")),1),q(h,{class:"shrink-0",label:u.$t("UpgradeProject"),icon:i(we).icoUpgrade,"data-testid":"upgrade-project-button",onClick:d[0]||(d[0]=f=>i(s).setActiveSlideover("showUpgradeCurrentProject"))},null,8,["label","icon"])])])]),_:1})):T("",!0)],64)}}}),hp=Object.assign(pp,{__name:"SubscriptionNote"}),mp=ue({__name:"AdditionalProjectInfo",setup(e){const t=Zt(),s=N(!1),o=st(),n=()=>!/\/p\/(settings|integrations|crawler)\//.test(o.path);return(r,l)=>{const u=an;return i(t).overallCurrentScore&&n?(p(),v(oe,{key:0},[i(t).overallCurrentScore.onboarded?i(t).overallCurrentScore.onboarded&&i(t).overallCurrentScore.status==="incomplete"?(p(),G(u,{key:1,class:D({hidden:i(s)}),color:"neutral",variant:"subtle",icon:i(we).icoLoadingBlocks,description:r.$t("dataWillCollected"),ui:{root:"p-00 o_p-3 items-center",icon:"size-4 o_opacity-50"},close:{color:"neutral",variant:"ghost",size:"sm"},"onUpdate:open":l[0]||(l[0]=d=>s.value=!i(s))},null,8,["class","icon","description"])):T("",!0):(p(),G(u,{key:0,color:"warning",variant:"subtle",icon:i(we).icoSetup,description:r.$t("unfinishedProject.subline"),ui:{root:"p-00 o_p-3"}},null,8,["icon","description"]))],64)):T("",!0)}}}),fp=Object.assign(mp,{__name:"AdditionalProjectInfo"}),gp={class:"flex items-center flex-wrap text-sm o_gap-1 min-h-4"},vp=ue({__name:"Breadcrumb",setup(e){const{findMatchingNavigationEntry:t,flatNavigationStructure:s,generateLink:o}=yt(),n=Y(()=>t.value?.parents?[...t.value.parents,t.value.id].map(l=>{const u=s.value.find(f=>f.id===l),d=Ma[l],c=d?s.value.find(f=>f.id===d):null;return{path:u?.path??c?.path??t.value?.path,id:l}}):[]);return(r,l)=>{const u=ts;return p(),v("nav",gp,[q(u,{to:{name:"index"},class:"breadcrumb-arrow hover:underline transition duration-200 ease-in-out text-uiText-toned hover:text-uiText-highlighted"},{default:z(()=>[de(E(r.$t("Dashboard")),1)]),_:1}),(p(!0),v(oe,null,ce(i(n),(d,c)=>(p(),v("div",{key:c,class:"breadcrumb-arrow"},[d.path&&d.id!==void 0?(p(),G(u,{key:0,to:i(o)(d.path),class:"breadcrumb-arrow hover:underline transition duration-200 ease-in-out text-uiText-toned hover:text-uiText-highlighted"},{default:z(()=>[de(E(r.$t(`pageName.${d.id}`)),1)]),_:2},1032,["to"])):T("",!0)]))),128))])}}}),bp=Object.assign(vp,{__name:"Breadcrumb"}),yp={class:"o_p-6 sqmSoftReset"},xp={class:"font-medium text-uiText-toned o_mb-4 text-xl"},_p={class:"list-disc list-inside flex flex-col o_gap-2"},wp={class:"text-uiText-highlighted"},kp={class:"flex items-center gap-1"},Sp=ue({__name:"ShortKeyHelper",setup(e){const t=N(!1);ro({[xs.help]:()=>t.value=!t.value});const s=Y(()=>Object.entries(xs).map(([n,r])=>({func:`kbdShortcuts.${n}`,keys:r.split("_")})));return(o,n)=>{const r=un,l=hr;return p(),G(l,{open:i(t),"onUpdate:open":n[0]||(n[0]=u=>Ge(t)?t.value=u:null)},{content:z(()=>[a("div",yp,[a("h2",xp,E(o.$t("ShowKeyboardShortcuts")),1),a("ul",_p,[(p(!0),v(oe,null,ce(i(s),u=>(p(),v("li",{key:u.func,class:"flex items-center gap-2"},[a("span",wp,E(o.$t(u.func)),1),a("span",kp,[(p(!0),v(oe,null,ce(u.keys,d=>(p(),G(r,{key:d,size:"lg"},{default:z(()=>[de(E(d),1)]),_:2},1024))),128))])]))),128))])])]),_:1},8,["open"])}}}),Cp=Object.assign(Sp,{__name:"ShortKeyHelper"}),$p=ks(()=>Ss(()=>import("./DP2TcMhG.js"),__vite__mapDeps([12,1,2,13,14,11,15,7,10]),import.meta.url).then(e=>e.default||e)),Ap=ks(()=>Ss(()=>import("./C3miKDOS.js"),__vite__mapDeps([16,0,1,2,3,4,17,7,18,19,6,8,9,10,11,20,21,13,14,15,22,23,24]),import.meta.url).then(e=>e.default||e)),Ep=ks(()=>Ss(()=>import("./DafFd-NR.js"),__vite__mapDeps([25,1,2,0,3,4,17,13,14,11,15,7,10]),import.meta.url).then(e=>e.default||e)),Tp=ue({__name:"SliderOverCollection",setup(e){const t=Y(()=>tt().activeSlideover);return(s,o)=>{const n=$p,r=Ap,l=Ep;return p(),v(oe,null,[i(t).includes("showBuyNewProject")?(p(),G(n,{key:0})):T("",!0),i(t).includes("showAddNewProject")?(p(),G(r,{key:1})):T("",!0),i(t).includes("showUpgradeCurrentProject")?(p(),G(l,{key:2})):T("",!0)],64)}}}),Lp=Object.assign(Tp,{__name:"SliderOverCollection"}),Bp={key:0},Pp=["data-href","data-email","data-campaignId","data-tags","data-prop-days-since-creation","data-prop-user-plan"],Rp=ue({__name:"RetentlyEmbed",setup(e){const t=mt(),s=ja(),o=Vn(),n=st(),{policyGuard:r}=es(),l=Y(()=>r("retently.upsell",{trackingContext:{components:"RetentlyEmbed"}}));ye(()=>n.query,()=>{!Object.keys(n.query).length&&s.activeRetentlySurvey==="upgrade"&&setTimeout(()=>{s.activeRetentlySurvey="NPS"},3e5)},{immediate:!0}),ye(()=>[o.applicationInitiated,l.value],([d,c])=>{d&&(c?s.activeRetentlySurvey="NPS":s.activeRetentlySurvey="rating")},{immediate:!0});const u=Y(()=>{if(l.value)return t.projectSku});return(d,c)=>i(s).validNPSData?(p(),v("div",Bp,[a("div",{id:"retently-survey-embed","data-href":"https://app.retently.com/api/remote/tracking/"+i(s).parentCampaignId,"data-rel":"dialog","data-email":i(s).retentlyUser?.email,"data-campaignId":i(s).campaignId,"data-tags":i(s)?.tags,"data-prop-days-since-creation":i(s).retentlyUser.properties[0]?.daysSinceCreation,"data-prop-user-plan":i(u)},null,8,Pp)])):T("",!0)}}),Ip=Object.assign(Rp,{__name:"RetentlyEmbed"}),Ur=["component:PageHeader","navigation","middleware","store:user"],Op=()=>Ur,mn="pinia-value-tracker-configs",Ft=e=>`pinia-value-tracker-history:${e}`,Mn=()=>Na("pinia")?(console.log("๐ Pinia value tracking enabled"),!0):!1,Es=(e,t)=>{if(typeof window>"u")return t;try{const s=sessionStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}},io=(e,t)=>{if(!(typeof window>"u"))try{sessionStorage.setItem(e,JSON.stringify(t))}catch{}},Kr=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,eo=()=>Es(mn,[]).map(t=>({...t,type:t.type||"state"})),Hp=(e,t,s="state")=>{const o=String(e||"").trim(),n=String(t||"").trim(),r=Date.now();if(!o||!n)throw new Error("storeId and path are required");const l=eo(),u=l.find(c=>c.storeId===o&&c.path===n&&c.type===s);if(u)return u;const d={id:Kr("track"),storeId:o,path:n,type:s,createdAt:r};return io(mn,[d,...l]),d},Fp=e=>{const t=eo().filter(s=>s.id!==e);if(io(mn,t),typeof window<"u")try{sessionStorage.removeItem(Ft(e))}catch{}},Dp=e=>[...Es(Ft(e),[])].sort((s,o)=>o.timestamp-s.timestamp),jn=(e,t)=>{const s=Date.now(),o={id:Kr("entry"),trackId:e,timestamp:s,value:jp(t)},n=Es(Ft(e),[]);n.unshift(o);const r=n.slice(0,200);return io(Ft(e),r),o},Mp=(e,t)=>{const o=Es(Ft(e),[]).filter(n=>n.id!==t);io(Ft(e),o)},jp=e=>{try{return JSON.parse(JSON.stringify(e))}catch{return e}},Np=e=>{const t=Es(Ft(e),[]);return t.length>0?t[0]?.value:void 0};function Ot(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function rt(e){return e.replace(/"__DECODED_START__":\s*true,?/g,'<span class="text-orange-400 font-bold">/* Decoded JSON โ */</span>').replace(/"__DECODED_END__":\s*true,?/g,'<span class="text-orange-400 font-bold">/* โ End Decoded */</span>').replace(/"__DECODED_START__",?/g,'<span class="text-orange-400 font-bold">/* Decoded JSON โ */</span>').replace(/"__DECODED_END__",?/g,'<span class="text-orange-400 font-bold">/* โ End Decoded */</span>').replace(/"([^"]+)":/g,'<span class="text-blue-300">"$1"</span>:').replace(/:\s*"([^"]*)"/g,': <span class="text-green-300">"$1"</span>').replace(/:\s*(true|false)/g,': <span class="text-yellow-300">$1</span>').replace(/:\s*(null)/g,': <span class="text-red-300">$1</span>').replace(/:\s*(\d+\.?\d*)/g,': <span class="text-purple-300">$1</span>').replace(/(\{|\}|\[|\])/g,'<span class="text-gray-400">$1</span>')}function $o(e,t,s,o,n,r=40){const l=" ".repeat(s);if(s>=r)return`${l}<span class="text-gray-400">โฆ</span>`;if(e===null)return`${l}<span class="text-red-300">null</span>`;if(e===void 0)return`${l}<span class="text-red-300">undefined</span>`;const u=typeof e;if(u==="string")return`${l}<span class="text-green-300">"${Ot(e)}"</span>`;if(u==="number")return`${l}<span class="text-purple-300">${e}</span>`;if(u==="bigint")return`${l}<span class="text-purple-300">${String(e)}n</span>`;if(u==="boolean")return`${l}<span class="text-yellow-300">${e}</span>`;if(u==="function")return`${l}<span class="text-gray-400">[Function]</span>`;if(u==="symbol")return`${l}<span class="text-gray-400">[Symbol]</span>`;if(Array.isArray(e)){if(n?.has(e))return`${l}<span class="text-gray-400">[Circular]</span>`;if(e.length===0)return`${l}[ ]`;const d=e[0]==="__DECODED_START__"&&e[e.length-1]==="__DECODED_END__",c=d?e.slice(1,-1):e;let h=`${l}[
`;return n||(n=new WeakSet),n.add(e),d&&(h+=`${l} <span class="text-orange-400 font-bold">/* Decoded JSON โ */</span>
`),c.forEach((f,m)=>{h+=to(f,`${t}[${m}]`,s+1,o,n,r),h+=m<c.length-1?`,
`:`
`}),d&&(h+=`${l} <span class="text-orange-400 font-bold">/* โ End Decoded */</span>
`),h+=`${l}]`,h}return to(e,t,s,o,n,r)}function to(e,t="",s=0,o,n,r=40){const l=" ".repeat(s);if(s>=r)return`${l}{โฆ}`;if(!e||typeof e!="object"||Array.isArray(e))return $o(e,t,s,o,n,r);if(n||(n=new WeakSet),n.has(e))return`${l}<span class="text-gray-400">[Circular]</span>`;n.add(e);const u=Object.entries(e);if(!u.length)return`${l}{ }`;const d=Object.prototype.hasOwnProperty.call(e,"__DECODED_START__"),c=Object.prototype.hasOwnProperty.call(e,"__DECODED_END__"),h=u.filter(([m])=>m!=="__DECODED_START__"&&m!=="__DECODED_END__");let f=`${l}{
`;return d&&(f+=`${l} <span class="text-orange-400 font-bold">/* Decoded JSON โ */</span>
`),h.forEach(([m,g],b)=>{const w=t?`${t}.${m}`:m,y=o?o(w):!1,S=y?"text-fuchsia-400":"text-blue-300",C=y?`Currently tracking ${Ot(w)}`:`Track ${Ot(w)}`,R=`<span class="${S} hover:underline decoration-dotted cursor-pointer js-json-key" role="button" tabindex="0" aria-label="${C}" data-path="${Ot(w)}">"${Ot(m)}"</span>:`;f+=`${l} ${R} `,f+=Array.isArray(g)||g&&typeof g=="object"?`
${$o(g,w,s+1,o,n,r)}`:$o(g,w,0,o,n,r),f+=b<h.length-1?`,
`:`
`}),c&&(f+=`${l} <span class="text-orange-400 font-bold">/* โ End Decoded */</span>
`),f+=`${l}}`,f}function Ao(e,t,s,o=40){const n=" ".repeat(t);if(t>=o)return`${n}<span class="text-gray-400">โฆ</span>`;if(e===null)return`${n}<span class="text-red-300">null</span>`;if(e===void 0)return`${n}<span class="text-red-300">undefined</span>`;const r=typeof e;if(r==="string")return`${n}<span class="text-green-300">"${Ot(e)}"</span>`;if(r==="number")return`${n}<span class="text-purple-300">${e}</span>`;if(r==="bigint")return`${n}<span class="text-purple-300">${String(e)}n</span>`;if(r==="boolean")return`${n}<span class="text-yellow-300">${e}</span>`;if(r==="function")return`${n}<span class="text-gray-400">[Function]</span>`;if(r==="symbol")return`${n}<span class="text-gray-400">[Symbol]</span>`;if(Array.isArray(e)){if(s?.has(e))return`${n}<span class="text-gray-400">[Circular]</span>`;if(e.length===0)return`${n}[ ]`;const l=e[0]==="__DECODED_START__"&&e[e.length-1]==="__DECODED_END__",u=l?e.slice(1,-1):e;let d=`${n}[
`;return s||(s=new WeakSet),s.add(e),l&&(d+=`${n} <span class="text-orange-400 font-bold">/* Decoded JSON โ */</span>
`),u.forEach((c,h)=>{d+=Yo(c,t+1,s,o),d+=h<u.length-1?`,
`:`
`}),l&&(d+=`${n} <span class="text-orange-400 font-bold">/* โ End Decoded */</span>
`),d+=`${n}]`,d}return Yo(e,t,s,o)}function Yo(e,t=0,s,o=40){const n=" ".repeat(t);if(t>=o)return`${n}{โฆ}`;if(!e||typeof e!="object"||Array.isArray(e))return Ao(e,t,s,o);if(s||(s=new WeakSet),s.has(e))return`${n}<span class="text-gray-400">[Circular]</span>`;s.add(e);const r=Object.entries(e);if(!r.length)return`${n}{ }`;const l=Object.prototype.hasOwnProperty.call(e,"__DECODED_START__"),u=Object.prototype.hasOwnProperty.call(e,"__DECODED_END__"),d=r.filter(([h])=>h!=="__DECODED_START__"&&h!=="__DECODED_END__");let c=`${n}{
`;return l&&(c+=`${n} <span class="text-orange-400 font-bold">/* Decoded JSON โ */</span>
`),d.forEach(([h,f],m)=>{const g=`<span class="text-blue-300">"${Ot(h)}"</span>:`;c+=`${n} ${g} `,c+=Array.isArray(f)||f&&typeof f=="object"?`
${Ao(f,t+1,s,o)}`:Ao(f,0,s,o),c+=m<d.length-1?`,
`:`
`}),u&&(c+=`${n} <span class="text-orange-400 font-bold">/* โ End Decoded */</span>
`),c+=`${n}}`,c}function Gp(e,t,s,o,n){return t==="state"?to(n(e),"",0,s):t==="getters"?to(e,"",0,s):rt(o(e))}function zp(e,t,s,o){const n=e.target?.closest(".js-json-key");if(!n)return;const r=n.getAttribute("data-path")||"";!r||!t||(s(t),o(r))}function Vt(e){if(e==null)return e;if(typeof e=="string"){let t=e.trim();for(let s=0;s<3;s++){(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1));try{const o=JSON.parse(t);if(typeof o=="string"){t=o.trim();continue}const n=Vt(o);return typeof n=="object"&&n!==null?Array.isArray(n)?["__DECODED_START__",...n,"__DECODED_END__"]:{__DECODED_START__:!0,...n,__DECODED_END__:!0}:n}catch{break}}return e}if(Array.isArray(e))return e.map(t=>Vt(t));if(typeof e=="object"){const t={};for(const[s,o]of Object.entries(e))t[s]=Vt(o);return t}return e}function ys(e){return JSON.stringify(Vt(e),null,2)}function Up(e,t){const s=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${s}$`,"i").test(e)}function Jo(e,t,s=""){const o=[];if(e==null)return o;if(typeof e=="object")if(Array.isArray(e))e.forEach((n,r)=>{const l=s?`${s}[${r}]`:`[${r}]`;o.push(...Jo(n,t,l))});else for(const[n,r]of Object.entries(e)){const l=s?`${s}.${n}`:n;Up(l,t)&&o.push({path:l,value:r}),o.push(...Jo(r,t,l))}return o}function Kp(e,t){const s=Jo(e,t);if(s.length===0)return e;const o={};return s.forEach(({path:n,value:r})=>{const l=n.split(".");let u=o;for(let c=0;c<l.length-1;c++){const h=l[c];h&&!(h in u)&&(u[h]={}),h&&(u=u[h])}const d=l[l.length-1];d&&(u[d]=r)}),o}function Wp(e,t){if(!t.trim())return e;try{const s=gs(e,t);if(s!==void 0){const o=Wr(t);return qr(o,s)}return e}catch{return e}}function Wr(e){const t=[];let s="",o=!1;for(let n=0;n<e.length;n++){const r=e[n];r==="["?(s&&(t.push(s),s=""),o=!0):r==="]"?(o&&s&&(t.push(s),s=""),o=!1):r==="."&&!o?s&&(t.push(s),s=""):s+=r}return s&&t.push(s),t}function gs(e,t){const s=Wr(t);let o=e;for(const n of s){if(o==null)return;const r=parseInt(n,10);!isNaN(r)&&Array.isArray(o)?o=o[r]:o=o[n]}return o}function qr(e,t){if(e.length===0)return t;const[s,...o]=e;if(!s)return t;const n={},r=parseInt(s,10);return isNaN(r)?(o.length===0?n[s]=t:n[s]=qr(o,t),n):t}function so(e,t){if(!t.trim())return e;if(t.includes("*"))return Kp(e,t);if(t.includes(".")||t.includes("["))return Wp(e,t);function o(n,r,l=""){if(n==null)return null;if(typeof n=="object")if(Array.isArray(n)){const u=n.map((d,c)=>o(d,r,l?`${l}[${c}]`:`[${c}]`)).filter(Boolean);return u.length>0?u:null}else{const u={};let d=!1;for(const[c,h]of Object.entries(n)){const f=l?`${l}.${c}`:c;if(c.toLowerCase().includes(r.toLowerCase())||f.toLowerCase().includes(r.toLowerCase()))u[c]=h,d=!0;else{const m=o(h,r,f);m!==null&&(u[c]=m,d=!0)}}return d?u:null}return null}return o(e,t)||e}const qp=()=>({getGroupColor:t=>{const s=t.toLowerCase();return s.includes("error")?{bg:"bg-red-500/20",text:"text-red-200",border:"border-red-500/30"}:s.includes("warning")?{bg:"bg-yellow-500/20",text:"text-yellow-200",border:"border-yellow-500/30"}:s.includes("info")?{bg:"bg-blue-500/20",text:"text-blue-200",border:"border-blue-500/30"}:s.includes("debug")?{bg:"bg-purple-500/20",text:"text-purple-200",border:"border-purple-500/30"}:s.includes("log")?{bg:"bg-gray-500/20",text:"text-gray-200",border:"border-gray-500/30"}:{bg:"bg-green-500/20",text:"text-green-200",border:"border-green-500/30"}}}),Vp={class:"flex-1 flex flex-col"},Yp={class:"flex items-center justify-between p-4 o_border-b border-white/10 bg-white/5"},Jp={class:"flex items-center gap-2"},Xp={class:"flex-1 overflow-auto pb-10"},Qp={key:0,class:"text-center py-8 opacity-60"},Zp={key:1,class:"space-y-3 p-4"},eh={class:"flex items-center justify-between p-4 o_border-b border-white/10"},th={class:"flex items-center gap-3"},sh={class:"flex items-center gap-2 text-xs text-white/50"},oh={key:0,class:"text-xs opacity-60 bg-white/10 px-2 py-0.5 rounded-full ml-2"},nh={key:1,class:"text-white/60"},rh={class:"flex items-center gap-2"},ah=["onClick"],ih={class:"flex items-center gap-2 text-xs text-white/70"},lh=["title","aria-label","onClick"],ch={key:0,class:"w-4 h-4 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},uh={key:1,class:"w-4 h-4 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},dh=["onClick"],ph={key:0,class:"px-4 pb-4"},hh={class:"flex items-start justify-between gap-3 mb-3"},mh={class:"flex items-center gap-2 text-xs text-white/50"},fh=["onClick"],gh={key:0},vh={key:0,class:"mb-3 p-2 rounded bg-white/5 text-xs text-white/70"},bh={key:0},yh=["innerHTML"],xh=["innerHTML"],_h={key:1,class:"border-t border-white/10 bg-white/2"},wh={class:"p-3"},kh={class:"space-y-3"},Sh={class:"flex items-start justify-between gap-3 mb-2"},Ch={class:"flex items-center gap-2 text-xs text-white/50"},$h={key:0},Ah={key:1},Eh=["onClick"],Th={key:0},Lh=["innerHTML"],Bh=["innerHTML"],Ph=ue({__name:"SddTabEcho",props:{echoEntries:{},echoFilteredEntries:{},echoSearch:{},echoSelectedGroups:{},echoUniquePages:{},echoUniqueComponents:{},echoSelectedPage:{},echoSelectedComponent:{},echoSortOrder:{},echoPersistedGroups:{},clearAllEchoEntries:{type:Function},clearEchoFilters:{type:Function},toggleEchoGroup:{type:Function},removeEchoEntryById:{type:Function},toggleEchoGroupPersist:{type:Function},removeEchoGroup:{type:Function}},emits:["update:echo-sort-order","update:echo-search","update:echo-selected-page","update:echo-selected-component","echo-tracking-changed","echo-stats"],setup(e,{emit:t}){const s=e,o=t,{formatShortElapsed:n}=cn(),{getGroupColor:r}=qp(),l=N({}),u=A=>{l.value[A]=!l.value[A]},d=A=>new Date(A).toLocaleString(),c=A=>typeof A=="string"?A:JSON.stringify(A,null,2),h=N([]),f=()=>{h.value=za()},m=A=>h.value.includes(A),g=A=>{m(A)?or(A):nr(A),f(),o("echo-tracking-changed",A)},b=()=>{const A=U.value.map(j=>j.groupKey);Ua(A),f()},w=N({}),y=()=>{w.value=rr()};let S;kt(()=>{f(),y(),S=window.setInterval(y,2e3)}),no(()=>{S&&clearInterval(S)});const C=A=>!(A==null||typeof A=="string"&&A.trim()===""||typeof A=="object"&&Object.keys(A).length===0),R=A=>{if(typeof A=="object"&&A!==null)return!0;if(typeof A=="string"){const j=A.trim();return j.startsWith("{")&&j.endsWith("}")||j.startsWith("[")&&j.endsWith("]")}return!1},F=A=>R(A)?ys(A):c(A),M=A=>{if(typeof A=="object"&&A!==null){const j=A.componentInfo&&typeof A.componentInfo=="object",H=A.props&&typeof A.props=="object",O=A.propsHistory&&Array.isArray(A.propsHistory),Z=A.message&&typeof A.message=="string";if(j||H||O||Z)return{isStructured:!0,componentInfo:j?A.componentInfo:null,props:H?A.props:null,propsHistory:O?A.propsHistory:null,message:Z?A.message:null,codeContent:H?A.props:O?A.propsHistory:null}}return{isStructured:!1,componentInfo:null,props:null,propsHistory:null,message:null,codeContent:A}},U=Y(()=>{const A=new Map;s.echoFilteredEntries.forEach(Z=>{const L=A.get(Z.groupKey)||[];L.push(Z),A.set(Z.groupKey,L)});const j=Array.from(Op());let H=s.echoSelectedGroups.length>0?j.filter(Z=>s.echoSelectedGroups.includes(Z)):j;s.echoSearch&&s.echoSearch.trim()&&(H=H.filter(Z=>(A.get(Z)?.length??0)>0));const O=[];return H.forEach(Z=>{const k=[...A.get(Z)||[]].sort((_,$)=>s.echoSortOrder==="desc"?$.timestamp-_.timestamp:_.timestamp-$.timestamp).slice(0,10);O.push({groupKey:Z,entries:k,latestEntry:k.length>0?k[0]:null,historyEntries:k.length>1?k.slice(1):[],isPersisted:s.echoPersistedGroups.includes(Z)})}),O.sort((Z,L)=>{const se=Z.latestEntry?.timestamp,k=L.latestEntry?.timestamp;return se==null&&k==null?0:se==null?1:k==null?-1:s.echoSortOrder==="desc"?k-se:se-k})}),I=Y(()=>U.value.filter(A=>h.value.includes(A.groupKey)).length);ye(()=>[U.value.length,s.echoFilteredEntries.length,I.value],()=>{o("echo-stats",{groups:U.value.length,entries:s.echoFilteredEntries.length,enabled:I.value})},{immediate:!0});const B=Y(()=>U.value.filter(A=>!h.value.includes(A.groupKey)).length);return(A,j)=>(p(),v("div",Vp,[a("div",Yp,[j[3]||(j[3]=Ga('<div class="flex items-center gap-3"><div class="flex items-center gap-2"><div class="flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-500/20 text-blue-200"><div class="w-2 h-2 rounded-full bg-blue-400"></div><span class="text-sm font-medium">Echo Debug</span></div></div></div>',1)),a("div",Jp,[a("button",{class:"px-3 py-1.5 rounded-lg bg-red-500/20 hover:bg-red-500/30 text-xs font-medium transition-colors",onClick:j[0]||(j[0]=H=>e.clearAllEchoEntries())}," Clear All "),a("button",{class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:j[1]||(j[1]=H=>e.clearEchoFilters())}," Clear Filters "),i(B)>0?(p(),v("button",{key:0,class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:j[2]||(j[2]=H=>b())}," Enable all echos ")):T("",!0)])]),a("div",Xp,[i(U).length===0?(p(),v("div",Qp,[...j[4]||(j[4]=[a("div",{class:"text-2xl mb-2"}," ๐ ",-1),a("div",{class:"text-sm"}," No echo groups found ",-1),a("div",{class:"text-xs text-white/50 mt-1"},[de(" Use "),a("code",null,"echo('groupKey', 'message')"),de(" to add entries ")],-1)])])):(p(),v("div",Zp,[(p(!0),v(oe,null,ce(i(U),H=>(p(),v("div",{key:H.groupKey,class:D(["bg-white/5 rounded-lg o_border border-white/10 hover:bg-white/8 transition-colors",[{"o_opacity-60":!m(H.groupKey)}]])},[a("div",eh,[a("div",th,[a("span",{class:D(["px-3 py-1.5 rounded-lg text-sm font-medium",[i(r)(H.groupKey).bg,i(r)(H.groupKey).text]])},E(H.groupKey),3),a("div",sh,[H.entries.length>0?(p(),v(oe,{key:0},[a("span",null,E(d(H.latestEntry.timestamp)),1),a("span",null,E(i(n)(H.latestEntry.timestamp)),1),m(H.groupKey)?(p(),v("span",oh," โป "+E(i(w)[H.groupKey]||0)+" triggers โข "+E(H.historyEntries.length)+" history ",1)):T("",!0)],64)):(p(),v("span",nh,"No data yet")),m(H.groupKey)?T("",!0):(p(),G(i(Ks),{key:2,label:"disabled",color:"error",variant:"subtle",size:"xs"}))])]),a("div",rh,[H.historyEntries.length>0?(p(),v("button",{key:0,class:"px-2 py-1 rounded text-xs bg-white/10 hover:bg-white/20 text-white/70 hover:text-white/90 transition-colors",onClick:O=>u(H.groupKey)},E(i(l)[H.groupKey]?"Hide":"Show")+" History ("+E(H.historyEntries.length)+") ",9,ah)):T("",!0),a("div",ih,[a("button",{class:"p-1.5 rounded hover:bg-white/10 transition-colors",title:m(H.groupKey)?"Disable tracking":"Enable tracking","aria-label":m(H.groupKey)?"Disable tracking":"Enable tracking",onClick:O=>g(H.groupKey)},[m(H.groupKey)?(p(),v("svg",ch,[...j[5]||(j[5]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.477 0 8.268 2.943 9.542 7-1.274 4.057-5.065 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])])):(p(),v("svg",uh,[...j[6]||(j[6]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.477 0-8.268-2.943-9.542-7a10.05 10.05 0 012.331-3.956M6.223 6.223A9.956 9.956 0 0112 5c4.477 0 8.268 2.943 9.542 7a10.026 10.026 0 01-4.043 5.197M15 12a3 3 0 00-3-3M3 3l18 18"},null,-1)])]))],8,lh)]),a("button",{class:"p-1.5 rounded hover:bg-red-500/20 text-red-400 hover:text-red-300 transition-colors",title:"Delete entire group",onClick:O=>e.removeEchoGroup(H.groupKey)},[...j[7]||(j[7]=[a("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,dh)])]),j[13]||(j[13]=a("div",{class:"px-4 pb-2 -mt-2"},null,-1)),H.entries.length>0?(p(),v("div",ph,[a("div",hh,[a("div",mh,[H.latestEntry.page?(p(),G(i(Ks),{key:0,label:`๐ ${H.latestEntry.page}`,color:"warning",variant:"subtle",size:"sm"},null,8,["label"])):T("",!0)]),a("button",{class:"p-1 rounded hover:bg-red-500/20 text-red-400 hover:text-red-300 transition-colors",title:"Delete this entry",onClick:O=>e.removeEchoEntryById(H.latestEntry.id)},[...j[8]||(j[8]=[a("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,fh)]),C(H.latestEntry.message)?(p(),v(oe,{key:0},[M(H.latestEntry.message).isStructured?(p(),v("div",gh,[M(H.latestEntry.message).componentInfo?(p(),v("div",vh,[M(H.latestEntry.message).componentInfo.filePath?(p(),v("div",bh,[j[9]||(j[9]=a("span",{class:"text-white/50"},"File:",-1)),de(" "+E(M(H.latestEntry.message).componentInfo.filePath),1)])):T("",!0)])):T("",!0),M(H.latestEntry.message).codeContent?(p(),v("pre",{key:1,class:D(["text-sm text-white/90 whitespace-pre-wrap font-mono bg-black/20 p-3 rounded o_border",i(r)(H.groupKey).border]),innerHTML:R(M(H.latestEntry.message).codeContent)&&i(rt)?i(rt)(F(M(H.latestEntry.message).codeContent)):F(M(H.latestEntry.message).codeContent)},null,10,yh)):T("",!0)])):(p(),v("pre",{key:1,class:D(["text-sm text-white/90 whitespace-pre-wrap font-mono bg-black/20 p-3 rounded o_border",i(r)(H.groupKey).border]),innerHTML:R(H.latestEntry.message)&&i(rt)?i(rt)(F(H.latestEntry.message)):F(H.latestEntry.message)},null,10,xh))],64)):T("",!0)])):T("",!0),i(l)[H.groupKey]&&H.historyEntries.length>0?(p(),v("div",_h,[a("div",wh,[j[12]||(j[12]=a("div",{class:"text-xs text-white/50 mb-3 font-medium"}," History ",-1)),a("div",kh,[(p(!0),v(oe,null,ce(H.historyEntries,O=>(p(),v("div",{key:O.id,class:"bg-white/5 rounded p-3 o_border border-white/5"},[a("div",Sh,[a("div",Ch,[a("span",null,E(d(O.timestamp)),1),j[10]||(j[10]=a("span",null,"โข",-1)),a("span",null,E(i(n)(O.timestamp)),1),O.page?(p(),v("span",$h,"๐ "+E(O.page),1)):T("",!0),O.component?(p(),v("span",Ah,"๐งฉ "+E(O.component),1)):T("",!0)]),a("button",{class:"p-1 rounded hover:bg-red-500/20 text-red-400 hover:text-red-300 transition-colors",title:"Delete this entry",onClick:Z=>e.removeEchoEntryById(O.id)},[...j[11]||(j[11]=[a("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Eh)]),C(O.message)?(p(),v(oe,{key:0},[M(O.message).isStructured?(p(),v("div",Th,[M(O.message).codeContent?(p(),v("pre",{key:0,class:D(["text-sm text-white/80 whitespace-pre-wrap font-mono bg-black/10 p-2 rounded o_border",i(r)(H.groupKey).border]),innerHTML:R(M(O.message).codeContent)&&i(rt)?i(rt)(F(M(O.message).codeContent)):F(M(O.message).codeContent)},null,10,Lh)):T("",!0)])):(p(),v("pre",{key:1,class:D(["text-sm text-white/80 whitespace-pre-wrap font-mono bg-black/10 p-2 rounded o_border",i(r)(H.groupKey).border]),innerHTML:R(O.message)&&i(rt)?i(rt)(F(O.message)):F(O.message)},null,10,Bh))],64)):T("",!0)]))),128))])])])):T("",!0)],2))),128))]))])]))}}),Rh=Object.assign(Ph,{__name:"SddTabEcho"}),Eo=new Map([["companyRepository.setCluster",{url:"/api/{application}/company/{company}",method:"POST"}],["applicationRepository.getConfigByCName",{url:"/application/whitelabel/config/cname/{cName}",method:"GET"}],["auth2Repository.loginWithCredentials",{url:"/{application}/auth/login",method:"POST"}],["auth2Repository.createReadOnlyRefreshToken",{url:"/{application}/auth/read-only-token/{user}",method:"POST"}],["auth2Repository.createTokenByRefreshToken",{url:"/{application}/auth/refresh/{user}",method:"POST"}],["auth2Repository.createTokenBySession",{url:"/{application}/auth/session",method:"POST"}],["auth2Repository.createTokenByConfirmCodeAndDeprecatedJwt",{url:"/{application}/auth/session-deprecated/confirm",method:"POST"}],["auth2Repository.createToken",{url:"/{application}/auth/token/{user}",method:"POST"}],["clusterRepository.getCluster",{url:"/{application}/cluster",method:"GET"}],["applicationRepository.getPrimaryCluster",{url:"/{application}/cluster/primary",method:"POST"}],["companyRepository.disconnectUser",{url:"/{application}/company/{company}/disconnect/{user}",method:"PUT"}],["memoryRepository.set",{url:"/{application}/memory/{objectType}/{objectId}",method:"PUT"}],["userRepository.createUser",{url:"/{application}/user",method:"POST"}],["userRepository.activate",{url:"/{application}/user/activate",method:"POST"}],["userRepository.find",{url:"/{application}/user/find",method:"POST"}],["userRepository.requestPasswordReset",{url:"/{application}/user/password/request",method:"POST"}],["userRepository.deleteUser",{url:"/{application}/user/{user}",method:"DELETE"}],["userRepository.updateUser",{url:"/{application}/user/{user}",method:"PUT"}],["userRepository.connectAuthAccount",{url:"/{application}/user/{user}/connect",method:"POST"}],["userRepository.isDeletable",{url:"/{application}/user/{user}/deletable/{company}",method:"POST"}],["userRepository.setPreferredLanguage",{url:"/{application}/user/{user}/language",method:"PUT"}],["userRepository.changePassword",{url:"/{application}/user/{user}/password",method:"PUT"}],["userRepository.resetPassword",{url:"/{application}/user/{user}/password/reset",method:"PUT"}],["alertingchannelRepository.list",{url:"alerting/channels/{project}",method:"GET"}],["alertingchannelRepository.create",{url:"alerting/channels/{project}",method:"POST"}],["alertingchannelRepository.delete",{url:"alerting/channels/{project}/{channel}",method:"DELETE"}],["alertingchannelRepository.update",{url:"alerting/channels/{project}/{channel}",method:"PUT"}],["alertingpolicyRepository.list",{url:"alerting/policies/{project}",method:"GET"}],["alertingpolicyRepository.create",{url:"alerting/policies/{project}",method:"POST"}],["alertingpolicyRepository.delete",{url:"alerting/policies/{project}/{policy}",method:"DELETE"}],["alertingpolicyRepository.update",{url:"alerting/policies/{project}/{policy}",method:"PUT"}],["twofactorRepository.isTwoFactorRequired",{url:"auth/2fa/is-required",method:"POST"}],["twofactorRepository.triggerTwoFactorForAction",{url:"auth/2fa/trigger",method:"POST"}],["authRepository.createTokenByCredentials",{url:"auth/tokens/access",method:"POST"}],["authRepository.createTokenByRefreshToken",{url:"auth/tokens/refresh/{user}",method:"POST"}],["checkdeadlinksRepository.getResultsByCompany",{url:"check/checks/company/{company}/deadlinks",method:"GET"}],["checkRepository.addByRecipe",{url:"check/checks/cookbook",method:"POST"}],["checkdeadlinksRepository.getBlockedPatterns",{url:"check/checks/deadlinks/blocked",method:"GET"}],["checkRepository.runChecksForSystem",{url:"check/checks/run/{system}/{toolIdentifier}",method:"POST"}],["checka11yRepository.getResults",{url:"check/checks/{system}/a11y/results",method:"GET"}],["checkbrokenresourceRepository.getBrokenResources",{url:"check/checks/{system}/brokenresources",method:"GET"}],["checkcertificateRepository.getExpirationResults",{url:"check/checks/{system}/certificate",method:"GET"}],["checkRepository.addByChecklist",{url:"check/checks/{system}/checklist",method:"POST"}],["checkcookieRepository.getDomains",{url:"check/checks/{system}/cookies/domains",method:"GET"}],["checkdeadlinksRepository.getResults",{url:"check/checks/{system}/deadlinks",method:"GET"}],["checkdeadlinksRepository.getConfiguration",{url:"check/checks/{system}/deadlinks/config",method:"GET"}],["checkdeadlinksRepository.ignorePattern",{url:"check/checks/{system}/deadlinks/ignore",method:"POST"}],["checkdeadlinksRepository.unignorePattern",{url:"check/checks/{system}/deadlinks/unignore",method:"POST"}],["checkhealthcheckRepository.getResults",{url:"check/checks/{system}/healthchecks",method:"GET"}],["checkinsecurecontentRepository.getInsecureElements",{url:"check/checks/{system}/insecure",method:"GET"}],["checkjavascripterrorsRepository.getResults",{url:"check/checks/{system}/jserrors",method:"GET"}],["checklighthouseRepository.getResults",{url:"check/checks/{system}/lighthouse/results/{category}",method:"GET"}],["checkmobilefriendlyRepository.getResults",{url:"check/checks/{system}/mobilefriendly",method:"GET"}],["checkfilesizeRepository.getResults",{url:"check/checks/{system}/performance/big",method:"GET"}],["checkfilesizeRepository.ignorePattern",{url:"check/checks/{system}/siteinfo/ignore",method:"POST"}],["checksitemapRepository.getResults",{url:"check/checks/{system}/sitemap",method:"GET"}],["checkRepository.showActiveCollections",{url:"check/collections/system/active/{system}/{toolIdentifier}",method:"POST"}],["checkRepository.updateCollections",{url:"check/collections/system/{system}",method:"PUT"}],["checkRepository.showCollections",{url:"check/collections/{project}/{toolIdentifier}",method:"POST"}],["nixstatsRepository.createWebsiteMonitor",{url:"check/nixtstats/{company}/monitor/website",method:"POST"}],["toolRepository.getChangedConfiguration",{url:"check/tools/changed",method:"POST"}],["toolRepository.findByProject",{url:"check/tools/{project}",method:"POST"}],["toolRepository.getConfiguration",{url:"check/tools/{project}/{toolIdentifier}",method:"GET"}],["toolRepository.overwrite",{url:"check/tools/{project}/{toolIdentifier}",method:"PUT"}],["crawlerRepository.getCrawlableCollections",{url:"crawler/collections",method:"POST"}],["crawlerRepository.listCheckStatus",{url:"crawler/company/{company}/check/status",method:"GET"}],["crawlerRepository.setCheckStatus",{url:"crawler/company/{company}/check/status",method:"POST"}],["crawlerRepository.deleteCheckStatus",{url:"crawler/company/{company}/check/status/{crawlUrlStatus}",method:"DELETE"}],["crawlerRepository.listCrawlSchedules",{url:"crawler/company/{company}/schedules",method:"GET"}],["crawlerRepository.createCrawlSchedule",{url:"crawler/company/{company}/schedules",method:"POST"}],["crawlerRepository.deleteCrawlSchedule",{url:"crawler/company/{company}/schedules/{crawlSchedule}",method:"DELETE"}],["crawlerRepository.showCrawlSchedule",{url:"crawler/company/{company}/schedules/{crawlSchedule}",method:"GET"}],["crawlerRepository.updateCrawlSchedule",{url:"crawler/company/{company}/schedules/{crawlSchedule}",method:"PATCH"}],["crawlerRepository.runScheduledCrawl",{url:"crawler/company/{company}/schedules/{crawlSchedule}/crawl",method:"POST"}],["crawlerRepository.runCompanyCrawl",{url:"crawler/crawl/company/{company}",method:"POST"}],["crawlerRepository.listCompanyCrawls",{url:"crawler/crawl/company/{company}/crawls",method:"POST"}],["crawlerRepository.getCrawlerSettings",{url:"crawler/crawl/company/{company}/settings",method:"POST"}],["crawlerRepository.getCrawlCsv",{url:"crawler/crawl/detail/csv/{crawl}/{downloadSecret}",method:"GET"}],["crawlerRepository.getCrawl",{url:"crawler/crawl/detail/{crawl}",method:"POST"}],["crawlerRepository.runCrawl",{url:"crawler/crawl/{project}",method:"POST"}],["crawlerRepository.listCrawls",{url:"crawler/crawl/{project}/crawls",method:"POST"}],["crawlerRepository.abortCrawl",{url:"crawler/crawl/{project}/{crawl}",method:"PUT"}],["crawlerRepository.getCompanyCrawlerStatus",{url:"crawler/status/company/{company}",method:"POST"}],["crawlerRepository.getCrawlerStatus",{url:"crawler/status/{project}",method:"GET"}],["incidentRepository.findByCompany",{url:"incident/incidents/company/{company}/search",method:"POST"}],["incidentRepository.search",{url:"incident/incidents/{project}/search",method:"POST"}],["incidentRepository.since",{url:"incident/incidents/{project}/since",method:"POST"}],["incidentRepository.find",{url:"incident/incidents/{project}/{incident}",method:"GET"}],["incidentRepository.getConfig",{url:"incident/tools/{project}",method:"GET"}],["marketplaceRepository.getComponents",{url:"marketplace/features/components/{system}/{featureIdentifier}",method:"GET"}],["marketplaceRepository.setComponent",{url:"marketplace/features/components/{system}/{suggestionIdentifier}",method:"POST"}],["marketplaceRepository.getActiveProjectFeatures",{url:"marketplace/features/project/{project}",method:"GET"}],["marketplaceRepository.getActiveProviderFeatures",{url:"marketplace/features/provider/{providerIdentifier}",method:"GET"}],["marketplaceRepository.getHealthStatus",{url:"marketplace/features/status/{system}/{featureIdentifier}",method:"GET"}],["marketplaceRepository.getBookingLog",{url:"marketplace/log/company/{company}",method:"GET"}],["marketplaceRepository.getFavourites",{url:"marketplace/marketplace/favourites",method:"GET"}],["marketplaceRepository.activateFeature",{url:"marketplace/marketplace/feature/activate/{company}/{featureIdentifier}",method:"POST"}],["marketplaceRepository.getActiveFeatures",{url:"marketplace/marketplace/feature/active/{project}",method:"GET"}],["marketplaceRepository.getAllFeatures",{url:"marketplace/marketplace/feature/all",method:"POST"}],["marketplaceRepository.getAvailableFeatures",{url:"marketplace/marketplace/feature/available/{project}",method:"POST"}],["marketplaceRepository.deactivateFeature",{url:"marketplace/marketplace/feature/deactivate/{company}/{featureIdentifier}",method:"POST"}],["marketplaceRepository.getFeatures",{url:"marketplace/marketplace/features/{providerIdentifier}/{company}",method:"GET"}],["marketplaceRepository.getSystemPluginStatus",{url:"marketplace/plugins/incidents/system/{system}",method:"GET"}],["marketplaceRepository.getUserPluginStatus",{url:"marketplace/plugins/incidents/user/{user}",method:"GET"}],["marketplaceRepository.restProxy",{url:"marketplace/proxy/{secret}/{url}",method:"GET"}],["metricRepository.findBySystem",{url:"metric/eventidentifier/{system}/search",method:"POST"}],["componentRepository.createComponent",{url:"project/components",method:"POST"}],["componentRepository.showComponentTypes",{url:"project/components/componenttypes/{project}",method:"GET"}],["componentRepository.createComponents",{url:"project/components/many",method:"POST"}],["componentRepository.deleteComponent",{url:"project/components/{component}",method:"DELETE"}],["componentRepository.showComponents",{url:"project/components/{component}",method:"GET"}],["componentRepository.updateComponent",{url:"project/components/{component}",method:"PUT"}],["locationRepository.list",{url:"project/location/list",method:"GET"}],["projectRepository.search",{url:"project/projects/search",method:"POST"}],["projectRepository.delete",{url:"project/projects/{project}",method:"DELETE"}],["projectRepository.update",{url:"project/projects/{project}",method:"PUT"}],["screenshotRepository.getScreenshot",{url:"project/screenshot/{system}",method:"POST"}],["screenshotRepository.getSystemScreenshots",{url:"project/screenshots/{system}",method:"POST"}],["systemRepository.createSystem",{url:"project/systems/system",method:"POST"}],["systemRepository.updateSystem",{url:"project/systems/system/{system}",method:"PUT"}],["systemRepository.getSystemTypes",{url:"project/systems/{providerIdentifier}/systemType",method:"POST"}],["systemRepository.getComponentLimit",{url:"project/systems/{system}/component/limit",method:"GET"}],["systemRepository.getComponents",{url:"project/systems/{system}/components",method:"GET"}],["systemRepository.changeLastFullRun",{url:"project/systems/{system}/lastFullRun/{status}",method:"POST"}],["systemRepository.getNextLastFullRun",{url:"project/systems/{system}/nextFullRun",method:"GET"}],["systemRepository.getComponentSuggestions",{url:"project/systems/{system}/suggestions",method:"POST"}],["projectRepository.getUsers",{url:"project/users/{project}",method:"GET"}],["projectRepository.removeUser",{url:"project/users/{project}/{user}",method:"DELETE"}],["systemRepository.triggerComponentFinder",{url:"project/{project}/componentfinder/{system}/{user}/trigger",method:"POST"}],["projectRepository.getStatus",{url:"project/{project}/onboarding/status",method:"POST"}],["projectRepository.searchAll",{url:"project/{providerIdentifier}/all",method:"GET"}],["scoreRepository.getScoresByUser",{url:"score/scores/user/{user}",method:"POST"}],["scoreRepository.getScores",{url:"score/scores/{system}",method:"POST"}],["scoreRepository.getScore",{url:"score/scores/{system}/{scoreName}",method:"POST"}],["subscriptionRepository.getUserSubscriptions",{url:"subscription",method:"GET"}],["subscriptionRepository.createCheckoutSession",{url:"subscription/checkout/session",method:"POST"}],["subscriptionRepository.getCompanySubscription",{url:"subscription/company/{company}/",method:"GET"}],["subscriptionRepository.getBillingAddress",{url:"subscription/company/{company}/billingaddress",method:"GET"}],["subscriptionRepository.setBillingAddress",{url:"subscription/company/{company}/billingaddress",method:"POST"}],["subscriptionRepository.setCreditCard",{url:"subscription/company/{company}/creditcard",method:"POST"}],["subscriptionRepository.getSubscribedFeatures",{url:"subscription/company/{company}/features",method:"GET"}],["subscriptionRepository.getCompanyInvoices",{url:"subscription/company/{company}/invoices",method:"GET"}],["subscriptionRepository.setCompanyCreditCardPlans",{url:"subscription/company/{company}/plans/creditcard",method:"POST"}],["subscriptionRepository.setCompanyFreePlans",{url:"subscription/company/{company}/plans/free",method:"POST"}],["subscriptionRepository.getQuota",{url:"subscription/company/{company}/quota",method:"GET"}],["subscriptionRepository.cancelSubscription",{url:"subscription/external/{subscriptionId}",method:"DELETE"}],["subscriptionRepository.createCustomerPortalSession",{url:"subscription/portal/session",method:"POST"}],["subscriptionRepository.getSubscriptionProducts",{url:"subscription/products",method:"GET"}],["subscriptionRepository.updateSubscriptionByProject",{url:"subscription/project/{project}",method:"POST"}],["subscriptionRepository.endTrials",{url:"subscription/trial/{providerIdentifier}/end",method:"POST"}],["subscriptionRepository.setSubscriptionPlan",{url:"subscription/user/{user}/plan",method:"POST"}],["subscriptionRepository.setCompanyFreePlansByUser",{url:"subscription/user/{user}/plans/free",method:"POST"}],["clustercompanyRepository.connectUser",{url:"user/companies/connect/{company}/{user}",method:"POST"}],["clustercompanyRepository.exists",{url:"user/companies/exists",method:"GET"}],["clustercompanyRepository.findAll",{url:"user/companies/findall/{providerIdentifier}",method:"POST"}],["clustercompanyRepository.search",{url:"user/companies/search/{providerIdentifier}",method:"POST"}],["clustercompanyRepository.updateMasterId",{url:"user/companies/{company}/masterId",method:"PUT"}],["clustercompanyRepository.create",{url:"user/companies/{providerIdentifier}",method:"POST"}],["invitationRepository.abort",{url:"user/invitation/abort/{invitation}",method:"DELETE"}],["invitationRepository.invite",{url:"user/invitation/invite/{project}",method:"POST"}],["invitationRepository.getOpenInvitations",{url:"user/invitation/open/{project}",method:"GET"}],["clusteruserRepository.connectOAuthAccount",{url:"user/oauth/{user}/connect",method:"PUT"}],["usersubscriptionRepository.update",{url:"user/subscriptions/{user}",method:"PUT"}],["clusteruserRepository.activate",{url:"user/users/activate",method:"POST"}],["clusteruserRepository.isDeletable",{url:"user/users/deletable/{user}",method:"POST"}],["clusteruserRepository.deleteByEmail",{url:"user/users/delete/email",method:"DELETE"}],["clusteruserRepository.exists",{url:"user/users/exists",method:"GET"}],["clusteruserRepository.find",{url:"user/users/find",method:"GET"}],["clusteruserRepository.findAll",{url:"user/users/find/all/{providerIdentifier}",method:"POST"}],["clusteruserRepository.requestPasswordReset",{url:"user/users/password/reset/request",method:"POST"}],["clusteruserRepository.resetPassword",{url:"user/users/password/reset/{user}",method:"PUT"}],["clusteruserRepository.setPreferredLanguage",{url:"user/users/preferredLanguage/{user}",method:"PUT"}],["clusteruserRepository.create",{url:"user/users/{provider}",method:"POST"}],["clusteruserRepository.delete",{url:"user/users/{user}",method:"DELETE"}],["clusteruserRepository.updateUser",{url:"user/users/{user}",method:"PUT"}],["clusteruserRepository.updateMasterId",{url:"user/users/{user}/masterId",method:"PUT"}],["clusteruserRepository.changePassword",{url:"user/users/{user}/password",method:"PUT"}],["websocketRepository.getRooms",{url:"websockets/rooms",method:"POST"}],["websocketRepository.getAllRooms",{url:"websockets/rooms/all",method:"POST"}]]),Ih={class:"flex-1 flex"},Oh={class:"w-80 shrink-0 h-full border-r border-white/10 flex flex-col bg-white/5"},Hh={class:"p-4 border-b border-white/10"},Fh={class:"relative"},Dh={class:"flex-1 overflow-auto pb-12"},Mh={class:"p-4 border-b border-white/10"},jh={class:"flex gap-2"},Nh={key:0,class:"p-4 border-b border-white/10"},Gh=["value"],zh={key:1,class:"p-4"},Uh=["value"],Kh={class:"p-4 border-b border-white/10"},Wh={class:"grid grid-cols-2 gap-2 text-xs"},qh={class:"bg-white/5 rounded p-2"},Vh={class:"font-medium"},Yh={class:"bg-white/5 rounded p-2"},Jh={class:"font-medium"},Xh={class:"bg-white/5 rounded p-2"},Qh={class:"font-medium text-green-400"},Zh={class:"bg-white/5 rounded p-2"},em={class:"font-medium text-red-400"},tm={class:"bg-white/5 rounded p-2"},sm={class:"font-medium text-yellow-400"},om={class:"bg-white/5 rounded p-2"},nm={class:"font-medium"},rm={class:"flex-1 flex flex-col"},am={class:"flex items-center justify-between p-4 border-b border-white/10 bg-white/5"},im={class:"flex items-center gap-3"},lm={class:"flex items-center gap-2"},cm={class:"text-xs opacity-60 bg-purple-500/20 px-2 py-0.5 rounded-full"},um={class:"flex items-center gap-2"},dm={class:"flex-1 overflow-auto pb-10"},pm={key:0,class:"text-center py-8 opacity-60"},hm={key:1,class:"space-y-1 p-4"},mm={class:"flex items-start justify-between gap-3 mb-2"},fm={class:"flex items-center gap-2 flex-wrap"},gm={class:"px-2 py-1 rounded text-xs font-medium bg-purple-500/20 text-purple-200"},vm={class:"flex items-center gap-1"},bm={class:"text-xs text-white/50"},ym={key:0,class:"text-xs text-white/40"},xm=["title"],_m={class:"flex items-center gap-2"},wm={class:"flex items-center gap-2 text-xs text-white/50"},km={key:0},Sm=["onClick"],Cm={key:0,class:"mb-2"},$m={class:"flex items-start gap-4 text-xs"},Am={class:"text-white/80 font-mono text-xs break-all"},Em={key:1,class:"space-y-2"},Tm={key:0,class:"flex items-start gap-4 text-xs"},Lm={class:"text-white/80 font-mono text-xs break-all"},Bm={key:1,class:"flex items-start gap-4 text-xs"},Pm={class:"flex items-center gap-2"},Rm={class:"px-1.5 py-0.5 rounded text-xs font-medium bg-blue-500/20 text-blue-200"},Im={class:"text-white/80 font-mono text-xs break-all"},Om={key:2,class:"flex items-start gap-4 text-xs"},Hm={class:"text-white/80 font-mono text-xs break-all"},Fm={key:3,class:"flex items-start gap-4 text-xs"},Dm=["innerHTML"],Mm={key:4,class:"flex items-start gap-4 text-xs"},jm={class:"text-red-300 font-mono text-xs"},Nm=ue({__name:"SddTabApi",setup(e){const t=N([]),s=N([]),o=N({}),n=N(""),r=N([]),l=N(""),u=N(""),d=N("desc"),c=N(yn()),h=Y(()=>{const I=new Set(t.value.map(B=>B.repository).filter(Boolean));return Array.from(I).sort()}),f=Y(()=>{const I=new Set(t.value.map(B=>B.component).filter(Boolean));return Array.from(I).sort()}),m=Y(()=>{let I=t.value;if(n.value.trim()){const B=n.value.toLowerCase();I=I.filter(A=>A.repository.toLowerCase().includes(B)||A.method.toLowerCase().includes(B)||A.source.toLowerCase().includes(B)||A.route?.toLowerCase().includes(B)||A.component?.toLowerCase().includes(B)||A.sourceLocation?.toLowerCase().includes(B))}return r.value.length>0&&(I=I.filter(B=>r.value.includes(B.repository)||r.value.includes(`${B.repository}.${B.method}`)||r.value.includes(`source:${B.source}`)||B.route&&r.value.includes(`route:${B.route}`)||B.component&&r.value.includes(`component:${B.component}`)||B.responseStatus&&r.value.includes(`status:${B.responseStatus}`))),l.value&&(I=I.filter(B=>B.repository===l.value)),u.value&&(I=I.filter(B=>B.component===u.value)),I.sort((B,A)=>d.value==="desc"?A.timestamp-B.timestamp:B.timestamp-A.timestamp)}),g=()=>{t.value=Ka(),s.value=Wa(),o.value=qa(),c.value=yn()},b=()=>{Va(),g()},w=()=>{n.value="",r.value=[],l.value="",u.value=""},y=I=>{const B=new Date(I);return B.toLocaleTimeString()+"."+B.getMilliseconds().toString().padStart(3,"0")},S=I=>{Ya(I),g()},C=I=>{if(!I)return"";const B=I.match(/at\s+(?:[^()]+\s*\()?([^)]+)\)?/);return((B?B[1]:I)||I).replace(/^https?:\/\/[^/]+\/_nuxt\//,"").replace(/\?.*$/,"").replace(/:\d+:\d+$/,"")},R=(I,B)=>{const A=I.replace(/([A-Z])/g,(O,Z,L)=>O.toLowerCase()).toLowerCase()+"Repository";let j=`${I}.${B}`,H=Eo.get(j);if(H||(j=`${A}.${B}`,H=Eo.get(j)),!H){const O=`${I.toLowerCase()}.${B.toLowerCase()}`,Z=`${A.toLowerCase()}.${B.toLowerCase()}`;for(const[L,se]of Eo.entries()){const k=L.toLowerCase();if(k===O||k===Z){H=se;break}}}return H?{url:H.url,httpMethod:H.method}:null},F=I=>{switch(I){case"success":return"bg-green-500/20 text-green-200";case"error":return"bg-red-500/20 text-red-200";case"pending":return"bg-yellow-500/20 text-yellow-200";default:return"bg-gray-500/20 text-gray-200"}},M=I=>{switch(I){case"component":return"๐งฉ";case"composable":return"๐ง";case"store":return"๐ฆ";case"middleware":return"๐ก๏ธ";case"plugin":return"๐";default:return"โ"}};let U=null;return kt(()=>{g(),U=ar(g,2e3)}),no(()=>{U&&clearInterval(U)}),(I,B)=>(p(),v("div",Ih,[a("div",Oh,[a("div",Hh,[a("div",Fh,[be(a("input",{"onUpdate:modelValue":B[0]||(B[0]=A=>n.value=A),type:"text",placeholder:"Search API calls...","aria-label":"Search API calls",class:"w-full pl-9 pr-3 py-2.5 rounded-lg bg-white/10 placeholder-white/50 text-sm outline-none focus:ring-2 focus:ring-blue-400/50 transition-all"},null,512),[[Rt,n.value]]),B[7]||(B[7]=a("svg",{class:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))])]),a("div",Dh,[a("div",Mh,[B[8]||(B[8]=a("h4",{class:"text-xs font-medium text-white/70 mb-2"}," Sort Order ",-1)),a("div",jh,[a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",d.value==="desc"?"bg-purple-500/20 text-purple-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:B[1]||(B[1]=A=>d.value="desc")}," Newest First ",2),a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",d.value==="asc"?"bg-purple-500/20 text-purple-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:B[2]||(B[2]=A=>d.value="asc")}," Oldest First ",2)])]),h.value.length>0?(p(),v("div",Nh,[B[10]||(B[10]=a("h4",{id:"api-repositories-filter-label",class:"text-xs font-medium text-white/70 mb-2"}," Repositories ",-1)),be(a("select",{"onUpdate:modelValue":B[3]||(B[3]=A=>l.value=A),"aria-labelledby":"api-repositories-filter-label",class:"w-full px-3 py-2 rounded-lg bg-white/10 text-sm outline-none focus:ring-2 focus:ring-purple-400/50"},[B[9]||(B[9]=a("option",{value:""}," All Repositories ",-1)),(p(!0),v(oe,null,ce(h.value,A=>(p(),v("option",{key:A,value:A},E(A),9,Gh))),128))],512),[[vs,l.value]])])):T("",!0),f.value.length>0?(p(),v("div",zh,[B[12]||(B[12]=a("h4",{id:"api-components-filter-label",class:"text-xs font-medium text-white/70 mb-2"}," Components ",-1)),be(a("select",{"onUpdate:modelValue":B[4]||(B[4]=A=>u.value=A),"aria-labelledby":"api-components-filter-label",class:"w-full px-3 py-2 rounded-lg bg-white/10 text-sm outline-none focus:ring-2 focus:ring-purple-400/50"},[B[11]||(B[11]=a("option",{value:""}," All Components ",-1)),(p(!0),v(oe,null,ce(f.value,A=>(p(),v("option",{key:A,value:A},E(A),9,Uh))),128))],512),[[vs,u.value]])])):T("",!0),a("div",Kh,[B[19]||(B[19]=a("h4",{class:"text-xs font-medium text-white/70 mb-2"}," Statistics ",-1)),a("div",Wh,[a("div",qh,[B[13]||(B[13]=a("div",{class:"text-white/50"}," Total ",-1)),a("div",Vh,E(c.value.totalCalls),1)]),a("div",Yh,[B[14]||(B[14]=a("div",{class:"text-white/50"}," Repos ",-1)),a("div",Jh,E(c.value.uniqueRepositories),1)]),a("div",Xh,[B[15]||(B[15]=a("div",{class:"text-white/50"}," Success ",-1)),a("div",Qh,E(c.value.successCount),1)]),a("div",Zh,[B[16]||(B[16]=a("div",{class:"text-white/50"}," Errors ",-1)),a("div",em,E(c.value.errorCount),1)]),a("div",tm,[B[17]||(B[17]=a("div",{class:"text-white/50"}," Pending ",-1)),a("div",sm,E(c.value.pendingCount),1)]),a("div",om,[B[18]||(B[18]=a("div",{class:"text-white/50"}," Avg Time ",-1)),a("div",nm,E(c.value.averageResponseTime)+"ms ",1)])])])])]),a("div",rm,[a("div",am,[a("div",im,[a("div",lm,[B[20]||(B[20]=a("div",{class:"flex items-center gap-2 px-3 py-2 rounded-lg bg-purple-500/20 text-purple-200"},[a("div",{class:"w-2 h-2 rounded-full bg-purple-400"}),a("span",{class:"text-sm font-medium"},"API Debug")],-1)),a("span",cm,E(m.value.length)+" / "+E(t.value.length),1)])]),a("div",um,[a("button",{class:"px-3 py-1.5 rounded-lg bg-red-500/20 hover:bg-red-500/30 text-xs font-medium transition-colors",onClick:B[5]||(B[5]=A=>b())}," Clear All "),a("button",{class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:B[6]||(B[6]=A=>w())}," Clear Filters ")])]),a("div",dm,[m.value.length===0?(p(),v("div",pm,[...B[21]||(B[21]=[a("div",{class:"text-2xl mb-2"}," ๐ ",-1),a("div",{class:"text-sm"}," No API calls found ",-1),a("div",{class:"text-xs text-white/50 mt-1"}," API calls will appear here when made through KAPI ",-1)])])):(p(),v("div",hm,[(p(!0),v(oe,null,ce(m.value,A=>(p(),v("div",{key:A.id,class:"bg-white/5 rounded-lg p-3 o_border border-white/10 hover:bg-white/10 transition-colors group"},[a("div",mm,[a("div",fm,[a("span",gm,E(A.repository)+"."+E(A.method),1),a("div",vm,[a("span",bm,E(y(A.timestamp)),1),A.responseTime?(p(),v("span",ym,"("+E(A.responseTime)+"ms)",1)):T("",!0)]),a("span",{class:D(["px-1.5 py-0.5 rounded text-xs font-medium",F(A.responseStatus)])},E(A.responseStatus?.toUpperCase()||"UNKNOWN"),3),A.duplicateCount>1?(p(),v("span",{key:0,class:"px-1.5 py-0.5 rounded text-xs bg-yellow-500/20 text-yellow-200",title:`This call occurred ${A.duplicateCount} times within 500ms`},"ร"+E(A.duplicateCount),9,xm)):T("",!0)]),a("div",_m,[a("div",wm,[A.component?(p(),v("span",km,"๐งฉ "+E(A.component),1)):T("",!0),a("span",null,E(M(A.source))+" "+E(A.source),1)]),a("button",{class:"opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-red-500/20 text-red-400 hover:text-red-300",title:"Delete this entry",onClick:j=>S(A.id)},[...B[22]||(B[22]=[a("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Sm)])]),A.route?(p(),v("div",Cm,[a("div",$m,[B[23]||(B[23]=a("span",{class:"text-white/50 shrink-0"},"on Page:",-1)),a("span",Am,E(A.route),1)])])):T("",!0),A.sourceLocation||A.url||A.parameters||A.errorMessage?(p(),v("div",Em,[A.sourceLocation?(p(),v("div",Tm,[B[24]||(B[24]=a("span",{class:"text-white/50 shrink-0"},"Location:",-1)),a("span",Lm,E(C(A.sourceLocation)),1)])):T("",!0),R(A.repository,A.method)?(p(),v("div",Bm,[B[25]||(B[25]=a("span",{class:"text-white/50 shrink-0"},"REST URL:",-1)),a("div",Pm,[a("span",Rm,E(R(A.repository,A.method)?.httpMethod),1),a("span",Im,E(R(A.repository,A.method)?.url),1)])])):T("",!0),A.url?(p(),v("div",Om,[B[26]||(B[26]=a("span",{class:"text-white/50 shrink-0"},"URL:",-1)),a("span",Hm,E(A.url),1)])):T("",!0),A.parameters?(p(),v("div",Fm,[B[27]||(B[27]=a("span",{class:"text-white/50 shrink-0"},"Params:",-1)),a("pre",{class:"text-white/80 font-mono text-xs bg-black/20 p-2 rounded overflow-auto w-full",innerHTML:i(rt)(JSON.stringify(A.parameters,null,2))},null,8,Dm)])):T("",!0),A.errorMessage?(p(),v("div",Mm,[B[28]||(B[28]=a("span",{class:"text-white/50 shrink-0"},"Error:",-1)),a("span",jm,E(A.errorMessage),1)])):T("",!0)])):T("",!0)]))),128))]))])])]))}}),Gm=Object.assign(Nm,{__name:"SddTabApi"}),zm={class:"relative"},Um=["value","placeholder","aria-label"],Km=ue({__name:"SddSearchbar",props:{modelValue:{},placeholder:{},ariaLabel:{},icon:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,o=t;return(n,r)=>{const l=xe;return p(),v("div",zm,[a("input",{value:s.modelValue,type:"text",placeholder:s.placeholder||"Search...","aria-label":s.ariaLabel||"Search",class:"w-full pl-9 pr-3 py-2.5 rounded-lg bg-white/10 placeholder-white/50 text-sm outline-none focus:ring-2 focus:ring-blue-400/50 transition-all",onInput:r[0]||(r[0]=u=>o("update:modelValue",u.target.value))},null,40,Um),q(l,{name:s.icon||"i-heroicons-magnifying-glass-20-solid",class:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50"},null,8,["name"])])}}}),Wm=Object.assign(Km,{__name:"SddSearchbar"}),qm={class:"space-y-1"},Vm=["onClick"],Ym={class:"flex items-center justify-between mb-1"},Jm={class:"flex items-center gap-3 text-xs opacity-70"},Xm=ue({__name:"SddEntrySelector",props:{items:{},selectedId:{},getId:{type:Function},getLabel:{type:Function}},emits:["select"],setup(e,{emit:t}){const s=e,o=t,n=l=>s.getId?s.getId(l):String(l),r=l=>s.getLabel?s.getLabel(l):String(l);return(l,u)=>(p(),v("div",qm,[(p(!0),v(oe,null,ce(s.items,d=>(p(),v("button",{key:n(d),class:D(["w-full text-left p-3 rounded-lg transition-all duration-200 group",[s.selectedId===n(d)?"bg-blue-500/20 o_border border-blue-400/30 shadow-lg":"bg-white/5 hover:bg-white/10 o_border border-transparent"]]),onClick:c=>o("select",n(d),d)},[a("div",Ym,[a("span",{class:D(["font-medium text-sm truncate",s.selectedId===n(d)?"text-blue-200":"text-white"])},[le(l.$slots,"label",{item:d,isActive:s.selectedId===n(d)},()=>[de(E(r(d)),1)])],2),a("div",{class:D(["w-2 h-2 rounded-full transition-colors",s.selectedId===n(d)?"bg-blue-400":"bg-white/30"])},[le(l.$slots,"indicator",{item:d,isActive:s.selectedId===n(d)})],2)]),a("div",Jm,[le(l.$slots,"meta",{item:d,isActive:s.selectedId===n(d)})])],10,Vm))),128))]))}}),Qm=Object.assign(Xm,{__name:"SddEntrySelector"});function Zm(){const e=Y(()=>ir().payload?.data??{}),t=Y(()=>Object.keys(e.value).sort()),s=vo("sdd-payload-search",()=>""),o=vo("sdd-payload-selected-key",()=>""),n=Y(()=>{const g=s.value.trim().toLowerCase();let b=t.value;return b=b.filter(w=>{const y=u.value[w],S=w.startsWith("mdc-");return y>0&&!S}),g?b.filter(w=>w.toLowerCase().includes(g)):b}),r=Y(()=>o.value?e.value[o.value]:null),l=Y(()=>{const g=r.value;if(!g||typeof g!="object"||g===null)return g;const{expiredAt:b,...w}=g;return w}),u=Y(()=>{const g=e.value,b=new TextEncoder,w={};for(const y of Object.keys(g))try{w[y]=b.encode(JSON.stringify(g[y])).length}catch{w[y]=0}return w}),d=g=>e.value[g],c=g=>{const b=d(g);let w=null;const y=b?.expiresAt;if(y&&(w=y instanceof Date?y:new Date(y),isNaN(w.getTime())&&(w=null)),!w)return{expiresAt:null,remainingMs:null,expired:!1};const S=w.getTime()-Date.now();return{expiresAt:w,remainingMs:S,expired:S<=0}},h=g=>{const b=Math.max(0,Math.floor(g/1e3)),w=Math.floor(b/86400),y=Math.floor(b%86400/3600),S=Math.floor(b%3600/60),C=b%60;return w>0?`${w}d ${y}h`:y>0?`${y}h ${S}m`:S>0?`${S}m ${C}s`:`${C}s`},f=g=>g.toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),m=vo("sdd-payload-json-filter",()=>"");return{nuxtPayloadKeys:t,payloadSearch:s,payloadSelectedKey:o,filteredPayloadKeys:n,currentPayloadValue:r,currentPayloadValueWithoutExpiredAt:l,nuxtPayloadSizes:u,getPayloadExpiryInfo:c,formatDurationShort:h,formatExpiryDate:f,jsonFilter:m}}const e0={class:"flex-1 flex overflow-hidden"},t0={class:"w-80 shrink-0 h-full border-r border-white/10 flex flex-col bg-white/5"},s0={class:"p-4 border-b border-white/10"},o0={class:"flex-1 overflow-auto p-2"},n0={class:"truncate"},r0={key:0,class:"flex items-center gap-1"},a0={class:"text-[11px] px-1.5 py-0.5 rounded bg-white/10"},i0={key:1,class:"text-[11px] px-1.5 py-0.5 rounded bg-red-500/30 text-red-200"},l0={key:0,class:"text-center py-8 opacity-60 text-sm"},c0={class:"flex-1 flex flex-col w-[calc(100%-320px)]"},u0={class:"p-4 border-b border-white/10 bg-white/5"},d0={class:"flex items-center justify-between"},p0={class:"flex items-center gap-3"},h0={class:"text-xs opacity-60 bg-sky-500/20 px-2 py-0.5 rounded-full"},m0={class:"flex items-center gap-2 flex-1 justify-end"},f0={class:"text-xs opacity-80"},g0={class:"flex-1 overflow-auto pb-10"},v0={key:0,class:"p-6 text-sm text-white/70"},b0={key:1,class:"h-full flex flex-col"},y0={class:"p-4 border-b border-white/10 flex items-center justify-between bg-white/5"},x0={class:"relative flex-1 max-w-md"},_0={class:"flex-1 overflow-auto p-4"},w0=["innerHTML"],k0=ue({__name:"SddTabPayload",setup(e){const{payloadSearch:t,payloadSelectedKey:s,filteredPayloadKeys:o,currentPayloadValueWithoutExpiredAt:n,nuxtPayloadSizes:r,getPayloadExpiryInfo:l,formatDurationShort:u,formatExpiryDate:d,jsonFilter:c}=Zm(),h=Y(()=>{const m=n.value;if(!m)return"";const g=so(m,c.value);return Yo(Vt(g))});async function f(){const m=n.value;if(!m)return;const g=so(m,c.value);try{await navigator.clipboard.writeText(ys(g))}catch{}}return(m,g)=>{const b=Wm,w=Qm,y=xe;return p(),v("div",e0,[a("div",t0,[a("div",s0,[q(b,{modelValue:i(t),"onUpdate:modelValue":g[0]||(g[0]=S=>Ge(t)?t.value=S:null),placeholder:"Search payload keys...","aria-label":"Search payload keys"},null,8,["modelValue"])]),a("div",o0,[q(w,{items:i(o),"selected-id":i(s),onSelect:g[1]||(g[1]=S=>s.value=S)},{label:z(({item:S})=>[a("span",n0,E(S),1)]),meta:z(({item:S})=>[i(r)[S]!==void 0?(p(),v("span",r0,[g[4]||(g[4]=a("div",{class:"w-1.5 h-1.5 rounded-full bg-white/40"},null,-1)),a("span",a0,E(i(r)[S])+" B",1)])):T("",!0),i(l)(S).expiresAt&&i(l)(S).expired?(p(),v("span",i0," expired ")):T("",!0)]),_:1},8,["items","selected-id"]),i(o).length===0?(p(),v("div",l0," No payload keys ")):T("",!0)])]),a("div",c0,[a("div",u0,[a("div",d0,[a("div",p0,[g[5]||(g[5]=a("div",{class:"flex items-center gap-2 px-3 py-2 rounded-lg bg-sky-500/20 text-sky-200"},[a("div",{class:"w-2 h-2 rounded-full bg-sky-400"}),a("span",{class:"text-sm font-medium"},"Nuxt Payload")],-1)),a("span",h0,E(i(o).length),1)]),a("div",m0,[i(s)&&i(l)(i(s)).expiresAt?(p(),v(oe,{key:0},[a("span",f0,E(i(d)(i(l)(i(s)).expiresAt)),1),a("span",{class:D(["text-xs px-2 py-1 rounded",i(l)(i(s)).expired?"bg-red-500/30 text-red-200":"bg-emerald-500/20 text-emerald-200"])},E(i(l)(i(s)).expired?`expired ${i(u)(Math.abs(i(l)(i(s)).remainingMs||0))} ago`:`expires in ${i(u)(i(l)(i(s)).remainingMs||0)}`),3)],64)):T("",!0),a("button",{class:"px-3 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:f}," Copy ")])])]),a("div",g0,[i(s)?(p(),v("div",b0,[a("div",y0,[a("div",x0,[be(a("input",{"onUpdate:modelValue":g[2]||(g[2]=S=>Ge(c)?c.value=S:null),type:"text",placeholder:"Filter JSON by key/path (* wildcard supported)","aria-label":"Filter JSON",class:"w-full pl-8 pr-3 py-1.5 rounded-lg bg-white/10 placeholder-white/50 text-xs outline-none focus:ring-2 focus:ring-blue-400/50 transition-all"},null,512),[[Rt,i(c)]]),q(y,{name:"i-heroicons-funnel",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3 h-3 text-white/50"})]),a("button",{class:"px-3 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:g[3]||(g[3]=S=>c.value="")}," Clear ")]),a("div",_0,[a("pre",{class:"text-xs leading-tight font-mono whitespace-pre bg-black/20 o_p-4",innerHTML:i(h)},null,8,w0)])])):(p(),v("div",v0," Select a payload key from the left. "))])])])}}}),S0=Object.assign(k0,{__name:"SddTabPayload"}),C0={class:"flex h-full flex-row"},$0={class:"w-80 shrink-0 h-full border-r border-white/10 flex flex-col bg-white/5 overflow-y-auto pb-12"},A0={class:"p-4 border-b border-white/10"},E0={class:"relative mb-4"},T0={class:"px-4 py-3 border-b border-white/10"},L0={class:"flex gap-2"},B0={class:"px-4 py-3 border-b border-white/10"},P0={class:"space-y-1"},R0={class:"text-xs bg-white/20 px-2 py-0.5 rounded-full"},I0={class:"text-xs bg-white/20 px-2 py-0.5 rounded-full"},O0={class:"text-xs bg-white/20 px-2 py-0.5 rounded-full"},H0={class:"px-4 py-3 border-b border-white/10"},F0={class:"text-xs text-white/50 space-y-1"},D0={key:0},M0={class:"flex-1 flex flex-col"},j0={class:"flex items-center justify-between p-4 border-b border-white/10 bg-white/5"},N0={class:"flex items-center gap-3"},G0={class:"flex items-center gap-2"},z0={class:"text-xs opacity-60 bg-white/10 px-2 py-0.5 rounded-full"},U0={class:"flex-1 overflow-hidden pb-10"},K0={key:0,class:"text-center py-8 opacity-60"},W0={key:1,class:"text-center py-8 opacity-60"},q0={key:2,class:"space-y-3 p-4 overflow-auto h-full"},V0={class:"flex items-center justify-between p-4 o_border-b border-white/10"},Y0={class:"flex items-center gap-3"},J0={class:"text-xs font-mono"},X0={key:0,class:"flex items-center gap-2 text-xs text-white/50"},Q0={class:"flex items-center gap-2"},Z0=["onClick"],ef=["onClick"],tf={key:0,class:"px-4 pb-4"},sf={key:0,class:"mb-2"},of={class:"text-[11px] whitespace-pre-wrap bg-black/20 p-2 rounded"},nf={class:"space-y-1 max-h-60 overflow-auto"},rf={class:"text-[11px] flex-1"},af={class:"flex items-center gap-2 mb-1 text-white/50"},lf=["innerHTML"],cf={class:"flex flex-col gap-1 pl-2"},uf=["onClick"],df=["onClick"],pf=ue({__name:"SddTabTracker",props:{piniaTrackedConfigs:{},piniaTrackHistories:{},trackExpanded:{},formatTrackTimestamp:{type:Function},stringifyPretty:{type:Function},highlightJson:{type:Function},getDiffText:{type:Function},toggleTrackExpanded:{type:Function},toggleSelectForDiff:{type:Function},isEntrySelectedForDiff:{type:Function},removeTracking:{type:Function},removeTrackingEntry:{type:Function}},setup(e){const t=e,s=N(""),o=N("all"),n=N("newest"),{formatShortElapsed:r}=cn(),l=d=>d==="getter"?{border:"border-yellow-500/30",bg:"bg-yellow-500/10",label:"bg-yellow-500/20 text-yellow-200",text:"getter"}:{border:"border-green-500/30",bg:"bg-green-500/10",label:"bg-green-500/20 text-green-200",text:"state"},u=Y(()=>{let d=t.piniaTrackedConfigs;if(s.value.trim()){const c=s.value.toLowerCase().trim();d=d.filter(h=>h.storeId.toLowerCase().includes(c)||h.path.toLowerCase().includes(c))}return o.value!=="all"&&(d=d.filter(c=>c.type===o.value)),d.sort((c,h)=>{const f=t.piniaTrackHistories[c.id]?.[0]?.timestamp??0,m=t.piniaTrackHistories[h.id]?.[0]?.timestamp??0;return n.value==="newest"?m-f:f-m})});return(d,c)=>(p(),v("div",C0,[a("div",$0,[a("div",A0,[a("div",E0,[be(a("input",{"onUpdate:modelValue":c[0]||(c[0]=h=>Ge(s)?s.value=h:null),type:"text",placeholder:"Search tracker entries...","aria-label":"Search tracker entries",class:"w-full pl-9 pr-3 py-2.5 rounded-lg bg-white/10 placeholder-white/50 text-sm outline-none focus:ring-2 focus:ring-blue-400/50 transition-all"},null,512),[[Rt,i(s)]]),c[6]||(c[6]=a("svg",{class:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))])]),a("div",T0,[c[7]||(c[7]=a("div",{class:"text-sm font-medium text-white/70 mb-2"}," Sort Order ",-1)),a("div",L0,[a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(n)==="newest"?"bg-blue-500/30 text-blue-200":"bg-white/10 text-white/70 hover:bg-white/20"]),onClick:c[1]||(c[1]=h=>n.value="newest")}," Newest First ",2),a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(n)==="oldest"?"bg-blue-500/30 text-blue-200":"bg-white/10 text-white/70 hover:bg-white/20"]),onClick:c[2]||(c[2]=h=>n.value="oldest")}," Oldest First ",2)])]),a("div",B0,[c[11]||(c[11]=a("div",{class:"text-sm font-medium text-white/70 mb-2"}," Groups ",-1)),a("div",P0,[a("button",{class:D(["w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm transition-colors",i(o)==="all"?"bg-emerald-500/20 text-emerald-200":"bg-white/10 text-white/70 hover:bg-white/20"]),onClick:c[3]||(c[3]=h=>o.value="all")},[c[8]||(c[8]=a("span",null,"All Types",-1)),a("span",R0,E(e.piniaTrackedConfigs.length),1)],2),a("button",{class:D(["w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm transition-colors",i(o)==="state"?"bg-green-500/20 text-green-200":"bg-white/10 text-white/70 hover:bg-white/20"]),onClick:c[4]||(c[4]=h=>o.value="state")},[c[9]||(c[9]=a("span",null,"state",-1)),a("span",I0,E(e.piniaTrackedConfigs.filter(h=>h.type==="state").length),1)],2),a("button",{class:D(["w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm transition-colors",i(o)==="getter"?"bg-yellow-500/20 text-yellow-200":"bg-white/10 text-white/70 hover:bg-white/20"]),onClick:c[5]||(c[5]=h=>o.value="getter")},[c[10]||(c[10]=a("span",null,"getter",-1)),a("span",O0,E(e.piniaTrackedConfigs.filter(h=>h.type==="getter").length),1)],2)])]),a("div",H0,[c[12]||(c[12]=a("div",{class:"text-sm font-medium text-white/70 mb-2"}," Stats ",-1)),a("div",F0,[a("div",null,"Showing "+E(i(u).length)+" of "+E(e.piniaTrackedConfigs.length)+" trackers",1),i(s).trim()?(p(),v("div",D0,' Search: "'+E(i(s))+'" ',1)):T("",!0)])])]),a("div",M0,[a("div",j0,[a("div",N0,[a("div",G0,[c[13]||(c[13]=a("div",{class:"flex items-center gap-2 px-3 py-2 rounded-lg bg-emerald-500/20 text-emerald-200"},[a("div",{class:"w-2 h-2 rounded-full bg-emerald-400"}),a("span",{class:"text-sm font-medium"},"Value Tracker")],-1)),a("span",z0,E(i(u).length)+" / "+E(e.piniaTrackedConfigs.length)+" active ",1)])])]),a("div",U0,[e.piniaTrackedConfigs.length===0?(p(),v("div",K0,[...c[14]||(c[14]=[a("div",{class:"text-2xl mb-2"}," ๐งญ ",-1),a("div",{class:"text-sm"}," No tracked values yet ",-1),a("div",{class:"text-xs text-white/50 mt-1"},' Add paths from the Store tabs (State/Getters/Actions) using "Add to Value Tracker" ',-1)])])):i(u).length===0?(p(),v("div",W0,[...c[15]||(c[15]=[a("div",{class:"text-2xl mb-2"}," ๐ ",-1),a("div",{class:"text-sm"}," No matching trackers found ",-1),a("div",{class:"text-xs text-white/50 mt-1"}," Try adjusting your search or filter criteria ",-1)])])):(p(),v("div",q0,[(p(!0),v(oe,null,ce(i(u),h=>(p(),v("div",{key:h.id,class:D(["bg-white/5 rounded-lg o_border border-white/10 hover:bg-white/8 transition-colors",l(h.type).border])},[a("div",V0,[a("div",Y0,[a("span",{class:D(["px-3 py-1.5 rounded-lg text-sm font-medium",[l(h.type).bg,l(h.type).text]])},E(h.storeId),3),a("span",J0,E(h.path),1),e.piniaTrackHistories[h.id]?.[0]?(p(),v("div",X0,[a("span",null,E(i(r)(e.piniaTrackHistories[h.id]?.[0]?.timestamp??0)),1),c[16]||(c[16]=a("span",{class:"opacity-40"},"โข",-1)),a("span",null,E(e.formatTrackTimestamp(e.piniaTrackHistories[h.id]?.[0]?.timestamp??0)),1)])):T("",!0)]),a("div",Q0,[a("button",{class:"px-2 py-1 rounded text-xs bg-white/10 hover:bg-white/20 text-white/70 hover:text-white/90 transition-colors",onClick:f=>e.toggleTrackExpanded(h.id)},E(e.trackExpanded[h.id]?"Hide":"Show"),9,Z0),a("button",{class:"p-1.5 rounded hover:bg-red-500/20 text-red-400 hover:text-red-300 transition-colors",title:"Remove tracker",onClick:f=>e.removeTracking(h.id)},[...c[17]||(c[17]=[a("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,ef)])]),e.trackExpanded[h.id]?(p(),v("div",tf,[e.getDiffText(h.id)?(p(),v("div",sf,[a("pre",of,E(e.getDiffText(h.id)),1)])):T("",!0),a("div",nf,[(p(!0),v(oe,null,ce(e.piniaTrackHistories[h.id],f=>(p(),v("div",{key:f.id,class:"flex items-start justify-between bg-black/10 rounded p-2"},[a("div",rf,[a("div",af,[a("span",null,E(i(r)(f.timestamp)),1),c[18]||(c[18]=a("span",{class:"opacity-40"},"โข",-1)),a("span",null,E(e.formatTrackTimestamp(f.timestamp)),1)]),a("pre",{class:"text-[11px] font-mono whitespace-pre-wrap",innerHTML:e.highlightJson?e.highlightJson(e.stringifyPretty(f.value)):e.stringifyPretty(f.value)},null,8,lf)]),a("div",cf,[(e.piniaTrackHistories[h.id]?.length||0)>1?(p(),v("button",{key:0,class:D(["px-2 py-1 rounded text-[11px]",e.isEntrySelectedForDiff?.(h.id,f.id)?"bg-emerald-500/30 text-emerald-100":"bg-white/10"]),onClick:m=>e.toggleSelectForDiff(h.id,f.id)},E(e.isEntrySelectedForDiff?.(h.id,f.id)?"Selected":"Diff"),11,uf)):T("",!0),a("button",{class:"px-2 py-1 rounded bg-red-500/20 text-[11px]",onClick:m=>e.removeTrackingEntry(h.id,f.id)}," Delete ",8,df)])]))),128))])])):T("",!0)],2))),128))]))])])]))}}),hf=Object.assign(pf,{__name:"SddTabTracker"}),mf=new Map,Nn=(e,t,s,o,n)=>{},ms=(e,t)=>{const s=`${t}-${e}`;return mf.get(s)},Vr="sdd:policy:controlledPaths:";function ff(e){return Array.from(new Set(e))}function Xo(e,t,s){const o=e.policyFeature&&String(e.policyFeature).startsWith("page:")?String(e.policyFeature):t;if(o&&e.path&&(s.has(o)||s.set(o,new Set),s.get(o).add(e.path)),e.children?.length)for(const n of e.children)Xo(n,o,s)}function Yr(){const e=new Map;for(const s of Ja)Xo(s,null,e);for(const s of sr)Xo(s,null,e);const t={};return e.forEach((s,o)=>{t[o]=ff(Array.from(s))}),t}function gf(e){return Yr()[String(e)]||[]}function Jr(e){if(typeof sessionStorage>"u")return null;try{const t=sessionStorage.getItem(Vr+String(e));return t?JSON.parse(t):null}catch{return null}}function vf(e){const t=Jr(e);if(t)return t;const s=gf(e);try{typeof sessionStorage<"u"&&sessionStorage.setItem(Vr+String(e),JSON.stringify(s))}catch{}return s}const bf={class:"flex-1 flex"},yf={class:"w-80 shrink-0 h-full border-r border-white/10 flex flex-col bg-white/5"},xf={class:"p-4 border-b border-white/10"},_f={class:"relative"},wf=["value"],kf={class:"overflow-y-auto pb-10"},Sf={class:"p-4 border-b border-white/10"},Cf={class:"flex gap-2"},$f={class:"p-4 border-b border-white/10"},Af={class:"flex gap-2"},Ef={class:"p-4 border-b border-white/10"},Tf={for:"policies-track-usage",class:"flex items-center gap-2 text-xs cursor-pointer select-none"},Lf=["checked"],Bf={class:"p-4 border-b border-white/10"},Pf={for:"policies-show-controlled-paths",class:"flex items-center gap-2 text-xs cursor-pointer select-none"},Rf=["checked"],If={class:"p-4 border-b border-white/10"},Of={class:"grid grid-cols-2 gap-3 mb-4"},Hf={class:"bg-white/5 rounded-lg p-3 o_border border-white/10"},Ff={class:"text-lg font-semibold text-white"},Df={class:"bg-white/5 rounded-lg p-3 o_border border-white/10"},Mf={class:"text-lg font-semibold text-white"},jf={class:"bg-white/5 rounded-lg p-3 o_border border-white/10"},Nf={class:"text-lg font-semibold text-green-400"},Gf={class:"bg-white/5 rounded-lg p-3 o_border border-white/10"},zf={class:"text-lg font-semibold text-red-400"},Uf={class:"space-y-3"},Kf={class:"bg-white/5 rounded-lg p-3 o_border border-white/10"},Wf={class:"text-xs text-purple-400/80 font-medium mb-2"},qf={class:"flex justify-between text-xs"},Vf={class:"text-green-400/70"},Yf={class:"text-green-400 font-medium"},Jf={class:"text-red-400/70"},Xf={class:"text-red-400 font-medium"},Qf={class:"bg-white/5 rounded-lg p-3 o_border border-white/10"},Zf={class:"text-xs text-cyan-400/80 font-medium mb-2"},eg={class:"flex justify-between text-xs"},tg={class:"text-green-400/70"},sg={class:"text-green-400 font-medium"},og={class:"text-red-400/70"},ng={class:"text-red-400 font-medium"},rg={class:"flex-1 flex flex-col"},ag={class:"flex items-center justify-between p-4 border-b border-white/10 bg-white/5"},ig={class:"flex items-center gap-3"},lg={class:"flex items-center gap-2"},cg={class:"text-xs opacity-60 bg-blue-500/20 px-2 py-0.5 rounded-full"},ug={class:"flex items-center gap-2"},dg={key:0,class:"flex items-center gap-2"},pg={key:1,class:"text-xs text-yellow-300"},hg={class:"flex-1 overflow-auto pb-10"},mg={key:0,class:"text-center py-8 opacity-60"},fg={key:1,class:"space-y-1 p-4"},gg=["onClick"],vg={class:"flex items-center gap-2"},bg={class:"space-y-2 mt-2"},yg={class:"flex items-center gap-4 text-xs"},xg={class:"text-white/80 font-mono"},_g={class:"flex items-center gap-4 text-xs"},wg={class:"text-white/80"},kg={key:0,class:"flex items-center gap-4 text-xs"},Sg={class:"text-white/80"},Cg={key:1,class:"flex items-center gap-4 text-xs"},$g=["onClick"],Ag={key:2,class:"mt-2 text-xs bg-white/5 rounded p-2 border border-white/10"},Eg={class:"space-y-1"},Tg={class:"font-mono text-white/60"},Lg={class:"text-white/80"},Bg={class:"text-white/70 font-mono"},Pg={class:"mt-2 text-white/60"},Rg={class:"font-mono text-white/60 ml-2"},Ig={key:3,class:"text-xs bg-white/5 rounded p-2 o_border border-white/10"},Og={class:"font-medium mb-3"},Hg={class:"px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-200"},Fg={class:"grid grid-cols-1 gap-2"},Dg={key:0},Mg={class:"list-disc list-inside text-white/80"},jg={key:1},Ng={class:"list-disc list-inside text-white/80"},Gg={key:2},zg={class:"list-disc list-inside text-white/80"},Ug={key:4,class:"text-xs bg-white/5 rounded p-2 o_border border-white/10"},Kg={key:0},Wg={class:"list-disc list-inside text-white/80 break-all"},qg={key:1,class:"text-white/60"},Vg={key:5,class:"flex items-center gap-4 text-xs pt-2 border-t border-white/10"},Yg={class:"flex items-center gap-2"},Jg=["onClick"],Xg={class:"px-2 py-1 rounded text-xs bg-orange-500/20 text-orange-200"},Qg=["onClick"],Zg={key:0,class:"text-xs bg-white/5 rounded p-2 o_border border-white/10"},ev={key:0},tv={class:"list-disc list-inside text-white/80 break-all"},sv={key:1,class:"text-white/60"},Gn="sdd:policy-expanded-cards",ov=ue({__name:"SddTabPolicies",setup(e){const t=Kn(),s=N("inner"),o=N("all"),n=N(""),r=N(Xa()),l=N(!1),u=N({});let d=!1;const c=Mi(),h=N([]),f=Y(()=>{const k=new Map;return h.value.forEach(_=>k.set(_.key,_)),k}),m=k=>f.value.get(k),g=Y(()=>{const k=new Map,_=t.getOuterFlags;Object.entries(_).forEach(([W,re])=>{Nn(W,re.enabled,re.reason,re.source||"unknown");const pe=`outer::${W}`;k.has(pe)||k.set(pe,{name:W,enabled:re.enabled,reason:re.reason,source:re.source||"unknown",type:"outer"})});const $=t.getAllPolicies;return Object.entries($).forEach(([W,re])=>{Nn(W,re.enabled,re.reason,re.source||"unknown");const pe=`inner::${W}`;k.set(pe,{name:W,enabled:re.enabled,reason:re.reason,source:re.source||"unknown",type:"inner"})}),Array.from(k.values()).sort((W,re)=>W.name.localeCompare(re.name))}),b=Y(()=>{let k=g.value;if(k=k.filter($=>$.type===s.value),o.value!=="all"){const $=o.value==="enabled";k=k.filter(W=>W.enabled===$)}if(n.value.trim()){const $=n.value.toLowerCase();k=k.filter(W=>W.name.toLowerCase().includes($)||W.reason.toLowerCase().includes($)||W.source.toLowerCase().includes($))}const _=new Map;for(const $ of k){const W=_.get($.name);W?W.type==="outer"&&$.type==="inner"&&_.set($.name,$):_.set($.name,$)}return Array.from(_.values())}),w=Y(()=>{const k=g.value,_=k.length,$=k.filter(Ee=>Ee.type==="outer"),W=k.filter(Ee=>Ee.type==="inner"),re=Ee=>Ee.filter(lt=>lt.enabled).length,pe=Ee=>Ee.filter(lt=>!lt.enabled).length;return{totalFlags:_,totalEnabled:re(k),totalDisabled:pe(k),outer:{total:$.length,enabled:re($),disabled:pe($)},inner:{total:W.length,enabled:re(W),disabled:pe(W)}}}),y=()=>{n.value="",s.value="inner",o.value="all"},S=N({}),C=(k,_)=>`${_}-${k}`,R=(k,_)=>{const $=C(k,_);S.value[$]=!S.value[$]},F=(k,_)=>ms(k,_)?.statusChanges.length??0,M=k=>{const _=Date.now()-k,$=Math.floor(_/1e3),W=Math.floor($/60),re=Math.floor(W/60),pe=Math.floor(re/24);return pe>0?`${pe}d ${re%24}h ago`:re>0?`${re}h ${W%60}m ago`:W>0?`${W}m ${$%60}s ago`:`${$}s ago`},U=()=>{h.value=ei()};kt(()=>{U()}),ye(r,(k,_)=>{Qa(k),_!==void 0&&!k&&(Za(),U())}),ye(l,k=>{if(k&&!d){const _=Yr();u.value=_,Object.entries(_).forEach(([$,W])=>{try{$.startsWith("page:")&&sessionStorage.setItem(`sdd:policy:controlledPaths:${$}`,JSON.stringify(W))}catch{}}),d=!0}});const I=k=>{const _=String(k);if(!_.startsWith("page:"))return[];const $=u.value[_];if($?.length)return $;const W=Jr(k);return W?.length?W:vf(k)},A=lr().public.integrationEnvironment,j=mt(),H=Y(()=>j.projectAccess?.skuLevel??null),O=N({}),Z=k=>!!O.value[k],L=k=>{O.value[k]=!Z(k)};kt(()=>{const k=typeof localStorage<"u"?localStorage.getItem(Gn):null;let _=null;try{_=k?JSON.parse(k):null}catch{_=null}_&&typeof _=="object"&&(O.value=_)}),ye(O,k=>{typeof localStorage<"u"&&localStorage.setItem(Gn,JSON.stringify(k))},{deep:!0});const se=k=>{const _=ti[k];if(!_)return null;const $=pe=>{if(pe&&typeof pe=="object"&&"skuBased"in pe){const Ee=pe.skuBased,lt=si(H.value,Ee.openIfSku),ls=lt?"open":Ee.default;return`default (${lt?"sku match":"sku default"}): ${ls} ยท rule: openIfSku=${JSON.stringify(Ee.openIfSku)}, fallback=${Ee.default}, sku=${H.value??"n/a"}`}return null};if(typeof _=="string")return{text:`default (global): ${_}`};const W=$(_);if(W)return{text:W};const re=_[A]??_.default??_.all;if(re!==void 0){const pe=_[A]!==void 0?A:_.default!==void 0?"default":"all",Ee=$(re);if(Ee)return{text:Ee.replace("default (",`default (${pe}, `)};if(re==="open"||re==="closed")return{text:`default (${pe}): ${re}`}}return null};return(k,_)=>(p(),v("div",bf,[a("div",yf,[a("div",xf,[a("div",_f,[a("input",{id:"policies-search",value:i(n),"aria-label":"Search policies",type:"text",placeholder:"Search policy entries...",class:"w-full pl-8 pr-3 py-2 rounded-lg bg-white/10 text-sm placeholder-white/50 outline-none focus:ring-2 focus:ring-blue-400/50",onInput:_[0]||(_[0]=$=>n.value=$.target.value)},null,40,wf),_[10]||(_[10]=a("div",{class:"absolute left-2.5 top-2.5 w-3 h-3 text-white/50"}," ๐ ",-1))])]),a("div",kf,[a("div",Sf,[_[11]||(_[11]=a("h4",{class:"text-xs font-medium text-white/70 mb-2"}," Type Filter ",-1)),a("div",Cf,[a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(s)==="inner"?"bg-blue-500/20 text-blue-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:_[1]||(_[1]=$=>s.value="inner")}," Inner ",2),a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(s)==="outer"?"bg-blue-500/20 text-blue-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:_[2]||(_[2]=$=>s.value="outer")}," Outer ",2)])]),a("div",$f,[_[12]||(_[12]=a("h4",{class:"text-xs font-medium text-white/70 mb-2"}," State Filter ",-1)),a("div",Af,[a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(o)==="all"?"bg-blue-500/20 text-blue-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:_[3]||(_[3]=$=>o.value="all")}," All ",2),a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(o)==="enabled"?"bg-green-500/20 text-green-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:_[4]||(_[4]=$=>o.value="enabled")}," Enabled ",2),a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(o)==="disabled"?"bg-red-500/20 text-red-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:_[5]||(_[5]=$=>o.value="disabled")}," Disabled ",2)])]),a("div",Ef,[a("label",Tf,[a("input",{id:"policies-track-usage",type:"checkbox",class:"accent-blue-400 w-3 h-3",checked:i(r),onChange:_[6]||(_[6]=$=>r.value=$.target.checked)},null,40,Lf),_[13]||(_[13]=a("span",{class:"text-white/80"},"Track Usage",-1))]),_[14]||(_[14]=a("div",{class:"text-[11px] text-white/50 mt-1"}," Persists in localStorage ยท off by default ",-1))]),a("div",Bf,[a("label",Pf,[a("input",{id:"policies-show-controlled-paths",type:"checkbox",class:"accent-blue-400 w-3 h-3",checked:i(l),onChange:_[7]||(_[7]=$=>l.value=$.target.checked)},null,40,Rf),_[15]||(_[15]=a("span",{class:"text-white/80"},"Show controlled paths",-1))]),_[16]||(_[16]=a("div",{class:"text-[11px] text-white/50 mt-1"}," Show associated navigation paths for page policies ",-1))]),a("div",If,[_[25]||(_[25]=a("h4",{class:"text-xs font-medium text-white/70 mb-3"}," Statistics ",-1)),a("div",Of,[a("div",Hf,[_[17]||(_[17]=a("div",{class:"text-xs text-white/50 mb-1"}," Total ",-1)),a("div",Ff,E(i(w).totalFlags),1)]),a("div",Df,[_[18]||(_[18]=a("div",{class:"text-xs text-white/50 mb-1"}," Flags ",-1)),a("div",Mf,E(i(w).outer.total+i(w).inner.total),1)]),a("div",jf,[_[19]||(_[19]=a("div",{class:"text-xs text-green-400/70 mb-1"}," Enabled ",-1)),a("div",Nf,E(i(w).totalEnabled),1)]),a("div",Gf,[_[20]||(_[20]=a("div",{class:"text-xs text-red-400/70 mb-1"}," Disabled ",-1)),a("div",zf,E(i(w).totalDisabled),1)])]),a("div",Uf,[a("div",Kf,[a("div",Wf," Outer Flags ("+E(i(w).outer.total)+") ",1),a("div",qf,[a("span",Vf,[_[21]||(_[21]=de("Enabled: ",-1)),a("span",Yf,E(i(w).outer.enabled),1)]),a("span",Jf,[_[22]||(_[22]=de("Disabled: ",-1)),a("span",Xf,E(i(w).outer.disabled),1)])])]),a("div",Qf,[a("div",Zf," Inner Flags ("+E(i(w).inner.total)+") ",1),a("div",eg,[a("span",tg,[_[23]||(_[23]=de("Enabled: ",-1)),a("span",sg,E(i(w).inner.enabled),1)]),a("span",og,[_[24]||(_[24]=de("Disabled: ",-1)),a("span",ng,E(i(w).inner.disabled),1)])])])])])])]),a("div",rg,[a("div",ag,[a("div",ig,[a("div",lg,[_[26]||(_[26]=a("div",{class:"flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-500/20 text-blue-200"},[a("div",{class:"w-2 h-2 rounded-full bg-blue-400"}),a("span",{class:"text-sm font-medium"},"All Policies")],-1)),a("span",cg,E(i(b).length)+" / "+E(i(g).length),1)])]),a("div",ug,[a("button",{class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:_[8]||(_[8]=$=>y())}," Clear Filters "),i(c).isOverrideEnabled.value?(p(),v("div",dg,[i(c).getOverrideStats.value.total>0?(p(),v("button",{key:0,class:"px-3 py-1.5 rounded-lg bg-red-500/20 hover:bg-red-500/30 text-red-200 text-xs font-medium transition-colors",onClick:_[9]||(_[9]=$=>i(c).clearAllOverrides())}," Clear All Overrides ("+E(i(c).getOverrideStats.value.total)+") ",1)):T("",!0),i(c).getOverrideStats.value.total>0?(p(),v("span",pg,E(i(c).getOverrideStats.value.enabled)+" enabled, "+E(i(c).getOverrideStats.value.disabled)+" disabled ",1)):T("",!0)])):T("",!0)])]),a("div",hg,[i(b).length===0?(p(),v("div",mg,[..._[27]||(_[27]=[a("div",{class:"text-2xl mb-2"}," โ ",-1),a("div",{class:"text-sm"}," No policy flags found ",-1),a("div",{class:"text-xs text-white/50 mt-1"}," Policy flags will appear here when available ",-1)])])):(p(),v("div",fg,[(p(!0),v(oe,null,ce(i(b),$=>(p(),v("div",{key:$.name,class:"bg-white/5 rounded-lg p-3 o_border border-white/10 hover:bg-white/10 transition-colors"},[a("button",{class:"flex items-center justify-between gap-3 mb-1 w-full text-left bg-transparent",onClick:W=>L(`${$.type}-${$.name}`)},[a("div",vg,[a("span",{class:D(["px-2 py-1 rounded text-xs font-medium",$.enabled?"bg-green-500/20 text-green-200":"bg-red-500/20 text-red-200"])},E($.name),3),a("span",{class:D(["px-1.5 py-0.5 rounded text-xs",$.enabled?"bg-green-500/10 text-green-300":"bg-red-500/10 text-red-300"])},E($.enabled?"ENABLED":"DISABLED"),3),$.type==="inner"&&(m($.name)?.foundIn.components.length||m($.name)?.foundIn.composables.length||m($.name)?.foundIn.route.length||m($.name)?.foundIn.store.length)?(p(),G(i(xe),{key:0,name:"octicon:tracked-by-closed-completed-16",class:"size-4 text-green-400"})):T("",!0)]),q(i(xe),{name:"mdi:chevron-right",class:D(["size-4 text-white/50 transform transition-transform",Z(`${$.type}-${$.name}`)?"rotate-90":""])},null,8,["class"])],8,gg),be(a("div",bg,[a("div",yg,[_[28]||(_[28]=a("span",{class:"text-white/50"},"Source:",-1)),a("span",xg,E($.source),1)]),a("div",_g,[_[29]||(_[29]=a("span",{class:"text-white/50"},"Reason:",-1)),a("span",wg,E($.reason),1)]),se($.name)?(p(),v("div",kg,[_[30]||(_[30]=a("span",{class:"text-white/50"},"Default:",-1)),a("span",Sg,E(se($.name)?.text),1)])):T("",!0),$.type==="inner"&&F($.name,$.type)>1?(p(),v("div",Cg,[_[31]||(_[31]=a("span",{class:"text-white/50"},"History:",-1)),a("button",{class:"text-blue-300 hover:text-blue-200 underline",onClick:W=>R($.name,$.type)}," View Status Changes ("+E(F($.name,$.type))+") ",9,$g)])):T("",!0),$.type==="inner"&&i(S)[`${$.type}-${$.name}`]?(p(),v("div",Ag,[_[35]||(_[35]=a("div",{class:"font-medium mb-1"}," Status Changes ",-1)),a("ul",Eg,[(p(!0),v(oe,null,ce(i(ms)($.name,$.type)?.statusChanges,W=>(p(),v("li",{key:W.timestamp,class:"flex flex-wrap items-center gap-2"},[a("span",Tg,E(M(W.timestamp)),1),a("span",{class:D(W.enabled?"text-green-300":"text-red-300")},E(W.enabled?"ENABLED":"DISABLED"),3),_[32]||(_[32]=a("span",{class:"text-white/60"},"reason:",-1)),a("span",Lg,E(W.reason),1),_[33]||(_[33]=a("span",{class:"text-white/60"},"source:",-1)),a("span",Bg,E(W.source),1)]))),128))]),a("div",Pg,[_[34]||(_[34]=de(" Current: ",-1)),a("span",{class:D(i(ms)($.name,$.type)?.currentStatus.enabled?"text-green-300":"text-red-300")},E(i(ms)($.name,$.type)?.currentStatus.enabled?"ENABLED":"DISABLED"),3),a("span",Rg,E(M(i(ms)($.name,$.type)?.currentStatus.timestamp||0)),1)])])):T("",!0),$.type==="inner"&&i(r)&&m($.name)?(p(),v("div",Ig,[a("div",Og,[_[36]||(_[36]=de(" Usage on this page ",-1)),a("span",Hg,"ร"+E(m($.name).triggerCount),1)]),a("div",Fg,[(m($.name).foundIn.components||[]).length?(p(),v("div",Dg,[_[37]||(_[37]=a("div",{class:"text-white/60 uppercase text-[10px] tracking-wide mb-1"}," Components ",-1)),a("ul",Mg,[(p(!0),v(oe,null,ce(m($.name).foundIn.components,W=>(p(),v("li",{key:W,class:"break-all"},E(W),1))),128))])])):T("",!0),(m($.name).foundIn.composables||[]).length?(p(),v("div",jg,[_[38]||(_[38]=a("div",{class:"text-white/60 uppercase text-[10px] tracking-wide mb-1"}," Composables ",-1)),a("ul",Ng,[(p(!0),v(oe,null,ce(m($.name).foundIn.composables,W=>(p(),v("li",{key:W,class:"break-all"},E(W),1))),128))])])):T("",!0),(m($.name).foundIn.store||[]).length?(p(),v("div",Gg,[_[39]||(_[39]=a("div",{class:"text-white/60 uppercase text-[10px] tracking-wide mb-1"}," Stores ",-1)),a("ul",zg,[(p(!0),v(oe,null,ce(m($.name).foundIn.store,W=>(p(),v("li",{key:W,class:"break-all"},E(W),1))),128))])])):T("",!0)])])):T("",!0),$.type==="inner"&&i(l)&&$.name.startsWith("page:")?(p(),v("div",Ug,[_[40]||(_[40]=a("div",{class:"font-medium mb-2"}," Controlled Paths ",-1)),I($.name).length?(p(),v("div",Kg,[a("ul",Wg,[(p(!0),v(oe,null,ce(I($.name),W=>(p(),v("li",{key:W},E(W),1))),128))])])):(p(),v("div",qg," No matching navigation paths found. "))])):T("",!0),$.type==="inner"&&i(c).isOverrideEnabled.value?(p(),v("div",Vg,[_[43]||(_[43]=a("span",{class:"text-white/50"},"Override:",-1)),a("div",Yg,[i(c).hasOverride($.name)?(p(),v(oe,{key:1},[a("span",Xg," Overridden: "+E(i(c).getOverride($.name)?.enabled?"ON":"OFF"),1),a("button",{class:"px-2 py-1 rounded text-xs bg-red-500/20 text-red-200 hover:bg-red-500/30 transition-colors",onClick:W=>i(c).removeOverride($.name)},[_[42]||(_[42]=de(" Remove ",-1)),$.type==="inner"&&i(l)&&$.name.startsWith("page:")?(p(),v("div",Zg,[_[41]||(_[41]=a("div",{class:"font-medium mb-2"}," Controlled Paths ",-1)),I($.name).length?(p(),v("div",ev,[a("ul",tv,[(p(!0),v(oe,null,ce(I($.name),W=>(p(),v("li",{key:W},E(W),1))),128))])])):(p(),v("div",sv," No matching navigation paths found. "))])):T("",!0)],8,Qg)],64)):(p(),v("button",{key:0,class:"px-2 py-1 rounded text-xs bg-yellow-500/20 text-yellow-200 hover:bg-yellow-500/30 transition-colors",onClick:W=>i(c).setOverride($.name,!$.enabled)}," Override "+E($.enabled?"OFF":"ON"),9,Jg))])])):T("",!0)],512),[[Ro,Z(`${$.type}-${$.name}`)]])]))),128))]))])])]))}}),nv=Object.assign(ov,{__name:"SddTabPolicies"}),rv={class:"flex items-center justify-between px-4 h-12 border-b border-white/10 bg-white/5"},av={class:"flex items-center gap-3"},iv={class:"text-sm font-medium"},lv={class:"flex items-center gap-2"},cv={class:"flex items-center gap-1 bg-white/10 rounded-lg p-1"},uv=["value"],dv={key:0,value:"echo"},pv={key:1,value:"policies"},hv={key:2,value:"api"},mv={key:3,value:"payload"},fv={class:"flex items-center gap-1"},gv=["title"],vv=["title"],bv=["title"],yv={class:"flex h-full"},xv={key:0,class:"h-[calc(100%-3rem)] flex"},_v={key:0,class:"w-80 shrink-0 h-full border-r border-white/10 flex flex-col bg-white/5"},wv={class:"p-4 border-b border-white/10"},kv={class:"relative"},Sv={class:"flex-1 overflow-auto p-2"},Cv={class:"space-y-1"},$v=["onClick"],Av={class:"flex items-center justify-between mb-1"},Ev={class:"flex items-center gap-3 text-xs opacity-70"},Tv={class:"flex items-center gap-1"},Lv={class:"flex items-center gap-1"},Bv={class:"flex items-center gap-1"},Pv={key:0,class:"text-center py-8 opacity-60"},Rv={key:1,class:"w-80 shrink-0 h-full border-r border-white/10 flex flex-col bg-white/5"},Iv={class:"p-4 border-b border-white/10"},Ov={class:"relative"},Hv={class:"mt-3"},Fv={class:"text-xs opacity-80 bg-blue-500/20 px-2 py-0.5 rounded-full inline-block"},Dv={class:"flex-1 overflow-auto"},Mv={class:"p-4 border-b border-white/10"},jv={class:"flex gap-2"},Nv={class:"p-4 border-b border-white/10"},Gv={class:"space-y-1"},zv=["onClick"],Uv={class:"flex items-center gap-2 min-w-0"},Kv={class:"truncate"},Wv={class:"flex items-center gap-2"},qv=["title","aria-label","onClick"],Vv={key:0,class:"w-4 h-4 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Yv={key:1,class:"w-4 h-4 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Jv={class:"text-xs opacity-60 bg-white/10 px-1.5 py-0.5 rounded"},Xv={key:0,class:"p-4 border-b border-white/10"},Qv=["value"],Zv={key:1,class:"p-4"},eb=["value"],tb={key:1,class:"flex-1 flex items-center justify-center"},sb={key:2,class:"w-full"},ob={class:"flex items-center justify-between p-4 border-b border-white/10 bg-white/5"},nb={class:"flex items-center gap-3"},rb={class:"flex items-center gap-1 bg-white/10 rounded-lg p-1"},ab=["onClick"],ib={class:"flex items-center gap-2"},lb={class:"relative"},cb={class:"flex flex-wrap items-center gap-2 o_p-2"},ub=["value"],db=["disabled"],pb={class:"h-full overflow-auto pb-10"},hb=["aria-label","onKeydown","innerHTML"],mb={key:1,class:"text-center py-8 opacity-60"},zn="pinia-debug-dock-visible",To="pinia-debug-dock-state",fb=ue({__name:"spaDebugDock",setup(e){const{showDebugTools:t}=lr().public,{shouldShowDebugTools:s,isDebugEnabled:o}=oi(),n=N(!1),r=N(!1),l=N(""),u=N(""),d=N(null),c=N("state"),h=N("normal"),f=N("normal"),m=N("bottom"),g=[{key:"state",label:"State",color:"green",bgColor:"bg-green-500/20",textColor:"text-green-200",dotColor:"bg-green-400"},{key:"getters",label:"Getters",color:"yellow",bgColor:"bg-yellow-500/20",textColor:"text-yellow-200",dotColor:"bg-yellow-400"},{key:"actions",label:"Actions",color:"purple",bgColor:"bg-purple-500/20",textColor:"text-purple-200",dotColor:"bg-purple-400"}],b=N([]),w=N([]),y=N({}),S=N({}),C=N(""),R=N([]),F=N(""),M=N(""),U=N("desc"),I=N([]),B=N({groups:0,entries:0,enabled:0}),A=()=>{if(!(typeof window>"u"))try{const P=localStorage.getItem("echo-persisted-groups");P&&(I.value=JSON.parse(P))}catch(P){console.warn("Failed to load echo persisted groups:",P)}},j=()=>{if(!(typeof window>"u"))try{localStorage.setItem("echo-persisted-groups",JSON.stringify(I.value))}catch(P){console.warn("Failed to save echo persisted groups:",P)}},H=ir().$pinia,O=Y(()=>Mn()),Z=N([]),L=N({}),se=N(""),k=N(""),_=N({}),$=N({}),W=new Map;function re(){if(!O.value)return;Z.value=eo();const P={};Z.value.forEach(x=>{P[x.id]=Dp(x.id)}),L.value=P}function pe(P){const x=H?._s;return x&&x.get(P)||null}function Ee(){if(!O.value)return;const P=(k.value||d.value||"").toString(),x=se.value.trim();if(!P||!x)return;const ee=c.value==="getters"?"getter":"state",K=Hp(P,x,ee),me=pe(P);try{let $e;if(ee==="getter"){const ct=us(me);$e=gs(ct,x)}else{const ct=me?.$state??{};$e=gs(ct,x)}jn(K.id,$e)}catch{}se.value="",re()}function lt(P){Fp(P),re()}function ls(P,x){Mp(P,x),re()}function Ts(P){_.value[P]=!_.value[P]}function lo(P,x){const ee=$.value[P]||[],K=ee.indexOf(x);K>=0?ee.splice(K,1):(ee.push(x),ee.length>2&&ee.shift()),$.value[P]=[...ee]}function co(P,x){return($.value[P]||[]).includes(x)}function Dt(P){const x=$.value[P]||[];if(x.length!==2)return null;const ee=L.value[P]||[],K=ee.find($e=>$e.id===x[0])?.value,me=ee.find($e=>$e.id===x[1])?.value;return K===void 0||me===void 0?null:Ls(K,me)}function Ls(P,x){const ee=[],K=(me,$e,ct)=>{if(!(typeof me=="object"&&me!==null)||!(typeof $e=="object"&&$e!==null)){JSON.stringify(me)!==JSON.stringify($e)&&ee.push(`${ct||"value"}: ${JSON.stringify(me)} -> ${JSON.stringify($e)}`);return}new Set([...Object.keys(me),...Object.keys($e)]).forEach(ut=>{const fo=ct?`${ct}.${ut}`:ut;ut in me?ut in $e?K(me[ut],$e[ut],fo):ee.push(`- ${fo} (was ${JSON.stringify(me[ut])})`):ee.push(`+ ${fo} = ${JSON.stringify($e[ut])}`)})};return K(P,x,""),ee.length?ee.join(`
`):"No differences"}function uo(P){const x=new Date(P);return x.toLocaleTimeString()+"."+x.getMilliseconds().toString().padStart(3,"0")}function cs(){if(!O.value)return;const P=H?._s;P&&P.forEach((x,ee)=>{if(W.has(ee))return;const K=x.$subscribe((me,$e)=>{if(!Mn())return;const ct=eo().filter(xt=>xt.storeId===ee);ct.length&&(ct.forEach(xt=>{try{let ps;if(xt.type==="getter"){const ut=us(x);ps=gs(ut,xt.path)}else ps=gs($e,xt.path);const gn=Np(xt.id);JSON.stringify(ps)!==JSON.stringify(gn)&&jn(xt.id,ps)}catch{}}),re())},{detached:!0});W.set(ee,K)})}function Bs(){W.forEach(P=>{try{P()}catch{}}),W.clear()}ye([n,c],([P,x])=>{P&&(x==="state"||x==="getters"||x==="actions"||x==="tracker")&&(re(),cs())});function Et(P){try{return P()}catch(x){return`โ ${x?.message??"getter error"}`}}function us(P){const x=P?.$state?Object.keys(P.$state):[],ee=Object.entries(P??{}).filter(([K,me])=>!K.startsWith("$")&&!x.includes(K)&&typeof me!="function");return Object.fromEntries(ee.map(([K])=>[K,Et(()=>P[K])]))}function po(P){return Object.fromEntries(Object.entries(P??{}).filter(([x,ee])=>typeof ee=="function"&&!x.startsWith("$")).map(([x])=>[x,"fn(...)"]))}const Mt=Y(()=>{const P=H?._s;return P?Array.from(P.entries()).map(([x,ee])=>({id:x,store:ee})).filter(x=>x.store&&typeof x.store=="object").map(({id:x,store:ee})=>({id:x,state:ee.$state??{},getters:us(ee),actions:po(ee)})):[]}),Ps=Y(()=>{const P=l.value.trim().toLowerCase();let x=Mt.value;return P&&(x=x.filter(ee=>ee.id.toLowerCase().includes(P))),x}),ne=Y(()=>d.value?Mt.value.find(P=>P.id===d.value):null),fe=Y(()=>c.value==="echo"||c.value==="api"||c.value==="tracker"||!ne.value?null:c.value==="state"?ne.value.state:c.value==="getters"?ne.value.getters:ne.value.actions),ke=Y(()=>{const P=new Set(b.value.map(x=>x.page).filter(Boolean));return Array.from(P).sort()}),he=Y(()=>{const P=new Set(b.value.map(x=>x.component).filter(Boolean));return Array.from(P).sort()}),Fe=Y(()=>{let P=b.value;if(C.value.trim()){const x=C.value.toLowerCase();P=P.filter(ee=>ee.groupKey.toLowerCase().includes(x)||JSON.stringify(ee.message).toLowerCase().includes(x)||ee.page?.toLowerCase().includes(x)||ee.component?.toLowerCase().includes(x))}return R.value.length>0&&(P=P.filter(x=>R.value.includes(x.groupKey))),F.value&&(P=P.filter(x=>x.page===F.value)),M.value&&(P=P.filter(x=>x.component===M.value)),P.sort((x,ee)=>U.value==="desc"?ee.timestamp-x.timestamp:x.timestamp-ee.timestamp)});function je(P){d.value===P?d.value=null:d.value=P}function We(P){const x=Object.keys(P.state).length,ee=Object.keys(P.getters).length,K=Object.keys(P.actions).length;return{stateCount:x,gettersCount:ee,actionsCount:K}}const Ke=()=>{b.value=bo(),w.value=[...Ur],S.value=ri(),y.value=rr()},jt=()=>{if(I.value.length>0){const ee=bo().filter(K=>!I.value.includes(K.groupKey)).map(K=>K.id);ee.length>0&&xn(ee)}else ai();Ke()},Tt=P=>{const x=R.value.indexOf(P);x>-1?R.value.splice(x,1):R.value.push(P)},Rs=P=>{Fs(P)?or(P):nr(P),Ke()},ds=()=>{typeof window<"u"&&window.location.reload()},Is=()=>{C.value="",R.value=[],F.value="",M.value=""},ft=P=>{ii(P),Ke()},Os=P=>{const x=I.value.indexOf(P);x>-1?I.value.splice(x,1):I.value.push(P),j()},ho=P=>{const K=bo().filter($e=>$e.groupKey===P).map($e=>$e.id);K.length>0&&(xn(K),Ke());const me=I.value.indexOf(P);me>-1&&(I.value.splice(me,1),j())},gt=()=>{l.value="",u.value=""},Nt=P=>{P==="pinia"?(c.value="state",d.value=null):P==="echo"&&o("echo")?(c.value="echo",Ke()):P==="policies"&&o("policy")?c.value="policies":P==="api"&&o("api")?c.value="api":P==="payload"&&o("api")?c.value="payload":P==="tracker"&&(c.value="tracker",re(),cs())},Hs=Y(()=>{const P=c.value;return P==="state"||P==="getters"||P==="actions"?"pinia":P==="tracker"?"tracker":P==="echo"?"echo":P==="policies"?"policies":P==="api"?"api":P==="payload"?"payload":"pinia"}),Xr=P=>{const x=P.target.value;Nt(x)},Qr=()=>{h.value==="normal"?h.value="wide":h.value==="wide"?h.value="extra-wide":h.value="normal"},Zr=()=>{f.value==="normal"?f.value="tall":f.value==="tall"?f.value="extra-tall":f.value="normal"},ea=()=>{m.value=m.value==="bottom"?"top":"bottom"},ta=P=>{switch(P){case"echo":return"heroicons:megaphone";case"api":return"heroicons:globe-alt";case"payload":return"heroicons:archive-box";case"tracker":return"heroicons:clipboard-document-list";default:return"logos:pinia"}},sa=P=>{switch(P){case"echo":return"SPA Debug - Echo System";case"api":return"SPA Debug - API Monitoring";case"payload":return"SPA Debug - Nuxt Payload";case"tracker":return"SPA Debug - Pinia Value Tracker";case"state":return"SPA Debug - Store State";case"getters":return"SPA Debug - Store Getters";case"actions":return"SPA Debug - Store Actions";default:return"SPA Debug - Pinia Store"}},oa=Y(()=>{const P={normal:"1000px",wide:"1200px","extra-wide":"1400px"},x={normal:"520px",tall:"640px","extra-tall":"760px"},ee=m.value==="bottom"?{bottom:"1rem",top:"auto"}:{top:"1rem",bottom:"auto"};return{width:P[h.value],height:r.value?"3rem":x[f.value],...ee}});async function na(P){try{await navigator.clipboard.writeText(P)}catch{}}const ra=Y(()=>{if(!fe.value)return"";const P=so(fe.value,u.value),x=ee=>{if(!d.value)return!1;const K=c.value==="getters"?"getter":"state";return Z.value.some(me=>me.storeId===d.value&&me.path===ee&&me.type===K)};return Gp(P,c.value,x,ys,Vt)});function aa(P){zp(P,d.value,x=>{k.value=x},x=>{se.value=x})}function fn(P){const x=P.target?.closest(".js-json-key");if(!x||P.key!=="Enter"&&P.key!==" ")return;const ee=x.getAttribute("data-path")||"";!ee||!d.value||(k.value=d.value,se.value=ee)}async function ia(){if(fe.value){const P=so(fe.value,u.value);await na(ys(P))}}function la(){if(typeof window<"u"&&t)try{const P=sessionStorage.getItem(zn);n.value=P==="true"}catch{}}function mo(){if(typeof window<"u")try{sessionStorage.setItem(zn,n.value.toString())}catch{}}function ca(){t&&(n.value=!n.value,mo())}function ua(){n.value=!1,mo()}function da(){const P={activeStore:d.value,activeTab:c.value,jsonFilter:u.value,minimized:r.value,dockWidth:h.value,dockHeight:f.value,dockPosition:m.value,echoSelectedGroups:R.value,echoSelectedPage:F.value,echoSelectedComponent:M.value,echoSortOrder:U.value};sessionStorage.setItem(To,JSON.stringify(P))}function pa(){const P=sessionStorage.getItem(To);if(P)try{const x=JSON.parse(P);x.activeStore&&Mt.value.some(ee=>ee.id===x.activeStore)&&(d.value=x.activeStore),c.value=x.activeTab||"state",u.value=x.jsonFilter||"",r.value=x.minimized||!1,h.value=x.dockWidth||"normal",f.value=x.dockHeight||"normal",m.value=x.dockPosition||"bottom",R.value=x.echoSelectedGroups||[],F.value=x.echoSelectedPage||"",M.value=x.echoSelectedComponent||"",U.value=x.echoSortOrder||"desc"}catch{}}function ha(){c.value==="echo"?(R.value=[],F.value="",M.value="",U.value="desc",C.value=""):(d.value=null,c.value="state",u.value="",l.value=""),r.value=!1,sessionStorage.removeItem(To)}ye([d,c,u,r,h,f,m,R,F,M,U],da,{deep:!0}),ye(n,mo);let Gt=null;return ye([n,c],([P,x])=>{P&&x==="echo"?(Ke(),Gt=ar(Ke,2e3)):Gt&&(clearInterval(Gt),Gt=null)}),ro({[xs.piniaDebug]:ca}),kt(()=>{pa(),la(),A(),Ke(),!k.value&&d.value&&(k.value=d.value),re(),cs()}),no(()=>{Gt&&clearInterval(Gt),Bs()}),(P,x)=>{const ee=xe;return p(),G(ni,{to:"#teleports"},[i(s)()&&i(n)?(p(),v("div",{key:0,class:"fixed right-4 z-[9999] rounded-2xl shadow-2xl bg-slate-900/90 text-white backdrop-blur o_border border-white/10 overflow-hidden sqmInner",style:Kt(i(oa))},[a("div",rv,[a("div",av,[q(ee,{name:ta(i(c)),class:"size-6"},null,8,["name"]),a("strong",iv,E(sa(i(c))),1),x[15]||(x[15]=a("span",{class:"text-xs opacity-60 bg-white/10 px-2 py-0.5 rounded-full"},"โโฅD",-1))]),a("div",lv,[a("div",cv,[a("select",{id:"dock-mode-select","aria-label":"Section",class:"px-2 py-1.5 rounded bg-white/10 text-xs",value:i(Hs),onChange:Xr},[x[16]||(x[16]=a("option",{value:"pinia"}," Pinia ",-1)),x[17]||(x[17]=a("option",{value:"tracker"}," Tracker ",-1)),i(o)("echo")?(p(),v("option",dv," Echo ")):T("",!0),i(o)("policy")?(p(),v("option",pv," Policies ")):T("",!0),i(o)("api")?(p(),v("option",hv," API ")):T("",!0),i(o)("api")?(p(),v("option",mv," Payload ")):T("",!0)],40,uv)]),a("div",fv,[a("button",{class:"px-2 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",title:`Width: ${i(h)}`,onClick:Qr}," โ ",8,gv),a("button",{class:"px-2 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",title:`Height: ${i(f)}`,onClick:Zr}," โ ",8,vv),a("button",{class:"px-2 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",title:`Position: ${i(m)}`,onClick:ea},E(i(m)==="bottom"?"โ":"โ"),9,bv)]),a("button",{class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:ha}," Reset "),a("button",{class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",onClick:x[0]||(x[0]=K=>r.value=!i(r))},E(i(r)?"โ":"โ"),1),a("button",{class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors",title:"Reload page","aria-label":"Reload page",onClick:ds}," โป "),a("button",{class:"px-3 py-1.5 rounded-lg bg-red-500/20 hover:bg-red-500/30 text-xs font-medium transition-colors",onClick:ua}," โ ")])]),a("div",yv,[i(r)?T("",!0):(p(),v("div",xv,[i(c)!=="echo"&&i(c)!=="policies"&&i(c)!=="api"&&i(c)!=="tracker"&&i(c)!=="payload"?(p(),v("div",_v,[a("div",wv,[a("div",kv,[be(a("input",{"onUpdate:modelValue":x[1]||(x[1]=K=>Ge(l)?l.value=K:null),type:"text",placeholder:"Search stores...","aria-label":"Search stores",class:"w-full pl-9 pr-3 py-2.5 rounded-lg bg-white/10 placeholder-white/50 text-sm outline-none focus:ring-2 focus:ring-blue-400/50 transition-all"},null,512),[[Rt,i(l)]]),x[18]||(x[18]=a("svg",{class:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))])]),a("div",Sv,[a("div",Cv,[(p(!0),v(oe,null,ce(i(Ps),K=>(p(),v("button",{key:K.id,class:D(["w-full text-left p-3 rounded-lg transition-all duration-200 group",[i(d)===K.id?"bg-blue-500/20 o_border border-blue-400/30 shadow-lg":"bg-white/5 hover:bg-white/10 o_border border-transparent"]]),onClick:me=>je(K.id)},[a("div",Av,[a("span",{class:D(["font-medium text-sm truncate",i(d)===K.id?"text-blue-200":"text-white"])},E(K.id),3),a("div",{class:D(["w-2 h-2 rounded-full transition-colors",i(d)===K.id?"bg-blue-400":"bg-white/30"])},null,2)]),a("div",Ev,[a("span",Tv,[x[19]||(x[19]=a("div",{class:"w-1.5 h-1.5 rounded-full bg-green-400"},null,-1)),de(" "+E(We(K).stateCount),1)]),a("span",Lv,[x[20]||(x[20]=a("div",{class:"w-1.5 h-1.5 rounded-full bg-yellow-400"},null,-1)),de(" "+E(We(K).gettersCount),1)]),a("span",Bv,[x[21]||(x[21]=a("div",{class:"w-1.5 h-1.5 rounded-full bg-purple-400"},null,-1)),de(" "+E(We(K).actionsCount),1)])])],10,$v))),128))]),i(Ps).length?T("",!0):(p(),v("div",Pv,[...x[22]||(x[22]=[a("div",{class:"text-2xl mb-2"}," ๐ ",-1),a("div",{class:"text-sm"}," No stores found ",-1)])]))])])):T("",!0),i(c)==="echo"&&i(o)("echo")?(p(),v("div",Rv,[a("div",Iv,[a("div",Ov,[be(a("input",{"onUpdate:modelValue":x[2]||(x[2]=K=>Ge(C)?C.value=K:null),type:"text",placeholder:"Search echo entries...","aria-label":"Search echo entries",class:"w-full pl-9 pr-3 py-2.5 rounded-lg bg-white/10 placeholder-white/50 text-sm outline-none focus:ring-2 focus:ring-blue-400/50 transition-all"},null,512),[[Rt,i(C)]]),x[23]||(x[23]=a("svg",{class:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),a("div",Hv,[a("span",Fv,E(i(B).groups)+" groups / "+E(i(B).entries)+" entries / "+E(i(B).enabled)+" enabled ",1)])]),a("div",Dv,[a("div",Mv,[x[24]||(x[24]=a("h4",{class:"text-xs font-medium text-white/70 mb-2"}," Sort Order ",-1)),a("div",jv,[a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(U)==="desc"?"bg-blue-500/20 text-blue-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:x[3]||(x[3]=K=>U.value="desc")}," Newest First ",2),a("button",{class:D(["px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",i(U)==="asc"?"bg-blue-500/20 text-blue-200":"bg-white/10 text-white/70 hover:text-white"]),onClick:x[4]||(x[4]=K=>U.value="asc")}," Oldest First ",2)])]),a("div",Nv,[x[27]||(x[27]=a("h4",{class:"text-xs font-medium text-white/70 mb-2"}," Groups ",-1)),a("div",Gv,[(p(!0),v(oe,null,ce(i(w),K=>(p(),v("button",{key:K,class:D(["w-full text-left px-3 py-2 rounded-lg text-sm transition-colors flex items-center justify-between",i(R).includes(K)?"bg-green-500/20 text-green-200":"bg-white/5 text-white/80 hover:bg-white/10"]),onClick:me=>Tt(K)},[a("div",Uv,[a("span",Kv,E(K),1)]),a("div",Wv,[a("button",{class:"p-1 rounded o_border border-white/10 hover:bg-white/10 transition-colors",title:i(Fs)(K)?"Disable tracking":"Enable tracking","aria-label":i(Fs)(K)?"Disable tracking":"Enable tracking",onClick:Bo(me=>Rs(K),["stop"])},[i(Fs)(K)?(p(),v("svg",Vv,[...x[25]||(x[25]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.477 0 8.268 2.943 9.542 7-1.274 4.057-5.065 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])])):(p(),v("svg",Yv,[...x[26]||(x[26]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.477 0-8.268-2.943-9.542-7a10.05 10.05 0 012.331-3.956M6.223 6.223A9.956 9.956 0 0112 5c4.477 0 8.268 2.943 9.542 7a10.026 10.026 0 01-4.043 5.197M15 12a3 3 0 00-3-3M3 3l18 18"},null,-1)])]))],8,qv),a("span",Jv,E(i(S)[K]||0),1)])],10,zv))),128))])]),i(ke).length>0?(p(),v("div",Xv,[x[29]||(x[29]=a("h4",{id:"pages-filter-label",class:"text-xs font-medium text-white/70 mb-2"}," Pages ",-1)),be(a("select",{"onUpdate:modelValue":x[5]||(x[5]=K=>Ge(F)?F.value=K:null),"aria-labelledby":"pages-filter-label",class:"w-full px-3 py-2 rounded-lg bg-white/10 text-sm outline-none focus:ring-2 focus:ring-blue-400/50"},[x[28]||(x[28]=a("option",{value:""}," All Pages ",-1)),(p(!0),v(oe,null,ce(i(ke),K=>(p(),v("option",{key:K,value:K},E(K),9,Qv))),128))],512),[[vs,i(F)]])])):T("",!0),i(he).length>0?(p(),v("div",Zv,[x[31]||(x[31]=a("h4",{id:"components-filter-label",class:"text-xs font-medium text-white/70 mb-2"}," Components ",-1)),be(a("select",{"onUpdate:modelValue":x[6]||(x[6]=K=>Ge(M)?M.value=K:null),"aria-labelledby":"components-filter-label",class:"w-full px-3 py-2 rounded-lg bg-white/10 text-sm outline-none focus:ring-2 focus:ring-blue-400/50"},[x[30]||(x[30]=a("option",{value:""}," All Components ",-1)),(p(!0),v(oe,null,ce(i(he),K=>(p(),v("option",{key:K,value:K},E(K),9,eb))),128))],512),[[vs,i(M)]])])):T("",!0)])])):T("",!0)])),i(c)!=="echo"&&i(c)!=="policies"&&i(c)!=="api"&&i(c)!=="payload"&&i(c)!=="tracker"&&!i(d)?(p(),v("div",tb,[...x[32]||(x[32]=[a("div",{class:"text-center opacity-60"},[a("div",{class:"text-4xl mb-4"}," ๐ฆ "),a("div",{class:"text-lg font-medium mb-2"}," Select a store "),a("div",{class:"text-sm"}," Choose a store from the left to view its content ")],-1)])])):i(c)!=="echo"&&i(c)!=="policies"&&i(c)!=="api"&&i(c)!=="tracker"&&i(c)!=="payload"?(p(),v("div",sb,[a("div",ob,[a("div",nb,[a("div",rb,[(p(),v(oe,null,ce(g,K=>a("button",{key:K.key,class:D(["px-4 py-2 rounded-md text-sm font-medium transition-all",i(c)===K.key?`${K.bgColor} ${K.textColor} shadow-sm`:"text-white/70 hover:text-white hover:bg-white/10"]),onClick:me=>c.value=K.key},[a("span",ib,[a("div",{class:D(["w-2 h-2 rounded-full",K.dotColor])},null,2),de(" "+E(K.label),1)])],10,ab)),64))]),a("div",lb,[be(a("input",{"onUpdate:modelValue":x[7]||(x[7]=K=>Ge(u)?u.value=K:null),type:"text",placeholder:"Filter JSON keys (e.g. companies, *.companies, user.data)",class:"w-48 pl-8 pr-3 py-1.5 rounded-lg bg-white/10 placeholder-white/50 text-xs outline-none focus:ring-2 focus:ring-blue-400/50 transition-all","aria-label":"Filter JSON keys"},null,512),[[Rt,i(u)]]),q(ee,{name:"i-heroicons-funnel",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3 h-3 text-white/50"}),i(u)?(p(),v("button",{key:0,class:"px-3 py-2 rounded-lg text-xs font-medium transition-colors",onClick:gt}," โ ")):T("",!0)])]),a("div",{class:"flex items-center gap-2"},[a("button",{class:"px-3 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium transition-colors flex items-center gap-2",onClick:ia},[...x[33]||(x[33]=[a("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),de(" Copy ",-1)])])])]),a("div",cb,[x[35]||(x[35]=a("span",{class:"text-xs text-white/70"},"Add to Value Tracker",-1)),be(a("select",{id:"pinia-tracker-store-select","onUpdate:modelValue":x[8]||(x[8]=K=>Ge(k)?k.value=K:null),"aria-label":"Store",class:"px-2 py-1.5 rounded bg-white/10 text-xs"},[x[34]||(x[34]=a("option",{disabled:"",value:""}," Select store ",-1)),(p(!0),v(oe,null,ce(i(Mt),K=>(p(),v("option",{key:K.id,value:K.id},E(K.id),9,ub))),128))],512),[[vs,i(k)]]),be(a("input",{id:"pinia-tracker-path-input","onUpdate:modelValue":x[9]||(x[9]=K=>Ge(se)?se.value=K:null),"aria-label":"Path",type:"text",placeholder:"e.g. user.details.avatar",class:"w-64 max-w-full px-2 py-1.5 rounded bg-white/10 placeholder-white/50 text-xs outline-none"},null,512),[[Rt,i(se)]]),a("button",{class:"px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-medium",disabled:!i(se)||!(i(k)||i(d)),onClick:Ee}," Add ",8,db)]),a("div",pb,[i(fe)?(p(),v("pre",{key:0,class:"text-xs leading-tight font-mono whitespace-pre bg-black/20 o_p-4 o_pb-36",role:"button",tabindex:"0","aria-label":i(c)==="actions"?"Pinia actions JSON":"Pinia JSON (click a key to prepare tracking)",onClick:aa,onKeydown:[Xt(fn,["enter"]),Xt(Bo(fn,["prevent"]),["space"])],innerHTML:i(ra)},null,40,hb)):(p(),v("div",mb,[...x[36]||(x[36]=[a("div",{class:"text-2xl mb-2"}," ๐ ",-1),a("div",{class:"text-sm"}," No data available ",-1)])]))])])):i(c)==="tracker"?(p(),G(hf,{key:3,class:"flex-1 flex flex-col","pinia-tracked-configs":i(Z),"pinia-track-histories":i(L),"track-expanded":i(_),"format-track-timestamp":uo,"stringify-pretty":i(ys),"highlight-json":i(rt),"get-diff-text":Dt,"toggle-track-expanded":Ts,"toggle-select-for-diff":lo,"is-entry-selected-for-diff":co,"remove-tracking":lt,"remove-tracking-entry":ls},null,8,["pinia-tracked-configs","pinia-track-histories","track-expanded","stringify-pretty","highlight-json"])):i(c)==="echo"&&i(o)("echo")?(p(),G(Rh,{key:4,class:"flex-1 flex flex-col","echo-entries":i(b),"echo-filtered-entries":i(Fe),"echo-search":i(C),"echo-selected-groups":i(R),"echo-unique-pages":i(ke),"echo-unique-components":i(he),"echo-selected-page":i(F),"echo-selected-component":i(M),"echo-sort-order":i(U),"echo-persisted-groups":i(I),"clear-all-echo-entries":jt,"clear-echo-filters":Is,"toggle-echo-group":Tt,"remove-echo-entry-by-id":ft,"toggle-echo-group-persist":Os,"remove-echo-group":ho,"onUpdate:echoSearch":x[10]||(x[10]=K=>C.value=K),"onUpdate:echoSortOrder":x[11]||(x[11]=K=>U.value=K),"onUpdate:echoSelectedPage":x[12]||(x[12]=K=>F.value=K),"onUpdate:echoSelectedComponent":x[13]||(x[13]=K=>M.value=K),onEchoTrackingChanged:Ke,onEchoStats:x[14]||(x[14]=K=>B.value=K)},null,8,["echo-entries","echo-filtered-entries","echo-search","echo-selected-groups","echo-unique-pages","echo-unique-components","echo-selected-page","echo-selected-component","echo-sort-order","echo-persisted-groups"])):i(c)==="policies"&&i(o)("policy")?(p(),G(nv,{key:5})):i(c)==="api"&&i(o)("api")?(p(),G(Gm,{key:6})):i(c)==="payload"&&i(o)("api")?(p(),G(S0,{key:7,class:""})):T("",!0)])],4)):T("",!0)])}}}),gb=Object.assign(fb,{__name:"SpaDebugDock"}),vb=()=>{const{getScreenshots:e}=mr(),{getPageComponents:t}=li(),{initiateRunner:s}=Ws(),o=N(!1),n=st(),r=async l=>{await e(l),await t(l),await s(l)};return ye(()=>[n.params.pid,n.params.sid],([l,u])=>{l&&u?(o.value=!0,r(u)):o.value=!1},{immediate:!0}),{isInProjectLevel:o}},bb=()=>{const e=ci(),t=st(),s=Y(()=>t.params),o=cr(),{t:n}=bt();ye(()=>e.getQueue,j=>{c()},{deep:!0});const r=N(null),l=Wn(),u=ui(),d=mt(),c=()=>{Object.keys(e.getQueue).forEach(j=>{const H=e.getQueue[j];if(!H)return;const O=Number(j),Z=g(O),{message:L,action:se,attributes:k}=H,_=JSON.parse(k);if(/^crawl\.(run|abort|start|finish|result)$/.test(se)){const $=se.split(".")[1];if(!$)return;const W=_.crawl_id,re=_.system_id,pe=_.project_id,Ee=_.crawl_status;$==="run"?l.addCrawlerId(Number(pe),Number(re),W):l.updateCrawlerJob(W,Ee),r.value={action:$,payload:k,pid:O};return}if(se.startsWith("system.run.full.finish")){_n("websocketHandler",`system.run.full.finish ${O}`),console.log("system.run.full.finish",L,k,j),C(O),B(j),u.setAllMetricDataAreAvailable(Number(O),Number(Z));return}switch(se){case"project.status.change":{R(O,L==="open"?"open":"close",_);break}case"system.component.screenshot.create":{F(_);break}case"component.finder.found":{M(_);break}case"component.finder.finish":{U(_);break}case"system.run.full.start":{I(j);break}case"project.first_result_available":{console.log("first_result_available",L,k,j),y(),u.updateProjectMemoriesWithSocket(L,Number(O),Number(Z));break}case"system.run.full.finish.first":{console.log("system.run.full.finish.first",L,k,j),_n("websocketHandler",`system.run.full.finish.first ${O}`);break}}})},{kapi:h}=Un(),f=Zt(),{downgradeCacheTimeForPayload:m}=qn(),g=j=>d.allSystems.find(H=>H.pid===Number(j))?.sid,b=async(j,H=!1)=>{if(!j)return;const O=`incidents-current-${j}`,Z=`incidents-since-${j}`;if(j===Number(s.value.pid)){await Sn([O]),H&&await Sn([Z]);return}m(O),H&&m(Z)},w=async(j,H)=>{const O=H.last_incident_id||!1;if(!(!O||!j)){try{const Z=await h("Incident").then(_=>_.find(Number(j),Number(O)));await b(j);const L=Z.details.message||n("projectStatusChange.openSentence"),se=Z.details.system.id,k=d.allSystems.find(_=>_.sid===se)?.pid;o.add({title:n("incidentToasts.open"),color:"error",duration:1e5,icon:we.icoAlertCircle,description:di("div",{class:"text-sm line-clamp-3",innerHTML:L}),actions:[{label:n("goToIncident"),color:"error",variant:"outline",icon:we.icoIncident,onClick:()=>{kn(`/p/incidents-current-${k}-${se}?incidentId=${O}`)}}]})}catch(Z){console.error("reportIncident",Z)}e.deleteQueueEntry(String(j))}},y=async j=>{},S=async j=>{await b(j,!0);const H=g(j);if(!H)return;const O=()=>{if(H)return{label:n("checkPastIncidents"),color:"success",variant:"outline",icon:we.icoCheckCircle,onClick:()=>{kn(`/p/incidents-since-${j}-${H}`)}}};o.add({title:n("incidentToasts.close"),color:"success",icon:we.icoCheckCircle,actions:[O()]}),e.deleteQueueEntry(String(j))},C=j=>{const H=g(j);H&&(j===Number(s.value.pid)&&s.value.sid?f.updateSystemScores(Number(s.value.pid),Number(s.value.sid)):f.expireCacheMap.systems[H]&&(f.expireCacheMap.systems[H]=null))},R=wn(async(j,H,O)=>{C(j),H==="open"?w(j,O):S(j)},5e3),F=j=>{const H=j.system_id;H&&mr().getScreenshots(H,!0)},M=j=>{const H=j;!H||!l||l.updatePageComponentFinderJob(H.run_id,"running",{componentIdentifier:H.component_identifier,componentType:H.component_type,path:H.path,uri:H.uri})},U=wn(async j=>{const H=j;!H||!l||l.finishPageComponentFinderJob(H.run_id)},5e3),I=j=>{j!==s.value.pid||!s.value.sid||Ws().initiateRunner(s.value.sid,!0)},B=j=>{j!==s.value.pid||!s.value.sid||Ws().overrideFirstRunState(s.value.sid)};return{crawlerEvents:r,addCrawlerJob:(j,H)=>{}}},yb={class:"@container/pagecontainer"},xb={class:"flex min-h-screen [--kiv-appheader:--spacing(11)] [--kiv-currentproject:--spacing(22)]"},_b={class:"flex-auto !min-h-screen flex flex-col relative"},wb={class:"flex flex-auto"},kb={key:0,class:"w-full shrink-0 flex flex-col"},Sb={class:"flex flex-col h-[calc(100vh-(var(--kiv-appheader)+var(--kiv-currentproject)))] sticky top-32"},Cb={key:1,class:"flex flex-col o_gap-3 o_mb-3"},p1=ue({__name:"default",setup(e){const t=tt(),{setPidWithRoute:s}=mt();s();const{isInProjectLevel:o}=vb(),{tracker:n}=tn(),r=pi(),{echo:l,echoInfo:u}=hi();r.beforeEach((m,g,b)=>{n("change_page","to",m.name),l("navigation",{from:g.path,to:m.path,timestamp:Date.now()}),g.name==="index"&&typeof m.path=="string"&&m.path.startsWith("/p")&&t.temporarilyHideMainContent(1e3),b()}),kt(()=>{t.temporarilyHideMainContent(1400),u("mounting","Layout mounted")}),bb();const d=st(),c=cr(),{t:h}=bt();ye(()=>d,()=>{if(d.query.upsellUpgradeSuccess){if(setTimeout(()=>{r.replace({query:{...d.query,upsellUpgradeSuccess:void 0}})},500),!o.value)return;c.add({title:h("SuccessfulUpgrade"),description:h("SuccessfulUpgradeDescription"),color:"success",icon:we.icoCheckCircle})}},{immediate:!0});const{inSettingsLevel:f}=yt();return(m,g)=>{const b=Fd,w=fr,y=ap,S=hp,C=fp,R=bp,F=Cp,M=Lp,U=Ip,I=gb;return p(),v("div",yb,[a("div",xb,[a("div",_b,[q(b,{"data-testid":"app-header"}),a("div",wb,[a("div",{class:D([[i(t).mobileNavigation?"!translate-x-0 relative w-full !visible":"border-r",i(o)?"w-[265px]":"w-0"],"bg-uiBg-10 border-uiBorder-light o_border -translate-x-[200%] absolute o_z-10 sm:flex transition duration-300 @pnav/pagecontainer:relative @pnav/pagecontainer:translate-x-0 @pnav/pagecontainer:o_shadow-xl dark:shadow-neutral-900"])},[i(o)?(p(),v("div",kb,[q(w,{class:"hidden @pnav/pagecontainer:flex sticky top-10"}),a("div",Sb,[be(q(y,{class:"grow o_overflow-y-auto hide-scrollbar"},null,512),[[Ro,!i(t).hideMainContent]])])])):T("",!0)],2),be(a("div",{class:D([[i(t).mobileNavigation?"hidden invisible absolute o_top-0 o_left-0 w-full h-screen transform translate-x-full transition-transform":"translate-x-0"],"flex-auto o_px-8 o_pb-4 o_pt-6 @container/mainpage max-w-[1400px]"])},[i(f)?T("",!0):(p(),G(S,{key:0})),i(o)?(p(),v("div",Cb,[q(C),q(R)])):T("",!0),le(m.$slots,"default"),q(F),q(M)],2),[[Ro,!i(t).hideMainContent]])])])]),q(U),q(I)])}}});export{p1 as default};
Back to Directory
File Manager