@whoz-oss/coday-client 0.233.1 → 0.235.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/browser/{chunk-2OX7XSO7.js → chunk-3L5HH2LW.js} +1 -1
  2. package/browser/chunk-3SWGL6G7.js +1 -0
  3. package/browser/{chunk-GULJQNKJ.js → chunk-3WHV3A3F.js} +1 -1
  4. package/browser/{chunk-ZJ5WTNW7.js → chunk-3XEA5TTG.js} +1 -1
  5. package/browser/{chunk-NAJJT42Y.js → chunk-4QUKFJVG.js} +1 -1
  6. package/browser/{chunk-XZAGZJYJ.js → chunk-5F4OBAQR.js} +1 -1
  7. package/browser/{chunk-LVLF3D4X.js → chunk-5P3YDX4D.js} +1 -1
  8. package/browser/{chunk-V4WIZDIH.js → chunk-62SCRDTI.js} +1 -1
  9. package/browser/{chunk-5EIDKSSY.js → chunk-6OUF4MB3.js} +1 -1
  10. package/browser/{chunk-OFLO4C7X.js → chunk-6V5ZHXTF.js} +1 -1
  11. package/browser/chunk-7PHHASXE.js +1 -0
  12. package/browser/{chunk-2RRKNP4O.js → chunk-7WNGYNNF.js} +1 -1
  13. package/browser/chunk-A2IQII4O.js +1 -0
  14. package/browser/{chunk-63DV6LLE.js → chunk-AK3ITDZL.js} +1 -1
  15. package/browser/{chunk-UCATWB2P.js → chunk-B235KWLK.js} +1 -1
  16. package/browser/{chunk-OFPREK4V.js → chunk-B4YVERDA.js} +1 -1
  17. package/browser/{chunk-VZVJKZA2.js → chunk-BJ6IXKIG.js} +1 -1
  18. package/browser/{chunk-BYGLGHPS.js → chunk-BSULGZWF.js} +1 -1
  19. package/browser/{chunk-FS4CUJQH.js → chunk-C7HN2AHW.js} +1 -1
  20. package/browser/{chunk-4KS5XFO4.js → chunk-CMDN4G5T.js} +1 -1
  21. package/browser/{chunk-ALD52Y36.js → chunk-D4DYD37W.js} +1 -1
  22. package/browser/chunk-DDBWRK3B.js +1 -0
  23. package/browser/{chunk-XKAY4JO3.js → chunk-DYASMOHQ.js} +1 -1
  24. package/browser/{chunk-56F7GUQR.js → chunk-EPOMVQLK.js} +1 -1
  25. package/browser/{chunk-NQVAKMAF.js → chunk-FIDJLAO5.js} +1 -1
  26. package/browser/{chunk-55CCIZ6Y.js → chunk-FKSUXVTW.js} +1 -1
  27. package/browser/{chunk-KY2WN2WL.js → chunk-GGJJHI5J.js} +1 -1
  28. package/browser/{chunk-ZGOOG7E4.js → chunk-GVUZDCHM.js} +1 -1
  29. package/browser/{chunk-OMBUBJIY.js → chunk-HGDDIJKH.js} +1 -1
  30. package/browser/chunk-HQF5YXBC.js +1 -0
  31. package/browser/chunk-HW7FY6FY.js +1 -0
  32. package/browser/{chunk-4MIM6YHV.js → chunk-IGXPPLQW.js} +1 -1
  33. package/browser/{chunk-SBHTD5EV.js → chunk-IUKPWUMW.js} +1 -1
  34. package/browser/chunk-J3QUVW75.js +1 -0
  35. package/browser/chunk-JD6LMKJY.js +1 -0
  36. package/browser/{chunk-QAGM2FI6.js → chunk-JWECOKZF.js} +1 -1
  37. package/browser/chunk-M4ES4I34.js +1 -0
  38. package/browser/{chunk-TT5QO735.js → chunk-MGHX6XY3.js} +1 -1
  39. package/browser/{chunk-OUCM7C5E.js → chunk-OESN2OVC.js} +1 -1
  40. package/browser/chunk-OJPNIW6G.js +1 -0
  41. package/browser/chunk-OLEK57CJ.js +1 -0
  42. package/browser/{chunk-HV4YVRZD.js → chunk-PBZL7DN5.js} +1 -1
  43. package/browser/chunk-PL3BJFLT.js +1 -0
  44. package/browser/{chunk-U6DZITWN.js → chunk-QNOZT6US.js} +1 -1
  45. package/browser/{chunk-EUKRA2OA.js → chunk-QO3SLUF6.js} +1 -1
  46. package/browser/chunk-RDEFHYHJ.js +1 -0
  47. package/browser/{chunk-MHB6HAME.js → chunk-SLVL4O7X.js} +1 -1
  48. package/browser/{chunk-OJAJVOW4.js → chunk-T5DS7HZO.js} +1 -1
  49. package/browser/chunk-U26U4YUX.js +1 -0
  50. package/browser/chunk-UWESGTIU.js +1 -0
  51. package/browser/{chunk-SG2Y5LGP.js → chunk-VDPBH6I4.js} +1 -1
  52. package/browser/{chunk-MKGPVNPI.js → chunk-XZDUSWYE.js} +1 -1
  53. package/browser/{chunk-3DCEAZDI.js → chunk-YONCBD5A.js} +1 -1
  54. package/browser/{chunk-TOQLOSTJ.js → chunk-ZO272F3U.js} +1 -1
  55. package/browser/index.html +1 -1
  56. package/browser/{main-SDUET5IO.js → main-6K2RB63O.js} +1 -1
  57. package/package.json +1 -1
  58. package/browser/chunk-3PL5XB7S.js +0 -1
  59. package/browser/chunk-4WS3QONK.js +0 -1
  60. package/browser/chunk-5SWFEZKV.js +0 -1
  61. package/browser/chunk-7ZDYCVKF.js +0 -1
  62. package/browser/chunk-E5K3YORT.js +0 -1
  63. package/browser/chunk-EJX3SCU5.js +0 -1
  64. package/browser/chunk-LPBSLDC7.js +0 -1
  65. package/browser/chunk-MDHGCSE2.js +0 -1
  66. package/browser/chunk-MFNQXB7D.js +0 -1
  67. package/browser/chunk-VH7ZEMCE.js +0 -1
@@ -1 +1 @@
1
- import{s as ri}from"./chunk-VH7ZEMCE.js";import{a as S,b as K,e as ii,f as xe,h as x,i as Ae,j as ce}from"./chunk-QVW2GZXC.js";import{a as ci}from"./chunk-QR2CLZRO.js";import{b as ai,c as li,e as be}from"./chunk-BZA46IMY.js";import"./chunk-26GNTYMR.js";import{b as Jt,e as ei,f as ti}from"./chunk-COLWSJEP.js";import{a as si}from"./chunk-YKT74LKI.js";import{c as ni}from"./chunk-KTYUC4CA.js";import"./chunk-TQXOFKZO.js";import{c as oi}from"./chunk-PUWEEZSA.js";import{b as we}from"./chunk-TCYL6I4G.js";import"./chunk-GO5IXCK2.js";import{B as Ft,Ca as Xe,D as Lt,G as zt,L as Kt,La as Vt,Oa as $t,Sc as Xt,Tc as xt,V as jt,W as v,Wa as Gt,Yc as Zt,Z as Ee,a as _e,ba as ve,c as Rt,ca as z,d as G,fb as Te,ka as Bt,la as qt,m as kt,pa as Qt,q as Ye,r as Se,sa as Ut,t as Ot,u as It,ub as Wt,vc as Ht,wc as Yt}from"./chunk-3DOXTB6J.js";function ui(s){return new v(3e3,!1)}function mn(){return new v(3100,!1)}function fn(){return new v(3101,!1)}function pn(s){return new v(3001,!1)}function gn(s){return new v(3003,!1)}function yn(s){return new v(3004,!1)}function di(s,e){return new v(3005,!1)}function mi(){return new v(3006,!1)}function fi(){return new v(3007,!1)}function pi(s,e){return new v(3008,!1)}function gi(s){return new v(3002,!1)}function yi(s,e,t,i,n){return new v(3010,!1)}function _i(){return new v(3011,!1)}function Si(){return new v(3012,!1)}function Ei(){return new v(3200,!1)}function vi(){return new v(3202,!1)}function Ti(){return new v(3013,!1)}function Ai(s){return new v(3014,!1)}function wi(s){return new v(3015,!1)}function bi(s){return new v(3016,!1)}function Pi(s,e){return new v(3404,!1)}function _n(s){return new v(3502,!1)}function Ni(s){return new v(3503,!1)}function Mi(){return new v(3300,!1)}function Ci(s){return new v(3504,!1)}function Di(s){return new v(3301,!1)}function Ri(s,e){return new v(3302,!1)}function ki(s){return new v(3303,!1)}function Oi(s,e){return new v(3400,!1)}function Ii(s){return new v(3401,!1)}function Fi(s){return new v(3402,!1)}function Li(s,e){return new v(3505,!1)}function V(s){switch(s.length){case 0:return new x;case 1:return s[0];default:return new Ae(s)}}function tt(s,e,t=new Map,i=new Map){let n=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((_,y)=>{let m=y,g=_;if(y!=="offset")switch(m=s.normalizePropertyName(m,n),g){case ce:g=t.get(y);break;case K:g=i.get(y);break;default:g=s.normalizeStyleValue(y,m,g,n);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),n.length)throw _n(n);return r}function Pe(s,e,t,i){switch(e){case"start":s.onStart(()=>i(t&&Ze(t,"start",s)));break;case"done":s.onDone(()=>i(t&&Ze(t,"done",s)));break;case"destroy":s.onDestroy(()=>i(t&&Ze(t,"destroy",s)));break}}function Ze(s,e,t){let i=t.totalTime,n=!!t.disabled,r=Ne(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,i??s.totalTime,n),o=s._data;return o!=null&&(r._data=o),r}function Ne(s,e,t,i,n="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:i,phaseName:n,totalTime:r,disabled:!!o}}function k(s,e,t){let i=s.get(e);return i||s.set(e,i=t),i}function it(s){let e=s.indexOf(":"),t=s.substring(1,e),i=s.slice(e+1);return[t,i]}var Sn=typeof document>"u"?null:document.documentElement;function Me(s){let e=s.parentNode||s.host||null;return e===Sn?null:e}function En(s){return s.substring(1,6)=="ebkit"}var Z=null,hi=!1;function zi(s){Z||(Z=vn()||{},hi=Z.style?"WebkitAppearance"in Z.style:!1);let e=!0;return Z.style&&!En(s)&&(e=s in Z.style,!e&&hi&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in Z.style)),e}function vn(){return typeof document<"u"?document.body:null}function nt(s,e){for(;e;){if(e===s)return!0;e=Me(e)}return!1}function st(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let i=s.querySelector(e);return i?[i]:[]}var Tn=1e3,rt="{{",An="}}",ot="ng-enter",Ce="ng-leave",ue="ng-trigger",he=".ng-trigger",at="ng-animating",De=".ng-animating";function U(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Je(parseFloat(e[1]),e[2])}function Je(s,e){return e==="s"?s*Tn:s}function de(s,e,t){return s.hasOwnProperty("duration")?s:bn(s,e,t)}var wn=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function bn(s,e,t){let i,n=0,r="";if(typeof s=="string"){let o=s.match(wn);if(o===null)return e.push(ui(s)),{duration:0,delay:0,easing:""};i=Je(parseFloat(o[1]),o[2]);let a=o[3];a!=null&&(n=Je(parseFloat(a),o[4]));let l=o[5];l&&(r=l)}else i=s;if(!t){let o=!1,a=e.length;i<0&&(e.push(mn()),o=!0),n<0&&(e.push(fn()),o=!0),o&&e.splice(a,0,ui(s))}return{duration:i,delay:n,easing:r}}function Ki(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function j(s,e,t){e.forEach((i,n)=>{let r=Re(n);t&&!t.has(n)&&t.set(n,s.style[r]),s.style[r]=i})}function W(s,e){e.forEach((t,i)=>{let n=Re(i);s.style[n]=""})}function re(s){return Array.isArray(s)?s.length==1?s[0]:ii(s):s}function ji(s,e,t){let i=e.params||{},n=lt(s);n.length&&n.forEach(r=>{i.hasOwnProperty(r)||t.push(pn(r))})}var et=new RegExp(`${rt}\\s*(.+?)\\s*${An}`,"g");function lt(s){let e=[];if(typeof s=="string"){let t;for(;t=et.exec(s);)e.push(t[1]);et.lastIndex=0}return e}function oe(s,e,t){let i=`${s}`,n=i.replace(et,(r,o)=>{let a=e[o];return a==null&&(t.push(gn(o)),a=""),a.toString()});return n==i?s:n}var Pn=/-+([a-z0-9])/g;function Re(s){return s.replace(Pn,(...e)=>e[1].toUpperCase())}function Bi(s,e){return s===0||e===0}function qi(s,e,t){if(t.size&&e.length){let i=e[0],n=[];if(t.forEach((r,o)=>{i.has(o)||n.push(o),i.set(o,r)}),n.length)for(let r=1;r<e.length;r++){let o=e[r];n.forEach(a=>o.set(a,ke(s,a)))}}return e}function O(s,e,t){switch(e.type){case S.Trigger:return s.visitTrigger(e,t);case S.State:return s.visitState(e,t);case S.Transition:return s.visitTransition(e,t);case S.Sequence:return s.visitSequence(e,t);case S.Group:return s.visitGroup(e,t);case S.Animate:return s.visitAnimate(e,t);case S.Keyframes:return s.visitKeyframes(e,t);case S.Style:return s.visitStyle(e,t);case S.Reference:return s.visitReference(e,t);case S.AnimateChild:return s.visitAnimateChild(e,t);case S.AnimateRef:return s.visitAnimateRef(e,t);case S.Query:return s.visitQuery(e,t);case S.Stagger:return s.visitStagger(e,t);default:throw yn(e.type)}}function ke(s,e){return window.getComputedStyle(s)[e]}var bt=(()=>{class s{validateStyleProperty(t){return zi(t)}containsElement(t,i){return nt(t,i)}getParentElement(t){return Me(t)}query(t,i,n){return st(t,i,n)}computeStyle(t,i,n){return n||""}animate(t,i,n,r,o,a=[],l){return new x(n,r)}static \u0275fac=function(i){return new(i||s)};static \u0275prov=Ee({token:s,factory:s.\u0275fac})}return s})(),ee=class{static NOOP=new bt},te=class{};var Nn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),ze=class extends te{normalizePropertyName(e,t){return Re(e)}normalizeStyleValue(e,t,i,n){let r="",o=i.toString().trim();if(Nn.has(t)&&i!==0&&i!=="0")if(typeof i=="number")r="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&n.push(di(e,i))}return o+r}};var Ke="*";function Mn(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(i=>Cn(i,t,e)):t.push(s),t}function Cn(s,e,t){if(s[0]==":"){let l=Dn(s,t);if(typeof l=="function"){e.push(l);return}s=l}let i=s.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return t.push(wi(s)),e;let n=i[1],r=i[2],o=i[3];e.push(Qi(n,o));let a=n==Ke&&o==Ke;r[0]=="<"&&!a&&e.push(Qi(o,n))}function Dn(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(bi(s)),"* => *"}}var Oe=new Set(["true","1"]),Ie=new Set(["false","0"]);function Qi(s,e){let t=Oe.has(s)||Ie.has(s),i=Oe.has(e)||Ie.has(e);return(n,r)=>{let o=s==Ke||s==n,a=e==Ke||e==r;return!o&&t&&typeof n=="boolean"&&(o=n?Oe.has(s):Ie.has(s)),!a&&i&&typeof r=="boolean"&&(a=r?Oe.has(e):Ie.has(e)),o&&a}}var Ji=":self",Rn=new RegExp(`s*${Ji}s*,?`,"g");function en(s,e,t,i){return new ft(s).build(e,t,i)}var Ui="",ft=class{_driver;constructor(e){this._driver=e}build(e,t,i){let n=new pt(t);return this._resetContextStyleTimingState(n),O(this,re(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector=Ui,e.collectedStyles=new Map,e.collectedStyles.set(Ui,new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,n=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(mi()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==S.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==S.Transition){let l=this.visitTransition(a,t);i+=l.queryCount,n+=l.depCount,o.push(l)}else t.errors.push(fi())}),{type:S.Trigger,name:e.name,states:r,transitions:o,queryCount:i,depCount:n,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),n=e.options&&e.options.params||null;if(i.containsDynamicStyles){let r=new Set,o=n||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{lt(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(pi(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:i,options:n?{params:n}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=O(this,re(e.animation),t),n=Mn(e.expr,t.errors);return{type:S.Transition,matchers:n,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:J(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(i=>O(this,i,t)),options:J(e.options)}}visitGroup(e,t){let i=t.currentTime,n=0,r=e.steps.map(o=>{t.currentTime=i;let a=O(this,o,t);return n=Math.max(n,t.currentTime),a});return t.currentTime=n,{type:S.Group,steps:r,options:J(e.options)}}visitAnimate(e,t){let i=Fn(e.timings,t.errors);t.currentAnimateTimings=i;let n,r=e.styles?e.styles:xe({});if(r.type==S.Keyframes)n=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};i.easing&&(c.easing=i.easing),o=xe(c)}t.currentTime+=i.duration+i.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,n=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:i,style:n,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of n)typeof a=="string"?a===K?i.push(a):t.errors.push(gi(a)):i.push(new Map(Object.entries(a)));let r=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(rt)>=0){r=!0;break}}}),{type:S.Style,styles:i,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,n=t.currentTime,r=t.currentTime;i&&r>0&&(r-=i.duration+i.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=n&&r>=h.startTime&&n<=h.endTime&&(t.errors.push(yi(l,h.startTime,h.endTime,r,n)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:n}),t.options&&ji(a,t.options,t.errors)})})}visitKeyframes(e,t){let i={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(_i()),i;let n=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let b=this._makeStyleAst(w,t),C=b.offset!=null?b.offset:In(b.styles),N=0;return C!=null&&(r++,N=b.offset=C),l=l||N<0||N>1,a=a||N<c,c=N,o.push(N),b});l&&t.errors.push(Si()),a&&t.errors.push(Ei());let u=e.steps.length,_=0;r>0&&r<u?t.errors.push(vi()):r==0&&(_=n/(u-1));let y=u-1,m=t.currentTime,g=t.currentAnimateTimings,T=g.duration;return h.forEach((w,b)=>{let C=_>0?b==y?1:_*b:o[b],N=C*T;t.currentTime=m+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=C,i.styles.push(w)}),i}visitReference(e,t){return{type:S.Reference,animation:O(this,re(e.animation),t),options:J(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:J(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:J(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,n=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=kn(e.selector);t.currentQuerySelector=i.length?i+" "+r:r,k(t.collectedStyles,t.currentQuerySelector,new Map);let a=O(this,re(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:S.Query,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:J(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Ti());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:de(e.timings,t.errors,!0);return{type:S.Stagger,animation:O(this,re(e.animation),t),timings:i,options:null}}};function kn(s){let e=!!s.split(/\s*,\s*/).find(t=>t==Ji);return e&&(s=s.replace(Rn,"")),s=s.replace(/@\*/g,he).replace(/@\w+/g,t=>he+"-"+t.slice(1)).replace(/:animating/g,De),[s,e]}function On(s){return s?_e({},s):null}var pt=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function In(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Fn(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=de(s,e).duration;return ct(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=ct(0,0,"");return r.dynamic=!0,r.strValue=t,r}let n=de(t,e);return ct(n.duration,n.delay,n.easing)}function J(s){return s?(s=_e({},s),s.params&&(s.params=On(s.params))):s={},s}function ct(s,e,t){return{duration:s,delay:e,easing:t}}function Pt(s,e,t,i,n,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:i,duration:n,delay:r,totalTime:n+r,easing:o,subTimeline:a}}var fe=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ln=1,zn=":enter",Kn=new RegExp(zn,"g"),jn=":leave",Bn=new RegExp(jn,"g");function tn(s,e,t,i,n,r=new Map,o=new Map,a,l,c=[]){return new gt().buildKeyframes(s,e,t,i,n,r,o,a,l,c)}var gt=class{buildKeyframes(e,t,i,n,r,o,a,l,c,h=[]){c=c||new fe;let u=new yt(e,t,c,n,r,h,[]);u.options=l;let _=l.delay?U(l.delay):0;u.currentTimeline.delayNextStep(_),u.currentTimeline.setStyles([o],null,u.errors,l),O(this,i,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[Pt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let n=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,n,n.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let n of e){let r=n?.delay;if(r){let o=typeof r=="number"?r:U(oe(r,n?.params??{},t.errors));i.delayNextStep(o)}}}_visitSubInstructions(e,t,i){let r=t.currentTimeline.currentTime,o=i.duration!=null?U(i.duration):null,a=i.delay!=null?U(i.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,n=t,r=e.options;if(r&&(r.params||r.delay)&&(n=t.createSubContext(r),n.transformIntoNewTimeline(),r.delay!=null)){n.previousNode.type==S.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=je);let o=U(r.delay);n.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>O(this,o,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],n=t.currentTimeline.currentTime,r=e.options&&e.options.delay?U(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),O(this,o,a),n=Math.max(n,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(n),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue,n=t.params?oe(i,t.params,t.errors):i;return de(n,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),n=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),n.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(i.duration),this.visitStyle(r,t),n.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,n=t.currentAnimateTimings;!n&&i.hasCurrentStyleProperties()&&i.forwardFrame();let r=n&&n.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(r):i.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,n=t.currentTimeline.duration,r=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(n+r),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,n=e.options||{},r=n.delay?U(n.delay):0;r&&(t.previousNode.type===S.Style||i==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=je);let o=i,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),O(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let _=u.currentTimeline.currentTime;o=Math.max(o,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,n=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;O(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=n.currentTime-u+(n.startTime-i.currentTimeline.startTime)}},je={},yt=class s{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=je;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,i,n,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new Be(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,n=this.options;i.duration!=null&&(n.duration=U(i.duration)),i.delay!=null&&(n.delay=U(i.delay));let r=i.params;if(r){let o=n.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=oe(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach(n=>{i[n]=t[n]})}}return e}createSubContext(e=null,t,i){let n=t||this.element,r=new s(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=je,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let n={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},r=new _t(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,n,r,o){let a=[];if(n&&a.push(this.element),e.length>0){e=e.replace(Kn,"."+this._enterClassName),e=e.replace(Bn,"."+this._leaveClassName);let l=i!=1,c=this._driver.query(this.element,e,l);i!==0&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!r&&a.length==0&&o.push(Ai(t)),a}},Be=class s{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,i,n){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=n,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new s(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ln,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||K),this._currentKeyframe.set(t,K);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,n){t&&this._previousKeyframe.set("easing",t);let r=n&&n.params||{},o=qn(e,this._globalTimelineStyles);for(let[a,l]of o){let c=oe(l,r,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??K),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{let n=this._styleSummary.get(i);(!n||t.time>n.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===ce?e.add(u):h===K&&t.add(u)}),i||c.set("offset",l/this.duration),n.push(c)});let r=[...e.values()],o=[...t.values()];if(i){let a=n[0],l=new Map(a);a.set("offset",0),l.set("offset",1),n=[a,l]}return Pt(this.element,n,r,o,this.duration,this.startTime,this.easing,!1)}},_t=class extends Be{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,i,n,r,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=i+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",Vi(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let _=new Map(e[u]),y=_.get("offset"),m=t+y*i;_.set("offset",Vi(m/o)),r.push(_)}i=o,t=0,n="",e=r}return Pt(this.element,e,this.preStyleProps,this.postStyleProps,i,t,n,!0)}};function Vi(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function qn(s,e){let t=new Map,i;return s.forEach(n=>{if(n==="*"){i??=e.keys();for(let r of i)t.set(r,K)}else for(let[r,o]of n)t.set(r,o)}),t}function $i(s,e,t,i,n,r,o,a,l,c,h,u,_){return{type:0,element:s,triggerName:e,isRemovalTransition:n,fromState:t,fromStyles:r,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:_}}var ut={},qe=class{_triggerName;ast;_stateStyles;constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,n){return Qn(this.ast.matchers,e,t,i,n)}buildStyles(e,t,i){let n=this._stateStyles.get("*");return e!==void 0&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(t,i):new Map}build(e,t,i,n,r,o,a,l,c,h){let u=[],_=this.ast.options&&this.ast.options.params||ut,y=a&&a.params||ut,m=this.buildStyles(i,y,u),g=l&&l.params||ut,T=this.buildStyles(n,g,u),w=new Set,b=new Map,C=new Map,N=n==="void",ne={params:nn(g,_),delay:this.ast.options?.delay},q=h?[]:tn(e,t,this.ast.animation,r,o,m,T,ne,c,u),D=0;return q.forEach(R=>{D=Math.max(R.duration+R.delay,D)}),u.length?$i(t,this._triggerName,i,n,N,m,T,[],[],b,C,D,u):(q.forEach(R=>{let H=R.element,se=k(b,H,new Set);R.preStyleProps.forEach(Y=>se.add(Y));let Nt=k(C,H,new Set);R.postStyleProps.forEach(Y=>Nt.add(Y)),H!==t&&w.add(H)}),$i(t,this._triggerName,i,n,N,m,T,q,[...w.values()],b,C,D))}};function Qn(s,e,t,i,n){return s.some(r=>r(e,t,i,n))}function nn(s,e){let t=_e({},e);return Object.entries(s).forEach(([i,n])=>{n!=null&&(t[i]=n)}),t}var St=class{styles;defaultParams;normalizer;constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,n=nn(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=oe(o,n,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),i.set(a,o)})}),i}};function Un(s,e,t){return new Et(s,e,t)}var Et=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,t.states.forEach(n=>{let r=n.options&&n.options.params||{};this.states.set(n.name,new St(n.style,r,i))}),Gi(this.states,"true","1"),Gi(this.states,"false","0"),t.transitions.forEach(n=>{this.transitionFactories.push(new qe(e,n,this.states))}),this.fallbackTransition=Vn(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,n){return this.transitionFactories.find(o=>o.match(e,t,i,n))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function Vn(s,e,t){let i=[(o,a)=>!0],n={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:n,matchers:i,options:null,queryCount:0,depCount:0};return new qe(s,r,e)}function Gi(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var $n=new fe,vt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i}register(e,t){let i=[],n=[],r=en(this._driver,t,i,n);if(i.length)throw Ni(i);this._animations.set(e,r)}_buildPlayer(e,t,i){let n=e.element,r=tt(this._normalizer,e.keyframes,t,i);return this._driver.animate(n,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let n=[],r=this._animations.get(e),o,a=new Map;if(r?(o=tn(this._driver,t,r,ot,Ce,new Map,new Map,i,$n,n),o.forEach(h=>{let u=k(a,h.element,new Map);h.postStyleProps.forEach(_=>u.set(_,null))})):(n.push(Mi()),o=[]),n.length)throw Ci(n);a.forEach((h,u)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(u,y,K))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=V(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Di(e);return t}listen(e,t,i,n){let r=Ne(t,"","","");return Pe(this._getPlayer(e),i,r,n),()=>{}}command(e,t,i,n){if(i=="register"){this.register(e,n[0]);return}if(i=="create"){let o=n[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e);break}}},Wi="ng-animate-queued",Gn=".ng-animate-queued",ht="ng-animate-disabled",Wn=".ng-animate-disabled",Hn="ng-star-inserted",Yn=".ng-star-inserted",Xn=[],sn={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},xn={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},B="__ng_removed",pe=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),n=i?e.value:e;if(this.value=Jn(n),i){let r=e,{value:o}=r,a=Rt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let i=this.options.params;Object.keys(t).forEach(n=>{i[n]==null&&(i[n]=t[n])})}}},me="void",dt=new pe(me),Tt=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,i,n){if(!this._triggers.has(t))throw Ri(i,t);if(i==null||i.length==0)throw ki(t);if(!es(i))throw Oi(i,t);let r=k(this._elementListeners,e,[]),o={name:t,phase:i,callback:n};r.push(o);let a=k(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,ue),L(e,ue+"-"+t),a.set(t,dt)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Ii(e);return t}trigger(e,t,i,n=!0){let r=this._getTrigger(t),o=new ge(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,ue),L(e,ue+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new pe(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=dt),!(c.value===me)&&l.value===c.value){if(!ns(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{W(e,T),j(e,w)})}return}let _=k(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),m=!1;if(!y){if(!n)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||(L(e,Wi),o.onStart(()=>{ae(e,Wi)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),_.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(n=>n.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let i=this._engine.driver.query(e,he,!0);i.forEach(n=>{if(n[B])return;let r=this._engine.fetchNamespacesByElement(n);r.size?r.forEach(o=>o.triggerLeaveAnimation(n,t,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(e,t,i,n){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,me,n);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),i&&V(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){let n=new Set;t.forEach(r=>{let o=r.name;if(n.has(o))return;n.add(o);let l=this._triggers.get(o).fallbackTransition,c=i.get(o)||dt,h=new pe(me),u=new ge(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let n=!1;if(i.totalAnimations){let r=i.players.length?i.playersByQueriedElement.get(e):[];if(r&&r.length)n=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)i.markElementAsRemoved(this.id,e,!1,t);else{let r=e[B];(!r||r===sn)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(i=>{let n=i.player;if(n.destroyed)return;let r=i.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==i.triggerName){let l=Ne(r,i.triggerName,i.fromState.value,i.toState.value);l._data=e,Pe(i.player,a.phase,l,a.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):t.push(i)}),this._queue=[],t.sort((i,n)=>{let r=i.transition.ast.depCount,o=n.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(i.element,n.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},At=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){let i=new Tt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){let i=this._namespaceList,n=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=n.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(e)}else i.push(e);return n.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let n=this._namespaceLookup[e];n&&n.register(t,i)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let n=this._namespaceList.indexOf(i);n>=0&&this._namespaceList.splice(n,1),i.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,i=this.statesByElement.get(e);if(i){for(let n of i.values())if(n.namespaceId){let r=this._fetchNamespace(n.namespaceId);r&&t.add(r)}}return t}trigger(e,t,i,n){if(Fe(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,i,n),!0}return!1}insertNode(e,t,i,n){if(!Fe(t))return;let r=t[B];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,i)}n&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ht)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ae(e,ht))}removeNode(e,t,i){if(Fe(t)){let n=e?this._fetchNamespace(e):null;n?n.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,i,n,r){this.collectedLeaveElements.push(t),t[B]={namespaceId:e,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,i,n,r){return Fe(t)?this._fetchNamespace(e).listen(t,i,n,r):()=>{}}_buildInstruction(e,t,i,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,n,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,he,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,De,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return V(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[B];if(t&&t.setForRemoval){if(e[B]=sn,t.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ht)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Wn,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,n)=>this._balanceNamespaceList(i,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++){let n=this.collectedEnterElements[i];L(n,Hn)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{t=this._flushAnimations(i,e)}finally{for(let n=0;n<i.length;n++)i[n]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++){let n=this.collectedLeaveElements[i];this.processLeaveNode(n)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],t.length?V(t).onDone(()=>{i.forEach(n=>n())}):i.forEach(n=>n())}}reportError(e){throw Fi(e)}_flushAnimations(e,t){let i=new fe,n=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let f=this.driver.query(d,Gn,!0);for(let p=0;p<f.length;p++)h.add(f[p])});let u=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=Xi(_,this.collectedEnterElements),m=new Map,g=0;y.forEach((d,f)=>{let p=ot+g++;m.set(f,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,b=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let f=this.collectedLeaveElements[d],p=f[B];p&&p.setForRemoval&&(T.push(f),w.add(f),p.hasAnimation?this.driver.query(f,Yn,!0).forEach(E=>w.add(E)):b.add(f))}let C=new Map,N=Xi(_,Array.from(w));N.forEach((d,f)=>{let p=Ce+g++;C.set(f,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ae(E,p))}),N.forEach((d,f)=>{let p=C.get(f);d.forEach(E=>ae(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let ne=[],q=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,P=p.element;if(ne.push(E),this.collectedEnterElements.length){let M=P[B];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(p.triggerName)){let X=M.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let ye=F.get(p.triggerName);ye.value=X,F.set(p.triggerName,ye)}}E.destroy();return}}let Q=!u||!this.driver.containsElement(u,P),I=C.get(P),$=m.get(P),A=this._buildInstruction(p,i,$,I,Q);if(A.errors&&A.errors.length){q.push(A);return}if(Q){E.onStart(()=>W(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}if(p.isFallbackTransition){E.onStart(()=>W(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}let Dt=[];A.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||Dt.push(M)}),A.timelines=Dt,i.append(P,A.timelines);let dn={instruction:A,player:E,element:P};o.push(dn),A.queriedElements.forEach(M=>k(a,M,[]).push(E)),A.preStyleProps.forEach((M,X)=>{if(M.size){let F=l.get(X);F||l.set(X,F=new Set),M.forEach((ye,He)=>F.add(He))}}),A.postStyleProps.forEach((M,X)=>{let F=c.get(X);F||c.set(X,F=new Set),M.forEach((ye,He)=>F.add(He))})});if(q.length){let d=[];q.forEach(f=>{d.push(Li(f.triggerName,f.errors))}),ne.forEach(f=>f.destroy()),this.reportError(d)}let D=new Map,R=new Map;o.forEach(d=>{let f=d.element;i.has(f)&&(R.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,D))}),n.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{k(D,f,[]).push(E),E.destroy()})});let H=T.filter(d=>xi(d,l,c)),se=new Map;Yi(se,this.driver,b,c,K).forEach(d=>{xi(d,l,c)&&H.push(d)});let Y=new Map;y.forEach((d,f)=>{Yi(Y,this.driver,new Set(d),l,ce)}),H.forEach(d=>{let f=se.get(d),p=Y.get(d);se.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let We=[],Mt=[],Ct={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(i.has(f)){if(h.has(f)){p.onDestroy(()=>j(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),n.push(p);return}let P=Ct;if(R.size>1){let I=f,$=[];for(;I=I.parentNode;){let A=R.get(I);if(A){P=A;break}$.push(I)}$.forEach(A=>R.set(A,P))}let Q=this._buildAnimation(p.namespaceId,E,D,r,Y,se);if(p.setRealPlayer(Q),P===Ct)We.push(p);else{let I=this.playersByElement.get(P);I&&I.length&&(p.parentPlayer=V(I)),n.push(p)}}else W(f,E.fromStyles),p.onDestroy(()=>j(f,E.toStyles)),Mt.push(p),h.has(f)&&n.push(p)}),Mt.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=V(f);d.setRealPlayer(p)}}),n.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<T.length;d++){let f=T[d],p=f[B];if(ae(f,Ce),p&&p.hasAnimation)continue;let E=[];if(a.size){let Q=a.get(f);Q&&Q.length&&E.push(...Q);let I=this.driver.query(f,De,!0);for(let $=0;$<I.length;$++){let A=a.get(I[$]);A&&A.length&&E.push(...A)}}let P=E.filter(Q=>!Q.destroyed);P.length?ts(this,f,P):this.processLeaveNode(f)}return T.length=0,We.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),We}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,n,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==me;a.forEach(c=>{c.queued||!l&&c.triggerName!=n||o.push(c)})}}return(i||n)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||n&&n!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){let n=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:n;for(let l of t.timelines){let c=l.element,h=c!==r,u=k(i,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}W(r,t.fromStyles)}_buildAnimation(e,t,i,n,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,_=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[B];if(T&&T.removedBeforeQueried)return new x(m.duration,m.delay);let w=g!==l,b=is((i.get(g)||Xn).map(D=>D.getRealPlayer())).filter(D=>{let R=D;return R.element?R.element===g:!1}),C=r.get(g),N=o.get(g),ne=tt(this._normalizer,m.keyframes,C,N),q=this._buildPlayer(m,ne,b);if(m.subTimeline&&n&&u.add(g),w){let D=new ge(e,a,g);D.setRealPlayer(q),c.push(D)}return q});c.forEach(m=>{k(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Zn(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>L(m,at));let y=V(_);return y.onDestroy(()=>{h.forEach(m=>ae(m,at)),j(l,t.toStyles)}),u.forEach(m=>{k(n,m,[]).push(y)}),y}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new x(e.duration,e.delay)}},ge=class{namespaceId;triggerName;element;_player=new x;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(n=>Pe(e,i,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){k(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Zn(s,e,t){let i=s.get(e);if(i){if(i.length){let n=i.indexOf(t);i.splice(n,1)}i.length==0&&s.delete(e)}return i}function Jn(s){return s??null}function Fe(s){return s&&s.nodeType===1}function es(s){return s=="start"||s=="done"}function Hi(s,e){let t=s.style.display;return s.style.display=e??"none",t}function Yi(s,e,t,i,n){let r=[];t.forEach(l=>r.push(Hi(l)));let o=[];i.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let _=e.computeStyle(c,u,n);h.set(u,_),(!_||_.length==0)&&(c[B]=xn,o.push(c))}),s.set(c,h)});let a=0;return t.forEach(l=>Hi(l,r[a++])),o}function Xi(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let i=1,n=new Set(e),r=new Map;function o(a){if(!a)return i;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:n.has(c)?l=i:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==i&&t.get(l).push(a)}),t}function L(s,e){s.classList?.add(e)}function ae(s,e){s.classList?.remove(e)}function ts(s,e,t){V(t).onDone(()=>s.processLeaveNode(e))}function is(s){let e=[];return rn(s,e),e}function rn(s,e){for(let t=0;t<s.length;t++){let i=s[t];i instanceof Ae?rn(i.players,e):e.push(i)}}function ns(s,e){let t=Object.keys(s),i=Object.keys(e);if(t.length!=i.length)return!1;for(let n=0;n<t.length;n++){let r=t[n];if(!e.hasOwnProperty(r)||s[r]!==e[r])return!1}return!0}function xi(s,e,t){let i=t.get(s);if(!i)return!1;let n=e.get(s);return n?i.forEach(r=>n.add(r)):e.set(s,i),t.delete(s),!0}var le=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,i){this._driver=t,this._normalizer=i,this._transitionEngine=new At(e.body,t,i),this._timelineEngine=new vt(e.body,t,i),this._transitionEngine.onRemovalComplete=(n,r)=>this.onRemovalComplete(n,r)}registerTrigger(e,t,i,n,r){let o=e+"-"+n,a=this._triggerCache[o];if(!a){let l=[],c=[],h=en(this._driver,r,l,c);if(l.length)throw Pi(n,l);a=Un(n,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,n,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,n){this._transitionEngine.insertNode(e,t,i,n)}onRemove(e,t,i){this._transitionEngine.removeNode(e,t,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,n){if(i.charAt(0)=="@"){let[r,o]=it(i),a=n;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,i,n)}listen(e,t,i,n,r){if(i.charAt(0)=="@"){let[o,a]=it(i);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,i,n,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function ss(s,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=mt(e[0]),e.length>1&&(i=mt(e[e.length-1]))):e instanceof Map&&(t=mt(e)),t||i?new rs(s,t,i):null}var rs=(()=>{class s{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,i,n){this._element=t,this._startStyles=i,this._endStyles=n;let r=s.initialStylesByElement.get(t);r||s.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&j(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(j(this._element,this._initialStyles),this._endStyles&&(j(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(W(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),j(this._element,this._initialStyles),this._state=3)}}return s})();function mt(s){let e=null;return s.forEach((t,i)=>{os(i)&&(e=e||new Map,e.set(i,t))}),e}function os(s){return s==="display"||s==="position"}var Qe=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,i,n){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=n,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let i=()=>this._onFinish();return t.addEventListener("finish",i),this.onDestroy(()=>{t.removeEventListener("finish",i)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){let n=this._convertKeyframesToObject(t);try{return e.animate(n,i)}catch(r){return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,n)=>{n!=="offset"&&e.set(n,this._finished?i:ke(this.element,n))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Ue=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return nt(e,t)}getParentElement(e){return Me(e)}query(e,t,i){return st(e,t,i)}computeStyle(e,t,i){return ke(e,t)}animate(e,t,i,n,r,o=[]){let a=n==0?"both":"forwards",l={duration:i,delay:n,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof Qe);Bi(i,n)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=Ki(t).map(y=>new Map(y));u=qi(e,u,c);let _=ss(e,u);return new Qe(e,u,l,_)}};var Le="@",on="@.disabled",Ve=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,i,n){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=n}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,n=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,n)}removeChild(e,t,i,n){if(n){this.delegate.removeChild(e,t,i,n);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,n){this.delegate.setAttribute(e,t,i,n)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,n){this.delegate.setStyle(e,t,i,n)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){t.charAt(0)==Le&&t==on?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i,n){return this.delegate.listen(e,t,i,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},wt=class extends Ve{factory;constructor(e,t,i,n,r){super(t,i,n,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){t.charAt(0)==Le?t.charAt(1)=="."&&t==on?(i=i===void 0?!0:!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i,n){if(t.charAt(0)==Le){let r=as(e),o=t.slice(1),a="";return o.charAt(0)!=Le&&([o,a]=ls(o)),this.engine.listen(this.namespaceId,r,o,a,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,i,l)})}return this.delegate.listen(e,t,i,n)}};function as(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function ls(s){let e=s.indexOf("."),t=s.substring(0,e),i=s.slice(e+1);return[t,i]}var $e=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,i){this.delegate=e,this.engine=t,this._zone=i,t.onRemovalComplete=(n,r)=>{r?.removeChild(null,n)}}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(n);if(!h){let u=()=>c.delete(n);h=new Ve("",n,this.engine,u),c.set(n,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new wt(this,o,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,i){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(i));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),n.push([t,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var us=(()=>{class s extends le{constructor(t,i,n){super(t,i,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(i){return new(i||s)(ve(qt),ve(ee),ve(te))};static \u0275prov=Ee({token:s,factory:s.\u0275fac})}return s})();function hs(){return new ze}function ds(){return new $e(z(Xt),z(le),z(Qt))}var an=[{provide:te,useFactory:hs},{provide:le,useClass:us},{provide:$t,useFactory:ds}],zs=[{provide:ee,useClass:bt},{provide:Xe,useValue:"NoopAnimations"},...an],ms=[{provide:ee,useFactory:()=>new Ue},{provide:Xe,useFactory:()=>"BrowserAnimations"},...an];function ln(){return Vt("NgEagerAnimations"),[...ms]}var ie=s=>G(null,null,function*(){let e=z(we),t=s.params.projectName;return t?e.getSelectedProjectId()===t?!0:(e.selectProject(t),(yield Se(e.selectedProject$.pipe(Kt(n=>n?.name===t))))?.name===t):(console.log("[PROJECT GUARD] no project id in route"),!1)});var cn=s=>G(null,null,function*(){let e=z(ai),t=z(li),i=s.params.threadId;if(!t.getUsername())try{yield Ye(t.fetchCurrentUser())}catch(n){console.error("[THREAD GUARD] Failed to load current user:",n)}if(!i)return console.log("[THREAD GUARD] no threadId in route"),!1;if(console.log("[THREAD GUARD] Checking thread:",i),console.log("[THREAD GUARD] Current selected thread:",e.getSelectedThreadId()),e.getSelectedThreadId()===i)return console.log("[THREAD GUARD] Thread already selected, allowing navigation"),!0;console.log("[THREAD GUARD] Selecting thread:",i),e.selectThread(i);try{let n=yield Ye(It([e.isLoading$,e.selectedThread$]).pipe(jt(([o,a])=>console.log(`\u{1F43C} [${o?"loading":"loaded"}]`,a?.id)),Ft(([o,a])=>!o&&!!a),zt(1),Ot(([o,a])=>a?.id))),r=n===i;return r?console.log("[THREAD GUARD] Thread validated, allowing navigation"):console.error("[THREAD GUARD] Thread ID mismatch - route:",i,"loaded:",n),r}catch(n){return console.error("[THREAD GUARD] Error loading thread:",n),!1}});var un=[{path:"",loadComponent:()=>import("./chunk-XLLFCK5L.js").then(s=>s.GlobalTaskControlComponent)},{path:"projects",loadComponent:()=>import("./chunk-IFOIZS2E.js").then(s=>s.ProjectListComponent)},{path:"oauth/callback",loadComponent:()=>import("./chunk-3LN7WHDT.js").then(s=>s.OAuthCallbackComponent)},{path:"project/new",loadComponent:()=>import("./chunk-WMJZ5F67.js").then(s=>s.ProjectNewComponent)},{path:"project/:projectName",loadComponent:()=>import("./chunk-CSYPFTXB.js").then(s=>s.MainAppComponent),canActivate:[ie]},{path:"project/:projectName/prompts",loadComponent:()=>import("./chunk-L2RA4HKE.js").then(s=>s.PromptListComponent),canActivate:[ie]},{path:"project/:projectName/schedulers",loadComponent:()=>import("./chunk-IQAYYKT5.js").then(s=>s.SchedulerListComponent),canActivate:[ie]},{path:"project/:projectName/agents",loadComponent:()=>import("./chunk-AVQED52W.js").then(s=>s.AgentListComponent),canActivate:[ie]},{path:"project/:projectName/tasks",loadComponent:()=>import("./chunk-QV4IBPS2.js").then(s=>s.TaskControlComponent),canActivate:[ie]},{path:"project/:projectName/missions",redirectTo:"project/:projectName/tasks"},{path:"project/:projectName/thread/:threadId",loadComponent:()=>import("./chunk-CSYPFTXB.js").then(s=>s.MainAppComponent),canActivate:[ie,cn]},{path:"token-usage",loadComponent:()=>import("./chunk-BEM5KLWR.js").then(s=>s.TokenUsageComponent)},{path:"agentos",loadChildren:()=>G(null,null,function*(){let{AGENTOS_ROUTES:s,THEME_PORT:e}=yield import("./chunk-5SWFEZKV.js");return[{path:"",providers:[{provide:e,useFactory:t=>({theme:oi(t.currentTheme$,{initialValue:t.getCurrentTheme()}),setTheme:i=>t.setTheme(i)}),deps:[be]}],children:s}]})},{path:"**",redirectTo:""}];function fs(s){return()=>s.initializeDefaultProject()}function ps(s){return()=>{console.log("[APP_INIT] OAuthService initialized")}}function gs(s){return()=>G(null,null,function*(){let{UserStateService:e}=yield import("./chunk-5SWFEZKV.js"),t=s.get(e);yield Se(t.loadMe().pipe(Lt(i=>(console.warn("Failed to load current user",i),kt(null)))))})}var hn={providers:[Ut(),Ht({eventCoalescing:!0}),ei(un),Zt(),ln(),{provide:si,useValue:{duration:3e3}},{provide:Te,useFactory:fs,deps:[we],multi:!0},{provide:Te,useFactory:ps,deps:[ci],multi:!0},{provide:Te,useFactory:gs,deps:[Bt],multi:!0},ri({basePath:"/api/agentos"}),{provide:ni,useValue:{width:"80vw",maxWidth:"80vw",maxHeight:"80vh"}}]};var Ge=class s{title="client";themeService=z(be);ngOnInit(){console.log("[APP] Application initialized with theme:",this.themeService.getCurrentTheme())}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=Gt({type:s,selectors:[["app-root"]],decls:1,vars:0,template:function(t,i){t&1&&Wt(0,"router-outlet")},dependencies:[ti,Jt],encapsulation:2})};xt(Ge,hn).catch(s=>console.error(s));"serviceWorker"in navigator&&!Yt()&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(s=>console.error("[SW] Registration failed:",s))});
1
+ import{t as ri}from"./chunk-DDBWRK3B.js";import{a as S,b as K,e as ii,f as xe,h as x,i as Ae,j as ce}from"./chunk-QVW2GZXC.js";import{a as ci}from"./chunk-QR2CLZRO.js";import{b as ai,c as li,e as be}from"./chunk-BZA46IMY.js";import"./chunk-26GNTYMR.js";import{b as Jt,e as ei,f as ti}from"./chunk-COLWSJEP.js";import{a as si}from"./chunk-YKT74LKI.js";import{c as ni}from"./chunk-KTYUC4CA.js";import"./chunk-TQXOFKZO.js";import{c as oi}from"./chunk-PUWEEZSA.js";import{b as we}from"./chunk-TCYL6I4G.js";import"./chunk-GO5IXCK2.js";import{B as Ft,Ca as Xe,D as Lt,G as zt,L as Kt,La as Vt,Oa as $t,Sc as Xt,Tc as xt,V as jt,W as v,Wa as Gt,Yc as Zt,Z as Ee,a as _e,ba as ve,c as Rt,ca as z,d as G,fb as Te,ka as Bt,la as qt,m as kt,pa as Qt,q as Ye,r as Se,sa as Ut,t as Ot,u as It,ub as Wt,vc as Ht,wc as Yt}from"./chunk-3DOXTB6J.js";function ui(s){return new v(3e3,!1)}function mn(){return new v(3100,!1)}function fn(){return new v(3101,!1)}function pn(s){return new v(3001,!1)}function gn(s){return new v(3003,!1)}function yn(s){return new v(3004,!1)}function di(s,e){return new v(3005,!1)}function mi(){return new v(3006,!1)}function fi(){return new v(3007,!1)}function pi(s,e){return new v(3008,!1)}function gi(s){return new v(3002,!1)}function yi(s,e,t,i,n){return new v(3010,!1)}function _i(){return new v(3011,!1)}function Si(){return new v(3012,!1)}function Ei(){return new v(3200,!1)}function vi(){return new v(3202,!1)}function Ti(){return new v(3013,!1)}function Ai(s){return new v(3014,!1)}function wi(s){return new v(3015,!1)}function bi(s){return new v(3016,!1)}function Pi(s,e){return new v(3404,!1)}function _n(s){return new v(3502,!1)}function Ni(s){return new v(3503,!1)}function Mi(){return new v(3300,!1)}function Ci(s){return new v(3504,!1)}function Di(s){return new v(3301,!1)}function Ri(s,e){return new v(3302,!1)}function ki(s){return new v(3303,!1)}function Oi(s,e){return new v(3400,!1)}function Ii(s){return new v(3401,!1)}function Fi(s){return new v(3402,!1)}function Li(s,e){return new v(3505,!1)}function V(s){switch(s.length){case 0:return new x;case 1:return s[0];default:return new Ae(s)}}function tt(s,e,t=new Map,i=new Map){let n=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((_,y)=>{let m=y,g=_;if(y!=="offset")switch(m=s.normalizePropertyName(m,n),g){case ce:g=t.get(y);break;case K:g=i.get(y);break;default:g=s.normalizeStyleValue(y,m,g,n);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),n.length)throw _n(n);return r}function Pe(s,e,t,i){switch(e){case"start":s.onStart(()=>i(t&&Ze(t,"start",s)));break;case"done":s.onDone(()=>i(t&&Ze(t,"done",s)));break;case"destroy":s.onDestroy(()=>i(t&&Ze(t,"destroy",s)));break}}function Ze(s,e,t){let i=t.totalTime,n=!!t.disabled,r=Ne(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,i??s.totalTime,n),o=s._data;return o!=null&&(r._data=o),r}function Ne(s,e,t,i,n="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:i,phaseName:n,totalTime:r,disabled:!!o}}function k(s,e,t){let i=s.get(e);return i||s.set(e,i=t),i}function it(s){let e=s.indexOf(":"),t=s.substring(1,e),i=s.slice(e+1);return[t,i]}var Sn=typeof document>"u"?null:document.documentElement;function Me(s){let e=s.parentNode||s.host||null;return e===Sn?null:e}function En(s){return s.substring(1,6)=="ebkit"}var Z=null,hi=!1;function zi(s){Z||(Z=vn()||{},hi=Z.style?"WebkitAppearance"in Z.style:!1);let e=!0;return Z.style&&!En(s)&&(e=s in Z.style,!e&&hi&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in Z.style)),e}function vn(){return typeof document<"u"?document.body:null}function nt(s,e){for(;e;){if(e===s)return!0;e=Me(e)}return!1}function st(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let i=s.querySelector(e);return i?[i]:[]}var Tn=1e3,rt="{{",An="}}",ot="ng-enter",Ce="ng-leave",ue="ng-trigger",he=".ng-trigger",at="ng-animating",De=".ng-animating";function U(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Je(parseFloat(e[1]),e[2])}function Je(s,e){return e==="s"?s*Tn:s}function de(s,e,t){return s.hasOwnProperty("duration")?s:bn(s,e,t)}var wn=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function bn(s,e,t){let i,n=0,r="";if(typeof s=="string"){let o=s.match(wn);if(o===null)return e.push(ui(s)),{duration:0,delay:0,easing:""};i=Je(parseFloat(o[1]),o[2]);let a=o[3];a!=null&&(n=Je(parseFloat(a),o[4]));let l=o[5];l&&(r=l)}else i=s;if(!t){let o=!1,a=e.length;i<0&&(e.push(mn()),o=!0),n<0&&(e.push(fn()),o=!0),o&&e.splice(a,0,ui(s))}return{duration:i,delay:n,easing:r}}function Ki(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function j(s,e,t){e.forEach((i,n)=>{let r=Re(n);t&&!t.has(n)&&t.set(n,s.style[r]),s.style[r]=i})}function W(s,e){e.forEach((t,i)=>{let n=Re(i);s.style[n]=""})}function re(s){return Array.isArray(s)?s.length==1?s[0]:ii(s):s}function ji(s,e,t){let i=e.params||{},n=lt(s);n.length&&n.forEach(r=>{i.hasOwnProperty(r)||t.push(pn(r))})}var et=new RegExp(`${rt}\\s*(.+?)\\s*${An}`,"g");function lt(s){let e=[];if(typeof s=="string"){let t;for(;t=et.exec(s);)e.push(t[1]);et.lastIndex=0}return e}function oe(s,e,t){let i=`${s}`,n=i.replace(et,(r,o)=>{let a=e[o];return a==null&&(t.push(gn(o)),a=""),a.toString()});return n==i?s:n}var Pn=/-+([a-z0-9])/g;function Re(s){return s.replace(Pn,(...e)=>e[1].toUpperCase())}function Bi(s,e){return s===0||e===0}function qi(s,e,t){if(t.size&&e.length){let i=e[0],n=[];if(t.forEach((r,o)=>{i.has(o)||n.push(o),i.set(o,r)}),n.length)for(let r=1;r<e.length;r++){let o=e[r];n.forEach(a=>o.set(a,ke(s,a)))}}return e}function O(s,e,t){switch(e.type){case S.Trigger:return s.visitTrigger(e,t);case S.State:return s.visitState(e,t);case S.Transition:return s.visitTransition(e,t);case S.Sequence:return s.visitSequence(e,t);case S.Group:return s.visitGroup(e,t);case S.Animate:return s.visitAnimate(e,t);case S.Keyframes:return s.visitKeyframes(e,t);case S.Style:return s.visitStyle(e,t);case S.Reference:return s.visitReference(e,t);case S.AnimateChild:return s.visitAnimateChild(e,t);case S.AnimateRef:return s.visitAnimateRef(e,t);case S.Query:return s.visitQuery(e,t);case S.Stagger:return s.visitStagger(e,t);default:throw yn(e.type)}}function ke(s,e){return window.getComputedStyle(s)[e]}var bt=(()=>{class s{validateStyleProperty(t){return zi(t)}containsElement(t,i){return nt(t,i)}getParentElement(t){return Me(t)}query(t,i,n){return st(t,i,n)}computeStyle(t,i,n){return n||""}animate(t,i,n,r,o,a=[],l){return new x(n,r)}static \u0275fac=function(i){return new(i||s)};static \u0275prov=Ee({token:s,factory:s.\u0275fac})}return s})(),ee=class{static NOOP=new bt},te=class{};var Nn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),ze=class extends te{normalizePropertyName(e,t){return Re(e)}normalizeStyleValue(e,t,i,n){let r="",o=i.toString().trim();if(Nn.has(t)&&i!==0&&i!=="0")if(typeof i=="number")r="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&n.push(di(e,i))}return o+r}};var Ke="*";function Mn(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(i=>Cn(i,t,e)):t.push(s),t}function Cn(s,e,t){if(s[0]==":"){let l=Dn(s,t);if(typeof l=="function"){e.push(l);return}s=l}let i=s.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return t.push(wi(s)),e;let n=i[1],r=i[2],o=i[3];e.push(Qi(n,o));let a=n==Ke&&o==Ke;r[0]=="<"&&!a&&e.push(Qi(o,n))}function Dn(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(bi(s)),"* => *"}}var Oe=new Set(["true","1"]),Ie=new Set(["false","0"]);function Qi(s,e){let t=Oe.has(s)||Ie.has(s),i=Oe.has(e)||Ie.has(e);return(n,r)=>{let o=s==Ke||s==n,a=e==Ke||e==r;return!o&&t&&typeof n=="boolean"&&(o=n?Oe.has(s):Ie.has(s)),!a&&i&&typeof r=="boolean"&&(a=r?Oe.has(e):Ie.has(e)),o&&a}}var Ji=":self",Rn=new RegExp(`s*${Ji}s*,?`,"g");function en(s,e,t,i){return new ft(s).build(e,t,i)}var Ui="",ft=class{_driver;constructor(e){this._driver=e}build(e,t,i){let n=new pt(t);return this._resetContextStyleTimingState(n),O(this,re(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector=Ui,e.collectedStyles=new Map,e.collectedStyles.set(Ui,new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,n=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(mi()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==S.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==S.Transition){let l=this.visitTransition(a,t);i+=l.queryCount,n+=l.depCount,o.push(l)}else t.errors.push(fi())}),{type:S.Trigger,name:e.name,states:r,transitions:o,queryCount:i,depCount:n,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),n=e.options&&e.options.params||null;if(i.containsDynamicStyles){let r=new Set,o=n||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{lt(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(pi(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:i,options:n?{params:n}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=O(this,re(e.animation),t),n=Mn(e.expr,t.errors);return{type:S.Transition,matchers:n,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:J(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(i=>O(this,i,t)),options:J(e.options)}}visitGroup(e,t){let i=t.currentTime,n=0,r=e.steps.map(o=>{t.currentTime=i;let a=O(this,o,t);return n=Math.max(n,t.currentTime),a});return t.currentTime=n,{type:S.Group,steps:r,options:J(e.options)}}visitAnimate(e,t){let i=Fn(e.timings,t.errors);t.currentAnimateTimings=i;let n,r=e.styles?e.styles:xe({});if(r.type==S.Keyframes)n=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};i.easing&&(c.easing=i.easing),o=xe(c)}t.currentTime+=i.duration+i.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,n=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:i,style:n,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of n)typeof a=="string"?a===K?i.push(a):t.errors.push(gi(a)):i.push(new Map(Object.entries(a)));let r=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(rt)>=0){r=!0;break}}}),{type:S.Style,styles:i,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,n=t.currentTime,r=t.currentTime;i&&r>0&&(r-=i.duration+i.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=n&&r>=h.startTime&&n<=h.endTime&&(t.errors.push(yi(l,h.startTime,h.endTime,r,n)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:n}),t.options&&ji(a,t.options,t.errors)})})}visitKeyframes(e,t){let i={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(_i()),i;let n=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let b=this._makeStyleAst(w,t),C=b.offset!=null?b.offset:In(b.styles),N=0;return C!=null&&(r++,N=b.offset=C),l=l||N<0||N>1,a=a||N<c,c=N,o.push(N),b});l&&t.errors.push(Si()),a&&t.errors.push(Ei());let u=e.steps.length,_=0;r>0&&r<u?t.errors.push(vi()):r==0&&(_=n/(u-1));let y=u-1,m=t.currentTime,g=t.currentAnimateTimings,T=g.duration;return h.forEach((w,b)=>{let C=_>0?b==y?1:_*b:o[b],N=C*T;t.currentTime=m+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=C,i.styles.push(w)}),i}visitReference(e,t){return{type:S.Reference,animation:O(this,re(e.animation),t),options:J(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:J(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:J(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,n=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=kn(e.selector);t.currentQuerySelector=i.length?i+" "+r:r,k(t.collectedStyles,t.currentQuerySelector,new Map);let a=O(this,re(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:S.Query,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:J(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Ti());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:de(e.timings,t.errors,!0);return{type:S.Stagger,animation:O(this,re(e.animation),t),timings:i,options:null}}};function kn(s){let e=!!s.split(/\s*,\s*/).find(t=>t==Ji);return e&&(s=s.replace(Rn,"")),s=s.replace(/@\*/g,he).replace(/@\w+/g,t=>he+"-"+t.slice(1)).replace(/:animating/g,De),[s,e]}function On(s){return s?_e({},s):null}var pt=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function In(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Fn(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=de(s,e).duration;return ct(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=ct(0,0,"");return r.dynamic=!0,r.strValue=t,r}let n=de(t,e);return ct(n.duration,n.delay,n.easing)}function J(s){return s?(s=_e({},s),s.params&&(s.params=On(s.params))):s={},s}function ct(s,e,t){return{duration:s,delay:e,easing:t}}function Pt(s,e,t,i,n,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:i,duration:n,delay:r,totalTime:n+r,easing:o,subTimeline:a}}var fe=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ln=1,zn=":enter",Kn=new RegExp(zn,"g"),jn=":leave",Bn=new RegExp(jn,"g");function tn(s,e,t,i,n,r=new Map,o=new Map,a,l,c=[]){return new gt().buildKeyframes(s,e,t,i,n,r,o,a,l,c)}var gt=class{buildKeyframes(e,t,i,n,r,o,a,l,c,h=[]){c=c||new fe;let u=new yt(e,t,c,n,r,h,[]);u.options=l;let _=l.delay?U(l.delay):0;u.currentTimeline.delayNextStep(_),u.currentTimeline.setStyles([o],null,u.errors,l),O(this,i,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[Pt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let n=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,n,n.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let n of e){let r=n?.delay;if(r){let o=typeof r=="number"?r:U(oe(r,n?.params??{},t.errors));i.delayNextStep(o)}}}_visitSubInstructions(e,t,i){let r=t.currentTimeline.currentTime,o=i.duration!=null?U(i.duration):null,a=i.delay!=null?U(i.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,n=t,r=e.options;if(r&&(r.params||r.delay)&&(n=t.createSubContext(r),n.transformIntoNewTimeline(),r.delay!=null)){n.previousNode.type==S.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=je);let o=U(r.delay);n.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>O(this,o,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],n=t.currentTimeline.currentTime,r=e.options&&e.options.delay?U(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),O(this,o,a),n=Math.max(n,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(n),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue,n=t.params?oe(i,t.params,t.errors):i;return de(n,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),n=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),n.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(i.duration),this.visitStyle(r,t),n.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,n=t.currentAnimateTimings;!n&&i.hasCurrentStyleProperties()&&i.forwardFrame();let r=n&&n.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(r):i.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,n=t.currentTimeline.duration,r=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(n+r),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,n=e.options||{},r=n.delay?U(n.delay):0;r&&(t.previousNode.type===S.Style||i==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=je);let o=i,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),O(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let _=u.currentTimeline.currentTime;o=Math.max(o,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,n=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;O(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=n.currentTime-u+(n.startTime-i.currentTimeline.startTime)}},je={},yt=class s{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=je;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,i,n,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new Be(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,n=this.options;i.duration!=null&&(n.duration=U(i.duration)),i.delay!=null&&(n.delay=U(i.delay));let r=i.params;if(r){let o=n.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=oe(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach(n=>{i[n]=t[n]})}}return e}createSubContext(e=null,t,i){let n=t||this.element,r=new s(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=je,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let n={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},r=new _t(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,n,r,o){let a=[];if(n&&a.push(this.element),e.length>0){e=e.replace(Kn,"."+this._enterClassName),e=e.replace(Bn,"."+this._leaveClassName);let l=i!=1,c=this._driver.query(this.element,e,l);i!==0&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!r&&a.length==0&&o.push(Ai(t)),a}},Be=class s{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,i,n){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=n,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new s(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ln,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||K),this._currentKeyframe.set(t,K);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,n){t&&this._previousKeyframe.set("easing",t);let r=n&&n.params||{},o=qn(e,this._globalTimelineStyles);for(let[a,l]of o){let c=oe(l,r,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??K),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{let n=this._styleSummary.get(i);(!n||t.time>n.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===ce?e.add(u):h===K&&t.add(u)}),i||c.set("offset",l/this.duration),n.push(c)});let r=[...e.values()],o=[...t.values()];if(i){let a=n[0],l=new Map(a);a.set("offset",0),l.set("offset",1),n=[a,l]}return Pt(this.element,n,r,o,this.duration,this.startTime,this.easing,!1)}},_t=class extends Be{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,i,n,r,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=i+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",Vi(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let _=new Map(e[u]),y=_.get("offset"),m=t+y*i;_.set("offset",Vi(m/o)),r.push(_)}i=o,t=0,n="",e=r}return Pt(this.element,e,this.preStyleProps,this.postStyleProps,i,t,n,!0)}};function Vi(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function qn(s,e){let t=new Map,i;return s.forEach(n=>{if(n==="*"){i??=e.keys();for(let r of i)t.set(r,K)}else for(let[r,o]of n)t.set(r,o)}),t}function $i(s,e,t,i,n,r,o,a,l,c,h,u,_){return{type:0,element:s,triggerName:e,isRemovalTransition:n,fromState:t,fromStyles:r,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:_}}var ut={},qe=class{_triggerName;ast;_stateStyles;constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,n){return Qn(this.ast.matchers,e,t,i,n)}buildStyles(e,t,i){let n=this._stateStyles.get("*");return e!==void 0&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(t,i):new Map}build(e,t,i,n,r,o,a,l,c,h){let u=[],_=this.ast.options&&this.ast.options.params||ut,y=a&&a.params||ut,m=this.buildStyles(i,y,u),g=l&&l.params||ut,T=this.buildStyles(n,g,u),w=new Set,b=new Map,C=new Map,N=n==="void",ne={params:nn(g,_),delay:this.ast.options?.delay},q=h?[]:tn(e,t,this.ast.animation,r,o,m,T,ne,c,u),D=0;return q.forEach(R=>{D=Math.max(R.duration+R.delay,D)}),u.length?$i(t,this._triggerName,i,n,N,m,T,[],[],b,C,D,u):(q.forEach(R=>{let H=R.element,se=k(b,H,new Set);R.preStyleProps.forEach(Y=>se.add(Y));let Nt=k(C,H,new Set);R.postStyleProps.forEach(Y=>Nt.add(Y)),H!==t&&w.add(H)}),$i(t,this._triggerName,i,n,N,m,T,q,[...w.values()],b,C,D))}};function Qn(s,e,t,i,n){return s.some(r=>r(e,t,i,n))}function nn(s,e){let t=_e({},e);return Object.entries(s).forEach(([i,n])=>{n!=null&&(t[i]=n)}),t}var St=class{styles;defaultParams;normalizer;constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,n=nn(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=oe(o,n,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),i.set(a,o)})}),i}};function Un(s,e,t){return new Et(s,e,t)}var Et=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,t.states.forEach(n=>{let r=n.options&&n.options.params||{};this.states.set(n.name,new St(n.style,r,i))}),Gi(this.states,"true","1"),Gi(this.states,"false","0"),t.transitions.forEach(n=>{this.transitionFactories.push(new qe(e,n,this.states))}),this.fallbackTransition=Vn(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,n){return this.transitionFactories.find(o=>o.match(e,t,i,n))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function Vn(s,e,t){let i=[(o,a)=>!0],n={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:n,matchers:i,options:null,queryCount:0,depCount:0};return new qe(s,r,e)}function Gi(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var $n=new fe,vt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i}register(e,t){let i=[],n=[],r=en(this._driver,t,i,n);if(i.length)throw Ni(i);this._animations.set(e,r)}_buildPlayer(e,t,i){let n=e.element,r=tt(this._normalizer,e.keyframes,t,i);return this._driver.animate(n,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let n=[],r=this._animations.get(e),o,a=new Map;if(r?(o=tn(this._driver,t,r,ot,Ce,new Map,new Map,i,$n,n),o.forEach(h=>{let u=k(a,h.element,new Map);h.postStyleProps.forEach(_=>u.set(_,null))})):(n.push(Mi()),o=[]),n.length)throw Ci(n);a.forEach((h,u)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(u,y,K))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=V(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Di(e);return t}listen(e,t,i,n){let r=Ne(t,"","","");return Pe(this._getPlayer(e),i,r,n),()=>{}}command(e,t,i,n){if(i=="register"){this.register(e,n[0]);return}if(i=="create"){let o=n[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e);break}}},Wi="ng-animate-queued",Gn=".ng-animate-queued",ht="ng-animate-disabled",Wn=".ng-animate-disabled",Hn="ng-star-inserted",Yn=".ng-star-inserted",Xn=[],sn={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},xn={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},B="__ng_removed",pe=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),n=i?e.value:e;if(this.value=Jn(n),i){let r=e,{value:o}=r,a=Rt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let i=this.options.params;Object.keys(t).forEach(n=>{i[n]==null&&(i[n]=t[n])})}}},me="void",dt=new pe(me),Tt=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,i,n){if(!this._triggers.has(t))throw Ri(i,t);if(i==null||i.length==0)throw ki(t);if(!es(i))throw Oi(i,t);let r=k(this._elementListeners,e,[]),o={name:t,phase:i,callback:n};r.push(o);let a=k(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,ue),L(e,ue+"-"+t),a.set(t,dt)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Ii(e);return t}trigger(e,t,i,n=!0){let r=this._getTrigger(t),o=new ge(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,ue),L(e,ue+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new pe(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=dt),!(c.value===me)&&l.value===c.value){if(!ns(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{W(e,T),j(e,w)})}return}let _=k(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),m=!1;if(!y){if(!n)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||(L(e,Wi),o.onStart(()=>{ae(e,Wi)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),_.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(n=>n.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let i=this._engine.driver.query(e,he,!0);i.forEach(n=>{if(n[B])return;let r=this._engine.fetchNamespacesByElement(n);r.size?r.forEach(o=>o.triggerLeaveAnimation(n,t,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(e,t,i,n){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,me,n);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),i&&V(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){let n=new Set;t.forEach(r=>{let o=r.name;if(n.has(o))return;n.add(o);let l=this._triggers.get(o).fallbackTransition,c=i.get(o)||dt,h=new pe(me),u=new ge(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let n=!1;if(i.totalAnimations){let r=i.players.length?i.playersByQueriedElement.get(e):[];if(r&&r.length)n=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)i.markElementAsRemoved(this.id,e,!1,t);else{let r=e[B];(!r||r===sn)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(i=>{let n=i.player;if(n.destroyed)return;let r=i.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==i.triggerName){let l=Ne(r,i.triggerName,i.fromState.value,i.toState.value);l._data=e,Pe(i.player,a.phase,l,a.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):t.push(i)}),this._queue=[],t.sort((i,n)=>{let r=i.transition.ast.depCount,o=n.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(i.element,n.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},At=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){let i=new Tt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){let i=this._namespaceList,n=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=n.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(e)}else i.push(e);return n.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let n=this._namespaceLookup[e];n&&n.register(t,i)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let n=this._namespaceList.indexOf(i);n>=0&&this._namespaceList.splice(n,1),i.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,i=this.statesByElement.get(e);if(i){for(let n of i.values())if(n.namespaceId){let r=this._fetchNamespace(n.namespaceId);r&&t.add(r)}}return t}trigger(e,t,i,n){if(Fe(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,i,n),!0}return!1}insertNode(e,t,i,n){if(!Fe(t))return;let r=t[B];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,i)}n&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ht)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ae(e,ht))}removeNode(e,t,i){if(Fe(t)){let n=e?this._fetchNamespace(e):null;n?n.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,i,n,r){this.collectedLeaveElements.push(t),t[B]={namespaceId:e,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,i,n,r){return Fe(t)?this._fetchNamespace(e).listen(t,i,n,r):()=>{}}_buildInstruction(e,t,i,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,n,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,he,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,De,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return V(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[B];if(t&&t.setForRemoval){if(e[B]=sn,t.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ht)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Wn,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,n)=>this._balanceNamespaceList(i,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++){let n=this.collectedEnterElements[i];L(n,Hn)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{t=this._flushAnimations(i,e)}finally{for(let n=0;n<i.length;n++)i[n]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++){let n=this.collectedLeaveElements[i];this.processLeaveNode(n)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],t.length?V(t).onDone(()=>{i.forEach(n=>n())}):i.forEach(n=>n())}}reportError(e){throw Fi(e)}_flushAnimations(e,t){let i=new fe,n=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let f=this.driver.query(d,Gn,!0);for(let p=0;p<f.length;p++)h.add(f[p])});let u=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=Xi(_,this.collectedEnterElements),m=new Map,g=0;y.forEach((d,f)=>{let p=ot+g++;m.set(f,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,b=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let f=this.collectedLeaveElements[d],p=f[B];p&&p.setForRemoval&&(T.push(f),w.add(f),p.hasAnimation?this.driver.query(f,Yn,!0).forEach(E=>w.add(E)):b.add(f))}let C=new Map,N=Xi(_,Array.from(w));N.forEach((d,f)=>{let p=Ce+g++;C.set(f,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ae(E,p))}),N.forEach((d,f)=>{let p=C.get(f);d.forEach(E=>ae(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let ne=[],q=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,P=p.element;if(ne.push(E),this.collectedEnterElements.length){let M=P[B];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(p.triggerName)){let X=M.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let ye=F.get(p.triggerName);ye.value=X,F.set(p.triggerName,ye)}}E.destroy();return}}let Q=!u||!this.driver.containsElement(u,P),I=C.get(P),$=m.get(P),A=this._buildInstruction(p,i,$,I,Q);if(A.errors&&A.errors.length){q.push(A);return}if(Q){E.onStart(()=>W(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}if(p.isFallbackTransition){E.onStart(()=>W(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}let Dt=[];A.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||Dt.push(M)}),A.timelines=Dt,i.append(P,A.timelines);let dn={instruction:A,player:E,element:P};o.push(dn),A.queriedElements.forEach(M=>k(a,M,[]).push(E)),A.preStyleProps.forEach((M,X)=>{if(M.size){let F=l.get(X);F||l.set(X,F=new Set),M.forEach((ye,He)=>F.add(He))}}),A.postStyleProps.forEach((M,X)=>{let F=c.get(X);F||c.set(X,F=new Set),M.forEach((ye,He)=>F.add(He))})});if(q.length){let d=[];q.forEach(f=>{d.push(Li(f.triggerName,f.errors))}),ne.forEach(f=>f.destroy()),this.reportError(d)}let D=new Map,R=new Map;o.forEach(d=>{let f=d.element;i.has(f)&&(R.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,D))}),n.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{k(D,f,[]).push(E),E.destroy()})});let H=T.filter(d=>xi(d,l,c)),se=new Map;Yi(se,this.driver,b,c,K).forEach(d=>{xi(d,l,c)&&H.push(d)});let Y=new Map;y.forEach((d,f)=>{Yi(Y,this.driver,new Set(d),l,ce)}),H.forEach(d=>{let f=se.get(d),p=Y.get(d);se.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let We=[],Mt=[],Ct={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(i.has(f)){if(h.has(f)){p.onDestroy(()=>j(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),n.push(p);return}let P=Ct;if(R.size>1){let I=f,$=[];for(;I=I.parentNode;){let A=R.get(I);if(A){P=A;break}$.push(I)}$.forEach(A=>R.set(A,P))}let Q=this._buildAnimation(p.namespaceId,E,D,r,Y,se);if(p.setRealPlayer(Q),P===Ct)We.push(p);else{let I=this.playersByElement.get(P);I&&I.length&&(p.parentPlayer=V(I)),n.push(p)}}else W(f,E.fromStyles),p.onDestroy(()=>j(f,E.toStyles)),Mt.push(p),h.has(f)&&n.push(p)}),Mt.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=V(f);d.setRealPlayer(p)}}),n.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<T.length;d++){let f=T[d],p=f[B];if(ae(f,Ce),p&&p.hasAnimation)continue;let E=[];if(a.size){let Q=a.get(f);Q&&Q.length&&E.push(...Q);let I=this.driver.query(f,De,!0);for(let $=0;$<I.length;$++){let A=a.get(I[$]);A&&A.length&&E.push(...A)}}let P=E.filter(Q=>!Q.destroyed);P.length?ts(this,f,P):this.processLeaveNode(f)}return T.length=0,We.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),We}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,n,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==me;a.forEach(c=>{c.queued||!l&&c.triggerName!=n||o.push(c)})}}return(i||n)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||n&&n!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){let n=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:n;for(let l of t.timelines){let c=l.element,h=c!==r,u=k(i,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}W(r,t.fromStyles)}_buildAnimation(e,t,i,n,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,_=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[B];if(T&&T.removedBeforeQueried)return new x(m.duration,m.delay);let w=g!==l,b=is((i.get(g)||Xn).map(D=>D.getRealPlayer())).filter(D=>{let R=D;return R.element?R.element===g:!1}),C=r.get(g),N=o.get(g),ne=tt(this._normalizer,m.keyframes,C,N),q=this._buildPlayer(m,ne,b);if(m.subTimeline&&n&&u.add(g),w){let D=new ge(e,a,g);D.setRealPlayer(q),c.push(D)}return q});c.forEach(m=>{k(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Zn(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>L(m,at));let y=V(_);return y.onDestroy(()=>{h.forEach(m=>ae(m,at)),j(l,t.toStyles)}),u.forEach(m=>{k(n,m,[]).push(y)}),y}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new x(e.duration,e.delay)}},ge=class{namespaceId;triggerName;element;_player=new x;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(n=>Pe(e,i,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){k(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Zn(s,e,t){let i=s.get(e);if(i){if(i.length){let n=i.indexOf(t);i.splice(n,1)}i.length==0&&s.delete(e)}return i}function Jn(s){return s??null}function Fe(s){return s&&s.nodeType===1}function es(s){return s=="start"||s=="done"}function Hi(s,e){let t=s.style.display;return s.style.display=e??"none",t}function Yi(s,e,t,i,n){let r=[];t.forEach(l=>r.push(Hi(l)));let o=[];i.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let _=e.computeStyle(c,u,n);h.set(u,_),(!_||_.length==0)&&(c[B]=xn,o.push(c))}),s.set(c,h)});let a=0;return t.forEach(l=>Hi(l,r[a++])),o}function Xi(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let i=1,n=new Set(e),r=new Map;function o(a){if(!a)return i;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:n.has(c)?l=i:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==i&&t.get(l).push(a)}),t}function L(s,e){s.classList?.add(e)}function ae(s,e){s.classList?.remove(e)}function ts(s,e,t){V(t).onDone(()=>s.processLeaveNode(e))}function is(s){let e=[];return rn(s,e),e}function rn(s,e){for(let t=0;t<s.length;t++){let i=s[t];i instanceof Ae?rn(i.players,e):e.push(i)}}function ns(s,e){let t=Object.keys(s),i=Object.keys(e);if(t.length!=i.length)return!1;for(let n=0;n<t.length;n++){let r=t[n];if(!e.hasOwnProperty(r)||s[r]!==e[r])return!1}return!0}function xi(s,e,t){let i=t.get(s);if(!i)return!1;let n=e.get(s);return n?i.forEach(r=>n.add(r)):e.set(s,i),t.delete(s),!0}var le=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,i){this._driver=t,this._normalizer=i,this._transitionEngine=new At(e.body,t,i),this._timelineEngine=new vt(e.body,t,i),this._transitionEngine.onRemovalComplete=(n,r)=>this.onRemovalComplete(n,r)}registerTrigger(e,t,i,n,r){let o=e+"-"+n,a=this._triggerCache[o];if(!a){let l=[],c=[],h=en(this._driver,r,l,c);if(l.length)throw Pi(n,l);a=Un(n,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,n,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,n){this._transitionEngine.insertNode(e,t,i,n)}onRemove(e,t,i){this._transitionEngine.removeNode(e,t,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,n){if(i.charAt(0)=="@"){let[r,o]=it(i),a=n;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,i,n)}listen(e,t,i,n,r){if(i.charAt(0)=="@"){let[o,a]=it(i);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,i,n,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function ss(s,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=mt(e[0]),e.length>1&&(i=mt(e[e.length-1]))):e instanceof Map&&(t=mt(e)),t||i?new rs(s,t,i):null}var rs=(()=>{class s{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,i,n){this._element=t,this._startStyles=i,this._endStyles=n;let r=s.initialStylesByElement.get(t);r||s.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&j(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(j(this._element,this._initialStyles),this._endStyles&&(j(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(W(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),j(this._element,this._initialStyles),this._state=3)}}return s})();function mt(s){let e=null;return s.forEach((t,i)=>{os(i)&&(e=e||new Map,e.set(i,t))}),e}function os(s){return s==="display"||s==="position"}var Qe=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,i,n){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=n,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let i=()=>this._onFinish();return t.addEventListener("finish",i),this.onDestroy(()=>{t.removeEventListener("finish",i)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){let n=this._convertKeyframesToObject(t);try{return e.animate(n,i)}catch(r){return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,n)=>{n!=="offset"&&e.set(n,this._finished?i:ke(this.element,n))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Ue=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return nt(e,t)}getParentElement(e){return Me(e)}query(e,t,i){return st(e,t,i)}computeStyle(e,t,i){return ke(e,t)}animate(e,t,i,n,r,o=[]){let a=n==0?"both":"forwards",l={duration:i,delay:n,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof Qe);Bi(i,n)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=Ki(t).map(y=>new Map(y));u=qi(e,u,c);let _=ss(e,u);return new Qe(e,u,l,_)}};var Le="@",on="@.disabled",Ve=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,i,n){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=n}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,n=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,n)}removeChild(e,t,i,n){if(n){this.delegate.removeChild(e,t,i,n);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,n){this.delegate.setAttribute(e,t,i,n)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,n){this.delegate.setStyle(e,t,i,n)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){t.charAt(0)==Le&&t==on?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i,n){return this.delegate.listen(e,t,i,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},wt=class extends Ve{factory;constructor(e,t,i,n,r){super(t,i,n,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){t.charAt(0)==Le?t.charAt(1)=="."&&t==on?(i=i===void 0?!0:!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i,n){if(t.charAt(0)==Le){let r=as(e),o=t.slice(1),a="";return o.charAt(0)!=Le&&([o,a]=ls(o)),this.engine.listen(this.namespaceId,r,o,a,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,i,l)})}return this.delegate.listen(e,t,i,n)}};function as(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function ls(s){let e=s.indexOf("."),t=s.substring(0,e),i=s.slice(e+1);return[t,i]}var $e=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,i){this.delegate=e,this.engine=t,this._zone=i,t.onRemovalComplete=(n,r)=>{r?.removeChild(null,n)}}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(n);if(!h){let u=()=>c.delete(n);h=new Ve("",n,this.engine,u),c.set(n,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new wt(this,o,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,i){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(i));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),n.push([t,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var us=(()=>{class s extends le{constructor(t,i,n){super(t,i,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(i){return new(i||s)(ve(qt),ve(ee),ve(te))};static \u0275prov=Ee({token:s,factory:s.\u0275fac})}return s})();function hs(){return new ze}function ds(){return new $e(z(Xt),z(le),z(Qt))}var an=[{provide:te,useFactory:hs},{provide:le,useClass:us},{provide:$t,useFactory:ds}],zs=[{provide:ee,useClass:bt},{provide:Xe,useValue:"NoopAnimations"},...an],ms=[{provide:ee,useFactory:()=>new Ue},{provide:Xe,useFactory:()=>"BrowserAnimations"},...an];function ln(){return Vt("NgEagerAnimations"),[...ms]}var ie=s=>G(null,null,function*(){let e=z(we),t=s.params.projectName;return t?e.getSelectedProjectId()===t?!0:(e.selectProject(t),(yield Se(e.selectedProject$.pipe(Kt(n=>n?.name===t))))?.name===t):(console.log("[PROJECT GUARD] no project id in route"),!1)});var cn=s=>G(null,null,function*(){let e=z(ai),t=z(li),i=s.params.threadId;if(!t.getUsername())try{yield Ye(t.fetchCurrentUser())}catch(n){console.error("[THREAD GUARD] Failed to load current user:",n)}if(!i)return console.log("[THREAD GUARD] no threadId in route"),!1;if(console.log("[THREAD GUARD] Checking thread:",i),console.log("[THREAD GUARD] Current selected thread:",e.getSelectedThreadId()),e.getSelectedThreadId()===i)return console.log("[THREAD GUARD] Thread already selected, allowing navigation"),!0;console.log("[THREAD GUARD] Selecting thread:",i),e.selectThread(i);try{let n=yield Ye(It([e.isLoading$,e.selectedThread$]).pipe(jt(([o,a])=>console.log(`\u{1F43C} [${o?"loading":"loaded"}]`,a?.id)),Ft(([o,a])=>!o&&!!a),zt(1),Ot(([o,a])=>a?.id))),r=n===i;return r?console.log("[THREAD GUARD] Thread validated, allowing navigation"):console.error("[THREAD GUARD] Thread ID mismatch - route:",i,"loaded:",n),r}catch(n){return console.error("[THREAD GUARD] Error loading thread:",n),!1}});var un=[{path:"",loadComponent:()=>import("./chunk-XLLFCK5L.js").then(s=>s.GlobalTaskControlComponent)},{path:"projects",loadComponent:()=>import("./chunk-IFOIZS2E.js").then(s=>s.ProjectListComponent)},{path:"oauth/callback",loadComponent:()=>import("./chunk-3LN7WHDT.js").then(s=>s.OAuthCallbackComponent)},{path:"project/new",loadComponent:()=>import("./chunk-WMJZ5F67.js").then(s=>s.ProjectNewComponent)},{path:"project/:projectName",loadComponent:()=>import("./chunk-CSYPFTXB.js").then(s=>s.MainAppComponent),canActivate:[ie]},{path:"project/:projectName/prompts",loadComponent:()=>import("./chunk-L2RA4HKE.js").then(s=>s.PromptListComponent),canActivate:[ie]},{path:"project/:projectName/schedulers",loadComponent:()=>import("./chunk-IQAYYKT5.js").then(s=>s.SchedulerListComponent),canActivate:[ie]},{path:"project/:projectName/agents",loadComponent:()=>import("./chunk-AVQED52W.js").then(s=>s.AgentListComponent),canActivate:[ie]},{path:"project/:projectName/tasks",loadComponent:()=>import("./chunk-QV4IBPS2.js").then(s=>s.TaskControlComponent),canActivate:[ie]},{path:"project/:projectName/missions",redirectTo:"project/:projectName/tasks"},{path:"project/:projectName/thread/:threadId",loadComponent:()=>import("./chunk-CSYPFTXB.js").then(s=>s.MainAppComponent),canActivate:[ie,cn]},{path:"token-usage",loadComponent:()=>import("./chunk-BEM5KLWR.js").then(s=>s.TokenUsageComponent)},{path:"agentos",loadChildren:()=>G(null,null,function*(){let{AGENTOS_ROUTES:s,THEME_PORT:e}=yield import("./chunk-RDEFHYHJ.js");return[{path:"",providers:[{provide:e,useFactory:t=>({theme:oi(t.currentTheme$,{initialValue:t.getCurrentTheme()}),setTheme:i=>t.setTheme(i)}),deps:[be]}],children:s}]})},{path:"**",redirectTo:""}];function fs(s){return()=>s.initializeDefaultProject()}function ps(s){return()=>{console.log("[APP_INIT] OAuthService initialized")}}function gs(s){return()=>G(null,null,function*(){let{UserStateService:e}=yield import("./chunk-RDEFHYHJ.js"),t=s.get(e);yield Se(t.loadMe().pipe(Lt(i=>(console.warn("Failed to load current user",i),kt(null)))))})}var hn={providers:[Ut(),Ht({eventCoalescing:!0}),ei(un),Zt(),ln(),{provide:si,useValue:{duration:3e3}},{provide:Te,useFactory:fs,deps:[we],multi:!0},{provide:Te,useFactory:ps,deps:[ci],multi:!0},{provide:Te,useFactory:gs,deps:[Bt],multi:!0},ri({basePath:"/api/agentos"}),{provide:ni,useValue:{width:"80vw",maxWidth:"80vw",maxHeight:"80vh"}}]};var Ge=class s{title="client";themeService=z(be);ngOnInit(){console.log("[APP] Application initialized with theme:",this.themeService.getCurrentTheme())}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=Gt({type:s,selectors:[["app-root"]],decls:1,vars:0,template:function(t,i){t&1&&Wt(0,"router-outlet")},dependencies:[ti,Jt],encapsulation:2})};xt(Ge,hn).catch(s=>console.error(s));"serviceWorker"in navigator&&!Yt()&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(s=>console.error("[SW] Registration failed:",s))});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whoz-oss/coday-client",
3
- "version": "0.233.1",
3
+ "version": "0.235.0",
4
4
  "repository": "https://github.com/whoz-oss/coday",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -1 +0,0 @@
1
- import{a as X}from"./chunk-2RRKNP4O.js";import{a as W}from"./chunk-MFNQXB7D.js";import"./chunk-JIYGZGAO.js";import{c as Q}from"./chunk-R727IQCN.js";import{a as q}from"./chunk-NQVAKMAF.js";import{d as J}from"./chunk-UNIVHWT7.js";import"./chunk-VH7ZEMCE.js";import{c as N}from"./chunk-COLWSJEP.js";import{s as H}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as w,c as G}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import{F as Y,c as K,g as $,h as B,i as R,l as M,n as L,v as A,w as j}from"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as f,Db as c,Fb as d,Hc as z,Ka as s,Rb as P,Tb as r,Ub as u,Vb as E,Wa as F,ca as v,ga as p,ha as m,jb as h,kb as O,lb as g,ma as I,mb as C,mc as U,pb as b,qb as y,rb as k,sb as n,t as V,ta as x,tb as t,u as D,ub as S}from"./chunk-3DOXTB6J.js";var T=(o,i)=>i.value;function ee(o,i){o&1&&(n(0,"p",4),r(1,"Loading\u2026"),t())}function te(o,i){if(o&1){let e=f();n(0,"button",18),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setThemeVariant(l.value))}),n(1,"span",19),r(2),t(),n(3,"span",20),r(4),t()()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__theme-variant--active",a.themeVariant()===e.value),h("aria-pressed",a.themeVariant()===e.value),s(2),u(e.label),s(2),u(e.description)}}function ne(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setTheme(l.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__segmented-option--active",a.themeMode()===e.value),h("aria-pressed",a.themeMode()===e.value),s(),E(" ",e.label," ")}}function ie(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setEnterKeyBehavior(l.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),h("aria-pressed",a.enterKeyBehavior()===e.value),s(),E(" ",e.label," ")}}function re(o,i){if(o&1){let e=f();n(0,"form",22),c("ngSubmit",function(){p(e);let l=d(2);return m(l.save())}),n(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",23),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",23),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"label",24),r(19,"First name"),t(),S(20,"input",25),t(),n(21,"div",7)(22,"label",26),r(23,"Last name"),t(),S(24,"input",27),t(),n(25,"div",7)(26,"label",28),r(27,"Bio"),t(),S(28,"textarea",29),t()(),n(29,"div",30)(30,"button",31),r(31),t(),n(32,"button",32),c("click",function(){p(e);let l=d(2);return m(l.cancelEditing())}),r(33,"Cancel"),t()()()}if(o&2){let e=d(),a=d();k("formGroup",a.form),s(8),u(e.email),s(5),u(e.externalId),s(17),k("disabled",a.isSaving()),s(),E(" ",a.isSaving()?"Saving\u2026":"Save changes"," ")}}function oe(o,i){o&1&&(n(0,"p",40),r(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function ae(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.confirmDelete(l))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let l=d(7);return m(l.cancelDelete())}),r(5," Cancel "),t()}}function le(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.armDelete(l))}),r(1," Delete "),t()}}function se(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,ae,6,0)(6,le,2,0,"button",46),t()),o&2){let e=i.$implicit,a=d(6);s(2),u(e.name),s(2),u(e.subtitle),s(),C(a.isPendingDelete(e)?5:6)}}function de(o,i){if(o&1&&(n(0,"h3",41),r(1,"Integrations"),t(),n(2,"ul",42),b(3,se,7,3,"li",43,O().trackEntry,!0),t()),o&2){let e=d(5);s(3),y(e.recap().integrations)}}function _e(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.confirmDelete(l))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let l=d(7);return m(l.cancelDelete())}),r(5," Cancel "),t()}}function ce(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.armDelete(l))}),r(1," Delete "),t()}}function pe(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,_e,6,0)(6,ce,2,0,"button",46),t()),o&2){let e=i.$implicit,a=d(6);s(2),u(e.name),s(2),u(e.subtitle),s(),C(a.isPendingDelete(e)?5:6)}}function me(o,i){if(o&1&&(n(0,"h3",41),r(1,"AI Providers"),t(),n(2,"ul",42),b(3,pe,7,3,"li",43,O().trackEntry,!0),t()),o&2){let e=d(5);s(3),y(e.recap().aiProviders)}}function ue(o,i){if(o&1&&(g(0,de,5,0),g(1,me,5,0)),o&2){let e=d(4);C(e.recap().integrations.length>0?0:-1),s(),C(e.recap().aiProviders.length>0?1:-1)}}function fe(o,i){if(o&1&&g(0,oe,2,0,"p",40)(1,ue,2,2),o&2){let e=d(3);C(e.recap().total===0?0:1)}}function ve(o,i){if(o&1){let e=f();n(0,"div",17)(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",33),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",33),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"span",8),r(19,"First name"),t(),n(20,"span",33),r(21),t()(),n(22,"div",7)(23,"span",8),r(24,"Last name"),t(),n(25,"span",33),r(26),t()(),n(27,"div",34)(28,"span",8),r(29,"Bio"),t(),n(30,"span",33),r(31),t()()(),n(32,"div",30)(33,"button",35),c("click",function(){p(e);let l=d(2);return m(l.startEditing())}),r(34," Edit profile "),t()(),n(35,"div",36)(36,"button",37),c("click",function(){p(e);let l=d(2);return m(l.toggleOverrides())}),n(37,"span",38),r(38,"\u25B6"),t(),r(39," My global user configurations "),n(40,"span",39),r(41),t()(),g(42,fe,2,1),t()()}if(o&2){let e=d(),a=d();s(8),u(e.email),s(5),u(e.externalId),s(8),u(e.firstname||"\u2014"),s(5),u(e.lastname||"\u2014"),s(5),u(e.bio||"\u2014"),s(5),h("aria-expanded",a.isOverridesExpanded()),s(),P("user-profile__overrides-arrow--open",a.isOverridesExpanded()),s(4),E("(",a.recap().total,")"),s(),C(a.isOverridesExpanded()?42:-1)}}function ge(o,i){if(o&1&&(n(0,"div",5)(1,"h2",6),r(2,"Appearance"),t(),n(3,"div",7)(4,"span",8),r(5,"Skin"),t(),n(6,"div",9),b(7,te,5,5,"button",10,T),t()(),n(9,"div",7)(10,"span",8),r(11,"Mode"),t(),n(12,"div",11),b(13,ne,2,4,"button",12,T),t()()(),n(15,"div",5)(16,"h2",6),r(17,"Composer"),t(),n(18,"div",7)(19,"span",8),r(20,"Enter key"),t(),n(21,"div",13)(22,"div",14),b(23,ie,2,4,"button",12,T),t(),n(25,"p",15),r(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(27,re,34,5,"form",16)(28,ve,43,10,"div",17)),o&2){let e=d();s(7),y(e.themeVariantOptions),s(6),y(e.themeOptions),s(10),y(e.enterKeyOptions),s(4),C(e.isEditing()?27:28)}}function Ce(o,i){o&1&&(n(0,"p",4),r(1,"Unable to load profile."),t())}var Z=class o{userState=v(q);router=v(N);location=v(z);destroyRef=v(I);integrationState=v(W);providerState=v(X);themePort=v(J);preferencesPort=v(Q);isEditing=x(!1);isLoading=x(!1);isSaving=x(!1);isOverridesExpanded=x(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=U(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=U(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new R({firstname:new M("",{nonNullable:!0}),lastname:new M("",{nonNullable:!0}),bio:new M("",{nonNullable:!0})});recap=G(D([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(V(([i,e])=>{let a=i.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),l=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:a,aiProviders:l,total:a.length+l.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(w(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i})}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode})}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(w(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null)}pendingDeleteKey=x(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(w(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a)}})}entryKey(i){return`${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=F({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),c("action",function(){return a.goBack()}),t(),n(3,"h1",3),r(4,"My profile"),t()(),g(5,ee,2,0,"p",4)(6,ge,29,1)(7,Ce,2,0,"p",4),t()),e&2){let l;s(5),C(a.isLoading()?5:(l=a.currentUser())?6:7,l)}},dependencies:[Y,L,K,$,B,j,A,H],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}"],changeDetection:0})};export{Z as UserProfileComponent};
@@ -1 +0,0 @@
1
- import{a as oe}from"./chunk-MFNQXB7D.js";import"./chunk-JIYGZGAO.js";import"./chunk-NQVAKMAF.js";import{b as G,h as U,u as W}from"./chunk-VH7ZEMCE.js";import{a as L,c as $,d as j}from"./chunk-COLWSJEP.js";import{a as S}from"./chunk-PUWEEZSA.js";import{F as ne,b as Y,c as q,e as P,g as J,h as H,i as K,l as _,n as Q,s as X,w as Z,y as ee,z as te}from"./chunk-ZJV25K6M.js";import{Bb as w,D as N,Db as b,Fb as s,Ka as g,Tb as a,Ub as y,Vb as E,Wa as V,a as R,b as T,ca as v,ga as C,ha as x,jb as B,lb as f,m as I,ma as D,mb as p,nb as z,pb as A,qb as M,rb as d,sb as i,t as F,ta as u,tb as n,ub as h,z as O}from"./chunk-3DOXTB6J.js";var re=(r,t)=>t.config.id,ae=(r,t)=>t.type;function le(r,t){if(r&1&&(i(0,"a",5),a(1,"View resolved definition \u2192"),n()),r&2){let e=s();d("routerLink",e.inspectRoute())}}function ge(r,t){r&1&&(i(0,"span",6),a(1,"Platform level"),n())}function ce(r,t){r&1&&(i(0,"p",7),a(1,"Loading\u2026"),n())}function se(r,t){if(r&1&&(i(0,"span",41),a(1),n()),r&2){let e=s().$implicit;g(),y(e.config.integrationType)}}function de(r,t){if(r&1&&h(0,"input",42),r&2){let e=s().$implicit;d("formControl",e.toolsControl)}}function me(r,t){if(r&1){let e=w();i(0,"div",37)(1,"label",38)(2,"input",39),b("change",function(){let l=C(e).$implicit,c=s(3);return x(c.toggleIntegration(l))}),n(),i(3,"span",40),a(4),n(),f(5,se,2,1,"span",41),n(),f(6,de,1,1,"input",42),n()}if(r&2){let e=t.$implicit;g(2),d("checked",e.enabled()),g(2),y(e.config.name),g(),p(e.config.integrationType?5:-1),g(),p(e.enabled()?6:-1)}}function fe(r,t){if(r&1&&(i(0,"p",48),a(1),n()),r&2){let e=s().$implicit;g(),E(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ")}}function pe(r,t){if(r&1){let e=w();i(0,"div",37)(1,"label",38)(2,"span",40),a(3),n(),i(4,"span",41),a(5,"built-in"),n()(),i(6,"select",44),b("change",function(l){let c=C(e).$implicit,m=s(4);return x(m.setBuiltInState(c,l.target.value))}),i(7,"option",45),a(8),n(),i(9,"option",46),a(10,"Enabled"),n(),i(11,"option",47),a(12,"Disabled"),n()(),f(13,fe,2,1,"p",48),i(14,"p",49),a(15),n()()}if(r&2){let e=t.$implicit,o=s(4);g(),B("for","built-in-"+e.type),g(2),y(e.displayName),g(3),d("id","built-in-"+e.type)("value",e.state()),g(2),y(o.builtInDefaultLabel(e)),g(5),p(e.state()==="on"&&e.restrictedTools?13:-1),g(2),y(e.description)}}function _e(r,t){if(r&1&&(i(0,"p",43),a(1,"Built-in integrations"),n(),A(2,pe,16,7,"div",37,ae)),r&2){let e=s(3);g(2),M(e.builtInRows())}}function ue(r,t){if(r&1&&(i(0,"fieldset",20)(1,"legend",25),a(2,"Integrations"),n(),i(3,"p",36),a(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),n(),A(5,me,7,4,"div",37,re),f(7,_e,4,0),n()),r&2){let e=s(2);g(5),M(e.integrationRows()),g(2),p(e.builtInRows().length>0?7:-1)}}function be(r,t){if(r&1){let e=w();i(0,"li",50),h(1,"input",51),i(2,"button",52),b("click",function(){let l=C(e).$implicit,c=s(3);return x(c.removeSubAgent(l))}),a(3," \u{1F5D1} "),n()()}if(r&2){let e=t.$implicit;g(),d("formControl",e.control)}}function Ce(r,t){if(r&1&&(i(0,"ul",28),A(1,be,4,1,"li",50,z),n()),r&2){let e=s(2);g(),M(e.subAgentRows())}}function xe(r,t){if(r&1){let e=w();i(0,"button",53),b("click",function(){C(e);let l=s(2);return x(l.exportYaml())}),a(1),n()}if(r&2){let e=s(2);d("disabled",e.isExporting()),g(),E(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ")}}function he(r,t){if(r&1){let e=w();i(0,"form",9),b("ngSubmit",function(){C(e);let l=s();return x(l.submit())}),i(1,"div",10)(2,"label",11),a(3,"Name "),i(4,"span",12),a(5,"*"),n()(),h(6,"input",13),n(),i(7,"div",10)(8,"label",14),a(9,"Description"),n(),h(10,"input",15),n(),i(11,"div",10)(12,"label",16),a(13,"Model name"),n(),h(14,"input",17),n(),i(15,"div",10)(16,"label",18),a(17,"Instructions"),n(),h(18,"textarea",19),n(),f(19,ue,8,1,"fieldset",20),i(20,"div",10)(21,"label",21),h(22,"input",22),i(23,"span",23),a(24,"Advanced mode"),n()(),i(25,"p",24),a(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),n()(),i(27,"div",10)(28,"label",21),h(29,"input",22),i(30,"span",23),a(31,"Enabled"),n()(),i(32,"p",24),a(33,"Disabled agents are excluded from namespace resolution."),n()(),i(34,"div",10)(35,"span",25),a(36,"Sub-agents"),n(),i(37,"p",26),a(38," Glob patterns for agents this agent may delegate to. "),i(39,"code",27),a(40,"*"),n(),a(41," matches any sequence of characters (e.g.\xA0"),i(42,"code",27),a(43,"*Fixer"),n(),a(44,", "),i(45,"code",27),a(46,"*"),n(),a(47," for all). Leave empty to disable delegation. "),n(),f(48,Ce,3,0,"ul",28),i(49,"div",29)(50,"input",30),b("keydown.enter",function(){C(e);let l=s();return x(l.addSubAgent())}),n(),i(51,"button",31),b("click",function(){C(e);let l=s();return x(l.addSubAgent())}),a(52," + "),n()()(),i(53,"div",32)(54,"button",33),a(55),n(),f(56,xe,2,2,"button",34),i(57,"button",35),b("click",function(){C(e);let l=s();return x(l.cancel())}),a(58,"Cancel"),n()()()}if(r&2){let e=s();d("formGroup",e.form),g(6),d("formControl",e.nameControl),g(4),d("formControl",e.descriptionControl),g(4),d("formControl",e.modelNameControl),g(4),d("formControl",e.instructionsControl),g(),p(e.integrationRows().length>0||e.builtInRows().length>0?19:-1),g(3),d("formControl",e.advancedExecutionControl),g(7),d("formControl",e.enabledControl),g(19),p(e.subAgentRows().length>0?48:-1),g(2),d("formControl",e.newSubAgentControl),g(),d("disabled",!e.newSubAgentControl.value.trim()),g(3),d("disabled",e.form.invalid||e.isSubmitting()),g(),E(" ",e.isEditMode()?"Save changes":"Create"," "),g(),p(e.isEditMode()?56:-1)}}var ie=class r{route=v(L);router=v($);destroyRef=v(D);agentConfigController=v(G);exportService=v(W);integrationConfigState=v(oe);integrationTypeController=v(U);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new K({name:new _("",{nonNullable:!0,validators:[P.required,P.minLength(1)]}),description:new _(null),modelName:new _(null),instructions:new _(null),advancedExecution:new _(!1,{nonNullable:!0}),enabled:new _(!1,{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}get enabledControl(){return this.form.controls.enabled}subAgentRows=u([]);newSubAgentControl=new _("",{nonNullable:!0});isEditMode=u(!1);isSubmitting=u(!1);isLoading=u(!1);isExporting=u(!1);builtInRows=u([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}integrationRows=u([]);existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(!0),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0)}loadConfigAndIntegrations(t){this.isLoading.set(!0),O({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):I([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(S(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:l,builtInTypes:c})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??!1),this.enabledControl.setValue(e.enabled??!0);let m=[...l,...o];this.integrationRows.set(this.buildIntegrationRows(m,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(c,e.integrations??void 0)),this.subAgentRows.set((e.subAgents??[]).map(k=>({control:new _(k,{nonNullable:!0})}))),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}loadIntegrations(t){O({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):I([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(S(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:l})=>{let c=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(c,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(l,t??void 0))}})}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(F(t=>t.filter(e=>e.builtIn===!0)),N(t=>(console.error("[agent-config-form] failed to load integration types",t),I([]))))}buildIntegrationRows(t,e){return t.map(o=>{let l=o.name??"",c=e?.[l],m=e!=null&&l in e,k=Array.isArray(c)?c.join(", "):"";return{config:o,enabled:u(m),toolsControl:new _(k,{nonNullable:!0})}})}buildBuiltInRows(t,e){return t.map(o=>{let l=e!=null&&o.type in e,c=e?.[o.type],m=l?Array.isArray(c)&&c.length===0?"off":"on":"default";return{type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===!0,state:u(m),restrictedTools:Array.isArray(c)&&c.length>0?c:null}})}toggleIntegration(t){t.enabled.update(e=>!e)}setBuiltInState(t,e){t.state.set(e)}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();t&&(this.subAgentRows.update(e=>[...e,{control:new _(t,{nonNullable:!0})}]),this.newSubAgentControl.reset(""))}removeSubAgent(t){this.subAgentRows.update(e=>e.filter(o=>o!==t))}buildSubAgentsPayload(){let t=this.subAgentRows().map(e=>e.control.value.trim()).filter(e=>e.length>0);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(l=>l.enabled())){let l=o.config.name??"",c=o.toolsControl.value.trim();t[l]=c===""?null:c.split(",").map(m=>m.trim()).filter(m=>m.length>0)}for(let o of this.builtInRows()){let l=o.state();l==="on"?t[o.type]=o.restrictedTools??null:l==="off"&&(t[o.type]=[])}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,l]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=l);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.isSubmitting.set(!0);let t=T(R({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value,enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(S(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(!0),this.exportService.exportAsYaml(t).pipe(S(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),l=URL.createObjectURL(o),c=document.createElement("a");c.href=l,c.download=`${this.existingConfig?.name??"agent"}.yaml`,c.click(),URL.revokeObjectURL(l),this.isExporting.set(!1)},error:()=>this.isExporting.set(!1)}))}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"])}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=V({type:r,selectors:[["agentos-agent-config-form"]],decls:12,vars:4,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__platform-badge"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__label"],[1,"agent-config-form__field-hint"],[1,"agent-config-form__code"],[1,"agent-config-form__sub-agent-list"],[1,"agent-config-form__sub-agent-add"],["type","text","placeholder","e.g. *Fixer or *","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"keydown.enter","formControl"],["type","button","title","Add pattern",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--add",3,"click","disabled"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"],[1,"agent-config-form__integrations-separator"],[1,"agent-config-form__integration-state",3,"change","id","value"],["value","default"],["value","on"],["value","off"],[1,"agent-config-form__integration-restriction"],[1,"agent-config-form__integration-builtin-desc"],[1,"agent-config-form__sub-agent-row"],["type","text","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"formControl"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger",3,"click"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"click","disabled"]],template:function(e,o){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),b("click",function(){return o.cancel()}),i(3,"span",3),a(4,"\u2190"),n(),a(5," Agent Configs "),n(),i(6,"h1",4),a(7),n(),f(8,le,2,1,"a",5),f(9,ge,2,0,"span",6),n(),f(10,ce,2,0,"p",7)(11,he,59,14,"form",8),n()),e&2&&(g(7),y(o.isEditMode()?"Edit agent config":"New agent config"),g(),p(o.isEditMode()?8:-1),g(),p(o.isPlatformMode?9:-1),g(),p(o.isLoading()?10:11))},dependencies:[ne,Q,ee,te,q,Y,J,H,X,Z,j],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.agent-config-form__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-accent);text-decoration:none}.agent-config-form__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__platform-badge[_ngcontent-%COMP%]{display:inline-block;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:var(--color-surface);border:1px solid var(--color-divider);border-radius:0;padding:.125rem .5rem;letter-spacing:.02em;align-self:flex-start}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__integrations-separator[_ngcontent-%COMP%]{margin:.25rem 0 0;padding-top:.5rem;border-top:1px solid var(--color-divider);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);font-family:var(--font-heading)}.agent-config-form__integration-state[_ngcontent-%COMP%]{margin-left:1.5rem;padding:.375rem .625rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;outline:none;transition:border-color .15s ease}.agent-config-form__integration-state[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__integration-restriction[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;font-style:italic;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-builtin-desc[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__field-hint[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:0}.agent-config-form__sub-agent-list[_ngcontent-%COMP%]{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.375rem}.agent-config-form__sub-agent-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem}.agent-config-form__sub-agent-input[_ngcontent-%COMP%]{flex:1;min-width:0}.agent-config-form__sub-agent-add[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;margin-top:.5rem}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]{flex-shrink:0;width:2rem;height:2rem;padding:0;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text-secondary);font-size:.9rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,color .15s ease}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500);color:var(--color-text)}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]{width:2rem;height:2rem;font-size:1.25rem;font-weight:300;border-color:var(--color-accent);color:var(--color-accent)}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent);color:#fff}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]{border:1px solid transparent;color:var(--color-neutral-500)}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--red);color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent)}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"],changeDetection:0})};export{ie as AgentConfigFormComponent};
@@ -1 +0,0 @@
1
- import{a as ze}from"./chunk-KY2WN2WL.js";import{a as Ne}from"./chunk-ZGOOG7E4.js";import{a as Oe}from"./chunk-GULJQNKJ.js";import{a as Te,b as He,c as Ue}from"./chunk-63DV6LLE.js";import{a as we,b as Fe,c as Ee}from"./chunk-UCATWB2P.js";import{a as Ie}from"./chunk-FS4CUJQH.js";import{a as ke}from"./chunk-OJAJVOW4.js";import{a as Q}from"./chunk-6TRRS6GZ.js";import{a as ee,b as te,c as ne,d as oe,e as ae,f as re,g as ie,h as me,i as pe,j as de,k as ce,l as le,m as ge,n as he,o as ue,p as fe,q as Ce,r as be,s as ve,t as _e,u as xe}from"./chunk-OUCM7C5E.js";import{a as X,b as Z,c as $}from"./chunk-R727IQCN.js";import{a as se}from"./chunk-TBHL5APT.js";import"./chunk-5EIDKSSY.js";import{a as Ae}from"./chunk-2OX7XSO7.js";import"./chunk-SG2Y5LGP.js";import{a as H}from"./chunk-NQVAKMAF.js";import{a as Y,b as q,c as J,d as K}from"./chunk-UNIVHWT7.js";import{a as Se,b as Me}from"./chunk-MDHGCSE2.js";import{a as Pe,b as ye}from"./chunk-DLB34U6L.js";import{k as F}from"./chunk-VH7ZEMCE.js";import"./chunk-3A3LFDQO.js";import{c as w}from"./chunk-COLWSJEP.js";import{s as T}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as E}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as k,Db as c,Fb as C,Ka as p,Rb as O,Tb as r,Ub as x,Wa as h,ca as g,ga as A,ha as P,lb as s,ma as y,mb as l,mc as I,rb as v,sb as n,ta as b,tb as o,ub as f,vb as S,wb as M,xb as _}from"./chunk-3DOXTB6J.js";var t=()=>!0;var Re=[{path:"",loadComponent:()=>import("./chunk-WMFFMGRT.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-OFPREK4V.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-EJX3SCU5.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-4KS5XFO4.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4KS5XFO4.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-TT5QO735.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-E5K3YORT.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-NAJJT42Y.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-NAJJT42Y.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-ALD52Y36.js").then(e=>e.AdminUsersGroupsComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-LPBSLDC7.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-LPBSLDC7.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-3DCEAZDI.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/scheduled-prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-SBHTD5EV.js").then(e=>e.ScheduledPromptFormComponent)},{path:"admin/scheduled-prompts/:scheduledPromptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-SBHTD5EV.js").then(e=>e.ScheduledPromptFormComponent)},{path:"admin/scheduled-prompts",canActivate:[t],loadComponent:()=>import("./chunk-QAGM2FI6.js").then(e=>e.PlatformScheduledPromptsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-HV4YVRZD.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-HV4YVRZD.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-XZAGZJYJ.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-MKGPVNPI.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-MKGPVNPI.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-ZJ5WTNW7.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-OFLO4C7X.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-OFLO4C7X.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-TOQLOSTJ.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-4WS3QONK.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4WS3QONK.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-BYGLGHPS.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-VZVJKZA2.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-3PL5XB7S.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-3PL5XB7S.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-LPBSLDC7.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-LPBSLDC7.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-56F7GUQR.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-MKGPVNPI.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-MKGPVNPI.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-U6DZITWN.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-OFLO4C7X.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-OFLO4C7X.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-V4WIZDIH.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/scheduled-prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-SBHTD5EV.js").then(e=>e.ScheduledPromptFormComponent)},{path:":namespaceId/scheduled-prompts/:scheduledPromptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-SBHTD5EV.js").then(e=>e.ScheduledPromptFormComponent)},{path:":namespaceId/scheduled-prompts",canActivate:[t],loadComponent:()=>import("./chunk-XKAY4JO3.js").then(e=>e.ScheduledPromptListComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-HV4YVRZD.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-HV4YVRZD.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-OMBUBJIY.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-4WS3QONK.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4WS3QONK.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-BYGLGHPS.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-LVLF3D4X.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:":namespaceId/user-groups/new",canActivate:[t],loadComponent:()=>import("./chunk-4MIM6YHV.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups/:userGroupId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4MIM6YHV.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups",canActivate:[t],loadComponent:()=>import("./chunk-MHB6HAME.js").then(e=>e.NamespaceUserGroupsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function B(e,i){e&1&&_(0,"span",1)}function R(e,i){e&1&&_(0,"span",2)}function j(e,i){e&1&&_(0,"span",3)}var u=class e{pluginService=g(F);online=b(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(a,m){if(a&1&&(S(0,"div",0),s(1,B,1,0,"span",1)(2,R,1,0,"span",2)(3,j,1,0,"span",3),M()),a&2){let d;p(),l((d=m.online())===!0?1:d===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function G(e,i){if(e&1){let a=k();n(0,"button",9),c("click",function(){A(a);let d=C();return P(d.navigateToAdmin())}),n(1,"span",10),r(2,"\u2699\uFE0F"),o()()}}function L(e,i){if(e&1&&(n(0,"span",7),r(1),o()),e&2){let a=C();p(),x(a.userInitials)}}function V(e,i){e&1&&(n(0,"span",8),r(1,"\u25EF"),o())}var z=class e{router=g(w);userState=g(H);destroyRef=g(y);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=I(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(E(this.destroyRef)).subscribe()}get userInitials(){let i=this.currentUser();if(!i)return"";let a=i.firstname?.[0]??"",m=i.lastname?.[0]??"";return(a+m).toUpperCase()||i.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(a,m){a&1&&(n(0,"header",0)(1,"button",1),c("click",function(){return m.navigateHome()}),f(2,"img",2),n(3,"span",3),r(4,"Coday"),o()(),n(5,"nav",4),f(6,"agentos-backend-status"),s(7,G,3,0,"button",5),n(8,"button",6),c("click",function(){return m.toggleProfile()}),s(9,L,2,1,"span",7)(10,V,2,0,"span",8),o()()()),a&2&&(p(7),l(m.isAdmin()?7:-1),p(),O("header__user-btn--active",m.isOnProfilePage),v("title",m.isOnProfilePage?"Back":"My profile"),p(),l(m.userInitials?9:10))},dependencies:[u],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;letter-spacing:-.01em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};function W(e,i){if(e&1&&(n(0,"p",11),r(1," Last action: "),n(2,"strong"),r(3),o()()),e&2){let a=C();p(3),x(a.lastAction())}}var D=class e{lastAction=b(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=h({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(a,m){a&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),r(3,"AgentOS UI"),o(),n(4,"h1"),r(5,"Hello AgentOS"),o(),n(6,"p"),r(7," This component lives in "),n(8,"code"),r(9,"libs/agentos-ui"),o(),r(10," \u2014 isolated from Coday internals, ready to be published as "),n(11,"code"),r(12,"@whoz-oss/agentos-ui"),o(),r(13,". "),o(),f(14,"agentos-backend-status"),n(15,"ul",3)(16,"li"),r(17,"\u2726 No imports from Coday app"),o(),n(18,"li"),r(19,"\u2726 CSS custom properties as host contract"),o(),n(20,"li"),r(21,"\u2726 Standalone Angular components"),o(),n(22,"li"),r(23,"\u2726 Signals-first reactive state"),o()(),n(24,"div",4)(25,"p",5),r(26,"ds-icon-button from "),n(27,"code"),r(28,"@whoz-oss/design-system"),o()(),n(29,"div",6)(30,"ds-icon-button",7),c("action",function(){return m.onSend()}),o(),n(31,"ds-icon-button",8),c("action",function(){return m.onStop()}),o(),n(32,"ds-icon-button",9),c("action",function(){return m.onAttach()}),o(),n(33,"ds-icon-button",10),c("action",function(){return m.onAttach()}),o()(),s(34,W,4,1,"p",11),o()()()),a&2&&(p(33),v("disabled",!0),p(),l(m.lastAction()?34:-1))},dependencies:[T,u],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{Re as AGENTOS_ROUTES,Pe as ActionCardChipsDirective,ye as ActionCardComponent,Ue as AdminUsersGroupsComponent,Q as AgentosShellComponent,J as AgentosThemeService,Z as AgentosUserPreferencesService,u as BackendStatusComponent,Ce as CaseChatComponent,_e as CaseDrawerComponent,be as CaseHomeComponent,ve as CaseItemComponent,xe as CaseShellComponent,X as ENTER_KEY_BEHAVIORS,le as ExchangeContentViewerComponent,ue as ExchangeDrawerComponent,he as ExchangeFileListComponent,ge as ExchangeItemComponent,fe as ExchangeShellComponent,ee as ExchangeStateService,z as HeaderComponent,D as HelloAgentosComponent,Ae as LayoutComponent,te as MAX_VIEWABLE_SIZE,se as MarkdownPipe,Se as NamespaceItemComponent,Me as NamespaceListComponent,we as NamespaceSelectComponent,ze as NamespaceUserGroupsComponent,q as THEME_MODES,K as THEME_PORT,Y as THEME_VARIANTS,$ as USER_PREFERENCES_PORT,ke as UserAdminStateService,Oe as UserFormComponent,Ne as UserGroupFormComponent,Fe as UserGroupItemComponent,Ee as UserGroupListComponent,Ie as UserGroupStateService,Te as UserItemComponent,He as UserListComponent,H as UserStateService,t as agentosReadyGuard,pe as canViewFile,re as detectFormat,ce as exchangeMutationScope,ae as formatDate,oe as formatSize,ne as getFileIcon,ie as isFormatViewable,me as isViewable,de as reindentJson};
@@ -1 +0,0 @@
1
- import{v as w,y as O}from"./chunk-VH7ZEMCE.js";import{c as D}from"./chunk-COLWSJEP.js";import{A as k,s as E}from"./chunk-2X6HKQMK.js";import{Bb as v,Db as g,Fb as l,Ka as d,Rb as y,Tb as s,Ub as b,Vb as C,Wa as M,ca as P,ga as h,ha as f,lb as c,mb as m,pc as x,qc as u,rb as I,sb as r,ta as S,tb as o}from"./chunk-3DOXTB6J.js";function L(n,t){if(n&1&&(r(0,"span",5),s(1),o()),n&2){let e=l();d(),b(e.definition().description)}}function q(n,t){if(n&1&&(r(0,"span",7),s(1),o()),n&2){let e=l();d(),C("Next: ",e.nextRunLabel)}}function U(n,t){if(n&1&&(r(0,"span",8),s(1),o()),n&2){let e=l();d(),C("Last run: ",e.lastRunLabel)}}function $(n,t){if(n&1){let e=v();r(0,"span",12),s(1,"Delete?"),o(),r(2,"ds-icon-button",13),g("action",function(){h(e);let a=l(2);return f(a.onDeleteConfirmed())}),o(),r(3,"ds-icon-button",14),g("action",function(){h(e);let a=l(2);return f(a.onDeleteCancelled())}),o()}}function N(n,t){if(n&1){let e=v();r(0,"ds-kebab-menu",15),g("itemSelected",function(a){h(e);let p=l(2);return f(p.onMenuAction(a))}),o()}if(n&2){let e=l(2);I("items",e.menuItems)}}function V(n,t){if(n&1&&(r(0,"div",10),c(1,$,4,0)(2,N,1,1,"ds-kebab-menu",11),o()),n&2){let e=l();y("scheduled-prompt-item__actions--confirming",e.pendingDelete()),d(),m(e.pendingDelete()?1:2)}}var R=class n{router=P(D);definition=u.required();namespaceId=u(void 0);platformMode=u(!1);readOnly=u(!1);enableRequested=x();disableRequested=x();deleteRequested=x();pendingDelete=S(!1);get scheduleLabel(){let{recurrence:t}=this.definition(),e=t.unit,i=t.timeUtc,a=e===w.WEEK?"week":"month",p=e===w.WEEK&&t.days?.length?` (${t.days.map(_=>O[_]??_).join(", ")})`:"";return`Every ${a}${p} at ${i} UTC`}formatInstant(t){if(!t)return null;let e=new Date(t),i=e.getUTCDate(),a=e.toLocaleString("en-GB",{month:"short",timeZone:"UTC"}),p=e.getUTCFullYear(),_=String(e.getUTCHours()).padStart(2,"0"),T=String(e.getUTCMinutes()).padStart(2,"0");return`${i} ${a} ${p} at ${_}:${T} UTC`}get nextRunLabel(){return this.formatInstant(this.definition().nextRunAt)}get lastRunLabel(){return this.formatInstant(this.definition().lastRunAt)}get menuItems(){let t=this.definition();return[{key:"edit",label:"Edit scheduled prompt",icon:"edit"},{key:"toggle",label:t.enabled?"Disable":"Enable",icon:t.enabled?"toggle_on":"toggle_off"},{key:"delete",label:"Delete scheduled prompt",icon:"delete",variant:"danger"}]}onMenuAction(t){let e=this.definition();switch(t){case"edit":this.platformMode()?this.router.navigate(["/agentos","admin","scheduled-prompts",e.id,"edit"]):this.router.navigate(["/agentos",this.namespaceId(),"scheduled-prompts",e.id,"edit"]);break;case"toggle":e.enabled?this.disableRequested.emit(e):this.enableRequested.emit(e);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.definition())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["agentos-scheduled-prompt-item"]],inputs:{definition:[1,"definition"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"]},outputs:{enableRequested:"enableRequested",disableRequested:"disableRequested",deleteRequested:"deleteRequested"},decls:13,vars:11,consts:[["role","listitem",1,"scheduled-prompt-item"],[1,"scheduled-prompt-item__body"],[1,"scheduled-prompt-item__header"],[1,"scheduled-prompt-item__name"],[1,"scheduled-prompt-item__status"],[1,"scheduled-prompt-item__description"],[1,"scheduled-prompt-item__schedule"],[1,"scheduled-prompt-item__next-run"],[1,"scheduled-prompt-item__last-run"],[1,"scheduled-prompt-item__actions",3,"scheduled-prompt-item__actions--confirming"],[1,"scheduled-prompt-item__actions"],[3,"items"],[1,"scheduled-prompt-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),s(4),o(),r(5,"span",4),s(6),o()(),c(7,L,2,1,"span",5),r(8,"span",6),s(9),o(),c(10,q,2,1,"span",7),c(11,U,2,1,"span",8),o(),c(12,V,3,3,"div",9),o()),e&2&&(d(4),b(i.definition().name),d(),y("scheduled-prompt-item__status--enabled",i.definition().enabled)("scheduled-prompt-item__status--disabled",!i.definition().enabled),d(),C(" ",i.definition().enabled?"Enabled":"Disabled"," "),d(),m(i.definition().description?7:-1),d(2),b(i.scheduleLabel),d(),m(i.nextRunLabel?10:-1),d(),m(i.lastRunLabel?11:-1),d(),m(i.readOnly()?-1:12))},dependencies:[k,E],styles:[".scheduled-prompt-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.scheduled-prompt-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.scheduled-prompt-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.scheduled-prompt-item__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.scheduled-prompt-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.scheduled-prompt-item__status[_ngcontent-%COMP%]{font-size:.7rem;font-weight:600;padding:.15rem .5rem;border-radius:999px;white-space:nowrap;flex-shrink:0;text-transform:uppercase;letter-spacing:.04em}.scheduled-prompt-item__status--enabled[_ngcontent-%COMP%]{background:var(--color-success-bg, rgba(52, 199, 89, .12));color:var(--color-success, #34c759)}.scheduled-prompt-item__status--disabled[_ngcontent-%COMP%]{background:var(--color-warning-bg, rgba(255, 159, 10, .12));color:var(--color-warning, #ff9f0a)}.scheduled-prompt-item__description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__schedule[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__next-run[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__last-run[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.scheduled-prompt-item[_ngcontent-%COMP%]:hover .scheduled-prompt-item__actions[_ngcontent-%COMP%], .scheduled-prompt-item[_ngcontent-%COMP%]:focus-within .scheduled-prompt-item__actions[_ngcontent-%COMP%]{opacity:1}.scheduled-prompt-item__actions--confirming[_ngcontent-%COMP%]{opacity:1}.scheduled-prompt-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};export{R as a};
@@ -1 +0,0 @@
1
- import{b as y}from"./chunk-DLB34U6L.js";import{c as k}from"./chunk-COLWSJEP.js";import"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as h,Db as u,Fb as _,Ka as d,Tb as o,Wa as p,ca as s,ga as m,ha as c,pb as l,qb as g,rb as f,sb as t,tb as i}from"./chunk-3DOXTB6J.js";var M=(a,n)=>n.key;function b(a,n){if(a&1){let e=h();t(0,"agentos-action-card",6),u("nameClicked",function(){let v=m(e).$implicit,x=_();return c(x.navigateTo(v.path))}),i()}if(a&2){let e=n.$implicit;f("name",e.name)("mark",e.mark)("markIsEmoji",!0)("description",e.description)("clickable",!0)}}var C=class a{router=s(k);sections=[{key:"users",mark:"\u{1F464}",name:"Users & Groups",description:"Manage platform users, their admin rights, and namespace user groups.",path:"/agentos/admin/users"},{key:"agents",mark:"\u{1F916}",name:"Platform agents",description:"Manage agent configs shared across all namespaces.",path:"/agentos/admin/agent-configs"},{key:"integrations",mark:"\u{1F517}",name:"Platform integrations",description:"Manage integration configs shared across all namespaces.",path:"/agentos/admin/integration-configs"},{key:"ai-providers",mark:"\u{1F9E0}",name:"Platform AI providers",description:"Manage AI provider configs shared across all namespaces.",path:"/agentos/admin/ai-providers"},{key:"ai-models",mark:"\u2728",name:"Platform AI models",description:"Manage AI model configs shared across all namespaces.",path:"/agentos/admin/ai-models"},{key:"prompts",mark:"\u{1F4C4}",name:"Platform prompts",description:"Manage prompts shared across all namespaces.",path:"/agentos/admin/prompts"},{key:"case-definitions",mark:"\u23F0",name:"Platform case definitions",description:"Manage scheduled case definitions shared across all namespaces.",path:"/agentos/admin/case-definitions"}];navigateTo(n){this.router.navigate([n])}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=p({type:a,selectors:[["agentos-admin-home"]],decls:9,vars:0,consts:[[1,"admin-home"],[1,"admin-home__header"],[1,"admin-home__title"],[1,"admin-home__subtitle"],[1,"admin-home__sections"],[3,"name","mark","markIsEmoji","description","clickable"],[3,"nameClicked","name","mark","markIsEmoji","description","clickable"]],template:function(e,r){e&1&&(t(0,"div",0)(1,"header",1)(2,"h1",2),o(3,"Administration"),i(),t(4,"p",3),o(5,"Platform-level settings, visible to super-admins only."),i()(),t(6,"nav",4),l(7,b,1,5,"agentos-action-card",5,M),i()()),e&2&&(d(7),g(r.sections))},dependencies:[y],styles:[".admin-home[_ngcontent-%COMP%]{max-width:860px;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:2rem}.admin-home__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.admin-home__title[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:700;color:var(--color-text);font-family:var(--font-heading)}.admin-home__subtitle[_ngcontent-%COMP%]{margin:0;font-size:13px;color:var(--color-neutral-600)}.admin-home__sections[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}"],changeDetection:0})};export{C as AdminHomeComponent};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-2OX7XSO7.js";import"./chunk-SG2Y5LGP.js";import"./chunk-NQVAKMAF.js";import"./chunk-UNIVHWT7.js";import"./chunk-VH7ZEMCE.js";import"./chunk-COLWSJEP.js";import"./chunk-3DOXTB6J.js";export{a as LayoutComponent};