import{a as li,b as pn,c as C4,d as de,e as ie,f as y4,g as Je,h as w4,i as M4,j as k4,k as T4,l as Ie,m as gt,n as nt,o as pc,p as Ne,q as bt,r as Fe,s as _e,t as $4,u as H4,v as DC,w as U4,x as eh}from"./chunk-764TLGKY.js";import{$ as G4,A as N4,B as vr,C as Ya,D as te,E as Ju,F as pk,G as ga,H as jr,I as F4,J as Wd,K as R4,L as Zi,M as ci,N as L4,O as V4,P as tr,Q as nr,R as B4,S as z4,T as j4,U as To,V as $r,W as qd,X as ki,Y as Qd,Z as zo,_ as di,a as It,b as wt,c as et,d as fi,e as MC,f as Gs,g as Mi,h as kC,i as Zu,j as Me,k as we,l as fd,m as TC,n as E4,o as D4,p as EC,q as P4,r as _t,s as I4,t as A4,u as Fo,v as At,w as vt,x as ko,y as Ws,z as O4}from"./chunk-NJCA2RVJ.js";import{$ as J,$a as O,$b as IO,$c as Uu,$d as zt,$e as wi,A as sr,Aa as Ia,Ab as Xt,Ac as VO,Ad as hC,Ae as dk,B as Qa,Ba as Zv,Bb as Kt,Bc as BO,Bd as n4,Be as SC,C as Kv,Ca as lr,Cb as Pe,Cc as rC,Ce as u4,D as Hn,Da as zu,Db as nn,Dc as aC,Dd as fC,De as wC,E as ai,Ea as m,Eb as Be,Ec as zO,Ee as mk,F as Ud,Fa as Xa,Fb as er,Fc as jO,Fe as hd,G as po,Ga as Oo,Gb as d,Gc as $u,Gd as Qu,Ge as h4,H as ok,Ha as sd,Hb as j,Hc as $O,Hd as i4,He as qo,I as rk,Ia as Si,Ib as ee,Ic as HO,Id as ud,Ie as f4,J as _O,Ja as ot,Jb as ui,Jc as js,Jd as Ft,Je as bp,K as vO,Ka as MO,Kb as eC,Kc as UO,Kd as gC,Ke as g4,L as Ao,La as oo,Lb as oc,Lc as Hu,Ld as Ue,Le as _4,M as CO,Ma as F,Mb as rc,Mc as GO,Md as o4,Me as lt,N as bO,Na as Ht,Nb as ac,Nc as fr,Nd as _C,Ne as Ku,O as gp,Oa as ft,Ob as Ui,Oc as sC,Od as Pt,Oe as ht,Pa as Ar,Pb as Fg,Pc as lC,Pd as rt,Pe as vn,Q as xO,Qb as fn,Qc as Cp,Qd as vC,Qe as v4,R as Yv,Ra as si,Rb as Bt,Rc as cr,Rd as gr,Re as dt,S as Dl,Sa as xe,Sb as dn,Sc as cC,Sd as Gn,T as _p,Ta as ju,Tb as zs,Tc as dC,Td as cc,Te as b4,Ua as kO,Ub as tC,Ud as Ye,Ue as Us,V as pi,Va as TO,Vb as nC,Vc as WO,Vd as r4,Ve as x4,W as Un,Wa as EO,Wb as en,Wc as Al,Wd as at,We as ia,X as tt,Xa as qt,Xb as jn,Xc as $s,Xd as _r,Xe as je,Y as Qi,Yb as na,Yc as Ka,Yd as Hs,Ye as mc,Z as yi,Za as A,Zb as PO,Zc as hi,Zd as a4,Ze as pe,_ as ad,_a as DO,_b as Rg,_c as cd,_d as s4,_e as W,a as K,aa as $t,ab as Hi,ac as lk,ad as qO,ae as Rt,af as S4,b as it,ba as cn,bb as Ae,bc as Jt,bd as QO,be as l4,bf as mn,c as uO,ca as ge,cb as Y,cc as sc,cd as XO,ce as c4,cf as Yu,d as Cs,da as f,db as Z,dc as AO,dd as KO,de as Xu,df as Oa,e as Ln,ea as yO,eb as C,ec as OO,ee as dc,f as Bs,fa as SO,fb as s,fc as le,fe as d4,g as So,ga as k,gb as l,gc as Nt,gd as dd,ge as CC,h as Dr,ha as T,hb as R,hc as NO,hd as YO,he as Vn,i as He,ia as ei,ib as vo,id as ZO,ie as Xe,j as an,ja as Ir,jb as wo,jc as U,jd as md,je as Dt,k as Hd,ka as Jo,kb as bs,kc as Q,kd as mC,ke as Aa,l as hO,la as Xi,lb as Le,lc as ld,ld as Mo,m as nc,ma as Pl,mb as Ve,mc as Ct,md as JO,me as bC,n as Lu,na as ve,nb as ro,nc as No,o as Vu,oa as Vi,ob as z,od as pd,p as Nn,pa as wO,pb as Wo,pc as iC,pe as xC,q as Bo,qa as ae,qb as g,qc as Yi,qd as e4,r as Ng,ra as ha,rb as Jv,rc as FO,s as fO,sa as bn,sb as v,sc as RO,sd as Gu,ta as Pi,tb as ii,tc as lc,td as Wu,u as Lt,ua as Zt,ub as on,uc as ck,ud as fa,v as Pr,va as Il,vb as Ki,vc as zr,vd as t4,w as ic,wa as Bu,wb as xn,wc as LO,wd as pC,we as m4,x as ik,xa as ak,xb as mt,xc as oC,xd as uC,xe as Gd,y as gO,ya as sk,yb as pt,yc as ne,yd as qu,ye as yC,z as qi,za as vp,zc as xs,ze as p4}from"./chunk-72DGZVTL.js";var B8=Cs((dJe,Fx)=>{(function(n,i,e){if(!n)return;for(var t={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},c,p=1;p<20;++p)t[111+p]="f"+p;for(p=0;p<=9;++p)t[p+96]=p.toString();function u(P,L,re){if(P.addEventListener){P.addEventListener(L,re,!1);return}P.attachEvent("on"+L,re)}function h(P){if(P.type=="keypress"){var L=String.fromCharCode(P.which);return P.shiftKey||(L=L.toLowerCase()),L}return t[P.which]?t[P.which]:o[P.which]?o[P.which]:String.fromCharCode(P.which).toLowerCase()}function _(P,L){return P.sort().join(",")===L.sort().join(",")}function S(P){var L=[];return P.shiftKey&&L.push("shift"),P.altKey&&L.push("alt"),P.ctrlKey&&L.push("ctrl"),P.metaKey&&L.push("meta"),L}function x(P){if(P.preventDefault){P.preventDefault();return}P.returnValue=!1}function b(P){if(P.stopPropagation){P.stopPropagation();return}P.cancelBubble=!0}function M(P){return P=="shift"||P=="ctrl"||P=="alt"||P=="meta"}function w(){if(!c){c={};for(var P in t)P>95&&P<112||t.hasOwnProperty(P)&&(c[t[P]]=P)}return c}function y(P,L,re){return re||(re=w()[P]?"keydown":"keypress"),re=="keypress"&&L.length&&(re="keydown"),re}function E(P){return P==="+"?["+"]:(P=P.replace(/\+{2}/g,"+plus"),P.split("+"))}function I(P,L){var re,oe,G,$=[];for(re=E(P),G=0;G1){X(ce,ye,ke,ze);return}q=I(ce,ze),L._callbacks[q.key]=L._callbacks[q.key]||[],me(q.key,q.modifiers,{type:q.action},Ke,ce,Qe),L._callbacks[q.key][Ke?"unshift":"push"]({callback:ke,modifiers:q.modifiers,action:q.action,seq:Ke,level:Qe,combo:ce})}L._bindMultiple=function(ce,ke,ze){for(var Ke=0;Ke-1||D(L,re.target))return!1;if("composedPath"in P&&typeof P.composedPath=="function"){var oe=P.composedPath()[0];oe!==P.target&&(L=oe)}return L.tagName=="INPUT"||L.tagName=="SELECT"||L.tagName=="TEXTAREA"||L.isContentEditable},N.prototype.handleKey=function(){var P=this;return P._handleKey.apply(P,arguments)},N.addKeycodes=function(P){for(var L in P)P.hasOwnProperty(L)&&(t[L]=P[L]);c=null},N.init=function(){var P=N(i);for(var L in P)L.charAt(0)!=="_"&&(N[L]=(function(re){return function(){return P[re].apply(P,arguments)}})(L))},N.init(),n.Mousetrap=N,typeof Fx<"u"&&Fx.exports&&(Fx.exports=N),typeof define=="function"&&define.amd&&define(function(){return N})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var $L=Cs(wP=>{var jL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");wP.encode=function(n){if(0<=n&&n{var HL=$L(),MP=5,UL=1<>1;return i?-e:e}kP.encode=function(i){var e="",t,o=Mce(i);do t=o&GL,o>>>=MP,o>0&&(t|=WL),e+=HL.encode(t);while(o>0);return e};kP.decode=function(i,e,t){var o=i.length,r=0,a=0,c,p;do{if(e>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(p=HL.decode(i.charCodeAt(e++)),p===-1)throw new Error("Invalid base64 digit: "+i.charAt(e-1));c=!!(p&WL),p&=GL,r=r+(p<{function Tce(n,i,e){if(i in n)return n[i];if(arguments.length===3)return e;throw new Error('"'+i+'" is a required argument.')}ea.getArg=Tce;var QL=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ece=/^data:.+\,.+$/;function q0(n){var i=n.match(QL);return i?{scheme:i[1],auth:i[2],host:i[3],port:i[4],path:i[5]}:null}ea.urlParse=q0;function uf(n){var i="";return n.scheme&&(i+=n.scheme+":"),i+="//",n.auth&&(i+=n.auth+"@"),n.host&&(i+=n.host),n.port&&(i+=":"+n.port),n.path&&(i+=n.path),i}ea.urlGenerate=uf;var Dce=32;function Pce(n){var i=[];return function(e){for(var t=0;tDce&&i.pop(),r}}var TP=Pce(function(i){var e=i,t=q0(i);if(t){if(!t.path)return i;e=t.path}for(var o=ea.isAbsolute(e),r=[],a=0,c=0;;)if(a=c,c=e.indexOf("/",a),c===-1){r.push(e.slice(a));break}else for(r.push(e.slice(a,c));c=0;c--)p=r[c],p==="."?r.splice(c,1):p===".."?u++:u>0&&(p===""?(r.splice(c+1,u),u=0):(r.splice(c,2),u--));return e=r.join("/"),e===""&&(e=o?"/":"."),t?(t.path=e,uf(t)):e});ea.normalize=TP;function XL(n,i){n===""&&(n="."),i===""&&(i=".");var e=q0(i),t=q0(n);if(t&&(n=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),uf(e);if(e||i.match(Ece))return i;if(t&&!t.host&&!t.path)return t.host=i,uf(t);var o=i.charAt(0)==="/"?i:TP(n.replace(/\/+$/,"")+"/"+i);return t?(t.path=o,uf(t)):o}ea.join=XL;ea.isAbsolute=function(n){return n.charAt(0)==="/"||QL.test(n)};function Ice(n,i){n===""&&(n="."),n=n.replace(/\/$/,"");for(var e=0;i.indexOf(n+"/")!==0;){var t=n.lastIndexOf("/");if(t<0||(n=n.slice(0,t),n.match(/^([^\/]+:\/)?\/*$/)))return i;++e}return Array(e+1).join("../")+i.substr(n.length+1)}ea.relative=Ice;var KL=(function(){var n=Object.create(null);return!("__proto__"in n)})();function YL(n){return n}function Ace(n){return ZL(n)?"$"+n:n}ea.toSetString=KL?YL:Ace;function Oce(n){return ZL(n)?n.slice(1):n}ea.fromSetString=KL?YL:Oce;function ZL(n){if(!n)return!1;var i=n.length;if(i<9||n.charCodeAt(i-1)!==95||n.charCodeAt(i-2)!==95||n.charCodeAt(i-3)!==111||n.charCodeAt(i-4)!==116||n.charCodeAt(i-5)!==111||n.charCodeAt(i-6)!==114||n.charCodeAt(i-7)!==112||n.charCodeAt(i-8)!==95||n.charCodeAt(i-9)!==95)return!1;for(var e=i-10;e>=0;e--)if(n.charCodeAt(e)!==36)return!1;return!0}function Nce(n,i,e){var t=Od(n.source,i.source);return t!==0||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0||e)||(t=n.generatedColumn-i.generatedColumn,t!==0)||(t=n.generatedLine-i.generatedLine,t!==0)?t:Od(n.name,i.name)}ea.compareByOriginalPositions=Nce;function Fce(n,i,e){var t;return t=n.originalLine-i.originalLine,t!==0||(t=n.originalColumn-i.originalColumn,t!==0||e)||(t=n.generatedColumn-i.generatedColumn,t!==0)||(t=n.generatedLine-i.generatedLine,t!==0)?t:Od(n.name,i.name)}ea.compareByOriginalPositionsNoSource=Fce;function Rce(n,i,e){var t=n.generatedLine-i.generatedLine;return t!==0||(t=n.generatedColumn-i.generatedColumn,t!==0||e)||(t=Od(n.source,i.source),t!==0)||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0)?t:Od(n.name,i.name)}ea.compareByGeneratedPositionsDeflated=Rce;function Lce(n,i,e){var t=n.generatedColumn-i.generatedColumn;return t!==0||e||(t=Od(n.source,i.source),t!==0)||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0)?t:Od(n.name,i.name)}ea.compareByGeneratedPositionsDeflatedNoLine=Lce;function Od(n,i){return n===i?0:n===null?1:i===null?-1:n>i?1:-1}function Vce(n,i){var e=n.generatedLine-i.generatedLine;return e!==0||(e=n.generatedColumn-i.generatedColumn,e!==0)||(e=Od(n.source,i.source),e!==0)||(e=n.originalLine-i.originalLine,e!==0)||(e=n.originalColumn-i.originalColumn,e!==0)?e:Od(n.name,i.name)}ea.compareByGeneratedPositionsInflated=Vce;function Bce(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}ea.parseSourceMapInput=Bce;function zce(n,i,e){if(i=i||"",n&&(n[n.length-1]!=="/"&&i[0]!=="/"&&(n+="/"),i=n+i),e){var t=q0(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var o=t.path.lastIndexOf("/");o>=0&&(t.path=t.path.substring(0,o+1))}i=XL(uf(t),i)}return TP(i)}ea.computeSourceURL=zce});var e7=Cs(JL=>{var EP=ey(),DP=Object.prototype.hasOwnProperty,gu=typeof Map<"u";function Nd(){this._array=[],this._set=gu?new Map:Object.create(null)}Nd.fromArray=function(i,e){for(var t=new Nd,o=0,r=i.length;o=0)return e}else{var t=EP.toSetString(i);if(DP.call(this._set,t))return this._set[t]}throw new Error('"'+i+'" is not in the set.')};Nd.prototype.at=function(i){if(i>=0&&i{var t7=ey();function jce(n,i){var e=n.generatedLine,t=i.generatedLine,o=n.generatedColumn,r=i.generatedColumn;return t>e||t==e&&r>=o||t7.compareByGeneratedPositionsInflated(n,i)<=0}function ty(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ty.prototype.unsortedForEach=function(i,e){this._array.forEach(i,e)};ty.prototype.add=function(i){jce(this._last,i)?(this._last=i,this._array.push(i)):(this._sorted=!1,this._array.push(i))};ty.prototype.toArray=function(){return this._sorted||(this._array.sort(t7.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};n7.MappingList=ty});var r7=Cs(o7=>{var Q0=qL(),ur=ey(),ny=e7().ArraySet,$ce=i7().MappingList;function Cl(n){n||(n={}),this._file=ur.getArg(n,"file",null),this._sourceRoot=ur.getArg(n,"sourceRoot",null),this._skipValidation=ur.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=ur.getArg(n,"ignoreInvalidMapping",!1),this._sources=new ny,this._names=new ny,this._mappings=new $ce,this._sourcesContents=null}Cl.prototype._version=3;Cl.fromSourceMap=function(i,e){var t=i.sourceRoot,o=new Cl(Object.assign(e||{},{file:i.file,sourceRoot:t}));return i.eachMapping(function(r){var a={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(a.source=r.source,t!=null&&(a.source=ur.relative(t,a.source)),a.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(a.name=r.name)),o.addMapping(a)}),i.sources.forEach(function(r){var a=r;t!==null&&(a=ur.relative(t,r)),o._sources.has(a)||o._sources.add(a);var c=i.sourceContentFor(r);c!=null&&o.setSourceContent(r,c)}),o};Cl.prototype.addMapping=function(i){var e=ur.getArg(i,"generated"),t=ur.getArg(i,"original",null),o=ur.getArg(i,"source",null),r=ur.getArg(i,"name",null);!this._skipValidation&&this._validateMapping(e,t,o,r)===!1||(o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),r!=null&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:o,name:r}))};Cl.prototype.setSourceContent=function(i,e){var t=i;this._sourceRoot!=null&&(t=ur.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ur.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[ur.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Cl.prototype.applySourceMap=function(i,e,t){var o=e;if(e==null){if(i.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=i.file}var r=this._sourceRoot;r!=null&&(o=ur.relative(r,o));var a=new ny,c=new ny;this._mappings.unsortedForEach(function(p){if(p.source===o&&p.originalLine!=null){var u=i.originalPositionFor({line:p.originalLine,column:p.originalColumn});u.source!=null&&(p.source=u.source,t!=null&&(p.source=ur.join(t,p.source)),r!=null&&(p.source=ur.relative(r,p.source)),p.originalLine=u.line,p.originalColumn=u.column,u.name!=null&&(p.name=u.name))}var h=p.source;h!=null&&!a.has(h)&&a.add(h);var _=p.name;_!=null&&!c.has(_)&&c.add(_)},this),this._sources=a,this._names=c,i.sources.forEach(function(p){var u=i.sourceContentFor(p);u!=null&&(t!=null&&(p=ur.join(t,p)),r!=null&&(p=ur.relative(r,p)),this.setSourceContent(p,u))},this)};Cl.prototype._validateMapping=function(i,e,t,o){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var r="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}if(!(i&&"line"in i&&"column"in i&&i.line>0&&i.column>=0&&!e&&!t&&!o)){if(i&&"line"in i&&"column"in i&&e&&"line"in e&&"column"in e&&i.line>0&&i.column>=0&&e.line>0&&e.column>=0&&t)return;var r="Invalid mapping: "+JSON.stringify({generated:i,source:t,original:e,name:o});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}};Cl.prototype._serializeMappings=function(){for(var i=0,e=1,t=0,o=0,r=0,a=0,c="",p,u,h,_,S=this._mappings.toArray(),x=0,b=S.length;x0){if(!ur.compareByGeneratedPositionsInflated(u,S[x-1]))continue;p+=","}p+=Q0.encode(u.generatedColumn-i),i=u.generatedColumn,u.source!=null&&(_=this._sources.indexOf(u.source),p+=Q0.encode(_-a),a=_,p+=Q0.encode(u.originalLine-1-o),o=u.originalLine-1,p+=Q0.encode(u.originalColumn-t),t=u.originalColumn,u.name!=null&&(h=this._names.indexOf(u.name),p+=Q0.encode(h-r),r=h)),c+=p}return c};Cl.prototype._generateSourcesContent=function(i,e){return i.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=ur.relative(e,t));var o=ur.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Cl.prototype.toJSON=function(){var i={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(i.file=this._file),this._sourceRoot!=null&&(i.sourceRoot=this._sourceRoot),this._sourcesContents&&(i.sourcesContent=this._generateSourcesContent(i.sources,i.sourceRoot)),i};Cl.prototype.toString=function(){return JSON.stringify(this.toJSON())};o7.SourceMapGenerator=Cl});var GA=Cs((t9,ww)=>{(function(n){"use strict";let i="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${i}\\.${i}\\.${i}\\.${i}$`,"i"),threeOctet:new RegExp(`^${i}\\.${i}\\.${i}$`,"i"),twoOctet:new RegExp(`^${i}\\.${i}$`,"i"),longValue:new RegExp(`^${i}$`,"i")},t=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),r="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(r,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${r})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${i}\\.${i}\\.${i}\\.${i}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${i}\\.${i}\\.${i}\\.${i}(${r})?$`,"i")};function p(x,b){if(x.indexOf("::")!==x.lastIndexOf("::"))return null;let M=0,w=-1,y=(x.match(c.zoneIndex)||[])[0],E,I;for(y&&(y=y.substring(1),x=x.replace(/%.+$/,""));(w=x.indexOf(":",w+1))>=0;)M++;if(x.substr(0,2)==="::"&&M--,x.substr(-2,2)==="::"&&M--,M>b)return null;for(I=b-M,E=":";I--;)E+="0:";return x=x.replace("::",E),x[0]===":"&&(x=x.slice(1)),x[x.length-1]===":"&&(x=x.slice(0,-1)),b=(function(){let D=x.split(":"),N=[];for(let P=0;P0;){if(E=M-w,E<0&&(E=0),x[y]>>E!==b[y]>>E)return!1;w-=M,y+=1}return!0}function h(x){if(o.test(x))return parseInt(x,16);if(x[0]==="0"&&!isNaN(parseInt(x[1],10))){if(t.test(x))return parseInt(x,8);throw new Error(`ipaddr: cannot parse ${x} as octal`)}return parseInt(x,10)}function _(x,b){for(;x.length=0;y-=1)if(E=this.octets[y],E in w){if(I=w[E],M&&I!==0)return null;I!==8&&(M=!0),b+=I}else return null;return 32-b},x.prototype.range=function(){return S.subnetMatch(this,this.SpecialRanges)},x.prototype.toByteArray=function(){return this.octets.slice(0)},x.prototype.toIPv4MappedAddress=function(){return S.IPv6.parse(`::ffff:${this.toString()}`)},x.prototype.toNormalizedString=function(){return this.toString()},x.prototype.toString=function(){return this.octets.join(".")},x})(),S.IPv4.broadcastAddressFromCIDR=function(x){try{let b=this.parseCIDR(x),M=b[0].toByteArray(),w=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],E=0;for(;E<4;)y.push(parseInt(M[E],10)|parseInt(w[E],10)^255),E++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},S.IPv4.isIPv4=function(x){return this.parser(x)!==null},S.IPv4.isValid=function(x){try{return new this(this.parser(x)),!0}catch{return!1}},S.IPv4.isValidCIDR=function(x){try{return this.parseCIDR(x),!0}catch{return!1}},S.IPv4.isValidFourPartDecimal=function(x){return!!(S.IPv4.isValid(x)&&x.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},S.IPv4.isValidCIDRFourPartDecimal=function(x){let b=x.match(/^(.+)\/(\d+)$/);return!S.IPv4.isValidCIDR(x)||!b?!1:S.IPv4.isValidFourPartDecimal(b[1])},S.IPv4.networkAddressFromCIDR=function(x){let b,M,w,y,E;try{for(b=this.parseCIDR(x),w=b[0].toByteArray(),E=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],M=0;M<4;)y.push(parseInt(w[M],10)&parseInt(E[M],10)),M++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},S.IPv4.parse=function(x){let b=this.parser(x);if(b===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(b)},S.IPv4.parseCIDR=function(x){let b;if(b=x.match(/^(.+)\/(\d+)$/)){let M=parseInt(b[2]);if(M>=0&&M<=32){let w=[this.parse(b[1]),M];return Object.defineProperty(w,"toString",{value:function(){return this.join("/")}}),w}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},S.IPv4.parser=function(x){let b,M,w;if(b=x.match(e.fourOctet))return(function(){let y=b.slice(1,6),E=[];for(let I=0;I4294967295||w<0)throw new Error("ipaddr: address outside defined range");return(function(){let y=[],E;for(E=0;E<=24;E+=8)y.push(w>>E&255);return y})().reverse()}else return(b=x.match(e.twoOctet))?(function(){let y=b.slice(1,4),E=[];if(w=h(y[1]),w>16777215||w<0)throw new Error("ipaddr: address outside defined range");return E.push(h(y[0])),E.push(w>>16&255),E.push(w>>8&255),E.push(w&255),E})():(b=x.match(e.threeOctet))?(function(){let y=b.slice(1,5),E=[];if(w=h(y[2]),w>65535||w<0)throw new Error("ipaddr: address outside defined range");return E.push(h(y[0])),E.push(h(y[1])),E.push(w>>8&255),E.push(w&255),E})():null},S.IPv4.subnetMaskFromPrefixLength=function(x){if(x=parseInt(x),x<0||x>32)throw new Error("ipaddr: invalid IPv4 prefix length");let b=[0,0,0,0],M=0,w=Math.floor(x/8);for(;M=0;I-=1)if(y=this.parts[I],y in w){if(E=w[y],M&&E!==0)return null;E!==16&&(M=!0),b+=E}else return null;return 128-b},x.prototype.range=function(){return S.subnetMatch(this,this.SpecialRanges)},x.prototype.toByteArray=function(){let b,M=[],w=this.parts;for(let y=0;y>8),M.push(b&255);return M},x.prototype.toFixedLengthString=function(){let b=function(){let w=[];for(let y=0;y>8,M&255,w>>8,w&255])},x.prototype.toNormalizedString=function(){let b=function(){let w=[];for(let y=0;yy&&(w=E.index,y=E[0].length);return y<0?M:`${M.substring(0,w)}::${M.substring(w+y)}`},x.prototype.toString=function(){return this.toRFC5952String()},x})(),S.IPv6.broadcastAddressFromCIDR=function(x){try{let b=this.parseCIDR(x),M=b[0].toByteArray(),w=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],E=0;for(;E<16;)y.push(parseInt(M[E],10)|parseInt(w[E],10)^255),E++;return new this(y)}catch(b){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${b})`)}},S.IPv6.isIPv6=function(x){return this.parser(x)!==null},S.IPv6.isValid=function(x){if(typeof x=="string"&&x.indexOf(":")===-1)return!1;try{let b=this.parser(x);return new this(b.parts,b.zoneId),!0}catch{return!1}},S.IPv6.isValidCIDR=function(x){if(typeof x=="string"&&x.indexOf(":")===-1)return!1;try{return this.parseCIDR(x),!0}catch{return!1}},S.IPv6.networkAddressFromCIDR=function(x){let b,M,w,y,E;try{for(b=this.parseCIDR(x),w=b[0].toByteArray(),E=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],M=0;M<16;)y.push(parseInt(w[M],10)&parseInt(E[M],10)),M++;return new this(y)}catch(I){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${I})`)}},S.IPv6.parse=function(x){let b=this.parser(x);if(b.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(b.parts,b.zoneId)},S.IPv6.parseCIDR=function(x){let b,M,w;if((M=x.match(/^(.+)\/(\d+)$/))&&(b=parseInt(M[2]),b>=0&&b<=128))return w=[this.parse(M[1]),b],Object.defineProperty(w,"toString",{value:function(){return this.join("/")}}),w;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},S.IPv6.parser=function(x){let b,M,w,y,E,I;if(w=x.match(c.deprecatedTransitional))return this.parser(`::ffff:${w[1]}`);if(c.native.test(x))return p(x,8);if((w=x.match(c.transitional))&&(I=w[6]||"",b=w[1],w[1].endsWith("::")||(b=b.slice(0,-1)),b=p(b+I,6),b.parts)){for(E=[parseInt(w[2]),parseInt(w[3]),parseInt(w[4]),parseInt(w[5])],M=0;M128)throw new Error("ipaddr: invalid IPv6 prefix length");let b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0,w=Math.floor(x/8);for(;M{(function(n){if(typeof l9=="object")c9.exports=n();else if(typeof define=="function"&&define.amd)define(n);else{var i;try{i=window}catch{i=self}i.SparkMD5=n()}})(function(n){"use strict";var i=function(y,E){return y+E&4294967295},e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(y,E,I,D,N,P){return E=i(i(E,y),i(D,P)),i(E<>>32-N,I)}function o(y,E){var I=y[0],D=y[1],N=y[2],P=y[3];I+=(D&N|~D&P)+E[0]-680876936|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[1]-389564586|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[2]+606105819|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[3]-1044525330|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+E[4]-176418897|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[5]+1200080426|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[6]-1473231341|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[7]-45705983|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+E[8]+1770035416|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[9]-1958414417|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[10]-42063|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[11]-1990404162|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+E[12]+1804603682|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[13]-40341101|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[14]-1502002290|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[15]+1236535329|0,D=(D<<22|D>>>10)+N|0,I+=(D&P|N&~P)+E[1]-165796510|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[6]-1069501632|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[11]+643717713|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[0]-373897302|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+E[5]-701558691|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[10]+38016083|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[15]-660478335|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[4]-405537848|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+E[9]+568446438|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[14]-1019803690|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[3]-187363961|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[8]+1163531501|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+E[13]-1444681467|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[2]-51403784|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[7]+1735328473|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[12]-1926607734|0,D=(D<<20|D>>>12)+N|0,I+=(D^N^P)+E[5]-378558|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[8]-2022574463|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[11]+1839030562|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[14]-35309556|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+E[1]-1530992060|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[4]+1272893353|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[7]-155497632|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[10]-1094730640|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+E[13]+681279174|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[0]-358537222|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[3]-722521979|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[6]+76029189|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+E[9]-640364487|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[12]-421815835|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[15]+530742520|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[2]-995338651|0,D=(D<<23|D>>>9)+N|0,I+=(N^(D|~P))+E[0]-198630844|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[7]+1126891415|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[14]-1416354905|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[5]-57434055|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+E[12]+1700485571|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[3]-1894986606|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[10]-1051523|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[1]-2054922799|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+E[8]+1873313359|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[15]-30611744|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[6]-1560198380|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[13]+1309151649|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+E[4]-145523070|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[11]-1120210379|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[2]+718787259|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[9]-343485551|0,D=(D<<21|D>>>11)+N|0,y[0]=I+y[0]|0,y[1]=D+y[1]|0,y[2]=N+y[2]|0,y[3]=P+y[3]|0}function r(y){var E=[],I;for(I=0;I<64;I+=4)E[I>>2]=y.charCodeAt(I)+(y.charCodeAt(I+1)<<8)+(y.charCodeAt(I+2)<<16)+(y.charCodeAt(I+3)<<24);return E}function a(y){var E=[],I;for(I=0;I<64;I+=4)E[I>>2]=y[I]+(y[I+1]<<8)+(y[I+2]<<16)+(y[I+3]<<24);return E}function c(y){var E=y.length,I=[1732584193,-271733879,-1732584194,271733878],D,N,P,L,re,oe;for(D=64;D<=E;D+=64)o(I,r(y.substring(D-64,D)));for(y=y.substring(D-64),N=y.length,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=0;D>2]|=y.charCodeAt(D)<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(o(I,P),D=0;D<16;D+=1)P[D]=0;return L=E*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),re=parseInt(L[2],16),oe=parseInt(L[1],16)||0,P[14]=re,P[15]=oe,o(I,P),I}function p(y){var E=y.length,I=[1732584193,-271733879,-1732584194,271733878],D,N,P,L,re,oe;for(D=64;D<=E;D+=64)o(I,a(y.subarray(D-64,D)));for(y=D-64>2]|=y[D]<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(o(I,P),D=0;D<16;D+=1)P[D]=0;return L=E*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),re=parseInt(L[2],16),oe=parseInt(L[1],16)||0,P[14]=re,P[15]=oe,o(I,P),I}function u(y){var E="",I;for(I=0;I<4;I+=1)E+=e[y>>I*8+4&15]+e[y>>I*8&15];return E}function h(y){var E;for(E=0;E>16)+(E>>16)+(I>>16);return D<<16|I&65535}),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function y(E,I){return E=E|0||0,E<0?Math.max(E+I,0):Math.min(E,I)}ArrayBuffer.prototype.slice=function(E,I){var D=this.byteLength,N=y(E,D),P=D,L,re,oe,G;return I!==n&&(P=y(I,D)),N>P?new ArrayBuffer(0):(L=P-N,re=new ArrayBuffer(L),oe=new Uint8Array(re),G=new Uint8Array(this,N,L),oe.set(G),re)}})();function _(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function S(y,E){var I=y.length,D=new ArrayBuffer(I),N=new Uint8Array(D),P;for(P=0;P>2]|=E.charCodeAt(D)<<(D%4<<3);return this._finish(N,I),P=h(this._hash),y&&(P=M(P)),this.reset(),P},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(y,E){var I=E,D,N,P;if(y[I>>2]|=128<<(I%4<<3),I>55)for(o(this._hash,y),I=0;I<16;I+=1)y[I]=0;D=this._length*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(D[2],16),P=parseInt(D[1],16)||0,y[14]=N,y[15]=P,o(this._hash,y)},w.hash=function(y,E){return w.hashBinary(_(y),E)},w.hashBinary=function(y,E){var I=c(y),D=h(I);return E?M(D):D},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(y){var E=b(this._buff.buffer,y,!0),I=E.length,D;for(this._length+=y.byteLength,D=64;D<=I;D+=64)o(this._hash,a(E.subarray(D-64,D)));return this._buff=D-64>2]|=E[N]<<(N%4<<3);return this._finish(D,I),P=h(this._hash),y&&(P=M(P)),this.reset(),P},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var y=w.prototype.getState.call(this);return y.buff=x(y.buff),y},w.ArrayBuffer.prototype.setState=function(y){return y.buff=S(y.buff,!0),w.prototype.setState.call(this,y)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(y,E){var I=p(new Uint8Array(y)),D=h(I);return E?M(D):D},w})});var f9=Cs(QA=>{"use strict";(function(){var n=typeof QA<"u"&&QA||typeof define<"u"&&{}||this||window;typeof define<"u"&&define("save-svg-as-png",[],function(){return n}),n.default=n;var i="http://www.w3.org/2000/xmlns/",e="http://www.w3.org/1999/xhtml",t="http://www.w3.org/2000/svg",o=']>',r=/url\(["']?(.+?)["']?\)/,a={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},c=function($){return $ instanceof HTMLElement||$ instanceof SVGElement},p=function($){if(!c($))throw new Error("an HTMLElement or SVGElement is required; got "+$)},u=function($){return new Promise(function(ue,be){c($)?ue($):be(new Error("an HTMLElement or SVGElement is required; got "+$))})},h=function($){return $&&$.lastIndexOf("http",0)===0&&$.lastIndexOf(window.location.host)===-1},_=function($){var ue=Object.keys(a).filter(function(be){return $.indexOf("."+be)>0}).map(function(be){return a[be]});return ue?ue[0]:(console.error("Unknown font format for "+$+". Fonts may not be working correctly."),"application/octet-stream")},S=function($){for(var ue="",be=new Uint8Array($),me=0;me"u"||me===null||isNaN(parseFloat(me))?0:me},b=function($,ue,be,me){if($.tagName==="svg")return{width:be||x($,ue,"width"),height:me||x($,ue,"height")};if($.getBBox){var De=$.getBBox(),he=De.x,B=De.y,X=De.width,se=De.height;return{width:he+X,height:B+se}}},M=function($){return decodeURIComponent(encodeURIComponent($).replace(/%([0-9A-F]{2})/g,function(ue,be){var me=String.fromCharCode("0x"+be);return me==="%"?"%25":me}))},w=function($){for(var ue=window.atob($.split(",")[1]),be=$.split(",")[0].split(":")[1].split(";")[0],me=new ArrayBuffer(ue.length),De=new Uint8Array(me),he=0;he"u",ze=B||[];return L().forEach(function(Ke){var Qe=Ke.rules,ye=Ke.href;Qe&&Array.from(Qe).forEach(function(q){if(typeof q.style<"u")if(y($,q.selectorText))ce.push(se(q.selectorText,q.style.cssText));else if(ke&&q.cssText.match(/^@font-face/)){var Oe=E(q,ye);Oe&&ze.push(Oe)}else X||ce.push(q.cssText)})}),N(ze).then(function(Ke){return ce.join(` `)+Ke})},oe=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};n.prepareSvg=function(G,$,ue){p(G);var be=$||{},me=be.left,De=me===void 0?0:me,he=be.top,B=he===void 0?0:he,X=be.width,se=be.height,ce=be.scale,ke=ce===void 0?1:ce,ze=be.responsive,Ke=ze===void 0?!1:ze,Qe=be.excludeCss,ye=Qe===void 0?!1:Qe;return I(G).then(function(){var q=G.cloneNode(!0);q.style.backgroundColor=($||{}).backgroundColor||G.style.backgroundColor;var Oe=b(G,q,X,se),We=Oe.width,ct=Oe.height;if(G.tagName!=="svg")if(G.getBBox){q.getAttribute("transform")!=null&&q.setAttribute("transform",q.getAttribute("transform").replace(/translate\(.*?\)/,""));var Tt=document.createElementNS("http://www.w3.org/2000/svg","svg");Tt.appendChild(q),q=Tt}else{console.error("Attempted to render non-SVG element",G);return}if(q.setAttribute("version","1.1"),q.setAttribute("viewBox",[De,B,We,ct].join(" ")),q.getAttribute("xmlns")||q.setAttributeNS(i,"xmlns",t),q.getAttribute("xmlns:xlink")||q.setAttributeNS(i,"xmlns:xlink","http://www.w3.org/1999/xlink"),Ke?(q.removeAttribute("width"),q.removeAttribute("height"),q.setAttribute("preserveAspectRatio","xMinYMin meet")):(q.setAttribute("width",We*ke),q.setAttribute("height",ct*ke)),Array.from(q.querySelectorAll("foreignObject > *")).forEach(function(_o){_o.setAttributeNS(i,"xmlns",_o.tagName==="svg"?t:e)}),ye){var Xn=document.createElement("div");Xn.appendChild(q);var Io=Xn.innerHTML;if(typeof ue=="function")ue(Io,We,ct);else return{src:Io,width:We,height:ct}}else return re(G,$).then(function(_o){var Br=document.createElement("style");Br.setAttribute("type","text/css"),Br.innerHTML=``;var Rn=document.createElement("defs");Rn.appendChild(Br),q.insertBefore(Rn,q.firstChild);var zd=document.createElement("div");zd.appendChild(q);var Ru=zd.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if(typeof ue=="function")ue(Ru,We,ct);else return{src:Ru,width:We,height:ct}})})},n.svgAsDataUri=function(G,$,ue){return p(G),n.prepareSvg(G,$).then(function(be){var me=be.src,De=be.width,he=be.height,B="data:image/svg+xml;base64,"+window.btoa(M(o+me));return typeof ue=="function"&&ue(B,De,he),B})},n.svgAsPngUri=function(G,$,ue){p(G);var be=$||{},me=be.encoderType,De=me===void 0?"image/png":me,he=be.encoderOptions,B=he===void 0?.8:he,X=be.canvg,se=function(ke){var ze=ke.src,Ke=ke.width,Qe=ke.height,ye=document.createElement("canvas"),q=ye.getContext("2d"),Oe=window.devicePixelRatio||1;ye.width=Ke*Oe,ye.height=Qe*Oe,ye.style.width=ye.width+"px",ye.style.height=ye.height+"px",q.setTransform(Oe,0,0,Oe,0,0),X?X(ye,ze):q.drawImage(ze,0,0);var We=void 0;try{We=ye.toDataURL(De,B)}catch(ct){if(typeof SecurityError<"u"&&ct instanceof SecurityError||ct.name==="SecurityError"){console.error("Rendered SVG images cannot be downloaded in this browser.");return}else throw ct}return typeof ue=="function"&&ue(We,ye.width,ye.height),Promise.resolve(We)};return X?n.prepareSvg(G,$).then(se):n.svgAsDataUri(G,$).then(function(ce){return new Promise(function(ke,ze){var Ke=new Image;Ke.onload=function(){return ke(se({src:Ke,width:Ke.width,height:Ke.height}))},Ke.onerror=function(){ze(`There was an error loading the data URI as an image on the following SVG `+window.atob(ce.slice(26))+`Open the following link to see browser's diagnosis `+ce)},Ke.src=ce})})},n.download=function(G,$,ue){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(w($),G);else{var be=document.createElement("a");if("download"in be){be.download=G,be.style.display="none",document.body.appendChild(be);try{var me=w($),De=URL.createObjectURL(me);be.href=De,be.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(De)})}}catch(he){console.error(he),console.warn("Error while getting object URL. Falling back to string URL."),be.href=$}be.click(),document.body.removeChild(be)}else ue&&ue.popup&&(ue.popup.document.title=G,ue.popup.location.replace($))}},n.saveSvg=function(G,$,ue){var be=oe();return u(G).then(function(me){return n.svgAsDataUri(me,ue||{})}).then(function(me){return n.download($,me,be)})},n.saveSvgAsPng=function(G,$,ue){var be=oe();return u(G).then(function(me){return n.svgAsPngUri(me,ue||{})}).then(function(me){return n.download($,me,be)})}})()});var eO=Cs((T2,JA)=>{(function(n,i){if(typeof T2=="object"&&typeof JA=="object")JA.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e=i();for(var t in e)(typeof T2=="object"?T2:n)[t]=e[t]}})(globalThis,()=>(()=>{"use strict";var n={4567:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let u=a(9042),h=a(9924),_=a(844),S=a(4725),x=a(2585),b=a(3656),M=r.AccessibilityManager=class extends _.Disposable{constructor(w,y,E,I){super(),this._terminal=w,this._coreBrowserService=E,this._renderService=I,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;Dthis._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new h.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(D=>this._handleResize(D.rows))),this.register(this._terminal.onRender(D=>this._refreshRows(D.start,D.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(D=>this._handleChar(D))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this.register(this._terminal.onA11yTab(D=>this._handleTab(D))),this.register(this._terminal.onKey(D=>this._handleKey(D.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,b.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,_.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){let E=this._terminal.buffer,I=E.lines.length.toString();for(let D=w;D<=y;D++){let N=E.lines.get(E.ydisp+D),P=[],L=N?.translateToString(!0,void 0,void 0,P)||"",re=(E.ydisp+D+1).toString(),oe=this._rowElements[D];oe&&(L.length===0?(oe.innerText="\xA0",this._rowColumns.set(oe,[0,1])):(oe.textContent=L,this._rowColumns.set(oe,P)),oe.setAttribute("aria-posinset",re),oe.setAttribute("aria-setsize",I))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){let E=w.target,I=this._rowElements[y===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==I)return;let D,N;if(y===0?(D=E,N=this._rowElements.pop(),this._rowContainer.removeChild(N)):(D=this._rowElements.shift(),N=E,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),N.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){let P=this._createAccessibilityTreeNode();this._rowElements.unshift(P),this._rowContainer.insertAdjacentElement("afterbegin",P)}else{let P=this._createAccessibilityTreeNode();this._rowElements.push(P),this._rowContainer.appendChild(P)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},E={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===E.node&&y.offset>E.offset)&&([y,E]=[E,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;let I=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(I)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:I,offset:I.textContent?.length??0}),!this._rowContainer.contains(E.node))return;let D=({node:L,offset:re})=>{let oe=L instanceof Text?L.parentNode:L,G=parseInt(oe?.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;let $=this._rowColumns.get(oe);if(!$)return console.warn("columns is null. Race condition?"),null;let ue=re<$.length?$[re]:$.slice(-1)[0]+1;return ue>=this._terminal.cols&&(++G,ue=0),{row:G,column:ue}},N=D(y),P=D(E);if(N&&P){if(N.row>P.row||N.row===P.row&&N.column>=P.column)throw new Error("invalid range");this._terminal.select(N.column,N.row,(P.row-N.row)*this._terminal.cols-N.column+P.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let w=0;w{function a(h){return h.replace(/\r?\n/g,"\r")}function c(h,_){return _?"\x1B[200~"+h+"\x1B[201~":h}function p(h,_,S,x){h=c(h=a(h),S.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(h,!0),_.value=""}function u(h,_,S){let x=S.getBoundingClientRect(),b=h.clientX-x.left-10,M=h.clientY-x.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${b}px`,_.style.top=`${M}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=c,r.copyHandler=function(h,_){h.clipboardData&&h.clipboardData.setData("text/plain",_.selectionText),h.preventDefault()},r.handlePasteEvent=function(h,_,S,x){h.stopPropagation(),h.clipboardData&&p(h.clipboardData.getData("text/plain"),_,S,x)},r.paste=p,r.moveTextAreaUnderMouseCursor=u,r.rightClickHandler=function(h,_,S,x,b){u(h,_,S),b&&x.rightClickSelect(h),_.value=x.selectionText,_.select()}},7239:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let c=a(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(p,u,h){this._css.set(p,u,h)}getCss(p,u){return this._css.get(p,u)}setColor(p,u,h){this._color.set(p,u,h)}getColor(p,u){return this._color.get(p,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,c,p,u){a.addEventListener(c,p,u);let h=!1;return{dispose:()=>{h||(h=!0,a.removeEventListener(c,p,u))}}}},3551:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,E){var I,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,y):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,E);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},p=this&&this.__param||function(M,w){return function(y,E){w(y,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let u=a(3656),h=a(8460),_=a(844),S=a(2585),x=a(4725),b=r.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(M,w,y,E,I){super(),this._element=M,this._mouseService=w,this._renderService=y,this._bufferService=E,this._linkProviderService=I,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new h.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new h.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(M){this._lastMouseEvent=M;let w=this._positionFromMouseEvent(M,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;let y=M.composedPath();for(let E=0;E{E?.forEach(I=>{I.link.dispose&&I.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=M.y);let y=!1;for(let[E,I]of this._linkProviderService.linkProviders.entries())w?this._activeProviderReplies?.get(E)&&(y=this._checkLinkProviderResult(E,M,y)):I.provideLinks(M.y,D=>{if(this._isMouseOut)return;let N=D?.map(P=>({link:P}));this._activeProviderReplies?.set(E,N),y=this._checkLinkProviderResult(E,M,y),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(M.y,this._activeProviderReplies)})}_removeIntersectingLinks(M,w){let y=new Set;for(let E=0;EM?this._bufferService.cols:N.link.range.end.x;for(let re=P;re<=L;re++){if(y.has(re)){I.splice(D--,1);break}y.add(re)}}}}_checkLinkProviderResult(M,w,y){if(!this._activeProviderReplies)return y;let E=this._activeProviderReplies.get(M),I=!1;for(let D=0;Dthis._linkAtPosition(N.link,w));D&&(y=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let D=0;Dthis._linkAtPosition(P.link,w));if(N){y=!0,this._handleNewLink(N);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(M){if(!this._currentLink)return;let w=this._positionFromMouseEvent(M,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(M,this._currentLink.link.text)}_clearCurrentLink(M,w){this._currentLink&&this._lastMouseEvent&&(!M||!w||this._currentLink.link.range.start.y>=M&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(M){if(!this._lastMouseEvent)return;let w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(M.link,w)&&(this._currentLink=M,this._currentLink.state={decorations:{underline:M.link.decorations===void 0||M.link.decorations.underline,pointerCursor:M.link.decorations===void 0||M.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,M.link,this._lastMouseEvent),M.link.decorations={},Object.defineProperties(M.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:y=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:y=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(M.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(y=>{if(!this._currentLink)return;let E=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,I=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=I&&(this._clearCurrentLink(E,I),this._lastMouseEvent)){let D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}})))}_linkHover(M,w,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&M.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(M,w){let y=M.range,E=this._bufferService.buffer.ydisp,I=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-E-1,y.end.x,y.end.y-E-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(I)}_linkLeave(M,w,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&M.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(M,w){let y=M.range.start.y*this._bufferService.cols+M.range.start.x,E=M.range.end.y*this._bufferService.cols+M.range.end.x,I=w.y*this._bufferService.cols+w.x;return y<=I&&I<=E}_positionFromMouseEvent(M,w,y){let E=y.getCoords(M,w,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(M,w,y,E,I){return{x1:M,y1:w,x2:y,y2:E,cols:this._bufferService.cols,fg:I}}};r.Linkifier=b=c([p(1,x.IMouseService),p(2,x.IRenderService),p(3,S.IBufferService),p(4,x.ILinkProviderService)],b)},9042:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,r,a){var c=this&&this.__decorate||function(x,b,M,w){var y,E=arguments.length,I=E<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,b,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(E<3?y(I):E>3?y(b,M,I):y(b,M))||I);return E>3&&I&&Object.defineProperty(b,M,I),I},p=this&&this.__param||function(x,b){return function(M,w){b(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let u=a(511),h=a(2585),_=r.OscLinkProvider=class{constructor(x,b,M){this._bufferService=x,this._optionsService=b,this._oscLinkService=M}provideLinks(x,b){let M=this._bufferService.buffer.lines.get(x-1);if(!M)return void b(void 0);let w=[],y=this._optionsService.rawOptions.linkHandler,E=new u.CellData,I=M.getTrimmedLength(),D=-1,N=-1,P=!1;for(let L=0;Ly?y.activate($,ue,oe):S(0,ue),hover:($,ue)=>y?.hover?.($,ue,oe),leave:($,ue)=>y?.leave?.($,ue,oe)})}P=!1,E.hasExtendedAttrs()&&E.extended.urlId?(N=L,D=E.extended.urlId):(N=-1,D=-1)}}b(w)}};function S(x,b){if(confirm(`Do you want to navigate to ${b}? WARNING: This link could potentially be dangerous`)){let M=window.open();if(M){try{M.opener=null}catch{}M.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=_=c([p(0,h.IBufferService),p(1,h.IOptionsService),p(2,h.IOscLinkService)],_)},6193:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(a,c){this._renderCallback=a,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,c,p){this._rowCount=p,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},3236:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;let c=a(3614),p=a(3656),u=a(3551),h=a(9042),_=a(3730),S=a(1680),x=a(3107),b=a(5744),M=a(2950),w=a(1296),y=a(428),E=a(4269),I=a(5114),D=a(8934),N=a(3230),P=a(9312),L=a(4725),re=a(6731),oe=a(8055),G=a(8969),$=a(8460),ue=a(844),be=a(6114),me=a(8437),De=a(2584),he=a(7399),B=a(5941),X=a(9074),se=a(2585),ce=a(5435),ke=a(4567),ze=a(779);class Ke extends G.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ye={}){super(ye),this.browser=be,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ue.MutableDisposable),this._onCursorMove=this.register(new $.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new $.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new $.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new $.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new $.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new $.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new $.EventEmitter),this._onBlur=this.register(new $.EventEmitter),this._onA11yCharEmitter=this.register(new $.EventEmitter),this._onA11yTabEmitter=this.register(new $.EventEmitter),this._onWillOpen=this.register(new $.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(X.DecorationService),this._instantiationService.setService(se.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ze.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(_.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((q,Oe)=>this.refresh(q,Oe))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(q=>this._reportWindowsOptions(q))),this.register(this._inputHandler.onColor(q=>this._handleColorEvent(q))),this.register((0,$.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,$.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(q=>this._afterResize(q.cols,q.rows))),this.register((0,ue.toDisposable)(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}_handleColorEvent(ye){if(this._themeService)for(let q of ye){let Oe,We="";switch(q.index){case 256:Oe="foreground",We="10";break;case 257:Oe="background",We="11";break;case 258:Oe="cursor",We="12";break;default:Oe="ansi",We="4;"+q.index}switch(q.type){case 0:let ct=oe.color.toColorRGB(Oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[Oe]);this.coreService.triggerDataEvent(`${De.C0.ESC}]${We};${(0,B.toRgbString)(ct)}${De.C1_ESCAPED.ST}`);break;case 1:if(Oe==="ansi")this._themeService.modifyColors(Tt=>Tt.ansi[q.index]=oe.channels.toColor(...q.color));else{let Tt=Oe;this._themeService.modifyColors(Xn=>Xn[Tt]=oe.channels.toColor(...q.color))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ye){ye?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ke.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ye){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(De.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(De.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let ye=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(ye);if(!q)return;let Oe=Math.min(this.buffer.x,this.cols-1),We=this._renderService.dimensions.css.cell.height,ct=q.getWidth(Oe),Tt=this._renderService.dimensions.css.cell.width*ct,Xn=this.buffer.y*this._renderService.dimensions.css.cell.height,Io=Oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Io+"px",this.textarea.style.top=Xn+"px",this.textarea.style.width=Tt+"px",this.textarea.style.height=We+"px",this.textarea.style.lineHeight=We+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",q=>{this.hasSelection()&&(0,c.copyHandler)(q,this._selectionService)}));let ye=q=>(0,c.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",ye)),this.register((0,p.addDisposableDomListener)(this.element,"paste",ye)),be.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",q=>{q.button===2&&(0,c.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",q=>{(0,c.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),be.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",q=>{q.button===1&&(0,c.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",ye=>this._keyUp(ye),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",ye=>this._keyDown(ye),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",ye=>this._keyPress(ye),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",ye=>this._compositionHelper.compositionupdate(ye))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,p.addDisposableDomListener)(this.textarea,"input",ye=>this._inputEvent(ye),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(ye){if(!ye)throw new Error("Terminal requires a parent element.");if(ye.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ye.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),ye.appendChild(this.element);let q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",Oe=>this.updateCursorStyle(Oe))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",h.promptLabel),be.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(I.CoreBrowserService,this.textarea,ye.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",Oe=>this._handleTextAreaFocus(Oe))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(re.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(N.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(Oe=>this._onRender.fire(Oe))),this.onResize(Oe=>this._renderService.resize(Oe.cols,Oe.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(M.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(Oe=>this.scrollLines(Oe.amount,Oe.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(P.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(Oe=>this.scrollLines(Oe.amount,Oe.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(Oe=>this._renderService.handleSelectionChanged(Oe.start,Oe.end,Oe.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(Oe=>{this.textarea.value=Oe,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(Oe=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",Oe=>this._selectionService.handleMouseDown(Oe))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(ke.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",Oe=>this._handleScreenReaderModeOptionChange(Oe))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",Oe=>{!this._overviewRulerRenderer&&Oe&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let ye=this,q=this.element;function Oe(Tt){let Xn=ye._mouseService.getMouseReportCoords(Tt,ye.screenElement);if(!Xn)return!1;let Io,_o;switch(Tt.overrideType||Tt.type){case"mousemove":_o=32,Tt.buttons===void 0?(Io=3,Tt.button!==void 0&&(Io=Tt.button<3?Tt.button:3)):Io=1&Tt.buttons?0:4&Tt.buttons?1:2&Tt.buttons?2:3;break;case"mouseup":_o=0,Io=Tt.button<3?Tt.button:3;break;case"mousedown":_o=1,Io=Tt.button<3?Tt.button:3;break;case"wheel":if(ye._customWheelEventHandler&&ye._customWheelEventHandler(Tt)===!1||ye.viewport.getLinesScrolled(Tt)===0)return!1;_o=Tt.deltaY<0?0:1,Io=4;break;default:return!1}return!(_o===void 0||Io===void 0||Io>4)&&ye.coreMouseService.triggerMouseEvent({col:Xn.col,row:Xn.row,x:Xn.x,y:Xn.y,button:Io,action:_o,ctrl:Tt.ctrlKey,alt:Tt.altKey,shift:Tt.shiftKey})}let We={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ct={mouseup:Tt=>(Oe(Tt),Tt.buttons||(this._document.removeEventListener("mouseup",We.mouseup),We.mousedrag&&this._document.removeEventListener("mousemove",We.mousedrag)),this.cancel(Tt)),wheel:Tt=>(Oe(Tt),this.cancel(Tt,!0)),mousedrag:Tt=>{Tt.buttons&&Oe(Tt)},mousemove:Tt=>{Tt.buttons||Oe(Tt)}};this.register(this.coreMouseService.onProtocolChange(Tt=>{Tt?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Tt)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&Tt?We.mousemove||(q.addEventListener("mousemove",ct.mousemove),We.mousemove=ct.mousemove):(q.removeEventListener("mousemove",We.mousemove),We.mousemove=null),16&Tt?We.wheel||(q.addEventListener("wheel",ct.wheel,{passive:!1}),We.wheel=ct.wheel):(q.removeEventListener("wheel",We.wheel),We.wheel=null),2&Tt?We.mouseup||(We.mouseup=ct.mouseup):(this._document.removeEventListener("mouseup",We.mouseup),We.mouseup=null),4&Tt?We.mousedrag||(We.mousedrag=ct.mousedrag):(this._document.removeEventListener("mousemove",We.mousedrag),We.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(q,"mousedown",Tt=>{if(Tt.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Tt))return Oe(Tt),We.mouseup&&this._document.addEventListener("mouseup",We.mouseup),We.mousedrag&&this._document.addEventListener("mousemove",We.mousedrag),this.cancel(Tt)})),this.register((0,p.addDisposableDomListener)(q,"wheel",Tt=>{if(!We.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Tt)===!1)return!1;if(!this.buffer.hasScrollback){let Xn=this.viewport.getLinesScrolled(Tt);if(Xn===0)return;let Io=De.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Tt.deltaY<0?"A":"B"),_o="";for(let Br=0;Br{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Tt),this.cancel(Tt)},{passive:!0})),this.register((0,p.addDisposableDomListener)(q,"touchmove",Tt=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Tt)?void 0:this.cancel(Tt)},{passive:!1}))}refresh(ye,q){this._renderService?.refreshRows(ye,q)}updateCursorStyle(ye){this._selectionService?.shouldColumnSelect(ye)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(ye,q,Oe=0){Oe===1?(super.scrollLines(ye,q,Oe),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(ye)}paste(ye){(0,c.paste)(ye,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ye){this._customKeyEventHandler=ye}attachCustomWheelEventHandler(ye){this._customWheelEventHandler=ye}registerLinkProvider(ye){return this._linkProviderService.registerLinkProvider(ye)}registerCharacterJoiner(ye){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let q=this._characterJoinerService.register(ye);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(ye){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ye)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ye){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ye)}registerDecoration(ye){return this._decorationService.registerDecoration(ye)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ye,q,Oe){this._selectionService.setSelection(ye,q,Oe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(ye,q){this._selectionService?.selectLines(ye,q)}_keyDown(ye){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1)return!1;let q=this.browser.isMac&&this.options.macOptionIsMeta&&ye.altKey;if(!q&&!this._compositionHelper.keydown(ye))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||ye.key!=="Dead"&&ye.key!=="AltGraph"||(this._unprocessedDeadKey=!0);let Oe=(0,he.evaluateKeyboardEvent)(ye,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ye),Oe.type===3||Oe.type===2){let We=this.rows-1;return this.scrollLines(Oe.type===2?-We:We),this.cancel(ye,!0)}return Oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ye)||(Oe.cancel&&this.cancel(ye,!0),!Oe.key||!!(ye.key&&!ye.ctrlKey&&!ye.altKey&&!ye.metaKey&&ye.key.length===1&&ye.key.charCodeAt(0)>=65&&ye.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Oe.key!==De.C0.ETX&&Oe.key!==De.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Oe.key,domEvent:ye}),this._showCursor(),this.coreService.triggerDataEvent(Oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||ye.altKey||ye.ctrlKey?this.cancel(ye,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ye,q){let Oe=ye.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||ye.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||ye.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?Oe:Oe&&(!q.keyCode||q.keyCode>47)}_keyUp(ye){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(ye)||this.focus(),this.updateCursorStyle(ye),this._keyPressHandled=!1)}_keyPress(ye){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1)return!1;if(this.cancel(ye),ye.charCode)q=ye.charCode;else if(ye.which===null||ye.which===void 0)q=ye.keyCode;else{if(ye.which===0||ye.charCode===0)return!1;q=ye.which}return!(!q||(ye.altKey||ye.ctrlKey||ye.metaKey)&&!this._isThirdLevelShift(this.browser,ye)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:ye}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ye){if(ye.data&&ye.inputType==="insertText"&&(!ye.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let q=ye.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(ye),!0}return!1}resize(ye,q){ye!==this.cols||q!==this.rows?super.resize(ye,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ye,q){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let ye=1;ye{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(a,c=1e3){this._renderCallback=a,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,c,p){this._rowCount=p,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;let u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){let h=u-this._lastRefreshMs,_=this._debounceThresholdMS-h;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},_)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c)}}},1680:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,E){var I,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,y):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,E);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},p=this&&this.__param||function(M,w){return function(y,E){w(y,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;let u=a(3656),h=a(4725),_=a(8460),S=a(844),x=a(2585),b=r.Viewport=class extends S.Disposable{constructor(M,w,y,E,I,D,N,P){super(),this._viewportElement=M,this._scrollArea=w,this._bufferService=y,this._optionsService=E,this._charSizeService=I,this._renderService=D,this._coreBrowserService=N,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(L=>this._renderDimensions=L)),this._handleThemeChange(P.colors),this.register(P.onChangeColors(L=>this._handleThemeChange(L))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(M){this._viewportElement.style.backgroundColor=M.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(M){if(M)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;let w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}let M=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==M&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=M),this._refreshAnimationFrame=null}syncScrollArea(M=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(M);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(M)}_handleScroll(M){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});let w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;let M=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(M*(this._smoothScrollState.target-this._smoothScrollState.origin)),M<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(M,w){let y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=oe),E=""}}return{bufferElements:I,cursorElement:y}}getLinesScrolled(M){if(M.deltaY===0||M.shiftKey)return 0;let w=this._applyScrollModifier(M.deltaY,M);return M.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):M.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(M,w){let y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?M*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:M*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(M){this._lastTouchY=M.touches[0].pageY}handleTouchMove(M){let w=this._lastTouchY-M.touches[0].pageY;return this._lastTouchY=M.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(M,w))}};r.Viewport=b=c([p(2,x.IBufferService),p(3,x.IOptionsService),p(4,h.ICharSizeService),p(5,h.IRenderService),p(6,h.ICoreBrowserService),p(7,h.IThemeService)],b)},3107:function(o,r,a){var c=this&&this.__decorate||function(x,b,M,w){var y,E=arguments.length,I=E<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,b,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(E<3?y(I):E>3?y(b,M,I):y(b,M))||I);return E>3&&I&&Object.defineProperty(b,M,I),I},p=this&&this.__param||function(x,b){return function(M,w){b(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;let u=a(4725),h=a(844),_=a(2585),S=r.BufferDecorationRenderer=class extends h.Disposable{constructor(x,b,M,w,y){super(),this._screenElement=x,this._bufferService=b,this._coreBrowserService=M,this._decorationService=w,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(E=>this._removeDecoration(E))),this.register((0,h.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){let b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",x?.options?.layer==="top"),b.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let M=x.options.x??0;return M&&M>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(x,b),b}_refreshStyle(x){let b=x.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let M=this._decorationElements.get(x);M||(M=this._createElement(x),x.element=M,this._decorationElements.set(x,M),this._container.appendChild(M),x.onDispose(()=>{this._decorationElements.delete(x),M.remove()})),M.style.top=b*this._renderService.dimensions.css.cell.height+"px",M.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(M)}}_refreshXPosition(x,b=x.element){if(!b)return;let M=x.options.x??0;(x.options.anchor||"left")==="right"?b.style.right=M?M*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=M?M*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){this._decorationElements.get(x)?.remove(),this._decorationElements.delete(x),x.dispose()}};r.BufferDecorationRenderer=S=c([p(1,_.IBufferService),p(2,u.ICoreBrowserService),p(3,_.IDecorationService),p(4,u.IRenderService)],S)},5871:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorZoneStore=void 0,r.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(a){if(a.options.overviewRulerOptions){for(let c of this._zones)if(c.color===a.options.overviewRulerOptions.color&&c.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,a.marker.line))return;if(this._lineAdjacentToZone(c,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(c,a.marker.line)}if(this._zonePoolIndex=a.startBufferLine&&c<=a.endBufferLine}_lineAdjacentToZone(a,c,p){return c>=a.startBufferLine-this._linePadding[p||"full"]&&c<=a.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(a,c){a.startBufferLine=Math.min(a.startBufferLine,c),a.endBufferLine=Math.max(a.endBufferLine,c)}}},5744:function(o,r,a){var c=this&&this.__decorate||function(y,E,I,D){var N,P=arguments.length,L=P<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,I):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,E,I,D);else for(var re=y.length-1;re>=0;re--)(N=y[re])&&(L=(P<3?N(L):P>3?N(E,I,L):N(E,I))||L);return P>3&&L&&Object.defineProperty(E,I,L),L},p=this&&this.__param||function(y,E){return function(I,D){E(I,D,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;let u=a(5871),h=a(4725),_=a(844),S=a(2585),x={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},M={full:0,left:0,center:0,right:0},w=r.OverviewRulerRenderer=class extends _.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,E,I,D,N,P,L){super(),this._viewportElement=y,this._screenElement=E,this._bufferService=I,this._decorationService=D,this._renderService=N,this._optionsService=P,this._coreBrowserService=L,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);let re=this._canvas.getContext("2d");if(!re)throw new Error("Ctx cannot be null");this._ctx=re,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,_.toDisposable)(()=>{this._canvas?.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){let y=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=y,b.center=E,b.right=y,this._refreshDrawHeightConstants(),M.full=0,M.left=0,M.center=b.left,M.right=b.left+b.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);let y=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=E,x.center=E,x.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;let y=this._colorZoneStore.zones;for(let E of y)E.position!=="full"&&this._renderColorZone(E);for(let E of y)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(M[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),b[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,E){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};r.OverviewRulerRenderer=w=c([p(2,S.IBufferService),p(3,S.IDecorationService),p(4,h.IRenderService),p(5,S.IOptionsService),p(6,h.ICoreBrowserService)],w)},2950:function(o,r,a){var c=this&&this.__decorate||function(x,b,M,w){var y,E=arguments.length,I=E<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,b,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(E<3?y(I):E>3?y(b,M,I):y(b,M))||I);return E>3&&I&&Object.defineProperty(b,M,I),I},p=this&&this.__param||function(x,b){return function(M,w){b(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;let u=a(4725),h=a(2585),_=a(2584),S=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,b,M,w,y,E){this._textarea=x,this._compositionView=b,this._bufferService=M,this._optionsService=w,this._coreService=y,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){let b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let M;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,M=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),M.length>0&&this._coreService.triggerDataEvent(M,!0)}},0)}else{this._isSendingComposition=!1;let b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){let x=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let b=this._textarea.value,M=b.replace(x,"");this._dataAlreadySent=M,b.length>x.length?this._coreService.triggerDataEvent(M,!0):b.lengththis.updateCompositionElements(!0),0)}}};r.CompositionHelper=S=c([p(2,h.IBufferService),p(3,h.IOptionsService),p(4,h.ICoreService),p(5,u.IRenderService)],S)},9806:(o,r)=>{function a(c,p,u){let h=u.getBoundingClientRect(),_=c.getComputedStyle(u),S=parseInt(_.getPropertyValue("padding-left")),x=parseInt(_.getPropertyValue("padding-top"));return[p.clientX-h.left-S,p.clientY-h.top-x]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=a,r.getCoords=function(c,p,u,h,_,S,x,b,M){if(!S)return;let w=a(c,p,u);return w?(w[0]=Math.ceil((w[0]+(M?x/2:0))/x),w[1]=Math.ceil(w[1]/b),w[0]=Math.min(Math.max(w[0],1),h+(M?1:0)),w[1]=Math.min(Math.max(w[1],1),_),w):void 0}},9504:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;let c=a(2584);function p(b,M,w,y){let E=b-u(b,w),I=M-u(M,w),D=Math.abs(E-I)-(function(N,P,L){let re=0,oe=N-u(N,L),G=P-u(P,L);for(let $=0;$=0&&bM?"A":"B"}function _(b,M,w,y,E,I){let D=b,N=M,P="";for(;D!==w||N!==y;)D+=E?1:-1,E&&D>I.cols-1?(P+=I.buffer.translateBufferLineToString(N,!1,b,D),D=0,b=0,N++):!E&&D<0&&(P+=I.buffer.translateBufferLineToString(N,!1,0,b+1),D=I.cols-1,b=D,N--);return P+I.buffer.translateBufferLineToString(N,!1,b,D)}function S(b,M){let w=M?"O":"[";return c.C0.ESC+w+b}function x(b,M){b=Math.floor(b);let w="";for(let y=0;y0?oe-u(oe,G):L;let be=oe,me=(function(De,he,B,X,se,ce){let ke;return ke=p(B,X,se,ce).length>0?X-u(X,se):he,De=B&&keb?"D":"C",x(Math.abs(E-b),S(D,y));D=I>M?"D":"C";let N=Math.abs(I-M);return x((function(P,L){return L.cols-P})(I>M?b:E,w)+(N-1)*w.cols+1+((I>M?E:b)-1),S(D,y))}},1296:function(o,r,a){var c=this&&this.__decorate||function($,ue,be,me){var De,he=arguments.length,B=he<3?ue:me===null?me=Object.getOwnPropertyDescriptor(ue,be):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate($,ue,be,me);else for(var X=$.length-1;X>=0;X--)(De=$[X])&&(B=(he<3?De(B):he>3?De(ue,be,B):De(ue,be))||B);return he>3&&B&&Object.defineProperty(ue,be,B),B},p=this&&this.__param||function($,ue){return function(be,me){ue(be,me,$)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;let u=a(3787),h=a(2550),_=a(2223),S=a(6171),x=a(6052),b=a(4725),M=a(8055),w=a(8460),y=a(844),E=a(2585),I="xterm-dom-renderer-owner-",D="xterm-rows",N="xterm-fg-",P="xterm-bg-",L="xterm-focus",re="xterm-selection",oe=1,G=r.DomRenderer=class extends y.Disposable{constructor($,ue,be,me,De,he,B,X,se,ce,ke,ze,Ke){super(),this._terminal=$,this._document=ue,this._element=be,this._screenElement=me,this._viewportElement=De,this._helperContainer=he,this._linkifier2=B,this._charSizeService=se,this._optionsService=ce,this._bufferService=ke,this._coreBrowserService=ze,this._themeService=Ke,this._terminalClass=oe++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(re),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Qe=>this._injectCss(Qe))),this._injectCss(this._themeService.colors),this._rowFactory=X.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(I+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Qe=>this._handleLinkHover(Qe))),this.register(this._linkifier2.onHideLinkUnderline(Qe=>this._handleLinkLeave(Qe))),this.register((0,y.toDisposable)(()=>{this._element.classList.remove(I+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new h.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let $=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*$,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*$),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/$),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/$),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let be of this._rowElements)be.style.width=`${this.dimensions.css.canvas.width}px`,be.style.height=`${this.dimensions.css.cell.height}px`,be.style.lineHeight=`${this.dimensions.css.cell.height}px`,be.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let ue=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=ue,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss($){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let ue=`${this._terminalSelector} .${D} { color: ${$.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;ue+=`${this._terminalSelector} .${D} .xterm-dim { color: ${M.color.multiplyOpacity($.foreground,.5).css};}`,ue+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let be=`blink_underline_${this._terminalClass}`,me=`blink_bar_${this._terminalClass}`,De=`blink_block_${this._terminalClass}`;ue+=`@keyframes ${be} { 50% { border-bottom-style: hidden; }}`,ue+=`@keyframes ${me} { 50% { box-shadow: none; }}`,ue+=`@keyframes ${De} { 0% { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css}; } 50% { background-color: inherit; color: ${$.cursor.css}; }}`,ue+=`${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${be} 1s step-end infinite;}${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${me} 1s step-end infinite;}${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${De} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${$.cursor.css} !important; color: ${$.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${$.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${$.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${$.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,ue+=`${this._terminalSelector} .${re} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${re} div { position: absolute; background-color: ${$.selectionBackgroundOpaque.css};}${this._terminalSelector} .${re} div { position: absolute; background-color: ${$.selectionInactiveBackgroundOpaque.css};}`;for(let[he,B]of $.ansi.entries())ue+=`${this._terminalSelector} .${N}${he} { color: ${B.css}; }${this._terminalSelector} .${N}${he}.xterm-dim { color: ${M.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${P}${he} { background-color: ${B.css}; }`;ue+=`${this._terminalSelector} .${N}${_.INVERTED_DEFAULT_COLOR} { color: ${M.color.opaque($.background).css}; }${this._terminalSelector} .${N}${_.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${M.color.multiplyOpacity(M.color.opaque($.background),.5).css}; }${this._terminalSelector} .${P}${_.INVERTED_DEFAULT_COLOR} { background-color: ${$.foreground.css}; }`,this._themeStyleElement.textContent=ue}_setDefaultSpacing(){let $=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${$}px`,this._rowFactory.defaultSpacing=$}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements($,ue){for(let be=this._rowElements.length;be<=ue;be++){let me=this._document.createElement("div");this._rowContainer.appendChild(me),this._rowElements.push(me)}for(;this._rowElements.length>ue;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize($,ue){this._refreshRowElements($,ue),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged($,ue,be){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged($,ue,be),this.renderRows(0,this._bufferService.rows-1),!$||!ue)return;this._selectionRenderModel.update(this._terminal,$,ue,be);let me=this._selectionRenderModel.viewportStartRow,De=this._selectionRenderModel.viewportEndRow,he=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(he>=this._bufferService.rows||B<0)return;let X=this._document.createDocumentFragment();if(be){let se=$[0]>ue[0];X.appendChild(this._createSelectionElement(he,se?ue[0]:$[0],se?$[0]:ue[0],B-he+1))}else{let se=me===he?$[0]:0,ce=he===De?ue[0]:this._bufferService.cols;X.appendChild(this._createSelectionElement(he,se,ce));let ke=B-he-1;if(X.appendChild(this._createSelectionElement(he+1,0,this._bufferService.cols,ke)),he!==B){let ze=De===B?ue[0]:this._bufferService.cols;X.appendChild(this._createSelectionElement(B,0,ze))}}this._selectionContainer.appendChild(X)}_createSelectionElement($,ue,be,me=1){let De=this._document.createElement("div"),he=ue*this.dimensions.css.cell.width,B=this.dimensions.css.cell.width*(be-ue);return he+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-he),De.style.height=me*this.dimensions.css.cell.height+"px",De.style.top=$*this.dimensions.css.cell.height+"px",De.style.left=`${he}px`,De.style.width=`${B}px`,De}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let $ of this._rowElements)$.replaceChildren()}renderRows($,ue){let be=this._bufferService.buffer,me=be.ybase+be.y,De=Math.min(be.x,this._bufferService.cols-1),he=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,X=this._optionsService.rawOptions.cursorInactiveStyle;for(let se=$;se<=ue;se++){let ce=se+be.ydisp,ke=this._rowElements[se],ze=be.lines.get(ce);if(!ke||!ze)break;ke.replaceChildren(...this._rowFactory.createRow(ze,ce,ce===me,B,X,De,he,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${I}${this._terminalClass}`}_handleLinkHover($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!0)}_handleLinkLeave($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!1)}_setCellUnderline($,ue,be,me,De,he){be<0&&($=0),me<0&&(ue=0);let B=this._bufferService.rows-1;be=Math.max(Math.min(be,B),0),me=Math.max(Math.min(me,B),0),De=Math.min(De,this._bufferService.cols);let X=this._bufferService.buffer,se=X.ybase+X.y,ce=Math.min(X.x,De-1),ke=this._optionsService.rawOptions.cursorBlink,ze=this._optionsService.rawOptions.cursorStyle,Ke=this._optionsService.rawOptions.cursorInactiveStyle;for(let Qe=be;Qe<=me;++Qe){let ye=Qe+X.ydisp,q=this._rowElements[Qe],Oe=X.lines.get(ye);if(!q||!Oe)break;q.replaceChildren(...this._rowFactory.createRow(Oe,ye,ye===se,ze,Ke,ce,ke,this.dimensions.css.cell.width,this._widthCache,he?Qe===be?$:0:-1,he?(Qe===me?ue:De)-1:-1))}}};r.DomRenderer=G=c([p(7,E.IInstantiationService),p(8,b.ICharSizeService),p(9,E.IOptionsService),p(10,E.IBufferService),p(11,b.ICoreBrowserService),p(12,b.IThemeService)],G)},3787:function(o,r,a){var c=this&&this.__decorate||function(D,N,P,L){var re,oe=arguments.length,G=oe<3?N:L===null?L=Object.getOwnPropertyDescriptor(N,P):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(D,N,P,L);else for(var $=D.length-1;$>=0;$--)(re=D[$])&&(G=(oe<3?re(G):oe>3?re(N,P,G):re(N,P))||G);return oe>3&&G&&Object.defineProperty(N,P,G),G},p=this&&this.__param||function(D,N){return function(P,L){N(P,L,D)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;let u=a(2223),h=a(643),_=a(511),S=a(2585),x=a(8055),b=a(4725),M=a(4269),w=a(6171),y=a(3734),E=r.DomRendererRowFactory=class{constructor(D,N,P,L,re,oe,G){this._document=D,this._characterJoinerService=N,this._optionsService=P,this._coreBrowserService=L,this._coreService=re,this._decorationService=oe,this._themeService=G,this._workCell=new _.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,N,P){this._selectionStart=D,this._selectionEnd=N,this._columnSelectMode=P}createRow(D,N,P,L,re,oe,G,$,ue,be,me){let De=[],he=this._characterJoinerService.getJoinedCharacters(N),B=this._themeService.colors,X,se=D.getNoBgTrimmedLength();P&&se0&&Xn===he[0][0]){_o=!0;let Go=he.shift();Rn=new M.JoinedCellData(this._workCell,D.translateToString(!0,Go[0],Go[1]),Go[1]-Go[0]),Br=Go[1]-1,Io=Rn.getWidth()}let zd=this._isCellInSelection(Xn,N),Ru=P&&Xn===oe,ek=Tt&&Xn>=be&&Xn<=me,tk=!1;this._decorationService.forEachDecorationAtCell(Xn,N,void 0,Go=>{tk=!0});let Qv=Rn.getChars()||h.WHITESPACE_CELL_CHAR;if(Qv===" "&&(Rn.isUnderline()||Rn.isOverline())&&(Qv="\xA0"),We=Io*$-ue.get(Qv,Rn.isBold(),Rn.isItalic()),X){if(ce&&(zd&&Oe||!zd&&!Oe&&Rn.bg===ze)&&(zd&&Oe&&B.selectionForeground||Rn.fg===Ke)&&Rn.extended.ext===Qe&&ek===ye&&We===q&&!Ru&&!_o&&!tk){Rn.isInvisible()?ke+=h.WHITESPACE_CELL_CHAR:ke+=Qv,ce++;continue}ce&&(X.textContent=ke),X=this._document.createElement("span"),ce=0,ke=""}else X=this._document.createElement("span");if(ze=Rn.bg,Ke=Rn.fg,Qe=Rn.extended.ext,ye=ek,q=We,Oe=zd,_o&&oe>=Xn&&oe<=Br&&(oe=Xn),!this._coreService.isCursorHidden&&Ru&&this._coreService.isCursorInitialized){if(ct.push("xterm-cursor"),this._coreBrowserService.isFocused)G&&ct.push("xterm-cursor-blink"),ct.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(re)switch(re){case"outline":ct.push("xterm-cursor-outline");break;case"block":ct.push("xterm-cursor-block");break;case"bar":ct.push("xterm-cursor-bar");break;case"underline":ct.push("xterm-cursor-underline")}}if(Rn.isBold()&&ct.push("xterm-bold"),Rn.isItalic()&&ct.push("xterm-italic"),Rn.isDim()&&ct.push("xterm-dim"),ke=Rn.isInvisible()?h.WHITESPACE_CELL_CHAR:Rn.getChars()||h.WHITESPACE_CELL_CHAR,Rn.isUnderline()&&(ct.push(`xterm-underline-${Rn.extended.underlineStyle}`),ke===" "&&(ke="\xA0"),!Rn.isUnderlineColorDefault()))if(Rn.isUnderlineColorRGB())X.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Rn.getUnderlineColor()).join(",")})`;else{let Go=Rn.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Rn.isBold()&&Go<8&&(Go+=8),X.style.textDecorationColor=B.ansi[Go].css}Rn.isOverline()&&(ct.push("xterm-overline"),ke===" "&&(ke="\xA0")),Rn.isStrikethrough()&&ct.push("xterm-strikethrough"),ek&&(X.style.textDecoration="underline");let Vs=Rn.getFgColor(),Ig=Rn.getFgColorMode(),tc=Rn.getBgColor(),Ag=Rn.getBgColorMode(),nk=!!Rn.isInverse();if(nk){let Go=Vs;Vs=tc,tc=Go;let e$=Ig;Ig=Ag,Ag=e$}let jd,Xv,$d,Og=!1;switch(this._decorationService.forEachDecorationAtCell(Xn,N,void 0,Go=>{Go.options.layer!=="top"&&Og||(Go.backgroundColorRGB&&(Ag=50331648,tc=Go.backgroundColorRGB.rgba>>8&16777215,jd=Go.backgroundColorRGB),Go.foregroundColorRGB&&(Ig=50331648,Vs=Go.foregroundColorRGB.rgba>>8&16777215,Xv=Go.foregroundColorRGB),Og=Go.options.layer==="top")}),!Og&&zd&&(jd=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,tc=jd.rgba>>8&16777215,Ag=50331648,Og=!0,B.selectionForeground&&(Ig=50331648,Vs=B.selectionForeground.rgba>>8&16777215,Xv=B.selectionForeground)),Og&&ct.push("xterm-decoration-top"),Ag){case 16777216:case 33554432:$d=B.ansi[tc],ct.push(`xterm-bg-${tc}`);break;case 50331648:$d=x.channels.toColor(tc>>16,tc>>8&255,255&tc),this._addStyle(X,`background-color:#${I((tc>>>0).toString(16),"0",6)}`);break;default:nk?($d=B.foreground,ct.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):$d=B.background}switch(jd||Rn.isDim()&&(jd=x.color.multiplyOpacity($d,.5)),Ig){case 16777216:case 33554432:Rn.isBold()&&Vs<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Vs+=8),this._applyMinimumContrast(X,$d,B.ansi[Vs],Rn,jd,void 0)||ct.push(`xterm-fg-${Vs}`);break;case 50331648:let Go=x.channels.toColor(Vs>>16&255,Vs>>8&255,255&Vs);this._applyMinimumContrast(X,$d,Go,Rn,jd,Xv)||this._addStyle(X,`color:#${I(Vs.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(X,$d,B.foreground,Rn,jd,Xv)||nk&&ct.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ct.length&&(X.className=ct.join(" "),ct.length=0),Ru||_o||tk?X.textContent=ke:ce++,We!==this.defaultSpacing&&(X.style.letterSpacing=`${We}px`),De.push(X),Xn=Br}return X&&ce&&(X.textContent=ke),De}_applyMinimumContrast(D,N,P,L,re,oe){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(L.getCode()))return!1;let G=this._getContrastCache(L),$;if(re||oe||($=G.getColor(N.rgba,P.rgba)),$===void 0){let ue=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);$=x.color.ensureContrastRatio(re||N,oe||P,ue),G.setColor((re||N).rgba,(oe||P).rgba,$??null)}return!!$&&(this._addStyle(D,`color:${$.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,N){D.setAttribute("style",`${D.getAttribute("style")||""}${N};`)}_isCellInSelection(D,N){let P=this._selectionStart,L=this._selectionEnd;return!(!P||!L)&&(this._columnSelectMode?P[0]<=L[0]?D>=P[0]&&N>=P[1]&&D=P[1]&&D>=L[0]&&N<=L[1]:N>P[1]&&N=P[0]&&D=P[0])}};function I(D,N,P){for(;D.length{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(a,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=a.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let p=a.createElement("span");p.classList.add("xterm-char-measure-element");let u=a.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";let h=a.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontStyle="italic";let _=a.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold",_.style.fontStyle="italic",this._measureElements=[p,u,h,_],this._container.appendChild(p),this._container.appendChild(u),this._container.appendChild(h),this._container.appendChild(_),c.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(a,c,p,u){a===this._font&&c===this._fontSize&&p===this._weight&&u===this._weightBold||(this._font=a,this._fontSize=c,this._weight=p,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(a,c,p){let u=0;if(!c&&!p&&a.length===1&&(u=a.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];let S=this._measure(a,0);return S>0&&(this._flat[u]=S),S}let h=a;c&&(h+="B"),p&&(h+="I");let _=this._holey.get(h);if(_===void 0){let S=0;c&&(S|=1),p&&(S|=2),_=this._measure(a,S),_>0&&this._holey.set(h,_)}return _}_measure(a,c){let p=this._measureElements[c];return p.textContent=a.repeat(32),p.offsetWidth/32}}},2223:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;let c=a(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(o,r)=>{function a(p){return 57508<=p&&p<=57558}function c(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},r.isPowerlineGlyph=a,r.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},r.isEmoji=c,r.allowRescaling=function(p,u,h,_){return u===1&&h>Math.ceil(1.5*_)&&p!==void 0&&p>255&&!c(p)&&!a(p)&&!(function(S){return 57344<=S&&S<=63743})(p)},r.treatGlyphAsBackgroundColor=function(p){return a(p)||(function(u){return 9472<=u&&u<=9631})(p)},r.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},r.computeNextVariantOffset=function(p,u,h=0){return(p-(2*Math.round(u)-h))%(2*Math.round(u))}},6052:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,u,h,_=!1){if(this.selectionStart=u,this.selectionEnd=h,!u||!h||u[0]===h[0]&&u[1]===h[1])return void this.clear();let S=p.buffers.active.ydisp,x=u[1]-S,b=h[1]-S,M=Math.max(x,0),w=Math.min(b,p.rows-1);M>=p.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=_,this.viewportStartRow=x,this.viewportEndRow=b,this.viewportCappedStartRow=M,this.viewportCappedEndRow=w,this.startCol=u[0],this.endCol=h[0])}isCellSelected(p,u,h){return!!this.hasSelection&&(h-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&h>=this.viewportCappedStartRow&&u=this.viewportCappedStartRow&&u>=this.endCol&&h<=this.viewportCappedEndRow:h>this.viewportStartRow&&h=this.startCol&&u=this.startCol)}}r.createSelectionRenderModel=function(){return new a}},456:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.SelectionModel=class{constructor(a){this._bufferService=a,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?a%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)-1]:[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[a,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[Math.max(a,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let a=this.selectionStart,c=this.selectionEnd;return!(!a||!c)&&(a[1]>c[1]||a[1]===c[1]&&a[0]>c[0])}handleTrim(a){return this.selectionStart&&(this.selectionStart[1]-=a),this.selectionEnd&&(this.selectionEnd[1]-=a),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;let u=a(2585),h=a(8460),_=a(844),S=r.CharSizeService=class extends _.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new h.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new M(this._optionsService))}catch{this._measureStrategy=this.register(new b(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){let w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};r.CharSizeService=S=c([p(2,u.IOptionsService)],S);class x extends _.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,E){y!==void 0&&y>0&&E!==void 0&&E>0&&(this._result.width=y,this._result.height=E)}}class b extends x{constructor(y,E,I){super(),this._document=y,this._parentElement=E,this._optionsService=I,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class M extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,E){var I,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,y):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,E);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},p=this&&this.__param||function(M,w){return function(y,E){w(y,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;let u=a(3734),h=a(643),_=a(511),S=a(2585);class x extends u.AttributeData{constructor(w,y,E){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=x;let b=r.CharacterJoinerService=class A9{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new _.CellData}register(w){let y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){let G=this._getJoinedRanges(I,P,N,y,D);for(let $=0;$1){let oe=this._getJoinedRanges(I,P,N,y,D);for(let G=0;G{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;let c=a(844),p=a(8460),u=a(3656);class h extends c.Disposable{constructor(x,b,M){super(),this._textarea=x,this._window=b,this.mainDocument=M,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new _(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(w=>this._screenDprMonitor.setWindow(w))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}r.CoreBrowserService=h;class _ extends c.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)(()=>this.clearListener()))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;let c=a(844);class p extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(h){return this.linkProviders.push(h),{dispose:()=>{let _=this.linkProviders.indexOf(h);_!==-1&&this.linkProviders.splice(_,1)}}}}r.LinkProviderService=p},8934:function(o,r,a){var c=this&&this.__decorate||function(S,x,b,M){var w,y=arguments.length,E=y<3?x:M===null?M=Object.getOwnPropertyDescriptor(x,b):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(S,x,b,M);else for(var I=S.length-1;I>=0;I--)(w=S[I])&&(E=(y<3?w(E):y>3?w(x,b,E):w(x,b))||E);return y>3&&E&&Object.defineProperty(x,b,E),E},p=this&&this.__param||function(S,x){return function(b,M){x(b,M,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;let u=a(4725),h=a(9806),_=r.MouseService=class{constructor(S,x){this._renderService=S,this._charSizeService=x}getCoords(S,x,b,M,w){return(0,h.getCoords)(window,S,x,b,M,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(S,x){let b=(0,h.getCoordsRelativeToElement)(window,S,x);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};r.MouseService=_=c([p(0,u.IRenderService),p(1,u.ICharSizeService)],_)},3230:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;let u=a(6193),h=a(4725),_=a(8460),S=a(844),x=a(7226),b=a(2585),M=r.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,E,I,D,N,P,L){super(),this._rowCount=w,this._charSizeService=I,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new S.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new _.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new _.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new _.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new _.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((re,oe)=>this._renderRows(re,oe),P),this.register(this._renderDebouncer),this.register(P.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(N.onResize(()=>this._fullRefresh())),this.register(N.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this.register(E.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(D.onDecorationRegistered(()=>this._fullRefresh())),this.register(D.onDecorationRemoved(()=>this._fullRefresh())),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(N.cols,N.rows),this._fullRefresh()})),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(N.buffer.y,N.buffer.y,!0))),this.register(L.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(P.window,y),this.register(P.onWindowChange(re=>this._registerIntersectionObserver(re,y)))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){let E=new w.IntersectionObserver(I=>this._handleIntersectionChange(I[I.length-1]),{threshold:0});E.observe(y),this._observerDisposable.value=(0,S.toDisposable)(()=>E.disconnect())}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(w,y,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw(y=>this.refreshRows(y.start,y.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(w,y)):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(w,y,E){this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=E,this._renderer.value?.handleSelectionChanged(w,y,E)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};r.RenderService=M=c([p(2,b.IOptionsService),p(3,h.ICharSizeService),p(4,b.IDecorationService),p(5,b.IBufferService),p(6,h.ICoreBrowserService),p(7,h.IThemeService)],M)},9312:function(o,r,a){var c=this&&this.__decorate||function(P,L,re,oe){var G,$=arguments.length,ue=$<3?L:oe===null?oe=Object.getOwnPropertyDescriptor(L,re):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(P,L,re,oe);else for(var be=P.length-1;be>=0;be--)(G=P[be])&&(ue=($<3?G(ue):$>3?G(L,re,ue):G(L,re))||ue);return $>3&&ue&&Object.defineProperty(L,re,ue),ue},p=this&&this.__param||function(P,L){return function(re,oe){L(re,oe,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;let u=a(9806),h=a(9504),_=a(456),S=a(4725),x=a(8460),b=a(844),M=a(6114),w=a(4841),y=a(511),E=a(2585),I="\xA0",D=new RegExp(I,"g"),N=r.SelectionService=class extends b.Disposable{constructor(P,L,re,oe,G,$,ue,be,me){super(),this._element=P,this._screenElement=L,this._linkifier=re,this._bufferService=oe,this._coreService=G,this._mouseService=$,this._optionsService=ue,this._renderService=be,this._coreBrowserService=me,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=De=>this._handleMouseMove(De),this._mouseUpListener=De=>this._handleMouseUp(De),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(De=>this._handleTrim(De)),this.register(this._bufferService.buffers.onBufferActivate(De=>this._handleBufferActivate(De))),this.enable(),this._model=new _.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let P=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!P||!L||P[0]===L[0]&&P[1]===L[1])}get selectionText(){let P=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!P||!L)return"";let re=this._bufferService.buffer,oe=[];if(this._activeSelectionMode===3){if(P[0]===L[0])return"";let G=P[0]G.replace(D," ")).join(M.isWindows?`\r `:` `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(P){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),M.isLinux&&P&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(P){let L=this._getMouseBufferCoords(P),re=this._model.finalSelectionStart,oe=this._model.finalSelectionEnd;return!!(re&&oe&&L)&&this._areCoordsInSelection(L,re,oe)}isCellInSelection(P,L){let re=this._model.finalSelectionStart,oe=this._model.finalSelectionEnd;return!(!re||!oe)&&this._areCoordsInSelection([P,L],re,oe)}_areCoordsInSelection(P,L,re){return P[1]>L[1]&&P[1]=L[0]&&P[0]=L[0]}_selectWordAtCursor(P,L){let re=this._linkifier.currentLink?.link?.range;if(re)return this._model.selectionStart=[re.start.x-1,re.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(re,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let oe=this._getMouseBufferCoords(P);return!!oe&&(this._selectWordAt(oe,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(P,L){this._model.clearSelection(),P=Math.max(P,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,P],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(P){this._model.handleTrim(P)&&this.refresh()}_getMouseBufferCoords(P){let L=this._mouseService.getCoords(P,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(P){let L=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,P,this._screenElement)[1],re=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=re?0:(L>re&&(L-=re),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(P){return M.isMac?P.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:P.shiftKey}handleMouseDown(P){if(this._mouseDownTimeStamp=P.timeStamp,(P.button!==2||!this.hasSelection)&&P.button===0){if(!this._enabled){if(!this.shouldForceSelection(P))return;P.stopPropagation()}P.preventDefault(),this._dragScrollAmount=0,this._enabled&&P.shiftKey?this._handleIncrementalClick(P):P.detail===1?this._handleSingleClick(P):P.detail===2?this._handleDoubleClick(P):P.detail===3&&this._handleTripleClick(P),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(P){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(P))}_handleSingleClick(P){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(P)?3:0,this._model.selectionStart=this._getMouseBufferCoords(P),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(P){this._selectWordAtCursor(P,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(P){let L=this._getMouseBufferCoords(P);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(P){return P.altKey&&!(M.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(P){if(P.stopImmediatePropagation(),!this._model.selectionStart)return;let L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(P),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let re=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(P.ydisp+this._bufferService.rows,P.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=P.ydisp),this.refresh()}}_handleMouseUp(P){let L=P.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&P.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let re=this._mouseService.getCoords(P,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(re&&re[0]!==void 0&&re[1]!==void 0){let oe=(0,h.moveToCellSequence)(re[0]-1,re[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(oe,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let P=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,re=!(!P||!L||P[0]===L[0]&&P[1]===L[1]);re?P&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&P[0]===this._oldSelectionStart[0]&&P[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(P,L,re)):this._oldHasSelection&&this._fireOnSelectionChange(P,L,re)}_fireOnSelectionChange(P,L,re){this._oldSelectionStart=P,this._oldSelectionEnd=L,this._oldHasSelection=re,this._onSelectionChange.fire()}_handleBufferActivate(P){this.clearSelection(),this._trimListener.dispose(),this._trimListener=P.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(P,L){let re=L;for(let oe=0;L>=oe;oe++){let G=P.loadCell(oe,this._workCell).getChars().length;this._workCell.getWidth()===0?re--:G>1&&L!==oe&&(re+=G-1)}return re}setSelection(P,L,re){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[P,L],this._model.selectionStartLength=re,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(P){this._isClickInSelection(P)||(this._selectWordAtCursor(P,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(P,L,re=!0,oe=!0){if(P[0]>=this._bufferService.cols)return;let G=this._bufferService.buffer,$=G.lines.get(P[1]);if(!$)return;let ue=G.translateBufferLineToString(P[1],!1),be=this._convertViewportColToCharacterIndex($,P[0]),me=be,De=P[0]-be,he=0,B=0,X=0,se=0;if(ue.charAt(be)===" "){for(;be>0&&ue.charAt(be-1)===" ";)be--;for(;me1&&(se+=Qe-1,me+=Qe-1);ze>0&&be>0&&!this._isCharWordSeparator($.loadCell(ze-1,this._workCell));){$.loadCell(ze-1,this._workCell);let ye=this._workCell.getChars().length;this._workCell.getWidth()===0?(he++,ze--):ye>1&&(X+=ye-1,be-=ye-1),be--,ze--}for(;Ke<$.length&&me+11&&(se+=ye-1,me+=ye-1),me++,Ke++}}me++;let ce=be+De-he+X,ke=Math.min(this._bufferService.cols,me-be+he+B-X-se);if(L||ue.slice(be,me).trim()!==""){if(re&&ce===0&&$.getCodePoint(0)!==32){let ze=G.lines.get(P[1]-1);if(ze&&$.isWrapped&&ze.getCodePoint(this._bufferService.cols-1)!==32){let Ke=this._getWordAt([this._bufferService.cols-1,P[1]-1],!1,!0,!1);if(Ke){let Qe=this._bufferService.cols-Ke.start;ce-=Qe,ke+=Qe}}}if(oe&&ce+ke===this._bufferService.cols&&$.getCodePoint(this._bufferService.cols-1)!==32){let ze=G.lines.get(P[1]+1);if(ze?.isWrapped&&ze.getCodePoint(0)!==32){let Ke=this._getWordAt([0,P[1]+1],!1,!1,!0);Ke&&(ke+=Ke.length)}}return{start:ce,length:ke}}}_selectWordAt(P,L){let re=this._getWordAt(P,L);if(re){for(;re.start<0;)re.start+=this._bufferService.cols,P[1]--;this._model.selectionStart=[re.start,P[1]],this._model.selectionStartLength=re.length}}_selectToWordAt(P){let L=this._getWordAt(P,!0);if(L){let re=P[1];for(;L.start<0;)L.start+=this._bufferService.cols,re--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,re++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,re]}}_isCharWordSeparator(P){return P.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(P.getChars())>=0}_selectLineAt(P){let L=this._bufferService.buffer.getWrappedRangeForLine(P),re={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)(re,this._bufferService.cols)}};r.SelectionService=N=c([p(3,E.IBufferService),p(4,E.ICoreService),p(5,S.IMouseService),p(6,E.IOptionsService),p(7,S.IRenderService),p(8,S.ICoreBrowserService)],N)},4725:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;let c=a(8343);r.ICharSizeService=(0,c.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),r.IMouseService=(0,c.createDecorator)("MouseService"),r.IRenderService=(0,c.createDecorator)("RenderService"),r.ISelectionService=(0,c.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,c.createDecorator)("ThemeService"),r.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(o,r,a){var c=this&&this.__decorate||function(N,P,L,re){var oe,G=arguments.length,$=G<3?P:re===null?re=Object.getOwnPropertyDescriptor(P,L):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(N,P,L,re);else for(var ue=N.length-1;ue>=0;ue--)(oe=N[ue])&&($=(G<3?oe($):G>3?oe(P,L,$):oe(P,L))||$);return G>3&&$&&Object.defineProperty(P,L,$),$},p=this&&this.__param||function(N,P){return function(L,re){P(L,re,N)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;let u=a(7239),h=a(8055),_=a(8460),S=a(844),x=a(2585),b=h.css.toColor("#ffffff"),M=h.css.toColor("#000000"),w=h.css.toColor("#ffffff"),y=h.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{let N=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],P=[0,95,135,175,215,255];for(let L=0;L<216;L++){let re=P[L/36%6|0],oe=P[L/6%6|0],G=P[L%6];N.push({css:h.channels.toCss(re,oe,G),rgba:h.channels.toRgba(re,oe,G)})}for(let L=0;L<24;L++){let re=8+10*L;N.push({css:h.channels.toCss(re,re,re),rgba:h.channels.toRgba(re,re,re)})}return N})());let I=r.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(N){super(),this._optionsService=N,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new _.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:M,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:h.color.blend(M,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:h.color.blend(M,E),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(N={}){let P=this._colors;if(P.foreground=D(N.foreground,b),P.background=D(N.background,M),P.cursor=D(N.cursor,w),P.cursorAccent=D(N.cursorAccent,y),P.selectionBackgroundTransparent=D(N.selectionBackground,E),P.selectionBackgroundOpaque=h.color.blend(P.background,P.selectionBackgroundTransparent),P.selectionInactiveBackgroundTransparent=D(N.selectionInactiveBackground,P.selectionBackgroundTransparent),P.selectionInactiveBackgroundOpaque=h.color.blend(P.background,P.selectionInactiveBackgroundTransparent),P.selectionForeground=N.selectionForeground?D(N.selectionForeground,h.NULL_COLOR):void 0,P.selectionForeground===h.NULL_COLOR&&(P.selectionForeground=void 0),h.color.isOpaque(P.selectionBackgroundTransparent)&&(P.selectionBackgroundTransparent=h.color.opacity(P.selectionBackgroundTransparent,.3)),h.color.isOpaque(P.selectionInactiveBackgroundTransparent)&&(P.selectionInactiveBackgroundTransparent=h.color.opacity(P.selectionInactiveBackgroundTransparent,.3)),P.ansi=r.DEFAULT_ANSI_COLORS.slice(),P.ansi[0]=D(N.black,r.DEFAULT_ANSI_COLORS[0]),P.ansi[1]=D(N.red,r.DEFAULT_ANSI_COLORS[1]),P.ansi[2]=D(N.green,r.DEFAULT_ANSI_COLORS[2]),P.ansi[3]=D(N.yellow,r.DEFAULT_ANSI_COLORS[3]),P.ansi[4]=D(N.blue,r.DEFAULT_ANSI_COLORS[4]),P.ansi[5]=D(N.magenta,r.DEFAULT_ANSI_COLORS[5]),P.ansi[6]=D(N.cyan,r.DEFAULT_ANSI_COLORS[6]),P.ansi[7]=D(N.white,r.DEFAULT_ANSI_COLORS[7]),P.ansi[8]=D(N.brightBlack,r.DEFAULT_ANSI_COLORS[8]),P.ansi[9]=D(N.brightRed,r.DEFAULT_ANSI_COLORS[9]),P.ansi[10]=D(N.brightGreen,r.DEFAULT_ANSI_COLORS[10]),P.ansi[11]=D(N.brightYellow,r.DEFAULT_ANSI_COLORS[11]),P.ansi[12]=D(N.brightBlue,r.DEFAULT_ANSI_COLORS[12]),P.ansi[13]=D(N.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),P.ansi[14]=D(N.brightCyan,r.DEFAULT_ANSI_COLORS[14]),P.ansi[15]=D(N.brightWhite,r.DEFAULT_ANSI_COLORS[15]),N.extendedAnsi){let L=Math.min(P.ansi.length-16,N.extendedAnsi.length);for(let re=0;re{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;let c=a(8460),p=a(844);class u extends p.Disposable{constructor(_){super(),this._maxLength=_,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(_){if(this._maxLength===_)return;let S=new Array(_);for(let x=0;xthis._length)for(let S=this._length;S<_;S++)this._array[S]=void 0;this._length=_}get(_){return this._array[this._getCyclicIndex(_)]}set(_,S){this._array[this._getCyclicIndex(_)]=S}push(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(_,S,...x){if(S){for(let b=_;b=_;b--)this._array[this._getCyclicIndex(b+x.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){let b=this._length+x.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=x.length}trimStart(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)}shiftElements(_,S,x){if(!(S<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let M=S-1;M>=0;M--)this.set(_+M+x,this.get(_+M));let b=_+S+x-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function a(c,p=5){if(typeof c!="object")return c;let u=Array.isArray(c)?[]:{};for(let h in c)u[h]=p<=1?c[h]:c[h]&&a(c[h],p-1);return u}},8055:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let a=0,c=0,p=0,u=0;var h,_,S,x,b;function M(y){let E=y.toString(16);return E.length<2?"0"+E:E}function w(y,E){return y>>0},y.toColor=function(E,I,D,N){return{css:y.toCss(E,I,D,N),rgba:y.toRgba(E,I,D,N)}}})(h||(r.channels=h={})),(function(y){function E(I,D){return u=Math.round(255*D),[a,c,p]=b.toChannels(I.rgba),{css:h.toCss(a,c,p,u),rgba:h.toRgba(a,c,p,u)}}y.blend=function(I,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};let N=D.rgba>>24&255,P=D.rgba>>16&255,L=D.rgba>>8&255,re=I.rgba>>24&255,oe=I.rgba>>16&255,G=I.rgba>>8&255;return a=re+Math.round((N-re)*u),c=oe+Math.round((P-oe)*u),p=G+Math.round((L-G)*u),{css:h.toCss(a,c,p),rgba:h.toRgba(a,c,p)}},y.isOpaque=function(I){return(255&I.rgba)==255},y.ensureContrastRatio=function(I,D,N){let P=b.ensureContrastRatio(I.rgba,D.rgba,N);if(P)return h.toColor(P>>24&255,P>>16&255,P>>8&255)},y.opaque=function(I){let D=(255|I.rgba)>>>0;return[a,c,p]=b.toChannels(D),{css:h.toCss(a,c,p),rgba:D}},y.opacity=E,y.multiplyOpacity=function(I,D){return u=255&I.rgba,E(I,u*D/255)},y.toColorRGB=function(I){return[I.rgba>>24&255,I.rgba>>16&255,I.rgba>>8&255]}})(_||(r.color=_={})),(function(y){let E,I;try{let D=document.createElement("canvas");D.width=1,D.height=1;let N=D.getContext("2d",{willReadFrequently:!0});N&&(E=N,E.globalCompositeOperation="copy",I=E.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return a=parseInt(D.slice(1,2).repeat(2),16),c=parseInt(D.slice(2,3).repeat(2),16),p=parseInt(D.slice(3,4).repeat(2),16),h.toColor(a,c,p);case 5:return a=parseInt(D.slice(1,2).repeat(2),16),c=parseInt(D.slice(2,3).repeat(2),16),p=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),h.toColor(a,c,p,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}let N=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(N)return a=parseInt(N[1]),c=parseInt(N[2]),p=parseInt(N[3]),u=Math.round(255*(N[5]===void 0?1:parseFloat(N[5]))),h.toColor(a,c,p,u);if(!E||!I)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=I,E.fillStyle=D,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[a,c,p,u]=E.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:h.toRgba(a,c,p,u),css:D}}})(S||(r.css=S={})),(function(y){function E(I,D,N){let P=I/255,L=D/255,re=N/255;return .2126*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(re<=.03928?re/12.92:Math.pow((re+.055)/1.055,2.4))}y.relativeLuminance=function(I){return E(I>>16&255,I>>8&255,255&I)},y.relativeLuminance2=E})(x||(r.rgb=x={})),(function(y){function E(D,N,P){let L=D>>24&255,re=D>>16&255,oe=D>>8&255,G=N>>24&255,$=N>>16&255,ue=N>>8&255,be=w(x.relativeLuminance2(G,$,ue),x.relativeLuminance2(L,re,oe));for(;be0||$>0||ue>0);)G-=Math.max(0,Math.ceil(.1*G)),$-=Math.max(0,Math.ceil(.1*$)),ue-=Math.max(0,Math.ceil(.1*ue)),be=w(x.relativeLuminance2(G,$,ue),x.relativeLuminance2(L,re,oe));return(G<<24|$<<16|ue<<8|255)>>>0}function I(D,N,P){let L=D>>24&255,re=D>>16&255,oe=D>>8&255,G=N>>24&255,$=N>>16&255,ue=N>>8&255,be=w(x.relativeLuminance2(G,$,ue),x.relativeLuminance2(L,re,oe));for(;be>>0}y.blend=function(D,N){if(u=(255&N)/255,u===1)return N;let P=N>>24&255,L=N>>16&255,re=N>>8&255,oe=D>>24&255,G=D>>16&255,$=D>>8&255;return a=oe+Math.round((P-oe)*u),c=G+Math.round((L-G)*u),p=$+Math.round((re-$)*u),h.toRgba(a,c,p)},y.ensureContrastRatio=function(D,N,P){let L=x.relativeLuminance(D>>8),re=x.relativeLuminance(N>>8);if(w(L,re)>8));if(uew(L,x.relativeLuminance(be>>8))?$:be}return $}let oe=I(D,N,P),G=w(L,x.relativeLuminance(oe>>8));if(Gw(L,x.relativeLuminance($>>8))?oe:$}return oe}},y.reduceLuminance=E,y.increaseLuminance=I,y.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(b||(r.rgba=b={})),r.toPaddedHex=M,r.contrastRatio=w},8969:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;let c=a(844),p=a(2585),u=a(4348),h=a(7866),_=a(744),S=a(7302),x=a(6975),b=a(8460),M=a(1753),w=a(1480),y=a(7994),E=a(9282),I=a(5435),D=a(5981),N=a(2660),P=!1;class L extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event(oe=>{this._onScrollApi?.fire(oe.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(oe){for(let G in oe)this.optionsService.options[G]=oe[G]}constructor(oe){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new S.OptionsService(oe)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(_.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(h.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(M.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(N.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new I.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(G=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(G=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new D.WriteBuffer((G,$)=>this._inputHandler.parse(G,$))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(oe,G){this._writeBuffer.write(oe,G)}writeSync(oe,G){this._logService.logLevel<=p.LogLevelEnum.WARN&&!P&&(this._logService.warn("writeSync is unreliable and will be removed soon."),P=!0),this._writeBuffer.writeSync(oe,G)}input(oe,G=!0){this.coreService.triggerDataEvent(oe,G)}resize(oe,G){isNaN(oe)||isNaN(G)||(oe=Math.max(oe,_.MINIMUM_COLS),G=Math.max(G,_.MINIMUM_ROWS),this._bufferService.resize(oe,G))}scroll(oe,G=!1){this._bufferService.scroll(oe,G)}scrollLines(oe,G,$){this._bufferService.scrollLines(oe,G,$)}scrollPages(oe){this.scrollLines(oe*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(oe){let G=oe-this._bufferService.buffer.ydisp;G!==0&&this.scrollLines(G)}registerEscHandler(oe,G){return this._inputHandler.registerEscHandler(oe,G)}registerDcsHandler(oe,G){return this._inputHandler.registerDcsHandler(oe,G)}registerCsiHandler(oe,G){return this._inputHandler.registerCsiHandler(oe,G)}registerOscHandler(oe,G){return this._inputHandler.registerOscHandler(oe,G)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let oe=!1,G=this.optionsService.rawOptions.windowsPty;G&&G.buildNumber!==void 0&&G.buildNumber!==void 0?oe=G.backend==="conpty"&&G.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(oe=!0),oe?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let oe=[];oe.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),oe.push(this.registerCsiHandler({final:"H"},()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(let G of oe)G.dispose()})}}}r.CoreTerminal=L},8460:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;cc.fire(p))},r.runAndSubscribe=function(a,c){return c(void 0),a(p=>c(p))}},5435:function(o,r,a){var c=this&&this.__decorate||function(he,B,X,se){var ce,ke=arguments.length,ze=ke<3?B:se===null?se=Object.getOwnPropertyDescriptor(B,X):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ze=Reflect.decorate(he,B,X,se);else for(var Ke=he.length-1;Ke>=0;Ke--)(ce=he[Ke])&&(ze=(ke<3?ce(ze):ke>3?ce(B,X,ze):ce(B,X))||ze);return ke>3&&ze&&Object.defineProperty(B,X,ze),ze},p=this&&this.__param||function(he,B){return function(X,se){B(X,se,he)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;let u=a(2584),h=a(7116),_=a(2015),S=a(844),x=a(482),b=a(8437),M=a(8460),w=a(643),y=a(511),E=a(3734),I=a(2585),D=a(1480),N=a(6242),P=a(6351),L=a(5941),re={"(":0,")":1,"*":2,"+":3,"-":1,".":2},oe=131072;function G(he,B){if(he>24)return B.setWinLines||!1;switch(he){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var $;(function(he){he[he.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",he[he.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})($||(r.WindowsOptionsReportType=$={}));let ue=0;class be extends S.Disposable{getAttrData(){return this._curAttrData}constructor(B,X,se,ce,ke,ze,Ke,Qe,ye=new _.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=X,this._coreService=se,this._logService=ce,this._optionsService=ke,this._oscLinkService=ze,this._coreMouseService=Ke,this._unicodeService=Qe,this._parser=ye,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new M.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new M.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new M.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new M.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new M.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new M.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new M.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new M.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new M.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new M.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new M.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new me(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(q=>this._activeBuffer=q.activeBuffer)),this._parser.setCsiHandlerFallback((q,Oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:Oe.toArray()})}),this._parser.setEscHandlerFallback(q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})}),this._parser.setExecuteHandlerFallback(q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})}),this._parser.setOscHandlerFallback((q,Oe,We)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:Oe,data:We})}),this._parser.setDcsHandlerFallback((q,Oe,We)=>{Oe==="HOOK"&&(We=We.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:Oe,payload:We})}),this._parser.setPrintHandler((q,Oe,We)=>this.print(q,Oe,We)),this._parser.registerCsiHandler({final:"@"},q=>this.insertChars(q)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},q=>this.scrollLeft(q)),this._parser.registerCsiHandler({final:"A"},q=>this.cursorUp(q)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},q=>this.scrollRight(q)),this._parser.registerCsiHandler({final:"B"},q=>this.cursorDown(q)),this._parser.registerCsiHandler({final:"C"},q=>this.cursorForward(q)),this._parser.registerCsiHandler({final:"D"},q=>this.cursorBackward(q)),this._parser.registerCsiHandler({final:"E"},q=>this.cursorNextLine(q)),this._parser.registerCsiHandler({final:"F"},q=>this.cursorPrecedingLine(q)),this._parser.registerCsiHandler({final:"G"},q=>this.cursorCharAbsolute(q)),this._parser.registerCsiHandler({final:"H"},q=>this.cursorPosition(q)),this._parser.registerCsiHandler({final:"I"},q=>this.cursorForwardTab(q)),this._parser.registerCsiHandler({final:"J"},q=>this.eraseInDisplay(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},q=>this.eraseInDisplay(q,!0)),this._parser.registerCsiHandler({final:"K"},q=>this.eraseInLine(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},q=>this.eraseInLine(q,!0)),this._parser.registerCsiHandler({final:"L"},q=>this.insertLines(q)),this._parser.registerCsiHandler({final:"M"},q=>this.deleteLines(q)),this._parser.registerCsiHandler({final:"P"},q=>this.deleteChars(q)),this._parser.registerCsiHandler({final:"S"},q=>this.scrollUp(q)),this._parser.registerCsiHandler({final:"T"},q=>this.scrollDown(q)),this._parser.registerCsiHandler({final:"X"},q=>this.eraseChars(q)),this._parser.registerCsiHandler({final:"Z"},q=>this.cursorBackwardTab(q)),this._parser.registerCsiHandler({final:"`"},q=>this.charPosAbsolute(q)),this._parser.registerCsiHandler({final:"a"},q=>this.hPositionRelative(q)),this._parser.registerCsiHandler({final:"b"},q=>this.repeatPrecedingCharacter(q)),this._parser.registerCsiHandler({final:"c"},q=>this.sendDeviceAttributesPrimary(q)),this._parser.registerCsiHandler({prefix:">",final:"c"},q=>this.sendDeviceAttributesSecondary(q)),this._parser.registerCsiHandler({final:"d"},q=>this.linePosAbsolute(q)),this._parser.registerCsiHandler({final:"e"},q=>this.vPositionRelative(q)),this._parser.registerCsiHandler({final:"f"},q=>this.hVPosition(q)),this._parser.registerCsiHandler({final:"g"},q=>this.tabClear(q)),this._parser.registerCsiHandler({final:"h"},q=>this.setMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"h"},q=>this.setModePrivate(q)),this._parser.registerCsiHandler({final:"l"},q=>this.resetMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"l"},q=>this.resetModePrivate(q)),this._parser.registerCsiHandler({final:"m"},q=>this.charAttributes(q)),this._parser.registerCsiHandler({final:"n"},q=>this.deviceStatus(q)),this._parser.registerCsiHandler({prefix:"?",final:"n"},q=>this.deviceStatusPrivate(q)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},q=>this.softReset(q)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},q=>this.setCursorStyle(q)),this._parser.registerCsiHandler({final:"r"},q=>this.setScrollRegion(q)),this._parser.registerCsiHandler({final:"s"},q=>this.saveCursor(q)),this._parser.registerCsiHandler({final:"t"},q=>this.windowOptions(q)),this._parser.registerCsiHandler({final:"u"},q=>this.restoreCursor(q)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},q=>this.insertColumns(q)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},q=>this.deleteColumns(q)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},q=>this.selectProtected(q)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},q=>this.requestMode(q,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},q=>this.requestMode(q,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new N.OscHandler(q=>(this.setTitle(q),this.setIconName(q),!0))),this._parser.registerOscHandler(1,new N.OscHandler(q=>this.setIconName(q))),this._parser.registerOscHandler(2,new N.OscHandler(q=>this.setTitle(q))),this._parser.registerOscHandler(4,new N.OscHandler(q=>this.setOrReportIndexedColor(q))),this._parser.registerOscHandler(8,new N.OscHandler(q=>this.setHyperlink(q))),this._parser.registerOscHandler(10,new N.OscHandler(q=>this.setOrReportFgColor(q))),this._parser.registerOscHandler(11,new N.OscHandler(q=>this.setOrReportBgColor(q))),this._parser.registerOscHandler(12,new N.OscHandler(q=>this.setOrReportCursorColor(q))),this._parser.registerOscHandler(104,new N.OscHandler(q=>this.restoreIndexedColor(q))),this._parser.registerOscHandler(110,new N.OscHandler(q=>this.restoreFgColor(q))),this._parser.registerOscHandler(111,new N.OscHandler(q=>this.restoreBgColor(q))),this._parser.registerOscHandler(112,new N.OscHandler(q=>this.restoreCursorColor(q))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let q in h.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},()=>this.selectCharset("("+q)),this._parser.registerEscHandler({intermediates:")",final:q},()=>this.selectCharset(")"+q)),this._parser.registerEscHandler({intermediates:"*",final:q},()=>this.selectCharset("*"+q)),this._parser.registerEscHandler({intermediates:"+",final:q},()=>this.selectCharset("+"+q)),this._parser.registerEscHandler({intermediates:"-",final:q},()=>this.selectCharset("-"+q)),this._parser.registerEscHandler({intermediates:".",final:q},()=>this.selectCharset("."+q)),this._parser.registerEscHandler({intermediates:"/",final:q},()=>this.selectCharset("/"+q));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(q=>(this._logService.error("Parsing error: ",q),q)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new P.DcsHandler((q,Oe)=>this.requestStatusString(q,Oe)))}_preserveStack(B,X,se,ce){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=X,this._parseStack.decodedLength=se,this._parseStack.position=ce}_logSlowResolvingAsync(B){this._logService.logLevel<=I.LogLevelEnum.WARN&&Promise.race([B,new Promise((X,se)=>setTimeout(()=>se("#SLOW_TIMEOUT"),5e3))]).catch(X=>{if(X!=="#SLOW_TIMEOUT")throw X;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(B,X){let se,ce=this._activeBuffer.x,ke=this._activeBuffer.y,ze=0,Ke=this._parseStack.paused;if(Ke){if(se=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,X))return this._logSlowResolvingAsync(se),se;ce=this._parseStack.cursorStartX,ke=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>oe&&(ze=this._parseStack.position+oe)}if(this._logService.logLevel<=I.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,q=>String.fromCharCode(q)).join("")}"`),typeof B=="string"?B.split("").map(q=>q.charCodeAt(0)):B),this._parseBuffer.lengthoe)for(let q=ze;q0&&We.getWidth(this._activeBuffer.x-1)===2&&We.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Oe);let ct=this._parser.precedingJoinState;for(let Tt=X;TtQe){if(ye){let Br=We,Rn=this._activeBuffer.x-_o;for(this._activeBuffer.x=_o,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),We=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),_o>0&&We instanceof b.BufferLine&&We.copyCellsFrom(Br,Rn,0,_o,!1);Rn=0;)We.setCellFromCodepoint(this._activeBuffer.x++,0,0,Oe)}else if(q&&(We.insertCells(this._activeBuffer.x,ke-_o,this._activeBuffer.getNullCell(Oe)),We.getWidth(Qe-1)===2&&We.setCellFromCodepoint(Qe-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,Oe)),We.setCellFromCodepoint(this._activeBuffer.x++,ce,ke,Oe),ke>0)for(;--ke;)We.setCellFromCodepoint(this._activeBuffer.x++,0,0,Oe)}this._parser.precedingJoinState=ct,this._activeBuffer.x0&&We.getWidth(this._activeBuffer.x)===0&&!We.hasContent(this._activeBuffer.x)&&We.setCellFromCodepoint(this._activeBuffer.x,0,1,Oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,X){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,X):this._parser.registerCsiHandler(B,se=>!G(se.params[0],this._optionsService.rawOptions.windowOptions)||X(se))}registerDcsHandler(B,X){return this._parser.registerDcsHandler(B,new P.DcsHandler(X))}registerEscHandler(B,X){return this._parser.registerEscHandler(B,X)}registerOscHandler(B,X){return this._parser.registerOscHandler(B,new N.OscHandler(X))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(B,X){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+X):(this._activeBuffer.x=B,this._activeBuffer.y=X),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,X){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+X)}cursorUp(B){let X=this._activeBuffer.y-this._activeBuffer.scrollTop;return X>=0?this._moveCursor(0,-Math.min(X,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){let X=this._activeBuffer.scrollBottom-this._activeBuffer.y;return X>=0?this._moveCursor(0,Math.min(X,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){let X=B.params[0];return X===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:X===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let X=B.params[0]||1;for(;X--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let X=B.params[0]||1;for(;X--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){let X=B.params[0];return X===1&&(this._curAttrData.bg|=536870912),X!==2&&X!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,X,se,ce=!1,ke=!1){let ze=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);ze.replaceCells(X,se,this._activeBuffer.getNullCell(this._eraseAttrData()),ke),ce&&(ze.isWrapped=!1)}_resetBufferLine(B,X=!1){let se=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);se&&(se.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),X),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),se.isWrapped=!1)}eraseInDisplay(B,X=!1){let se;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(se=this._activeBuffer.y,this._dirtyRowTracker.markDirty(se),this._eraseInBufferLine(se++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,X);se=this._bufferService.cols&&(this._activeBuffer.lines.get(se+1).isWrapped=!1);se--;)this._resetBufferLine(se,X);this._dirtyRowTracker.markDirty(0);break;case 2:for(se=this._bufferService.rows,this._dirtyRowTracker.markDirty(se-1);se--;)this._resetBufferLine(se,X);this._dirtyRowTracker.markDirty(0);break;case 3:let ce=this._activeBuffer.lines.length-this._bufferService.rows;ce>0&&(this._activeBuffer.lines.trimStart(ce),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-ce,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-ce,0),this._onScroll.fire(0))}return!0}eraseInLine(B,X=!1){switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,X);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,X);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,X)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(B){this._restrictCursor();let X=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let ye=Qe;for(let q=1;q0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let X=0;XIo?1:2,ct=B.params[0];return Tt=ct,Xn=X?ct===2?4:ct===4?We(ze.modes.insertMode):ct===12?3:ct===20?We(Oe.convertEol):0:ct===1?We(se.applicationCursorKeys):ct===3?Oe.windowOptions.setWinLines?Qe===80?2:Qe===132?1:0:0:ct===6?We(se.origin):ct===7?We(se.wraparound):ct===8?3:ct===9?We(ce==="X10"):ct===12?We(Oe.cursorBlink):ct===25?We(!ze.isCursorHidden):ct===45?We(se.reverseWraparound):ct===66?We(se.applicationKeypad):ct===67?4:ct===1e3?We(ce==="VT200"):ct===1002?We(ce==="DRAG"):ct===1003?We(ce==="ANY"):ct===1004?We(se.sendFocus):ct===1005?4:ct===1006?We(ke==="SGR"):ct===1015?4:ct===1016?We(ke==="SGR_PIXELS"):ct===1048?1:ct===47||ct===1047||ct===1049?We(ye===q):ct===2004?We(se.bracketedPasteMode):0,ze.triggerDataEvent(`${u.C0.ESC}[${X?"":"?"}${Tt};${Xn}$y`),!0;var Tt,Xn}_updateAttrColor(B,X,se,ce,ke){return X===2?(B|=50331648,B&=-16777216,B|=E.AttributeData.fromColorRGB([se,ce,ke])):X===5&&(B&=-50331904,B|=33554432|255&se),B}_extractColor(B,X,se){let ce=[0,0,-1,0,0,0],ke=0,ze=0;do{if(ce[ze+ke]=B.params[X+ze],B.hasSubParams(X+ze)){let Ke=B.getSubParams(X+ze),Qe=0;do ce[1]===5&&(ke=1),ce[ze+Qe+1+ke]=Ke[Qe];while(++Qe=2||ce[1]===2&&ze+ke>=5)break;ce[1]&&(ke=1)}while(++ze+X5)&&(B=1),X.extended.underlineStyle=B,X.fg|=268435456,B===0&&(X.fg&=-268435457),X.updateExtended()}_processSGR0(B){B.fg=b.DEFAULT_ATTR_DATA.fg,B.bg=b.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;let X=B.length,se,ce=this._curAttrData;for(let ke=0;ke=30&&se<=37?(ce.fg&=-50331904,ce.fg|=16777216|se-30):se>=40&&se<=47?(ce.bg&=-50331904,ce.bg|=16777216|se-40):se>=90&&se<=97?(ce.fg&=-50331904,ce.fg|=16777224|se-90):se>=100&&se<=107?(ce.bg&=-50331904,ce.bg|=16777224|se-100):se===0?this._processSGR0(ce):se===1?ce.fg|=134217728:se===3?ce.bg|=67108864:se===4?(ce.fg|=268435456,this._processUnderline(B.hasSubParams(ke)?B.getSubParams(ke)[0]:1,ce)):se===5?ce.fg|=536870912:se===7?ce.fg|=67108864:se===8?ce.fg|=1073741824:se===9?ce.fg|=2147483648:se===2?ce.bg|=134217728:se===21?this._processUnderline(2,ce):se===22?(ce.fg&=-134217729,ce.bg&=-134217729):se===23?ce.bg&=-67108865:se===24?(ce.fg&=-268435457,this._processUnderline(0,ce)):se===25?ce.fg&=-536870913:se===27?ce.fg&=-67108865:se===28?ce.fg&=-1073741825:se===29?ce.fg&=2147483647:se===39?(ce.fg&=-67108864,ce.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):se===49?(ce.bg&=-67108864,ce.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):se===38||se===48||se===58?ke+=this._extractColor(B,ke,ce):se===53?ce.bg|=1073741824:se===55?ce.bg&=-1073741825:se===59?(ce.extended=ce.extended.clone(),ce.extended.underlineColor=-1,ce.updateExtended()):se===100?(ce.fg&=-67108864,ce.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,ce.bg&=-67108864,ce.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",se);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:let X=this._activeBuffer.y+1,se=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${X};${se}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){let X=this._activeBuffer.y+1,se=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${X};${se}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(B){let X=B.params[0]||1;switch(X){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}let se=X%2==1;return this._optionsService.options.cursorBlink=se,!0}setScrollRegion(B){let X=B.params[0]||1,se;return(B.length<2||(se=B.params[1])>this._bufferService.rows||se===0)&&(se=this._bufferService.rows),se>X&&(this._activeBuffer.scrollTop=X-1,this._activeBuffer.scrollBottom=se-1,this._setCursor(0,0)),!0}windowOptions(B){if(!G(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;let X=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:X!==2&&this._onRequestWindowsOptionsReport.fire($.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire($.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:X!==0&&X!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),X!==0&&X!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:X!==0&&X!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),X!==0&&X!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(B){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(B){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){let X=[],se=B.split(";");for(;se.length>1;){let ce=se.shift(),ke=se.shift();if(/^\d+$/.exec(ce)){let ze=parseInt(ce);if(De(ze))if(ke==="?")X.push({type:0,index:ze});else{let Ke=(0,L.parseColor)(ke);Ke&&X.push({type:1,index:ze,color:Ke})}}}return X.length&&this._onColor.fire(X),!0}setHyperlink(B){let X=B.split(";");return!(X.length<2)&&(X[1]?this._createHyperlink(X[0],X[1]):!X[0]&&this._finishHyperlink())}_createHyperlink(B,X){this._getCurrentLinkId()&&this._finishHyperlink();let se=B.split(":"),ce,ke=se.findIndex(ze=>ze.startsWith("id="));return ke!==-1&&(ce=se[ke].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:ce,uri:X}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(B,X){let se=B.split(";");for(let ce=0;ce=this._specialColors.length);++ce,++X)if(se[ce]==="?")this._onColor.fire([{type:0,index:this._specialColors[X]}]);else{let ke=(0,L.parseColor)(se[ce]);ke&&this._onColor.fire([{type:1,index:this._specialColors[X],color:ke}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;let X=[],se=B.split(";");for(let ce=0;ce=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){let B=new y.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let X=0;X(this._coreService.triggerDataEvent(`${u.C0.ESC}${ke}${u.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${se.scrollTop+1};${se.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[ce.cursorStyle]-(ce.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,X){this._dirtyRowTracker.markRangeDirty(B,X)}}r.InputHandler=be;let me=class{constructor(he){this._bufferService=he,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(he){hethis.end&&(this.end=he)}markRangeDirty(he,B){he>B&&(ue=he,he=B,B=ue),hethis.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function De(he){return 0<=he&&he<256}me=c([p(0,I.IBufferService)],me)},844:(o,r)=>{function a(c){for(let p of c)p.dispose();c.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(let c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){let p=this._disposables.indexOf(c);p!==-1&&this._disposables.splice(p,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){this._isDisposed||c===this._value||(this._value?.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},r.toDisposable=function(c){return{dispose:c}},r.disposeArray=a,r.getDisposeArrayDisposable=function(c){return{dispose:()=>a(c)}}},1505:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(p,u,h){this._data[p]||(this._data[p]={}),this._data[p][u]=h}get(p,u){return this._data[p]?this._data[p][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=a,r.FourKeyMap=class{constructor(){this._data=new a}set(c,p,u,h,_){this._data.get(c,p)||this._data.set(c,p,new a),this._data.get(c,p).set(u,h,_)}get(c,p,u,h){return this._data.get(c,p)?.get(u,h)}clear(){this._data.clear()}}},6114:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;let a=r.isNode?"node":navigator.userAgent,c=r.isNode?"node":navigator.platform;r.isFirefox=a.includes("Firefox"),r.isLegacyEdge=a.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(a),r.getSafariVersion=function(){if(!r.isSafari)return 0;let p=a.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),r.isIpad=c==="iPad",r.isIphone=c==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),r.isLinux=c.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(a)},6106:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let a=0;r.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(a=this._search(this._getKey(c)),this._array.splice(a,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;let p=this._getKey(c);if(p===void 0||(a=this._search(p),a===-1)||this._getKey(this._array[a])!==p)return!1;do if(this._array[a]===c)return this._array.splice(a,1),!0;while(++a=this._array.length)&&this._getKey(this._array[a])===c))do yield this._array[a];while(++a=this._array.length)&&this._getKey(this._array[a])===c))do p(this._array[a]);while(++a=p;){let h=p+u>>1,_=this._getKey(this._array[h]);if(_>c)u=h-1;else{if(!(_0&&this._getKey(this._array[h-1])===c;)h--;return h}p=h+1}}return p}}},7226:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;let c=a(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(_){this._tasks.push(_),this._start()}flush(){for(;this._iM)return b-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-S))}ms`),void this._start();b=M}this.clear()}}class u extends p{_requestCallback(_){return setTimeout(()=>_(this._createDeadline(16)))}_cancelCallback(_){clearTimeout(_)}_createDeadline(_){let S=Date.now()+_;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},9282:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;let c=a(643);r.updateWindowsModeWrappedState=function(p){let u=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),h=u?.get(p.cols-1),_=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);_&&h&&(_.isWrapped=h[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&h[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){let u=new a;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}r.AttributeData=a;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){let u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,h=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=h}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=c},9092:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;let c=a(6349),p=a(7226),u=a(3734),h=a(8437),_=a(4634),S=a(511),x=a(643),b=a(4863),M=a(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(w,y,E){this._hasScrollback=w,this._optionsService=y,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=h.DEFAULT_ATTR_DATA.clone(),this.savedCharset=M.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new h.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let w=this.ybase+this.y-this.ydisp;return w>=0&&wr.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=h.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,y){let E=this.getNullCell(h.DEFAULT_ATTR_DATA),I=0,D=this._getCorrectBufferLength(y);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+N+1?(this.ybase--,N++,this.ydisp>0&&this.ydisp--):this.lines.push(new h.BufferLine(w,E)));else for(let P=this._rows;P>y;P--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D0&&(this.lines.trimStart(P),this.ybase=Math.max(this.ybase-P,0),this.ydisp=Math.max(this.ydisp-P,0),this.savedY=Math.max(this.savedY-P,0)),this.lines.maxLength=D}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),N&&(this.y+=N),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let N=0;N.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){let w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){let E=(0,_.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(E.length>0){let I=(0,_.reflowLargerCreateNewLayout)(this.lines,E);(0,_.reflowLargerApplyNewLayout)(this.lines,I.layout),this._reflowLargerAdjustViewport(w,y,I.countRemoved)}}_reflowLargerAdjustViewport(w,y,E){let I=this.getNullCell(h.DEFAULT_ATTR_DATA),D=E;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;N--){let P=this.lines.get(N);if(!P||!P.isWrapped&&P.getTrimmedLength()<=w)continue;let L=[P];for(;P.isWrapped&&N>0;)P=this.lines.get(--N),L.unshift(P);let re=this.ybase+this.y;if(re>=N&&re0&&(I.push({start:N+L.length+D,newLines:be}),D+=be.length),L.push(...be);let me=G.length-1,De=G[me];De===0&&(me--,De=G[me]);let he=L.length-$-1,B=oe;for(;he>=0;){let se=Math.min(B,De);if(L[me]===void 0)break;if(L[me].copyCellsFrom(L[he],B-se,De-se,se,!0),De-=se,De===0&&(me--,De=G[me]),B-=se,B===0){he--;let ce=Math.max(he,0);B=(0,_.getWrappedLineTrimmedLength)(L,ce,this._cols)}}for(let se=0;se0;)this.ybase===0?this.y0){let N=[],P=[];for(let me=0;me=0;me--)if(G&&G.start>re+$){for(let De=G.newLines.length-1;De>=0;De--)this.lines.set(me--,G.newLines[De]);me++,N.push({index:re+1,amount:G.newLines.length}),$+=G.newLines.length,G=I[++oe]}else this.lines.set(me,P[re--]);let ue=0;for(let me=N.length-1;me>=0;me--)N[me].index+=ue,this.lines.onInsertEmitter.fire(N[me]),ue+=N[me].amount;let be=Math.max(0,L+D-this.lines.maxLength);be>0&&this.lines.onTrimEmitter.fire(be)}}translateBufferLineToString(w,y,E=0,I){let D=this.lines.get(w);return D?D.translateToString(y,E,I):""}getWrappedRangeForLine(w){let y=w,E=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;E+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=E,y.line<0&&y.dispose()})),y.register(this.lines.onInsert(E=>{y.line>=E.index&&(y.line+=E.amount)})),y.register(this.lines.onDelete(E=>{y.line>=E.index&&y.lineE.index&&(y.line-=E.amount)})),y.register(y.onDispose(()=>this._removeMarker(y))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;let c=a(3734),p=a(511),u=a(643),h=a(482);r.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let _=0;class S{constructor(b,M,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);let y=M||p.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let E=0;E>22,2097152&M?this._combined[b].charCodeAt(this._combined[b].length-1):w]}set(b,M){this._data[3*b+1]=M[u.CHAR_DATA_ATTR_INDEX],M[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=M[1],this._data[3*b+0]=2097152|b|M[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=M[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|M[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){let M=this._data[3*b+0];return 2097152&M?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&M}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){let M=this._data[3*b+0];return 2097152&M?this._combined[b]:2097151&M?(0,h.stringFromCodePoint)(2097151&M):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,M){return _=3*b,M.content=this._data[_+0],M.fg=this._data[_+1],M.bg=this._data[_+2],2097152&M.content&&(M.combinedData=this._combined[b]),268435456&M.bg&&(M.extended=this._extendedAttrs[b]),M}setCell(b,M){2097152&M.content&&(this._combined[b]=M.combinedData),268435456&M.bg&&(this._extendedAttrs[b]=M.extended),this._data[3*b+0]=M.content,this._data[3*b+1]=M.fg,this._data[3*b+2]=M.bg}setCellFromCodepoint(b,M,w,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=M|w<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,M,w){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,h.stringFromCodePoint)(M):2097151&y?(this._combined[b]=(0,h.stringFromCodePoint)(2097151&y)+(0,h.stringFromCodePoint)(M),y&=-2097152,y|=2097152):y=M|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*b+0]=y}insertCells(b,M,w){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,w),M=0;--E)this.setCell(b+M+E,this.loadCell(b+E,y));for(let E=0;Ethis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{let y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=b&&delete this._combined[D]}let E=Object.keys(this._extendedAttrs);for(let I=0;I=b&&delete this._extendedAttrs[D]}}return this.length=b,4*w*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,M,w,y,E){let I=b._data;if(E)for(let N=y-1;N>=0;N--){for(let P=0;P<3;P++)this._data[3*(w+N)+P]=I[3*(M+N)+P];268435456&I[3*(M+N)+2]&&(this._extendedAttrs[w+N]=b._extendedAttrs[M+N])}else for(let N=0;N=M&&(this._combined[P-M+w]=b._combined[P])}}translateToString(b,M,w,y){M=M??0,w=w??this.length,b&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let E="";for(;M>22||1}return y&&y.push(M),E}}r.BufferLine=S},4841:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(a,c){if(a.start.y>a.end.y)throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return c*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(o,r)=>{function a(c,p,u){if(p===c.length-1)return c[p].getTrimmedLength();let h=!c[p].hasContent(u-1)&&c[p].getWidth(u-1)===1,_=c[p+1].getWidth(0)===2;return h&&_?u-1:u}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(c,p,u,h,_){let S=[];for(let x=0;x=x&&h0&&(P>y||w[P].getTrimmedLength()===0);P--)N++;N>0&&(S.push(x+w.length-N),S.push(N)),x+=w.length-1}return S},r.reflowLargerCreateNewLayout=function(c,p){let u=[],h=0,_=p[h],S=0;for(let x=0;xa(c,w,p)).reduce((M,w)=>M+w),S=0,x=0,b=0;for(;b<_;){if(_-bM&&(S-=M,x++);let w=c[x].getWidth(S-1)===2;w&&S--;let y=w?u-1:u;h.push(y),b+=y}return h},r.getWrappedLineTrimmedLength=a},5295:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;let c=a(8460),p=a(844),u=a(9092);class h extends p.Disposable{constructor(S,x){super(),this._optionsService=S,this._bufferService=x,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(S,x){this._normal.resize(S,x),this._alt.resize(S,x),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}r.BufferSet=h},511:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;let c=a(482),p=a(643),u=a(3734);class h extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(S){let x=new h;return x.setFromCharData(S),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(S[p.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(S[p.CHAR_DATA_CHAR_INDEX].length===2){let b=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){let M=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=M&&M<=57343?this.content=1024*(b-55296)+M-56320+65536|S[p.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[p.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=S[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=h},643:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;let c=a(8460),p=a(844);class u{get id(){return this._id}constructor(_){this.line=_,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(_){return this._disposables.push(_),_}}r.Marker=u,u._nextId=1},7116:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},r.CHARSETS.A={"#":"\xA3"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},r.CHARSETS.C=r.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},r.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},r.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},r.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},r.CHARSETS.E=r.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},r.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},r.CHARSETS.H=r.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(o,r)=>{var a,c,p;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=` `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL="\x7F"})(a||(r.C0=a={})),(function(u){u.PAD="\x80",u.HOP="\x81",u.BPH="\x82",u.NBH="\x83",u.IND="\x84",u.NEL="\x85",u.SSA="\x86",u.ESA="\x87",u.HTS="\x88",u.HTJ="\x89",u.VTS="\x8A",u.PLD="\x8B",u.PLU="\x8C",u.RI="\x8D",u.SS2="\x8E",u.SS3="\x8F",u.DCS="\x90",u.PU1="\x91",u.PU2="\x92",u.STS="\x93",u.CCH="\x94",u.MW="\x95",u.SPA="\x96",u.EPA="\x97",u.SOS="\x98",u.SGCI="\x99",u.SCI="\x9A",u.CSI="\x9B",u.ST="\x9C",u.OSC="\x9D",u.PM="\x9E",u.APC="\x9F"})(c||(r.C1=c={})),(function(u){u.ST=`${a.ESC}\\`})(p||(r.C1_ESCAPED=p={}))},7399:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;let c=a(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(u,h,_,S){let x={type:0,cancel:!1,key:void 0},b=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":c.C0.DEL,u.altKey&&(x.key=c.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=c.C0.ESC+"[Z";break}x.key=c.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,x.cancel=!0;break;case 27:x.key=c.C0.ESC,u.altKey&&(x.key=c.C0.ESC+c.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"D",x.key===c.C0.ESC+"[1;3D"&&(x.key=c.C0.ESC+(_?"b":"[1;5D"))):x.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"C",x.key===c.C0.ESC+"[1;3C"&&(x.key=c.C0.ESC+(_?"f":"[1;5C"))):x.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"A",_||x.key!==c.C0.ESC+"[1;3A"||(x.key=c.C0.ESC+"[1;5A")):x.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"B",_||x.key!==c.C0.ESC+"[1;3B"||(x.key=c.C0.ESC+"[1;5B")):x.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=c.C0.ESC+"[2~");break;case 46:x.key=b?c.C0.ESC+"[3;"+(b+1)+"~":c.C0.ESC+"[3~";break;case 36:x.key=b?c.C0.ESC+"[1;"+(b+1)+"H":h?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:x.key=b?c.C0.ESC+"[1;"+(b+1)+"F":h?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=c.C0.ESC+"[5;"+(b+1)+"~":x.key=c.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=c.C0.ESC+"[6;"+(b+1)+"~":x.key=c.C0.ESC+"[6~";break;case 112:x.key=b?c.C0.ESC+"[1;"+(b+1)+"P":c.C0.ESC+"OP";break;case 113:x.key=b?c.C0.ESC+"[1;"+(b+1)+"Q":c.C0.ESC+"OQ";break;case 114:x.key=b?c.C0.ESC+"[1;"+(b+1)+"R":c.C0.ESC+"OR";break;case 115:x.key=b?c.C0.ESC+"[1;"+(b+1)+"S":c.C0.ESC+"OS";break;case 116:x.key=b?c.C0.ESC+"[15;"+(b+1)+"~":c.C0.ESC+"[15~";break;case 117:x.key=b?c.C0.ESC+"[17;"+(b+1)+"~":c.C0.ESC+"[17~";break;case 118:x.key=b?c.C0.ESC+"[18;"+(b+1)+"~":c.C0.ESC+"[18~";break;case 119:x.key=b?c.C0.ESC+"[19;"+(b+1)+"~":c.C0.ESC+"[19~";break;case 120:x.key=b?c.C0.ESC+"[20;"+(b+1)+"~":c.C0.ESC+"[20~";break;case 121:x.key=b?c.C0.ESC+"[21;"+(b+1)+"~":c.C0.ESC+"[21~";break;case 122:x.key=b?c.C0.ESC+"[23;"+(b+1)+"~":c.C0.ESC+"[23~";break;case 123:x.key=b?c.C0.ESC+"[24;"+(b+1)+"~":c.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(_&&!S||!u.altKey||u.metaKey)!_||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=c.C0.US),u.key==="@"&&(x.key=c.C0.NUL)):u.keyCode===65&&(x.type=1);else{let M=p[u.keyCode],w=M?.[u.shiftKey?1:0];if(w)x.key=c.C0.ESC+w;else if(u.keyCode>=65&&u.keyCode<=90){let y=u.ctrlKey?u.keyCode-64:u.keyCode+32,E=String.fromCharCode(y);u.shiftKey&&(E=E.toUpperCase()),x.key=c.C0.ESC+E}else if(u.keyCode===32)x.key=c.C0.ESC+(u.ctrlKey?c.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let y=u.code.slice(3,4);u.shiftKey||(y=y.toLowerCase()),x.key=c.C0.ESC+y,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=c.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=c.C0.DEL:u.keyCode===219?x.key=c.C0.ESC:u.keyCode===220?x.key=c.C0.FS:u.keyCode===221&&(x.key=c.C0.GS)}return x}},482:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},r.utf32ToString=function(a,c=0,p=a.length){let u="";for(let h=c;h65535?(_-=65536,u+=String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):u+=String.fromCharCode(_)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,c){let p=a.length;if(!p)return 0;let u=0,h=0;if(this._interim){let _=a.charCodeAt(h++);56320<=_&&_<=57343?c[u++]=1024*(this._interim-55296)+_-56320+65536:(c[u++]=this._interim,c[u++]=_),this._interim=0}for(let _=h;_=p)return this._interim=S,u;let x=a.charCodeAt(_);56320<=x&&x<=57343?c[u++]=1024*(S-55296)+x-56320+65536:(c[u++]=S,c[u++]=x)}else S!==65279&&(c[u++]=S)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,c){let p=a.length;if(!p)return 0;let u,h,_,S,x=0,b=0,M=0;if(this.interim[0]){let E=!1,I=this.interim[0];I&=(224&I)==192?31:(240&I)==224?15:7;let D,N=0;for(;(D=63&this.interim[++N])&&N<4;)I<<=6,I|=D;let P=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=P-N;for(;M=p)return 0;if(D=a[M++],(192&D)!=128){M--,E=!0;break}this.interim[N++]=D,I<<=6,I|=63&D}E||(P===2?I<128?M--:c[x++]=I:P===3?I<2048||I>=55296&&I<=57343||I===65279||(c[x++]=I):I<65536||I>1114111||(c[x++]=I)),this.interim.fill(0)}let w=p-4,y=M;for(;y=p)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(b=(31&u)<<6|63&h,b<128){y--;continue}c[x++]=b}else if((240&u)==224){if(y>=p)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=h,x;if(_=a[y++],(192&_)!=128){y--;continue}if(b=(15&u)<<12|(63&h)<<6|63&_,b<2048||b>=55296&&b<=57343||b===65279)continue;c[x++]=b}else if((248&u)==240){if(y>=p)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=h,x;if(_=a[y++],(192&_)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=h,this.interim[2]=_,x;if(S=a[y++],(192&S)!=128){y--;continue}if(b=(7&u)<<18|(63&h)<<12|(63&_)<<6|63&S,b<65536||b>1114111)continue;c[x++]=b}}return x}}},225:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;let c=a(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],h;r.UnicodeV6=class{constructor(){if(this.version="6",!h){h=new Uint8Array(65536),h.fill(1),h[0]=0,h.fill(0,1,32),h.fill(0,127,160),h.fill(2,4352,4448),h[9001]=2,h[9002]=2,h.fill(2,11904,42192),h[12351]=1,h.fill(2,44032,55204),h.fill(2,63744,64256),h.fill(2,65040,65050),h.fill(2,65072,65136),h.fill(2,65280,65377),h.fill(2,65504,65511);for(let _=0;_x[w][1])return!1;for(;w>=M;)if(b=M+w>>1,S>x[b][1])M=b+1;else{if(!(S=131072&&_<=196605||_>=196608&&_<=262141?2:1}charProperties(_,S){let x=this.wcwidth(_),b=x===0&&S!==0;if(b){let M=c.UnicodeService.extractWidth(S);M===0?b=!1:M>x&&(x=M)}return c.UnicodeService.createPropertyValue(0,x,b)}}},5981:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;let c=a(8460),p=a(844);class u extends p.Disposable{constructor(_){super(),this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(_,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);let b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(_,S){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(S),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(S)}_innerWrite(_=0,S=!0){let x=_||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){let b=this._writeBuffer[this._bufferOffset],M=this._action(b,S);if(M){let y=E=>Date.now()-x>=12?setTimeout(()=>this._innerWrite(0,E)):this._innerWrite(x,E);return void M.catch(E=>(queueMicrotask(()=>{throw E}),Promise.resolve(!1))).then(y)}let w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=b.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=u},5941:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;let a=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function p(u,h){let _=u.toString(16),S=_.length<2?"0"+_:_;switch(h){case 4:return _[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}r.parseColor=function(u){if(!u)return;let h=u.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);let _=a.exec(h);if(_){let S=_[1]?15:_[4]?255:_[7]?4095:65535;return[Math.round(parseInt(_[1]||_[4]||_[7]||_[10],16)/S*255),Math.round(parseInt(_[2]||_[5]||_[8]||_[11],16)/S*255),Math.round(parseInt(_[3]||_[6]||_[9]||_[12],16)/S*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),c.exec(h)&&[3,6,9,12].includes(h.length))){let _=h.length/3,S=[0,0,0];for(let x=0;x<3;++x){let b=parseInt(h.slice(_*x,_*x+_),16);S[x]=_===1?b<<4:_===2?b:_===3?b>>4:b>>8}return S}},r.toRgbString=function(u,h=16){let[_,S,x]=u;return`rgb:${p(_,h)}/${p(S,h)}/${p(x,h)}`}},5770:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;let c=a(482),p=a(8742),u=a(5770),h=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}registerHandler(S,x){this._handlers[S]===void 0&&(this._handlers[S]=[]);let b=this._handlers[S];return b.push(x),{dispose:()=>{let M=b.indexOf(x);M!==-1&&b.splice(M,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(S,x){if(this.reset(),this._ident=S,this._active=this._handlers[S]||h,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(S,x,b){if(this._active.length)for(let M=this._active.length-1;M>=0;M--)this._active[M].put(S,x,b);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(S,x,b))}unhook(S,x=!0){if(this._active.length){let b=!1,M=this._active.length-1,w=!1;if(this._stack.paused&&(M=this._stack.loopPosition-1,b=x,w=this._stack.fallThrough,this._stack.paused=!1),!w&&b===!1){for(;M>=0&&(b=this._active[M].unhook(S),b!==!0);M--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!1,b;M--}for(;M>=0;M--)if(b=this._active[M].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",S);this._active=h,this._ident=0}};let _=new p.Params;_.addParam(0),r.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=_,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():_,this._data="",this._hitLimit=!1}put(S,x,b){this._hitLimit||(this._data+=(0,c.utf32ToString)(S,x,b),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let x=!1;if(this._hitLimit)x=!1;else if(S&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then(b=>(this._params=_,this._data="",this._hitLimit=!1,b));return this._params=_,this._data="",this._hitLimit=!1,x}}},2015:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;let c=a(844),p=a(8742),u=a(6242),h=a(6351);class _{constructor(M){this.table=new Uint8Array(M)}setDefault(M,w){this.table.fill(M<<4|w)}add(M,w,y,E){this.table[w<<8|M]=y<<4|E}addMany(M,w,y,E){for(let I=0;IP),w=(N,P)=>M.slice(N,P),y=w(32,127),E=w(0,24);E.push(25),E.push.apply(E,w(28,32));let I=w(0,14),D;for(D in b.setDefault(1,0),b.addMany(y,0,2,0),I)b.addMany([24,26,153,154],D,3,0),b.addMany(w(128,144),D,3,0),b.addMany(w(144,152),D,3,0),b.add(156,D,0,0),b.add(27,D,11,1),b.add(157,D,4,8),b.addMany([152,158,159],D,0,7),b.add(155,D,11,3),b.add(144,D,11,9);return b.addMany(E,0,3,0),b.addMany(E,1,3,1),b.add(127,1,0,1),b.addMany(E,8,0,8),b.addMany(E,3,3,3),b.add(127,3,0,3),b.addMany(E,4,3,4),b.add(127,4,0,4),b.addMany(E,6,3,6),b.addMany(E,5,3,5),b.add(127,5,0,5),b.addMany(E,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(w(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(E,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(w(64,127),3,7,0),b.addMany(w(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(w(48,60),4,8,4),b.addMany(w(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(w(32,64),6,0,6),b.add(127,6,0,6),b.addMany(w(64,127),6,0,0),b.addMany(w(32,48),3,9,5),b.addMany(w(32,48),5,9,5),b.addMany(w(48,64),5,0,6),b.addMany(w(64,127),5,7,0),b.addMany(w(32,48),4,9,5),b.addMany(w(32,48),1,9,2),b.addMany(w(32,48),2,9,2),b.addMany(w(48,127),2,10,0),b.addMany(w(48,80),1,10,0),b.addMany(w(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(w(96,127),1,10,0),b.add(80,1,11,9),b.addMany(E,9,0,9),b.add(127,9,0,9),b.addMany(w(28,32),9,0,9),b.addMany(w(32,48),9,9,12),b.addMany(w(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(E,11,0,11),b.addMany(w(32,128),11,0,11),b.addMany(w(28,32),11,0,11),b.addMany(E,10,0,10),b.add(127,10,0,10),b.addMany(w(28,32),10,0,10),b.addMany(w(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(w(32,48),10,9,12),b.addMany(E,12,0,12),b.add(127,12,0,12),b.addMany(w(28,32),12,0,12),b.addMany(w(32,48),12,9,12),b.addMany(w(48,64),12,0,11),b.addMany(w(64,127),12,12,13),b.addMany(w(64,127),10,12,13),b.addMany(w(64,127),9,12,13),b.addMany(E,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(S,0,2,0),b.add(S,8,5,8),b.add(S,6,0,6),b.add(S,11,0,11),b.add(S,13,13,13),b})();class x extends c.Disposable{constructor(M=r.VT500_TRANSITION_TABLE){super(),this._transitions=M,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,E)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new h.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(M,w=[64,126]){let y=0;if(M.prefix){if(M.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=M.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(M.intermediates){if(M.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let I=0;ID||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=D}}if(M.final.length!==1)throw new Error("final must be a single byte");let E=M.final.charCodeAt(0);if(w[0]>E||E>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=E,y}identToString(M){let w=[];for(;M;)w.push(String.fromCharCode(255&M)),M>>=8;return w.reverse().join("")}setPrintHandler(M){this._printHandler=M}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(M,w){let y=this._identifier(M,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);let E=this._escHandlers[y];return E.push(w),{dispose:()=>{let I=E.indexOf(w);I!==-1&&E.splice(I,1)}}}clearEscHandler(M){this._escHandlers[this._identifier(M,[48,126])]&&delete this._escHandlers[this._identifier(M,[48,126])]}setEscHandlerFallback(M){this._escHandlerFb=M}setExecuteHandler(M,w){this._executeHandlers[M.charCodeAt(0)]=w}clearExecuteHandler(M){this._executeHandlers[M.charCodeAt(0)]&&delete this._executeHandlers[M.charCodeAt(0)]}setExecuteHandlerFallback(M){this._executeHandlerFb=M}registerCsiHandler(M,w){let y=this._identifier(M);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);let E=this._csiHandlers[y];return E.push(w),{dispose:()=>{let I=E.indexOf(w);I!==-1&&E.splice(I,1)}}}clearCsiHandler(M){this._csiHandlers[this._identifier(M)]&&delete this._csiHandlers[this._identifier(M)]}setCsiHandlerFallback(M){this._csiHandlerFb=M}registerDcsHandler(M,w){return this._dcsParser.registerHandler(this._identifier(M),w)}clearDcsHandler(M){this._dcsParser.clearHandler(this._identifier(M))}setDcsHandlerFallback(M){this._dcsParser.setHandlerFallback(M)}registerOscHandler(M,w){return this._oscParser.registerHandler(M,w)}clearOscHandler(M){this._oscParser.clearHandler(M)}setOscHandlerFallback(M){this._oscParser.setHandlerFallback(M)}setErrorHandler(M){this._errorHandler=M}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(M,w,y,E,I){this._parseStack.state=M,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=E,this._parseStack.chunkPos=I}parse(M,w,y){let E,I=0,D=0,N=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,N=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let P=this._parseStack.handlers,L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&L>-1){for(;L>=0&&(E=P[L](this._params),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 4:if(y===!1&&L>-1){for(;L>=0&&(E=P[L](),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 6:if(I=M[this._parseStack.chunkPos],E=this._dcsParser.unhook(I!==24&&I!==26,y),E)return E;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(I=M[this._parseStack.chunkPos],E=this._oscParser.end(I!==24&&I!==26,y),E)return E;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,N=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let P=N;P>4){case 2:for(let $=P+1;;++$){if($>=w||(I=M[$])<32||I>126&&I=w||(I=M[$])<32||I>126&&I=w||(I=M[$])<32||I>126&&I=w||(I=M[$])<32||I>126&&I=0&&(E=L[re](this._params),E!==!0);re--)if(E instanceof Promise)return this._preserveStack(3,L,re,D,P),E;re<0&&this._csiHandlerFb(this._collect<<8|I,this._params),this.precedingJoinState=0;break;case 8:do switch(I){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(I-48)}while(++P47&&I<60);P--;break;case 9:this._collect<<=8,this._collect|=I;break;case 10:let oe=this._escHandlers[this._collect<<8|I],G=oe?oe.length-1:-1;for(;G>=0&&(E=oe[G](),E!==!0);G--)if(E instanceof Promise)return this._preserveStack(4,oe,G,D,P),E;G<0&&this._escHandlerFb(this._collect<<8|I),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|I,this._params);break;case 13:for(let $=P+1;;++$)if($>=w||(I=M[$])===24||I===26||I===27||I>127&&I=w||(I=M[$])<32||I>127&&I{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;let c=a(5770),p=a(482),u=[];r.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(h,_){this._handlers[h]===void 0&&(this._handlers[h]=[]);let S=this._handlers[h];return S.push(_),{dispose:()=>{let x=S.indexOf(_);x!==-1&&S.splice(x,1)}}}clearHandler(h){this._handlers[h]&&delete this._handlers[h]}setHandlerFallback(h){this._handlerFb=h}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")}_put(h,_,S){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(h,_,S);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(h,_,S))}start(){this.reset(),this._state=1}put(h,_,S){if(this._state!==3){if(this._state===1)for(;_0&&this._put(h,_,S)}}end(h,_=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,x=this._active.length-1,b=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,S=_,b=this._stack.fallThrough,this._stack.paused=!1),!b&&S===!1){for(;x>=0&&(S=this._active[x].end(h),S!==!0);x--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,S;x--}for(;x>=0;x--)if(S=this._active[x].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",h);this._active=u,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(h){this._handler=h,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(h,_,S){this._hitLimit||(this._data+=(0,p.utf32ToString)(h,_,S),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let _=!1;if(this._hitLimit)_=!1;else if(h&&(_=this._handler(this._data),_ instanceof Promise))return _.then(S=>(this._data="",this._hitLimit=!1,S));return this._data="",this._hitLimit=!1,_}}},8742:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;let a=2147483647;class c{static fromArray(u){let h=new c;if(!u.length)return h;for(let _=Array.isArray(u[0])?1:0;_256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){let u=new c(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){let u=[];for(let h=0;h>8,S=255&this._subParamsIdx[h];S-_>0&&u.push(Array.prototype.slice.call(this._subParams,_,S))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>a?a:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>a?a:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){let h=this._subParamsIdx[u]>>8,_=255&this._subParamsIdx[u];return _-h>0?this._subParams.subarray(h,_):null}getSubParamsAll(){let u={};for(let h=0;h>8,S=255&this._subParamsIdx[h];S-_>0&&(u[h]=this._subParams.slice(_,S))}return u}addDigit(u){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let _=this._digitIsSub?this._subParams:this.params,S=_[h-1];_[h-1]=~S?Math.min(10*S+u,a):u}}r.Params=c},5741:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,c){let p={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(p),c.dispose=()=>this._wrappedAddonDispose(p),c.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let c=-1;for(let p=0;p{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;let c=a(3785),p=a(511);r.BufferApiView=class{constructor(u,h){this._buffer=u,this.type=h}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){let h=this._buffer.lines.get(u);if(h)return new c.BufferLineApiView(h)}getNullCell(){return new p.CellData}}},3785:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;let c=a(511);r.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,u){if(!(p<0||p>=this._line.length))return u?(this._line.loadCell(p,u),u):this._line.loadCell(p,new c.CellData)}translateToString(p,u,h){return this._line.translateToString(p,u,h)}}},8285:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;let c=a(8771),p=a(8460),u=a(844);class h extends u.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=h},7975:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,c){return this._core.registerCsiHandler(a,p=>c(p.toArray()))}addCsiHandler(a,c){return this.registerCsiHandler(a,c)}registerDcsHandler(a,c){return this._core.registerDcsHandler(a,(p,u)=>c(p,u.toArray()))}addDcsHandler(a,c){return this.registerDcsHandler(a,c)}registerEscHandler(a,c){return this._core.registerEscHandler(a,c)}addEscHandler(a,c){return this.registerEscHandler(a,c)}registerOscHandler(a,c){return this._core.registerOscHandler(a,c)}addOscHandler(a,c){return this.registerOscHandler(a,c)}}},7090:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}}},744:function(o,r,a){var c=this&&this.__decorate||function(b,M,w,y){var E,I=arguments.length,D=I<3?M:y===null?y=Object.getOwnPropertyDescriptor(M,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,M,w,y);else for(var N=b.length-1;N>=0;N--)(E=b[N])&&(D=(I<3?E(D):I>3?E(M,w,D):E(M,w))||D);return I>3&&D&&Object.defineProperty(M,w,D),D},p=this&&this.__param||function(b,M){return function(w,y){M(w,y,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;let u=a(8460),h=a(844),_=a(5295),S=a(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let x=r.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(b){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(b.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new _.BufferSet(b,this))}resize(b,M){this.cols=b,this.rows=M,this.buffers.resize(b,M),this._onResize.fire({cols:b,rows:M})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,M=!1){let w=this.buffer,y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=w.getBlankLine(b,M),this._cachedBlankLine=y),y.isWrapped=M;let E=w.ybase+w.scrollTop,I=w.ybase+w.scrollBottom;if(w.scrollTop===0){let D=w.lines.isFull;I===w.lines.length-1?D?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(I+1,0,y.clone()),D?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{let D=I-E+1;w.lines.shiftElements(E+1,D-1,-1),w.lines.set(I,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(b,M,w){let y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);let E=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),E!==y.ydisp&&(M||this._onScroll.fire(y.ydisp))}};r.BufferService=x=c([p(0,S.IOptionsService)],x)},7994:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,c){this._charsets[a]=c,this.glevel===a&&(this.charset=c)}}},1753:function(o,r,a){var c=this&&this.__decorate||function(y,E,I,D){var N,P=arguments.length,L=P<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,I):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,E,I,D);else for(var re=y.length-1;re>=0;re--)(N=y[re])&&(L=(P<3?N(L):P>3?N(E,I,L):N(E,I))||L);return P>3&&L&&Object.defineProperty(E,I,L),L},p=this&&this.__param||function(y,E){return function(I,D){E(I,D,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;let u=a(2585),h=a(8460),_=a(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,E){let I=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(I|=64,I|=y.action):(I|=3&y.button,4&y.button&&(I|=64),8&y.button&&(I|=128),y.action===32?I|=32:y.action!==0||E||(I|=3)),I}let b=String.fromCharCode,M={DEFAULT:y=>{let E=[x(y,!1)+32,y.col+32,y.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${b(E[0])}${b(E[1])}${b(E[2])}`},SGR:y=>{let E=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${E}`},SGR_PIXELS:y=>{let E=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${E}`}},w=r.CoreMouseService=class extends _.Disposable{constructor(y,E){super(),this._bufferService=y,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new h.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(let I of Object.keys(S))this.addProtocol(I,S[I]);for(let I of Object.keys(M))this.addEncoding(I,M[I]);this.reset()}addProtocol(y,E){this._protocols[y]=E}addEncoding(y,E){this._encodings[y]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;let E=this._encodings[this._activeEncoding](y);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,E,I){if(I){if(y.x!==E.x||y.y!==E.y)return!1}else if(y.col!==E.col||y.row!==E.row)return!1;return y.button===E.button&&y.action===E.action&&y.ctrl===E.ctrl&&y.alt===E.alt&&y.shift===E.shift}};r.CoreMouseService=w=c([p(0,u.IBufferService),p(1,u.ICoreService)],w)},6975:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;let u=a(1439),h=a(8460),_=a(844),S=a(2585),x=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),M=r.CoreService=class extends _.Disposable{constructor(w,y,E){super(),this._bufferService=w,this._logService=y,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new h.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new h.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(b)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(b)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;let E=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,()=>w.split("").map(I=>I.charCodeAt(0))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,()=>w.split("").map(y=>y.charCodeAt(0))),this._onBinary.fire(w))}};r.CoreService=M=c([p(0,S.IBufferService),p(1,S.ILogService),p(2,S.IOptionsService)],M)},9074:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;let c=a(8055),p=a(8460),u=a(844),h=a(6106),_=0,S=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new h.SortedList(w=>w?.marker.line),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(w){if(w.marker.isDisposed)return;let y=new b(w);if(y){let E=y.marker.onDispose(()=>y.dispose());y.onDispose(()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),E.dispose())}),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(let w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,E){let I=0,D=0;for(let N of this._decorations.getKeyIterator(y))I=N.options.x??0,D=I+(N.options.width??1),w>=I&&w{_=D.options.x??0,S=_+(D.options.width??1),w>=_&&w{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;let c=a(2585),p=a(8343);class u{constructor(..._){this._entries=new Map;for(let[S,x]of _)this.set(S,x)}set(_,S){let x=this._entries.get(_);return this._entries.set(_,S),x}forEach(_){for(let[S,x]of this._entries.entries())_(S,x)}has(_){return this._entries.has(_)}get(_){return this._entries.get(_)}}r.ServiceCollection=u,r.InstantiationService=class{constructor(){this._services=new u,this._services.set(c.IInstantiationService,this)}setService(h,_){this._services.set(h,_)}getService(h){return this._services.get(h)}createInstance(h,..._){let S=(0,p.getServiceDependencies)(h).sort((M,w)=>M.index-w.index),x=[];for(let M of S){let w=this._services.get(M.id);if(!w)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${M.id}.`);x.push(w)}let b=S.length>0?S[0].index:_.length;if(_.length!==b)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${b+1} conflicts with ${_.length} static arguments`);return new h(..._,...x)}}},7866:function(o,r,a){var c=this&&this.__decorate||function(b,M,w,y){var E,I=arguments.length,D=I<3?M:y===null?y=Object.getOwnPropertyDescriptor(M,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,M,w,y);else for(var N=b.length-1;N>=0;N--)(E=b[N])&&(D=(I<3?E(D):I>3?E(M,w,D):E(M,w))||D);return I>3&&D&&Object.defineProperty(M,w,D),D},p=this&&this.__param||function(b,M){return function(w,y){M(w,y,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;let u=a(844),h=a(2585),_={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},S,x=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),S=this}_updateLogLevel(){this._logLevel=_[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let M=0;MJSON.stringify(D)).join(", ")})`);let I=y.apply(this,E);return S.trace(`GlyphRenderer#${y.name} return`,I),I}}},7302:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;let c=a(8460),p=a(844),u=a(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};let h=["normal","bold","100","200","300","400","500","600","700","800","900"];class _ extends p.Disposable{constructor(x){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;let b=K({},r.DEFAULT_OPTIONS);for(let M in x)if(M in b)try{let w=x[M];b[M]=this._sanitizeAndValidateOption(M,w)}catch(w){console.error(w)}this.rawOptions=b,this.options=K({},b),this._setupOptions(),this.register((0,p.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(x,b){return this.onOptionChange(M=>{M===x&&b(this.rawOptions[x])})}onMultipleOptionChange(x,b){return this.onOptionChange(M=>{x.indexOf(M)!==-1&&b()})}_setupOptions(){let x=M=>{if(!(M in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${M}"`);return this.rawOptions[M]},b=(M,w)=>{if(!(M in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${M}"`);w=this._sanitizeAndValidateOption(M,w),this.rawOptions[M]!==w&&(this.rawOptions[M]=w,this._onOptionChange.fire(M))};for(let M in this.rawOptions){let w={get:x.bind(this,M),set:b.bind(this,M)};Object.defineProperty(this.options,M,w)}}_sanitizeAndValidateOption(x,b){switch(x){case"cursorStyle":if(b||(b=r.DEFAULT_OPTIONS[x]),!(function(M){return M==="block"||M==="underline"||M==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${x}`);break;case"wordSeparator":b||(b=r.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=h.includes(b)?b:r.DEFAULT_OPTIONS[x];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${x} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${x} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}r.OptionsService=_},2660:function(o,r,a){var c=this&&this.__decorate||function(_,S,x,b){var M,w=arguments.length,y=w<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,x):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(_,S,x,b);else for(var E=_.length-1;E>=0;E--)(M=_[E])&&(y=(w<3?M(y):w>3?M(S,x,y):M(S,x))||y);return w>3&&y&&Object.defineProperty(S,x,y),y},p=this&&this.__param||function(_,S){return function(x,b){S(x,b,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;let u=a(2585),h=r.OscLinkService=class{constructor(_){this._bufferService=_,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(_){let S=this._bufferService.buffer;if(_.id===void 0){let E=S.addMarker(S.ybase+S.y),I={data:_,id:this._nextId++,lines:[E]};return E.onDispose(()=>this._removeMarkerFromLink(I,E)),this._dataByLinkId.set(I.id,I),I.id}let x=_,b=this._getEntryIdKey(x),M=this._entriesWithId.get(b);if(M)return this.addLineToLink(M.id,S.ybase+S.y),M.id;let w=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[w]};return w.onDispose(()=>this._removeMarkerFromLink(y,w)),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(_,S){let x=this._dataByLinkId.get(_);if(x&&x.lines.every(b=>b.line!==S)){let b=this._bufferService.buffer.addMarker(S);x.lines.push(b),b.onDispose(()=>this._removeMarkerFromLink(x,b))}}getLinkData(_){return this._dataByLinkId.get(_)?.data}_getEntryIdKey(_){return`${_.id};;${_.uri}`}_removeMarkerFromLink(_,S){let x=_.lines.indexOf(S);x!==-1&&(_.lines.splice(x,1),_.lines.length===0&&(_.data.id!==void 0&&this._entriesWithId.delete(_.key),this._dataByLinkId.delete(_.id)))}};r.OscLinkService=h=c([p(0,u.IBufferService)],h)},8343:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;let a="di$target",c="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(p){return p[c]||[]},r.createDecorator=function(p){if(r.serviceRegistry.has(p))return r.serviceRegistry.get(p);let u=function(h,_,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,b,M){b[a]===b?b[c].push({id:x,index:M}):(b[c]=[{id:x,index:M}],b[a]=b)})(u,h,S)};return u.toString=()=>p,r.serviceRegistry.set(p,u),u}},2585:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;let c=a(8343);var p;r.IBufferService=(0,c.createDecorator)("BufferService"),r.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),r.ICoreService=(0,c.createDecorator)("CoreService"),r.ICharsetService=(0,c.createDecorator)("CharsetService"),r.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(p||(r.LogLevelEnum=p={})),r.ILogService=(0,c.createDecorator)("LogService"),r.IOptionsService=(0,c.createDecorator)("OptionsService"),r.IOscLinkService=(0,c.createDecorator)("OscLinkService"),r.IUnicodeService=(0,c.createDecorator)("UnicodeService"),r.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;let c=a(8460),p=a(225);class u{static extractShouldJoin(_){return(1&_)!=0}static extractWidth(_){return _>>1&3}static extractCharKind(_){return _>>3}static createPropertyValue(_,S,x=!1){return(16777215&_)<<3|(3&S)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;let _=new p.UnicodeV6;this.register(_),this._active=_.version,this._activeProvider=_}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(_){if(!this._providers[_])throw new Error(`unknown Unicode version "${_}"`);this._active=_,this._activeProvider=this._providers[_],this._onChange.fire(_)}register(_){this._providers[_.version]=_}wcwidth(_){return this._activeProvider.wcwidth(_)}getStringCellWidth(_){let S=0,x=0,b=_.length;for(let M=0;M=b)return S+this.wcwidth(w);let I=_.charCodeAt(M);56320<=I&&I<=57343?w=1024*(w-55296)+I-56320+65536:S+=this.wcwidth(I)}let y=this.charProperties(w,x),E=u.extractWidth(y);u.extractShouldJoin(y)&&(E-=u.extractWidth(x)),S+=E,x=y}return S}charProperties(_,S){return this._activeProvider.charProperties(_,S)}}r.UnicodeService=u}},i={};function e(o){var r=i[o];if(r!==void 0)return r.exports;var a=i[o]={exports:{}};return n[o].call(a.exports,a,a.exports,e),a.exports}var t={};return(()=>{var o=t;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;let r=e(9042),a=e(3236),c=e(844),p=e(5741),u=e(8285),h=e(7975),_=e(7090),S=["cols","rows"];class x extends c.Disposable{constructor(M){super(),this._core=this.register(new a.Terminal(M)),this._addonManager=this.register(new p.AddonManager),this._publicOptions=K({},this._core.options);let w=E=>this._core.options[E],y=(E,I)=>{this._checkReadonlyOptions(E),this._core.options[E]=I};for(let E in this._core.options){let I={get:w.bind(this,E),set:y.bind(this,E)};Object.defineProperty(this._publicOptions,E,I)}}_checkReadonlyOptions(M){if(S.includes(M))throw new Error(`Option "${M}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new _.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let M=this._core.coreService.decPrivateModes,w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:M.applicationCursorKeys,applicationKeypadMode:M.applicationKeypad,bracketedPasteMode:M.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:M.origin,reverseWraparoundMode:M.reverseWraparound,sendFocusMode:M.sendFocus,wraparoundMode:M.wraparound}}get options(){return this._publicOptions}set options(M){for(let w in M)this._publicOptions[w]=M[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(M,w=!0){this._core.input(M,w)}resize(M,w){this._verifyIntegers(M,w),this._core.resize(M,w)}open(M){this._core.open(M)}attachCustomKeyEventHandler(M){this._core.attachCustomKeyEventHandler(M)}attachCustomWheelEventHandler(M){this._core.attachCustomWheelEventHandler(M)}registerLinkProvider(M){return this._core.registerLinkProvider(M)}registerCharacterJoiner(M){return this._checkProposedApi(),this._core.registerCharacterJoiner(M)}deregisterCharacterJoiner(M){this._checkProposedApi(),this._core.deregisterCharacterJoiner(M)}registerMarker(M=0){return this._verifyIntegers(M),this._core.registerMarker(M)}registerDecoration(M){return this._checkProposedApi(),this._verifyPositiveIntegers(M.x??0,M.width??0,M.height??0),this._core.registerDecoration(M)}hasSelection(){return this._core.hasSelection()}select(M,w,y){this._verifyIntegers(M,w,y),this._core.select(M,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(M,w){this._verifyIntegers(M,w),this._core.selectLines(M,w)}dispose(){super.dispose()}scrollLines(M){this._verifyIntegers(M),this._core.scrollLines(M)}scrollPages(M){this._verifyIntegers(M),this._core.scrollPages(M)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(M){this._verifyIntegers(M),this._core.scrollToLine(M)}clear(){this._core.clear()}write(M,w){this._core.write(M,w)}writeln(M,w){this._core.write(M),this._core.write(`\r `,w)}paste(M){this._core.paste(M)}refresh(M,w){this._verifyIntegers(M,w),this._core.refresh(M,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(M){this._addonManager.loadAddon(this,M)}static get strings(){return r}_verifyIntegers(...M){for(let w of M)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...M){for(let w of M)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}o.Terminal=x})(),t})())});var nO=Cs((E2,tO)=>{(function(n,i){typeof E2=="object"&&typeof tO=="object"?tO.exports=i():typeof define=="function"&&define.amd?define([],i):typeof E2=="object"?E2.AttachAddon=i():n.AttachAddon=i()})(self,()=>(()=>{"use strict";var n={};return(()=>{var i=n;function e(t,o,r){return t.addEventListener(o,r),{dispose:()=>{r&&t.removeEventListener(o,r)}}}Object.defineProperty(i,"__esModule",{value:!0}),i.AttachAddon=void 0,i.AttachAddon=class{constructor(t,o){this._disposables=[],this._socket=t,this._socket.binaryType="arraybuffer",this._bidirectional=!(o&&o.bidirectional===!1)}activate(t){this._disposables.push(e(this._socket,"message",o=>{let r=o.data;t.write(typeof r=="string"?r:new Uint8Array(r))})),this._bidirectional&&(this._disposables.push(t.onData(o=>this._sendData(o))),this._disposables.push(t.onBinary(o=>this._sendBinary(o)))),this._disposables.push(e(this._socket,"close",()=>this.dispose())),this._disposables.push(e(this._socket,"error",()=>this.dispose()))}dispose(){for(let t of this._disposables)t.dispose()}_sendData(t){this._checkOpenSocket()&&this._socket.send(t)}_sendBinary(t){if(!this._checkOpenSocket())return;let o=new Uint8Array(t.length);for(let r=0;r{(function(n,i){typeof D2=="object"&&typeof iO=="object"?iO.exports=i():typeof define=="function"&&define.amd?define([],i):typeof D2=="object"?D2.FitAddon=i():n.FitAddon=i()})(self,()=>(()=>{"use strict";var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core,t=e._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let o=this._terminal.options.scrollback===0?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),u=a-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),h=c-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(h/t.css.cell.width)),rows:Math.max(1,Math.floor(u/t.css.cell.height))}}}})(),n})())});var W4=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),vh=class n{element=null;classNames=[];attrs=[];notSelectors=[];static parse(i){let e=[],t=(p,u)=>{u.notSelectors.length>0&&!u.element&&u.classNames.length==0&&u.attrs.length==0&&(u.element="*"),p.push(u)},o=new n,r,a=o,c=!1;for(W4.lastIndex=0;r=W4.exec(i);){if(r[1]){if(c)throw new Error("Nesting :not in a selector is not allowed");c=!0,a=new n,o.notSelectors.push(a)}let p=r[2];if(p){let h=r[3];h==="#"?a.addAttribute("id",p.slice(1)):h==="."?a.addClassName(p.slice(1)):a.setElement(p)}let u=r[4];if(u&&a.addAttribute(a.unescapeAttribute(u),r[6]),r[7]&&(c=!1,a=o),r[8]){if(c)throw new Error("Multiple selectors in :not are not supported");t(e,o),o=a=new n}}return t(e,o),e}unescapeAttribute(i){let e="",t=!1;for(let o=0;o0&&i.push("class",this.classNames.join(" ")),i.concat(this.attrs)}addAttribute(i,e=""){this.attrs.push(i,e&&e.toLowerCase()||"")}addClassName(i){this.classNames.push(i.toLowerCase())}toString(){let i=this.element||"";if(this.classNames&&this.classNames.forEach(e=>i+=`.${e}`),this.attrs)for(let e=0;ei+=`:not(${e})`),i}},qC=class n{static createNotMatcher(i){let e=new n;return e.addSelectables(i,null),e}_elementMap=new Map;_elementPartialMap=new Map;_classMap=new Map;_classPartialMap=new Map;_attrValueMap=new Map;_attrValuePartialMap=new Map;_listContexts=[];addSelectables(i,e){let t=null;i.length>1&&(t=new Fk(i),this._listContexts.push(t));for(let o=0;o0&&(!this.listContext||!this.listContext.alreadyMatched)&&(t=!qC.createNotMatcher(this.notSelectors).match(i,null)),t&&e&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),t}},QC=class{registry;constructor(i){this.registry=i}match(i){return this.registry.has(i)?this.registry.get(i):[]}};var Sp=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(Sp||{}),mE=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n[n.Eager=1]="Eager",n})(mE||{}),qg=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(qg||{}),q4={name:"custom-elements"},Q4={name:"no-errors-schema"};var eo=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n[n.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",n})(eo||{});function t$(n){let i=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return[n.element&&n.element!=="*"?n.element:"",...n.attrs,...i]}function n$(n){let i=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return n.element?[5,n.element,...n.attrs,...i]:n.attrs.length?[3,...n.attrs,...i]:n.classNames&&n.classNames.length?[9,...n.classNames]:[]}function i$(n){let i=t$(n),e=n.notSelectors&&n.notSelectors.length?n.notSelectors.map(t=>n$(t)):[];return i.concat(...e)}function pE(n){return n?vh.parse(n).map(i$):[]}var gd=(function(n){return n[n.Directive=0]="Directive",n[n.Component=1]="Component",n[n.Injectable=2]="Injectable",n[n.Pipe=3]="Pipe",n[n.NgModule=4]="NgModule",n})(gd||{});var XC;function o$(n){return l$(s$(n.nodes).join("")+`[${n.meaning}]`)}function r$(n){return n.id||jN(n)}function jN(n){let i=new Lk,e=n.nodes.map(t=>t.visit(i,null));return $N(e.join(""),n.meaning)}var KC=class{visitText(i,e){return i.value}visitContainer(i,e){return`[${i.children.map(t=>t.visit(this)).join(", ")}]`}visitIcu(i,e){let t=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expression}, ${i.type}, ${t.join(", ")}}`}visitTagPlaceholder(i,e){return i.isVoid?``:`${i.children.map(t=>t.visit(this)).join(", ")}`}visitPlaceholder(i,e){return i.value?`${i.value}`:``}visitIcuPlaceholder(i,e){return`${i.value.visit(this)}`}visitBlockPlaceholder(i,e){return`${i.children.map(t=>t.visit(this)).join(", ")}`}},a$=new KC;function s$(n){return n.map(i=>i.visit(a$,null))}var Lk=class extends KC{visitIcu(i){let e=Object.keys(i.cases).map(t=>`${t} {${i.cases[t].visit(this)}}`);return`{${i.type}, ${e.join(", ")}}`}};function l$(n){XC??=new TextEncoder;let i=[...XC.encode(n)],e=m$(i,uE.Big),t=i.length*8,o=new Uint32Array(80),r=1732584193,a=4023233417,c=2562383102,p=271733878,u=3285377520;e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(let h=0;h>>0).toString(16).padStart(8,"0")}function c$(n,i,e,t){return n<20?[i&e|~i&t,1518500249]:n<40?[i^e^t,1859775393]:n<60?[i&e|i&t|e&t,2400959708]:[i^e^t,3395469782]}function X4(n){XC??=new TextEncoder;let i=XC.encode(n),e=new DataView(i.buffer,i.byteOffset,i.byteLength),t=K4(e,i.length,0),o=K4(e,i.length,102072);return t==0&&(o==0||o==1)&&(t=t^319790063,o=o^-1801410264),BigInt.asUintN(32,BigInt(t))<>BigInt(63)&BigInt(1),e+=X4(i)),BigInt.asUintN(63,e).toString()}function K4(n,i,e){let t=2654435769,o=2654435769,r=0,a=i-12;for(;r<=a;r+=12){t+=n.getUint32(r,!0),o+=n.getUint32(r+4,!0),e+=n.getUint32(r+8,!0);let p=Y4(t,o,e);t=p[0],o=p[1],e=p[2]}let c=i-r;return e+=i,c>=4?(t+=n.getUint32(r,!0),r+=4,c>=8?(o+=n.getUint32(r,!0),r+=4,c>=9&&(e+=n.getUint8(r++)<<8),c>=10&&(e+=n.getUint8(r++)<<16),c===11&&(e+=n.getUint8(r++)<<24)):(c>=5&&(o+=n.getUint8(r++)),c>=6&&(o+=n.getUint8(r++)<<8),c===7&&(o+=n.getUint8(r++)<<16))):(c>=1&&(t+=n.getUint8(r++)),c>=2&&(t+=n.getUint8(r++)<<8),c===3&&(t+=n.getUint8(r++)<<16)),Y4(t,o,e)[2]}function Y4(n,i,e){return n-=i,n-=e,n^=e>>>13,i-=e,i-=n,i^=n<<8,e-=n,e-=i,e^=i>>>13,n-=i,n-=e,n^=e>>>12,i-=e,i-=n,i^=n<<16,e-=n,e-=i,e^=i>>>5,n-=i,n-=e,n^=e>>>3,i-=e,i-=n,i^=n<<10,e-=n,e-=i,e^=i>>>15,[n,i,e]}var uE=(function(n){return n[n.Little=0]="Little",n[n.Big=1]="Big",n})(uE||{});function th(n,i){return d$(n,i)[1]}function d$(n,i){let e=(n&65535)+(i&65535),t=(n>>>16)+(i>>>16)+(e>>>16);return[t>>>16,t<<16|e&65535]}function uk(n,i){return n<>>32-i}function m$(n,i){let e=n.length+3>>>2,t=[];for(let o=0;o=n.length?0:n[i]}function p$(n,i,e){let t=0;if(e===uE.Big)for(let o=0;o<4;o++)t+=Z4(n,i+o)<<24-8*o;else for(let o=0;o<4;o++)t+=Z4(n,i+o)<<8*o;return t}var HN=(function(n){return n[n.None=0]="None",n[n.Const=1]="Const",n})(HN||{}),YC=class{modifiers;constructor(i=HN.None){this.modifiers=i}hasModifier(i){return(this.modifiers&i)!==0}},wd=(function(n){return n[n.Dynamic=0]="Dynamic",n[n.Bool=1]="Bool",n[n.String=2]="String",n[n.Int=3]="Int",n[n.Number=4]="Number",n[n.Function=5]="Function",n[n.Inferred=6]="Inferred",n[n.None=7]="None",n})(wd||{}),xc=class extends YC{name;constructor(i,e){super(e),this.name=i}visitType(i,e){return i.visitBuiltinType(this,e)}},tl=class extends YC{value;typeParams;constructor(i,e,t=null){super(e),this.value=i,this.typeParams=t}visitType(i,e){return i.visitExpressionType(this,e)}};var is=new xc(wd.Dynamic),Ol=new xc(wd.Inferred),u$=new xc(wd.Bool),t5e=new xc(wd.Int),Bp=new xc(wd.Number),hE=new xc(wd.String),n5e=new xc(wd.Function),yc=new xc(wd.None),l_=(function(n){return n[n.Minus=0]="Minus",n[n.Plus=1]="Plus",n})(l_||{}),st=(function(n){return n[n.Equals=0]="Equals",n[n.NotEquals=1]="NotEquals",n[n.Assign=2]="Assign",n[n.Identical=3]="Identical",n[n.NotIdentical=4]="NotIdentical",n[n.Minus=5]="Minus",n[n.Plus=6]="Plus",n[n.Divide=7]="Divide",n[n.Multiply=8]="Multiply",n[n.Modulo=9]="Modulo",n[n.And=10]="And",n[n.Or=11]="Or",n[n.BitwiseOr=12]="BitwiseOr",n[n.BitwiseAnd=13]="BitwiseAnd",n[n.Lower=14]="Lower",n[n.LowerEquals=15]="LowerEquals",n[n.Bigger=16]="Bigger",n[n.BiggerEquals=17]="BiggerEquals",n[n.NullishCoalesce=18]="NullishCoalesce",n[n.Exponentiation=19]="Exponentiation",n[n.In=20]="In",n[n.InstanceOf=21]="InstanceOf",n[n.AdditionAssignment=22]="AdditionAssignment",n[n.SubtractionAssignment=23]="SubtractionAssignment",n[n.MultiplicationAssignment=24]="MultiplicationAssignment",n[n.DivisionAssignment=25]="DivisionAssignment",n[n.RemainderAssignment=26]="RemainderAssignment",n[n.ExponentiationAssignment=27]="ExponentiationAssignment",n[n.AndAssignment=28]="AndAssignment",n[n.OrAssignment=29]="OrAssignment",n[n.NullishCoalesceAssignment=30]="NullishCoalesceAssignment",n})(st||{});function h$(n,i){return n==null||i==null?n==i:n.isEquivalent(i)}function UN(n,i,e){let t=n.length;if(t!==i.length)return!1;for(let o=0;oe.isEquivalent(t))}var Bi=class{type;sourceSpan;constructor(i,e){this.type=i||null,this.sourceSpan=e||null}prop(i,e){return new Es(this,i,null,e)}key(i,e,t){return new xd(this,i,e,t)}callFn(i,e,t){return new os(this,i,null,e,t)}instantiate(i,e,t){return new d_(this,i,e,t)}conditional(i,e=null,t){return new Sc(this,i,e,null,t)}equals(i,e){return new gi(st.Equals,this,i,null,e)}notEquals(i,e){return new gi(st.NotEquals,this,i,null,e)}identical(i,e){return new gi(st.Identical,this,i,null,e)}notIdentical(i,e){return new gi(st.NotIdentical,this,i,null,e)}minus(i,e){return new gi(st.Minus,this,i,null,e)}plus(i,e){return new gi(st.Plus,this,i,null,e)}divide(i,e){return new gi(st.Divide,this,i,null,e)}multiply(i,e){return new gi(st.Multiply,this,i,null,e)}modulo(i,e){return new gi(st.Modulo,this,i,null,e)}power(i,e){return new gi(st.Exponentiation,this,i,null,e)}and(i,e){return new gi(st.And,this,i,null,e)}bitwiseOr(i,e){return new gi(st.BitwiseOr,this,i,null,e)}bitwiseAnd(i,e){return new gi(st.BitwiseAnd,this,i,null,e)}or(i,e){return new gi(st.Or,this,i,null,e)}lower(i,e){return new gi(st.Lower,this,i,null,e)}lowerEquals(i,e){return new gi(st.LowerEquals,this,i,null,e)}bigger(i,e){return new gi(st.Bigger,this,i,null,e)}biggerEquals(i,e){return new gi(st.BiggerEquals,this,i,null,e)}isBlank(i){return this.equals(C$,i)}nullishCoalesce(i,e){return new gi(st.NullishCoalesce,this,i,null,e)}toStmt(){return new sa(this,null)}},Nl=class n extends Bi{name;constructor(i,e,t){super(e,t),this.name=i}isEquivalent(i){return i instanceof n&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadVarExpr(this,e)}clone(){return new n(this.name,this.type,this.sourceSpan)}set(i){return new gi(st.Assign,this,i,null,this.sourceSpan)}},Ch=class n extends Bi{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitTypeofExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},ZC=class n extends Bi{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitVoidExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},oi=class n extends Bi{node;constructor(i,e,t){super(e,t),this.node=i}isEquivalent(i){return i instanceof n&&this.node===i.node}isConstant(){return!1}visitExpression(i,e){return i.visitWrappedNodeExpr(this,e)}clone(){return new n(this.node,this.type,this.sourceSpan)}},os=class n extends Bi{fn;args;pure;constructor(i,e,t,o,r=!1){super(t,o),this.fn=i,this.args=e,this.pure=r}get receiver(){return this.fn}isEquivalent(i){return i instanceof n&&this.fn.isEquivalent(i.fn)&&Ts(this.args,i.args)&&this.pure===i.pure}isConstant(){return!1}visitExpression(i,e){return i.visitInvokeFunctionExpr(this,e)}clone(){return new n(this.fn.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan,this.pure)}},c_=class n extends Bi{tag;template;constructor(i,e,t,o){super(t,o),this.tag=i,this.template=e}isEquivalent(i){return i instanceof n&&this.tag.isEquivalent(i.tag)&&this.template.isEquivalent(i.template)}isConstant(){return!1}visitExpression(i,e){return i.visitTaggedTemplateLiteralExpr(this,e)}clone(){return new n(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},d_=class n extends Bi{classExpr;args;constructor(i,e,t,o){super(t,o),this.classExpr=i,this.args=e}isEquivalent(i){return i instanceof n&&this.classExpr.isEquivalent(i.classExpr)&&Ts(this.args,i.args)}isConstant(){return!1}visitExpression(i,e){return i.visitInstantiateExpr(this,e)}clone(){return new n(this.classExpr.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan)}},bh=class n extends Bi{body;flags;constructor(i,e,t){super(null,t),this.body=i,this.flags=e}isEquivalent(i){return i instanceof n&&this.body===i.body&&this.flags===i.flags}isConstant(){return!0}visitExpression(i,e){return i.visitRegularExpressionLiteral(this,e)}clone(){return new n(this.body,this.flags,this.sourceSpan)}},aa=class n extends Bi{value;constructor(i,e,t){super(e,t),this.value=i}isEquivalent(i){return i instanceof n&&this.value===i.value}isConstant(){return!0}visitExpression(i,e){return i.visitLiteralExpr(this,e)}clone(){return new n(this.value,this.type,this.sourceSpan)}},m_=class n extends Bi{elements;expressions;constructor(i,e,t){super(null,t),this.elements=i,this.expressions=e}isEquivalent(i){return i instanceof n&&UN(this.elements,i.elements,(e,t)=>e.text===t.text)&&Ts(this.expressions,i.expressions)}isConstant(){return!1}visitExpression(i,e){return i.visitTemplateLiteralExpr(this,e)}clone(){return new n(this.elements.map(i=>i.clone()),this.expressions.map(i=>i.clone()))}},JC=class n extends Bi{text;rawText;constructor(i,e,t){super(hE,e),this.text=i,this.rawText=t??Vk($C(i))}visitExpression(i,e){return i.visitTemplateLiteralElementExpr(this,e)}isEquivalent(i){return i instanceof n&&i.text===this.text&&i.rawText===this.rawText}isConstant(){return!0}clone(){return new n(this.text,this.sourceSpan,this.rawText)}},Ip=class{text;sourceSpan;constructor(i,e){this.text=i,this.sourceSpan=e}},fh=class{text;sourceSpan;associatedMessage;constructor(i,e,t){this.text=i,this.sourceSpan=e,this.associatedMessage=t}},f$="|",J4="@@",g$="\u241F",e1=class n extends Bi{metaBlock;messageParts;placeHolderNames;expressions;constructor(i,e,t,o,r){super(hE,r),this.metaBlock=i,this.messageParts=e,this.placeHolderNames=t,this.expressions=o}isEquivalent(i){return!1}isConstant(){return!1}visitExpression(i,e){return i.visitLocalizedString(this,e)}clone(){return new n(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(i=>i.clone()),this.sourceSpan)}serializeI18nHead(){let i=this.metaBlock.description||"";return this.metaBlock.meaning&&(i=`${this.metaBlock.meaning}${f$}${i}`),this.metaBlock.customId&&(i=`${i}${J4}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(e=>{i=`${i}${g$}${e}`}),e5(i,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(i){return this.messageParts[i]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(i){return this.placeHolderNames[i]?.sourceSpan??this.expressions[i]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(i){let e=this.placeHolderNames[i-1],t=this.messageParts[i],o=e.text;return e.associatedMessage?.legacyIds.length===0&&(o+=`${J4}${$N(e.associatedMessage.messageString,e.associatedMessage.meaning)}`),e5(o,t.text,this.getMessagePartSourceSpan(i))}},$C=n=>n.replace(/\\/g,"\\\\"),_$=n=>n.replace(/^:/,"\\:"),v$=n=>n.replace(/:/g,"\\:"),Vk=n=>n.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function e5(n,i,e){return n===""?{cooked:i,raw:Vk(_$($C(i))),range:e}:{cooked:`:${n}:${i}`,raw:Vk(`:${v$($C(n))}:${$C(i)}`),range:e}}var zp=class n extends Bi{value;typeParams;constructor(i,e,t=null,o){super(e,o),this.value=i,this.typeParams=t}isEquivalent(i){return i instanceof n&&this.value.name===i.value.name&&this.value.moduleName===i.value.moduleName}isConstant(){return!1}visitExpression(i,e){return i.visitExternalExpr(this,e)}clone(){return new n(this.value,this.type,this.typeParams,this.sourceSpan)}};var Sc=class n extends Bi{condition;falseCase;trueCase;constructor(i,e,t=null,o,r){super(o||e.type,r),this.condition=i,this.falseCase=t,this.trueCase=e}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)&&this.trueCase.isEquivalent(i.trueCase)&&h$(this.falseCase,i.falseCase)}isConstant(){return!1}visitExpression(i,e){return i.visitConditionalExpr(this,e)}clone(){return new n(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}};var p_=class n extends Bi{condition;constructor(i,e){super(u$,e),this.condition=i}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)}isConstant(){return!1}visitExpression(i,e){return i.visitNotExpr(this,e)}clone(){return new n(this.condition.clone(),this.sourceSpan)}},br=class n{name;type;constructor(i,e=null){this.name=i,this.type=e}isEquivalent(i){return this.name===i.name}clone(){return new n(this.name,this.type)}},om=class n extends Bi{params;statements;name;constructor(i,e,t,o,r){super(t,o),this.params=i,this.statements=e,this.name=r}isEquivalent(i){return(i instanceof n||i instanceof u_)&&Ts(this.params,i.params)&&Ts(this.statements,i.statements)}isConstant(){return!1}visitExpression(i,e){return i.visitFunctionExpr(this,e)}toDeclStmt(i,e){return new u_(i,this.params,this.statements,this.type,e,this.sourceSpan)}clone(){return new n(this.params.map(i=>i.clone()),this.statements,this.type,this.sourceSpan,this.name)}},eu=class Bk extends Bi{params;body;constructor(i,e,t,o){super(t,o),this.params=i,this.body=e}isEquivalent(i){return!(i instanceof Bk)||!Ts(this.params,i.params)?!1:this.body instanceof Bi&&i.body instanceof Bi?this.body.isEquivalent(i.body):Array.isArray(this.body)&&Array.isArray(i.body)?Ts(this.body,i.body):!1}isConstant(){return!1}visitExpression(i,e){return i.visitArrowFunctionExpr(this,e)}clone(){return new Bk(this.params.map(i=>i.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(i,e){return new Rr(i,this,Ol,e,this.sourceSpan)}},jp=class n extends Bi{operator;expr;parens;constructor(i,e,t,o,r=!0){super(t||Bp,o),this.operator=i,this.expr=e,this.parens=r}isEquivalent(i){return i instanceof n&&this.operator===i.operator&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}visitExpression(i,e){return i.visitUnaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},Fl=class n extends Bi{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitParenthesizedExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},gi=class n extends Bi{operator;rhs;lhs;constructor(i,e,t,o,r){super(o||e.type,r),this.operator=i,this.rhs=t,this.lhs=e}isEquivalent(i){return i instanceof n&&this.operator===i.operator&&this.lhs.isEquivalent(i.lhs)&&this.rhs.isEquivalent(i.rhs)}isConstant(){return!1}visitExpression(i,e){return i.visitBinaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let i=this.operator;return i===st.Assign||i===st.AdditionAssignment||i===st.SubtractionAssignment||i===st.MultiplicationAssignment||i===st.DivisionAssignment||i===st.RemainderAssignment||i===st.ExponentiationAssignment||i===st.AndAssignment||i===st.OrAssignment||i===st.NullishCoalesceAssignment}},Es=class n extends Bi{receiver;name;constructor(i,e,t,o){super(t,o),this.receiver=i,this.name=e}get index(){return this.name}isEquivalent(i){return i instanceof n&&this.receiver.isEquivalent(i.receiver)&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadPropExpr(this,e)}set(i){return new gi(st.Assign,this.receiver.prop(this.name),i,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},xd=class n extends Bi{receiver;index;constructor(i,e,t,o){super(t,o),this.receiver=i,this.index=e}isEquivalent(i){return i instanceof n&&this.receiver.isEquivalent(i.receiver)&&this.index.isEquivalent(i.index)}isConstant(){return!1}visitExpression(i,e){return i.visitReadKeyExpr(this,e)}set(i){return new gi(st.Assign,this.receiver.key(this.index),i,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},wc=class n extends Bi{entries;constructor(i,e,t){super(e,t),this.entries=i}isConstant(){return this.entries.every(i=>i.isConstant())}isEquivalent(i){return i instanceof n&&Ts(this.entries,i.entries)}visitExpression(i,e){return i.visitLiteralArrayExpr(this,e)}clone(){return new n(this.entries.map(i=>i.clone()),this.type,this.sourceSpan)}},xh=class n{key;value;quoted;constructor(i,e,t){this.key=i,this.value=e,this.quoted=t}isEquivalent(i){return this.key===i.key&&this.value.isEquivalent(i.value)}clone(){return new n(this.key,this.value.clone(),this.quoted)}isConstant(){return this.value.isConstant()}},rm=class n{expression;constructor(i){this.expression=i}isEquivalent(i){return i instanceof n&&this.expression.isEquivalent(i.expression)}clone(){return new n(this.expression.clone())}isConstant(){return this.expression.isConstant()}},Rl=class n extends Bi{entries;valueType=null;constructor(i,e,t){super(e,t),this.entries=i,e&&(this.valueType=e.valueType)}isEquivalent(i){return i instanceof n&&Ts(this.entries,i.entries)}isConstant(){return this.entries.every(i=>i.isConstant())}visitExpression(i,e){return i.visitLiteralMapExpr(this,e)}clone(){let i=this.entries.map(e=>e.clone());return new n(i,this.type,this.sourceSpan)}};var $p=class n extends Bi{expression;constructor(i,e){super(null,e),this.expression=i}isEquivalent(i){return i instanceof n&&this.expression.isEquivalent(i.expression)}isConstant(){return this.expression.isConstant()}visitExpression(i,e){return i.visitSpreadElementExpr(this,e)}clone(){return new n(this.expression.clone(),this.sourceSpan)}},yh=new aa(null,null,null),C$=new aa(null,Ol,null),oa=(function(n){return n[n.None=0]="None",n[n.Final=1]="Final",n[n.Private=2]="Private",n[n.Exported=4]="Exported",n[n.Static=8]="Static",n})(oa||{}),zk=class{text;multiline;trailingNewline;constructor(i,e,t){this.text=i,this.multiline=e,this.trailingNewline=t}toString(){return this.multiline?` ${this.text} `:this.text}},t1=class extends zk{tags;constructor(i){super("",!0,!0),this.tags=i}toString(){return w$(this.tags)}},Hp=class{modifiers;sourceSpan;leadingComments;constructor(i=oa.None,e=null,t){this.modifiers=i,this.sourceSpan=e,this.leadingComments=t}hasModifier(i){return(this.modifiers&i)!==0}addLeadingComment(i){this.leadingComments=this.leadingComments??[],this.leadingComments.push(i)}},Rr=class n extends Hp{name;value;type;constructor(i,e,t,o,r,a){super(o,r,a),this.name=i,this.value=e,this.type=t||e&&e.type||null}isEquivalent(i){return i instanceof n&&this.name===i.name&&(this.value?!!i.value&&this.value.isEquivalent(i.value):!i.value)}visitStatement(i,e){return i.visitDeclareVarStmt(this,e)}},u_=class n extends Hp{name;params;statements;type;constructor(i,e,t,o,r,a,c){super(r,a,c),this.name=i,this.params=e,this.statements=t,this.type=o||null}isEquivalent(i){return i instanceof n&&Ts(this.params,i.params)&&Ts(this.statements,i.statements)}visitStatement(i,e){return i.visitDeclareFunctionStmt(this,e)}},sa=class n extends Hp{expr;constructor(i,e,t){super(oa.None,e,t),this.expr=i}isEquivalent(i){return i instanceof n&&this.expr.isEquivalent(i.expr)}visitStatement(i,e){return i.visitExpressionStmt(this,e)}},xr=class n extends Hp{value;constructor(i,e=null,t){super(oa.None,e,t),this.value=i}isEquivalent(i){return i instanceof n&&this.value.isEquivalent(i.value)}visitStatement(i,e){return i.visitReturnStmt(this,e)}},n1=class n extends Hp{condition;trueCase;falseCase;constructor(i,e,t=[],o,r){super(oa.None,o,r),this.condition=i,this.trueCase=e,this.falseCase=t}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)&&Ts(this.trueCase,i.trueCase)&&Ts(this.falseCase,i.falseCase)}visitStatement(i,e){return i.visitIfStmt(this,e)}};function b$(n=[]){return new t1(n)}function Yn(n,i,e){return new Nl(n,i,e)}function Ut(n,i=null,e){return new zp(n,null,i,e)}function ra(n,i,e){return new tl(n,i,e)}function r0(n){return new Ch(n)}function Gi(n,i,e){return new wc(n,i,e)}function nl(n,i=null){return new Rl(n.map(e=>new xh(e.key,e.value,e.quoted)),i,null)}function x$(n,i){return new p_(n,i)}function am(n,i,e,t,o){return new om(n,i,e,t,o)}function Ds(n,i,e,t){return new eu(n,i,e,t)}function tb(n,i,e,t,o){return new n1(n,i,e,t,o)}function y$(n,i,e,t){return new c_(n,i,e,t)}function Te(n,i,e){return new aa(n,i,e)}function S$(n,i,e,t,o){return new e1(n,i,e,t,o)}function t5(n){let i="";if(n.tagName&&(i+=` @${n.tagName}`),n.text){if(n.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');i+=" "+n.text.replace(/@/g,"\\@")}return i}function w$(n){if(n.length===0)return"";if(n.length===1&&n[0].tagName&&!n[0].text)return`*${t5(n[0])} `;let i=`* `;for(let e of n)i+=" *",i+=t5(e).replace(/\n/g,` * `),i+=` `;return i+=" ",i}var M$="_c",k$={},T$=50,i1=class n extends Bi{resolved;original;shared=!1;constructor(i){super(i.type),this.resolved=i,this.original=i}visitExpression(i,e){return e===k$?this.original.visitExpression(i,e):this.resolved.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&this.resolved.isEquivalent(i.resolved)}isConstant(){return!0}clone(){throw new Error("Not supported.")}fixup(i){this.resolved=i,this.shared=!0}},o1=class{isClosureCompilerEnabled;statements=[];literals=new Map;literalFactories=new Map;sharedConstants=new Map;_claimedNames=new Map;nextNameIndex=0;constructor(i=!1){this.isClosureCompilerEnabled=i}getConstLiteral(i,e){if(i instanceof aa&&!n5(i)||i instanceof i1)return i;let t=h_.INSTANCE.keyOf(i),o=this.literals.get(t),r=!1;if(o||(o=new i1(i),this.literals.set(t,o),r=!0),!r&&!o.shared||r&&e){let a=this.freshName(),c,p;this.isClosureCompilerEnabled&&n5(i)?(c=new om([],[new xr(i)]),p=Yn(a).callFn([])):(c=i,p=Yn(a)),this.statements.push(new Rr(a,c,Ol,oa.Final)),o.fixup(p)}return o}getSharedConstant(i,e){let t=i.keyOf(e);if(!this.sharedConstants.has(t)){let o=this.freshName();this.sharedConstants.set(t,Yn(o)),this.statements.push(i.toSharedConstantDeclaration(o,e))}return this.sharedConstants.get(t)}getSharedFunctionReference(i,e,t=!0){let o=i instanceof eu;for(let a of this.statements)if(o&&a instanceof Rr&&a.value?.isEquivalent(i)||!o&&a instanceof u_&&i instanceof om&&i.isEquivalent(a))return Yn(a.name);let r=t?this.uniqueName(e):e;return this.statements.push(i instanceof om?i.toDeclStmt(r,oa.Final):new Rr(r,i,Ol,oa.Final,i.sourceSpan)),Yn(r)}uniqueName(i,e=!0){let t=this._claimedNames.get(i)??0,o=t===0&&!e?`${i}`:`${i}${t}`;return this._claimedNames.set(i,t+1),o}freshName(){return this.uniqueName(M$)}},h_=class n{static INSTANCE=new n;keyOf(i){if(i instanceof aa&&typeof i.value=="string")return`"${i.value}"`;if(i instanceof aa)return String(i.value);if(i instanceof bh)return`/${i.body}/${i.flags??""}`;if(i instanceof wc){let e=[];for(let t of i.entries)e.push(this.keyOf(t));return`[${e.join(",")}]`}else if(i instanceof Rl){let e=[];for(let t of i.entries)if(t instanceof rm)e.push("..."+this.keyOf(t.expression));else{let o=t.key;t.quoted&&(o=`"${o}"`),e.push(o+":"+this.keyOf(t.value))}return`{${e.join(",")}}`}else{if(i instanceof zp)return`import("${i.value.moduleName}", ${i.value.name})`;if(i instanceof Nl)return`read(${i.name})`;if(i instanceof Ch)return`typeof(${this.keyOf(i.expr)})`;if(i instanceof $p)return`...${this.keyOf(i.expression)}`;throw new Error(`${this.constructor.name} does not handle expressions of type ${i.constructor.name}`)}}};function n5(n){return n instanceof aa&&typeof n.value=="string"&&n.value.length>=T$}var Ce="@angular/core",fe=(()=>{class n{static core={name:null,moduleName:Ce};static namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:Ce};static namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:Ce};static namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:Ce};static element={name:"\u0275\u0275element",moduleName:Ce};static elementStart={name:"\u0275\u0275elementStart",moduleName:Ce};static elementEnd={name:"\u0275\u0275elementEnd",moduleName:Ce};static domElement={name:"\u0275\u0275domElement",moduleName:Ce};static domElementStart={name:"\u0275\u0275domElementStart",moduleName:Ce};static domElementEnd={name:"\u0275\u0275domElementEnd",moduleName:Ce};static domElementContainer={name:"\u0275\u0275domElementContainer",moduleName:Ce};static domElementContainerStart={name:"\u0275\u0275domElementContainerStart",moduleName:Ce};static domElementContainerEnd={name:"\u0275\u0275domElementContainerEnd",moduleName:Ce};static domTemplate={name:"\u0275\u0275domTemplate",moduleName:Ce};static domListener={name:"\u0275\u0275domListener",moduleName:Ce};static advance={name:"\u0275\u0275advance",moduleName:Ce};static syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:Ce};static syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:Ce};static attribute={name:"\u0275\u0275attribute",moduleName:Ce};static classProp={name:"\u0275\u0275classProp",moduleName:Ce};static elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:Ce};static elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:Ce};static elementContainer={name:"\u0275\u0275elementContainer",moduleName:Ce};static styleMap={name:"\u0275\u0275styleMap",moduleName:Ce};static classMap={name:"\u0275\u0275classMap",moduleName:Ce};static styleProp={name:"\u0275\u0275styleProp",moduleName:Ce};static interpolate={name:"\u0275\u0275interpolate",moduleName:Ce};static interpolate1={name:"\u0275\u0275interpolate1",moduleName:Ce};static interpolate2={name:"\u0275\u0275interpolate2",moduleName:Ce};static interpolate3={name:"\u0275\u0275interpolate3",moduleName:Ce};static interpolate4={name:"\u0275\u0275interpolate4",moduleName:Ce};static interpolate5={name:"\u0275\u0275interpolate5",moduleName:Ce};static interpolate6={name:"\u0275\u0275interpolate6",moduleName:Ce};static interpolate7={name:"\u0275\u0275interpolate7",moduleName:Ce};static interpolate8={name:"\u0275\u0275interpolate8",moduleName:Ce};static interpolateV={name:"\u0275\u0275interpolateV",moduleName:Ce};static nextContext={name:"\u0275\u0275nextContext",moduleName:Ce};static resetView={name:"\u0275\u0275resetView",moduleName:Ce};static templateCreate={name:"\u0275\u0275template",moduleName:Ce};static defer={name:"\u0275\u0275defer",moduleName:Ce};static deferWhen={name:"\u0275\u0275deferWhen",moduleName:Ce};static deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:Ce};static deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:Ce};static deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:Ce};static deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:Ce};static deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:Ce};static deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:Ce};static deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:Ce};static deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:Ce};static deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:Ce};static deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:Ce};static deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:Ce};static deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:Ce};static deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:Ce};static deferHydrateWhen={name:"\u0275\u0275deferHydrateWhen",moduleName:Ce};static deferHydrateNever={name:"\u0275\u0275deferHydrateNever",moduleName:Ce};static deferHydrateOnIdle={name:"\u0275\u0275deferHydrateOnIdle",moduleName:Ce};static deferHydrateOnImmediate={name:"\u0275\u0275deferHydrateOnImmediate",moduleName:Ce};static deferHydrateOnTimer={name:"\u0275\u0275deferHydrateOnTimer",moduleName:Ce};static deferHydrateOnHover={name:"\u0275\u0275deferHydrateOnHover",moduleName:Ce};static deferHydrateOnInteraction={name:"\u0275\u0275deferHydrateOnInteraction",moduleName:Ce};static deferHydrateOnViewport={name:"\u0275\u0275deferHydrateOnViewport",moduleName:Ce};static deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:Ce};static conditionalCreate={name:"\u0275\u0275conditionalCreate",moduleName:Ce};static conditionalBranchCreate={name:"\u0275\u0275conditionalBranchCreate",moduleName:Ce};static conditional={name:"\u0275\u0275conditional",moduleName:Ce};static repeater={name:"\u0275\u0275repeater",moduleName:Ce};static repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:Ce};static repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:Ce};static repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:Ce};static componentInstance={name:"\u0275\u0275componentInstance",moduleName:Ce};static text={name:"\u0275\u0275text",moduleName:Ce};static enableBindings={name:"\u0275\u0275enableBindings",moduleName:Ce};static disableBindings={name:"\u0275\u0275disableBindings",moduleName:Ce};static getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:Ce};static textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:Ce};static textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:Ce};static textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:Ce};static textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:Ce};static textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:Ce};static textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:Ce};static textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:Ce};static textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:Ce};static textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:Ce};static textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:Ce};static restoreView={name:"\u0275\u0275restoreView",moduleName:Ce};static pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:Ce};static pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:Ce};static pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:Ce};static pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:Ce};static pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:Ce};static pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:Ce};static pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:Ce};static pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:Ce};static pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:Ce};static pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:Ce};static pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:Ce};static pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:Ce};static pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:Ce};static pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:Ce};static pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:Ce};static domProperty={name:"\u0275\u0275domProperty",moduleName:Ce};static ariaProperty={name:"\u0275\u0275ariaProperty",moduleName:Ce};static property={name:"\u0275\u0275property",moduleName:Ce};static control={name:"\u0275\u0275control",moduleName:Ce};static controlCreate={name:"\u0275\u0275controlCreate",moduleName:Ce};static animationEnterListener={name:"\u0275\u0275animateEnterListener",moduleName:Ce};static animationLeaveListener={name:"\u0275\u0275animateLeaveListener",moduleName:Ce};static animationEnter={name:"\u0275\u0275animateEnter",moduleName:Ce};static animationLeave={name:"\u0275\u0275animateLeave",moduleName:Ce};static i18n={name:"\u0275\u0275i18n",moduleName:Ce};static i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:Ce};static i18nExp={name:"\u0275\u0275i18nExp",moduleName:Ce};static i18nStart={name:"\u0275\u0275i18nStart",moduleName:Ce};static i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:Ce};static i18nApply={name:"\u0275\u0275i18nApply",moduleName:Ce};static i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:Ce};static pipe={name:"\u0275\u0275pipe",moduleName:Ce};static projection={name:"\u0275\u0275projection",moduleName:Ce};static projectionDef={name:"\u0275\u0275projectionDef",moduleName:Ce};static reference={name:"\u0275\u0275reference",moduleName:Ce};static inject={name:"\u0275\u0275inject",moduleName:Ce};static injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:Ce};static directiveInject={name:"\u0275\u0275directiveInject",moduleName:Ce};static invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:Ce};static invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:Ce};static templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:Ce};static forwardRef={name:"forwardRef",moduleName:Ce};static resolveForwardRef={name:"resolveForwardRef",moduleName:Ce};static replaceMetadata={name:"\u0275\u0275replaceMetadata",moduleName:Ce};static getReplaceMetadataURL={name:"\u0275\u0275getReplaceMetadataURL",moduleName:Ce};static \u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:Ce};static declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:Ce};static InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:Ce};static resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:Ce};static resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:Ce};static resolveBody={name:"\u0275\u0275resolveBody",moduleName:Ce};static getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:Ce};static defineComponent={name:"\u0275\u0275defineComponent",moduleName:Ce};static declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:Ce};static setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:Ce};static ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:Ce};static ViewEncapsulation={name:"ViewEncapsulation",moduleName:Ce};static ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:Ce};static FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:Ce};static declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:Ce};static FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:Ce};static defineDirective={name:"\u0275\u0275defineDirective",moduleName:Ce};static declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:Ce};static DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:Ce};static InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:Ce};static InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:Ce};static defineInjector={name:"\u0275\u0275defineInjector",moduleName:Ce};static declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:Ce};static NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:Ce};static ModuleWithProviders={name:"ModuleWithProviders",moduleName:Ce};static defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:Ce};static declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:Ce};static setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:Ce};static registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:Ce};static PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:Ce};static definePipe={name:"\u0275\u0275definePipe",moduleName:Ce};static declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:Ce};static declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:Ce};static declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:Ce};static setClassMetadata={name:"\u0275setClassMetadata",moduleName:Ce};static setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:Ce};static setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:Ce};static queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:Ce};static viewQuery={name:"\u0275\u0275viewQuery",moduleName:Ce};static loadQuery={name:"\u0275\u0275loadQuery",moduleName:Ce};static contentQuery={name:"\u0275\u0275contentQuery",moduleName:Ce};static viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:Ce};static contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:Ce};static queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:Ce};static twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:Ce};static twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:Ce};static twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:Ce};static declareLet={name:"\u0275\u0275declareLet",moduleName:Ce};static storeLet={name:"\u0275\u0275storeLet",moduleName:Ce};static readContextLet={name:"\u0275\u0275readContextLet",moduleName:Ce};static arrowFunction={name:"\u0275\u0275arrowFunction",moduleName:Ce};static attachSourceLocations={name:"\u0275\u0275attachSourceLocations",moduleName:Ce};static NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:Ce};static ControlFeature={name:"\u0275\u0275ControlFeature",moduleName:Ce};static InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:Ce};static ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:Ce};static HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:Ce};static ExternalStylesFeature={name:"\u0275\u0275ExternalStylesFeature",moduleName:Ce};static listener={name:"\u0275\u0275listener",moduleName:Ce};static getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:Ce};static sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:Ce};static sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:Ce};static validateAttribute={name:"\u0275\u0275validateAttribute",moduleName:Ce};static sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:Ce};static sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:Ce};static sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:Ce};static sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:Ce};static trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:Ce};static trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:Ce};static inputDecorator={name:"Input",moduleName:Ce};static outputDecorator={name:"Output",moduleName:Ce};static viewChildDecorator={name:"ViewChild",moduleName:Ce};static viewChildrenDecorator={name:"ViewChildren",moduleName:Ce};static contentChildDecorator={name:"ContentChild",moduleName:Ce};static contentChildrenDecorator={name:"ContentChildren",moduleName:Ce};static InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:Ce};static UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:Ce};static unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:Ce};static assertType={name:"\u0275assertType",moduleName:Ce}}return n})(),E$=/-+([a-z0-9])/g;function D$(n){return n.replace(E$,(...i)=>i[1].toUpperCase())}function P$(n,i){return GN(n,":",i)}function I$(n,i){return GN(n,".",i)}function GN(n,i,e){let t=n.indexOf(i);return t==-1?e:[n.slice(0,t).trim(),n.slice(t+1).trim()]}function A$(n){let i=[];for(let e=0;e=55296&&t<=56319&&n.length>e+1){let o=n.charCodeAt(e+1);o>=56320&&o<=57343&&(e++,t=(t-55296<<10)+o-56320+65536)}t<=127?i.push(t):t<=2047?i.push(t>>6&31|192,t&63|128):t<=65535?i.push(t>>12|224,t>>6&63|128,t&63|128):t<=2097151&&i.push(t>>18&7|240,t>>12&63|128,t>>6&63|128,t&63|128)}return i}function WN(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(WN).join(", ")}]`;if(n==null)return""+n;let i=n.overriddenName||n.name;if(i)return`${i}`;if(!n.toString)return"object";let e=n.toString();if(e==null)return""+e;let t=e.indexOf(` `);return t>=0?e.slice(0,t):e}var jk=class{full;major;minor;patch;constructor(i){this.full=i;let e=i.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},Jg=globalThis,O$=/^([1-9]|1[0-8])\./;function qN(n){return n.startsWith("0.")?!0:!O$.test(n)}var N$=3,F$="# sourceMappingURL=data:application/json;base64,",$k=class{file;sourcesContent=new Map;lines=[];lastCol0=0;hasMappings=!1;constructor(i=null){this.file=i}addSource(i,e=null){return this.sourcesContent.has(i)||this.sourcesContent.set(i,e),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(i,e,t,o){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(e!=null&&!this.sourcesContent.has(e))throw new Error(`Unknown source file "${e}"`);if(i==null)throw new Error("The column in the generated code must be provided");if(i{i.set(u,h),e.push(u),t.push(this.sourcesContent.get(u)||null)});let o="",r=0,a=0,c=0,p=0;return this.lines.forEach(u=>{r=0,o+=u.map(h=>{let _=PC(h.col0-r);return r=h.col0,h.sourceUrl!=null&&(_+=PC(i.get(h.sourceUrl)-a),a=i.get(h.sourceUrl),_+=PC(h.sourceLine0-c),c=h.sourceLine0,_+=PC(h.sourceCol0-p),p=h.sourceCol0),_}).join(","),o+=";"}),o=o.slice(0,-1),{file:this.file||"",version:N$,sourceRoot:"",sources:e,sourcesContent:t,mappings:o}}toJsComment(){return this.hasMappings?"//"+F$+R$(JSON.stringify(this,null,0)):""}};function R$(n){let i="",e=A$(n);for(let t=0;t>2),i+=Qg((o&3)<<4|(r===null?0:r>>4)),i+=r===null?"=":Qg((r&15)<<2|(a===null?0:a>>6)),i+=r===null||a===null?"=":Qg(a&63)}return i}function PC(n){n=n<0?(-n<<1)+1:n<<1;let i="";do{let e=n&31;n=n>>5,n>0&&(e=e|32),i+=Qg(e)}while(n>0);return i}var L$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Qg(n){if(n<0||n>=64)throw new Error("Can only encode value in the range [0, 63]");return L$[n]}var V$=/'|\\|\n|\r|\$/g,B$=/^[$A-Z_][0-9A-Z_$]*$/i,Hk=" ",r1=class{indent;partsLength=0;parts=[];srcSpans=[];constructor(i){this.indent=i}},z$=new Map([[st.And,"&&"],[st.Bigger,">"],[st.BiggerEquals,">="],[st.BitwiseOr,"|"],[st.BitwiseAnd,"&"],[st.Divide,"/"],[st.Assign,"="],[st.Equals,"=="],[st.Identical,"==="],[st.Lower,"<"],[st.LowerEquals,"<="],[st.Minus,"-"],[st.Modulo,"%"],[st.Exponentiation,"**"],[st.Multiply,"*"],[st.NotEquals,"!="],[st.NotIdentical,"!=="],[st.NullishCoalesce,"??"],[st.Or,"||"],[st.Plus,"+"],[st.In,"in"],[st.InstanceOf,"instanceof"],[st.AdditionAssignment,"+="],[st.SubtractionAssignment,"-="],[st.MultiplicationAssignment,"*="],[st.DivisionAssignment,"/="],[st.RemainderAssignment,"%="],[st.ExponentiationAssignment,"**="],[st.AndAssignment,"&&="],[st.OrAssignment,"||="],[st.NullishCoalesceAssignment,"??="]]),Uk=class n{_indent;static createRoot(){return new n(0)}_lines;constructor(i){this._indent=i,this._lines=[new r1(i)]}get _currentLine(){return this._lines[this._lines.length-1]}println(i,e=""){this.print(i||null,e,!0)}lineIsEmpty(){return this._currentLine.parts.length===0}lineLength(){return this._currentLine.indent*Hk.length+this._currentLine.partsLength}print(i,e,t=!1){e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(i&&i.sourceSpan||null)),t&&this._lines.push(new r1(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}toSource(){return this.sourceLines.map(i=>i.parts.length>0?i5(i.indent)+i.parts.join(""):"").join(` `)}toSourceMapGenerator(i,e=0){let t=new $k(i),o=!1,r=()=>{o||(t.addSource(i," ").addMapping(0,i,0,0),o=!0)};for(let a=0;a{t.addLine();let p=a.srcSpans,u=a.parts,h=a.indent*Hk.length,_=0;for(;_o)return t.srcSpans[r];o-=a.length}}return null}get sourceLines(){return this._lines.length&&this._lines[this._lines.length-1].parts.length===0?this._lines.slice(0,-1):this._lines}},Gk=class{_escapeDollarInStrings;lastIfCondition=null;constructor(i){this._escapeDollarInStrings=i}printLeadingComments(i,e){if(i.leadingComments!==void 0)for(let t of i.leadingComments)t instanceof t1?e.print(i,`/*${t.toString()}*/`,t.trailingNewline):t.multiline?e.print(i,`/* ${t.text} */`,t.trailingNewline):t.text.split(` `).forEach(o=>{e.println(i,`// ${o}`)})}visitExpressionStmt(i,e){return this.printLeadingComments(i,e),i.expr.visitExpression(this,e),e.println(i,";"),null}visitReturnStmt(i,e){return this.printLeadingComments(i,e),e.print(i,"return "),i.value.visitExpression(this,e),e.println(i,";"),null}visitIfStmt(i,e){this.printLeadingComments(i,e),e.print(i,"if ("),this.lastIfCondition=i.condition,i.condition.visitExpression(this,e),this.lastIfCondition=null,e.print(i,") {");let t=i.falseCase!=null&&i.falseCase.length>0;return i.trueCase.length<=1&&!t?(e.print(i," "),this.visitAllStatements(i.trueCase,e),e.removeEmptyLastLine(),e.print(i," ")):(e.println(),e.incIndent(),this.visitAllStatements(i.trueCase,e),e.decIndent(),t&&(e.println(i,"} else {"),e.incIndent(),this.visitAllStatements(i.falseCase,e),e.decIndent())),e.println(i,"}"),null}visitInvokeFunctionExpr(i,e){let t=i.fn instanceof eu;return t&&e.print(i.fn,"("),i.fn.visitExpression(this,e),t&&e.print(i.fn,")"),e.print(i,"("),this.visitAllExpressions(i.args,e,","),e.print(i,")"),null}visitTaggedTemplateLiteralExpr(i,e){return i.tag.visitExpression(this,e),i.template.visitExpression(this,e),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let t=0;t{t instanceof rm?(e.print(i,"..."),t.expression.visitExpression(this,e)):(e.print(i,`${Tp(t.key,this._escapeDollarInStrings,t.quoted)}:`),t.value.visitExpression(this,e))},i.entries,e,","),e.print(i,"}"),null}visitCommaExpr(i,e){return e.print(i,"("),this.visitAllExpressions(i.parts,e,","),e.print(i,")"),null}visitParenthesizedExpr(i,e){i.expr.visitExpression(this,e)}visitSpreadElementExpr(i,e){e.print(i,"..."),i.expression.visitExpression(this,e)}visitAllExpressions(i,e,t){this.visitAllObjects(o=>o.visitExpression(this,e),i,e,t)}visitAllObjects(i,e,t,o){let r=!1;for(let a=0;a0&&(t.lineLength()>80?(t.print(null,o,!0),r||(t.incIndent(),t.incIndent(),r=!0)):t.print(null,o,!1)),i(e[a]);r&&(t.decIndent(),t.decIndent())}visitAllStatements(i,e){i.forEach(t=>t.visitStatement(this,e))}};function Tp(n,i,e=!0){if(n==null)return null;let t=n.replace(V$,(...r)=>r[0]=="$"?i?"\\$":"$":r[0]==` `?"\\n":r[0]=="\r"?"\\r":`\\${r[0]}`);return e||!B$.test(t)?`'${t}'`:t}function i5(n){let i="";for(let e=0;et.value));return i?Ds([],e):e}function fE(n,i){return{expression:n,forwardRef:i}}function U$({expression:n,forwardRef:i}){switch(i){case 0:case 1:return n;case 2:return G$(n)}}function G$(n){return Ut(fe.forwardRef).callFn([Ds([],n)])}var a1=(function(n){return n[n.Class=0]="Class",n[n.Function=1]="Function",n})(a1||{});function wp(n){let i=Yn("__ngFactoryType__"),e=null,t=r5(n)?i:new gi(st.Or,i,n.type.value),o=null;n.deps!==null?n.deps!=="invalid"&&(o=new d_(t,o5(n.deps,n.target))):(e=Yn(`\u0275${n.name}_BaseFactory`),o=e.callFn([t]));let r=[],a=null;function c(u){let h=Yn("__ngConditionalFactory__");r.push(new Rr(h.name,yh,Ol));let _=o!==null?h.set(o).toStmt():Ut(fe.invalidFactory).callFn([]).toStmt();return r.push(tb(i,[_],[h.set(u).toStmt()])),h}if(r5(n)){let u=o5(n.delegateDeps,n.target),h=new(n.delegateType===a1.Class?d_:os)(n.delegate,u);a=c(h)}else K$(n)?a=c(n.expression):a=o;if(a===null)r.push(Ut(fe.invalidFactory).callFn([]).toStmt());else if(e!==null){let u=Ut(fe.getInheritedFactory).callFn([n.type.value]),h=new gi(st.Or,e,e.set(u));r.push(new xr(h.callFn([t])))}else r.push(new xr(a));let p=am([new br(i.name,is)],r,Ol,void 0,`${n.name}_Factory`);return e!==null&&(p=Ds([],[new Rr(e.name),new xr(p)]).callFn([],void 0,!0)),{expression:p,statements:[],type:W$(n)}}function W$(n){let i=n.deps!==null&&n.deps!=="invalid"?Q$(n.deps):yc;return ra(Ut(fe.FactoryDeclaration,[nb(n.type.type,n.typeArgumentCount),i]))}function o5(n,i){return n.map((e,t)=>q$(e,i,t))}function q$(n,i,e){if(n.token===null)return Ut(fe.invalidFactoryDep).callFn([Te(e)]);if(n.attributeNameType===null){let t=0|(n.self?2:0)|(n.skipSelf?4:0)|(n.host?1:0)|(n.optional?8:0)|(i===gd.Pipe?16:0),o=t!==0||n.optional?Te(t):null,r=[n.token];o&&r.push(o);let a=Y$(i);return Ut(a).callFn(r)}else return Ut(fe.injectAttribute).callFn([n.token])}function Q$(n){let i=!1,e=n.map(t=>{let o=X$(t);return o!==null?(i=!0,o):Te(null)});return i?ra(Gi(e)):yc}function X$(n){let i=[];return n.attributeNameType!==null&&i.push({key:"attribute",value:n.attributeNameType,quoted:!1}),n.optional&&i.push({key:"optional",value:Te(!0),quoted:!1}),n.host&&i.push({key:"host",value:Te(!0),quoted:!1}),n.self&&i.push({key:"self",value:Te(!0),quoted:!1}),n.skipSelf&&i.push({key:"skipSelf",value:Te(!0),quoted:!1}),i.length>0?nl(i):null}function r5(n){return n.delegateType!==void 0}function K$(n){return n.expression!==void 0}function Y$(n){switch(n){case gd.Component:case gd.Directive:case gd.Pipe:return fe.directiveInject;case gd.NgModule:case gd.Injectable:default:return fe.inject}}var Up=class{start;end;constructor(i,e){this.start=i,this.end=e}toAbsolute(i){return new Ms(i+this.start,i+this.end)}},to=class{span;sourceSpan;constructor(i,e){this.span=i,this.sourceSpan=e}toString(){return"AST"}},f_=class extends to{nameSpan;constructor(i,e,t){super(i,e),this.nameSpan=t}},_a=class extends to{visit(i,e=null){return i.visitEmptyExpr?.(this,e)}},Mc=class extends to{visit(i,e=null){return i.visitImplicitReceiver(this,e)}},g_=class extends to{visit(i,e=null){return i.visitThisReceiver?.(this,e)}},Sh=class extends to{expressions;constructor(i,e,t){super(i,e),this.expressions=t}visit(i,e=null){return i.visitChain(this,e)}},s1=class extends to{condition;trueExp;falseExp;constructor(i,e,t,o,r){super(i,e),this.condition=t,this.trueExp=o,this.falseExp=r}visit(i,e=null){return i.visitConditional(this,e)}},Cc=class extends f_{receiver;name;constructor(i,e,t,o,r){super(i,e,t),this.receiver=o,this.name=r}visit(i,e=null){return i.visitPropertyRead(this,e)}},__=class extends f_{receiver;name;constructor(i,e,t,o,r){super(i,e,t),this.receiver=o,this.name=r}visit(i,e=null){return i.visitSafePropertyRead(this,e)}},Gp=class extends to{receiver;key;constructor(i,e,t,o){super(i,e),this.receiver=t,this.key=o}visit(i,e=null){return i.visitKeyedRead(this,e)}},v_=class extends to{receiver;key;constructor(i,e,t,o){super(i,e),this.receiver=t,this.key=o}visit(i,e=null){return i.visitSafeKeyedRead(this,e)}},HC=(function(n){return n[n.ReferencedByName=0]="ReferencedByName",n[n.ReferencedDirectly=1]="ReferencedDirectly",n})(HC||{}),l1=class extends f_{exp;name;args;type;constructor(i,e,t,o,r,a,c){super(i,e,c),this.exp=t,this.name=o,this.args=r,this.type=a}visit(i,e=null){return i.visitPipe(this,e)}},Ja=class extends to{value;constructor(i,e,t){super(i,e),this.value=t}visit(i,e=null){return i.visitLiteralPrimitive(this,e)}},C_=class extends to{expressions;constructor(i,e,t){super(i,e),this.expressions=t}visit(i,e=null){return i.visitLiteralArray(this,e)}},c1=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitSpreadElement(this,e)}},Wp=class extends to{keys;values;constructor(i,e,t,o){super(i,e),this.keys=t,this.values=o}visit(i,e=null){return i.visitLiteralMap(this,e)}},a0=class extends to{strings;expressions;constructor(i,e,t,o){super(i,e),this.strings=t,this.expressions=o}visit(i,e=null){return i.visitInterpolation(this,e)}},Na=class extends to{operation;left;right;constructor(i,e,t,o,r){super(i,e),this.operation=t,this.left=o,this.right=r}visit(i,e=null){return i.visitBinary(this,e)}static isAssignmentOperation(i){return i==="="||i==="+="||i==="-="||i==="*="||i==="/="||i==="%="||i==="**="||i==="&&="||i==="||="||i==="??="}},gh=class n extends Na{operator;expr;left=null;right=null;operation=null;static createMinus(i,e,t){return new n(i,e,"-",t,"-",new Ja(i,e,0),t)}static createPlus(i,e,t){return new n(i,e,"+",t,"-",t,new Ja(i,e,0))}constructor(i,e,t,o,r,a,c){super(i,e,r,a,c),this.operator=t,this.expr=o}visit(i,e=null){return i.visitUnary!==void 0?i.visitUnary(this,e):i.visitBinary(this,e)}},b_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitPrefixNot(this,e)}},x_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitTypeofExpression(this,e)}},y_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitVoidExpression(this,e)}},S_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitNonNullAssert(this,e)}},wh=class extends to{receiver;args;argumentSpan;constructor(i,e,t,o,r){super(i,e),this.receiver=t,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitCall(this,e)}},d1=class extends to{receiver;args;argumentSpan;constructor(i,e,t,o,r){super(i,e),this.receiver=t,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitSafeCall(this,e)}},w_=class extends to{tag;template;constructor(i,e,t,o){super(i,e),this.tag=t,this.template=o}visit(i,e){return i.visitTaggedTemplateLiteral(this,e)}},M_=class extends to{elements;expressions;constructor(i,e,t,o){super(i,e),this.elements=t,this.expressions=o}visit(i,e){return i.visitTemplateLiteral(this,e)}},m1=class extends to{text;constructor(i,e,t){super(i,e),this.text=t}visit(i,e){return i.visitTemplateLiteralElement(this,e)}},k_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e){return i.visitParenthesizedExpression(this,e)}},Wk=class{name;span;sourceSpan;constructor(i,e,t){this.name=i,this.span=e,this.sourceSpan=t}},p1=class extends to{parameters;body;constructor(i,e,t,o){super(i,e),this.parameters=t,this.body=o}visit(i,e){return i.visitArrowFunction(this,e)}},u1=class extends to{body;flags;constructor(i,e,t,o){super(i,e),this.body=t,this.flags=o}visit(i,e){return i.visitRegularExpressionLiteral(this,e)}},Ms=class{start;end;constructor(i,e){this.start=i,this.end=e}},ts=class extends to{ast;source;location;errors;constructor(i,e,t,o,r){super(new Up(0,e===null?0:e.length),new Ms(o,e===null?o:o+e.length)),this.ast=i,this.source=e,this.location=t,this.errors=r}visit(i,e=null){return i.visitASTWithSource?i.visitASTWithSource(this,e):this.ast.visit(i,e)}toString(){return`${this.source} in ${this.location}`}},T_=class{sourceSpan;key;value;constructor(i,e,t){this.sourceSpan=i,this.key=e,this.value=t}},qk=class{sourceSpan;key;value;constructor(i,e,t){this.sourceSpan=i,this.key=e,this.value=t}},Mh=class{visit(i,e){i.visit(this,e)}visitUnary(i,e){this.visit(i.expr,e)}visitBinary(i,e){this.visit(i.left,e),this.visit(i.right,e)}visitChain(i,e){this.visitAll(i.expressions,e)}visitConditional(i,e){this.visit(i.condition,e),this.visit(i.trueExp,e),this.visit(i.falseExp,e)}visitPipe(i,e){this.visit(i.exp,e),this.visitAll(i.args,e)}visitImplicitReceiver(i,e){}visitThisReceiver(i,e){}visitInterpolation(i,e){this.visitAll(i.expressions,e)}visitKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitLiteralArray(i,e){this.visitAll(i.expressions,e)}visitLiteralMap(i,e){this.visitAll(i.values,e)}visitLiteralPrimitive(i,e){}visitPrefixNot(i,e){this.visit(i.expression,e)}visitTypeofExpression(i,e){this.visit(i.expression,e)}visitVoidExpression(i,e){this.visit(i.expression,e)}visitNonNullAssert(i,e){this.visit(i.expression,e)}visitPropertyRead(i,e){this.visit(i.receiver,e)}visitSafePropertyRead(i,e){this.visit(i.receiver,e)}visitSafeKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitSafeCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitTemplateLiteral(i,e){for(let t=0;tt!==null);hk(i,e)}visitTriggers(i,e,t){hk(t,i.map(o=>e[o]))}},C1=class extends rs{expression;groups;unknownBlocks;exhaustiveCheck;constructor(i,e,t,o,r,a,c,p){super(p,r,a,c),this.expression=i,this.groups=e,this.unknownBlocks=t,this.exhaustiveCheck=o}visit(i){return i.visitSwitchBlock(this)}},iT=class extends rs{expression;constructor(i,e,t,o,r){super(r,e,t,o),this.expression=i}visit(i){return i.visitSwitchBlockCase(this)}},A_=class extends rs{cases;children;i18n;constructor(i,e,t,o,r,a,c){super(a,t,o,r),this.cases=i,this.children=e,this.i18n=c}visit(i){return i.visitSwitchBlockCaseGroup(this)}},oT=class extends rs{constructor(i,e,t,o){super(o,i,e,t)}visit(i){return i.visitSwitchExhaustiveCheck(this)}},Eh=class extends rs{item;expression;trackBy;trackKeywordSpan;contextVariables;children;empty;mainBlockSpan;i18n;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x){super(S,p,h,_),this.item=i,this.expression=e,this.trackBy=t,this.trackKeywordSpan=o,this.contextVariables=r,this.children=a,this.empty=c,this.mainBlockSpan=u,this.i18n=x}visit(i){return i.visitForLoopBlock(this)}},O_=class extends rs{children;i18n;constructor(i,e,t,o,r,a){super(r,e,t,o),this.children=i,this.i18n=a}visit(i){return i.visitForLoopBlockEmpty(this)}},b1=class extends rs{branches;constructor(i,e,t,o,r){super(r,e,t,o),this.branches=i}visit(i){return i.visitIfBlock(this)}},Ap=class extends rs{expression;children;expressionAlias;i18n;constructor(i,e,t,o,r,a,c,p){super(c,o,r,a),this.expression=i,this.children=e,this.expressionAlias=t,this.i18n=p}visit(i){return i.visitIfBlockBranch(this)}},x1=class{name;sourceSpan;nameSpan;constructor(i,e,t){this.name=i,this.sourceSpan=e,this.nameSpan=t}visit(i){return i.visitUnknownBlock(this)}},gE=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.nameSpan=o,this.valueSpan=r}visit(i){return i.visitLetDeclaration(this)}},e_=class{componentName;tagName;fullName;attributes;inputs;outputs;directives;children;references;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x,b){this.componentName=i,this.tagName=e,this.fullName=t,this.attributes=o,this.inputs=r,this.outputs=a,this.directives=c,this.children=p,this.references=u,this.isSelfClosing=h,this.sourceSpan=_,this.startSourceSpan=S,this.endSourceSpan=x,this.i18n=b}visit(i){return i.visitComponent(this)}},QN=class{name;attributes;inputs;outputs;references;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,p,u){this.name=i,this.attributes=e,this.inputs=t,this.outputs=o,this.references=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=p,this.i18n=u}visit(i){return i.visitDirective(this)}},ks=class{tagName;attributes;inputs;outputs;directives;templateAttrs;children;references;variables;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x,b){this.tagName=i,this.attributes=e,this.inputs=t,this.outputs=o,this.directives=r,this.templateAttrs=a,this.children=c,this.references=p,this.variables=u,this.isSelfClosing=h,this.sourceSpan=_,this.startSourceSpan=S,this.endSourceSpan=x,this.i18n=b}visit(i){return i.visitTemplate(this)}},Dh=class{selector;attributes;children;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;name="ng-content";constructor(i,e,t,o,r,a,c,p){this.selector=i,this.attributes=e,this.children=t,this.isSelfClosing=o,this.sourceSpan=r,this.startSourceSpan=a,this.endSourceSpan=c,this.i18n=p}visit(i){return i.visitContent(this)}},sm=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitVariable(this)}},N_=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitReference(this)}},XN=class{vars;placeholders;sourceSpan;i18n;constructor(i,e,t,o){this.vars=i,this.placeholders=e,this.sourceSpan=t,this.i18n=o}visit(i){return i.visitIcu(this)}},F_=class{tagNames;bindings;listeners;sourceSpan;constructor(i,e,t,o){if(this.tagNames=i,this.bindings=e,this.listeners=t,this.sourceSpan=o,i.length===0)throw new Error("HostElement must have at least one tag name.")}visit(){throw new Error("HostElement cannot be visited")}};function hk(n,i){let e=[];if(n.visit)for(let t of i)n.visit(t);else for(let t of i){let o=t.visit(n);o&&e.push(o)}return e}var za=class{nodes;placeholders;placeholderToMessage;meaning;description;customId;sources;id;legacyIds=[];messageString;constructor(i,e,t,o,r,a){this.nodes=i,this.placeholders=e,this.placeholderToMessage=t,this.meaning=o,this.description=r,this.customId=a,this.id=this.customId,this.messageString=J$(this.nodes),i.length?this.sources=[{filePath:i[0].sourceSpan.start.file.url,startLine:i[0].sourceSpan.start.line+1,startCol:i[0].sourceSpan.start.col+1,endLine:i[i.length-1].sourceSpan.end.line+1,endCol:i[0].sourceSpan.start.col+1}]:this.sources=[]}},Vg=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitText(this,e)}},Cd=class{children;sourceSpan;constructor(i,e){this.children=i,this.sourceSpan=e}visit(i,e){return i.visitContainer(this,e)}},y1=class{expression;type;cases;sourceSpan;expressionPlaceholder;constructor(i,e,t,o,r){this.expression=i,this.type=e,this.cases=t,this.sourceSpan=o,this.expressionPlaceholder=r}visit(i,e){return i.visitIcu(this,e)}},lm=class{tag;attrs;startName;closeName;children;isVoid;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,p,u){this.tag=i,this.attrs=e,this.startName=t,this.closeName=o,this.children=r,this.isVoid=a,this.sourceSpan=c,this.startSourceSpan=p,this.endSourceSpan=u}visit(i,e){return i.visitTagPlaceholder(this,e)}},R_=class{value;name;sourceSpan;constructor(i,e,t){this.value=i,this.name=e,this.sourceSpan=t}visit(i,e){return i.visitPlaceholder(this,e)}},Ph=class{value;name;sourceSpan;previousMessage;constructor(i,e,t){this.value=i,this.name=e,this.sourceSpan=t}visit(i,e){return i.visitIcuPlaceholder(this,e)}},cm=class{name;parameters;startName;closeName;children;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,p){this.name=i,this.parameters=e,this.startName=t,this.closeName=o,this.children=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=p}visit(i,e){return i.visitBlockPlaceholder(this,e)}};function J$(n){let i=new rT;return n.map(t=>t.visit(i)).join("")}var rT=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(t=>`${t} {${i.cases[t].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){let e=i.children.map(t=>t.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}visitPlaceholder(i){return`{$${i.name}}`}visitIcuPlaceholder(i){return`{$${i.name}}`}visitBlockPlaceholder(i){let e=i.children.map(t=>t.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}};var eH=class{visitTag(i){let e=this._serializeAttributes(i.attrs);if(i.children.length==0)return`<${i.name}${e}/>`;let t=i.children.map(o=>o.visit(this));return`<${i.name}${e}>${t.join("")}`}visitText(i){return i.value}visitDeclaration(i){return``}_serializeAttributes(i){let e=Object.keys(i).map(t=>`${t}="${i[t]}"`).join(" ");return e.length>0?" "+e:""}visitDoctype(i){return``}},h5e=new eH;function tH(n){return n.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}var KN="i18n",aT="i18n-",nH="VAR_";function YN(n){return n===KN||n.startsWith(aT)}function iH(n){return n.attrs.some(i=>YN(i.name))}function ZN(n){return n.nodes[0]}function _E(n={},i){let e={};return n&&Object.keys(n).length&&Object.keys(n).forEach(t=>e[s0(t,i)]=n[t]),e}function s0(n,i=!0){let e=tH(n);if(!i)return e;let t=e.split("_");if(t.length===1)return n.toLowerCase();let o;/^\d+$/.test(t[t.length-1])&&(o=t.pop());let r=t.shift().toLowerCase();return t.length&&(r+=t.map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join("")),o?`${r}_${o}`:r}var oH=/[-.]/,vE="_t",Ps="ctx",Vh="rf";function JN(n,i){let e=null;return()=>(e||(n(new Rr(vE,void 0,is)),e=Yn(i)),e)}function mh(n){return Array.isArray(n)?Gi(n.map(mh)):Te(n,Ol)}function s5(n,i){let e=Object.getOwnPropertyNames(n);return e.length===0?null:nl(e.map(t=>{let o=n[t],r,a,c,p;if(typeof o=="string")r=t,c=t,a=o,p=mh(a);else{c=t,r=o.classPropertyName,a=o.bindingPropertyName;let u=a!==r,h=o.transformFunction!==null,_=qg.None;if(o.isSignal&&(_|=qg.SignalBased),h&&(_|=qg.HasDecoratorInputTransform),i&&(u||h||_!==qg.None)){let S=[Te(_),mh(a)];(u||h)&&(S.push(mh(r)),h&&S.push(o.transformFunction)),p=Gi(S)}else p=mh(a)}return{key:c,quoted:oH.test(c),value:p}}))}var dm=class{values=[];set(i,e){if(e){let t=this.values.find(o=>o.key===i);t?t.value=e:this.values.push({key:i,value:e,quoted:!1})}}toLiteralMap(){return nl(this.values)}};function rH(n){let i=n instanceof kc?n.name:"ng-template",e=aH(n),t=new vh,o=Ll(i)[1];return t.setElement(o),Object.getOwnPropertyNames(e).forEach(r=>{let a=Ll(r)[1],c=e[r];t.addAttribute(a,c),r.toLowerCase()==="class"&&c.trim().split(/\s+/).forEach(u=>t.addClassName(u))}),t}function aH(n){let i={};return n instanceof ks&&n.tagName!=="ng-template"?n.templateAttrs.forEach(e=>i[e.name]=""):(n.attributes.forEach(e=>{YN(e.name)||(i[e.name]=e.value)}),n.inputs.forEach(e=>{(e.type===Ti.Property||e.type===Ti.TwoWay)&&(i[e.name]="")}),n.outputs.forEach(e=>{i[e.name]=""})),i}function l5(n,i){let e=null,t={name:n.name,type:n.type,typeArgumentCount:n.typeArgumentCount,deps:[],target:gd.Injectable};if(n.useClass!==void 0){let c=n.useClass.expression.isEquivalent(n.type.value),p;n.deps!==void 0&&(p=n.deps),p!==void 0?e=wp(it(K({},t),{delegate:n.useClass.expression,delegateDeps:p,delegateType:a1.Class})):c?e=wp(t):e={statements:[],expression:c5(n.type.value,n.useClass.expression,i)}}else n.useFactory!==void 0?n.deps!==void 0?e=wp(it(K({},t),{delegate:n.useFactory,delegateDeps:n.deps||[],delegateType:a1.Function})):e={statements:[],expression:Ds([],n.useFactory.callFn([]))}:n.useValue!==void 0?e=wp(it(K({},t),{expression:n.useValue.expression})):n.useExisting!==void 0?e=wp(it(K({},t),{expression:Ut(fe.inject).callFn([n.useExisting.expression])})):e={statements:[],expression:c5(n.type.value,n.type.value,i)};let o=n.type.value,r=new dm;return r.set("token",o),r.set("factory",e.expression),n.providedIn.expression.value!==null&&r.set("providedIn",U$(n.providedIn)),{expression:Ut(fe.\u0275\u0275defineInjectable).callFn([r.toLiteralMap()],void 0,!0),type:sH(n),statements:e.statements}}function sH(n){return new tl(Ut(fe.InjectableDeclaration,[nb(n.type.type,n.typeArgumentCount)]))}function c5(n,i,e){if(n.node===i.node)return i.prop("\u0275fac");if(!e)return d5(i);let t=Ut(fe.resolveForwardRef).callFn([i]);return d5(t)}function d5(n){let i=new br("__ngFactoryType__",is);return Ds([i],n.prop("\u0275fac").callFn([Yn(i.name)]))}var Gr=0,lH=8,CE=9,Op=10,eF=11,tF=12,bE=13,nF=32,sT=33,L_=34,iF=35,ob=36,cH=37,S1=38,V_=39,Va=40,Cr=41,m5=42,oF=43,va=44,w1=45,yp=46,Qs=47,_c=58,es=59,_h=60,Hr=61,Ss=62,p5=63,xE=48,dH=55,rF=57,gm=65,mH=69,pH=70,uH=88,Bh=90,bc=91,Np=92,_d=93,hH=94,_m=95,Qp=97,fH=98,gH=101,yE=102,aF=110,sF=114,lF=116,cF=117,dF=118,mF=120,l0=122,Ys=123,u5=124,Ra=125,pF=160,nh=64,lT=96;function B_(n){return n>=CE&&n<=nF||n==pF}function Xs(n){return xE<=n&&n<=rF}function mm(n){return n>=Qp&&n<=l0||n>=gm&&n<=Bh}function _H(n){return n>=Qp&&n<=yE||n>=gm&&n<=pH||Xs(n)}function M1(n){return n===Op||n===bE}function h5(n){return xE<=n&&n<=dH}function t_(n){return n===V_||n===L_||n===lT}var z_=class n{file;offset;line;col;constructor(i,e,t,o){this.file=i,this.offset=e,this.line=t,this.col=o}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(i){let e=this.file.content,t=e.length,o=this.offset,r=this.line,a=this.col;for(;o>0&&i<0;)if(o--,i++,e.charCodeAt(o)==Op){r--;let p=e.substring(0,o-1).lastIndexOf(String.fromCharCode(Op));a=p>0?o-p:o}else a--;for(;o0;){let c=e.charCodeAt(o);o++,i--,c==Op?(r++,a=0):a++}return new n(this.file,o,r,a)}getContext(i,e){let t=this.file.content,o=this.offset;if(o!=null){o>t.length-1&&(o=t.length-1);let r=o,a=0,c=0;for(;a0&&(o--,a++,!(t[o]==` `&&++c==e)););for(a=0,c=0;a]${i.after}")`:this.msg}toString(){let i=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${i}`}};function vH(n,i,e){let t=`in ${n} ${i} in ${e}`,o=new k1("",t);return new gn(new z_(o,-1,-1,-1),new z_(o,-1,-1,-1))}var CH=0;function bH(n){if(!n||!n.reference)return null;let i=n.reference;if(i.__anonymousType)return i.__anonymousType;if(i.__forward_ref__)return"__forward_ref__";let e=WN(i);return e.indexOf("(")>=0?(e=`anonymous_${CH++}`,i.__anonymousType=e):e=Mp(e),e}function Mp(n){return n.replace(/\W/g,"_")}var f5='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})',cT=class extends Gk{constructor(){super(!1)}visitWrappedNodeExpr(i,e){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(i,e){return e.print(i,`var ${i.name}`),i.value&&(e.print(i," = "),i.value.visitExpression(this,e)),e.println(i,";"),null}visitTaggedTemplateLiteralExpr(i,e){let t=i.template.elements;return i.tag.visitExpression(this,e),e.print(i,`(${f5}(`),e.print(i,`[${t.map(o=>Tp(o.text,!1)).join(", ")}], `),e.print(i,`[${t.map(o=>Tp(o.rawText,!1)).join(", ")}])`),i.template.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let t=0;t"),Array.isArray(i.body))e.println(i,"{"),e.incIndent(),this.visitAllStatements(i.body,e),e.decIndent(),e.print(i,"}");else{let t=i.body instanceof Rl;t&&e.print(i,"("),i.body.visitExpression(this,e),t&&e.print(i,")")}return null}visitDeclareFunctionStmt(i,e){return e.print(i,`function ${i.name}(`),this._visitParams(i.params,e),e.println(i,") {"),e.incIndent(),this.visitAllStatements(i.statements,e),e.decIndent(),e.println(i,"}"),null}visitLocalizedString(i,e){e.print(i,`$localize(${f5}(`);let t=[i.serializeI18nHead()];for(let o=1;oTp(o.cooked,!1)).join(", ")}], `),e.print(i,`[${t.map(o=>Tp(o.raw,!1)).join(", ")}])`),i.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}_visitParams(i,e){this.visitAllObjects(t=>e.print(null,t.name),i,e,",")}},IC;function xH(){if(IC===void 0){let n=Jg.trustedTypes;if(IC=null,n)try{IC=n.createPolicy("angular#unsafe-jit",{createScript:i=>i})}catch{}}return IC}function yH(n){return xH()?.createScript(n)||n}function g5(...n){if(!Jg.trustedTypes)return new Function(...n);let i=n.slice(0,-1).join(","),e=n[n.length-1],t=`(function anonymous(${i} ) { ${e} })`,o=Jg.eval(yH(t));return o.bind===void 0?new Function(...n):(o.toString=()=>t,o.bind(Jg))}var dT=class{evaluateStatements(i,e,t,o){let r=new mT(t),a=Uk.createRoot();return e.length>0&&!SH(e[0])&&(e=[Te("use strict").toStmt(),...e]),r.visitAllStatements(e,a),r.createReturnStmt(a),this.evaluateCode(i,a,r.getArgs(),o)}evaluateCode(i,e,t,o){let r=`"use strict";${e.toSource()} //# sourceURL=${i}`,a=[],c=[];for(let u in t)c.push(t[u]),a.push(u);if(o){let u=g5(...a.concat("return null;")).toString(),h=u.slice(0,u.indexOf("return null;")).split(` `).length-1;r+=` ${e.toSourceMapGenerator(i,h).toJsComment()}`}let p=g5(...a.concat(r));return this.executeFunction(p,c)}executeFunction(i,e){return i(...e)}},mT=class extends cT{refResolver;_evalArgNames=[];_evalArgValues=[];_evalExportedVars=[];constructor(i){super(),this.refResolver=i}createReturnStmt(i){new xr(new Rl(this._evalExportedVars.map(t=>new xh(t,Yn(t),!1)))).visitStatement(this,i)}getArgs(){let i={};for(let e=0;e0&&i.set("imports",Gi(n.imports));let e=Ut(fe.defineInjector).callFn([i.toLiteralMap()],void 0,!0),t=wH(n);return{expression:e,type:t,statements:[]}}function wH(n){return new tl(Ut(fe.InjectorDeclaration,[new tl(n.type.type)]))}var pT=class{context;constructor(i){this.context=i}resolveExternalReference(i){if(i.moduleName!=="@angular/core")throw new Error(`Cannot resolve external reference to ${i.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(i.name))throw new Error(`No value provided for @angular/core symbol '${i.name}'.`);return this.context[i.name]}},T1=(function(n){return n[n.Inline=0]="Inline",n[n.SideEffect=1]="SideEffect",n[n.Omit=2]="Omit",n})(T1||{}),im=(function(n){return n[n.Global=0]="Global",n[n.Local=1]="Local",n})(im||{});function MH(n){let i=[],e=new dm;if(e.set("type",n.type.value),n.kind===im.Global&&n.bootstrap.length>0&&e.set("bootstrap",Ep(n.bootstrap,n.containsForwardDecls)),n.selectorScopeMode===T1.Inline)n.declarations.length>0&&e.set("declarations",Ep(n.declarations,n.containsForwardDecls)),n.imports.length>0&&e.set("imports",Ep(n.imports,n.containsForwardDecls)),n.exports.length>0&&e.set("exports",Ep(n.exports,n.containsForwardDecls));else if(n.selectorScopeMode===T1.SideEffect){let r=EH(n);r!==null&&i.push(r)}n.schemas!==null&&n.schemas.length>0&&e.set("schemas",Gi(n.schemas.map(r=>r.value))),n.id!==null&&(e.set("id",n.id),i.push(Ut(fe.registerNgModuleType).callFn([n.type.value,n.id]).toStmt()));let t=Ut(fe.defineNgModule).callFn([e.toLiteralMap()],void 0,!0),o=TH(n);return{expression:t,type:o,statements:i}}function kH(n){let i=new dm;return i.set("type",new oi(n.type)),n.bootstrap!==void 0&&i.set("bootstrap",new oi(n.bootstrap)),n.declarations!==void 0&&i.set("declarations",new oi(n.declarations)),n.imports!==void 0&&i.set("imports",new oi(n.imports)),n.exports!==void 0&&i.set("exports",new oi(n.exports)),n.schemas!==void 0&&i.set("schemas",new oi(n.schemas)),n.id!==void 0&&i.set("id",new oi(n.id)),Ut(fe.defineNgModule).callFn([i.toLiteralMap()])}function TH(n){if(n.kind===im.Local)return new tl(n.type.value);let{type:i,declarations:e,exports:t,imports:o,includeImportTypes:r,publicDeclarationTypes:a}=n;return new tl(Ut(fe.NgModuleDeclaration,[new tl(i.type),a===null?fk(e):DH(a),r?fk(o):yc,fk(t)]))}function EH(n){let i=new dm;if(n.kind===im.Global?n.declarations.length>0&&i.set("declarations",Ep(n.declarations,n.containsForwardDecls)):n.declarationsExpression&&i.set("declarations",n.declarationsExpression),n.kind===im.Global?n.imports.length>0&&i.set("imports",Ep(n.imports,n.containsForwardDecls)):n.importsExpression&&i.set("imports",n.importsExpression),n.kind===im.Global?n.exports.length>0&&i.set("exports",Ep(n.exports,n.containsForwardDecls)):n.exportsExpression&&i.set("exports",n.exportsExpression),n.kind===im.Local&&n.bootstrapExpression&&i.set("bootstrap",n.bootstrapExpression),Object.keys(i.values).length===0)return null;let e=new os(Ut(fe.setNgModuleScope),[n.type.value,i.toLiteralMap()]),t=$$(e),o=new om([],[t.toStmt()]);return new os(o,[]).toStmt()}function fk(n){let i=n.map(e=>r0(e.type));return n.length>0?ra(Gi(i)):yc}function DH(n){let i=n.map(e=>r0(e));return n.length>0?ra(Gi(i)):yc}function v5(n){let i=[];i.push({key:"name",value:Te(n.pipeName??n.name),quoted:!1}),i.push({key:"type",value:n.type.value,quoted:!1}),i.push({key:"pure",value:Te(n.pure),quoted:!1}),n.isStandalone===!1&&i.push({key:"standalone",value:Te(!1),quoted:!1});let e=Ut(fe.definePipe).callFn([nl(i)],void 0,!0),t=PH(n);return{expression:e,type:t,statements:[]}}function PH(n){return new tl(Ut(fe.PipeDeclaration,[nb(n.type.type,n.typeArgumentCount),new tl(new aa(n.pipeName)),new tl(new aa(n.isStandalone))]))}var Ih=(function(n){return n[n.Directive=0]="Directive",n[n.Pipe=1]="Pipe",n[n.NgModule=2]="NgModule",n})(Ih||{}),IH=new Set(["inherit","initial","revert","unset","alternate","alternate-reverse","normal","reverse","backwards","both","forwards","none","paused","running","ease","ease-in","ease-in-out","ease-out","linear","step-start","step-end","end","jump-both","jump-end","jump-none","jump-start","start"]),AH=["@media","@supports","@document","@layer","@container","@scope","@starting-style"],uT=class{shimCssText(i,e,t=""){let o=[];i=i.replace(QH,c=>{if(c.match(XH))o.push(c);else{let p=c.match(qH);o.push(p?.join("")??"")}return wE}),i=this._insertDirectives(i);let r=this._scopeCssText(i,e,t),a=0;return r.replace(KH,()=>o[a++])}_insertDirectives(i){return i=this._insertPolyfillDirectivesInCssText(i),this._insertPolyfillRulesInCssText(i)}_scopeKeyframesRelatedCss(i,e){let t=new Set,o=AC(i,r=>this._scopeLocalKeyframeDeclarations(r,e,t));return AC(o,r=>this._scopeAnimationRule(r,e,t))}_scopeLocalKeyframeDeclarations(i,e,t){return it(K({},i),{selector:i.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(o,r,a,c,p)=>(t.add(x5(c,a)),`${r}${a}${e}_${c}${a}${p}`))})}_scopeAnimationKeyframe(i,e,t){return i.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(o,r,a,c,p)=>(c=`${t.has(x5(c,a))?e+"_":""}${c}`,`${r}${a}${c}${a}${p}`))}_animationDeclarationKeyframesRe=/(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;_scopeAnimationRule(i,e,t){let o=i.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g,(r,a,c)=>a+c.replace(this._animationDeclarationKeyframesRe,(p,u,h="",_,S)=>_?`${u}${this._scopeAnimationKeyframe(`${h}${_}${h}`,e,t)}`:IH.has(S)?p:`${u}${this._scopeAnimationKeyframe(S,e,t)}`));return o=o.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(r,a,c)=>`${a}${c.split(",").map(p=>this._scopeAnimationKeyframe(p,e,t)).join(",")}`),it(K({},i),{content:o})}_insertPolyfillDirectivesInCssText(i){return i.replace(NH,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(i){return i.replace(FH,(...e)=>{let t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(i,e,t){let o=this._extractUnscopedRulesFromCssText(i);return i=this._insertPolyfillHostInCssText(i),i=this._convertColonHost(i),i=this._convertColonHostContext(i),i=this._convertShadowDOMSelectors(i),e&&(i=this._scopeKeyframesRelatedCss(i,e),i=this._scopeSelectors(i,e,t)),i=i+` `+o,i.trim()}_extractUnscopedRulesFromCssText(i){let e="",t;for(C5.lastIndex=0;(t=C5.exec(i))!==null;){let o=t[0].replace(t[2],"").replace(t[1],t[4]);e+=o+` `}return e}_convertColonHost(i){return i.replace(BH,(e,t,o)=>{if(t){let r=[];for(let a of this._splitOnTopLevelCommas(t,!0)){let c=a.trim();if(!c)break;let p=Jd+c.replace(E1,"")+o;r.push(p)}return r.join(",")}else return Jd+o})}*_splitOnTopLevelCommas(i,e){let t=i.length,o=0,r=0;for(let a=0;a{let o=[[]],r=e.indexOf(lh);for(;r!==-1;){let a=e.substring(r+lh.length);if(!a||a[0]!=="("){e=a,r=e.indexOf(lh);continue}let c=[],p=0;for(let h of this._splitOnTopLevelCommas(a.substring(1),!0)){p=p+h.length+1;let _=h.trim();_&&c.push(_)}let u=o.length;sU(o,c.length);for(let h=0;haU(a,e,t)).join(", ")})}_convertShadowDOMSelectors(i){return HH.reduce((e,t)=>e.replace(t," "),i)}_scopeSelectors(i,e,t){return AC(i,o=>{let r=o.selector,a=o.content;return o.selector[0]!=="@"?r=this._scopeSelector({selector:r,scopeSelector:e,hostSelector:t,isParentSelector:!0}):AH.some(c=>o.selector.startsWith(c))?a=this._scopeSelectors(o.content,e,t):(o.selector.startsWith("@font-face")||o.selector.startsWith("@page"))&&(a=this._stripScopingSelectors(o.content)),new j_(r,a)})}_stripScopingSelectors(i){return AC(i,e=>{let t=e.selector.replace(b5," ").replace(gk," ");return new j_(t,e.content)})}_safeSelector;_shouldScopeIndicator;_scopeSelector({selector:i,scopeSelector:e,hostSelector:t,isParentSelector:o=!1}){let r=/ ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;return i.split(r).map(a=>a.split(b5)).map(a=>{let[c,...p]=a;return[(h=>this._selectorNeedsScoping(h,e)?this._applySelectorScope({selector:h,scopeSelector:e,hostSelector:t,isParentSelector:o}):h)(c),...p].join(" ")}).join(", ")}_selectorNeedsScoping(i,e){return!this._makeScopeMatcher(e).test(i)}_makeScopeMatcher(i){let e=/\[/g,t=/\]/g;return i=i.replace(e,"\\[").replace(t,"\\]"),new RegExp("^("+i+")"+UH,"m")}_applySimpleSelectorScope(i,e,t){if(ph.lastIndex=0,ph.test(i)){let o=`[${t}]`,r=i;for(;r.match(gk);)r=r.replace(gk,(a,c)=>c.replace(/([^:\)]*)(:*)(.*)/,(p,u,h,_)=>u+o+h+_));return r.replace(ph,o)}return e+" "+i}_applySelectorScope({selector:i,scopeSelector:e,hostSelector:t,isParentSelector:o}){let r=/\[is=([^\]]*)\]/g;e=e.replace(r,(M,...w)=>w[0]);let a=`[${e}]`,c=M=>{let w=M.trim();if(!w)return M;if(M.includes(Jd)){if(w=this._applySimpleSelectorScope(M,e,t),!M.match($H)){let[y,E,I,D]=w.match(/([^:]*)(:*)([\s\S]*)/);w=E+a+I+D}}else{let y=M.replace(ph,"");if(y.length>0){let E=y.match(/([^:]*)(:*)([\s\S]*)/);E&&(w=E[1]+a+E[2]+E[3])}}return w},p=M=>{let w="",y=[],E;for(;(E=Bg.exec(M))!==null;){let I=1,D=Bg.lastIndex;for(;D{let[D]=I.match(Bg)??[],N=I.slice(D?.length,-1);N.includes(Jd)&&(this._shouldScopeIndicator=!0);let P=this._scopeSelector({selector:N,scopeSelector:e,hostSelector:t});return`${D}${P})`}).join(""):(this._shouldScopeIndicator=this._shouldScopeIndicator||M.includes(Jd),w=this._shouldScopeIndicator?c(M):M),w};o&&(this._safeSelector=new hT(i),i=this._safeSelector.content());let u="",h=0,_,S=/( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g,x=i.includes(Jd);for((o||this._shouldScopeIndicator)&&(this._shouldScopeIndicator=!x);(_=S.exec(i))!==null;){let M=_[1],w=i.slice(h,_.index);if(w.match(/__esc-ph-(\d+)__/)&&i[_.index+1]?.match(/[a-fA-F\d]/))continue;let y=p(w);u+=`${y} ${M} `,h=S.lastIndex}let b=i.substring(h);return u+=p(b),this._safeSelector.restore(u)}_insertPolyfillHostInCssText(i){return i.replace(WH,lh).replace(GH,E1)}},hT=class{placeholders=[];index=0;_content;constructor(i){i=this._escapeRegexMatches(i,/(\[[^\]]*\])/g),i=i.replace(/(\\.)/g,(e,t)=>{let o=`__esc-ph-${this.index}__`;return this.placeholders.push(t),this.index++,o}),this._content=i.replace(VH,(e,t,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(`(${o})`),this.index++,t+r})}restore(i){return i.replace(/__(?:ph|esc-ph)-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}_escapeRegexMatches(i,e){return i.replace(e,(t,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(o),this.index++,r})}},OH="(:(where|is)\\()?",Bg=/:(where|is)\(/gi,NH=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,FH=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,C5=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,E1="-shadowcsshost",lh="-shadowcsscontext",fT="[^)(]*",RH=String.raw`(?:\(${fT}\)|${fT})+?`,LH=String.raw`(?:\(${RH}\)|${fT})+?`,SE=String.raw`(?:\((${LH})\))`,VH=new RegExp(String.raw`(:nth-[-\w]+)`+SE,"g"),BH=new RegExp(E1+SE+"?([^,{]*)","gim"),zH=lh+SE+"?([^{]*)",jH=new RegExp(`${OH}(${zH})`,"gim"),Jd=E1+"-no-combinator",$H=new RegExp(`${Jd}(?![^(]*\\))`,"g"),gk=/-shadowcsshost-no-combinator([^\s,]*)/,HH=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],b5=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,UH="([>\\s~+[.,{:][\\s\\S]*)?$",ph=/-shadowcsshost/gim,GH=/:host/gim,WH=/:host-context/gim,qH=/\r?\n/g,QH=/\/\*[\s\S]*?\*\//g,XH=/\/\*\s*#\s*source(Mapping)?URL=/g,wE="%COMMENT%",KH=new RegExp(wE,"g"),_k="%BLOCK%",YH=new RegExp(`(\\s*(?:${wE}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),ZH=new Map([["{","}"]]),uF="%COMMA_IN_PLACEHOLDER%",hF="%SEMI_IN_PLACEHOLDER%",fF="%COLON_IN_PLACEHOLDER%",JH=new RegExp(uF,"g"),eU=new RegExp(hF,"g"),tU=new RegExp(fF,"g"),j_=class{selector;content;constructor(i,e){this.selector=i,this.content=e}};function AC(n,i){let e=oU(n),t=nU(e,ZH,_k),o=0,r=t.escapedString.replace(YH,(...a)=>{let c=a[2],p="",u=a[4],h="";u&&u.startsWith("{"+_k)&&(p=t.blocks[o++],u=u.substring(_k.length+1),h="{");let _=i(new j_(c,p));return`${a[1]}${_.selector}${a[3]}${h}${_.content}${u}`});return rU(r)}var gT=class{escapedString;blocks;constructor(i,e){this.escapedString=i,this.blocks=e}};function nU(n,i,e){let t=[],o=[],r=0,a=0,c=-1,p,u;for(let h=0;h0;){let a=r.length,c=n.pop();for(let p=0;po?`${e}${a}${i}`:`${e}${a}${t}${i}, ${e}${a} ${t}${i}`).join(",")}function sU(n,i){let e=n.length;for(let t=1;t{class n{static nextListId=0;debugListId=n.nextListId++;head={kind:V.ListEnd,next:null,prev:null,debugListId:this.debugListId};tail={kind:V.ListEnd,next:null,prev:null,debugListId:this.debugListId};constructor(){this.head.next=this.tail,this.tail.prev=this.head}push(e){if(Array.isArray(e)){for(let o of e)this.push(o);return}n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=this.debugListId;let t=this.tail.prev;e.prev=t,t.next=e,e.next=this.tail,this.tail.prev=e}prepend(e){if(e.length===0)return;for(let r of e)n.assertIsNotEnd(r),n.assertIsUnowned(r),r.debugListId=this.debugListId;let t=this.head.next,o=this.head;for(let r of e)o.next=r,r.prev=o,o=r;o.next=t,t.prev=o}*[Symbol.iterator](){let e=this.head.next;for(;e!==this.tail;){n.assertIsOwned(e,this.debugListId);let t=e.next;yield e,e=t}}*reversed(){let e=this.tail.prev;for(;e!==this.head;){n.assertIsOwned(e,this.debugListId);let t=e.prev;yield e,e=t}}static replace(e,t){n.assertIsNotEnd(e),n.assertIsNotEnd(t),n.assertIsOwned(e),n.assertIsUnowned(t),t.debugListId=e.debugListId,e.prev!==null&&(e.prev.next=t,t.prev=e.prev),e.next!==null&&(e.next.prev=t,t.next=e.next),e.debugListId=null,e.prev=null,e.next=null}static replaceWithMany(e,t){if(t.length===0){n.remove(e);return}n.assertIsNotEnd(e),n.assertIsOwned(e);let o=e.debugListId;e.debugListId=null;for(let h of t)n.assertIsNotEnd(h),n.assertIsUnowned(h);let{prev:r,next:a}=e;e.prev=null,e.next=null;let c=r;for(let h of t)n.assertIsUnowned(h),h.debugListId=o,c.next=h,h.prev=c,h.next=null,c=h;let p=t[0],u=c;r!==null&&(r.next=p,p.prev=r),a!==null&&(a.prev=u,u.next=a)}static remove(e){n.assertIsNotEnd(e),n.assertIsOwned(e),e.prev.next=e.next,e.next.prev=e.prev,e.debugListId=null,e.prev=null,e.next=null}static insertBefore(e,t){if(Array.isArray(e)){for(let o of e)n.insertBefore(o,t);return}if(n.assertIsOwned(t),t.prev===null)throw new Error("AssertionError: illegal operation on list start");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,e.prev=null,t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e}static insertAfter(e,t){if(n.assertIsOwned(t),t.next===null)throw new Error("AssertionError: illegal operation on list end");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,t.next.prev=e,e.next=t.next,e.prev=t,t.next=e}static assertIsUnowned(e){if(e.debugListId!==null)throw new Error(`AssertionError: illegal operation on owned node: ${V[e.kind]}`)}static assertIsOwned(e,t){if(e.debugListId===null)throw new Error(`AssertionError: illegal operation on unowned node: ${V[e.kind]}`);if(t!==void 0&&e.debugListId!==t)throw new Error(`AssertionError: node belongs to the wrong list (expected ${t}, actual ${e.debugListId})`)}static assertIsNotEnd(e){if(e.kind===V.ListEnd)throw new Error("AssertionError: illegal operation on list head or tail")}}return n})();function Is(n){return K({kind:V.Statement,statement:n},_n)}function tm(n,i,e,t){return K({kind:V.Variable,xref:n,variable:i,initializer:e,flags:t},_n)}var _n={debugListId:null,prev:null,next:null},gF=Symbol("ConsumesSlot"),ME=Symbol("DependsOnSlotContext"),tu=Symbol("ConsumesVars"),c0=Symbol("UsesVarOffset"),il={[gF]:!0,numSlotsUsed:1},as={[ME]:!0},ss={[tu]:!0};function jh(n){return n[gF]===!0}function H_(n){return n[ME]===!0}function vk(n){return n[tu]===!0}function y5(n){return n[c0]===!0}function lU(n,i,e){return K(K(K({kind:V.InterpolateText,target:n,interpolation:i,sourceSpan:e},as),ss),_n)}var Qo=class{strings;expressions;i18nPlaceholders;constructor(i,e,t){if(this.strings=i,this.expressions=e,this.i18nPlaceholders=t,t.length!==0&&t.length!==e.length)throw new Error(`Expected ${e.length} placeholders to match interpolation expression count, but got ${t.length}`)}};function Xp(n,i,e,t,o,r,a,c,p,u,h){return K({kind:V.Binding,bindingKind:i,target:n,name:e,expression:t,unit:o,securityContext:r,isTextAttribute:a,isStructuralTemplateAttribute:c,templateKind:p,i18nContext:null,i18nMessage:u,sourceSpan:h},_n)}function cU(n,i,e,t,o,r,a,c,p,u){return K(K(K({kind:V.Property,target:n,name:i,expression:e,bindingKind:t,securityContext:o,sanitizer:null,isStructuralTemplateAttribute:r,templateKind:a,i18nContext:c,i18nMessage:p,sourceSpan:u},as),ss),_n)}function dU(n,i,e,t,o,r,a,c,p){return K(K(K({kind:V.TwoWayProperty,target:n,name:i,expression:e,securityContext:t,sanitizer:null,isStructuralTemplateAttribute:o,templateKind:r,i18nContext:a,i18nMessage:c,sourceSpan:p},as),ss),_n)}function mU(n,i,e,t,o){return K(K(K({kind:V.StyleProp,target:n,name:i,expression:e,unit:t,sourceSpan:o},as),ss),_n)}function pU(n,i,e,t){return K(K(K({kind:V.ClassProp,target:n,name:i,expression:e,sourceSpan:t},as),ss),_n)}function uU(n,i,e){return K(K(K({kind:V.StyleMap,target:n,expression:i,sourceSpan:e},as),ss),_n)}function hU(n,i,e){return K(K(K({kind:V.ClassMap,target:n,expression:i,sourceSpan:e},as),ss),_n)}function S5(n,i,e,t,o,r,a,c,p,u){return K(K(K({kind:V.Attribute,target:n,namespace:i,name:e,expression:t,securityContext:o,sanitizer:null,isTextAttribute:r,isStructuralTemplateAttribute:a,templateKind:c,i18nContext:null,i18nMessage:p,sourceSpan:u},as),ss),_n)}function fU(n,i){return K({kind:V.Advance,delta:n,sourceSpan:i},_n)}function _F(n,i,e,t){return K(K(K({kind:V.Conditional,target:n,test:i,conditions:e,processed:null,sourceSpan:t,contextValue:null},_n),as),ss)}function gU(n,i,e,t){return K(K({kind:V.Repeater,target:n,targetSlot:i,collection:e,sourceSpan:t},_n),as)}function w5(n,i,e,t,o,r,a){return K({kind:V.AnimationBinding,name:n,target:i,animationKind:e,expression:t,i18nMessage:null,securityContext:o,sanitizer:null,sourceSpan:r,animationBindingKind:a},_n)}function _U(n,i,e,t){return K(K(K({kind:V.DeferWhen,target:n,expr:i,modifier:e,sourceSpan:t},_n),as),ss)}function vF(n,i,e,t,o,r,a,c,p,u,h){return K(K(K({kind:V.I18nExpression,context:n,target:i,i18nOwner:e,handle:t,expression:o,icuPlaceholder:r,i18nPlaceholder:a,resolutionTime:c,usage:p,name:u,sourceSpan:h},_n),ss),as)}function vU(n,i,e){return K({kind:V.I18nApply,owner:n,handle:i,sourceSpan:e},_n)}function CU(n,i,e,t){return K(K(K({kind:V.StoreLet,target:n,declaredName:i,value:e,sourceSpan:t},as),ss),_n)}function bU(n,i){return K(K({kind:V.Control,sourceSpan:i,target:n},as),_n)}function Ec(n){return n instanceof Wi}var Wi=class extends Bi{constructor(i=null){super(null,i)}},Ur=class n extends Wi{name;kind=Qt.LexicalRead;constructor(i){super(),this.name=i}visitExpression(i,e){}isEquivalent(i){return this.name===i.name}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.name)}},D1=class n extends Wi{target;targetSlot;offset;kind=Qt.Reference;constructor(i,e,t){super(),this.target=i,this.targetSlot=e,this.offset=t}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot,this.offset)}},U_=class n extends Wi{target;value;sourceSpan;kind=Qt.StoreLet;[tu]=!0;[ME]=!0;constructor(i,e,t){super(),this.target=i,this.value=e,this.sourceSpan=t}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target&&i.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.value=Vt(this.value,i,e)}clone(){return new n(this.target,this.value,this.sourceSpan)}},G_=class n extends Wi{target;targetSlot;kind=Qt.ContextLetReference;constructor(i,e){super(),this.target=i,this.targetSlot=e}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot)}},pm=class n extends Wi{view;kind=Qt.Context;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},_T=class n extends Wi{view;kind=Qt.TrackContext;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},P1=class n extends Wi{kind=Qt.NextContext;steps=1;visitExpression(){}isEquivalent(i){return i instanceof n&&i.steps===this.steps}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new n;return i.steps=this.steps,i}},vT=class n extends Wi{kind=Qt.GetCurrentView;constructor(){super()}visitExpression(){}isEquivalent(i){return i instanceof n}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n}},W_=class n extends Wi{view;kind=Qt.RestoreView;constructor(i){super(),this.view=i}visitExpression(i,e){typeof this.view!="number"&&this.view.visitExpression(i,e)}isEquivalent(i){return!(i instanceof n)||typeof i.view!=typeof this.view?!1:typeof this.view=="number"?this.view===i.view:this.view.isEquivalent(i.view)}isConstant(){return!1}transformInternalExpressions(i,e){typeof this.view!="number"&&(this.view=Vt(this.view,i,e))}clone(){return new n(this.view instanceof Bi?this.view.clone():this.view)}},I1=class n extends Wi{expr;kind=Qt.ResetView;constructor(i){super(),this.expr=i}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=Vt(this.expr,i,e)}clone(){return new n(this.expr.clone())}},A1=class n extends Wi{target;value;kind=Qt.TwoWayBindingSet;constructor(i,e){super(),this.target=i,this.value=e}visitExpression(i,e){this.target.visitExpression(i,e),this.value.visitExpression(i,e)}isEquivalent(i){return this.target.isEquivalent(i.target)&&this.value.isEquivalent(i.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.target=Vt(this.target,i,e),this.value=Vt(this.value,i,e)}clone(){return new n(this.target,this.value)}},bd=class n extends Wi{xref;kind=Qt.ReadVariable;name=null;constructor(i){super(),this.xref=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.xref===this.xref}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new n(this.xref);return i.name=this.name,i}},Kp=class n extends Wi{kind=Qt.PureFunctionExpr;[tu]=!0;[c0]=!0;varOffset=null;body;args;fn=null;constructor(i,e){super(),this.body=i,this.args=e}visitExpression(i,e){this.body?.visitExpression(i,e);for(let t of this.args)t.visitExpression(i,e)}isEquivalent(i){return!(i instanceof n)||i.args.length!==this.args.length?!1:i.body!==null&&this.body!==null&&i.body.isEquivalent(this.body)&&i.args.every((e,t)=>e.isEquivalent(this.args[t]))}isConstant(){return!1}transformInternalExpressions(i,e){this.body!==null?this.body=Vt(this.body,i,e|Wn.InChildOperation):this.fn!==null&&(this.fn=Vt(this.fn,i,e));for(let t=0;te.clone()));return i.fn=this.fn?.clone()??null,i.varOffset=this.varOffset,i}},um=class n extends Wi{index;kind=Qt.PureFunctionParameterExpr;constructor(i){super(),this.index=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.index===this.index}isConstant(){return!0}transformInternalExpressions(){}clone(){return new n(this.index)}},Yp=class n extends Wi{target;targetSlot;name;args;kind=Qt.PipeBinding;[tu]=!0;[c0]=!0;varOffset=null;constructor(i,e,t,o){super(),this.target=i,this.targetSlot=e,this.name=t,this.args=o}visitExpression(i,e){for(let t of this.args)t.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){for(let t=0;te.clone()));return i.varOffset=this.varOffset,i}},q_=class n extends Wi{target;targetSlot;name;args;numArgs;kind=Qt.PipeBindingVariadic;[tu]=!0;[c0]=!0;varOffset=null;constructor(i,e,t,o,r){super(),this.target=i,this.targetSlot=e,this.name=t,this.args=o,this.numArgs=r}visitExpression(i,e){this.args.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.args=Vt(this.args,i,e)}clone(){let i=new n(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return i.varOffset=this.varOffset,i}},Ah=class n extends Wi{receiver;name;kind=Qt.SafePropertyRead;constructor(i,e){super(),this.receiver=i,this.name=e}get index(){return this.name}visitExpression(i,e){this.receiver.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Vt(this.receiver,i,e)}clone(){return new n(this.receiver.clone(),this.name)}},Oh=class n extends Wi{receiver;index;kind=Qt.SafeKeyedRead;constructor(i,e,t){super(t),this.receiver=i,this.index=e}visitExpression(i,e){this.receiver.visitExpression(i,e),this.index.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Vt(this.receiver,i,e),this.index=Vt(this.index,i,e)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.sourceSpan)}},Zp=class n extends Wi{receiver;args;kind=Qt.SafeInvokeFunction;constructor(i,e){super(),this.receiver=i,this.args=e}visitExpression(i,e){this.receiver.visitExpression(i,e);for(let t of this.args)t.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Vt(this.receiver,i,e);for(let t=0;ti.clone()))}},Nh=class n extends Wi{guard;expr;kind=Qt.SafeTernaryExpr;constructor(i,e){super(),this.guard=i,this.expr=e}visitExpression(i,e){this.guard.visitExpression(i,e),this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.guard=Vt(this.guard,i,e),this.expr=Vt(this.expr,i,e)}clone(){return new n(this.guard.clone(),this.expr.clone())}},Q_=class n extends Wi{kind=Qt.EmptyExpr;visitExpression(i,e){}isEquivalent(i){return i instanceof n}isConstant(){return!0}clone(){return new n}transformInternalExpressions(){}},Dc=class n extends Wi{expr;xref;kind=Qt.AssignTemporaryExpr;name=null;constructor(i,e){super(),this.expr=i,this.xref=e}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=Vt(this.expr,i,e)}clone(){let i=new n(this.expr.clone(),this.xref);return i.name=this.name,i}},hm=class n extends Wi{xref;kind=Qt.ReadTemporaryExpr;name=null;constructor(i){super(),this.xref=i}visitExpression(i,e){}isEquivalent(){return this.xref===this.xref}isConstant(){return!1}transformInternalExpressions(i,e){}clone(){let i=new n(this.xref);return i.name=this.name,i}},O1=class n extends Wi{slot;kind=Qt.SlotLiteralExpr;constructor(i){super(),this.slot=i}visitExpression(i,e){}isEquivalent(i){return i instanceof n&&i.slot===this.slot}isConstant(){return!0}clone(){return new n(this.slot)}transformInternalExpressions(){}},N1=class n extends Wi{expr;target;targetSlot;alias;kind=Qt.ConditionalCase;constructor(i,e,t,o=null){super(),this.expr=i,this.target=e,this.targetSlot=t,this.alias=o}visitExpression(i,e){this.expr!==null&&this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&i.expr===this.expr}isConstant(){return!0}clone(){return new n(this.expr,this.target,this.targetSlot)}transformInternalExpressions(i,e){this.expr!==null&&(this.expr=Vt(this.expr,i,e))}},X_=class n extends Wi{expr;kind=Qt.ConstCollected;constructor(i){super(),this.expr=i}transformInternalExpressions(i,e){this.expr=i(this.expr,e)}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n?this.expr.isEquivalent(i.expr):!1}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr)}},CT=class n extends Wi{parameters;body;kind=Qt.ArrowFunction;[tu]=!0;[c0]=!0;contextName=Ps;currentViewName="view";varOffset=null;ops;constructor(i,e){super(),this.parameters=i,this.body=e,this.ops=new qe,this.ops.push([Is(new xr(e,e.sourceSpan))])}visitExpression(i,e){for(let t of this.ops)mr(t,o=>{o.visitExpression(i,e)})}isEquivalent(i){return i instanceof n&&i.parameters.length===this.parameters.length&&i.parameters.every((e,t)=>e.isEquivalent(this.parameters[t]))&&i.body.isEquivalent(this.body)}isConstant(){return!1}transformInternalExpressions(i,e){for(let t of this.ops)Xo(t,i,e|(Wn.InChildOperation|Wn.InArrowFunctionOperation))}clone(){let i=new n(this.parameters,this.body);return i.varOffset=this.varOffset,i.ops=this.ops,i}};function mr(n,i){Xo(n,(e,t)=>(i(e,t),e),Wn.None)}var Wn=(function(n){return n[n.None=0]="None",n[n.InChildOperation=1]="InChildOperation",n[n.InArrowFunctionOperation=2]="InArrowFunctionOperation",n})(Wn||{});function Ck(n,i,e){for(let t=0;tVt(t,i,e));else if(n instanceof eu)if(Array.isArray(n.body))for(let t=0;t{!a&&H_(c)&&c.target!==r.xref&&(a=!0)}),a)break;e=e.next}}}}function qU(n){if(!(!n.enableDebugLocations||n.relativeTemplatePath===null))for(let i of n.units){let e=[];for(let t of i.create)if(t.kind===V.ElementStart||t.kind===V.Element){let o=t.startSourceSpan.start;e.push({targetSlot:t.handle,offset:o.offset,line:o.line,column:o.col})}e.length>0&&i.create.push(BU(n.relativeTemplatePath,e))}}function EF(n){let i=new Map;for(let e of n.create)jh(e)&&(i.set(e.xref,e),e.kind===V.RepeaterCreate&&e.emptyView!==null&&i.set(e.emptyView,e));return i}function QU(n){for(let i of n.units){let e=EF(i);for(let t of i.ops())switch(t.kind){case V.Attribute:XU(i,t,e);break;case V.Property:if(t.bindingKind!==jt.LegacyAnimation&&t.bindingKind!==jt.Animation){let o;t.i18nMessage!==null&&t.templateKind===null?o=jt.I18n:t.isStructuralTemplateAttribute?o=jt.Template:o=jt.Property,qe.insertBefore(Js(t.target,o,null,t.name,null,null,null,t.securityContext),ch(e,t.target))}break;case V.TwoWayProperty:qe.insertBefore(Js(t.target,jt.TwoWayProperty,null,t.name,null,null,null,t.securityContext),ch(e,t.target));break;case V.StyleProp:case V.ClassProp:t.expression instanceof Q_&&qe.insertBefore(Js(t.target,jt.Property,null,t.name,null,null,null,eo.STYLE),ch(e,t.target));break;case V.Listener:if(!t.isLegacyAnimationListener){let o=Js(t.target,jt.Property,null,t.name,null,null,null,eo.NONE);if(n.kind===Et.Host)break;qe.insertBefore(o,ch(e,t.target))}break;case V.TwoWayListener:if(n.kind!==Et.Host){let o=Js(t.target,jt.Property,null,t.name,null,null,null,eo.NONE);qe.insertBefore(o,ch(e,t.target))}break}}}function ch(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function XU(n,i,e){if(!(i.expression instanceof Qo)&&i.isTextAttribute){let t=Js(i.target,i.isStructuralTemplateAttribute?jt.Template:jt.Attribute,i.namespace,i.name,i.expression,i.i18nContext,i.i18nMessage,i.securityContext);if(n.job.kind===Et.Host)n.create.push(t);else{let o=ch(e,i.target);qe.insertBefore(t,o)}qe.remove(i)}}var M5="aria-";function DF(n){return n.startsWith(M5)&&n.length>M5.length}function KU(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function YU(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===V.Binding)switch(t.bindingKind){case jt.Attribute:if(t.name==="ngNonBindable"){qe.remove(t);let o=KU(i,t.target);o.nonBindable=!0}else if(t.name.startsWith("animate."))qe.replace(t,w5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,0));else{let[o,r]=Ll(t.name);qe.replace(t,S5(t.target,o,r,t.expression,t.securityContext,t.isTextAttribute,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan))}break;case jt.Animation:qe.replace(t,w5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,1));break;case jt.Property:case jt.LegacyAnimation:n.mode===Za.DomOnly&&DF(t.name)?qe.replace(t,S5(t.target,null,t.name,t.expression,t.securityContext,!1,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan)):n.kind===Et.Host?qe.replace(t,jU(t.name,t.expression,t.bindingKind,t.i18nContext,t.securityContext,t.sourceSpan)):qe.replace(t,cU(t.target,t.name,t.expression,t.bindingKind,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case jt.TwoWayProperty:if(!(t.expression instanceof Bi))throw new Error(`Expected value of two-way property binding "${t.name}" to be an expression`);qe.replace(t,dU(t.target,t.name,t.expression,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case jt.I18n:case jt.ClassName:case jt.StyleProperty:throw new Error(`Unhandled binding of kind ${jt[t.bindingKind]}`)}}var k5=new Map([[fe.ariaProperty,fe.ariaProperty],[fe.attribute,fe.attribute],[fe.classProp,fe.classProp],[fe.element,fe.element],[fe.elementContainer,fe.elementContainer],[fe.elementContainerEnd,fe.elementContainerEnd],[fe.elementContainerStart,fe.elementContainerStart],[fe.elementEnd,fe.elementEnd],[fe.elementStart,fe.elementStart],[fe.domProperty,fe.domProperty],[fe.i18nExp,fe.i18nExp],[fe.listener,fe.listener],[fe.listener,fe.listener],[fe.property,fe.property],[fe.styleProp,fe.styleProp],[fe.syntheticHostListener,fe.syntheticHostListener],[fe.syntheticHostProperty,fe.syntheticHostProperty],[fe.templateCreate,fe.templateCreate],[fe.twoWayProperty,fe.twoWayProperty],[fe.twoWayListener,fe.twoWayListener],[fe.declareLet,fe.declareLet],[fe.conditionalCreate,fe.conditionalBranchCreate],[fe.conditionalBranchCreate,fe.conditionalBranchCreate],[fe.domElement,fe.domElement],[fe.domElementStart,fe.domElementStart],[fe.domElementEnd,fe.domElementEnd],[fe.domElementContainer,fe.domElementContainer],[fe.domElementContainerStart,fe.domElementContainerStart],[fe.domElementContainerEnd,fe.domElementContainerEnd],[fe.domListener,fe.domListener],[fe.domTemplate,fe.domTemplate],[fe.animationEnter,fe.animationEnter],[fe.animationLeave,fe.animationLeave],[fe.animationEnterListener,fe.animationEnterListener],[fe.animationLeaveListener,fe.animationLeaveListener]]),ZU=256;function JU(n){for(let i of n.units)T5(i.create),T5(i.update)}function T5(n){let i=null;for(let e of n){if(e.kind!==V.Statement||!(e.statement instanceof sa)){i=null;continue}if(!(e.statement.expr instanceof os)||!(e.statement.expr.fn instanceof zp)){i=null;continue}let t=e.statement.expr.fn.value;if(!k5.has(t)){i=null;continue}if(i!==null&&k5.get(i.instruction)===t&&i.lengtho==="")&&(e.expression=e.expression.expressions[0])}function tG(n){for(let i of n.units)for(let e of i.ops()){if(e.kind!==V.Conditional)continue;let t,o=e.conditions.findIndex(c=>c.expr===null);if(o>=0){let c=e.conditions.splice(o,1)[0].targetSlot;t=new O1(c)}else t=Te(-1);let r=e.test==null?null:new Dc(e.test,n.allocateXrefId()),a=null;for(let c=e.conditions.length-1;c>=0;c--){let p=e.conditions[c];if(p.expr!==null){if(r!==null){let u=c===0?r:new hm(r.xref);p.expr=new gi(st.Identical,u,p.expr)}else p.alias!==null&&(a??=n.allocateXrefId(),p.expr=new Dc(p.expr,a),e.contextValue=new hm(a));t=new Sc(p.expr,new O1(p.targetSlot),t)}}e.processed=t,e.conditions=[]}}var nG=new Map([["&&",st.And],[">",st.Bigger],[">=",st.BiggerEquals],["|",st.BitwiseOr],["&",st.BitwiseAnd],["/",st.Divide],["=",st.Assign],["==",st.Equals],["===",st.Identical],["<",st.Lower],["<=",st.LowerEquals],["-",st.Minus],["%",st.Modulo],["**",st.Exponentiation],["*",st.Multiply],["!=",st.NotEquals],["!==",st.NotIdentical],["??",st.NullishCoalesce],["||",st.Or],["+",st.Plus],["in",st.In],["instanceof",st.InstanceOf],["+=",st.AdditionAssignment],["-=",st.SubtractionAssignment],["*=",st.MultiplicationAssignment],["/=",st.DivisionAssignment],["%=",st.RemainderAssignment],["**=",st.ExponentiationAssignment],["&&=",st.AndAssignment],["||=",st.OrAssignment],["??=",st.NullishCoalesceAssignment]]);function PF(n){let i=new Map([["svg",Ca.SVG],["math",Ca.Math]]);return n===null?Ca.HTML:i.get(n)??Ca.HTML}function iG(n){let i=new Map([["svg",Ca.SVG],["math",Ca.Math]]);for(let[e,t]of i.entries())if(t===n)return e;return null}function oG(n,i){return i===Ca.HTML?n:`:${iG(i)}:${n}`}function Fh(n){return Array.isArray(n)?Gi(n.map(Fh)):Te(n)}function rG(n){let i=new Map;for(let e of n.units)for(let t of e.create)if(t.kind===V.ExtractedAttribute){let o=i.get(t.target)||new xT;i.set(t.target,o),o.add(t.bindingKind,t.name,t.expression,t.namespace,t.trustedValueFn),qe.remove(t)}if(n instanceof K_)for(let e of n.units)for(let t of e.create)if(t.kind==V.Projection){let o=i.get(t.xref);if(o!==void 0){let r=yT(o);r.entries.length>0&&(t.attributes=r)}}else fm(t)&&(t.attributes=E5(n,i,t.xref),t.kind===V.RepeaterCreate&&t.emptyView!==null&&(t.emptyAttributes=E5(n,i,t.emptyView)));else if(n instanceof V1)for(let[e,t]of i.entries()){if(e!==n.root.xref)throw new Error("An attribute would be const collected into the host binding's template function, but is not associated with the root xref.");let o=yT(t);o.entries.length>0&&(n.root.attributes=o)}}function E5(n,i,e){let t=i.get(e);if(t!==void 0){let o=yT(t);if(o.entries.length>0)return n.addConst(o)}return null}var ih=Object.freeze([]),xT=class{known=new Map;byKind=new Map;propertyBindings=null;projectAs=null;get attributes(){return this.byKind.get(jt.Attribute)??ih}get classes(){return this.byKind.get(jt.ClassName)??ih}get styles(){return this.byKind.get(jt.StyleProperty)??ih}get bindings(){return this.propertyBindings??ih}get template(){return this.byKind.get(jt.Template)??ih}get i18n(){return this.byKind.get(jt.I18n)??ih}isKnown(i,e){let t=this.known.get(i)??new Set;return this.known.set(i,t),t.has(e)?!0:(t.add(e),!1)}add(i,e,t,o,r){if(!(i===jt.Attribute||i===jt.ClassName||i===jt.StyleProperty)&&this.isKnown(i,e))return;if(e==="ngProjectAs"){if(t===null||!(t instanceof aa)||t.value==null||typeof t.value?.toString()!="string")throw Error("ngProjectAs must have a string literal value");this.projectAs=t.value.toString()}let c=this.arrayFor(i);if(c.push(...aG(o,e)),i===jt.Attribute||i===jt.StyleProperty){if(t===null)throw Error("Attribute, i18n attribute, & style element attributes must have a value");if(r!==null){if(!CF(t))throw Error("AssertionError: extracted attribute value should be string literal");c.push(y$(r,new m_([new JC(t.value)],[]),void 0,t.sourceSpan))}else c.push(t)}}arrayFor(i){return i===jt.Property||i===jt.TwoWayProperty?(this.propertyBindings??=[],this.propertyBindings):(this.byKind.has(i)||this.byKind.set(i,[]),this.byKind.get(i))}};function aG(n,i){let e=Te(i);return n?[Te(0),Te(n),e]:[e]}function yT({attributes:n,bindings:i,classes:e,i18n:t,projectAs:o,styles:r,template:a}){let c=[...n];if(o!==null){let p=pE(o)[0];c.push(Te(5),Fh(p))}return e.length>0&&c.push(Te(1),...e),r.length>0&&c.push(Te(2),...r),i.length>0&&c.push(Te(3),...i),a.length>0&&c.push(Te(4),...a),t.length>0&&c.push(Te(6),...t),Gi(c)}function sG(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function lG(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===V.AnimationBinding){let o=cG(t);n.kind===Et.Host?e.create.push(o):qe.insertAfter(o,sG(i,t.target)),qe.remove(t)}}function cG(n){if(n.animationBindingKind===0)return TU(n.name,n.target,n.name==="animate.enter"?"enter":"leave",n.expression,n.securityContext,n.sourceSpan);{let i=n.expression;return EU(n.name,n.target,n.name==="animate.enter"?"enter":"leave",[Is(new xr(i,i.sourceSpan))],n.securityContext,n.sourceSpan)}}function dG(n){let i=new Map;for(let e of n.units){for(let t of e.create)t.kind===V.I18nAttributes&&i.set(t.target,t);for(let t of e.update)switch(t.kind){case V.Property:case V.Attribute:if(t.i18nContext===null||!(t.expression instanceof Qo))continue;let o=i.get(t.target);if(o===void 0)throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");if(o.target!==t.target)throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");let r=[];for(let a=0;aMG(t,{job:n}),Wn.None),Xo(e,kG,Wn.None)}function ys(n){return n instanceof jp?ys(n.expr):n instanceof gi?ys(n.lhs)||ys(n.rhs):n instanceof Sc?n.falseCase&&ys(n.falseCase)?!0:ys(n.condition)||ys(n.trueCase):n instanceof p_?ys(n.condition):n instanceof Dc?ys(n.expr):n instanceof Es?ys(n.receiver):n instanceof xd?ys(n.receiver)||ys(n.index):n instanceof Fl?ys(n.expr):n instanceof os||n instanceof wc||n instanceof Rl||n instanceof Zp||n instanceof Yp}function bG(n){let i=new Set;return Vt(n,e=>(e instanceof Dc&&i.add(e.xref),e),Wn.None),i}function xG(n,i,e){return Vt(n,t=>{if(t instanceof Dc&&i.has(t.xref)){let o=new hm(t.xref);return new Dc(o,o.xref)}return t},Wn.None),n}function oh(n,i,e){let t;if(ys(n)){let o=e.job.allocateXrefId();t=[new Dc(n,o),new hm(o)]}else t=[n,n.clone()],xG(t[1],bG(t[0]));return new Nh(t[0],i(t[1]))}function yG(n){return n instanceof Ah||n instanceof Oh||n instanceof Zp}function SG(n){return n instanceof Es||n instanceof xd||n instanceof os}function IF(n){return yG(n)||SG(n)}function wG(n){if(IF(n)&&n.receiver instanceof Nh){let i=n.receiver;for(;i.expr instanceof Nh;)i=i.expr;return i}return null}function MG(n,i){if(!IF(n))return n;let e=wG(n);if(e){if(n instanceof os)return e.expr=e.expr.callFn(n.args),n.receiver;if(n instanceof Es)return e.expr=e.expr.prop(n.name),n.receiver;if(n instanceof xd)return e.expr=e.expr.key(n.index),n.receiver;if(n instanceof Zp)return e.expr=oh(e.expr,t=>t.callFn(n.args),i),n.receiver;if(n instanceof Ah)return e.expr=oh(e.expr,t=>t.prop(n.name),i),n.receiver;if(n instanceof Oh)return e.expr=oh(e.expr,t=>t.key(n.index),i),n.receiver}else{if(n instanceof Zp)return oh(n.receiver,t=>t.callFn(n.args),i);if(n instanceof Ah)return oh(n.receiver,t=>t.prop(n.name),i);if(n instanceof Oh)return oh(n.receiver,t=>t.key(n.index),i)}return n}function kG(n){return n instanceof Nh?new Fl(new Sc(new gi(st.Equals,n.guard,yh),yh,n.expr)):n}var D5="\uFFFD",TG="#",EG="*",DG="/",PG=":",IG="[",AG="]",OG="|";function NG(n){let i=new Map,e=new Map,t=new Map;for(let r of n.units)for(let a of r.create)switch(a.kind){case V.I18nContext:let c=FG(n,a);r.create.push(c),i.set(a.xref,c),t.set(a.xref,a);break;case V.I18nStart:e.set(a.xref,a);break}let o=null;for(let r of n.units)for(let a of r.create)switch(a.kind){case V.IcuStart:o=a,qe.remove(a);let c=t.get(a.context);if(c.contextKind!==Pp.Icu)continue;let p=e.get(c.i18nBlock);if(p.context===c.xref)continue;let u=e.get(p.root),h=i.get(u.context);if(h===void 0)throw Error("AssertionError: ICU sub-message should belong to a root message.");let _=i.get(c.xref);_.messagePlaceholder=a.messagePlaceholder,h.subMessages.push(_.xref);break;case V.IcuEnd:o=null,qe.remove(a);break;case V.IcuPlaceholder:if(o===null||o.context==null)throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");i.get(o.context).postprocessingParams.set(a.name,Te(RG(a))),qe.remove(a);break}}function FG(n,i,e){let t=P5(i.params),o=P5(i.postprocessingParams),r=[...i.params.values()].some(a=>a.length>1);return FU(n.allocateXrefId(),i.xref,i.i18nBlock,i.message,null,t,o,r)}function RG(n){if(n.strings.length!==n.expressionPlaceholders.length+1)throw Error(`AssertionError: Invalid ICU placeholder with ${n.strings.length} strings and ${n.expressionPlaceholders.length} expressions`);let i=n.expressionPlaceholders.map(uh);return n.strings.flatMap((e,t)=>[e,i[t]||""]).join("")}function P5(n){let i=new Map;for(let[e,t]of n){let o=LG(t);o!==null&&i.set(e,Te(o))}return i}function LG(n){if(n.length===0)return null;let i=n.map(e=>uh(e));return i.length===1?i[0]:`${IG}${i.join(OG)}${AG}`}function uh(n){if(n.flags&ao.ElementTag&&n.flags&ao.TemplateTag){if(typeof n.value!="object")throw Error("AssertionError: Expected i18n param value to have an element and template slot");let o=uh(it(K({},n),{value:n.value.element,flags:n.flags&~ao.TemplateTag})),r=uh(it(K({},n),{value:n.value.template,flags:n.flags&~ao.ElementTag}));return n.flags&ao.OpenTag&&n.flags&ao.CloseTag?`${r}${o}${r}`:n.flags&ao.CloseTag?`${o}${r}`:`${r}${o}`}if(n.flags&ao.OpenTag&&n.flags&ao.CloseTag)return`${uh(it(K({},n),{flags:n.flags&~ao.CloseTag}))}${uh(it(K({},n),{flags:n.flags&~ao.OpenTag}))}`;if(n.flags===ao.None)return`${n.value}`;let i="",e="";n.flags&ao.ElementTag?i=TG:n.flags&ao.TemplateTag&&(i=EG),i!==""&&(e=n.flags&ao.CloseTag?DG:"");let t=n.subTemplateIndex===null?"":`${PG}${n.subTemplateIndex}`;return`${D5}${e}${i}${n.value}${t}${D5}`}function VG(n){for(let i of n.units){let e=new Map;for(let o of i.create){if(jh(o)){if(o.handle.slot===null)throw new Error("AssertionError: expected slots to have been allocated before generating advance() calls")}else continue;e.set(o.xref,o.handle.slot)}let t=0;for(let o of i.update){let r=null;if(H_(o)?r=o:mr(o,c=>{r===null&&H_(c)&&(r=c)}),r===null)continue;if(!e.has(r.target))throw new Error(`AssertionError: reference to unknown slot for target ${r.target}`);let a=e.get(r.target);if(t!==a){let c=a-t;if(c<0)throw new Error("AssertionError: slot counter should never need to move backwards");qe.insertBefore(fU(c,r.sourceSpan),o),t=a}}}}function BG(n){for(let i of n.units)for(let e of i.update){if(e.kind!==V.StoreLet)continue;let t={kind:Wr.Identifier,name:null,identifier:e.declaredName,local:!0};qe.replace(e,tm(n.allocateXrefId(),t,new U_(e.target,e.value,e.sourceSpan),Zs.None))}}function zG(n){let e=[],t=0;for(let o of n.units)for(let r of o.create)r.kind===V.Projection&&(e.push(r.selector),r.projectionSlotIndex=t++);if(e.length>0){let o=null;if(e.length>1||e[0]!=="*"){let r=e.map(a=>a==="*"?a:pE(a));o=n.pool.getConstLiteral(Fh(r),!0)}n.contentSelectors=n.pool.getConstLiteral(Fh(e),!0),n.root.create.prepend([IU(o)])}}function jG(n){Xg(n.root,null)}function Xg(n,i){let e=I5(n,i);for(let t of n.create)switch(t.kind){case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:Xg(n.job.views.get(t.xref),e);break;case V.Projection:t.fallbackView!==null&&Xg(n.job.views.get(t.fallbackView),e);break;case V.RepeaterCreate:Xg(n.job.views.get(t.xref),e),t.emptyView&&Xg(n.job.views.get(t.emptyView),e),t.trackByOps!==null&&t.trackByOps.prepend(Kg(n,e,!1));break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:t.handlerOps.prepend(Kg(n,e,!0));break}n.update.prepend(Kg(n,e,!1));for(let t of n.functions)t.ops.prepend(Kg(n,I5(n,i),!0))}function I5(n,i){let e={view:n.xref,viewContextVariable:{kind:Wr.Context,name:null,view:n.xref},contextVariables:new Map,aliases:n.aliases,references:[],letDeclarations:[],parent:i};for(let t of n.contextVariables.keys())e.contextVariables.set(t,{kind:Wr.Identifier,name:null,identifier:t,local:!1});for(let t of n.create)switch(t.kind){case V.ElementStart:case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:if(!Array.isArray(t.localRefs))throw new Error("AssertionError: expected localRefs to be an array");for(let o=0;ot instanceof X_?Te(n.addConst(t.expr)):t,Wn.None)}var A5="style.",O5="class.",HG="style!",N5="class!",F5="!important";function UG(n){for(let i of n.root.update)if(i.kind===V.Binding&&i.bindingKind===jt.Property)if(i.name.endsWith(F5)&&(i.name=i.name.substring(0,i.name.length-F5.length)),i.name.startsWith(A5)){i.bindingKind=jt.StyleProperty,i.name=i.name.substring(A5.length),GG(i.name)||(i.name=WG(i.name));let{property:e,suffix:t}=xk(i.name);i.name=e,i.unit=t}else i.name.startsWith(HG)?(i.bindingKind=jt.StyleProperty,i.name="style"):i.name.startsWith(O5)?(i.bindingKind=jt.ClassName,i.name=xk(i.name.substring(O5.length)).property):i.name.startsWith(N5)&&(i.bindingKind=jt.ClassName,i.name=xk(i.name.substring(N5.length)).property)}function GG(n){return n.startsWith("--")}function WG(n){return n.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function xk(n){let i=n.indexOf("!important");i!==-1&&(n=i>0?n.substring(0,i):"");let e=null,t=n,o=n.lastIndexOf(".");return o>0&&(e=n.slice(o+1),t=n.substring(0,o)),{property:t,suffix:e}}function ST(n,i=!1){return nl(Object.keys(n).map(e=>({key:e,quoted:i,value:n[e]})))}var wT=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}formatPh(i){return`{${s0(i,!1)}}`}},qG=new wT;function AF(n){return n.visit(qG)}var yd=class{sourceSpan;i18n;constructor(i,e){this.sourceSpan=i,this.i18n=e}},Jp=class extends yd{value;tokens;constructor(i,e,t,o){super(e,o),this.value=i,this.tokens=t}visit(i,e){return i.visitText(this,e)}},Fp=class extends yd{switchValue;type;cases;switchValueSourceSpan;constructor(i,e,t,o,r,a){super(o,a),this.switchValue=i,this.type=e,this.cases=t,this.switchValueSourceSpan=r}visit(i,e){return i.visitExpansion(this,e)}},B1=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(i,e,t,o,r){this.value=i,this.expression=e,this.sourceSpan=t,this.valueSourceSpan=o,this.expSourceSpan=r}visit(i,e){return i.visitExpansionCase(this,e)}},MT=class extends yd{name;value;keySpan;valueSpan;valueTokens;constructor(i,e,t,o,r,a,c){super(t,c),this.name=i,this.value=e,this.keySpan=o,this.valueSpan=r,this.valueTokens=a}visit(i,e){return i.visitAttribute(this,e)}},qs=class extends yd{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;isVoid;constructor(i,e,t,o,r,a,c,p=null,u,h){super(a,h),this.name=i,this.attrs=e,this.directives=t,this.children=o,this.isSelfClosing=r,this.startSourceSpan=c,this.endSourceSpan=p,this.isVoid=u}visit(i,e){return i.visitElement(this,e)}},Y_=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitComment(this,e)}},Ks=class extends yd{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c=null,p){super(o,p),this.name=i,this.parameters=e,this.children=t,this.nameSpan=r,this.startSourceSpan=a,this.endSourceSpan=c}visit(i,e){return i.visitBlock(this,e)}},Fa=class extends yd{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,p,u,h=null,_){super(p,_),this.componentName=i,this.tagName=e,this.fullName=t,this.attrs=o,this.directives=r,this.children=a,this.isSelfClosing=c,this.startSourceSpan=u,this.endSourceSpan=h}visit(i,e){return i.visitComponent(this,e)}},kT=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r=null){this.name=i,this.attrs=e,this.sourceSpan=t,this.startSourceSpan=o,this.endSourceSpan=r}visit(i,e){return i.visitDirective(this,e)}},z1=class{expression;sourceSpan;constructor(i,e){this.expression=i,this.sourceSpan=e}visit(i,e){return i.visitBlockParameter(this,e)}},j1=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.nameSpan=o,this.valueSpan=r}visit(i,e){return i.visitLetDeclaration(this,e)}};function Co(n,i,e=null){let t=[],o=n.visit?r=>n.visit(r,e)||r.visit(n,e):r=>r.visit(n,e);return i.forEach(r=>{let a=o(r);a&&t.push(a)}),t}var Z_={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` `,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},OF="\uE500";Z_.ngsp=OF;var TT=class{tokens;errors;nonNormalizedIcuExpressions;constructor(i,e,t){this.tokens=i,this.errors=e,this.nonNormalizedIcuExpressions=t}};function QG(n,i,e,t={}){let o=new DT(new k1(n,i),e,t);return o.tokenize(),new TT(oW(o.tokens),o.errors,o.nonNormalizedIcuExpressions)}var XG=/\r\n?/g;function rh(n){return`Unexpected character "${n===Gr?"EOF":String.fromCharCode(n)}"`}function R5(n){return`Unknown entity "${n}" - use the "&#;" or "&#x;" syntax`}function KG(n,i){return`Unable to parse entity "${i}" - ${n} character reference entities must end with ";"`}var ET=(function(n){return n.HEX="hexadecimal",n.DEC="decimal",n})(ET||{}),YG=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],zg={start:"{{",end:"}}"},DT=class{_getTagDefinition;_cursor;_tokenizeIcu;_leadingTriviaCodePoints;_currentTokenStart=null;_currentTokenType=null;_expansionCaseStack=[];_openDirectiveCount=0;_inInterpolation=!1;_preserveLineEndings;_i18nNormalizeLineEndingsInICUs;_tokenizeBlocks;_tokenizeLet;_selectorlessEnabled;tokens=[];errors=[];nonNormalizedIcuExpressions=[];constructor(i,e,t){this._getTagDefinition=e,this._tokenizeIcu=t.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=t.leadingTriviaChars&&t.leadingTriviaChars.map(r=>r.codePointAt(0)||0);let o=t.range||{endPos:i.content.length,startPos:0,startLine:0,startCol:0};this._cursor=t.escapedString?new PT(i,o):new $1(i,o),this._preserveLineEndings=t.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=t.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=t.tokenizeBlocks??!0,this._tokenizeLet=t.tokenizeLet??!0,this._selectorlessEnabled=t.selectorlessEnabled??!1;try{this._cursor.init()}catch(r){this.handleError(r)}}_processCarriageReturns(i){return this._preserveLineEndings?i:i.replace(XG,` `)}tokenize(){for(;this._cursor.peek()!==Gr;){let i=this._cursor.clone();try{this._attemptCharCode(_h)?this._attemptCharCode(sT)?this._attemptCharCode(bc)?this._consumeCdata(i):this._attemptCharCode(w1)?this._consumeComment(i):this._consumeDocType(i):this._attemptCharCode(Qs)?this._consumeTagClose(i):this._consumeTagOpen(i):this._tokenizeLet&&this._cursor.peek()===nh&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(i):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(i):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(Ra)?this._consumeBlockEnd(i):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(41),this._endToken([])}_getBlockName(){let i=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(t=>B_(t)?!i:iW(t)?(i=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(i){this._requireCharCode(nh),this._beginToken(24,i);let e=this._endToken([this._getBlockName()]);if(e.parts[0]==="default never"&&this._attemptCharCode(es)){this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([]);return}if(this._cursor.peek()===Va)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Ro),this._attemptCharCode(Cr))this._attemptCharCodeUntilFn(Ro);else{e.type=28;return}this._attemptCharCode(Ys)?(this._beginToken(25),this._endToken([])):this._isBlockStart()&&(e.parts[0]==="case"||e.parts[0]==="default")?(this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([])):e.type=28}_consumeBlockEnd(i){this._beginToken(26,i),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(V5);this._cursor.peek()!==Cr&&this._cursor.peek()!==Gr;){this._beginToken(27);let i=this._cursor.clone(),e=null,t=0;for(;this._cursor.peek()!==es&&this._cursor.peek()!==Gr||e!==null;){let o=this._cursor.peek();if(o===Np)this._cursor.advance();else if(o===e)e=null;else if(e===null&&t_(o))e=o;else if(o===Va&&e===null)t++;else if(o===Cr&&e===null){if(t===0)break;t>0&&t--}this._cursor.advance()}this._endToken([this._cursor.getChars(i)]),this._attemptCharCodeUntilFn(V5)}}_consumeLetDeclaration(i){if(this._requireStr("@let"),this._beginToken(29,i),B_(this._cursor.peek()))this._attemptCharCodeUntilFn(Ro);else{let o=this._endToken([this._cursor.getChars(i)]);o.type=32;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Ro),!this._attemptCharCode(Hr)){e.type=32;return}this._attemptCharCodeUntilFn(o=>Ro(o)&&!M1(o)),this._consumeLetDeclarationValue(),this._cursor.peek()===es?(this._beginToken(31),this._endToken([]),this._cursor.advance()):(e.type=32,e.sourceSpan=this._cursor.getSpan(i))}_getLetDeclarationName(){let i=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(t=>mm(t)||t===ob||t===_m||e&&Xs(t)?(e=!0,!1):!0),this._cursor.getChars(i).trim()}_consumeLetDeclarationValue(){let i=this._cursor.clone();for(this._beginToken(30,i);this._cursor.peek()!==Gr;){let e=this._cursor.peek();if(e===es)break;t_(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(t=>t===Np?(this._cursor.advance(),!1):t===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(i)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(tW(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Ra){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(i,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=i}_endToken(i,e){if(this._currentTokenStart===null)throw new sn(this._cursor.getSpan(e),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new sn(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let t={type:this._currentTokenType,parts:i,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(t),this._currentTokenStart=null,this._currentTokenType=null,t}_createError(i,e){this._isInExpansionForm()&&(i+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let t=new sn(e,i);return this._currentTokenStart=null,this._currentTokenType=null,t}handleError(i){if(i instanceof J_&&(i=this._createError(i.msg,this._cursor.getSpan(i.cursor))),i instanceof sn)this.errors.push(i);else throw i}_attemptCharCode(i){return this._cursor.peek()===i?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(i){return nW(this._cursor.peek(),i)?(this._cursor.advance(),!0):!1}_requireCharCode(i){let e=this._cursor.clone();if(!this._attemptCharCode(i))throw this._createError(rh(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(i){let e=i.length;if(this._cursor.charsLeft()this._peekStr(i))}_isLetStart(){return this._cursor.peek()===nh&&this._peekStr("@let")}_consumeEntity(i){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(iF)){let t=this._attemptCharCode(mF)||this._attemptCharCode(uH),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(JG),this._cursor.peek()!=es){this._cursor.advance();let a=t?ET.HEX:ET.DEC;throw this._createError(KG(a,this._cursor.getChars(e)),this._cursor.getSpan())}let r=this._cursor.getChars(o);this._cursor.advance();try{let a=parseInt(r,t?16:10);this._endToken([String.fromCodePoint(a),this._cursor.getChars(e)])}catch{throw this._createError(R5(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let t=this._cursor.clone();if(this._attemptCharCodeUntilFn(eW),this._cursor.peek()!=es)this._beginToken(i,e),this._cursor=t,this._endToken(["&"]);else{let o=this._cursor.getChars(t);this._cursor.advance();let r=Z_.hasOwnProperty(o)&&Z_[o];if(!r)throw this._createError(R5(o),this._cursor.getSpan(e));this._endToken([r,`&${o};`])}}}_consumeRawText(i,e){this._beginToken(i?6:7);let t=[];for(;;){let o=this._cursor.clone(),r=e();if(this._cursor=o,r)break;i&&this._cursor.peek()===S1?(this._endToken([this._processCarriageReturns(t.join(""))]),t.length=0,this._consumeEntity(6),this._beginToken(6)):t.push(this._readChar())}this._endToken([this._processCarriageReturns(t.join(""))])}_consumeComment(i){this._beginToken(10,i),this._requireCharCode(w1),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeCdata(i){this._beginToken(12,i),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(i){this._beginToken(18,i);let e=this._cursor.clone();this._attemptUntilChar(Ss);let t=this._cursor.getChars(e);this._cursor.advance(),this._endToken([t])}_consumePrefixAndName(i){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==_c&&!ZG(this._cursor.peek());)this._cursor.advance();let o;this._cursor.peek()===_c?(t=this._cursor.getChars(e),this._cursor.advance(),o=this._cursor.clone()):o=e,this._requireCharCodeUntilFn(i,t===""?0:1);let r=this._cursor.getChars(o);return[t,r]}_consumeTagOpen(i){let e,t,o,r;try{if(this._selectorlessEnabled&&OC(this._cursor.peek()))r=this._consumeComponentOpenStart(i),[o,t,e]=r.parts,t&&(o+=`:${t}`),e&&(o+=`:${e}`),this._attemptCharCodeUntilFn(Ro);else{if(!mm(this._cursor.peek()))throw this._createError(rh(this._cursor.peek()),this._cursor.getSpan(i));r=this._consumeTagOpenStart(i),t=r.parts[0],e=o=r.parts[1],this._attemptCharCodeUntilFn(Ro)}for(;!z5(this._cursor.peek());)if(this._selectorlessEnabled&&this._cursor.peek()===nh){let c=this._cursor.clone(),p=c.clone();p.advance(),OC(p.peek())&&this._consumeDirective(c,p)}else this._consumeAttribute();r.type===33?this._consumeComponentOpenEnd():this._consumeTagOpenEnd()}catch(c){if(c instanceof sn){r?r.type=r.type===33?37:4:(this._beginToken(5,i),this._endToken(["<"]));return}throw c}let a=this._getTagDefinition(e).getContentType(t);a===gc.RAW_TEXT?this._consumeRawTextWithTagClose(r,o,!1):a===gc.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,o,!0)}_consumeRawTextWithTagClose(i,e,t){this._consumeRawText(t,()=>!this._attemptCharCode(_h)||!this._attemptCharCode(Qs)||(this._attemptCharCodeUntilFn(Ro),!this._attemptStrCaseInsensitive(e))?!1:(this._attemptCharCodeUntilFn(Ro),this._attemptCharCode(Ss))),this._beginToken(i.type===33?36:3),this._requireCharCodeUntilFn(o=>o===Ss,3),this._cursor.advance(),this._endToken(i.parts)}_consumeTagOpenStart(i){this._beginToken(0,i);let e=this._consumePrefixAndName(xp);return this._endToken(e)}_consumeComponentOpenStart(i){this._beginToken(33,i);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let i=this._cursor.clone();for(;B5(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(i),t="",o="";return this._cursor.peek()===_c&&(this._cursor.advance(),[t,o]=this._consumePrefixAndName(xp)),[e,t,o]}_consumeAttribute(){this._consumeAttributeName(),this._attemptCharCodeUntilFn(Ro),this._attemptCharCode(Hr)&&(this._attemptCharCodeUntilFn(Ro),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Ro)}_consumeAttributeName(){let i=this._cursor.peek();if(i===V_||i===L_)throw this._createError(rh(i),this._cursor.getSpan());this._beginToken(14);let e;if(this._openDirectiveCount>0){let o=0;e=r=>{if(this._openDirectiveCount>0){if(r===Va)o++;else if(r===Cr){if(o===0)return!0;o--}}return xp(r)}}else if(i===bc){let o=0;e=r=>(r===bc?o++:r===_d&&o--,o<=0?xp(r):M1(r))}else e=xp;let t=this._consumePrefixAndName(e);this._endToken(t)}_consumeAttributeValue(){if(this._cursor.peek()===V_||this._cursor.peek()===L_){let i=this._cursor.peek();this._consumeQuote(i);let e=()=>this._cursor.peek()===i;this._consumeWithInterpolation(16,17,e,e),this._consumeQuote(i)}else{let i=()=>xp(this._cursor.peek());this._consumeWithInterpolation(16,17,i,i)}}_consumeQuote(i){this._beginToken(15),this._requireCharCode(i),this._endToken([String.fromCodePoint(i)])}_consumeTagOpenEnd(){let i=this._attemptCharCode(Qs)?2:1;this._beginToken(i),this._requireCharCode(Ss),this._endToken([])}_consumeComponentOpenEnd(){let i=this._attemptCharCode(Qs)?35:34;this._beginToken(i),this._requireCharCode(Ss),this._endToken([])}_consumeTagClose(i){if(this._selectorlessEnabled){let t=i.clone();for(;t.peek()!==Ss&&!OC(t.peek());)t.advance();if(OC(t.peek())){this._beginToken(36,i);let o=this._consumeComponentName();this._attemptCharCodeUntilFn(Ro),this._requireCharCode(Ss),this._endToken(o);return}}this._beginToken(3,i),this._attemptCharCodeUntilFn(Ro);let e=this._consumePrefixAndName(xp);this._attemptCharCodeUntilFn(Ro),this._requireCharCode(Ss),this._endToken(e)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(Ys),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);let i=this._readUntil(va),e=this._processCarriageReturns(i);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let o=this._endToken([i]);e!==i&&this.nonNormalizedIcuExpressions.push(o)}this._requireCharCode(va),this._attemptCharCodeUntilFn(Ro),this._beginToken(7);let t=this._readUntil(va);this._endToken([t]),this._requireCharCode(va),this._attemptCharCodeUntilFn(Ro)}_consumeExpansionCaseStart(){this._beginToken(20);let i=this._readUntil(Ys).trim();this._endToken([i]),this._attemptCharCodeUntilFn(Ro),this._beginToken(21),this._requireCharCode(Ys),this._endToken([]),this._attemptCharCodeUntilFn(Ro),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Ra),this._endToken([]),this._attemptCharCodeUntilFn(Ro),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Ra),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(i,e,t,o){this._beginToken(i);let r=[];for(;!t();){let a=this._cursor.clone();this._attemptStr(zg.start)?(this._endToken([this._processCarriageReturns(r.join(""))],a),r.length=0,this._consumeInterpolation(e,a,o),this._beginToken(i)):this._cursor.peek()===S1?(this._endToken([this._processCarriageReturns(r.join(""))]),r.length=0,this._consumeEntity(i),this._beginToken(i)):r.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(r.join(""))])}_consumeInterpolation(i,e,t){let o=[];this._beginToken(i,e),o.push(zg.start);let r=this._cursor.clone(),a=null,c=!1;for(;this._cursor.peek()!==Gr&&(t===null||!t());){let p=this._cursor.clone();if(this._isTagStart()){this._cursor=p,o.push(this._getProcessedChars(r,p)),this._endToken(o);return}if(a===null)if(this._attemptStr(zg.end)){o.push(this._getProcessedChars(r,p)),o.push(zg.end),this._endToken(o);return}else this._attemptStr("//")&&(c=!0);let u=this._cursor.peek();this._cursor.advance(),u===Np?this._cursor.advance():u===a?a=null:!c&&a===null&&t_(u)&&(a=u)}o.push(this._getProcessedChars(r,this._cursor)),this._endToken(o)}_consumeDirective(i,e){for(this._requireCharCode(nh),this._cursor.advance();B5(this._cursor.peek());)this._cursor.advance();this._beginToken(38,i);let t=this._cursor.getChars(e);if(this._endToken([t]),this._attemptCharCodeUntilFn(Ro),this._cursor.peek()===Va){for(this._openDirectiveCount++,this._beginToken(39),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Ro);!z5(this._cursor.peek())&&this._cursor.peek()!==Cr;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(Ro),this._openDirectiveCount--,this._cursor.peek()!==Cr){if(this._cursor.peek()===Ss||this._cursor.peek()===Qs)return;throw this._createError(rh(this._cursor.peek()),this._cursor.getSpan(i))}this._beginToken(40),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Ro)}}_getProcessedChars(i,e){return this._processCarriageReturns(e.getChars(i))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===Gr||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Ra&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===Ra))}_isTagStart(){if(this._cursor.peek()===_h){let i=this._cursor.clone();i.advance();let e=i.peek();if(Qp<=e&&e<=l0||gm<=e&&e<=Bh||e===Qs||e===sT)return!0}return!1}_readUntil(i){let e=this._cursor.clone();return this._attemptUntilChar(i),this._cursor.getChars(e)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===21}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===19}isExpansionFormStart(){if(this._cursor.peek()!==Ys)return!1;let i=this._cursor.clone(),e=this._attemptStr(zg.start);return this._cursor=i,!e}};function Ro(n){return!B_(n)||n===Gr}function xp(n){return B_(n)||n===Ss||n===_h||n===Qs||n===V_||n===L_||n===Hr||n===Gr}function ZG(n){return(nrF)}function JG(n){return n===es||n===Gr||!_H(n)}function eW(n){return n===es||n===Gr||!(mm(n)||Xs(n))}function tW(n){return n!==Ra}function nW(n,i){return L5(n)===L5(i)}function L5(n){return n>=Qp&&n<=l0?n-Qp+gm:n}function iW(n){return mm(n)||Xs(n)||n===_m}function V5(n){return n!==es&&Ro(n)}function OC(n){return n===_m||n>=gm&&n<=Bh}function B5(n){return mm(n)||Xs(n)||n===_m}function z5(n){return n===Qs||n===Ss||n===_h||n===Gr}function oW(n){let i=[],e;for(let t=0;t0&&e.indexOf(i.peek())!==-1;)t===i&&(i=i.clone()),i.advance();let o=this.locationFromCursor(i),r=this.locationFromCursor(this),a=t!==i?this.locationFromCursor(t):o;return new gn(o,r,a)}getChars(i){return this.input.substring(i.state.offset,this.state.offset)}charAt(i){return this.input.charCodeAt(i)}advanceState(i){if(i.offset>=this.end)throw this.state=i,new J_('Unexpected character "EOF"',this);let e=this.charAt(i.offset);e===Op?(i.line++,i.column=0):M1(e)||i.column++,i.offset++,this.updatePeek(i)}updatePeek(i){i.peek=i.offset>=this.end?Gr:this.charAt(i.offset)}locationFromCursor(i){return new z_(i.file,i.state.offset,i.state.line,i.state.column)}},PT=class n extends $1{internalState;constructor(i,e){i instanceof n?(super(i),this.internalState=K({},i.internalState)):(super(i,e),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new n(this)}getChars(i){let e=i.clone(),t="";for(;e.internalState.offsetthis.internalState.peek;if(i()===Np)if(this.internalState=K({},this.state),this.advanceState(this.internalState),i()===aF)this.state.peek=Op;else if(i()===sF)this.state.peek=bE;else if(i()===dF)this.state.peek=eF;else if(i()===lF)this.state.peek=CE;else if(i()===fH)this.state.peek=lH;else if(i()===yE)this.state.peek=tF;else if(i()===cF)if(this.advanceState(this.internalState),i()===Ys){this.advanceState(this.internalState);let e=this.clone(),t=0;for(;i()!==Ra;)this.advanceState(this.internalState),t++;this.state.peek=this.decodeHexDigits(e,t)}else{let e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(i()===mF){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(h5(i())){let e="",t=0,o=this.clone();for(;h5(i())&&t<3;)o=this.clone(),e+=String.fromCodePoint(i()),this.advanceState(this.internalState),t++;this.state.peek=parseInt(e,8),this.internalState=o.internalState}else M1(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(i,e){let t=this.input.slice(i.internalState.offset,i.internalState.offset+e),o=parseInt(t,16);if(isNaN(o))throw i.state=i.internalState,new J_("Invalid hexadecimal escape sequence",i);return o}},J_=class extends Error{msg;cursor;constructor(i,e){super(i),this.msg=i,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},dr=class n extends sn{elementName;static create(i,e,t){return new n(i,e,t)}constructor(i,e,t){super(e,t),this.elementName=i}},H1=class{rootNodes;errors;constructor(i,e){this.rootNodes=i,this.errors=e}},rW=class{getTagDefinition;constructor(i){this.getTagDefinition=i}parse(i,e,t){let o=QG(i,e,this.getTagDefinition,t),r=new IT(o.tokens,this.getTagDefinition);return r.build(),new H1(r.rootNodes,[...o.errors,...r.errors])}},IT=class n{tokens;tagDefinitionResolver;_index=-1;_peek;_containerStack=[];rootNodes=[];errors=[];constructor(i,e){this.tokens=i,this.tagDefinitionResolver=e,this._advance()}build(){for(;this._peek.type!==41;)this._peek.type===0||this._peek.type===4?this._consumeElementStartTag(this._advance()):this._peek.type===3?this._consumeElementEndTag(this._advance()):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===19?this._consumeExpansion(this._advance()):this._peek.type===24?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===26?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===28?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===32?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._peek.type===33||this._peek.type===37?this._consumeComponentStartTag(this._advance()):this._peek.type===36?this._consumeComponentEndTag(this._advance()):this._advance();for(let i of this._containerStack)i instanceof Ks&&this.errors.push(dr.create(i.name,i.sourceSpan,`Unclosed block "${i.name}"`))}_advance(){let i=this._peek;return this._index0)return this.errors=this.errors.concat(r.errors),null;let a=new gn(i.sourceSpan.start,o.sourceSpan.end,i.sourceSpan.fullStart),c=new gn(e.sourceSpan.start,o.sourceSpan.end,e.sourceSpan.fullStart);return new B1(i.parts[0],r.rootNodes,a,i.sourceSpan,c)}_collectExpansionExpTokens(i){let e=[],t=[21];for(;;){if((this._peek.type===19||this._peek.type===21)&&t.push(this._peek.type),this._peek.type===22)if(j5(t,21)){if(t.pop(),t.length===0)return e}else return this.errors.push(dr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===23)if(j5(t,19))t.pop();else return this.errors.push(dr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===41)return this.errors.push(dr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}}_consumeText(i){let e=[i],t=i.sourceSpan,o=i.parts[0];if(o.length>0&&o[0]===` `){let r=this._getContainer();r!=null&&r.children.length===0&&this._getTagDefinition(r)?.ignoreFirstLf&&(o=o.substring(1),e[0]={type:i.type,sourceSpan:i.sourceSpan,parts:[o]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)i=this._advance(),e.push(i),i.type===8?o+=i.parts.join("").replace(/&([^;]+);/g,$5):i.type===9?o+=i.parts[0]:o+=i.parts.join("");if(o.length>0){let r=i.sourceSpan;this._addToParent(new Jp(o,new gn(t.start,r.end,t.fullStart,t.details),e))}}_closeVoidElement(){let i=this._getContainer();i!==null&&this._getTagDefinition(i)?.isVoid&&this._containerStack.pop()}_consumeElementStartTag(i){let e=[],t=[];this._consumeAttributesAndDirectives(e,t);let o=this._getElementFullName(i,this._getClosestElementLikeParent()),r=this._getTagDefinition(o),a=!1;this._peek.type===2?(this._advance(),a=!0,r?.canSelfClose||Kk(o)!==null||r?.isVoid||this.errors.push(dr.create(o,i.sourceSpan,`Only void, custom and foreign elements can be self closed "${i.parts[1]}"`))):this._peek.type===1&&(this._advance(),a=!1);let c=this._peek.sourceSpan.fullStart,p=new gn(i.sourceSpan.start,c,i.sourceSpan.fullStart),u=new gn(i.sourceSpan.start,c,i.sourceSpan.fullStart),h=new qs(o,e,t,[],a,p,u,void 0,r?.isVoid??!1),_=this._getContainer(),S=_!==null&&!!this._getTagDefinition(_)?.isClosedByChild(h.name);this._pushContainer(h,S),a?this._popContainer(o,qs,p):i.type===4&&(this._popContainer(o,qs,null),this.errors.push(dr.create(o,p,`Opening tag "${o}" not terminated.`)))}_consumeComponentStartTag(i){let e=i.parts[0],t=[],o=[];this._consumeAttributesAndDirectives(t,o);let r=this._getClosestElementLikeParent(),a=this._getComponentTagName(i,r),c=this._getComponentFullName(i,r),p=this._peek.type===35;this._advance();let u=this._peek.sourceSpan.fullStart,h=new gn(i.sourceSpan.start,u,i.sourceSpan.fullStart),_=new gn(i.sourceSpan.start,u,i.sourceSpan.fullStart),S=new Fa(e,a,c,t,o,[],p,h,_,void 0),x=this._getContainer(),b=x!==null&&S.tagName!==null&&!!this._getTagDefinition(x)?.isClosedByChild(S.tagName);this._pushContainer(S,b),p?this._popContainer(c,Fa,h):i.type===37&&(this._popContainer(c,Fa,null),this.errors.push(dr.create(c,h,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(i,e){for(;this._peek.type===14||this._peek.type===38;)this._peek.type===38?e.push(this._consumeDirective(this._peek)):i.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(i){let e=this._getComponentFullName(i,this._getClosestElementLikeParent());if(!this._popContainer(e,Fa,i.sourceSpan)){let t=this._containerStack[this._containerStack.length-1],o;t instanceof Fa&&t.componentName===i.parts[0]?o=`, did you mean "${t.fullName}"?`:o=". It may happen when the tag has already been closed by another tag.";let r=`Unexpected closing tag "${e}"${o}`;this.errors.push(dr.create(e,i.sourceSpan,r))}}_getTagDefinition(i){return typeof i=="string"?this.tagDefinitionResolver(i):i instanceof qs?this.tagDefinitionResolver(i.name):i instanceof Fa&&i.tagName!==null?this.tagDefinitionResolver(i.tagName):null}_pushContainer(i,e){e&&this._containerStack.pop(),this._addToParent(i),this._containerStack.push(i)}_consumeElementEndTag(i){let e=this._getElementFullName(i,this._getClosestElementLikeParent());if(this._getTagDefinition(e)?.isVoid)this.errors.push(dr.create(e,i.sourceSpan,`Void elements do not have end tags "${i.parts[1]}"`));else if(!this._popContainer(e,qs,i.sourceSpan)){let t=`Unexpected closing tag "${e}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(dr.create(e,i.sourceSpan,t))}}_popContainer(i,e,t){let o=!1;for(let r=this._containerStack.length-1;r>=0;r--){let a=this._containerStack[r];if(((a instanceof Fa?a.fullName:a.name)===i||i===null)&&a instanceof e)return a.endSourceSpan=t,a.sourceSpan.end=t!==null?t.end:a.sourceSpan.end,this._containerStack.splice(r,this._containerStack.length-r),!o;(a instanceof Ks||!this._getTagDefinition(a)?.closedByParent)&&(o=!0)}return!1}_consumeAttr(i){let e=UC(i.parts[0],i.parts[1]),t=i.sourceSpan.end;this._peek.type===15&&this._advance();let o="",r=[],a,c;if(this._peek.type===16)for(a=this._peek.sourceSpan,c=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let h=this._advance();r.push(h),h.type===17?o+=h.parts.join("").replace(/&([^;]+);/g,$5):h.type===9?o+=h.parts[0]:o+=h.parts.join(""),c=t=h.sourceSpan.end}this._peek.type===15&&(t=this._advance().sourceSpan.end);let u=a&&c&&new gn(a.start,c,a.fullStart);return new MT(e,o,new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),i.sourceSpan,u,r.length>0?r:void 0,void 0)}_consumeDirective(i){let e=[],t=i.sourceSpan.end,o=null;if(this._advance(),this._peek.type===39){for(t=this._peek.sourceSpan.end,this._advance();this._peek.type===14;)e.push(this._consumeAttr(this._advance()));this._peek.type===40?(o=this._peek.sourceSpan,this._advance()):this.errors.push(dr.create(null,i.sourceSpan,"Unterminated directive definition"))}let r=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new gn(r.start,o===null?i.sourceSpan.end:o.end,r.fullStart);return new kT(i.parts[0],e,a,r,o)}_consumeBlockOpen(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new z1(c.parts[0],c.sourceSpan))}this._peek.type===25&&this._advance();let t=this._peek.sourceSpan.fullStart,o=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),r=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new Ks(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1)}_consumeBlockClose(i){let e=this._containerStack.length,t=this._containerStack[e-1];if(!this._popContainer(null,Ks,i.sourceSpan)){if(this._containerStack.length element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));return}this.errors.push(dr.create(null,i.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the "}" HTML entity instead.'))}}_consumeIncompleteBlock(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new z1(c.parts[0],c.sourceSpan))}let t=this._peek.sourceSpan.fullStart,o=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),r=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new Ks(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1),this._popContainer(null,Ks,null),this.errors.push(dr.create(i.parts[0],o,`Incomplete block "${i.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(i){let e=i.parts[0],t,o;if(this._peek.type!==30){this.errors.push(dr.create(i.parts[0],i.sourceSpan,`Invalid @let declaration "${e}". Declaration must have a value.`));return}else t=this._advance();if(this._peek.type!==31){this.errors.push(dr.create(i.parts[0],i.sourceSpan,`Unterminated @let declaration "${e}". Declaration must be terminated with a semicolon.`));return}else o=this._advance();let r=o.sourceSpan.fullStart,a=new gn(i.sourceSpan.start,r,i.sourceSpan.fullStart),c=i.sourceSpan.toString().lastIndexOf(e),p=i.sourceSpan.start.moveBy(c),u=new gn(p,i.sourceSpan.end),h=new j1(e,t.parts[0],a,u,t.sourceSpan);this._addToParent(h)}_consumeIncompleteLet(i){let e=i.parts[0]??"",t=e?` "${e}"`:"";if(e.length>0){let o=i.sourceSpan.toString().lastIndexOf(e),r=i.sourceSpan.start.moveBy(o),a=new gn(r,i.sourceSpan.end),c=new gn(i.sourceSpan.start,i.sourceSpan.start.moveBy(0)),p=new j1(e,"",i.sourceSpan,a,c);this._addToParent(p)}this.errors.push(dr.create(i.parts[0],i.sourceSpan,`Incomplete @let declaration${t}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestElementLikeParent(){for(let i=this._containerStack.length-1;i>-1;i--){let e=this._containerStack[i];if(e instanceof qs||e instanceof Fa)return e}return null}_addToParent(i){let e=this._getContainer();e===null?this.rootNodes.push(i):e.children.push(i)}_getElementFullName(i,e){let t=this._getPrefix(i,e);return UC(t,i.parts[1])}_getComponentFullName(i,e){let t=i.parts[0],o=this._getComponentTagName(i,e);return o===null?t:o.startsWith(":")?t+o:`${t}:${o}`}_getComponentTagName(i,e){let t=this._getPrefix(i,e),o=i.parts[2];return!t&&!o?null:!t&&o?o:UC(t,o||"ng-component")}_getPrefix(i,e){let t,o;if(i.type===33||i.type===37||i.type===36?(t=i.parts[1],o=i.parts[2]):(t=i.parts[0],o=i.parts[1]),t=t||this._getTagDefinition(o)?.implicitNamespacePrefix||"",!t&&e){let r=e instanceof qs?e.name:e.tagName;if(r!==null){let a=Ll(r)[1],c=this._getTagDefinition(a);c!==null&&!c.preventNamespaceInheritance&&(t=Kk(r))}}return t}};function j5(n,i){return n.length>0&&n[n.length-1]===i}function $5(n,i){return Z_[i]!==void 0?Z_[i]||n:/^#x[a-f0-9]+$/i.test(i)?String.fromCodePoint(parseInt(i.slice(2),16)):/^#\d+$/.test(i)?String.fromCodePoint(parseInt(i.slice(1),10)):n}var NF="ngPreserveWhitespaces",H5=new Set(["pre","template","textarea","script","style"]),FF=` \f \r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,aW=new RegExp(`[^${FF}]`),sW=new RegExp(`[${FF}]{2,}`,"g");function U5(n){return n.some(i=>i.name===NF)}function RF(n){return n.replace(new RegExp(OF,"g")," ")}var U1=class{preserveSignificantWhitespace;originalNodeMap;requireContext;icuExpansionDepth=0;constructor(i,e,t=!0){this.preserveSignificantWhitespace=i,this.originalNodeMap=e,this.requireContext=t}visitElement(i,e){if(H5.has(i.name)||U5(i.attrs)){let o=new qs(i.name,uc(this,i.attrs),uc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(o,i),o}let t=new qs(i.name,i.attrs,i.directives,uc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(t,i),t}visitAttribute(i,e){return i.name!==NF?i:null}visitText(i,e){let t=i.value.match(aW),o=e&&(e.prev instanceof Fp||e.next instanceof Fp);if(this.icuExpansionDepth>0&&this.preserveSignificantWhitespace)return i;if(t||o){let a=i.tokens.map(h=>h.type===5?mW(h):h);if(!this.preserveSignificantWhitespace&&a.length>0){let h=a[0];a.splice(0,1,lW(h,e));let _=a[a.length-1];a.splice(a.length-1,1,cW(_,e))}let c=VF(i.value),p=this.preserveSignificantWhitespace?c:dW(c,e),u=new Jp(p,i.sourceSpan,a,i.i18n);return this.originalNodeMap?.set(u,i),u}return null}visitComment(i,e){return i}visitExpansion(i,e){this.icuExpansionDepth++;let t;try{t=new Fp(i.switchValue,i.type,uc(this,i.cases),i.sourceSpan,i.switchValueSourceSpan,i.i18n)}finally{this.icuExpansionDepth--}return this.originalNodeMap?.set(t,i),t}visitExpansionCase(i,e){let t=new B1(i.value,uc(this,i.expression),i.sourceSpan,i.valueSourceSpan,i.expSourceSpan);return this.originalNodeMap?.set(t,i),t}visitBlock(i,e){let t=new Ks(i.name,i.parameters,uc(this,i.children),i.sourceSpan,i.nameSpan,i.startSourceSpan,i.endSourceSpan);return this.originalNodeMap?.set(t,i),t}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitComponent(i,e){if(i.tagName&&H5.has(i.tagName)||U5(i.attrs)){let o=new Fa(i.componentName,i.tagName,i.fullName,uc(this,i.attrs),uc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(o,i),o}let t=new Fa(i.componentName,i.tagName,i.fullName,i.attrs,i.directives,uc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(t,i),t}visitDirective(i,e){return i}visit(i,e){if(this.requireContext&&!e)throw new Error("WhitespaceVisitor requires context. Visit via `visitAllWithSiblings` to get this context.");return!1}};function lW(n,i){return n.type!==5||!!i?.prev?n:LF(n,t=>t.trimStart())}function cW(n,i){return n.type!==5||!!i?.next?n:LF(n,t=>t.trimEnd())}function dW(n,i){let e=!i?.prev,t=!i?.next,o=e?n.trimStart():n;return t?o.trimEnd():o}function mW({type:n,parts:i,sourceSpan:e}){return{type:n,parts:[VF(i[0])],sourceSpan:e}}function LF({type:n,parts:i,sourceSpan:e},t){return{type:n,parts:[t(i[0])],sourceSpan:e}}function VF(n){return RF(n).replace(sW," ")}function uc(n,i){let e=[];return i.forEach((t,o)=>{let r={prev:i[o-1],next:i[o+1]},a=t.visit(n,r);a&&e.push(a)}),e}var un=(function(n){return n[n.Character=0]="Character",n[n.Identifier=1]="Identifier",n[n.PrivateIdentifier=2]="PrivateIdentifier",n[n.Keyword=3]="Keyword",n[n.String=4]="String",n[n.Operator=5]="Operator",n[n.Number=6]="Number",n[n.RegExpBody=7]="RegExpBody",n[n.RegExpFlags=8]="RegExpFlags",n[n.Error=9]="Error",n})(un||{}),Rp=(function(n){return n[n.Plain=0]="Plain",n[n.TemplateLiteralPart=1]="TemplateLiteralPart",n[n.TemplateLiteralEnd=2]="TemplateLiteralEnd",n})(Rp||{}),pW=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],e0=class{tokenize(i){return new AT(i).scan()}},As=class{index;end;type;numValue;strValue;constructor(i,e,t,o,r){this.index=i,this.end=e,this.type=t,this.numValue=o,this.strValue=r}isCharacter(i){return this.type===un.Character&&this.numValue===i}isNumber(){return this.type===un.Number}isString(){return this.type===un.String}isOperator(i){return this.type===un.Operator&&this.strValue===i}isIdentifier(){return this.type===un.Identifier}isPrivateIdentifier(){return this.type===un.PrivateIdentifier}isKeyword(){return this.type===un.Keyword}isKeywordLet(){return this.type===un.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===un.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===un.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===un.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===un.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===un.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===un.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===un.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===un.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===un.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===un.Keyword&&this.strValue==="instanceof"}isError(){return this.type===un.Error}isRegExpBody(){return this.type===un.RegExpBody}isRegExpFlags(){return this.type===un.RegExpFlags}toNumber(){return this.type===un.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===Rp.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===Rp.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case un.Character:case un.Identifier:case un.Keyword:case un.Operator:case un.PrivateIdentifier:case un.String:case un.Error:case un.RegExpBody:case un.RegExpFlags:return this.strValue;case un.Number:return this.numValue.toString();default:return null}}},n_=class extends As{kind;constructor(i,e,t,o){super(i,e,un.String,0,t),this.kind=o}};function jg(n,i,e){return new As(n,i,un.Character,e,String.fromCharCode(e))}function uW(n,i,e){return new As(n,i,un.Identifier,0,e)}function hW(n,i,e){return new As(n,i,un.PrivateIdentifier,0,e)}function fW(n,i,e){return new As(n,i,un.Keyword,0,e)}function Xd(n,i,e){return new As(n,i,un.Operator,0,e)}function gW(n,i,e){return new As(n,i,un.Number,e,"")}function _W(n,i,e){return new As(n,i,un.Error,0,e)}function vW(n,i,e){return new As(n,i,un.RegExpBody,0,e)}function CW(n,i,e){return new As(n,i,un.RegExpFlags,0,e)}var $g=new As(-1,-1,un.Character,0,""),AT=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(i){this.input=i,this.length=i.length,this.advance()}scan(){let i=this.scanToken();for(;i!==null;)this.tokens.push(i),i=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Gr:this.input.charCodeAt(this.index)}scanToken(){let i=this.input,e=this.length,t=this.peek,o=this.index;for(;t<=nF;)if(++o>=e){t=Gr;break}else t=i.charCodeAt(o);if(this.peek=t,this.index=o,o>=e)return null;if(G5(t))return this.scanIdentifier();if(Xs(t))return this.scanNumber(o);let r=o;switch(t){case yp:return this.advance(),Xs(this.peek)?this.scanNumber(r):this.peek!==yp?jg(r,this.index,yp):(this.advance(),this.peek===yp?(this.advance(),Xd(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(t)}]`,0));case Va:case Cr:case bc:case _d:case va:case _c:case es:return this.scanCharacter(r,t);case Ys:return this.scanOpenBrace(r,t);case Ra:return this.scanCloseBrace(r,t);case V_:case L_:return this.scanString();case lT:return this.advance(),this.scanTemplateLiteralPart(r);case iF:return this.scanPrivateIdentifier();case oF:return this.scanComplexOperator(r,"+",Hr,"=");case w1:return this.scanComplexOperator(r,"-",Hr,"=");case Qs:return this.isStartOfRegex()?this.scanRegex(o):this.scanComplexOperator(r,"/",Hr,"=");case cH:return this.scanComplexOperator(r,"%",Hr,"=");case hH:return this.scanOperator(r,"^");case m5:return this.scanStar(r);case p5:return this.scanQuestion(r);case _h:case Ss:return this.scanComplexOperator(r,String.fromCharCode(t),Hr,"=");case sT:return this.scanComplexOperator(r,"!",Hr,"=",Hr,"=");case Hr:return this.scanEquals(r);case S1:return this.scanComplexOperator(r,"&",S1,"&",Hr,"=");case u5:return this.scanComplexOperator(r,"|",u5,"|",Hr,"=");case pF:for(;B_(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(t)}]`,0)}scanCharacter(i,e){return this.advance(),jg(i,this.index,e)}scanOperator(i,e){return this.advance(),Xd(i,this.index,e)}scanOpenBrace(i,e){return this.braceStack.push("expression"),this.advance(),jg(i,this.index,e)}scanCloseBrace(i,e){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(jg(i,this.index,Ra)),this.scanTemplateLiteralPart(this.index)):jg(i,this.index,e)}scanComplexOperator(i,e,t,o,r,a){this.advance();let c=e;return this.peek==t&&(this.advance(),c+=o),r!=null&&this.peek==r&&(this.advance(),c+=a),Xd(i,this.index,c)}scanEquals(i){this.advance();let e="=";if(this.peek===Hr)this.advance(),e+="=";else if(this.peek===Ss)return this.advance(),e+=">",Xd(i,this.index,e);return this.peek===Hr&&(this.advance(),e+="="),Xd(i,this.index,e)}scanIdentifier(){let i=this.index;for(this.advance();W5(this.peek);)this.advance();let e=this.input.substring(i,this.index);return pW.indexOf(e)>-1?fW(i,this.index,e):uW(i,this.index,e)}scanPrivateIdentifier(){let i=this.index;if(this.advance(),!G5(this.peek))return this.error("Invalid character [#]",-1);for(;W5(this.peek);)this.advance();let e=this.input.substring(i,this.index);return hW(i,this.index,e)}scanNumber(i){let e=this.index===i,t=!1;for(this.advance();;){if(!Xs(this.peek))if(this.peek===_m){if(!Xs(this.input.charCodeAt(this.index-1))||!Xs(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);t=!0}else if(this.peek===yp)e=!1;else if(bW(this.peek)){if(this.advance(),xW(this.peek)&&this.advance(),!Xs(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let o=this.input.substring(i,this.index);t&&(o=o.replace(/_/g,""));let r=e?SW(o):parseFloat(o);return gW(i,this.index,r)}scanString(){let i=this.index,e=this.peek;this.advance();let t="",o=this.index,r=this.input;for(;this.peek!=e;)if(this.peek==Np){let c=this.scanStringBackslash(t,o);if(typeof c!="string")return c;t=c,o=this.index}else{if(this.peek==Gr)return this.error("Unterminated quote",0);this.advance()}let a=r.substring(o,this.index);return this.advance(),new n_(i,this.index,t+a,Rp.Plain)}scanQuestion(i){this.advance();let e="?";return this.peek===p5?(e+="?",this.advance(),this.peek===Hr&&(e+="=",this.advance())):this.peek===yp&&(e+=".",this.advance()),Xd(i,this.index,e)}scanTemplateLiteralPart(i){let e="",t=this.index;for(;this.peek!==lT;)if(this.peek===Np){let r=this.scanStringBackslash(e,t);if(typeof r!="string")return r;e=r,t=this.index}else if(this.peek===ob){let r=this.index;if(this.advance(),this.peek===Ys)return this.braceStack.push("interpolation"),this.tokens.push(new n_(i,r,e+this.input.substring(t,r),Rp.TemplateLiteralPart)),this.advance(),Xd(r,this.index,this.input.substring(r,this.index))}else{if(this.peek===Gr)return this.error("Unterminated template literal",0);this.advance()}let o=this.input.substring(t,this.index);return this.advance(),new n_(i,this.index,e+o,Rp.TemplateLiteralEnd)}error(i,e){let t=this.index+e;return _W(t,this.index,`Lexer Error: ${i} at column ${t} in expression [${this.input}]`)}scanStringBackslash(i,e){i+=this.input.substring(e,this.index);let t;if(this.advance(),this.peek===cF){let o=this.input.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(o))t=parseInt(o,16);else return this.error(`Invalid unicode escape [\\u${o}]`,0);for(let r=0;r<5;r++)this.advance()}else t=yW(this.peek),this.advance();return i+=String.fromCharCode(t),i}scanStar(i){this.advance();let e="*";return this.peek===m5?(e+="*",this.advance(),this.peek===Hr&&(e+="=",this.advance())):this.peek===Hr&&(e+="=",this.advance()),Xd(i,this.index,e)}isStartOfRegex(){if(this.tokens.length===0)return!0;let i=this.tokens[this.tokens.length-1];if(i.isOperator("!")){let e=this.tokens.length>1?this.tokens[this.tokens.length-2]:null;return e===null||e.type!==un.Identifier&&!e.isCharacter(Cr)&&!e.isCharacter(_d)}return i.type===un.Operator||i.isCharacter(Va)||i.isCharacter(bc)||i.isCharacter(va)||i.isCharacter(_c)}scanRegex(i){this.advance();let e=this.index,t=!1,o=!1;for(;;){let p=this.peek;if(p===Gr)return this.error("Unterminated regular expression",0);if(t)t=!1;else if(p===Np)t=!0;else if(p===bc)o=!0;else if(p===_d)o=!1;else if(p===Qs&&!o)break;this.advance()}let r=this.input.substring(e,this.index);this.advance();let a=vW(i,this.index,r),c=this.scanRegexFlags(this.index);return c!==null?(this.tokens.push(a),c):a}scanRegexFlags(i){if(!mm(this.peek))return null;for(;mm(this.peek);)this.advance();return CW(i,this.index,this.input.substring(i,this.index))}};function G5(n){return Qp<=n&&n<=l0||gm<=n&&n<=Bh||n==_m||n==ob}function W5(n){return mm(n)||Xs(n)||n==_m||n==ob}function bW(n){return n==gH||n==mH}function xW(n){return n==w1||n==oF}function yW(n){switch(n){case aF:return Op;case yE:return tF;case sF:return bE;case lF:return CE;case dF:return eF;default:return n}}function SW(n){let i=parseInt(n);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+n);return i}var OT=class{strings;expressions;offsets;constructor(i,e,t){this.strings=i,this.expressions=e,this.offsets=t}},NT=class{templateBindings;warnings;errors;constructor(i,e,t){this.templateBindings=i,this.warnings=e,this.errors=t}};function em(n){return n.start.toString()||"(unknown)"}var G1=class{_lexer;_supportsDirectPipeReferences;constructor(i,e=!1){this._lexer=i,this._supportsDirectPipeReferences=e}parseAction(i,e,t){let o=[];this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r),c=new kp(i,e,t,a,1,o,0,this._supportsDirectPipeReferences).parseChain();return new ts(c,i,em(e),t,o)}parseBinding(i,e,t){let o=[],r=this._parseBindingAst(i,e,t,o);return new ts(r,i,em(e),t,o)}checkSimpleExpression(i){let e=new FT;return i.visit(e),e.errors}parseSimpleBinding(i,e,t){let o=[],r=this._parseBindingAst(i,e,t,o),a=this.checkSimpleExpression(r);return a.length>0&&o.push(hh(`Host binding expression cannot contain ${a.join(" ")}`,i,"",e)),new ts(r,i,em(e),t,o)}_parseBindingAst(i,e,t,o){this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r);return new kp(i,e,t,a,0,o,0,this._supportsDirectPipeReferences).parseChain()}parseTemplateBindings(i,e,t,o,r){let a=this._lexer.tokenize(e),c=[];return new kp(e,t,r,a,0,c,0,this._supportsDirectPipeReferences).parseTemplateBindings({source:i,span:new Ms(o,o+i.length)})}parseInterpolation(i,e,t,o){let r=[],{strings:a,expressions:c,offsets:p}=this.splitInterpolation(i,e,r,o);if(c.length===0)return null;let u=[];for(let h=0;hh.text),u,i,em(e),t,r)}parseInterpolationExpression(i,e,t){let{stripped:o}=this._stripComments(i),r=this._lexer.tokenize(o),a=[],c=new kp(i,e,t,r,0,a,0,this._supportsDirectPipeReferences).parseChain(),p=["",""];return this.createInterpolationAst(p,[c],i,em(e),t,a)}createInterpolationAst(i,e,t,o,r,a){let c=new Up(0,t.length),p=new a0(c,c.toAbsolute(r),i,e);return new ts(p,t,o,r,a)}splitInterpolation(i,e,t,o){let r=[],a=[],c=[],p=o?wW(o):null,u=0,h=!1,_=!1,S="{{",x="}}";for(;u-1)break;o>-1&&r>-1&&i.push(hh("Got interpolation ({{}}) where expression was expected",e,`at column ${o} in`,t))}_getInterpolationEndIndex(i,e,t){for(let o of this._forEachUnquotedChar(i,t)){if(i.startsWith(e,o))return o;if(i.startsWith("//",o))return i.indexOf(e,o)}return-1}*_forEachUnquotedChar(i,e){let t=null,o=0;for(let r=e;r=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(i,e){let t=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(t=e),i>t){let o=t;t=i,i=o}return new Up(i,t)}sourceSpan(i,e){let t=`${i}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(i,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(i,e){this.context|=i;let t=e();return this.context^=i,t}consumeOptionalCharacter(i){return this.next.isCharacter(i)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(i){this.consumeOptionalCharacter(i)||this.error(`Missing expected ${String.fromCharCode(i)}`)}consumeOptionalOperator(i){return this.next.isOperator(i)?(this.advance(),!0):!1}isAssignmentOperator(i){return i.type===un.Operator&&Na.isAssignmentOperation(i.strValue)}expectOperator(i){this.consumeOptionalOperator(i)||this.error(`Missing expected operator ${i}`)}prettyPrintToken(i){return i===$g?"end of input":`token ${i}`}expectIdentifierOrKeyword(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier or keyword`),null):(this.advance(),i.toString())}expectIdentifierOrKeywordOrString(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()&&!i.isString()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier, keyword, or string`),""):(this.advance(),i.toString())}parseChain(){let i=[],e=this.inputIndex;for(;this.index=gm&&u<=Bh?HC.ReferencedDirectly:HC.ReferencedByName}else p=HC.ReferencedByName;e=new l1(this.span(i),this.sourceSpan(i,a),e,o,c,p,r)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let i=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let t=this.parsePipe(),o;if(this.consumeOptionalCharacter(_c))o=this.parsePipe();else{let r=this.inputIndex,a=this.input.substring(i,r);this.error(`Conditional expression ${a} requires all 3 expressions`),o=new _a(this.span(i),this.sourceSpan(i))}return new s1(this.span(i),this.sourceSpan(i),e,t,o)}else return e}parseLogicalOr(){let i=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let t=this.parseLogicalAnd();e=new Na(this.span(i),this.sourceSpan(i),"||",e,t)}return e}parseLogicalAnd(){let i=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let t=this.parseNullishCoalescing();e=new Na(this.span(i),this.sourceSpan(i),"&&",e,t)}return e}parseNullishCoalescing(){let i=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let t=this.parseEquality();e=new Na(this.span(i),this.sourceSpan(i),"??",e,t)}return e}parseEquality(){let i=this.inputIndex,e=this.parseRelational();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();let o=this.parseRelational();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseRelational(){let i=this.inputIndex,e=this.parseAdditive();for(;this.next.type==un.Operator||this.next.isKeywordIn()||this.next.isKeywordInstanceOf();){let t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":case"in":case"instanceof":this.advance();let o=this.parseAdditive();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseAdditive(){let i=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"+":case"-":this.advance();let o=this.parseMultiplicative();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseMultiplicative(){let i=this.inputIndex,e=this.parseExponentiation();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let o=this.parseExponentiation();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseExponentiation(){let i=this.inputIndex,e=this.parsePrefix();for(;this.next.type==un.Operator&&this.next.strValue==="**";){(e instanceof gh||e instanceof b_||e instanceof x_||e instanceof y_)&&this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"),this.advance();let t=this.parseExponentiation();e=new Na(this.span(i),this.sourceSpan(i),"**",e,t)}return e}parsePrefix(){if(this.next.type==un.Operator){let i=this.inputIndex,e=this.next.strValue,t;switch(e){case"+":return this.advance(),t=this.parsePrefix(),gh.createPlus(this.span(i),this.sourceSpan(i),t);case"-":return this.advance(),t=this.parsePrefix(),gh.createMinus(this.span(i),this.sourceSpan(i),t);case"!":return this.advance(),t=this.parsePrefix(),new b_(this.span(i),this.sourceSpan(i),t)}}else if(this.next.isKeywordTypeof()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new x_(this.span(i),this.sourceSpan(i),e)}else if(this.next.isKeywordVoid()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new y_(this.span(i),this.sourceSpan(i),e)}return this.parseCallChain()}parseCallChain(){let i=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(yp))e=this.parseAccessMember(e,i,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(Va)?e=this.parseCall(e,i,!0):e=this.consumeOptionalCharacter(bc)?this.parseKeyedReadOrWrite(e,i,!0):this.parseAccessMember(e,i,!0);else if(this.consumeOptionalCharacter(bc))e=this.parseKeyedReadOrWrite(e,i,!1);else if(this.consumeOptionalCharacter(Va))e=this.parseCall(e,i,!1);else if(this.consumeOptionalOperator("!"))e=new S_(this.span(i),this.sourceSpan(i),e);else if(this.next.isTemplateLiteralEnd())e=this.parseNoInterpolationTaggedTemplateLiteral(e,i);else if(this.next.isTemplateLiteralPart())e=this.parseTaggedTemplateLiteral(e,i);else return e}parsePrimary(){let i=this.inputIndex;if(this.isArrowFunction())return this.parseArrowFunction(i);if(this.consumeOptionalCharacter(Va)){this.rparensExpected++;let e=this.parsePipe();return this.consumeOptionalCharacter(Cr)||(this.error("Missing closing parentheses"),this.consumeOptionalCharacter(Cr)),this.rparensExpected--,new k_(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isKeywordNull())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),null);if(this.next.isKeywordUndefined())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),void 0);if(this.next.isKeywordTrue())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),!0);if(this.next.isKeywordFalse())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),!1);if(this.next.isKeywordIn())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),"in");if(this.next.isKeywordThis())return this.advance(),new g_(this.span(i),this.sourceSpan(i));if(this.consumeOptionalCharacter(bc))return this.parseLiteralArray(i);if(this.next.isCharacter(Ys))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new Mc(this.span(i),this.sourceSpan(i)),i,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new Ja(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isTemplateLiteralEnd())return this.parseNoInterpolationTemplateLiteral();if(this.next.isTemplateLiteralPart())return this.parseTemplateLiteral();if(this.next.isString()&&this.next.kind===Rp.Plain){let e=this.next.toString();return this.advance(),new Ja(this.span(i),this.sourceSpan(i),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new _a(this.span(i),this.sourceSpan(i))):this.next.isRegExpBody()?this.parseRegularExpressionLiteral():this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new _a(this.span(i),this.sourceSpan(i))):(this.error(`Unexpected token ${this.next}`),new _a(this.span(i),this.sourceSpan(i)))}}}parseLiteralArray(i){this.rbracketsExpected++;let e=[];do if(this.next.isOperator("..."))e.push(this.parseSpreadElement());else if(!this.next.isCharacter(_d))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(va));return this.rbracketsExpected--,this.expectCharacter(_d),new C_(this.span(i),this.sourceSpan(i),e)}parseLiteralMap(){let i=[],e=[],t=this.inputIndex;if(this.expectCharacter(Ys),!this.consumeOptionalCharacter(Ra)){this.rbracesExpected++;do{let o=this.inputIndex;if(this.next.isOperator("...")){this.advance(),i.push({kind:"spread",span:this.span(o),sourceSpan:this.sourceSpan(o)}),e.push(this.parsePipe());continue}let r=this.next.isString(),a=this.expectIdentifierOrKeywordOrString(),c=this.span(o),p=this.sourceSpan(o),u={kind:"property",key:a,quoted:r,span:c,sourceSpan:p};i.push(u),r?(this.expectCharacter(_c),e.push(this.parsePipe())):this.consumeOptionalCharacter(_c)?e.push(this.parsePipe()):(u.isShorthandInitialized=!0,e.push(new Cc(c,p,p,new Mc(c,p),a)))}while(this.consumeOptionalCharacter(va)&&!this.next.isCharacter(Ra));this.rbracesExpected--,this.expectCharacter(Ra)}return new Wp(this.span(t),this.sourceSpan(t),i,e)}parseAccessMember(i,e,t){let o=this.inputIndex,r=this.withContext(Yg.Writable,()=>{let c=this.expectIdentifierOrKeyword()??"";return c.length===0&&this.error("Expected identifier for property access",i.span.end),c}),a=this.sourceSpan(o);if(t)return this.isAssignmentOperator(this.next)?(this.advance(),this.error("The '?.' operator cannot be used in the assignment"),new _a(this.span(e),this.sourceSpan(e))):new __(this.span(e),this.sourceSpan(e),a,i,r);if(this.isAssignmentOperator(this.next)){let c=this.next.strValue;if(!(this.parseFlags&1))return this.advance(),this.error("Bindings cannot contain assignments"),new _a(this.span(e),this.sourceSpan(e));let p=new Cc(this.span(e),this.sourceSpan(e),a,i,r);this.advance();let u=this.parseConditional();return new Na(this.span(e),this.sourceSpan(e),c,p,u)}else return new Cc(this.span(e),this.sourceSpan(e),a,i,r)}parseCall(i,e,t){let o=this.inputIndex;this.rparensExpected++;let r=this.parseCallArguments(),a=this.span(o,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(Cr),this.rparensExpected--;let c=this.span(e),p=this.sourceSpan(e);return t?new d1(c,p,i,r,a):new wh(c,p,i,r,a)}parseCallArguments(){if(this.next.isCharacter(Cr))return[];let i=[];do i.push(this.next.isOperator("...")?this.parseSpreadElement():this.parsePipe());while(this.consumeOptionalCharacter(va));return i}parseSpreadElement(){this.next.isOperator("...")||this.error("Spread element must start with '...' operator");let i=this.inputIndex;this.advance();let e=this.parsePipe(),t=this.span(i),o=this.sourceSpan(i);return new c1(t,o,e)}expectTemplateBindingKey(){let i="",e=!1,t=this.currentAbsoluteOffset;do i+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(i+="-");while(e);return{source:i,span:new Ms(t,t+i.length)}}parseTemplateBindings(i){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(i));this.index{this.rbracketsExpected++;let o=this.parsePipe();if(o instanceof _a&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(_d),this.isAssignmentOperator(this.next)){let r=this.next.strValue;if(t)this.advance(),this.error("The '?.' operator cannot be used in the assignment");else{let a=new Gp(this.span(e),this.sourceSpan(e),i,o);this.advance();let c=this.parseConditional();return new Na(this.span(e),this.sourceSpan(e),r,a,c)}}else return t?new v_(this.span(e),this.sourceSpan(e),i,o):new Gp(this.span(e),this.sourceSpan(e),i,o);return new _a(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(i){let e=[];this.consumeOptionalCharacter(_c);let t=this.getDirectiveBoundTarget(),o=this.currentAbsoluteOffset,r=this.parseAsBinding(i);r||(this.consumeStatementTerminator(),o=this.currentAbsoluteOffset);let a=new Ms(i.span.start,o);return e.push(new qk(a,i,t)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===$g||this.peekKeywordAs()||this.peekKeywordLet())return null;let i=this.parsePipe(),{start:e,end:t}=i.span,o=this.input.substring(e,t);return new ts(i,o,em(this.parseSourceSpan),this.absoluteOffset+e,this.errors)}parseAsBinding(i){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let t=new Ms(i.span.start,this.currentAbsoluteOffset);return new T_(t,e,i)}parseLetBinding(){if(!this.peekKeywordLet())return null;let i=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),t=null;this.consumeOptionalOperator("=")&&(t=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let o=new Ms(i,this.currentAbsoluteOffset);return new T_(o,e,t)}parseNoInterpolationTaggedTemplateLiteral(i,e){let t=this.parseNoInterpolationTemplateLiteral();return new w_(this.span(e),this.sourceSpan(e),i,t)}parseNoInterpolationTemplateLiteral(){let i=this.next.strValue,e=this.inputIndex;this.advance();let t=this.span(e),o=this.sourceSpan(e);return new M_(t,o,[new m1(t,o,i)],[])}parseTaggedTemplateLiteral(i,e){let t=this.parseTemplateLiteral();return new w_(this.span(e),this.sourceSpan(e),i,t)}parseTemplateLiteral(){let i=[],e=[],t=this.inputIndex;for(;this.next!==$g;){let o=this.next;if(o.isTemplateLiteralPart()||o.isTemplateLiteralEnd()){let r=this.inputIndex;if(this.advance(),i.push(new m1(this.span(r),this.sourceSpan(r),o.strValue)),o.isTemplateLiteralEnd())break}else if(o.isTemplateLiteralInterpolationStart()){this.advance(),this.rbracesExpected++;let r=this.parsePipe();r instanceof _a?this.error("Template literal interpolation cannot be empty"):e.push(r),this.rbracesExpected--}else this.advance()}return new M_(this.span(t),this.sourceSpan(t),i,e)}parseRegularExpressionLiteral(){let i=this.next;if(this.advance(),!i.isRegExpBody())return new _a(this.span(this.inputIndex),this.sourceSpan(this.inputIndex));let e=null;if(this.next.isRegExpFlags()){e=this.next,this.advance();let r=new Set;for(let a=0;a`"${p}"`).join(", "),e.index+a)}}let t=i.index,o=e?e.end:i.end;return new u1(this.span(t,o),this.sourceSpan(t,o),i.strValue,e?e.strValue:null)}parseArrowFunction(i){let e;if(this.next.isIdentifier()){let o=this.next;this.advance(),e=[this.getArrowFunctionIdentifierArg(o)]}else this.next.isCharacter(Va)?(this.rparensExpected++,this.advance(),e=this.parseArrowFunctionParameters(),this.rparensExpected--):(e=[],this.error(`Unexpected token ${this.next}`));this.expectOperator("=>");let t;if(this.next.isCharacter(Ys))this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."),t=new _a(this.span(i),this.sourceSpan(i));else{let o=this.parseFlags;this.parseFlags=1,t=this.parseExpression(),this.parseFlags=o}return new p1(this.span(i),this.sourceSpan(i),e,t)}parseArrowFunctionParameters(){let i=[];if(!this.consumeOptionalCharacter(Cr))for(;this.next!==$g;)if(this.next.isIdentifier()){let e=this.next;if(this.advance(),i.push(this.getArrowFunctionIdentifierArg(e)),this.consumeOptionalCharacter(Cr))break;this.expectCharacter(va)}else{this.error(`Unexpected token ${this.next}`);break}return i}getArrowFunctionIdentifierArg(i){return new Wk(i.strValue,this.span(i.index),this.sourceSpan(i.index))}isArrowFunction(){let i=this.index,e=this.tokens;if(i>e.length-2)return!1;if(e[i].isIdentifier()&&e[i+1].isOperator("=>"))return!0;if(e[i].isCharacter(Va)){let t=i+1;for(t;t")}return!1}consumeStatementTerminator(){this.consumeOptionalCharacter(es)||this.consumeOptionalCharacter(va)}error(i,e=this.index){this.errors.push(hh(i,this.input,this.getErrorLocationText(e),this.parseSourceSpan)),this.skip()}getErrorLocationText(i){return i0&&(e=` ${e} `);let o=em(t),r=`Parser Error: ${n}${e}[${i}] in ${o}`;return new sn(t,r)}var FT=class extends Mh{errors=[];visitPipe(){this.errors.push("pipes")}};function wW(n){let i=new Map,e=0,t=0,o=0;for(;oc+p.length,0);t+=a,e+=a}i.set(t,e),o++}return i}function MW(n){return n.visit(new RT)}var RT=class{visitUnary(i,e){return`${i.operator}${i.expr.visit(this,e)}`}visitBinary(i,e){return`${i.left.visit(this,e)} ${i.operation} ${i.right.visit(this,e)}`}visitChain(i,e){return i.expressions.map(t=>t.visit(this,e)).join("; ")}visitConditional(i,e){return`${i.condition.visit(this,e)} ? ${i.trueExp.visit(this,e)} : ${i.falseExp.visit(this,e)}`}visitThisReceiver(){return"this"}visitImplicitReceiver(){return""}visitInterpolation(i,e){return TW(i.strings,i.expressions.map(t=>t.visit(this,e))).join("")}visitKeyedRead(i,e){return`${i.receiver.visit(this,e)}[${i.key.visit(this,e)}]`}visitLiteralArray(i,e){return`[${i.expressions.map(t=>t.visit(this,e)).join(", ")}]`}visitLiteralMap(i,e){return`{${kW(i.keys.map(t=>t.kind==="spread"?"...":t.quoted?`'${t.key}'`:t.key),i.values.map(t=>t.visit(this,e))).map(([t,o])=>`${t}: ${o}`).join(", ")}}`}visitLiteralPrimitive(i){if(i.value===null)return"null";switch(typeof i.value){case"number":case"boolean":return i.value.toString();case"undefined":return"undefined";case"string":return`'${i.value.replace(/'/g,"\\'")}'`;default:throw new Error(`Unsupported primitive type: ${i.value}`)}}visitPipe(i,e){return`${i.exp.visit(this,e)} | ${i.name}`}visitPrefixNot(i,e){return`!${i.expression.visit(this,e)}`}visitNonNullAssert(i,e){return`${i.expression.visit(this,e)}!`}visitPropertyRead(i,e){return i.receiver instanceof Mc||i.receiver instanceof g_?i.name:`${i.receiver.visit(this,e)}.${i.name}`}visitSafePropertyRead(i,e){return`${i.receiver.visit(this,e)}?.${i.name}`}visitSafeKeyedRead(i,e){return`${i.receiver.visit(this,e)}?.[${i.key.visit(this,e)}]`}visitCall(i,e){return`${i.receiver.visit(this,e)}(${i.args.map(t=>t.visit(this,e)).join(", ")})`}visitSafeCall(i,e){return`${i.receiver.visit(this,e)}?.(${i.args.map(t=>t.visit(this,e)).join(", ")})`}visitTypeofExpression(i,e){return`typeof ${i.expression.visit(this,e)}`}visitVoidExpression(i,e){return`void ${i.expression.visit(this,e)}`}visitRegularExpressionLiteral(i,e){return`/${i.body}/${i.flags||""}`}visitArrowFunction(i,e){let t;return i.parameters.length===1?t=i.parameters[0].name:t=`(${i.parameters.map(o=>o.name).join(", ")})`,`${t} => ${i.body.visit(this,e)}`}visitASTWithSource(i,e){return i.ast.visit(this,e)}visitTemplateLiteral(i,e){let t="";for(let o=0;o[e,i[t]])}function TW(n,i){let e=[];for(let t=0;t(n.set(i,e),n),new Map),Rh=class extends LT{_schema=new Map;_eventSchema=new Map;constructor(){super(),AW.forEach(i=>{let e=new Map,t=new Set,[o,r]=i.split("|"),a=r.split(","),[c,p]=o.split("^");c.split(",").forEach(h=>{this._schema.set(h.toLowerCase(),e),this._eventSchema.set(h.toLowerCase(),t)});let u=p&&this._schema.get(p.toLowerCase());if(u){for(let[h,_]of u)e.set(h,_);for(let h of this._eventSchema.get(p.toLowerCase()))t.add(h)}a.forEach(h=>{if(h.length>0)switch(h[0]){case"*":t.add(h.substring(1));break;case"!":e.set(h.substring(1),EW);break;case"#":e.set(h.substring(1),DW);break;case"%":e.set(h.substring(1),IW);break;default:e.set(h,PW)}})})}hasProperty(i,e,t){if(t.some(r=>r.name===Q4.name))return!0;if(i.indexOf("-")>-1){if(a5(i)||Xk(i))return!1;if(t.some(r=>r.name===q4.name))return!0}return(this._schema.get(i.toLowerCase())||this._schema.get("unknown")).has(e)}hasElement(i,e){return e.some(t=>t.name===Q4.name)||i.indexOf("-")>-1&&(a5(i)||Xk(i)||e.some(t=>t.name===q4.name))?!0:this._schema.has(i.toLowerCase())}securityContext(i,e,t){t&&(e=this.getMappedPropName(e)),i=i.toLowerCase(),e=e.toLowerCase();let o=Q5()[i+"|"+e];return o||(o=Q5()["*|"+e],o||eo.NONE)}getMappedPropName(i){return BF.get(i)??i}getDefaultComponentElementName(){return"ng-component"}validateProperty(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${i}' is disallowed for security reasons, please use (${i.slice(2)})=... If '${i}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${i}' is disallowed for security reasons, please use (${i.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(i){let e=this._schema.get(i.toLowerCase())||this._schema.get("unknown");return Array.from(e.keys()).map(t=>OW.get(t)??t)}allKnownEventsOfElement(i){return Array.from(this._eventSchema.get(i.toLowerCase())??[])}normalizeAnimationStyleProperty(i){return D$(i)}normalizeAnimationStyleValue(i,e,t){let o="",r=t.toString().trim(),a=null;if(NW(i)&&t!==0&&t!=="0")if(typeof t=="number")o="px";else{let c=t.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&(a=`Please provide a CSS unit value for ${e}:${t}`)}return{error:a,value:r+o}}};function NW(n){switch(n){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var Kn=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:i,implicitNamespacePrefix:e,contentType:t=gc.PARSABLE_DATA,closedByParent:o=!1,isVoid:r=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:c=!1,canSelfClose:p=!1}={}){i&&i.length>0&&i.forEach(u=>this.closedByChildren[u]=!0),this.isVoid=r,this.closedByParent=o||r,this.implicitNamespacePrefix=e||null,this.contentType=t,this.ignoreFirstLf=a,this.preventNamespaceInheritance=c,this.canSelfClose=p??r}isClosedByChild(i){return this.isVoid||i.toLowerCase()in this.closedByChildren}getContentType(i){return typeof this.contentType=="object"?(i===void 0?void 0:this.contentType[i])??this.contentType.default:this.contentType}},X5,ah;function VT(n){return ah||(X5=new Kn({canSelfClose:!0}),ah=Object.assign(Object.create(null),{base:new Kn({isVoid:!0}),meta:new Kn({isVoid:!0}),area:new Kn({isVoid:!0}),embed:new Kn({isVoid:!0}),link:new Kn({isVoid:!0}),img:new Kn({isVoid:!0}),input:new Kn({isVoid:!0}),param:new Kn({isVoid:!0}),hr:new Kn({isVoid:!0}),br:new Kn({isVoid:!0}),source:new Kn({isVoid:!0}),track:new Kn({isVoid:!0}),wbr:new Kn({isVoid:!0}),p:new Kn({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new Kn({closedByChildren:["tbody","tfoot"]}),tbody:new Kn({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Kn({closedByChildren:["tbody"],closedByParent:!0}),tr:new Kn({closedByChildren:["tr"],closedByParent:!0}),td:new Kn({closedByChildren:["td","th"],closedByParent:!0}),th:new Kn({closedByChildren:["td","th"],closedByParent:!0}),col:new Kn({isVoid:!0}),svg:new Kn({implicitNamespacePrefix:"svg"}),foreignObject:new Kn({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new Kn({implicitNamespacePrefix:"math"}),li:new Kn({closedByChildren:["li"],closedByParent:!0}),dt:new Kn({closedByChildren:["dt","dd"]}),dd:new Kn({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Kn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Kn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Kn({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Kn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Kn({closedByChildren:["optgroup"],closedByParent:!0}),option:new Kn({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Kn({ignoreFirstLf:!0}),listing:new Kn({ignoreFirstLf:!0}),style:new Kn({contentType:gc.RAW_TEXT}),script:new Kn({contentType:gc.RAW_TEXT}),title:new Kn({contentType:{default:gc.ESCAPABLE_RAW_TEXT,svg:gc.PARSABLE_DATA}}),textarea:new Kn({contentType:gc.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Rh().allKnownElementNames().forEach(i=>{!ah[i]&&Kk(i)===null&&(ah[i]=new Kn({canSelfClose:!1}))})),ah[n]??ah[n.toLowerCase()]??X5}var K5={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},BT=class{_placeHolderNameCounts={};_signatureToName={};getStartTagPlaceholderName(i,e,t){let o=this._hashTag(i,e,t);if(this._signatureToName[o])return this._signatureToName[o];let r=i.toUpperCase(),a=K5[r]||`TAG_${r}`,c=this._generateUniqueName(t?a:`START_${a}`);return this._signatureToName[o]=c,c}getCloseTagPlaceholderName(i){let e=this._hashClosingTag(i);if(this._signatureToName[e])return this._signatureToName[e];let t=i.toUpperCase(),o=K5[t]||`TAG_${t}`,r=this._generateUniqueName(`CLOSE_${o}`);return this._signatureToName[e]=r,r}getPlaceholderName(i,e){let t=i.toUpperCase(),o=`PH: ${t}=${e}`;if(this._signatureToName[o])return this._signatureToName[o];let r=this._generateUniqueName(t);return this._signatureToName[o]=r,r}getUniquePlaceholder(i){return this._generateUniqueName(i.toUpperCase())}getStartBlockPlaceholderName(i,e){let t=this._hashBlock(i,e);if(this._signatureToName[t])return this._signatureToName[t];let o=this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[t]=o,o}getCloseBlockPlaceholderName(i){let e=this._hashClosingBlock(i);if(this._signatureToName[e])return this._signatureToName[e];let t=this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[e]=t,t}_hashTag(i,e,t){let o=`<${i}`,r=Object.keys(e).sort().map(c=>` ${c}=${e[c]}`).join(""),a=t?"/>":`>`;return o+r+a}_hashClosingTag(i){return this._hashTag(`/${i}`,{},!1)}_hashBlock(i,e){let t=e.length===0?"":` (${e.sort().join("; ")})`;return`@${i}${t} {}`}_hashClosingBlock(i){return this._hashBlock(`close_${i}`,[])}_toSnakeCase(i){return i.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_generateUniqueName(i){if(!this._placeHolderNameCounts.hasOwnProperty(i))return this._placeHolderNameCounts[i]=1,i;let t=this._placeHolderNameCounts[i];return this._placeHolderNameCounts[i]=t+1,`${i}_${t}`}},FW=new G1(new e0);function RW(n,i){let e=new zT(FW,n,i);return(t,o,r,a,c)=>e.toI18nMessage(t,o,r,a,c)}function LW(n,i){return i}var zT=class{_expressionParser;_retainEmptyTokens;_preserveExpressionWhitespace;constructor(i,e,t){this._expressionParser=i,this._retainEmptyTokens=e,this._preserveExpressionWhitespace=t}toI18nMessage(i,e="",t="",o="",r){let a={isIcu:i.length==1&&i[0]instanceof Fp,icuDepth:0,placeholderRegistry:new BT,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||LW},c=Co(this,i,a);return new za(c,a.placeholderToContent,a.placeholderToMessage,e,t,o)}visitElement(i,e){return this._visitElementLike(i,e)}visitComponent(i,e){return this._visitElementLike(i,e)}visitDirective(i,e){throw new Error("Unreachable code")}visitAttribute(i,e){let t=i.valueTokens===void 0||i.valueTokens.length===1?new Vg(i.value,i.valueSpan||i.sourceSpan):this._visitTextWithInterpolation(i.valueTokens,i.valueSpan||i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,t)}visitText(i,e){let t=i.tokens.length===1?new Vg(i.value,i.sourceSpan):this._visitTextWithInterpolation(i.tokens,i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,t)}visitComment(i,e){return null}visitExpansion(i,e){e.icuDepth++;let t={},o=new y1(i.switchValue,i.type,t,i.sourceSpan);if(i.cases.forEach(c=>{t[c.value]=new Cd(c.expression.map(p=>p.visit(this,e)),c.expSourceSpan)}),e.icuDepth--,e.isIcu||e.icuDepth>0){let c=e.placeholderRegistry.getUniquePlaceholder(`VAR_${i.type}`);return o.expressionPlaceholder=c,e.placeholderToContent[c]={text:i.switchValue,sourceSpan:i.switchValueSourceSpan},e.visitNodeFn(i,o)}let r=e.placeholderRegistry.getPlaceholderName("ICU",i.sourceSpan.toString());e.placeholderToMessage[r]=this.toI18nMessage([i],"","","",void 0);let a=new Ph(o,r,i.sourceSpan);return e.visitNodeFn(i,a)}visitExpansionCase(i,e){throw new Error("Unreachable code")}visitBlock(i,e){let t=Co(this,i.children,e);if(i.name==="switch")return new Cd(t,i.sourceSpan);let o=i.parameters.map(p=>p.expression),r=e.placeholderRegistry.getStartBlockPlaceholderName(i.name,o),a=e.placeholderRegistry.getCloseBlockPlaceholderName(i.name);e.placeholderToContent[r]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan},e.placeholderToContent[a]={text:i.endSourceSpan?i.endSourceSpan.toString():"}",sourceSpan:i.endSourceSpan??i.sourceSpan};let c=new cm(i.name,o,r,a,t,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,c)}visitBlockParameter(i,e){throw new Error("Unreachable code")}visitLetDeclaration(i,e){return null}_visitElementLike(i,e){let t=Co(this,i.children,e),o={},r=_=>{o[_.name]=_.value},a,c;i instanceof qs?(a=i.name,c=VT(i.name).isVoid):(a=i.fullName,c=i.tagName?VT(i.tagName).isVoid:!1),i.attrs.forEach(r),i.directives.forEach(_=>_.attrs.forEach(r));let p=e.placeholderRegistry.getStartTagPlaceholderName(a,o,c);e.placeholderToContent[p]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan};let u="";c||(u=e.placeholderRegistry.getCloseTagPlaceholderName(a),e.placeholderToContent[u]={text:``,sourceSpan:i.endSourceSpan??i.sourceSpan});let h=new lm(a,o,p,u,t,c,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,h)}_visitTextWithInterpolation(i,e,t,o){let r=[],a=!1;for(let c of i)switch(c.type){case 8:case 17:a=!0;let[p,u,h]=c.parts,_=$W(u)||"INTERPOLATION",S=t.placeholderRegistry.getPlaceholderName(_,u);if(this._preserveExpressionWhitespace)t.placeholderToContent[S]={text:c.parts.join(""),sourceSpan:c.sourceSpan},r.push(new R_(u,S,c.sourceSpan));else{let x=this.normalizeExpression(c);t.placeholderToContent[S]={text:`${p}${x}${h}`,sourceSpan:c.sourceSpan},r.push(new R_(x,S,c.sourceSpan))}break;default:if(c.parts[0].length>0||this._retainEmptyTokens){let x=r[r.length-1];x instanceof Vg?(x.value+=c.parts[0],x.sourceSpan=new gn(x.sourceSpan.start,c.sourceSpan.end,x.sourceSpan.fullStart,x.sourceSpan.details)):r.push(new Vg(c.parts[0],c.sourceSpan))}else this._retainEmptyTokens&&r.push(new Vg(c.parts[0],c.sourceSpan));break}return a?(VW(r,o),new Cd(r,e)):r[0]}normalizeExpression(i){let e=i.parts[1],t=this._expressionParser.parseBinding(e,i.sourceSpan,i.sourceSpan.start.offset);return MW(t)}};function VW(n,i){if(i instanceof za&&(BW(i),i=i.nodes[0]),i instanceof Cd){zW(i.children,n);for(let e=0;e`"${e.sourceSpan.toString()}"`).join(` `)} Second pass (${i.length} tokens): ${i.map(e=>`"${e.sourceSpan.toString()}"`).join(` `)} `.trim());if(n.some((e,t)=>i[t].constructor!==e.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}var jW=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;function $W(n){return n.split(jW)[2]}var Y5=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","iframe|src","object|codebase","object|data"]);function Z5(n,i){return n=n.toLowerCase(),i=i.toLowerCase(),Y5.has(n+"|"+i)||Y5.has("*|"+i)}var HW=n=>(i,e)=>{let t=n.get(i)??i;return t instanceof yd&&(e instanceof Ph&&t.i18n instanceof za&&(e.previousMessage=t.i18n),t.i18n=e),e},W1=class{keepI18nAttrs;enableI18nLegacyMessageIdFormat;preserveSignificantWhitespace;retainEmptyTokens;hasI18nMeta=!1;_errors=[];constructor(i=!1,e=!1,t=!0,o=!t){this.keepI18nAttrs=i,this.enableI18nLegacyMessageIdFormat=e,this.preserveSignificantWhitespace=t,this.retainEmptyTokens=o}_generateI18nMessage(i,e="",t){let{meaning:o,description:r,customId:a}=this._parseMetadata(e),p=RW(this.retainEmptyTokens,this.preserveSignificantWhitespace)(i,o,r,a,t);return this._setMessageId(p,e),this._setLegacyIds(p,e),p}visitAllWithErrors(i){let e=i.map(t=>t.visit(this,null));return new H1(e,this._errors)}visitElement(i){return this._visitElementLike(i),i}visitComponent(i,e){return this._visitElementLike(i),i}visitExpansion(i,e){let t,o=i.i18n;if(this.hasI18nMeta=!0,o instanceof Ph){let r=o.name;t=this._generateI18nMessage([i],o);let a=ZN(t);a.name=r,e!==null&&(e.placeholderToMessage[r]=t)}else t=this._generateI18nMessage([i],e||o);return i.i18n=t,i}visitText(i){return i}visitAttribute(i){return i}visitComment(i){return i}visitExpansionCase(i){return i}visitBlock(i,e){return Co(this,i.children,e),i}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitDirective(i,e){return i}_visitElementLike(i){let e;if(iH(i)){this.hasI18nMeta=!0;let t=[],o={};for(let r of i.attrs)if(r.name===KN){let a=i.i18n||r.value,c=new Map,p=this.preserveSignificantWhitespace?i.children:uc(new U1(!1,c),i.children);e=this._generateI18nMessage(p,a,HW(c)),e.nodes.length===0&&(e=void 0),i.i18n=e}else if(r.name.startsWith(aT)){let a=r.name.slice(aT.length),c;i instanceof Fa?c=i.tagName===null?!1:Z5(i.tagName,a):c=Z5(i.name,a),c?this._reportError(r,`Translating attribute '${a}' is disallowed for security reasons.`):o[a]=r.value}else t.push(r);if(Object.keys(o).length)for(let r of t){let a=o[r.name];a!==void 0&&r.value&&(r.i18n=this._generateI18nMessage([r],r.i18n||a))}this.keepI18nAttrs||(i.attrs=t)}Co(this,i.children,e)}_parseMetadata(i){return typeof i=="string"?WW(i):i instanceof za?i:{}}_setMessageId(i,e){i.id||(i.id=e instanceof za&&e.id||r$(i))}_setLegacyIds(i,e){if(this.enableI18nLegacyMessageIdFormat)i.legacyIds=[o$(i),jN(i)];else if(typeof e!="string"){let t=e instanceof za?e:e instanceof Ph?e.previousMessage:void 0;i.legacyIds=t?t.legacyIds:[]}}_reportError(i,e){this._errors.push(new sn(i.sourceSpan,e))}},UW="|",GW="@@";function WW(n=""){let i,e,t;if(n=n.trim(),n){let o=n.indexOf(GW),r=n.indexOf(UW),a;[a,i]=o>-1?[n.slice(0,o),n.slice(o+2)]:[n,""],[e,t]=r>-1?[a.slice(0,r),a.slice(r+1)]:["",a]}return{customId:i,meaning:e,description:t}}function qW(n){let i=[];return n.description?i.push({tagName:"desc",text:n.description}):i.push({tagName:"suppress",text:"{msgDescriptions}"}),n.meaning&&i.push({tagName:"meaning",text:n.meaning}),b$(i)}var QW="goog.getMsg";function XW(n,i,e,t){let o=YW(i),r=[Te(o)];Object.keys(t).length&&(r.push(ST(_E(t,!0),!0)),r.push(ST({original_code:nl(Object.keys(t).map(p=>({key:s0(p),quoted:!0,value:i.placeholders[p]?Te(i.placeholders[p].sourceSpan.toString()):Te(i.placeholderToMessage[p].nodes.map(u=>u.sourceSpan.toString()).join(""))})))})));let a=new Rr(e.name,Yn(QW).callFn(r),Ol,oa.Final);a.addLeadingComment(qW(i));let c=new sa(n.set(e));return[a,c]}var jT=class{formatPh(i){return`{$${s0(i)}}`}visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){return AF(i)}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}},KW=new jT;function YW(n){return n.nodes.map(i=>i.visit(KW,null)).join("")}function ZW(n,i,e){let{messageParts:t,placeHolders:o}=JW(i),r=eq(i),a=o.map(u=>e[u.text]),c=S$(i,t,o,a,r),p=n.set(c);return[new sa(p)]}var $T=class{placeholderToMessage;pieces;constructor(i,e){this.placeholderToMessage=i,this.pieces=e}visitText(i){if(this.pieces[this.pieces.length-1]instanceof Ip)this.pieces[this.pieces.length-1].text+=i.value;else{let e=new gn(i.sourceSpan.fullStart,i.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details);this.pieces.push(new Ip(i.value,e))}}visitContainer(i){i.children.forEach(e=>e.visit(this))}visitIcu(i){this.pieces.push(new Ip(AF(i),i.sourceSpan))}visitTagPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.isVoid||(i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan)))}visitPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan))}visitBlockPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan))}visitIcuPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan,this.placeholderToMessage[i.name]))}createPlaceholderPiece(i,e,t){return new fh(s0(i,!1),e,t)}};function JW(n){let i=[],e=new $T(n.placeholderToMessage,i);return n.nodes.forEach(t=>t.visit(e)),tq(i)}function eq(n){let i=n.nodes[0],e=n.nodes[n.nodes.length-1];return new gn(i.sourceSpan.fullStart,e.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details)}function tq(n){let i=[],e=[];n[0]instanceof fh&&i.push(yk(n[0].sourceSpan.start));for(let t=0;t{let M=S.has(b.name);return S.add(b.name),!M});let x=_.flatMap(b=>{let M=a.get(b.context);if(M===void 0)throw new Error("AssertionError: Could not find i18n expression's value");return[Te(b.name),M]});h.i18nAttributesConfig=n.addConst(new wc(x))}for(let p of n.units)for(let u of p.create)if(u.kind===V.I18nStart){let h=c.get(u.root);if(h===void 0)throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");u.messageIndex=h}}function zF(n,i,e,t){let o=[],r=new Map;for(let u of t.subMessages){let h=e.get(u),{mainVar:_,statements:S}=zF(n,i,e,h);o.push(...S);let x=r.get(h.messagePlaceholder)??[];x.push(_),r.set(h.messagePlaceholder,x)}sq(t,r),t.params=new Map([...t.params.entries()].sort());let a=Yn(n.pool.uniqueName(nq)),c=dq(n.pool,t.message.id,i,n.i18nUseExternalIds),p;if(t.needsPostprocessing||t.postprocessingParams.size>0){let u=Object.fromEntries([...t.postprocessingParams.entries()].sort()),h=_E(u,!1),_=[];t.postprocessingParams.size>0&&_.push(ST(h,!0)),p=S=>Ut(fe.i18nPostprocess).callFn([S,..._])}return o.push(...lq(t.message,a,c,t.params,p)),{mainVar:a,statements:o}}function sq(n,i){for(let[e,t]of i)t.length===1?n.params.set(e,t[0]):(n.params.set(e,Te(`${eN}${iq}${e}${eN}`)),n.postprocessingParams.set(e,Gi(t)))}function lq(n,i,e,t,o){let r=Object.fromEntries(t),a=[rq(i),tb(cq(),XW(i,n,e,r),ZW(i,n,_E(r,!1)))];return o&&a.push(new sa(i.set(o(i)))),a}function cq(){return r0(Yn(J5)).notIdentical(Te("undefined",hE)).and(Yn(J5))}function dq(n,i,e,t){let o,r=e;if(t){let a=tN("EXTERNAL_"),c=n.uniqueName(r);o=`${a}${Mp(i)}$$${c}`}else{let a=tN(r);o=n.uniqueName(a)}return Yn(o)}function mq(n){for(let i of n.units){let e=null,t=null,o=new Map,r=new Map,a=new Map;for(let c of i.create)switch(c.kind){case V.I18nStart:if(c.context===null)throw Error("I18n op should have its context set.");e=c;break;case V.I18nEnd:e=null;break;case V.IcuStart:if(c.context===null)throw Error("Icu op should have its context set.");t=c;break;case V.IcuEnd:t=null;break;case V.Text:if(e!==null)if(o.set(c.xref,e),r.set(c.xref,t),c.icuPlaceholder!==null){let p=VU(n.allocateXrefId(),c.icuPlaceholder,[c.initialValue]);qe.replace(c,p),a.set(c.xref,p)}else qe.remove(c);break}for(let c of i.update)switch(c.kind){case V.InterpolateText:if(!o.has(c.target))continue;let p=o.get(c.target),u=r.get(c.target),h=a.get(c.target),_=u?u.context:p.context,S=u?$_.Postproccessing:$_.Creation,x=[];for(let b=0;b0){let t=uq(e.localRefs);e.localRefs=n.addConst(t)}else e.localRefs=null;break}}function uq(n){let i=[];for(let e of n)i.push(Te(e.name),Te(e.target));return Gi(i)}function hq(n){for(let i of n.units){let e=Ca.HTML;for(let t of i.create)t.kind===V.ElementStart&&t.namespace!==e&&(qe.insertBefore(PU(t.namespace),t),e=t.namespace)}}function fq(n){let i=[],e=0,t=0,o=0,r=0,a=0,c=null;for(;e0&&t===0&&o===0){let u=n.substring(r,e-1).trim();i.push(c,u),a=e,r=0,c=null}break}if(c&&r){let p=n.slice(r).trim();i.push(c,p)}return i}function jF(n){return n.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function gq(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.create)if(t.kind===V.ExtractedAttribute&&t.bindingKind===jt.Attribute&&CF(t.expression)){let o=i.get(t.target);if(o!==void 0&&(o.kind===V.Template||o.kind===V.ConditionalCreate||o.kind===V.ConditionalBranchCreate)&&o.templateKind===ns.Structural)continue;if(t.name==="style"){let r=fq(t.expression.value);for(let a=0;a{if(!(!(r instanceof bd)||r.name!==null)){if(!t.has(r.xref))throw new Error(`Variable ${r.xref} not yet named`);r.name=t.get(r.xref)}})}function vq(n,i){if(n.name===null)switch(n.kind){case Wr.Context:n.name=`ctx_r${i.index++}`;break;case Wr.Identifier:let e=n.identifier===Ps?"i":"";n.name=`${n.identifier}_${e}r${++i.index}`;break;default:n.name=`_r${++i.index}`;break}return n.name}function Cq(n){return n.startsWith("--")?n:jF(n)}function nN(n){let i=n.indexOf("!important");return i>-1?n.substring(0,i):n}function bq(n){for(let i of n.units){for(let e of i.functions)Sk(e.ops);for(let e of i.create)(e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener)&&Sk(e.handlerOps);Sk(i.update)}}function Sk(n){for(let i of n){if(i.kind!==V.Statement||!(i.statement instanceof sa)||!(i.statement.expr instanceof P1))continue;let e=i.statement.expr.steps,t=!0;for(let o=i.next;o.kind!==V.ListEnd&&t;o=o.next)mr(o,(r,a)=>{if(!Ec(r))return r;if(t&&!(a&Wn.InChildOperation))switch(r.kind){case Qt.NextContext:r.steps+=e,qe.remove(i),t=!1;break;case Qt.GetCurrentView:case Qt.Reference:case Qt.ContextLetReference:t=!1;break}})}}var xq="ng-container";function yq(n){for(let i of n.units){let e=new Set;for(let t of i.create)t.kind===V.ElementStart&&t.tag===xq&&(t.kind=V.ContainerStart,e.add(t.xref)),t.kind===V.ElementEnd&&e.has(t.xref)&&(t.kind=V.ContainerEnd)}}function Sq(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function wq(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.create)(t.kind===V.ElementStart||t.kind===V.ContainerStart)&&t.nonBindable&&qe.insertAfter(MU(t.xref),t),(t.kind===V.ElementEnd||t.kind===V.ContainerEnd)&&Sq(i,t.xref).nonBindable&&qe.insertBefore(kU(t.xref),t)}function vc(n){return i=>i.kind===n}function i_(n,i){return e=>e.kind===n&&i===e.expression instanceof Qo}function Mq(n){return n.kind===V.Listener&&!(n.hostListener&&n.isLegacyAnimationListener)||n.kind===V.TwoWayListener||n.kind===V.Animation||n.kind===V.AnimationListener}function kq(n){return(n.kind===V.Property||n.kind===V.TwoWayProperty)&&!(n.expression instanceof Qo)}var Tq=[{test:n=>n.kind===V.Listener&&n.hostListener&&n.isLegacyAnimationListener},{test:Mq}],Eq=[{test:vc(V.StyleMap),transform:q1},{test:vc(V.ClassMap),transform:q1},{test:vc(V.StyleProp)},{test:vc(V.ClassProp)},{test:i_(V.Attribute,!0)},{test:i_(V.Property,!0)},{test:kq},{test:i_(V.Attribute,!1)},{test:vc(V.Control)}],Dq=[{test:i_(V.DomProperty,!0)},{test:i_(V.DomProperty,!1)},{test:vc(V.Attribute)},{test:vc(V.StyleMap),transform:q1},{test:vc(V.ClassMap),transform:q1},{test:vc(V.StyleProp)},{test:vc(V.ClassProp)}],iN=new Set([V.Listener,V.TwoWayListener,V.AnimationListener,V.StyleMap,V.ClassMap,V.StyleProp,V.ClassProp,V.Property,V.TwoWayProperty,V.DomProperty,V.Attribute,V.Animation,V.Control]);function Pq(n){for(let i of n.units){oN(i.create,Tq);let e=i.job.kind===Et.Host?Dq:Eq;oN(i.update,e)}}function oN(n,i){let e=[],t=null;for(let o of n){let r=H_(o)?o.target:null;(!iN.has(o.kind)||r!==t&&t!==null&&r!==null)&&(qe.insertBefore(rN(e,i),o),e=[],t=null),iN.has(o.kind)&&(e.push(o),qe.remove(o),t=r??t)}n.push(rN(e,i))}function rN(n,i){let e=Array.from(i,()=>new Array);for(let t of n){let o=i.findIndex(r=>r.test(t));e[o].push(t)}return e.flatMap((t,o)=>{let r=i[o].transform;return r?r(t):t})}function q1(n){return n.slice(n.length-1)}function Iq(n){for(let i of n.units){let e=EF(i);for(let t of i.ops())if(t.kind===V.Binding){let o=Oq(e,t.target);Aq(t.name)&&o.kind===V.Projection&&qe.remove(t)}}}function Aq(n){return n.toLowerCase()==="select"}function Oq(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an slottable target.");return e}function Nq(n){for(let i of n.units)Fq(i)}function Fq(n){for(let i of n.update)mr(i,(e,t)=>{if(!Ec(e)||e.kind!==Qt.PipeBinding)return;if(t&Wn.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(i.target==null)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");Rq(n,i.target,e)})}function Rq(n,i,e){for(let t=n.create.head.next;t.kind!==V.ListEnd;t=t.next){if(!jh(t)||t.xref!==i)continue;for(;t.next.kind===V.Pipe;)t=t.next;let o=DU(e.target,e.targetSlot,e.name);qe.insertBefore(o,t.next);return}throw new Error(`AssertionError: unable to find insertion point for pipe ${e.name}`)}function Lq(n){for(let i of n.units)for(let e of i.update)Xo(e,t=>!(t instanceof Yp)||t.args.length<=4?t:new q_(t.target,t.targetSlot,t.name,Gi(t.args),t.args.length),Wn.None)}function Vq(n){$F(n.root,0)}function $F(n,i){let e=null;for(let t of n.create)switch(t.kind){case V.I18nStart:t.subTemplateIndex=i===0?null:i,e=t;break;case V.I18nEnd:e.subTemplateIndex===null&&(i=0),e=null;break;case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:i=NC(n.job.views.get(t.xref),e,t.i18nPlaceholder,i);break;case V.RepeaterCreate:let o=n.job.views.get(t.xref);i=NC(o,e,t.i18nPlaceholder,i),t.emptyView!==null&&(i=NC(n.job.views.get(t.emptyView),e,t.emptyI18nPlaceholder,i));break;case V.Projection:t.fallbackView!==null&&(i=NC(n.job.views.get(t.fallbackView),e,t.fallbackViewI18nPlaceholder,i));break}return i}function NC(n,i,e,t){if(e!==void 0){if(i===null)throw Error("Expected template with i18n placeholder to be in an i18n block.");t++,Bq(n,i)}return $F(n,t)}function Bq(n,i){if(n.create.head.next?.kind!==V.I18nStart){let e=n.job.allocateXrefId();qe.insertAfter(rb(e,i.message,i.root,null),n.create.head),qe.insertBefore(ab(e,null),n.create.tail)}}function zq(n){for(let i of n.units)for(let e of i.ops())mr(e,t=>{if(!(t instanceof Kp)||t.body===null)return;let o=new HT(t.args.length);t.fn=n.pool.getSharedConstant(o,t.body),t.body=null})}var HT=class extends h_{numArgs;constructor(i){super(),this.numArgs=i}keyOf(i){return i instanceof um?`param(${i.index})`:super.keyOf(i)}toSharedConstantDeclaration(i,e){let t=[];for(let r=0;rr instanceof um?Yn("a"+r.index):r,Wn.None);return new Rr(i,new eu(t,o),void 0,oa.Final)}};function jq(n){for(let i of n.units)for(let e of i.update)Xo(e,(t,o)=>o&Wn.InChildOperation?t:t instanceof wc?$q(t):t instanceof Rl?Hq(t):t,Wn.None)}function $q(n){let i=[],e=[];for(let t of n.entries){if(t instanceof $p){if(t.expression.isConstant())i.push(t);else{let o=e.length;e.push(t.expression),i.push(new $p(new um(o)))}continue}if(t.isConstant())i.push(t);else{let o=e.length;e.push(t),i.push(new um(o))}}return new Kp(Gi(i),e)}function Hq(n){let i=[],e=[];for(let t of n.entries){if(t instanceof rm){if(t.expression.isConstant())i.push(t);else{let o=e.length;e.push(t.expression),i.push(new rm(new um(o)))}continue}if(t.value.isConstant())i.push(t);else{let o=e.length;e.push(t.value),i.push(new xh(t.key,new um(o),t.quoted))}}return new Kp(new Rl(i),e)}function Uq(n){for(let i of n.units)for(let e of i.ops())Xo(e,t=>t instanceof bh&&(t.flags===null||!t.flags.includes("g"))?n.pool.getSharedConstant(new UT,t):t,Wn.None)}var UT=class extends h_{toSharedConstantDeclaration(i,e){return new Rr(i,e,void 0,oa.Final)}};function Gq(n,i,e,t,o){return vm(fe.element,n,i,e,t,o)}function Wq(n,i,e,t,o){return vm(fe.elementStart,n,i,e,t,o)}function vm(n,i,e,t,o,r){let a=[Te(i)];return e!==null&&a.push(Te(e)),o!==null?a.push(Te(t),Te(o)):t!==null&&a.push(Te(t)),yn(n,a,r)}function HF(n,i,e,t,o,r,a,c,p){let u=[Te(i),e,Te(t),Te(o),Te(r),Te(a)];for(c!==null&&(u.push(Te(c)),u.push(Ut(fe.templateRefExtractor)));u[u.length-1].isEquivalent(yh);)u.pop();return yn(n,u,p)}function TE(n,i,e,t,o){let r=[Te(i)];return e instanceof Qo?r.push($h(e,o)):r.push(e),t!==null&&r.push(t),yn(n,r,o)}function qq(n){return yn(fe.elementEnd,[],n)}function Qq(n,i,e,t){return vm(fe.elementContainerStart,n,null,i,e,t)}function Xq(n,i,e,t){return vm(fe.elementContainer,n,null,i,e,t)}function Kq(){return yn(fe.elementContainerEnd,[],null)}function Yq(n,i,e,t,o,r,a,c){return HF(fe.templateCreate,n,i,e,t,o,r,a,c)}function Zq(){return yn(fe.disableBindings,[],null)}function Jq(){return yn(fe.enableBindings,[],null)}function eQ(n,i,e,t,o){let r=[Te(n),i];return e!==null&&r.push(Ut(e)),yn(t?fe.syntheticHostListener:fe.listener,r,o)}function aN(n,i){return Ut(fe.twoWayBindingSet).callFn([n,i])}function tQ(n,i,e){return yn(fe.twoWayListener,[Te(n),i],e)}function nQ(n,i){return yn(fe.pipe,[Te(n),Te(i)],null)}function iQ(){return yn(fe.namespaceHTML,[],null)}function oQ(){return yn(fe.namespaceSVG,[],null)}function rQ(){return yn(fe.namespaceMathML,[],null)}function aQ(n,i){return yn(fe.advance,n>1?[Te(n)]:[],i)}function sQ(n){return Ut(fe.reference).callFn([Te(n)])}function lQ(n){return Ut(fe.nextContext).callFn(n===1?[]:[Te(n)])}function cQ(){return Ut(fe.getCurrentView).callFn([])}function dQ(n){return Ut(fe.restoreView).callFn([n])}function mQ(n){return Ut(fe.resetView).callFn([n])}function pQ(n,i,e){let t=[Te(n,null)];return i!==""&&t.push(Te(i)),yn(fe.text,t,e)}function uQ(n,i,e,t,o,r,a,c,p,u,h){let _=[Te(n),Te(i),e??Te(null),Te(t),Te(o),Te(r),a??Te(null),c??Te(null),p?Ut(fe.deferEnableTimerScheduling):Te(null),Te(h)],S;for(;(S=_[_.length-1])!==null&&S instanceof aa&&S.value===null;)_.pop();return yn(fe.defer,_,u)}var hQ=new Map([[Ji.Idle,{none:fe.deferOnIdle,prefetch:fe.deferPrefetchOnIdle,hydrate:fe.deferHydrateOnIdle}],[Ji.Immediate,{none:fe.deferOnImmediate,prefetch:fe.deferPrefetchOnImmediate,hydrate:fe.deferHydrateOnImmediate}],[Ji.Timer,{none:fe.deferOnTimer,prefetch:fe.deferPrefetchOnTimer,hydrate:fe.deferHydrateOnTimer}],[Ji.Hover,{none:fe.deferOnHover,prefetch:fe.deferPrefetchOnHover,hydrate:fe.deferHydrateOnHover}],[Ji.Interaction,{none:fe.deferOnInteraction,prefetch:fe.deferPrefetchOnInteraction,hydrate:fe.deferHydrateOnInteraction}],[Ji.Viewport,{none:fe.deferOnViewport,prefetch:fe.deferPrefetchOnViewport,hydrate:fe.deferHydrateOnViewport}],[Ji.Never,{none:fe.deferHydrateNever,prefetch:fe.deferHydrateNever,hydrate:fe.deferHydrateNever}]]);function fQ(n,i,e,t){let o=hQ.get(n)?.[e];if(o===void 0)throw new Error(`Unable to determine instruction for trigger ${n}`);return yn(o,i,t)}function gQ(n){return yn(fe.projectionDef,n?[n]:[],null)}function _Q(n,i,e,t,o,r,a){let c=[Te(n)];return(i!==0||e!==null||t!==null)&&(c.push(Te(i)),e!==null&&c.push(e),t!==null&&(e===null&&c.push(Te(null)),c.push(Yn(t),Te(o),Te(r)))),yn(fe.projection,c,a)}function vQ(n,i,e,t){let o=[Te(n),Te(i)];return e!==null&&o.push(Te(e)),yn(fe.i18nStart,o,t)}function CQ(n,i,e,t,o,r,a,c){let p=[Te(n),i,Te(e),Te(t),Te(o),Te(r)];for(a!==null&&(p.push(Te(a)),p.push(Ut(fe.templateRefExtractor)));p[p.length-1].isEquivalent(yh);)p.pop();return yn(fe.conditionalCreate,p,c)}function bQ(n,i,e,t,o,r,a,c){let p=[Te(n),i,Te(e),Te(t),Te(o),Te(r)];for(a!==null&&(p.push(Te(a)),p.push(Ut(fe.templateRefExtractor)));p[p.length-1].isEquivalent(yh);)p.pop();return yn(fe.conditionalBranchCreate,p,c)}function xQ(n,i,e,t,o,r,a,c,p,u,h,_,S,x){let b=[Te(n),Yn(i),Te(e),Te(t),Te(o),Te(r),a];return(c||p!==null)&&(b.push(Te(c)),p!==null&&(b.push(Yn(p),Te(u),Te(h)),(_!==null||S!==null)&&b.push(Te(_)),S!==null&&b.push(Te(S)))),yn(fe.repeaterCreate,b,x)}function yQ(n,i){return yn(fe.repeater,[n],i)}function SQ(n,i,e){return n==="prefetch"?yn(fe.deferPrefetchWhen,[i],e):n==="hydrate"?yn(fe.deferHydrateWhen,[i],e):yn(fe.deferWhen,[i],e)}function wQ(n,i){return yn(fe.declareLet,[Te(n)],i)}function MQ(n,i){return Ut(fe.storeLet).callFn([n],i)}function kQ(n){return Ut(fe.readContextLet).callFn([Te(n)])}function TQ(n,i,e,t){let o=[Te(n),Te(i)];return e&&o.push(Te(e)),yn(fe.i18n,o,t)}function EQ(n){return yn(fe.i18nEnd,[],n)}function DQ(n,i){let e=[Te(n),Te(i)];return yn(fe.i18nAttributes,e,null)}function PQ(n,i,e){return TE(fe.ariaProperty,n,i,null,e)}function IQ(n,i,e,t){return TE(fe.property,n,i,e,t)}function AQ(n){return yn(fe.control,[],n)}function OQ(n){return yn(fe.controlCreate,[],n)}function NQ(n,i,e,t){let o=[Te(n),i];return e!==null&&o.push(e),yn(fe.twoWayProperty,o,t)}function FQ(n,i,e,t,o){let r=[Te(n)];return i instanceof Qo?r.push($h(i,o)):r.push(i),(e!==null||t!==null)&&r.push(e??Te(null)),t!==null&&r.push(Te(t)),yn(fe.attribute,r,null)}function RQ(n,i,e,t){let o=[Te(n)];return i instanceof Qo?o.push($h(i,t)):o.push(i),e!==null&&o.push(Te(e)),yn(fe.styleProp,o,t)}function LQ(n,i,e){return yn(fe.classProp,[Te(n),i],e)}function VQ(n,i){let e=n instanceof Qo?$h(n,i):n;return yn(fe.styleMap,[e],i)}function BQ(n,i){let e=n instanceof Qo?$h(n,i):n;return yn(fe.classMap,[e],i)}function zQ(n,i,e,t,o){return vm(fe.domElement,n,i,e,t,o)}function jQ(n,i,e,t,o){return vm(fe.domElementStart,n,i,e,t,o)}function $Q(n){return yn(fe.domElementEnd,[],n)}function HQ(n,i,e,t){return vm(fe.domElementContainerStart,n,null,i,e,t)}function UQ(n,i,e,t){return vm(fe.domElementContainer,n,null,i,e,t)}function GQ(){return yn(fe.domElementContainerEnd,[],null)}function WQ(n,i,e,t){let o=[Te(n),i];return e!==null&&o.push(Ut(e)),yn(fe.domListener,o,t)}function qQ(n,i,e,t,o,r,a,c){return HF(fe.domTemplate,n,i,e,t,o,r,a,c)}var sN=[fe.pipeBind1,fe.pipeBind2,fe.pipeBind3,fe.pipeBind4];function QQ(n,i,e){if(e.length<1||e.length>sN.length)throw new Error("pipeBind() argument count out of bounds");let t=sN[e.length-1];return Ut(t).callFn([Te(n),Te(i),...e])}function XQ(n,i,e){return Ut(fe.pipeBindV).callFn([Te(n),Te(i),e])}function KQ(n,i,e){let t=UF(n,i);return mX(lX,[],t,e)}function YQ(n,i){return yn(fe.i18nExp,[n],i)}function ZQ(n,i){return yn(fe.i18nApply,[Te(n)],i)}function JQ(n,i,e,t){return TE(fe.domProperty,n,i,e,t)}function eX(n,i,e,t){let o=[i];e!==null&&o.push(e);let r=n==="enter"?fe.animationEnter:fe.animationLeave;return yn(r,o,t)}function tX(n,i,e,t){let r=[i instanceof Qo?$h(i,t):i];e!==null&&r.push(e);let a=n==="enter"?fe.animationEnter:fe.animationLeave;return yn(a,r,t)}function nX(n,i,e,t){let o=[i],r=n==="enter"?fe.animationEnterListener:fe.animationLeaveListener;return yn(r,o,t)}function iX(n,i,e){return yn(fe.syntheticHostProperty,[Te(n),i],e)}function oX(n,i,e){return EE(dX,[Te(n),i],e,null)}function rX(n,i){return yn(fe.attachSourceLocations,[Te(n),i],null)}function aX(n,i,e){return Ut(fe.arrowFunction).callFn([Te(n),i,e])}function UF(n,i){if(n.length<1||i.length!==n.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");let e=[];if(i.length===1&&n[0]===""&&n[1]==="")e.push(i[0]);else{let t;for(t=0;t{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},cX={constant:[fe.interpolate,fe.interpolate1,fe.interpolate2,fe.interpolate3,fe.interpolate4,fe.interpolate5,fe.interpolate6,fe.interpolate7,fe.interpolate8],variable:fe.interpolateV,mapping:n=>{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},dX={constant:[fe.pureFunction0,fe.pureFunction1,fe.pureFunction2,fe.pureFunction3,fe.pureFunction4,fe.pureFunction5,fe.pureFunction6,fe.pureFunction7,fe.pureFunction8],variable:fe.pureFunctionV,mapping:n=>n};function EE(n,i,e,t){let o=n.mapping(e.length),r=e.at(-1);if(e.length>1&&r instanceof aa&&r.value===""&&e.pop(),oGF(n,t),Wn.None),e.kind){case V.Text:qe.replace(e,pQ(e.handle.slot,e.initialValue,e.sourceSpan));break;case V.ElementStart:qe.replace(e,n.job.mode===Za.DomOnly?jQ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan):Wq(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.Element:qe.replace(e,n.job.mode===Za.DomOnly?zQ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan):Gq(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan));break;case V.ElementEnd:qe.replace(e,n.job.mode===Za.DomOnly?$Q(e.sourceSpan):qq(e.sourceSpan));break;case V.ContainerStart:qe.replace(e,n.job.mode===Za.DomOnly?HQ(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan):Qq(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan));break;case V.Container:qe.replace(e,n.job.mode===Za.DomOnly?UQ(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan):Xq(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan));break;case V.ContainerEnd:qe.replace(e,n.job.mode===Za.DomOnly?GQ():Kq());break;case V.I18nStart:qe.replace(e,vQ(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case V.I18nEnd:qe.replace(e,EQ(e.sourceSpan));break;case V.I18n:qe.replace(e,TQ(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case V.I18nAttributes:if(e.i18nAttributesConfig===null)throw new Error("AssertionError: i18nAttributesConfig was not set");qe.replace(e,DQ(e.handle.slot,e.i18nAttributesConfig));break;case V.Template:if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let t=n.job.views.get(e.xref);qe.replace(e,e.templateKind===ns.Block||n.job.mode===Za.DomOnly?qQ(e.handle.slot,Yn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan):Yq(e.handle.slot,Yn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.DisableBindings:qe.replace(e,Zq());break;case V.EnableBindings:qe.replace(e,Jq());break;case V.Pipe:qe.replace(e,nQ(e.handle.slot,e.name));break;case V.DeclareLet:qe.replace(e,wQ(e.handle.slot,e.sourceSpan));break;case V.AnimationString:qe.replace(e,tX(e.animationKind,e.expression,e.sanitizer,e.sourceSpan));break;case V.Animation:let o=FC(n,e.handlerFnName,e.handlerOps,!1);qe.replace(e,eX(e.animationKind,o,e.sanitizer,e.sourceSpan));break;case V.AnimationListener:let r=FC(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent);qe.replace(e,nX(e.animationKind,r,null,e.sourceSpan));break;case V.Listener:let a=FC(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent),c=e.eventTarget?pX.get(e.eventTarget):null;if(c===void 0)throw new Error(`Unexpected global target '${e.eventTarget}' defined for '${e.name}' event. Supported list of global targets: window,document,body.`);qe.replace(e,n.job.mode===Za.DomOnly&&!e.hostListener&&!e.isLegacyAnimationListener?WQ(e.name,a,c,e.sourceSpan):eQ(e.name,a,c,e.hostListener&&e.isLegacyAnimationListener,e.sourceSpan));break;case V.TwoWayListener:qe.replace(e,tQ(e.name,FC(n,e.handlerFnName,e.handlerOps,!0),e.sourceSpan));break;case V.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);qe.replace(e,Is(new Rr(e.variable.name,e.initializer,void 0,oa.Final)));break;case V.Namespace:switch(e.active){case Ca.HTML:qe.replace(e,iQ());break;case Ca.SVG:qe.replace(e,oQ());break;case Ca.Math:qe.replace(e,rQ());break}break;case V.Defer:let p=!!e.loadingMinimumTime||!!e.loadingAfterTime||!!e.placeholderMinimumTime;qe.replace(e,uQ(e.handle.slot,e.mainSlot.slot,e.resolverFn,e.loadingSlot?.slot??null,e.placeholderSlot?.slot??null,e.errorSlot?.slot??null,e.loadingConfig,e.placeholderConfig,p,e.sourceSpan,e.flags));break;case V.DeferOn:let u=[];switch(e.trigger.kind){case Ji.Never:case Ji.Idle:case Ji.Immediate:break;case Ji.Timer:u=[Te(e.trigger.delay)];break;case Ji.Viewport:e.modifier==="hydrate"?u=e.trigger.options?[e.trigger.options]:[]:(u=[Te(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0?u.push(Te(e.trigger.targetSlotViewSteps)):e.trigger.options&&u.push(Te(null)),e.trigger.options&&u.push(e.trigger.options));break;case Ji.Interaction:case Ji.Hover:e.modifier==="hydrate"?u=[]:(u=[Te(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0&&u.push(Te(e.trigger.targetSlotViewSteps)));break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${e.trigger.kind}`)}qe.replace(e,fQ(e.trigger.kind,u,e.modifier,e.sourceSpan));break;case V.ProjectionDef:qe.replace(e,gQ(e.def));break;case V.Projection:if(e.handle.slot===null)throw new Error("No slot was assigned for project instruction");let h=null,_=null,S=null;if(e.fallbackView!==null){if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");let D=n.job.views.get(e.fallbackView);if(D===void 0)throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected projection fallback view to have been named and counted");h=D.fnName,_=D.decls,S=D.vars}qe.replace(e,_Q(e.handle.slot,e.projectionSlotIndex,e.attributes,h,_,S,e.sourceSpan));break;case V.ConditionalCreate:if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let x=n.job.views.get(e.xref);qe.replace(e,CQ(e.handle.slot,Yn(x.fnName),x.decls,x.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.ConditionalBranchCreate:if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let b=n.job.views.get(e.xref);qe.replace(e,bQ(e.handle.slot,Yn(b.fnName),b.decls,b.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.RepeaterCreate:if(e.handle.slot===null)throw new Error("No slot was assigned for repeater instruction");if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");let M=n.job.views.get(e.xref);if(M.fnName===null)throw new Error("AssertionError: expected repeater primary view to have been named");let w=null,y=null,E=null;if(e.emptyView!==null){let D=n.job.views.get(e.emptyView);if(D===void 0)throw new Error("AssertionError: repeater had empty view xref, but empty view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected repeater empty view to have been named and counted");w=D.fnName,y=D.decls,E=D.vars}qe.replace(e,xQ(e.handle.slot,M.fnName,e.decls,e.vars,e.tag,e.attributes,vX(n,e),e.usesComponentInstance,w,y,E,e.emptyTag,e.emptyAttributes,e.wholeSourceSpan));break;case V.SourceLocation:let I=Gi(e.locations.map(({targetSlot:D,offset:N,line:P,column:L})=>{if(D.slot===null)throw new Error("No slot was assigned for source location");return Gi([Te(D.slot),Te(N),Te(P),Te(L)])}));qe.replace(e,rX(e.templatePath,I));break;case V.ControlCreate:qe.replace(e,OQ(e.sourceSpan));break;case V.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${V[e.kind]}`)}}function sb(n,i){for(let e of i)switch(Xo(e,t=>GF(n,t),Wn.None),e.kind){case V.Advance:qe.replace(e,aQ(e.delta,e.sourceSpan));break;case V.Property:qe.replace(e,n.job.mode===Za.DomOnly&&e.bindingKind!==jt.LegacyAnimation&&e.bindingKind!==jt.Animation?lN(e):gX(e));break;case V.Control:qe.replace(e,_X(e));break;case V.TwoWayProperty:qe.replace(e,NQ(e.name,e.expression,e.sanitizer,e.sourceSpan));break;case V.StyleProp:qe.replace(e,RQ(e.name,e.expression,e.unit,e.sourceSpan));break;case V.ClassProp:qe.replace(e,LQ(e.name,e.expression,e.sourceSpan));break;case V.StyleMap:qe.replace(e,VQ(e.expression,e.sourceSpan));break;case V.ClassMap:qe.replace(e,BQ(e.expression,e.sourceSpan));break;case V.I18nExpression:qe.replace(e,YQ(e.expression,e.sourceSpan));break;case V.I18nApply:qe.replace(e,ZQ(e.handle.slot,e.sourceSpan));break;case V.InterpolateText:qe.replace(e,KQ(e.interpolation.strings,e.interpolation.expressions,e.sourceSpan));break;case V.Attribute:qe.replace(e,FQ(e.name,e.expression,e.sanitizer,e.namespace,e.sourceSpan));break;case V.DomProperty:if(e.expression instanceof Qo)throw new Error("not yet handled");e.bindingKind===jt.LegacyAnimation||e.bindingKind===jt.Animation?qe.replace(e,iX(e.name,e.expression,e.sourceSpan)):qe.replace(e,lN(e));break;case V.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);qe.replace(e,Is(new Rr(e.variable.name,e.initializer,void 0,oa.Final)));break;case V.Conditional:if(e.processed===null)throw new Error("Conditional test was not set.");qe.replace(e,sX(e.processed,e.contextValue,e.sourceSpan));break;case V.Repeater:qe.replace(e,yQ(e.collection,e.sourceSpan));break;case V.DeferWhen:qe.replace(e,SQ(e.modifier,e.expr,e.sourceSpan));break;case V.StoreLet:throw new Error(`AssertionError: unexpected storeLet ${e.declaredName}`);case V.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of update op ${V[e.kind]}`)}}function lN(n){return JQ(uX.get(n.name)??n.name,n.expression,n.sanitizer,n.sourceSpan)}function gX(n){return DF(n.name)?PQ(n.name,n.expression,n.sourceSpan):IQ(n.name,n.expression,n.sanitizer,n.sourceSpan)}function _X(n){return AQ(n.sourceSpan)}function GF(n,i){if(!Ec(i))return i;switch(i.kind){case Qt.NextContext:return lQ(i.steps);case Qt.Reference:return sQ(i.targetSlot.slot+1+i.offset);case Qt.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${i.name}`);case Qt.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case Qt.RestoreView:if(typeof i.view=="number")throw new Error("AssertionError: unresolved RestoreView");return dQ(i.view);case Qt.ResetView:return mQ(i.expr);case Qt.GetCurrentView:return cQ();case Qt.ReadVariable:if(i.name===null)throw new Error(`Read of unnamed variable ${i.xref}`);return Yn(i.name);case Qt.ReadTemporaryExpr:if(i.name===null)throw new Error(`Read of unnamed temporary ${i.xref}`);return Yn(i.name);case Qt.AssignTemporaryExpr:if(i.name===null)throw new Error(`Assign of unnamed temporary ${i.xref}`);return Yn(i.name).set(i.expr);case Qt.PureFunctionExpr:if(i.fn===null)throw new Error("AssertionError: expected PureFunctions to have been extracted");return oX(i.varOffset,i.fn,i.args);case Qt.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case Qt.PipeBinding:return QQ(i.targetSlot.slot,i.varOffset,i.args);case Qt.PipeBindingVariadic:return XQ(i.targetSlot.slot,i.varOffset,i.args);case Qt.SlotLiteralExpr:return Te(i.slot.slot);case Qt.ContextLetReference:return kQ(i.targetSlot.slot);case Qt.StoreLet:return MQ(i.value,i.sourceSpan);case Qt.TrackContext:return Yn("this");case Qt.ArrowFunction:if(i.varOffset===null)throw new Error("AssertionError: variable offset was not assigned to arrow function");return aX(i.varOffset,n.job.pool.getSharedFunctionReference(CX(n,i),"arrowFn"),Yn(Ps));default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${Qt[i.kind]}`)}}function FC(n,i,e,t){sb(n,e);let o=[];for(let a of e){if(a.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[a.kind]}`);o.push(a.statement)}let r=[];return t&&r.push(new br("$event",is)),am(r,o,void 0,void 0,i)}function vX(n,i){if(i.trackByFn!==null)return i.trackByFn;let e=[new br("$index",Bp),new br("$item",is)],t;if(i.trackByOps===null)t=i.usesComponentInstance?am(e,[new xr(i.track)]):Ds(e,i.track);else{sb(n,i.trackByOps);let o=[];for(let r of i.trackByOps){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[r.kind]}`);o.push(r.statement)}t=i.usesComponentInstance||o.length!==1||!(o[0]instanceof xr)?am(e,o):Ds(e,o[0].value)}return i.trackByFn=n.job.pool.getSharedFunctionReference(t,"_forTrack"),i.trackByFn}function CX(n,i){sb(n,i.ops);let e=[];for(let o of i.ops){if(o.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[o.kind]}`);e.push(o.statement)}let t=e.length===1&&e[0]instanceof xr?e[0].value:e;return Ds([new br(i.contextName,is),new br(i.currentViewName,is)],Ds(i.parameters,t))}function bX(n){for(let i of n.units)for(let e of i.update)switch(e.kind){case V.Attribute:case V.Binding:case V.ClassProp:case V.ClassMap:case V.Property:case V.StyleProp:case V.StyleMap:e.expression instanceof Q_&&qe.remove(e);break}}function xX(n){for(let i of n.units)for(let e of i.create)switch(e.kind){case V.I18nContext:qe.remove(e);break;case V.I18nStart:e.context=null;break}}function yX(n){for(let i of n.units)for(let e of i.update){if(e.kind!==V.Variable||e.variable.kind!==Wr.Identifier||!(e.initializer instanceof U_))continue;let t=e.variable.identifier,o=e;for(;o&&o.kind!==V.ListEnd;)Xo(o,r=>r instanceof Ur&&r.name===t?Te(void 0):r,Wn.None),o=o.prev}}function SX(n){for(let i of n.units){let e=new Set;for(let t of i.update)t.kind===V.I18nExpression&&e.add(t.i18nOwner);for(let t of i.create)switch(t.kind){case V.I18nAttributes:if(e.has(t.xref))continue;qe.remove(t)}}}function wX(n){for(let i of n.units){for(let e of i.functions)o_(i,e.ops);o_(i,i.create),o_(i,i.update)}}function o_(n,i){let e=new Map;e.set(n.xref,Yn(Ps));for(let t of i)switch(t.kind){case V.Variable:t.variable.kind===Wr.Context&&e.set(t.variable.view,new bd(t.xref));break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:o_(n,t.handlerOps);break;case V.RepeaterCreate:t.trackByOps!==null&&o_(n,t.trackByOps);break}n===n.job.root&&e.set(n.xref,Yn(Ps));for(let t of i)Xo(t,o=>{if(o instanceof pm){if(!e.has(o.view))throw new Error(`No context found for reference to view ${o.view} from view ${n.xref}`);return e.get(o.view)}else return o},Wn.None)}function MX(n){for(let i of n.units)for(let e of i.create)if(e.kind===V.Defer){if(e.resolverFn!==null)continue;if(e.ownResolverFn!==null){if(e.handle.slot===null)throw new Error("AssertionError: slot must be assigned before extracting defer deps functions");let t=i.fnName?.replace("_Template","");e.resolverFn=n.pool.getSharedFunctionReference(e.ownResolverFn,`${t}_Defer_${e.handle.slot}_DepsFn`,!1)}}}function kX(n){for(let i of n.units)cN(i.create),cN(i.update)}function cN(n){for(let i of n)(i.kind===V.Listener||i.kind===V.TwoWayListener||i.kind===V.AnimationListener)&&Xo(i,e=>e instanceof Ur&&e.name==="$event"?((i.kind===V.Listener||i.kind===V.AnimationListener)&&(i.consumesDollarEvent=!0),new Nl(e.name)):e,Wn.InChildOperation)}function TX(n){let i=new Map,e=new Map;for(let t of n.units)for(let o of t.create)switch(o.kind){case V.I18nContext:i.set(o.xref,o);break;case V.ElementStart:e.set(o.xref,o);break}hc(n,n.root,i,e)}function hc(n,i,e,t,o){let r=null,a=new Map;for(let c of i.create)switch(c.kind){case V.I18nStart:if(!c.context)throw Error("Could not find i18n context for i18n op");r={i18nBlock:c,i18nContext:e.get(c.context)};break;case V.I18nEnd:r=null;break;case V.ElementStart:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");dN(c,r.i18nContext,r.i18nBlock,o),o&&c.i18nPlaceholder.closeName&&a.set(c.xref,o),o=void 0}break;case V.ElementEnd:let p=t.get(c.xref);if(p&&p.i18nPlaceholder!==void 0){if(r===null)throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");mN(p,r.i18nContext,r.i18nBlock,a.get(c.xref)),a.delete(c.xref)}break;case V.Projection:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");dN(c,r.i18nContext,r.i18nBlock,o),mN(c,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.fallbackView!==null){let S=n.views.get(c.fallbackView);if(c.fallbackViewI18nPlaceholder===void 0)hc(n,S,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");RC(n,S,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,S,e,t),LC(n,S,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break;case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:let u=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)hc(n,u,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");c.templateKind===ns.Structural?hc(n,u,e,t,c):(RC(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,u,e,t),LC(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0)}break;case V.RepeaterCreate:if(o!==void 0)throw Error("AssertionError: Unexpected structural directive associated with @for block");let h=c.handle.slot+1,_=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)hc(n,_,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");RC(n,_,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,_,e,t),LC(n,_,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.emptyView!==null){let S=c.handle.slot+2,x=n.views.get(c.emptyView);if(c.emptyI18nPlaceholder===void 0)hc(n,x,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");RC(n,x,S,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,x,e,t),LC(n,x,S,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break}}function dN(n,i,e,t){let{startName:o,closeName:r}=n.i18nPlaceholder,a=ao.ElementTag|ao.OpenTag,c=n.handle.slot;t!==void 0&&(a|=ao.TemplateTag,c={element:c,template:t.handle.slot}),r||(a|=ao.CloseTag),Lh(i.params,o,c,e.subTemplateIndex,a)}function mN(n,i,e,t){let{closeName:o}=n.i18nPlaceholder;if(o){let r=ao.ElementTag|ao.CloseTag,a=n.handle.slot;t!==void 0&&(r|=ao.TemplateTag,a={element:a,template:t.handle.slot}),Lh(i.params,o,a,e.subTemplateIndex,r)}}function RC(n,i,e,t,o,r,a){let{startName:c,closeName:p}=t,u=ao.TemplateTag|ao.OpenTag;p||(u|=ao.CloseTag),a!==void 0&&Lh(o.params,c,a.handle.slot,r.subTemplateIndex,u),Lh(o.params,c,e,WF(n,r,i),u)}function LC(n,i,e,t,o,r,a){let{closeName:c}=t,p=ao.TemplateTag|ao.CloseTag;c&&(Lh(o.params,c,e,WF(n,r,i),p),a!==void 0&&Lh(o.params,c,a.handle.slot,r.subTemplateIndex,p))}function WF(n,i,e){for(let t of e.create)if(t.kind===V.I18nStart)return t.subTemplateIndex;return i.subTemplateIndex}function Lh(n,i,e,t,o){let r=n.get(i)??[];r.push({value:e,subTemplateIndex:t,flags:o}),n.set(i,r)}function EX(n){let i=new Map,e=new Map,t=new Map;for(let a of n.units)for(let c of a.create)switch(c.kind){case V.I18nStart:i.set(c.xref,c.subTemplateIndex);break;case V.I18nContext:e.set(c.xref,c);break;case V.IcuPlaceholder:t.set(c.xref,c);break}let o=new Map,r=a=>a.usage===zh.I18nText?a.i18nOwner:a.context;for(let a of n.units)for(let c of a.update)if(c.kind===V.I18nExpression){let p=o.get(r(c))||0,u=i.get(c.i18nOwner)??null,h={value:p,subTemplateIndex:u,flags:ao.ExpressionIndex};DX(c,h,e,t),o.set(r(c),p+1)}}function DX(n,i,e,t){if(n.i18nPlaceholder!==null){let o=e.get(n.context),r=n.resolutionTime===$_.Creation?o.params:o.postprocessingParams,a=r.get(n.i18nPlaceholder)||[];a.push(i),r.set(n.i18nPlaceholder,a)}n.icuPlaceholder!==null&&t.get(n.icuPlaceholder)?.expressionPlaceholders.push(i)}function PX(n){for(let i of n.units){for(let e of i.functions)r_(i,e.ops,null);r_(i,i.create,null),r_(i,i.update,null)}}function r_(n,i,e){let t=new Map,o=new Map;for(let r of i)switch(r.kind){case V.Variable:switch(r.variable.kind){case Wr.Identifier:if(r.variable.local){if(o.has(r.variable.identifier))continue;o.set(r.variable.identifier,r.xref)}else if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Wr.Alias:if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Wr.SavedView:e={view:r.variable.view,variable:r.xref};break}break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:r_(n,r.handlerOps,e);break;case V.RepeaterCreate:r.trackByOps!==null&&r_(n,r.trackByOps,e);break}for(let r of i)r.kind===V.Listener||r.kind===V.TwoWayListener||r.kind===V.Animation||r.kind===V.AnimationListener||Xo(r,a=>{if(a instanceof Ur)return o.has(a.name)?new bd(o.get(a.name)):t.has(a.name)?new bd(t.get(a.name)):new Es(new pm(n.job.root.xref),a.name);if(a instanceof W_&&typeof a.view=="number"){if(e===null||e.view!==a.view)throw new Error(`AssertionError: no saved view ${a.view} from view ${n.xref}`);return a.view=new bd(e.variable),a}else return a},Wn.None);for(let r of i)mr(r,a=>{if(a instanceof Ur)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${a.name}`)})}var IX=new Map([[eo.HTML,fe.sanitizeHtml],[eo.RESOURCE_URL,fe.sanitizeResourceUrl],[eo.SCRIPT,fe.sanitizeScript],[eo.STYLE,fe.sanitizeStyle],[eo.URL,fe.sanitizeUrl],[eo.ATTRIBUTE_NO_BINDING,fe.validateAttribute]]),AX=new Map([[eo.HTML,fe.trustConstantHtml],[eo.RESOURCE_URL,fe.trustConstantResourceUrl]]);function OX(n){for(let i of n.units){if(n.kind!==Et.Host){for(let e of i.create)if(e.kind===V.ExtractedAttribute){let t=AX.get(pN(e.securityContext))??null;e.trustedValueFn=t!==null?Ut(t):null}}for(let e of i.update)switch(e.kind){case V.Property:case V.Attribute:case V.DomProperty:let t=null;Array.isArray(e.securityContext)&&e.securityContext.length===2&&e.securityContext.includes(eo.URL)&&e.securityContext.includes(eo.RESOURCE_URL)?t=fe.sanitizeUrlOrResourceUrl:t=IX.get(pN(e.securityContext))??null,e.sanitizer=t!==null?Ut(t):null;break}}}function pN(n){if(Array.isArray(n)){if(n.length>1)throw Error("AssertionError: Ambiguous security context");return n[0]||eo.NONE}return n}function NX(n){for(let i of n.units){for(let e of i.functions)uN(n,i,e.ops)&&hN(i,e.ops,Yn(e.currentViewName));i.create.prepend([tm(i.job.allocateXrefId(),{kind:Wr.SavedView,name:null,view:i.xref},new vT,Zs.None)]);for(let e of i.create)(e.kind===V.Listener||e.kind===V.TwoWayListener||e.kind===V.Animation||e.kind===V.AnimationListener)&&uN(n,i,e.handlerOps)&&hN(i,e.handlerOps,i.xref)}}function uN(n,i,e){let t=i!==n.root;if(!t)for(let o of e)mr(o,r=>{(r instanceof D1||r instanceof G_)&&(t=!0)});return t}function hN(n,i,e){i.prepend([tm(n.job.allocateXrefId(),{kind:Wr.Context,name:null,view:n.xref},new W_(e),Zs.None)]);for(let t of i)t.kind===V.Statement&&t.statement instanceof xr&&(t.statement.value=new I1(t.statement.value))}function FX(n){let i=new Map;for(let e of n.units){let t=0;for(let o of e.create)jh(o)&&(o.handle.slot=t,i.set(o.xref,o.handle.slot),t+=o.numSlotsUsed);e.decls=t}for(let e of n.units)for(let t of e.ops())if(t.kind===V.Template||t.kind===V.ConditionalCreate||t.kind===V.ConditionalBranchCreate||t.kind===V.RepeaterCreate){let o=n.views.get(t.xref);t.decls=o.decls}}function RX(n){let i=new Set,e=new Map;for(let t of n.units)for(let o of t.ops())o.kind===V.DeclareLet&&e.set(o.xref,o),mr(o,r=>{r instanceof G_&&i.add(r.target)});for(let t of n.units)for(let o of t.update)Xo(o,r=>r instanceof U_&&!i.has(r.target)?(LX(r)||qe.remove(e.get(r.target)),r.value):r,Wn.None)}function LX(n){let i=!1;return Vt(n,e=>((e instanceof Yp||e instanceof q_)&&(i=!0),e),Wn.None),i}function VX(n){let i=new Set;for(let e of n.units)for(let t of e.ops())mr(t,o=>{if(o instanceof gi)switch(o.operator){case st.Exponentiation:BX(o,i);break;case st.NullishCoalesce:zX(o,i);break;case st.And:case st.Or:jX(o,i)}});for(let e of n.units)for(let t of e.ops())Xo(t,o=>o instanceof Fl?i.has(o)?o:o.expr:o,Wn.None)}function BX(n,i){n.lhs instanceof Fl&&n.lhs.expr instanceof jp&&i.add(n.lhs)}function zX(n,i){n.lhs instanceof Fl&&(fN(n.lhs.expr)||n.lhs.expr instanceof Sc)&&i.add(n.lhs),n.rhs instanceof Fl&&(fN(n.rhs.expr)||n.rhs.expr instanceof Sc)&&i.add(n.rhs)}function jX(n,i){n.lhs instanceof Fl&&n.lhs.expr instanceof gi&&n.lhs.expr.operator===st.NullishCoalesce&&i.add(n.lhs)}function fN(n){return n instanceof gi&&(n.operator===st.And||n.operator===st.Or)}function $X(n){for(let i of n.units)for(let e of i.update)if(e.kind===V.Binding)switch(e.bindingKind){case jt.ClassName:if(e.expression instanceof Qo)throw new Error("Unexpected interpolation in ClassName binding");qe.replace(e,pU(e.target,e.name,e.expression,e.sourceSpan));break;case jt.StyleProperty:qe.replace(e,mU(e.target,e.name,e.expression,e.unit,e.sourceSpan));break;case jt.Property:case jt.Template:e.name==="style"?qe.replace(e,uU(e.target,e.expression,e.sourceSpan)):e.name==="class"&&qe.replace(e,hU(e.target,e.expression,e.sourceSpan));break}}function HX(n){for(let i of n.units){i.create.prepend(a_(i.create)),i.update.prepend(a_(i.update));for(let e of i.functions)e.ops.prepend(a_(e.ops))}}function a_(n){let i=0,e=[];for(let t of n){let o=new Map;mr(t,(u,h)=>{h&Wn.InChildOperation||u instanceof hm&&o.set(u.xref,u)});let r=0,a=new Set,c=new Set,p=new Map;mr(t,(u,h)=>{h&Wn.InChildOperation||(u instanceof Dc?(a.has(u.xref)||(a.add(u.xref),p.set(u.xref,`tmp_${i}_${r++}`)),gN(p,u)):u instanceof hm&&(o.get(u.xref)===u&&(c.add(u.xref),r--),gN(p,u)))}),e.push(...Array.from(new Set(p.values())).map(u=>Is(new Rr(u)))),i++,t.kind===V.Listener||t.kind===V.Animation||t.kind===V.AnimationListener||t.kind===V.TwoWayListener?t.handlerOps.prepend(a_(t.handlerOps)):t.kind===V.RepeaterCreate&&t.trackByOps!==null&&t.trackByOps.prepend(a_(t.trackByOps))}return e}function gN(n,i){let e=n.get(i.xref);if(e===void 0)throw new Error(`Found xref with unassigned name: ${i.xref}`);i.name=e}function UX(n){for(let i of n.units)for(let e of i.create)if(e.kind===V.RepeaterCreate)if(e.track instanceof Nl&&e.track.name==="$index")e.trackByFn=Ut(fe.repeaterTrackByIndex);else if(e.track instanceof Nl&&e.track.name==="$item")e.trackByFn=Ut(fe.repeaterTrackByIdentity);else if(GX(n.root.xref,e.track))e.usesComponentInstance=!0,e.track.receiver.receiver.view===i.xref?e.trackByFn=e.track.receiver:(e.trackByFn=Ut(fe.componentInstance).callFn([]).prop(e.track.receiver.name),e.track=e.trackByFn);else{e.track=Vt(e.track,o=>{if(o instanceof Yp||o instanceof q_)throw new Error("Illegal State: Pipes are not allowed in this context");return o instanceof pm?(e.usesComponentInstance=!0,new _T(o.view)):o},Wn.None);let t=new qe;t.push(Is(new xr(e.track,e.track.sourceSpan))),e.trackByOps=t}}function GX(n,i){if(!(i instanceof os)||i.args.length===0||i.args.length>2||!(i.receiver instanceof Es&&i.receiver.receiver instanceof pm)||i.receiver.receiver.view!==n)return!1;let[e,t]=i.args;return!(e instanceof Nl)||e.name!=="$index"?!1:i.args.length===1?!0:!(!(t instanceof Nl)||t.name!=="$item")}function WX(n){for(let i of n.units)for(let e of i.create)e.kind===V.RepeaterCreate&&(e.track=Vt(e.track,t=>{if(t instanceof Ur){if(e.varNames.$index.has(t.name))return Yn("$index");if(t.name===e.varNames.$implicit)return Yn("$item")}return t},Wn.None))}function qX(n){for(let i of n.units)for(let e of i.create)e.kind===V.TwoWayListener&&Xo(e,t=>{if(!(t instanceof A1))return t;let{target:o,value:r}=t;if(o instanceof Es||o instanceof xd)return aN(o,r).or(o.set(r));if(o instanceof bd)return aN(o,r);throw new Error("Unsupported expression in two-way action binding.")},Wn.InChildOperation)}function QX(n){for(let i of n.units){let e=0;for(let r of i.ops())vk(r)&&(e+=XX(r));let t=r=>{Ec(r)&&(r instanceof Kp||(y5(r)&&(r.varOffset=e),vk(r)&&(e+=_N(r))))},o=r=>{!Ec(r)||!(r instanceof Kp)||(y5(r)&&(r.varOffset=e),vk(r)&&(e+=_N(r)))};for(let r of i.create)mr(r,t);for(let r of i.update)mr(r,t);for(let r of i.create)mr(r,o);for(let r of i.update)mr(r,o);i.vars=e}if(n instanceof K_)for(let i of n.units)for(let e of i.create){if(e.kind!==V.Template&&e.kind!==V.RepeaterCreate&&e.kind!==V.ConditionalCreate&&e.kind!==V.ConditionalBranchCreate)continue;let t=n.views.get(e.xref);e.vars=t.vars}}function XX(n){let i;switch(n.kind){case V.Attribute:return i=1,n.expression instanceof Qo&&!KX(n.expression)&&(i+=n.expression.expressions.length),i;case V.Property:case V.DomProperty:return i=1,n.expression instanceof Qo&&(i+=n.expression.expressions.length),i;case V.Control:return 2;case V.TwoWayProperty:return 1;case V.StyleProp:case V.ClassProp:case V.StyleMap:case V.ClassMap:return i=2,n.expression instanceof Qo&&(i+=n.expression.expressions.length),i;case V.InterpolateText:return n.interpolation.expressions.length;case V.I18nExpression:case V.Conditional:case V.DeferWhen:case V.StoreLet:return 1;case V.RepeaterCreate:return n.emptyView?1:0;default:throw new Error(`Unhandled op: ${V[n.kind]}`)}}function _N(n){switch(n.kind){case Qt.PureFunctionExpr:return 1+n.args.length;case Qt.PipeBinding:return 1+n.args.length;case Qt.PipeBindingVariadic:return 1+n.numArgs;case Qt.StoreLet:case Qt.ArrowFunction:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${n.constructor.name}`)}}function KX(n){return!(n.expressions.length!==1||n.strings.length!==2||n.strings[0]!==""||n.strings[1]!=="")}function YX(n){for(let i of n.units){for(let e of i.functions)Ug(e.ops);Ug(i.create),Ug(i.update);for(let e of i.create)e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener?Ug(e.handlerOps):e.kind===V.RepeaterCreate&&e.trackByOps!==null&&Ug(e.trackByOps);for(let e of i.functions)Gg(e.ops,null),vN(e.ops);for(let e of i.create)e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener?(Gg(e.handlerOps,VC),vN(e.handlerOps)):e.kind===V.RepeaterCreate&&e.trackByOps!==null&&Gg(e.trackByOps,VC);Gg(i.create,VC),Gg(i.update,VC)}}var Fr=(function(n){return n[n.None=0]="None",n[n.ViewContextRead=1]="ViewContextRead",n[n.ViewContextWrite=2]="ViewContextWrite",n[n.SideEffectful=4]="SideEffectful",n})(Fr||{});function VC(n){return!(n&Wn.InArrowFunctionOperation)}function Ug(n){let i=new Map;for(let e of n)e.kind===V.Variable&&e.flags&Zs.AlwaysInline&&(mr(e,t=>{if(Ec(t)&&DE(t)!==Fr.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),i.set(e.xref,e)),Xo(e,t=>t instanceof bd&&i.has(t.xref)?i.get(t.xref).initializer.clone():t,Wn.None);for(let e of i.values())qe.remove(e)}function Gg(n,i){let e=new Map,t=new Map,o=new Set,r=new Map;for(let u of n){if(u.kind===V.Variable){if(e.has(u.xref)||t.has(u.xref))throw new Error(`Should not see two declarations of the same variable: ${u.xref}`);e.set(u.xref,u),t.set(u.xref,0)}r.set(u,ZX(u,i)),JX(u,t,o,i)}let a=!1;for(let u of n.reversed()){let h=r.get(u);if(u.kind===V.Variable&&t.get(u.xref)===0){if(a&&h.fences&Fr.ViewContextWrite||h.fences&Fr.SideEffectful){let _=Is(u.initializer.toStmt());r.set(_,h),qe.replace(u,_)}else eK(u,t),qe.remove(u);r.delete(u),e.delete(u.xref),t.delete(u.xref);continue}h.fences&Fr.ViewContextRead&&(a=!0)}let c=[];for(let[u,h]of t){let S=!!(e.get(u).flags&Zs.AlwaysInline);h!==1||S||o.has(u)||c.push(u)}let p;for(;p=c.pop();){let u=e.get(p),h=r.get(u);if(!!(u.flags&Zs.AlwaysInline))throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let S=u.next;S.kind!==V.ListEnd;S=S.next){let x=r.get(S);if(x.variablesUsed.has(p)){if(!nK(u,S))break;if(tK(p,u.initializer,S,h.fences)){x.variablesUsed.delete(p);for(let b of h.variablesUsed)x.variablesUsed.add(b);x.fences|=h.fences,e.delete(p),t.delete(p),r.delete(u),qe.remove(u)}break}if(!qF(x.fences,h.fences))break}}}function DE(n){switch(n.kind){case Qt.NextContext:return Fr.ViewContextRead|Fr.ViewContextWrite;case Qt.RestoreView:return Fr.ViewContextRead|Fr.ViewContextWrite|Fr.SideEffectful;case Qt.StoreLet:return Fr.SideEffectful;case Qt.Reference:case Qt.ContextLetReference:return Fr.ViewContextRead;default:return Fr.None}}function ZX(n,i){let e=Fr.None,t=new Set;return mr(n,(o,r)=>{!Ec(o)||i!==null&&!i(r)||(o.kind===Qt.ReadVariable?t.add(o.xref):e|=DE(o))}),{fences:e,variablesUsed:t}}function JX(n,i,e,t){mr(n,(o,r)=>{if(!Ec(o)||t!==null&&!t(r)||o.kind!==Qt.ReadVariable)return;let a=i.get(o.xref);a!==void 0&&(i.set(o.xref,a+1),r&Wn.InChildOperation&&e.add(o.xref))})}function eK(n,i){mr(n,e=>{if(!Ec(e)||e.kind!==Qt.ReadVariable)return;let t=i.get(e.xref);if(t!==void 0){if(t===0)throw new Error(`Inaccurate variable count: ${e.xref} - found another read but count is already 0`);i.set(e.xref,t-1)}})}function qF(n,i){if(n&Fr.ViewContextWrite){if(i&Fr.ViewContextRead)return!1}else if(n&Fr.ViewContextRead&&i&Fr.ViewContextWrite)return!1;return!0}function tK(n,i,e,t){let o=!1,r=!0;return Xo(e,(a,c)=>{if(!Ec(a)||o||!r)return a;if(c&Wn.InChildOperation&&t&Fr.ViewContextRead)return a;switch(a.kind){case Qt.ReadVariable:if(a.xref===n)return o=!0,i;break;default:let p=DE(a);r=r&&qF(p,t);break}return a},Wn.None),o}function nK(n,i){switch(n.variable.kind){case Wr.Identifier:return n.initializer instanceof Nl&&n.initializer.name===Ps;case Wr.Context:return i.kind===V.Variable;default:return!0}}function vN(n){let i=n.head.next,e=n.tail.prev;i!==null&&e!==null&&i.next===e&&i.kind===V.Statement&&i.statement instanceof sa&&i.statement.expr instanceof W_&&e.kind===V.Statement&&e.statement instanceof xr&&e.statement.value instanceof I1&&(qe.remove(i),e.statement.value=e.statement.value.expr)}function iK(n){for(let i of n.units){let e=null,t=null;for(let o of i.create)switch(o.kind){case V.I18nStart:e=o;break;case V.I18nEnd:e=null;break;case V.IcuStart:e===null&&(t=n.allocateXrefId(),qe.insertBefore(rb(t,o.message,void 0,null),o));break;case V.IcuEnd:t!==null&&(qe.insertAfter(ab(t,null),o),t=null);break}}}function oK(n){for(let i of n.units){for(let e of i.create)e.kind!==V.Animation&&e.kind!==V.AnimationListener&&e.kind!==V.Listener&&e.kind!==V.TwoWayListener&&CN(i,e);for(let e of i.update)CN(i,e)}}function CN(n,i){Xo(i,(e,t)=>{if(!(e instanceof eu)||t&Wn.InChildOperation)return e;if(Array.isArray(e.body))throw new Error("AssertionError: unexpected multi-line arrow function");let o=new CT(e.params,e.body);return n.functions.add(o),o},Wn.None)}var rK=new Set(["formField"]);function aK(n){for(let i of n.units)sK(i)}function sK(n){for(let i of n.update)i.kind===V.Property&&rK.has(i.name)&&mK(n,i)}var lK=new Set([V.Container,V.ContainerStart,V.ContainerEnd,V.Element,V.ElementStart,V.ElementEnd,V.Template]);function cK(n){return lK.has(n.kind)}function dK(n,i){let e=null;for(let t of n.create)!cK(t)||t.xref!==i||(e=t);return e}function mK(n,i){let e=dK(n,i.target);if(e===null)throw new Error(`No create instruction found for control target ${i.target}`);let t=zU(i.sourceSpan);qe.insertAfter(t,e),qe.insertAfter(bU(i.target,i.sourceSpan),i)}var pK=[{kind:Et.Tmpl,fn:Iq},{kind:Et.Both,fn:Uq},{kind:Et.Host,fn:UG},{kind:Et.Tmpl,fn:hq},{kind:Et.Tmpl,fn:Vq},{kind:Et.Tmpl,fn:iK},{kind:Et.Both,fn:pG},{kind:Et.Both,fn:$X},{kind:Et.Both,fn:YU},{kind:Et.Tmpl,fn:aK},{kind:Et.Both,fn:lG},{kind:Et.Both,fn:QU},{kind:Et.Tmpl,fn:mG},{kind:Et.Both,fn:gq},{kind:Et.Tmpl,fn:bX},{kind:Et.Both,fn:eG},{kind:Et.Both,fn:Pq},{kind:Et.Tmpl,fn:tG},{kind:Et.Tmpl,fn:Nq},{kind:Et.Tmpl,fn:uG},{kind:Et.Tmpl,fn:Lq},{kind:Et.Both,fn:oK},{kind:Et.Both,fn:jq},{kind:Et.Tmpl,fn:zG},{kind:Et.Tmpl,fn:BG},{kind:Et.Tmpl,fn:jG},{kind:Et.Tmpl,fn:NX},{kind:Et.Both,fn:$U},{kind:Et.Both,fn:kX},{kind:Et.Tmpl,fn:WX},{kind:Et.Tmpl,fn:yX},{kind:Et.Both,fn:PX},{kind:Et.Tmpl,fn:hG},{kind:Et.Tmpl,fn:qX},{kind:Et.Tmpl,fn:UX},{kind:Et.Both,fn:wX},{kind:Et.Both,fn:OX},{kind:Et.Tmpl,fn:pq},{kind:Et.Both,fn:CG},{kind:Et.Both,fn:VX},{kind:Et.Both,fn:HX},{kind:Et.Both,fn:YX},{kind:Et.Both,fn:RX},{kind:Et.Tmpl,fn:mq},{kind:Et.Tmpl,fn:dG},{kind:Et.Tmpl,fn:SX},{kind:Et.Tmpl,fn:WU},{kind:Et.Tmpl,fn:UU},{kind:Et.Tmpl,fn:FX},{kind:Et.Tmpl,fn:TX},{kind:Et.Tmpl,fn:EX},{kind:Et.Tmpl,fn:NG},{kind:Et.Tmpl,fn:aq},{kind:Et.Tmpl,fn:$G},{kind:Et.Both,fn:rG},{kind:Et.Tmpl,fn:xX},{kind:Et.Both,fn:QX},{kind:Et.Tmpl,fn:VG},{kind:Et.Both,fn:_q},{kind:Et.Tmpl,fn:MX},{kind:Et.Tmpl,fn:bq},{kind:Et.Tmpl,fn:yq},{kind:Et.Tmpl,fn:vG},{kind:Et.Tmpl,fn:qU},{kind:Et.Tmpl,fn:wq},{kind:Et.Both,fn:zq},{kind:Et.Both,fn:hX},{kind:Et.Both,fn:JU}];function QF(n,i){for(let e of pK)(e.kind===i||e.kind===Et.Both)&&e.fn(n)}function uK(n,i){let e=KF(n.root);return XF(n.root,i),e}function XF(n,i){for(let e of n.job.units){if(e.parent!==n.xref)continue;XF(e,i);let t=KF(e);i.statements.push(t.toDeclStmt(t.name))}}function KF(n){if(n.fnName===null)throw new Error(`AssertionError: view ${n.xref} is unnamed`);let i=[];for(let r of n.create){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${V[r.kind]}`);i.push(r.statement)}let e=[];for(let r of n.update){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${V[r.kind]}`);e.push(r.statement)}let t=Q1(1,i),o=Q1(2,e);return am([new br(Vh,Bp),new br(Ps,is)],[...t,...o],void 0,void 0,n.fnName)}function Q1(n,i){return i.length===0?[]:[tb(new gi(st.BitwiseAnd,Yn(Vh),Te(n)),i)]}function hK(n){if(n.root.fnName===null)throw new Error("AssertionError: host binding function is unnamed");let i=[];for(let r of n.root.create){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${V[r.kind]}`);i.push(r.statement)}let e=[];for(let r of n.root.update){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${V[r.kind]}`);e.push(r.statement)}if(i.length===0&&e.length===0)return null;let t=Q1(1,i),o=Q1(2,e);return am([new br(Vh,Bp),new br(Ps,is)],[...t,...o],void 0,void 0,n.root.fnName)}var Lp=new Rh,Vp="ng-template",fK="animate.";function WC(n){return n instanceof za}function gK(n){return WC(n)&&n.nodes.length===1&&n.nodes[0]instanceof y1}function _K(n,i,e,t,o,r,a,c,p,u){let h=new K_(n,e,t,o,r,a,c,p,u);return Sd(h.root,i),h}function vK(n,i,e){let t=new V1(n.componentName,e,Za.DomOnly);for(let o of n.properties??[]){let r=jt.Property;o.name.startsWith("attr.")&&(o.name=o.name.substring(5),r=jt.Attribute),o.isLegacyAnimation&&(r=jt.LegacyAnimation),o.isAnimation&&(r=jt.Animation);let a=i.calcPossibleSecurityContexts(n.componentSelector,o.name,r===jt.Attribute).filter(c=>c!==eo.NONE);CK(t,o,r,a)}for(let[o,r]of Object.entries(n.attributes)??[]){let a=i.calcPossibleSecurityContexts(n.componentSelector,o,!0).filter(c=>c!==eo.NONE);bK(t,o,r,a)}for(let o of n.events??[])xK(t,o);return t}function CK(n,i,e,t){let o,r=i.expression.ast;r instanceof a0?o=new Qo(r.strings,r.expressions.map(a=>Bn(a,n,i.sourceSpan)),[]):o=Bn(r,n,i.sourceSpan),n.root.update.push(Xp(n.root.xref,e,i.name,o,null,t,!1,!1,null,null,i.sourceSpan))}function bK(n,i,e,t){let o=Xp(n.root.xref,jt.Attribute,i,e,null,t,!0,!1,null,null,e.sourceSpan);n.root.update.push(o)}function xK(n,i){let e;if(i.type===Ba.Animation)e=wF(n.root.xref,new la,i.name,null,t0(n.root,i.handler,i.handlerSpan),i.name.endsWith("enter")?"enter":"leave",i.targetOrPhase,!0,i.sourceSpan);else{let[t,o]=i.type!==Ba.LegacyAnimation?[null,i.targetOrPhase]:[i.targetOrPhase,null];e=kE(n.root.xref,new la,i.name,null,t0(n.root,i.handler,i.handlerSpan),t,o,!0,i.sourceSpan)}n.root.create.push(e)}function Sd(n,i){for(let e of i)if(e instanceof kc)yK(n,e);else if(e instanceof ks)SK(n,e);else if(e instanceof Dh)wK(n,e);else if(e instanceof Dp)YF(n,e,null);else if(e instanceof kh)ZF(n,e,null);else if(e instanceof b1)MK(n,e);else if(e instanceof C1)kK(n,e);else if(e instanceof qp)TK(n,e);else if(e instanceof XN)DK(n,e);else if(e instanceof Eh)PK(n,e);else if(e instanceof gE)AK(n,e);else if(!(e instanceof e_))throw new Error(`Unsupported template node: ${e.constructor.name}`)}function yK(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof za||i.i18n instanceof lm))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=n.job.allocateXrefId(),[t,o]=Ll(i.name),r=yU(o,e,PF(t),i.i18n instanceof lm?i.i18n:void 0,i.startSourceSpan,i.sourceSpan);n.create.push(r),NK(n,r,i),t6(r,i);let a=null;i.i18n instanceof za&&(a=n.job.allocateXrefId(),n.create.push(rb(a,i.i18n,void 0,i.startSourceSpan))),Sd(n,i.children);let c=wU(e,i.endSourceSpan??i.startSourceSpan);n.create.push(c),a!==null&&qe.insertBefore(ab(a,i.endSourceSpan??i.startSourceSpan),c)}function SK(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof za||i.i18n instanceof lm))throw Error(`Unhandled i18n metadata type for template: ${i.i18n.constructor.name}`);let e=n.job.allocateView(n.xref),t=i.tagName,o="";i.tagName&&([o,t]=Ll(i.tagName));let r=i.i18n instanceof lm?i.i18n:void 0,a=PF(o),c=t===null?"":oG(t,a),p=OK(i)?ns.NgTemplate:ns.Structural,u=bF(e.xref,p,t,c,a,r,i.startSourceSpan,i.sourceSpan);n.create.push(u),FK(n,u,i,p),t6(u,i),Sd(e,i.children);for(let{name:h,value:_}of i.variables)e.contextVariables.set(h,_!==""?_:"$implicit");if(p===ns.NgTemplate&&i.i18n instanceof za){let h=n.job.allocateXrefId();qe.insertAfter(rb(h,i.i18n,void 0,i.startSourceSpan),e.create.head),qe.insertBefore(ab(h,i.endSourceSpan??i.startSourceSpan),e.create.tail)}}function wK(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof lm))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=null;i.children.some(r=>!(r instanceof ib)&&(!(r instanceof Dp)||r.value.trim().length>0))&&(e=n.job.allocateView(n.xref),Sd(e,i.children));let t=n.job.allocateXrefId(),o=AU(t,i.selector,i.i18n,e?.xref??null,i.sourceSpan);for(let r of i.attributes){let a=Lp.securityContext(i.name,r.name,!0);n.update.push(Xp(o.xref,jt.Attribute,r.name,Te(r.value),null,a,!0,!1,null,vd(r.i18n),r.sourceSpan))}n.create.push(o)}function YF(n,i,e){n.create.push(SF(n.job.allocateXrefId(),i.value,e,i.sourceSpan))}function ZF(n,i,e){let t=i.value;if(t instanceof ts&&(t=t.ast),!(t instanceof a0))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${t.constructor.name}`);if(i.i18n!==void 0&&!(i.i18n instanceof Cd))throw Error(`Unhandled i18n metadata type for text interpolation: ${i.i18n?.constructor.name}`);let o=i.i18n instanceof Cd?i.i18n.children.filter(a=>a instanceof R_).map(a=>a.name):[];if(o.length>0&&o.length!==t.expressions.length)throw Error(`Unexpected number of i18n placeholders (${t.expressions.length}) for BoundText with ${t.expressions.length} expressions`);let r=n.job.allocateXrefId();n.create.push(SF(r,"",e,i.sourceSpan)),n.update.push(lU(r,new Qo(t.strings,t.expressions.map(a=>Bn(a,n.job,null)),o),i.sourceSpan))}function MK(n,i){let e=null,t=[];for(let o=0;oS.modifier==="none")||h.some(S=>S.modifier==="none")||u.push(Zd(c,{kind:Ji.Idle},"none",null)),n.create.push(u),n.update.push(h)}function EK(n){return Object.keys(n.hydrateTriggers).length>0?1:null}function wk(n,i,e,t,o,r){if(i.idle!==void 0){let a=Zd(r,{kind:Ji.Idle},n,i.idle.sourceSpan);e.push(a)}if(i.immediate!==void 0){let a=Zd(r,{kind:Ji.Immediate},n,i.immediate.sourceSpan);e.push(a)}if(i.timer!==void 0){let a=Zd(r,{kind:Ji.Timer,delay:i.timer.delay},n,i.timer.sourceSpan);e.push(a)}if(i.hover!==void 0){let a=Zd(r,{kind:Ji.Hover,targetName:i.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,i.hover.sourceSpan);e.push(a)}if(i.interaction!==void 0){let a=Zd(r,{kind:Ji.Interaction,targetName:i.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,i.interaction.sourceSpan);e.push(a)}if(i.viewport!==void 0){let a=Zd(r,{kind:Ji.Viewport,targetName:i.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null,options:i.viewport.options?Bn(i.viewport.options,o.job,i.viewport.sourceSpan):null},n,i.viewport.sourceSpan);e.push(a)}if(i.never!==void 0){let a=Zd(r,{kind:Ji.Never},n,i.never.sourceSpan);e.push(a)}if(i.when!==void 0){if(i.when.value instanceof a0)throw new Error("Unexpected interpolation in defer block when trigger");let a=_U(r,Bn(i.when.value,o.job,i.when.sourceSpan),n,i.when.sourceSpan);t.push(a)}}function DK(n,i){if(i.i18n instanceof za&&gK(i.i18n)){let e=n.job.allocateXrefId();n.create.push(RU(e,i.i18n,ZN(i.i18n).name,null));for(let[t,o]of Object.entries(K(K({},i.vars),i.placeholders)))o instanceof kh?ZF(n,o,t):YF(n,o,t);n.create.push(LU(e))}else throw Error(`Unhandled i18n metadata type for ICU: ${i.i18n?.constructor.name}`)}function PK(n,i){let e=n.job.allocateView(n.xref),t=`\u0275$index_${e.xref}`,o=`\u0275$count_${e.xref}`,r=new Set;e.contextVariables.set(i.item.name,i.item.value);for(let y of i.contextVariables)y.value==="$index"&&r.add(y.name),y.name==="$index"?e.contextVariables.set("$index",y.value).set(t,y.value):y.name==="$count"?e.contextVariables.set("$count",y.value).set(o,y.value):e.aliases.add({kind:Wr.Alias,name:null,identifier:y.name,expression:IK(y,t,o)});let a=Or(i.trackBy.span,i.sourceSpan),c=Bn(i.trackBy,n.job,a);Sd(e,i.children);let p=null,u=null;i.empty!==null&&(p=n.job.allocateView(n.xref),Sd(p,i.empty.children),u=X1(n,p.xref,i.empty));let h={$index:r,$implicit:i.item.name};if(i.i18n!==void 0&&!(i.i18n instanceof cm))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(i.empty?.i18n!==void 0&&!(i.empty.i18n instanceof cm))throw Error("AssertionError: Unhandled i18n metadata type or @empty");let _=i.i18n,S=i.empty?.i18n,x=X1(n,e.xref,i),b=SU(e.xref,p?.xref??null,x,c,h,u,_,S,i.startSourceSpan,i.sourceSpan);n.create.push(b);let M=Bn(i.expression,n.job,Or(i.expression.span,i.sourceSpan)),w=gU(b.xref,b.handle,M,i.sourceSpan);n.update.push(w)}function IK(n,i,e){switch(n.value){case"$index":return new Ur(i);case"$count":return new Ur(e);case"$first":return new Ur(i).identical(Te(0));case"$last":return new Ur(i).identical(new Ur(e).minus(Te(1)));case"$even":return new Ur(i).modulo(Te(2)).identical(Te(0));case"$odd":return new Ur(i).modulo(Te(2)).notIdentical(Te(0));default:throw new Error(`AssertionError: unknown @for loop variable ${n.value}`)}}function AK(n,i){let e=n.job.allocateXrefId();n.create.push(NU(e,i.name,i.sourceSpan)),n.update.push(CU(e,i.name,Bn(i.value,n.job,i.valueSpan),i.sourceSpan))}function Bn(n,i,e){if(n instanceof ts)return Bn(n.ast,i,e);if(n instanceof Cc)return n.receiver instanceof Mc?new Ur(n.name):new Es(Bn(n.receiver,i,e),n.name,null,Or(n.span,e));if(n instanceof wh){if(n.receiver instanceof Mc)throw new Error("Unexpected ImplicitReceiver");return new os(Bn(n.receiver,i,e),n.args.map(t=>Bn(t,i,e)),void 0,Or(n.span,e))}else{if(n instanceof Ja)return Te(n.value,void 0,Or(n.span,e));if(n instanceof gh)switch(n.operator){case"+":return new jp(l_.Plus,Bn(n.expr,i,e),void 0,Or(n.span,e));case"-":return new jp(l_.Minus,Bn(n.expr,i,e),void 0,Or(n.span,e));default:throw new Error(`AssertionError: unknown unary operator ${n.operator}`)}else if(n instanceof Na){let t=nG.get(n.operation);if(t===void 0)throw new Error(`AssertionError: unknown binary operator ${n.operation}`);return new gi(t,Bn(n.left,i,e),Bn(n.right,i,e),void 0,Or(n.span,e))}else{if(n instanceof g_)return new pm(i.root.xref);if(n instanceof Gp)return new xd(Bn(n.receiver,i,e),Bn(n.key,i,e),void 0,Or(n.span,e));if(n instanceof Sh)throw new Error("AssertionError: Chain in unknown context");if(n instanceof Wp){let t=n.keys.map((o,r)=>{let a=Bn(n.values[r],i,e);return o.kind==="spread"?new rm(a):new xh(o.key,a,o.quoted)});return new Rl(t,void 0,Or(n.span,e))}else{if(n instanceof C_)return new wc(n.expressions.map(t=>Bn(t,i,e)));if(n instanceof s1)return new Sc(Bn(n.condition,i,e),Bn(n.trueExp,i,e),Bn(n.falseExp,i,e),void 0,Or(n.span,e));if(n instanceof S_)return Bn(n.expression,i,e);if(n instanceof l1)return new Yp(i.allocateXrefId(),new la,n.name,[Bn(n.exp,i,e),...n.args.map(t=>Bn(t,i,e))]);if(n instanceof v_)return new Oh(Bn(n.receiver,i,e),Bn(n.key,i,e),Or(n.span,e));if(n instanceof __)return new Ah(Bn(n.receiver,i,e),n.name);if(n instanceof d1)return new Zp(Bn(n.receiver,i,e),n.args.map(t=>Bn(t,i,e)));if(n instanceof _a)return new Q_(Or(n.span,e));if(n instanceof b_)return x$(Bn(n.expression,i,e),Or(n.span,e));if(n instanceof x_)return r0(Bn(n.expression,i,e));if(n instanceof y_)return new ZC(Bn(n.expression,i,e),void 0,Or(n.span,e));if(n instanceof M_)return bN(n,i,e);if(n instanceof w_)return new c_(Bn(n.tag,i,e),bN(n.template,i,e),void 0,Or(n.span,e));if(n instanceof k_)return new Fl(Bn(n.expression,i,e),void 0,Or(n.span,e));if(n instanceof u1)return new bh(n.body,n.flags,e);if(n instanceof c1)return new $p(Bn(n.expression,i,e));if(n instanceof p1)return LK(Ds(n.parameters.map(t=>new br(t.name,is)),Bn(n.body,i,e)));throw new Error(`Unhandled expression type "${n.constructor.name}" in file "${e?.start.file.url}"`)}}}}function bN(n,i,e){return new m_(n.elements.map(t=>new JC(t.text,Or(t.span,e))),n.expressions.map(t=>Bn(t,i,e)),Or(n.span,e))}function GT(n,i,e,t){let o;return i instanceof a0?o=new Qo(i.strings,i.expressions.map(r=>Bn(r,n,null)),Object.keys(vd(e)?.placeholders??{})):i instanceof to?o=Bn(i,n,null):o=Te(i),o}var JF=new Map([[Ti.Property,jt.Property],[Ti.TwoWay,jt.TwoWayProperty],[Ti.Attribute,jt.Attribute],[Ti.Class,jt.ClassName],[Ti.Style,jt.StyleProperty],[Ti.LegacyAnimation,jt.LegacyAnimation],[Ti.Animation,jt.Animation]]);function OK(n){return Ll(n.tagName??"")[1]===Vp}function vd(n){if(n==null)return null;if(!(n instanceof za))throw Error(`Expected i18n meta to be a Message, but got: ${n.constructor.name}`);return n}function NK(n,i,e){let t=new Array,o=new Set;for(let r of e.attributes){let a=Lp.securityContext(e.name,r.name,!0);t.push(Xp(i.xref,jt.Attribute,r.name,GT(n.job,r.value,r.i18n),null,a,!0,!1,null,vd(r.i18n),r.sourceSpan)),r.i18n&&o.add(r.name)}for(let r of e.inputs)o.has(r.name)&&console.error(`On component ${n.job.componentName}, the binding ${r.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`),t.push(Xp(i.xref,JF.get(r.type),r.name,GT(n.job,n0(r.value),r.i18n),r.unit,r.securityContext,!1,!1,null,vd(r.i18n)??null,r.sourceSpan));n.create.push(t.filter(r=>r?.kind===V.ExtractedAttribute)),n.update.push(t.filter(r=>r?.kind===V.Binding));for(let r of e.outputs){if(r.type===Ba.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");r.type===Ba.TwoWay?n.create.push(MF(i.xref,i.handle,r.name,i.tag,e6(n,r.handler,r.handlerSpan),r.sourceSpan)):r.type===Ba.Animation?n.create.push(wF(i.xref,i.handle,r.name,i.tag,t0(n,r.handler,r.handlerSpan),r.name.endsWith("enter")?"enter":"leave",r.target,!1,r.sourceSpan)):n.create.push(kE(i.xref,i.handle,r.name,i.tag,t0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))}t.some(r=>r?.i18nMessage)!==null&&n.create.push(kF(n.job.allocateXrefId(),new la,i.xref))}function FK(n,i,e,t){let o=new Array;for(let r of e.templateAttrs)if(r instanceof Th){let a=Lp.securityContext(Vp,r.name,!0);o.push(zC(n,i.xref,Ti.Attribute,r.name,r.value,null,a,!0,t,vd(r.i18n),r.sourceSpan))}else o.push(zC(n,i.xref,r.type,r.name,n0(r.value),r.unit,r.securityContext,!0,t,vd(r.i18n),r.sourceSpan));for(let r of e.attributes){let a=Lp.securityContext(Vp,r.name,!0);o.push(zC(n,i.xref,Ti.Attribute,r.name,r.value,null,a,!1,t,vd(r.i18n),r.sourceSpan))}for(let r of e.inputs)o.push(zC(n,i.xref,r.type,r.name,n0(r.value),r.unit,r.securityContext,!1,t,vd(r.i18n),r.sourceSpan));n.create.push(o.filter(r=>r?.kind===V.ExtractedAttribute)),n.update.push(o.filter(r=>r?.kind===V.Binding));for(let r of e.outputs){if(r.type===Ba.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");if(t===ns.NgTemplate&&(r.type===Ba.TwoWay?n.create.push(MF(i.xref,i.handle,r.name,i.tag,e6(n,r.handler,r.handlerSpan),r.sourceSpan)):n.create.push(kE(i.xref,i.handle,r.name,i.tag,t0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))),t===ns.Structural&&r.type!==Ba.LegacyAnimation){let a=Lp.securityContext(Vp,r.name,!1);n.create.push(Js(i.xref,jt.Property,null,r.name,null,null,null,a))}}o.some(r=>r?.i18nMessage)!==null&&n.create.push(kF(n.job.allocateXrefId(),new la,i.xref))}function zC(n,i,e,t,o,r,a,c,p,u,h){let _=typeof o=="string";if(p===ns.Structural){if(!c)switch(e){case Ti.Property:case Ti.Class:case Ti.Style:return Js(i,jt.Property,null,t,null,null,u,a);case Ti.TwoWay:return Js(i,jt.TwoWayProperty,null,t,null,null,u,a)}if(!_&&(e===Ti.Attribute||e===Ti.LegacyAnimation||e===Ti.Animation))return null}let S=JF.get(e);return p===ns.NgTemplate&&(e===Ti.Class||e===Ti.Style||e===Ti.Attribute&&!_)&&(S=jt.Property),Xp(i,S,t,GT(n.job,o,u),r,a,_,c,p,u,h)}function t0(n,i,e){i=n0(i);let t=new Array,o=i instanceof Sh?i.expressions:[i];if(o.length===0)throw new Error("Expected listener to have non-empty expression list.");let r=o.map(c=>Bn(c,n.job,e)),a=r.pop();return t.push(...r.map(c=>Is(new sa(c,c.sourceSpan)))),t.push(Is(new xr(a,a.sourceSpan))),t}function e6(n,i,e){i=n0(i);let t=new Array;if(i instanceof Sh)if(i.expressions.length===1)i=i.expressions[0];else throw new Error("Expected two-way listener to have a single expression.");let o=Bn(i,n.job,e),r=new Ur("$event"),a=new A1(o,r);return t.push(Is(new sa(a))),t.push(Is(new xr(r))),t}function n0(n){return n instanceof ts?n.ast:n}function t6(n,i){RK(n.localRefs);for(let{name:e,value:t}of i.references)n.localRefs.push({name:e,target:t})}function RK(n){if(!Array.isArray(n))throw new Error("AssertionError: expected an array")}function Or(n,i){if(i===null)return null;let e=i.start.moveBy(n.start),t=i.start.moveBy(n.end),o=i.fullStart.moveBy(n.start);return new gn(e,t,o)}function X1(n,i,e){let t=null;for(let o of e.children)if(!(o instanceof ib||o instanceof gE)){if(t!==null)return null;if(o instanceof kc||o instanceof ks&&o.tagName!==null)t=o;else return null}if(t!==null){for(let r of t.attributes)if(!r.name.startsWith(fK)){let a=Lp.securityContext(Vp,r.name,!0);n.update.push(Xp(i,jt.Attribute,r.name,Te(r.value),null,a,!0,!1,null,vd(r.i18n),r.sourceSpan))}for(let r of t.inputs)if(r.type!==Ti.LegacyAnimation&&r.type!==Ti.Animation&&r.type!==Ti.Attribute){let a=Lp.securityContext(Vp,r.name,!0);n.create.push(Js(i,jt.Property,null,r.name,null,null,null,a))}let o=t instanceof kc?t.name:t.tagName;return o===Vp?null:o}return null}function LK(n){let i=new Set(n.params.map(e=>e.name));return Vt(n,e=>{if(e instanceof eu)for(let t of e.params)i.add(t.name);else if(e instanceof Ur&&i.has(e.name))return Yn(e.name);return e},Wn.None)}var VK=!1;function BK(){return VK}function K1(n,i){return tb(Yn(Vh).bitwiseAnd(Te(n),null),i)}function zK(n){return(n.descendants?1:0)|(n.static?2:0)|(n.emitDistinctChangesOnly?4:0)}function jK(n,i){if(Array.isArray(n.predicate)){let e=[];return n.predicate.forEach(t=>{let o=t.split(",").map(r=>Te(r.trim()));e.push(...o)}),i.getConstLiteral(Gi(e),!0)}else switch(n.predicate.forwardRef){case 0:case 2:return n.predicate.expression;case 1:return Ut(fe.resolveForwardRef).callFn([n.predicate.expression])}}function n6(n,i,e){let t=[];return e!==void 0&&t.push(...e),n.isSignal&&t.push(new Es(Yn(Ps),n.propertyName)),t.push(jK(n,i),Te(zK(n))),n.read&&t.push(n.read),t}var PE=Symbol("queryAdvancePlaceholder");function i6(n){let i=[],e=0,t=()=>{e>0&&(i.unshift(Ut(fe.queryAdvance).callFn(e===1?[]:[Te(e)]).toStmt()),e=0)};for(let o=n.length-1;o>=0;o--){let r=n[o];r===PE?e++:(t(),i.unshift(r))}return t(),i}function $K(n,i,e){let t=[],o=[],r=JN(u=>o.push(u),vE),a=null,c=null;n.forEach(u=>{let h=n6(u,i);if(u.isSignal?(a??=Ut(fe.viewQuerySignal),a=a.callFn(h)):(c??=Ut(fe.viewQuery),c=c.callFn(h)),u.isSignal){o.push(PE);return}let _=r(),S=Ut(fe.loadQuery).callFn([]),x=Ut(fe.queryRefresh).callFn([_.set(S)]),b=Yn(Ps).prop(u.propertyName).set(u.first?_.prop("first"):_);o.push(x.and(b).toStmt())}),a!==null&&t.push(new sa(a)),c!==null&&t.push(new sa(c));let p=e?`${e}_Query`:null;return am([new br(Vh,Bp),new br(Ps,is)],[K1(1,t),K1(2,i6(o))],Ol,null,p)}function HK(n,i,e){let t=[],o=[],r=JN(u=>o.push(u),vE),a=null,c=null;for(let u of n){let h=n6(u,i,[Yn("dirIndex")]);if(u.isSignal?(a??=Ut(fe.contentQuerySignal),a=a.callFn(h)):(c??=Ut(fe.contentQuery),c=c.callFn(h)),u.isSignal){o.push(PE);continue}let _=r(),S=Ut(fe.loadQuery).callFn([]),x=Ut(fe.queryRefresh).callFn([_.set(S)]),b=Yn(Ps).prop(u.propertyName).set(u.first?_.prop("first"):_);o.push(x.and(b).toStmt())}a!==null&&t.push(new sa(a)),c!==null&&t.push(new sa(c));let p=e?`${e}_ContentQueries`:null;return am([new br(Vh,Bp),new br(Ps,is),new br("dirIndex",Bp)],[K1(1,t),K1(2,i6(o))],Ol,null,p)}var WT=class extends rW{constructor(){super(VT)}parse(i,e,t){return super.parse(i,e,t)}},jC=".",UK="attr",Mk="animate",GK="class",WK="style",qK="*",kk="animate-",qT=class{_exprParser;_schemaRegistry;errors;constructor(i,e,t){this._exprParser=i,this._schemaRegistry=e,this.errors=t}createBoundHostProperties(i,e){let t=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parsePropertyBinding(o,r,!0,!1,e,e.start.offset,void 0,[],t,e):this._reportError(`Value of the host property binding "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}createDirectiveHostEventAsts(i,e){let t=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parseEvent(o,r,!1,e,e,[],t,e):this._reportError(`Value of the host listener "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}parseInterpolation(i,e,t){let o=e.fullStart.offset;try{let r=this._exprParser.parseInterpolation(i,e,o,t);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,o)}}parseInterpolationExpression(i,e){let t=e.start.offset;try{let o=this._exprParser.parseInterpolationExpression(i,e,t);return o&&this.errors.push(...o.errors),o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}parseInlineTemplateBinding(i,e,t,o,r,a,c,p){let u=t.start.offset+qK.length,h=this._parseTemplateBindings(i,e,t,u,o);for(let _ of h){let S=Kd(t,_.sourceSpan),x=_.key.source,b=Kd(t,_.key.span);if(_ instanceof T_){let M=_.value?_.value.source:"$implicit",w=_.value?Kd(t,_.value.span):void 0;c.push(new Qk(x,M,S,b,w))}else if(_.value){let M=p?S:t,w=Kd(t,_.value.ast.sourceSpan);this._parsePropertyAst(x,_.value,!1,M,b,w,r,a)}else r.push([x,""]),this.parseLiteralAttr(x,null,b,o,void 0,r,a,b)}}_parseTemplateBindings(i,e,t,o,r){try{let a=this._exprParser.parseTemplateBindings(i,e,t,o,r);return a.errors.forEach(c=>this.errors.push(c)),a.warnings.forEach(c=>{this._reportError(c,t,nm.WARNING)}),a.templateBindings}catch(a){return this._reportError(`${a}`,t),[]}}parseLiteralAttr(i,e,t,o,r,a,c,p){Tk(i)?(i=i.substring(1),p!==void 0&&(p=Kd(p,new Ms(p.start.offset+1,p.end.offset))),e&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',t,nm.ERROR),this._parseLegacyAnimation(i,e,t,o,p,r,a,c)):c.push(new dh(i,this._exprParser.wrapLiteralPrimitive(e,"",o),fc.LITERAL_ATTR,t,p,r))}parsePropertyBinding(i,e,t,o,r,a,c,p,u,h){i.length===0&&this._reportError("Property name is missing in binding",r);let _=!1;i.startsWith(kk)?(_=!0,i=i.substring(kk.length),h!==void 0&&(h=Kd(h,new Ms(h.start.offset+kk.length,h.end.offset)))):Tk(i)&&(_=!0,i=i.substring(1),h!==void 0&&(h=Kd(h,new Ms(h.start.offset+1,h.end.offset)))),_?this._parseLegacyAnimation(i,e,r,a,h,c,p,u):i.startsWith(`${Mk}${jC}`)?this._parseAnimation(i,this.parseBinding(e,t,c||r,a),r,h,c,p,u):this._parsePropertyAst(i,this.parseBinding(e,t,c||r,a),o,r,h,c,p,u)}parsePropertyInterpolation(i,e,t,o,r,a,c,p){let u=this.parseInterpolation(e,o||t,p);return u?(this._parsePropertyAst(i,u,!1,t,c,o,r,a),!0):!1}_parsePropertyAst(i,e,t,o,r,a,c,p){c.push([i,e.source]),p.push(new dh(i,e,t?fc.TWO_WAY:fc.DEFAULT,o,r,a))}_parseAnimation(i,e,t,o,r,a,c){a.push([i,e.source]),c.push(new dh(i,e,fc.ANIMATION,t,o,r))}_parseLegacyAnimation(i,e,t,o,r,a,c,p){i.length===0&&this._reportError("Animation trigger is missing",t);let u=this.parseBinding(e||"undefined",!1,a||t,o);c.push([i,u.source]),p.push(new dh(i,u,fc.LEGACY_ANIMATION,t,r,a))}parseBinding(i,e,t,o){try{let r=e?this._exprParser.parseSimpleBinding(i,t,o):this._exprParser.parseBinding(i,t,o);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,t),this._exprParser.wrapLiteralPrimitive("ERROR",t,o)}}createBoundElementProperty(i,e,t=!1,o=!0){if(e.isLegacyAnimation)return new f1(e.name,Ti.LegacyAnimation,eo.NONE,e.expression,null,e.sourceSpan,e.keySpan,e.valueSpan);let r=null,a,c=null,p=e.name.split(jC),u;if(p.length>1)if(p[0]==UK){c=p.slice(1).join(jC),t||this._validatePropertyOrAttributeName(c,e.sourceSpan,!0),u=Ek(this._schemaRegistry,i,c,!0);let h=c.indexOf(":");if(h>-1){let _=c.substring(0,h),S=c.substring(h+1);c=UC(_,S)}a=Ti.Attribute}else p[0]==GK?(c=p[1],a=Ti.Class,u=[eo.NONE]):p[0]==WK?(r=p.length>2?p[2]:null,c=p[1],a=Ti.Style,u=[eo.STYLE]):p[0]==Mk&&(c=e.name,a=Ti.Animation,u=[eo.NONE]);if(c===null){let h=this._schemaRegistry.getMappedPropName(e.name);c=o?h:e.name,u=Ek(this._schemaRegistry,i,h,!1),a=e.type===fc.TWO_WAY?Ti.TwoWay:Ti.Property,t||this._validatePropertyOrAttributeName(h,e.sourceSpan,!1)}return new f1(c,a,u[0],e.expression,r,e.sourceSpan,e.keySpan,e.valueSpan)}parseEvent(i,e,t,o,r,a,c,p){i.length===0&&this._reportError("Event name is missing in binding",o),Tk(i)?(i=i.slice(1),p!==void 0&&(p=Kd(p,new Ms(p.start.offset+1,p.end.offset))),this._parseLegacyAnimationEvent(i,e,o,r,c,p)):this._parseRegularEvent(i,e,t,o,r,a,c,p)}calcPossibleSecurityContexts(i,e,t){let o=this._schemaRegistry.getMappedPropName(e);return Ek(this._schemaRegistry,i,o,t)}parseEventListenerName(i){let[e,t]=P$(i,[null,i]);return{eventName:t,target:e}}parseLegacyAnimationEventName(i){let e=I$(i,[i,null]);return{eventName:e[0],phase:e[1]===null?null:e[1].toLowerCase()}}_parseLegacyAnimationEvent(i,e,t,o,r,a){let{eventName:c,phase:p}=this.parseLegacyAnimationEventName(i),u=this._parseAction(e,o);r.push(new h1(c,p,Ba.LegacyAnimation,u,t,o,a)),c.length===0&&this._reportError("Animation event name is missing in binding",t),p?p!=="start"&&p!=="done"&&this._reportError(`The provided animation output phase value "${p}" for "@${c}" is not supported (use start or done)`,t):this._reportError(`The animation trigger output event (@${c}) is missing its phase value name (start or done are currently supported)`,t)}_parseRegularEvent(i,e,t,o,r,a,c,p){let{eventName:u,target:h}=this.parseEventListenerName(i),_=this.errors.length,S=this._parseAction(e,r),x=this.errors.length===_;a.push([i,S.source]),t&&x&&!this._isAllowedAssignmentEvent(S)&&this._reportError("Unsupported expression in a two-way binding",o);let b=Ba.Regular;t&&(b=Ba.TwoWay),i.startsWith(`${Mk}${jC}`)&&(b=Ba.Animation),c.push(new h1(u,h,b,S,o,r,p))}_parseAction(i,e){let t=e&&e.start?e.start.offset:0;try{let o=this._exprParser.parseAction(i,e,t);return o&&this.errors.push(...o.errors),!o||o.ast instanceof _a?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)):o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}_reportError(i,e,t=nm.ERROR){this.errors.push(new sn(e,i,t))}_validatePropertyOrAttributeName(i,e,t){let o=t?this._schemaRegistry.validateAttribute(i):this._schemaRegistry.validateProperty(i);o.error&&this._reportError(o.msg,e,nm.ERROR)}_isAllowedAssignmentEvent(i){return i instanceof ts?this._isAllowedAssignmentEvent(i.ast):i instanceof S_?this._isAllowedAssignmentEvent(i.expression):i instanceof wh&&i.args.length===1&&i.receiver instanceof Cc&&i.receiver.name==="$any"&&i.receiver.receiver instanceof Mc?this._isAllowedAssignmentEvent(i.args[0]):(i instanceof Cc||i instanceof Gp)&&!QT(i)}};function QT(n){return n instanceof __||n instanceof v_?!0:n instanceof k_?QT(n.expression):n instanceof Cc||n instanceof Gp||n instanceof wh?QT(n.receiver):!1}function Tk(n){return n[0]=="@"}function Ek(n,i,e,t){let o,r=a=>n.securityContext(a,e,t);return i===null?o=n.allKnownElementNames().map(r):(o=[],vh.parse(i).forEach(a=>{let c=a.element?[a.element]:n.allKnownElementNames(),p=new Set(a.notSelectors.filter(h=>h.isElementSelector()).map(h=>h.element)),u=c.filter(h=>!p.has(h));o.push(...u.map(r))})),o.length===0?[eo.NONE]:Array.from(new Set(o)).sort()}function Kd(n,i){let e=i.start-n.start.offset,t=i.end-n.end.offset;return new gn(n.start.moveBy(e),n.end.moveBy(t),n.fullStart.moveBy(e),n.details)}function QK(n){if(n==null||n.length===0||n[0]=="/")return!1;let i=n.match(XK);return i===null||i[1]=="package"||i[1]=="asset"}var XK=/^([^:/?#]+):/,KK="select",YK="link",ZK="rel",JK="href",eY="stylesheet",tY="style",nY="script",iY="ngNonBindable",oY="ngProjectAs";function o6(n){let i=null,e=null,t=null,o=!1,r="";n.attrs.forEach(p=>{let u=p.name.toLowerCase();u==KK?i=p.value:u==JK?e=p.value:u==ZK?t=p.value:p.name==iY?o=!0:p.name==oY&&p.value.length>0&&(r=p.value)}),i=rY(i);let a=n.name.toLowerCase(),c=ws.OTHER;return Xk(a)?c=ws.NG_CONTENT:a==tY?c=ws.STYLE:a==nY?c=ws.SCRIPT:a==YK&&t==eY&&(c=ws.STYLESHEET),new XT(c,i,e,o,r)}var ws=(function(n){return n[n.NG_CONTENT=0]="NG_CONTENT",n[n.STYLE=1]="STYLE",n[n.STYLESHEET=2]="STYLESHEET",n[n.SCRIPT=3]="SCRIPT",n[n.OTHER=4]="OTHER",n})(ws||{}),XT=class{type;selectAttr;hrefAttr;nonBindable;projectAs;constructor(i,e,t,o,r){this.type=i,this.selectAttr=e,this.hrefAttr=t,this.nonBindable=o,this.projectAs=r}};function rY(n){return n===null||n.length===0?"*":n}var aY=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,sY=/^track\s+([\S\s]*)/,lY=/^(as\s+)(.*)/,lb=/^else[^\S\r\n]+if/,cY=/^let\s+([\S\s]*)/,dY=/^[$A-Z_][0-9A-Z_$]*$/i,xN=/(\s*)(\S+)(\s*)/,s_=new Set(["$index","$first","$last","$even","$odd","$count"]);function yN(n){return n==="empty"}function SN(n){return n==="else"||lb.test(n)}function mY(n,i,e,t){let o=_Y(i),r=[],a=wN(n,o,t);a!==null&&r.push(new Ap(a.expression,Co(e,n.children,n.children),a.expressionAlias,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan,n.i18n));for(let _ of i)if(lb.test(_.name)){let S=wN(_,o,t);if(S!==null){let x=Co(e,_.children,_.children);r.push(new Ap(S.expression,x,S.expressionAlias,_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan,_.i18n))}}else if(_.name==="else"){let S=Co(e,_.children,_.children);r.push(new Ap(null,S,null,_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan,_.i18n))}let c=r.length>0?r[0].startSourceSpan:n.startSourceSpan,p=r.length>0?r[r.length-1].endSourceSpan:n.endSourceSpan,u=n.sourceSpan,h=r[r.length-1];return h!==void 0&&(u=new gn(c.start,h.sourceSpan.end)),{node:new b1(r,u,n.startSourceSpan,p,n.nameSpan),errors:o}}function pY(n,i,e,t){let o=[],r=hY(n,o,t),a=null,c=null;for(let p of i)p.name==="empty"?c!==null?o.push(new sn(p.sourceSpan,"@for loop can only have one @empty block")):p.parameters.length>0?o.push(new sn(p.sourceSpan,"@empty block cannot have parameters")):c=new O_(Co(e,p.children,p.children),p.sourceSpan,p.startSourceSpan,p.endSourceSpan,p.nameSpan,p.i18n):o.push(new sn(p.sourceSpan,`Unrecognized @for loop block "${p.name}"`));if(r!==null)if(r.trackBy===null)o.push(new sn(n.startSourceSpan,'@for loop must have a "track" expression'));else{let p=c?.endSourceSpan??n.endSourceSpan,u=new gn(n.sourceSpan.start,p?.end??n.sourceSpan.end);fY(r.trackBy.expression,r.trackBy.keywordSpan,o),a=new Eh(r.itemName,r.expression,r.trackBy.expression,r.trackBy.keywordSpan,r.context,Co(e,n.children,n.children),c,u,n.sourceSpan,n.startSourceSpan,p,n.nameSpan,n.i18n)}return{node:a,errors:o}}function uY(n,i,e){let t=vY(n),o=n.parameters.length>0?i0(n.parameters[0],e):e.parseBinding("",!1,n.sourceSpan,0),r=[],a=[],c=[],p=null,u=null;for(let _ of n.children){if(!(_ instanceof Ks))continue;if((_.name!=="case"||_.parameters.length===0)&&_.name!=="default"&&_.name!=="default never"){a.push(new x1(_.name,_.sourceSpan,_.nameSpan));continue}u!==null&&t.push(new sn(_.sourceSpan,'@default block with "never" parameter must be the last case in a switch'));let S=_.name==="case",x=null;if(S)x=i0(_.parameters[0],e);else if(_.name==="default never"){(_.children.length>0||_.endSourceSpan!==null&&_.endSourceSpan.start.offset!==_.endSourceSpan.end.offset)&&t.push(new sn(_.sourceSpan,'@default block with "never" parameter cannot have a body')),c.length>0&&t.push(new sn(_.sourceSpan,'A @case block with no body cannot be followed by a @default block with "never" parameter')),u=new oT(_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan);continue}let b=new iT(x,_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan);if(c.push(b),_.children.length===0&&_.endSourceSpan!==null&&_.endSourceSpan.start.offset===_.endSourceSpan.end.offset){p===null&&(p=_.sourceSpan);continue}let w=_.sourceSpan,y=_.startSourceSpan;p!==null&&(w=new gn(p.start,_.sourceSpan.end),y=new gn(p.start,_.startSourceSpan.end),p=null);let E=new A_(c,Co(i,_.children,_.children),w,y,_.endSourceSpan,_.nameSpan,_.i18n);r.push(E),c=[]}return{node:new C1(o,r,a,u,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan),errors:t}}function hY(n,i,e){if(n.parameters.length===0)return i.push(new sn(n.startSourceSpan,"@for loop does not have an expression")),null;let[t,...o]=n.parameters,r=CY(t,i)?.match(aY);if(!r||r[2].trim().length===0)return i.push(new sn(t.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern " of "')),null;let[,a,c]=r;s_.has(a)&&i.push(new sn(t.sourceSpan,`@for loop item name cannot be one of ${Array.from(s_).join(", ")}.`));let p=t.expression.split(" ")[0],u=new gn(t.sourceSpan.start,t.sourceSpan.start.moveBy(p.length)),h={itemName:new sm(a,"$implicit",u,u),trackBy:null,expression:i0(t,e,c),context:Array.from(s_,_=>{let S=new gn(n.startSourceSpan.end,n.startSourceSpan.end);return new sm(_,_,S,S)})};for(let _ of o){let S=_.expression.match(cY);if(S!==null){let b=new gn(_.sourceSpan.start.moveBy(S[0].length-S[1].length),_.sourceSpan.end);gY(_.sourceSpan,S[1],b,a,h.context,i);continue}let x=_.expression.match(sY);if(x!==null){if(h.trackBy!==null)i.push(new sn(_.sourceSpan,'@for loop can only have one "track" expression'));else{let b=i0(_,e,x[1]);b.ast instanceof _a&&i.push(new sn(n.startSourceSpan,'@for loop must have a "track" expression'));let M=new gn(_.sourceSpan.start,_.sourceSpan.start.moveBy(5));h.trackBy={expression:b,keywordSpan:M}}continue}i.push(new sn(_.sourceSpan,`Unrecognized @for loop parameter "${_.expression}"`))}return h}function fY(n,i,e){let t=new KT;n.ast.visit(t),t.hasPipe&&e.push(new sn(i,"Cannot use pipes in track expressions"))}function gY(n,i,e,t,o,r){let a=i.split(","),c=e.start;for(let p of a){let u=p.split("="),h=u.length===2?u[0].trim():"",_=u.length===2?u[1].trim():"";if(h.length===0||_.length===0)r.push(new sn(n,'Invalid @for loop "let" parameter. Parameter should match the pattern " = "'));else if(!s_.has(_))r.push(new sn(n,`Unknown "let" parameter variable "${_}". The allowed variables are: ${Array.from(s_).join(", ")}`));else if(h===t)r.push(new sn(n,`Invalid @for loop "let" parameter. Variable cannot be called "${t}"`));else if(o.some(S=>S.name===h))r.push(new sn(n,`Duplicate "let" parameter variable "${_}"`));else{let[,S,x]=u[0].match(xN)??[],b=S!==void 0&&u.length===2?new gn(c.moveBy(S.length),c.moveBy(S.length+x.length)):e,M;if(u.length===2){let[,y,E]=u[1].match(xN)??[];M=y!==void 0?new gn(c.moveBy(u[0].length+1+y.length),c.moveBy(u[0].length+1+y.length+E.length)):void 0}let w=new gn(b.start,M?.end??b.end);o.push(new sm(h,_,w,b,M))}c=c.moveBy(p.length+1)}}function _Y(n){let i=[],e=!1;for(let t=0;t1&&t0&&i.push(new sn(o.startSourceSpan,"@else block cannot have parameters")),e=!0):lb.test(o.name)||i.push(new sn(o.startSourceSpan,`Unrecognized conditional block @${o.name}`))}return i}function vY(n){let i=[],e=!1;if(n.parameters.length!==1)return i.push(new sn(n.startSourceSpan,"@switch block must have exactly one parameter")),i;for(let t of n.children)if(!(t instanceof Y_||t instanceof Jp&&t.value.trim().length===0)){if(!(t instanceof Ks)||t.name!=="case"&&t.name!=="default"&&t.name!=="default never"){i.push(new sn(t.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}t.name==="default never"?(e&&i.push(new sn(t.startSourceSpan,"@switch block can only have one @default block")),e=!0):t.name==="default"?(e?i.push(new sn(t.startSourceSpan,"@switch block can only have one @default block")):t.parameters.length>0&&i.push(new sn(t.startSourceSpan,"@default block cannot have parameters")),e=!0):t.name==="case"&&t.parameters.length!==1&&i.push(new sn(t.startSourceSpan,"@case block must have exactly one parameter"))}return i}function i0(n,i,e){let t,o;return typeof e=="string"?(t=Math.max(0,n.expression.lastIndexOf(e)),o=t+e.length):(t=0,o=n.expression.length),i.parseBinding(n.expression.slice(t,o),!1,n.sourceSpan,n.sourceSpan.start.offset+t)}function wN(n,i,e){if(n.parameters.length===0)return i.push(new sn(n.startSourceSpan,"Conditional block does not have an expression")),null;let t=i0(n.parameters[0],e),o=null;for(let r=1;r-1;c--){let p=e[c];if(p===")"){if(a=c,o--,o===0)break}else{if(t.test(p))continue;break}}return o!==0?(i.push(new sn(n.sourceSpan,"Unclosed parentheses in expression")),null):e.slice(r,a)}var KT=class extends Mh{hasPipe=!1;visitPipe(){this.hasPipe=!0}},bY=/^\d+\.?\d*(ms|s)?$/,xY=/^\s$/,MN=new Map([[Ys,Ra],[bc,_d],[Va,Cr]]),La=(function(n){return n.IDLE="idle",n.TIMER="timer",n.INTERACTION="interaction",n.IMMEDIATE="immediate",n.HOVER="hover",n.VIEWPORT="viewport",n.NEVER="never",n})(La||{});function yY({expression:n,sourceSpan:i},e,t){let o=n.indexOf("never"),r=new gn(i.start.moveBy(o),i.start.moveBy(o+5)),a=IE(n,i),c=AE(n,i);o===-1?t.push(new sn(i,'Could not find "never" keyword in expression')):OE("never",e,t,new Jk(r,i,a,null,c))}function Dk({expression:n,sourceSpan:i},e,t,o){let r=n.indexOf("when"),a=new gn(i.start.moveBy(r),i.start.moveBy(r+4)),c=IE(n,i),p=AE(n,i);if(r===-1)o.push(new sn(i,'Could not find "when" keyword in expression'));else{let u=o0(n,r+1),h=e.parseBinding(n.slice(u),!1,i,i.start.offset+u);OE("when",t,o,new g1(h,i,c,a,p))}}function Pk({expression:n,sourceSpan:i},e,t,o,r){let a=n.indexOf("on"),c=new gn(i.start.moveBy(a),i.start.moveBy(a+2)),p=IE(n,i),u=AE(n,i);if(a===-1)o.push(new sn(i,'Could not find "on" keyword in expression'));else{let h=o0(n,a+1),_=n.startsWith("hydrate");new YT(n,e,h,i,t,o,_?PY:DY,_,p,c,u).parse()}}function IE(n,i){return n.startsWith("prefetch")?new gn(i.start,i.start.moveBy(8)):null}function AE(n,i){return n.startsWith("hydrate")?new gn(i.start,i.start.moveBy(7)):null}var YT=class{expression;bindingParser;start;span;triggers;errors;validator;isHydrationTrigger;prefetchSpan;onSourceSpan;hydrateSpan;index=0;tokens;constructor(i,e,t,o,r,a,c,p,u,h,_){this.expression=i,this.bindingParser=e,this.start=t,this.span=o,this.triggers=r,this.errors=a,this.validator=c,this.isHydrationTrigger=p,this.prefetchSpan=u,this.onSourceSpan=h,this.hydrateSpan=_,this.tokens=new e0().tokenize(i.slice(t))}parse(){for(;this.tokens.length>0&&this.index0&&o.isCharacter(e[e.length-1])&&e.pop(),e.length===0&&o.isCharacter(va)&&t.length>0){i.push({expression:this.tokenRangeText(t),start:t[0].index}),this.advance(),t=[];continue}t.push(o),this.advance()}return(!this.token().isCharacter(Cr)||e.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index0)throw new Error(`"${La.IDLE}" trigger cannot have parameters`);return new eT(i,e,t,o,r)}function wY(n,i,e,t,o,r){if(n.length!==1)throw new Error(`"${La.TIMER}" trigger must have exactly one parameter`);let a=Y1(n[0].expression);if(a===null)throw new Error(`Could not parse time value of trigger "${La.TIMER}"`);return new nT(a,i,e,t,o,r)}function MY(n,i,e,t,o,r){if(n.length>0)throw new Error(`"${La.IMMEDIATE}" trigger cannot have parameters`);return new tT(i,e,t,o,r)}function kY(n,i,e,t,o,r,a){return a(La.HOVER,n),new _1(n[0]?.expression??null,i,e,t,o,r)}function TY(n,i,e,t,o,r,a){return a(La.INTERACTION,n),new v1(n[0]?.expression??null,i,e,t,o,r)}function EY(n,i,e,t,o,r,a,c,p,u){u(La.VIEWPORT,t);let h,_;if(t.length===0)h=_=null;else if(!t[0].expression.startsWith("{"))h=t[0].expression,_=null;else{let S=e.parseBinding(t[0].expression,!1,r,r.start.offset+n+t[0].start);if(S.ast instanceof Wp){if(S.ast.keys.some(b=>b.kind==="spread"))throw new Error("Spread operator are not allowed in this context");if(S.ast.keys.some(b=>b.kind==="property"&&b.key==="root"))throw new Error('The "root" option is not supported in the options parameter of the "viewport" trigger')}else throw new Error('Options parameter of the "viewport" trigger must be an object literal');let x=S.ast.keys.findIndex(b=>b.kind==="property"&&b.key==="trigger");if(x===-1)h=null,_=S.ast;else{let b=S.ast.values[x],M=(w,y)=>y!==x;if(!(b instanceof Cc)||!(b.receiver instanceof Mc))throw new Error('"trigger" option of the "viewport" trigger must be an identifier');h=b.name,_=new Wp(S.ast.span,S.ast.sourceSpan,S.ast.keys.filter(M),S.ast.values.filter(M))}}if(i&&h!==null)throw new Error('"viewport" hydration trigger cannot have a "trigger"');if(_){let S=ZT.findDynamicNode(_);if(S!==null)throw new Error(`Options of the "viewport" trigger must be an object literal containing only literal values, but "${S.constructor.name}" was found`)}return new E_(h,_,o,r,a,c,p)}function DY(n,i){if(i.length>1)throw new Error(`"${n}" trigger can only have zero or one parameters`)}function PY(n,i){if(n===La.VIEWPORT){if(i.length>1)throw new Error(`Hydration trigger "${n}" cannot have more than one parameter`);return}if(i.length>0)throw new Error(`Hydration trigger "${n}" cannot have parameters`)}function o0(n,i=0){let e=!1;for(let t=i;t0){let M=i[i.length-1];_=M.endSourceSpan,S=M.sourceSpan.end}let x=new gn(n.sourceSpan.start,S);return{node:new qp(Co(e,n.children,n.children),p,u,h,r,a,c,n.nameSpan,x,n.sourceSpan,n.startSourceSpan,_,n.i18n),errors:o}}function zY(n,i,e){let t=null,o=null,r=null;for(let a of n)try{if(!JT(a.name)){i.push(new sn(a.startSourceSpan,`Unrecognized block "@${a.name}"`));break}switch(a.name){case"placeholder":t!==null?i.push(new sn(a.startSourceSpan,"@defer block can only have one @placeholder block")):t=jY(a,e);break;case"loading":o!==null?i.push(new sn(a.startSourceSpan,"@defer block can only have one @loading block")):o=$Y(a,e);break;case"error":r!==null?i.push(new sn(a.startSourceSpan,"@defer block can only have one @error block")):r=HY(a,e);break}}catch(c){i.push(new sn(a.startSourceSpan,c.message))}return{placeholder:t,loading:o,error:r}}function jY(n,i){let e=null;for(let t of n.parameters)if(r6.test(t.expression)){if(e!=null)throw new Error('@placeholder block can only have one "minimum" parameter');let o=Y1(t.expression.slice(o0(t.expression)));if(o===null)throw new Error('Could not parse time value of parameter "minimum"');e=o}else throw new Error(`Unrecognized parameter in @placeholder block: "${t.expression}"`);return new D_(Co(i,n.children,n.children),e,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function $Y(n,i){let e=null,t=null;for(let o of n.parameters)if(RY.test(o.expression)){if(e!=null)throw new Error('@loading block can only have one "after" parameter');let r=Y1(o.expression.slice(o0(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "after"');e=r}else if(r6.test(o.expression)){if(t!=null)throw new Error('@loading block can only have one "minimum" parameter');let r=Y1(o.expression.slice(o0(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "minimum"');t=r}else throw new Error(`Unrecognized parameter in @loading block: "${o.expression}"`);return new P_(Co(i,n.children,n.children),e,t,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function HY(n,i){if(n.parameters.length>0)throw new Error("@error block cannot have parameters");return new I_(Co(i,n.children,n.children),n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function UY(n,i,e,t){let o={},r={},a={};for(let c of n.parameters)LY.test(c.expression)?Dk(c,i,o,e):VY.test(c.expression)?Pk(c,i,o,e):IY.test(c.expression)?Dk(c,i,r,e):AY.test(c.expression)?Pk(c,i,r,e):OY.test(c.expression)?Dk(c,i,a,e):NY.test(c.expression)?Pk(c,i,a,e):FY.test(c.expression)?yY(c,a,e):e.push(new sn(c.sourceSpan,"Unrecognized trigger"));return a.never&&Object.keys(a).length>1&&e.push(new sn(n.startSourceSpan,"Cannot specify additional `hydrate` triggers if `hydrate never` is present")),{triggers:o,prefetchTriggers:r,hydrateTriggers:a}}var GY=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,kN=1,TN=2,EN=3,DN=4,PN=5,WY=6,Wg=7,Yd={BANANA_BOX:{start:"[(",end:")]"},PROPERTY:{start:"[",end:"]"},EVENT:{start:"(",end:")"}},Ik="*",qY=new Set(["link","style","script","ng-template","ng-container","ng-content"]),QY=new Set(["ngProjectAs","ngNonBindable"]);function XY(n,i,e){let t=new eE(i,e),o=Co(t,n,n),r=i.errors.concat(t.errors),a={nodes:o,errors:r,styleUrls:t.styleUrls,styles:t.styles,ngContentSelectors:t.ngContentSelectors};return e.collectCommentNodes&&(a.commentNodes=t.commentNodes),a}var eE=class{bindingParser;options;errors=[];styles=[];styleUrls=[];ngContentSelectors=[];commentNodes=[];inI18nBlock=!1;processedNodes=new Set;constructor(i,e){this.bindingParser=i,this.options=e}visitElement(i){let e=WC(i.i18n);e&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0);let t=o6(i);if(t.type===ws.SCRIPT)return null;if(t.type===ws.STYLE){let y=KY(i);return y!==null&&this.styles.push(y),null}else if(t.type===ws.STYLESHEET&&QK(t.hrefAttr))return this.styleUrls.push(t.hrefAttr),null;let o=Z$(i.name),{attributes:r,boundEvents:a,references:c,variables:p,templateVariables:u,elementHasInlineTemplate:h,parsedProperties:_,templateParsedProperties:S,i18nAttrsMeta:x}=this.prepareAttributes(i.attrs,o),b=this.extractDirectives(i),M;t.nonBindable?M=Co(IN,i.children).flat(1/0):M=Co(this,i.children,i.children);let w;if(t.type===ws.NG_CONTENT){let y=t.selectAttr,E=i.attrs.map(I=>this.visitAttribute(I));w=new Dh(y,E,M,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n),this.ngContentSelectors.push(y)}else if(o){let y=this.categorizePropertyAttributes(i.name,_,x);w=new ks(i.name,r,y.bound,a,b,[],M,c,p,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n)}else{let y=this.categorizePropertyAttributes(i.name,_,x);if(i.name==="ng-container")for(let E of y.bound)E.type===Ti.Attribute&&this.reportError("Attribute bindings are not supported on ng-container. Use property bindings instead.",E.sourceSpan);w=new kc(i.name,r,y.bound,a,b,M,c,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n)}return h&&(w=this.wrapInTemplate(w,S,u,x,o,e)),e&&(this.inI18nBlock=!1),w}visitAttribute(i){return new Th(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return this.processedNodes.has(i)?null:this._visitTextWithInterpolation(i.value,i.sourceSpan,i.tokens,i.i18n)}visitExpansion(i){if(!i.i18n)return null;if(!WC(i.i18n))throw new Error(`Invalid type "${i.i18n.constructor}" for "i18n" property of ${i.sourceSpan.toString()}. Expected a "Message"`);let e=i.i18n,t={},o={};return Object.keys(e.placeholders).forEach(r=>{let a=e.placeholders[r];if(r.startsWith(nH)){let c=r.trim(),p=this.bindingParser.parseInterpolationExpression(a.text,a.sourceSpan);t[c]=new kh(p,a.sourceSpan)}else o[r]=this._visitTextWithInterpolation(a.text,a.sourceSpan,null)}),new XN(t,o,i.sourceSpan,e)}visitExpansionCase(i){return null}visitComment(i){return this.options.collectCommentNodes&&this.commentNodes.push(new ib(i.value||"",i.sourceSpan)),null}visitLetDeclaration(i,e){let t=this.bindingParser.parseBinding(i.value,!1,i.valueSpan,i.valueSpan.start.offset);return t.errors.length===0&&t.ast instanceof _a&&this.reportError("@let declaration value cannot be empty",i.valueSpan),new gE(i.name,t,i.sourceSpan,i.nameSpan,i.valueSpan)}visitComponent(i){let e=WC(i.i18n);if(e&&(this.inI18nBlock&&this.reportError("Cannot mark a component as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0),i.tagName!==null&&qY.has(i.tagName))return this.reportError(`Tag name "${i.tagName}" cannot be used as a component tag`,i.startSourceSpan),null;let{attributes:t,boundEvents:o,references:r,templateVariables:a,elementHasInlineTemplate:c,parsedProperties:p,templateParsedProperties:u,i18nAttrsMeta:h}=this.prepareAttributes(i.attrs,!1);this.validateSelectorlessReferences(r);let _=this.extractDirectives(i),S;i.attrs.find(M=>M.name==="ngNonBindable")?S=Co(IN,i.children).flat(1/0):S=Co(this,i.children,i.children);let x=this.categorizePropertyAttributes(i.tagName,p,h),b=new e_(i.componentName,i.tagName,i.fullName,t,x.bound,o,_,S,r,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return c&&(b=this.wrapInTemplate(b,u,a,h,!1,e)),e&&(this.inI18nBlock=!1),b}visitDirective(){return null}visitBlockParameter(){return null}visitBlock(i,e){let t=Array.isArray(e)?e.indexOf(i):-1;if(t===-1)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(i))return null;let o=null;switch(i.name){case"defer":o=BY(i,this.findConnectedBlocks(t,e,JT),this,this.bindingParser);break;case"switch":o=uY(i,this,this.bindingParser);break;case"for":o=pY(i,this.findConnectedBlocks(t,e,yN),this,this.bindingParser);break;case"if":o=mY(i,this.findConnectedBlocks(t,e,SN),this,this.bindingParser);break;default:let r;JT(i.name)?(r=`@${i.name} block can only be used after an @defer block.`,this.processedNodes.add(i)):yN(i.name)?(r=`@${i.name} block can only be used after an @for block.`,this.processedNodes.add(i)):SN(i.name)?(r=`@${i.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(i)):r=`Unrecognized block @${i.name}.`,o={node:new x1(i.name,i.sourceSpan,i.nameSpan),errors:[new sn(i.sourceSpan,r)]};break}return this.errors.push(...o.errors),o.node}findConnectedBlocks(i,e,t){let o=[];for(let r=i+1;r{let c=t[a.name];if(a.isLiteral)r.push(new Th(a.name,a.expression.source||"",a.sourceSpan,a.keySpan,a.valueSpan,c));else{let p=this.bindingParser.createBoundElementProperty(i,a,!0,!1);o.push(Yk.fromBoundElementProperty(p,c))}}),{bound:o,literal:r}}prepareAttributes(i,e){let t=[],o=[],r=[],a=[],c=[],p={},u=[],h=[],_=!1;for(let S of i){let x=!1,b=AN(S.name),M=!1;if(S.i18n&&(p[S.name]=S.i18n),b.startsWith(Ik)){_&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",S.sourceSpan),M=!0,_=!0;let w=S.value,y=b.substring(Ik.length),E=[],I=S.valueSpan?S.valueSpan.fullStart.offset:S.sourceSpan.fullStart.offset+S.name.length;this.bindingParser.parseInlineTemplateBinding(y,w,S.sourceSpan,I,[],u,E,!0),h.push(...E.map(D=>new sm(D.name,D.value,D.sourceSpan,D.keySpan,D.valueSpan)))}else x=this.parseAttribute(e,S,[],t,o,r,a);!x&&!M&&c.push(this.visitAttribute(S))}return{attributes:c,boundEvents:o,references:a,variables:r,templateVariables:h,elementHasInlineTemplate:_,parsedProperties:t,templateParsedProperties:u,i18nAttrsMeta:p}}parseAttribute(i,e,t,o,r,a,c){let p=AN(e.name),u=e.value,h=e.sourceSpan,_=e.valueSpan?e.valueSpan.fullStart.offset:h.fullStart.offset;function S(y,E,I){let D=e.name.length-p.length,N=y.start.moveBy(E.length+D),P=N.moveBy(I.length);return new gn(N,P,N,I)}let x=p.match(GY);if(x){if(x[kN]!=null){let y=x[Wg],E=S(h,x[kN],y);this.bindingParser.parsePropertyBinding(y,u,!1,!1,h,_,e.valueSpan,t,o,E)}else if(x[TN])if(i){let y=x[Wg],E=S(h,x[TN],y);this.parseVariable(y,u,h,E,e.valueSpan,a)}else this.reportError('"let-" is only supported on ng-template elements.',h);else if(x[EN]){let y=x[Wg],E=S(h,x[EN],y);this.parseReference(y,u,h,E,e.valueSpan,c)}else if(x[DN]){let y=[],E=x[Wg],I=S(h,x[DN],E);this.bindingParser.parseEvent(E,u,!1,h,e.valueSpan||h,t,y,I),Ak(y,r)}else if(x[PN]){let y=x[Wg],E=S(h,x[PN],y);this.bindingParser.parsePropertyBinding(y,u,!1,!0,h,_,e.valueSpan,t,o,E),this.parseAssignmentEvent(y,u,h,e.valueSpan,t,r,E,_)}else if(x[WY]){let y=S(h,"",p);this.bindingParser.parseLiteralAttr(p,u,h,_,e.valueSpan,t,o,y)}return!0}let b=null;if(p.startsWith(Yd.BANANA_BOX.start)?b=Yd.BANANA_BOX:p.startsWith(Yd.PROPERTY.start)?b=Yd.PROPERTY:p.startsWith(Yd.EVENT.start)&&(b=Yd.EVENT),b!==null&&p.endsWith(b.end)&&p.length>b.start.length+b.end.length){let y=p.substring(b.start.length,p.length-b.end.length),E=S(h,b.start,y);if(b.start===Yd.BANANA_BOX.start)this.bindingParser.parsePropertyBinding(y,u,!1,!0,h,_,e.valueSpan,t,o,E),this.parseAssignmentEvent(y,u,h,e.valueSpan,t,r,E,_);else if(b.start===Yd.PROPERTY.start)this.bindingParser.parsePropertyBinding(y,u,!1,!1,h,_,e.valueSpan,t,o,E);else{let I=[];this.bindingParser.parseEvent(y,u,!1,h,e.valueSpan||h,t,I,E),Ak(I,r)}return!0}let M=S(h,"",p);return this.bindingParser.parsePropertyInterpolation(p,u,h,e.valueSpan,t,o,M,e.valueTokens??null)}extractDirectives(i){let e=i instanceof Fa?i.tagName:i.name,t=[],o=new Set;for(let r of i.directives){let a=!1;for(let x of r.attrs)x.name.startsWith(Ik)?(a=!0,this.reportError(`Shorthand template syntax "${x.name}" is not supported inside a directive context`,x.sourceSpan)):QY.has(x.name)&&(a=!0,this.reportError(`Attribute "${x.name}" is not supported in a directive context`,x.sourceSpan));if(!a&&o.has(r.name)&&(a=!0,this.reportError(`Cannot apply directive "${r.name}" multiple times on the same element`,r.sourceSpan)),a)continue;let{attributes:c,parsedProperties:p,boundEvents:u,references:h,i18nAttrsMeta:_}=this.prepareAttributes(r.attrs,!1);this.validateSelectorlessReferences(h);let{bound:S}=this.categorizePropertyAttributes(e,p,_);for(let x of S)x.type!==Ti.Property&&x.type!==Ti.TwoWay&&(a=!0,this.reportError("Binding is not supported in a directive context",x.sourceSpan));a||(o.add(r.name),t.push(new QN(r.name,c,S,u,h,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,void 0)))}return t}filterAnimationAttributes(i){return i.filter(e=>!e.name.startsWith("animate."))}filterAnimationInputs(i){return i.filter(e=>e.type!==Ti.Animation)}wrapInTemplate(i,e,t,o,r,a){let c=this.categorizePropertyAttributes("ng-template",e,o),p=[];c.literal.forEach(S=>p.push(S)),c.bound.forEach(S=>p.push(S));let u={attributes:[],inputs:[],outputs:[]};(i instanceof kc||i instanceof e_)&&(u.attributes.push(...this.filterAnimationAttributes(i.attributes)),u.inputs.push(...this.filterAnimationInputs(i.inputs)),u.outputs.push(...i.outputs));let h=r&&a?void 0:i.i18n,_;return i instanceof e_?_=i.tagName:i instanceof ks?_=null:_=i.name,new ks(_,u.attributes,u.inputs,u.outputs,[],p,[i],[],t,!1,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,h)}_visitTextWithInterpolation(i,e,t,o){let r=RF(i),a=this.bindingParser.parseInterpolation(r,e,t);return a?new kh(a,e,o):new Dp(r,e)}parseVariable(i,e,t,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',t):i.length===0&&this.reportError("Variable does not have a name",t),a.push(new sm(i,e,t,o,r))}parseReference(i,e,t,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',t):i.length===0?this.reportError("Reference does not have a name",t):a.some(c=>c.name===i)&&this.reportError(`Reference "#${i}" is defined more than once`,t),a.push(new N_(i,e,t,o,r))}parseAssignmentEvent(i,e,t,o,r,a,c,p){let u=[];this.bindingParser.parseEvent(`${i}Change`,e,!0,t,o||t,r,u,c),Ak(u,a)}validateSelectorlessReferences(i){if(i.length===0)return;let e=new Set;for(let t of i)t.value.length>0?this.reportError("Cannot specify a value for a local reference in this context",t.valueSpan||t.sourceSpan):e.has(t.name)?this.reportError("Duplicate reference names are not allowed",t.sourceSpan):e.add(t.name)}reportError(i,e,t=nm.ERROR){this.errors.push(new sn(e,i,t))}},tE=class{visitElement(i){let e=o6(i);if(e.type===ws.SCRIPT||e.type===ws.STYLE||e.type===ws.STYLESHEET)return null;let t=Co(this,i.children,null);return new kc(i.name,Co(this,i.attrs),[],[],[],t,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid)}visitComment(i){return null}visitAttribute(i){return new Th(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return new Dp(i.value,i.sourceSpan)}visitExpansion(i){return null}visitExpansionCase(i){return null}visitBlock(i,e){let t=[new Dp(i.startSourceSpan.toString(),i.startSourceSpan),...Co(this,i.children)];return i.endSourceSpan!==null&&t.push(new Dp(i.endSourceSpan.toString(),i.endSourceSpan)),t}visitBlockParameter(i,e){return null}visitLetDeclaration(i,e){return new Dp(`@let ${i.name} = ${i.value};`,i.sourceSpan)}visitComponent(i,e){let t=Co(this,i.children,null);return new kc(i.fullName,Co(this,i.attrs),[],[],[],t,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,!1)}visitDirective(i,e){return null}},IN=new tE;function AN(n){return/^data-/i.test(n)?n.substring(5):n}function Ak(n,i){i.push(...n.map(e=>Zk.fromParsedEvent(e)))}function KY(n){return n.children.length!==1||!(n.children[0]instanceof Jp)?null:n.children[0].value}var YY=[" ",` `,"\r"," "];function ZY(n,i,e={}){let{preserveWhitespaces:t,enableI18nLegacyMessageIdFormat:o}=e,r=e.enableSelectorless??!1,a=Z1(r),p=new WT().parse(n,i,it(K({leadingTriviaChars:YY},e),{tokenizeExpansionForms:!0,tokenizeBlocks:e.enableBlockSyntax??!0,tokenizeLet:e.enableLetSyntax??!0,selectorlessEnabled:r}));if(!e.alwaysAttemptHtmlToR3AstConversion&&p.errors&&p.errors.length>0){let D={preserveWhitespaces:t,errors:p.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}let u=p.rootNodes,h=!(e.preserveSignificantWhitespace??!0),_=new W1(!t,o,e.preserveSignificantWhitespace,h),S=_.visitAllWithErrors(u);if(!e.alwaysAttemptHtmlToR3AstConversion&&S.errors&&S.errors.length>0){let D={preserveWhitespaces:t,errors:S.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}u=S.rootNodes,t||(u=Co(new U1(!0,void 0,!1),u),_.hasI18nMeta&&(u=Co(new W1(!1,void 0,!0,h),u)));let{nodes:x,errors:b,styleUrls:M,styles:w,ngContentSelectors:y,commentNodes:E}=XY(u,a,{collectCommentNodes:!!e.collectCommentNodes});b.push(...p.errors,...S.errors);let I={preserveWhitespaces:t,errors:b.length>0?b:null,nodes:x,styleUrls:M,styles:w,ngContentSelectors:y};return e.collectCommentNodes&&(I.commentNodes=E),I}var JY=new Rh;function Z1(n=!1){return new qT(new G1(new e0,n),JY,[])}var a6="%COMP%",eZ=`_nghost-${a6}`,tZ=`_ngcontent-${a6}`;function s6(n,i,e){let t=new dm,o=pE(n.selector);return t.set("type",n.type.value),o.length>0&&t.set("selectors",mh(o)),n.queries.length>0&&t.set("contentQueries",HK(n.queries,i,n.name)),n.viewQueries.length&&t.set("viewQuery",$K(n.viewQueries,i,n.name)),t.set("hostBindings",cZ(n.host,n.typeSourceSpan,e,i,n.selector||"",n.name,t)),t.set("inputs",s5(n.inputs,!0)),t.set("outputs",s5(n.outputs)),n.exportAs!==null&&t.set("exportAs",Gi(n.exportAs.map(r=>Te(r)))),n.isStandalone===!1&&t.set("standalone",Te(!1)),n.isSignal&&t.set("signals",Te(!0)),t}function l6(n,i){let e=[],t=i.providers,o=i.viewProviders;if(t||o){let r=[t||new wc([])];o&&r.push(o),e.push(Ut(fe.ProvidersFeature).callFn(r))}if(i.hostDirectives?.length&&e.push(Ut(fe.HostDirectivesFeature).callFn([hZ(i.hostDirectives)])),i.usesInheritance&&e.push(Ut(fe.InheritDefinitionFeature)),i.lifecycle.usesOnChanges&&e.push(Ut(fe.NgOnChangesFeature)),i.controlCreate!==null&&e.push(Ut(fe.ControlFeature).callFn([Te(i.controlCreate.passThroughInput)])),"externalStyles"in i&&i.externalStyles?.length){let r=i.externalStyles.map(a=>Te(a));e.push(Ut(fe.ExternalStylesFeature).callFn([Gi(r)]))}e.length&&n.set("features",Gi(e))}function nZ(n,i,e){let t=s6(n,i,e);l6(t,n);let o=Ut(fe.defineDirective).callFn([t.toLiteralMap()],void 0,!0),r=lZ(n);return{expression:o,type:r,statements:[]}}function iZ(n,i,e){let t=s6(n,i,e);l6(t,n);let o=n.selector&&vh.parse(n.selector),r=o&&o[0];if(r){let b=r.getAttrs();b.length&&t.set("attrs",i.getConstLiteral(Gi(b.map(M=>M!=null?Te(M):Te(void 0))),!0))}let a=n.name,c=null;if(n.defer.mode===1&&n.defer.dependenciesFn!==null){let b=`${a}_DeferFn`;i.statements.push(new Rr(b,n.defer.dependenciesFn,void 0,oa.Final)),c=Yn(b)}let p=n.isStandalone&&!n.hasDirectiveDependencies?Za.DomOnly:Za.Full,u=_K(n.name,n.template.nodes,i,p,n.relativeContextFilePath,n.i18nUseExternalIds,n.defer,c,n.relativeTemplatePath,BK());QF(u,Et.Tmpl);let h=uK(u,i);if(u.contentSelectors!==null&&t.set("ngContentSelectors",u.contentSelectors),t.set("decls",Te(u.root.decls)),t.set("vars",Te(u.root.vars)),u.consts.length>0&&(u.constsInitializers.length>0?t.set("consts",Ds([],[...u.constsInitializers,new xr(Gi(u.consts))])):t.set("consts",Gi(u.consts))),t.set("template",h),n.declarationListEmitMode!==3&&n.declarations.length>0)t.set("dependencies",rZ(Gi(n.declarations.map(b=>b.type)),n.declarationListEmitMode));else if(n.declarationListEmitMode===3){let b=[n.type.value];n.rawImports&&b.push(n.rawImports),t.set("dependencies",Ut(fe.getComponentDepsFactory).callFn(b))}n.encapsulation===null&&(n.encapsulation=Sp.Emulated);let _=!!n.externalStyles?.length;if(n.styles&&n.styles.length){let M=(n.encapsulation==Sp.Emulated?uZ(n.styles,tZ,eZ):n.styles).reduce((w,y)=>(y.trim().length>0&&w.push(i.getConstLiteral(Te(y))),w),[]);M.length>0&&(_=!0,t.set("styles",Gi(M)))}!_&&n.encapsulation===Sp.Emulated&&(n.encapsulation=Sp.None),n.encapsulation!==Sp.Emulated&&t.set("encapsulation",Te(n.encapsulation)),n.animations!==null&&t.set("data",nl([{key:"animation",value:n.animations,quoted:!1}])),n.changeDetection!==null&&(typeof n.changeDetection=="number"&&n.changeDetection!==mE.Default?t.set("changeDetection",Te(n.changeDetection)):typeof n.changeDetection=="object"&&t.set("changeDetection",n.changeDetection));let S=Ut(fe.defineComponent).callFn([t.toLiteralMap()],void 0,!0),x=oZ(n);return{expression:S,type:x,statements:[]}}function oZ(n){let i=c6(n);return i.push(iE(n.template.ngContentSelectors)),i.push(ra(Te(n.isStandalone))),i.push(d6(n)),n.isSignal&&i.push(ra(Te(n.isSignal))),ra(Ut(fe.ComponentDeclaration,i))}function rZ(n,i){switch(i){case 0:return n;case 1:return Ds([],n);case 2:let e=n.prop("map").callFn([Ut(fe.resolveForwardRef)]);return Ds([],e);case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}function aZ(n){return ra(Te(n))}function nE(n){let i=Object.keys(n).map(e=>{let t=Array.isArray(n[e])?n[e][0]:n[e];return{key:e,value:Te(t),quoted:!0}});return nl(i)}function iE(n){return n.length>0?ra(Gi(n.map(i=>Te(i)))):yc}function c6(n){let i=n.selector!==null?n.selector.replace(/\n/g,""):null;return[nb(n.type.type,n.typeArgumentCount),i!==null?aZ(i):yc,n.exportAs!==null?iE(n.exportAs):yc,ra(sZ(n)),ra(nE(n.outputs)),iE(n.queries.map(e=>e.propertyName))]}function sZ(n){return nl(Object.keys(n.inputs).map(i=>{let e=n.inputs[i],t=[{key:"alias",value:Te(e.bindingPropertyName),quoted:!0},{key:"required",value:Te(e.required),quoted:!0}];return e.isSignal&&t.push({key:"isSignal",value:Te(e.isSignal),quoted:!0}),{key:i,value:nl(t),quoted:!0}}))}function lZ(n){let i=c6(n);return i.push(yc),i.push(ra(Te(n.isStandalone))),i.push(d6(n)),n.isSignal&&i.push(ra(Te(n.isSignal))),ra(Ut(fe.DirectiveDeclaration,i))}function cZ(n,i,e,t,o,r,a){let c=e.createBoundHostProperties(n.properties,i),p=e.createDirectiveHostEventAsts(n.listeners,i);n.specialAttributes.styleAttr&&(n.attributes.style=Te(n.specialAttributes.styleAttr)),n.specialAttributes.classAttr&&(n.attributes.class=Te(n.specialAttributes.classAttr));let u=vK({componentName:r,componentSelector:o,properties:c,events:p,attributes:n.attributes},e,t);QF(u,Et.Host),a.set("hostAttrs",u.root.attributes);let h=u.root.vars;return h!==null&&h>0&&a.set("hostVars",Te(h)),hK(u)}var dZ=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;function mZ(n){let i={},e={},t={},o={};for(let r of Object.keys(n)){let a=n[r],c=r.match(dZ);if(c===null)switch(r){case"class":if(typeof a!="string")throw new Error("Class binding must be string");o.classAttr=a;break;case"style":if(typeof a!="string")throw new Error("Style binding must be string");o.styleAttr=a;break;default:typeof a=="string"?i[r]=Te(a):i[r]=a}else if(c[1]!=null){if(typeof a!="string")throw new Error("Property binding must be string");t[c[1]]=a}else if(c[2]!=null){if(typeof a!="string")throw new Error("Event binding must be string");e[c[2]]=a}}return{attributes:i,listeners:e,properties:t,specialAttributes:o}}function pZ(n,i){let e=Z1();return e.createDirectiveHostEventAsts(n.listeners,i),e.createBoundHostProperties(n.properties,i),e.errors}function uZ(n,i,e){let t=new uT;return n.map(o=>t.shimCssText(o,i,e))}function d6(n){return n.hostDirectives?.length?ra(Gi(n.hostDirectives.map(i=>nl([{key:"directive",value:r0(i.directive.type),quoted:!1},{key:"inputs",value:nE(i.inputs||{}),quoted:!1},{key:"outputs",value:nE(i.outputs||{}),quoted:!1}])))):yc}function hZ(n){let i=[],e=!1;for(let t of n){if(!t.inputs&&!t.outputs)i.push(t.directive.type);else{let o=[{key:"directive",value:t.directive.type,quoted:!1}];if(t.inputs){let r=ON(t.inputs);r&&o.push({key:"inputs",value:r,quoted:!1})}if(t.outputs){let r=ON(t.outputs);r&&o.push({key:"outputs",value:r,quoted:!1})}i.push(nl(o))}t.isForwardReference&&(e=!0)}return e?new om([],[new xr(Gi(i))]):Gi(i)}function ON(n){let i=[];for(let e in n)n.hasOwnProperty(e)&&i.push(Te(e),Te(n[e]));return i.length>0?Gi(i):null}var oE=class extends Mh{visit(i){i instanceof ts?this.visit(i.ast):i.visit(this)}visitElement(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitTemplate(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.templateAttrs),this.visitAllTemplateNodes(i.variables),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitContent(i){this.visitAllTemplateNodes(i.children)}visitBoundAttribute(i){this.visit(i.value)}visitBoundEvent(i){this.visit(i.handler)}visitBoundText(i){this.visit(i.value)}visitIcu(i){Object.keys(i.vars).forEach(e=>this.visit(i.vars[e])),Object.keys(i.placeholders).forEach(e=>this.visit(i.placeholders[e]))}visitDeferredBlock(i){i.visitAll(this)}visitDeferredTrigger(i){i instanceof g1?this.visit(i.value):i instanceof E_&&i.options!==null&&this.visit(i.options)}visitDeferredBlockPlaceholder(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockError(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockLoading(i){this.visitAllTemplateNodes(i.children)}visitSwitchBlock(i){this.visit(i.expression),this.visitAllTemplateNodes(i.groups)}visitSwitchBlockCase(i){i.expression&&this.visit(i.expression)}visitSwitchBlockCaseGroup(i){this.visitAllTemplateNodes(i.cases),this.visitAllTemplateNodes(i.children)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),this.visitAllTemplateNodes(i.contextVariables),this.visit(i.expression),this.visitAllTemplateNodes(i.children),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.visitAllTemplateNodes(i.children)}visitIfBlock(i){this.visitAllTemplateNodes(i.branches)}visitIfBlockBranch(i){i.expression&&this.visit(i.expression),i.expressionAlias?.visit(this),this.visitAllTemplateNodes(i.children)}visitLetDeclaration(i){this.visit(i.value)}visitComponent(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitDirective(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.references)}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitText(i){}visitUnknownBlock(i){}visitAllTemplateNodes(i){for(let e of i)this.visit(e)}};var rE=class{directiveMatcher;constructor(i){this.directiveMatcher=i}bind(i){if(!i.template&&!i.host)throw new Error("Empty bound targets are not supported");let e=new Map,t=[],o=new Set,r=new Map,a=new Map,c=new Map,p=new Map,u=new Map,h=new Map,_=new Set,S=new Set,x=[];if(i.template){let b=J1.apply(i.template);fZ(b,c),aE.apply(i.template,this.directiveMatcher,e,t,o,r,a),eb.applyWithScope(i.template,b,p,u,h,_,S,x)}return i.host&&(e.set(i.host.node,i.host.directives),eb.applyWithScope(i.host.node,J1.apply(i.host.node),p,u,h,_,S,x)),new sE(i,e,t,o,r,a,p,u,h,c,_,S,x)}},J1=class n{parentScope;rootNode;namedEntities=new Map;elementLikeInScope=new Set;childScopes=new Map;isDeferred;constructor(i,e){this.parentScope=i,this.rootNode=e,this.isDeferred=i!==null&&i.isDeferred?!0:e instanceof qp}static newRootScope(){return new n(null,null)}static apply(i){let e=n.newRootScope();return e.ingest(i),e}ingest(i){i instanceof ks?(i.variables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof Ap?(i.expressionAlias!==null&&this.visitVariable(i.expressionAlias),i.children.forEach(e=>e.visit(this))):i instanceof Eh?(this.visitVariable(i.item),i.contextVariables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof A_||i instanceof O_||i instanceof qp||i instanceof I_||i instanceof D_||i instanceof P_||i instanceof Dh?i.children.forEach(e=>e.visit(this)):i instanceof F_||i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementLike(i)}visitTemplate(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),this.ingestScopedNode(i)}visitVariable(i){this.maybeDeclare(i)}visitReference(i){this.maybeDeclare(i)}visitDeferredBlock(i){this.ingestScopedNode(i),i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){this.maybeDeclare(i)}visitComponent(i){this.visitElementLike(i)}visitDirective(i){i.references.forEach(e=>this.visitReference(e))}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundText(i){}visitText(i){}visitTextAttribute(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitElementLike(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),i.children.forEach(e=>e.visit(this)),this.elementLikeInScope.add(i)}maybeDeclare(i){this.namedEntities.has(i.name)||this.namedEntities.set(i.name,i)}lookup(i){return this.namedEntities.has(i)?this.namedEntities.get(i):this.parentScope!==null?this.parentScope.lookup(i):null}getChildScope(i){let e=this.childScopes.get(i);if(e===void 0)throw new Error(`Assertion error: child scope for ${i} not found`);return e}ingestScopedNode(i){let e=new n(this,i);e.ingest(i),this.childScopes.set(i,e)}},aE=class n{directiveMatcher;directives;eagerDirectives;missingDirectives;bindings;references;isInDeferBlock=!1;constructor(i,e,t,o,r,a){this.directiveMatcher=i,this.directives=e,this.eagerDirectives=t,this.missingDirectives=o,this.bindings=r,this.references=a}static apply(i,e,t,o,r,a,c){new n(e,t,o,r,a,c).ingest(i)}ingest(i){i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementOrTemplate(i)}visitTemplate(i){this.visitElementOrTemplate(i)}visitDeferredBlock(i){let e=this.isInDeferBlock;this.isInDeferBlock=!0,i.children.forEach(t=>t.visit(this)),this.isInDeferBlock=e,i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockError(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockLoading(i){i.children.forEach(e=>e.visit(this))}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){i.children.forEach(e=>e.visit(this))}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),i.contextVariables.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this)),i.empty?.visit(this)}visitForLoopBlockEmpty(i){i.children.forEach(e=>e.visit(this))}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){i.expressionAlias?.visit(this),i.children.forEach(e=>e.visit(this))}visitContent(i){i.children.forEach(e=>e.visit(this))}visitComponent(i){if(this.directiveMatcher instanceof QC){let e=this.directiveMatcher.match(i.componentName);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.componentName)}i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}visitDirective(i){if(this.directiveMatcher instanceof QC){let e=this.directiveMatcher.match(i.name);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.name)}}visitElementOrTemplate(i){if(this.directiveMatcher instanceof qC){let e=[],t=rH(i);this.directiveMatcher.match(t,(o,r)=>e.push(...r)),this.trackSelectorBasedBindingsAndDirectives(i,e)}else i.references.forEach(e=>{e.value.trim()===""&&this.references.set(e,i)});i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}trackMatchedDirectives(i,e){e.length>0&&(this.directives.set(i,e),this.isInDeferBlock||this.eagerDirectives.push(...e))}trackSelectorlessMatchesAndDirectives(i,e){if(e.length===0)return;this.trackMatchedDirectives(i,e);let t=(o,r,a)=>{o[a].hasBindingPropertyName(r.name)&&this.bindings.set(r,o)};for(let o of e)i.inputs.forEach(r=>t(o,r,"inputs")),i.attributes.forEach(r=>t(o,r,"inputs")),i.outputs.forEach(r=>t(o,r,"outputs"));i.references.forEach(o=>this.references.set(o,{directive:e[0],node:i}))}trackSelectorBasedBindingsAndDirectives(i,e){this.trackMatchedDirectives(i,e),i.references.forEach(o=>{let r=null;if(o.value.trim()==="")r=e.find(a=>a.isComponent)||null;else if(r=e.find(a=>a.exportAs!==null&&a.exportAs.some(c=>c===o.value))||null,r===null)return;r!==null?this.references.set(o,{directive:r,node:i}):this.references.set(o,i)});let t=(o,r)=>{let a=e.find(p=>p[r].hasBindingPropertyName(o.name)),c=a!==void 0?a:i;this.bindings.set(o,c)};i.inputs.forEach(o=>t(o,"inputs")),i.attributes.forEach(o=>t(o,"inputs")),i instanceof ks&&i.templateAttrs.forEach(o=>t(o,"inputs")),i.outputs.forEach(o=>t(o,"outputs"))}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundAttributeOrEvent(i){}visitText(i){}visitBoundText(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitLetDeclaration(i){}},eb=class n extends oE{bindings;symbols;usedPipes;eagerPipes;deferBlocks;nestingLevel;scope;rootNode;level;visitNode=i=>i.visit(this);constructor(i,e,t,o,r,a,c,p,u){super(),this.bindings=i,this.symbols=e,this.usedPipes=t,this.eagerPipes=o,this.deferBlocks=r,this.nestingLevel=a,this.scope=c,this.rootNode=p,this.level=u}static applyWithScope(i,e,t,o,r,a,c,p){let u=i instanceof ks?i:null;new n(t,o,a,c,p,r,e,u,0).ingest(i)}ingest(i){if(i instanceof ks)i.variables.forEach(this.visitNode),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof Ap)i.expressionAlias!==null&&this.visitNode(i.expressionAlias),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof Eh)this.visitNode(i.item),i.contextVariables.forEach(e=>this.visitNode(e)),i.trackBy.visit(this),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof qp){if(this.scope.rootNode!==i)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${i}`);this.deferBlocks.push([i,this.scope]),i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)}else i instanceof A_||i instanceof O_||i instanceof I_||i instanceof D_||i instanceof P_||i instanceof Dh?(i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)):i instanceof F_?this.nestingLevel.set(i,0):i.forEach(this.visitNode)}visitTemplate(i){i.inputs.forEach(this.visitNode),i.outputs.forEach(this.visitNode),i.directives.forEach(this.visitNode),i.templateAttrs.forEach(this.visitNode),i.references.forEach(this.visitNode),this.ingestScopedNode(i)}visitVariable(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitReference(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitDeferredBlock(i){this.ingestScopedNode(i),i.triggers.when?.value.visit(this),i.prefetchTriggers.when?.value.visit(this),i.hydrateTriggers.when?.value.visit(this),i.hydrateTriggers.never?.visit(this),i.placeholder&&this.visitNode(i.placeholder),i.loading&&this.visitNode(i.loading),i.error&&this.visitNode(i.error)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlockCase(i){i.expression?.visit(this)}visitSwitchBlockCaseGroup(i){i.cases.forEach(e=>e.visit(this)),this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.expression.visit(this),this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlockBranch(i){i.expression?.visit(this),this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){super.visitLetDeclaration(i),this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitPipe(i,e){return this.usedPipes.add(i.name),this.scope.isDeferred||this.eagerPipes.add(i.name),super.visitPipe(i,e)}visitPropertyRead(i,e){return this.maybeMap(i,i.name),super.visitPropertyRead(i,e)}visitSafePropertyRead(i,e){return this.maybeMap(i,i.name),super.visitSafePropertyRead(i,e)}ingestScopedNode(i){let e=this.scope.getChildScope(i);new n(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,e,i,this.level+1).ingest(i)}maybeMap(i,e){if(!(i.receiver instanceof Mc))return;let t=this.scope.lookup(e);t!==null&&this.bindings.set(i,t)}},sE=class{target;directives;eagerDirectives;missingDirectives;bindings;references;exprTargets;symbols;nestingLevel;scopedNodeEntities;usedPipes;eagerPipes;deferredBlocks;deferredScopes;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x){this.target=i,this.directives=e,this.eagerDirectives=t,this.missingDirectives=o,this.bindings=r,this.references=a,this.exprTargets=c,this.symbols=p,this.nestingLevel=u,this.scopedNodeEntities=h,this.usedPipes=_,this.eagerPipes=S,this.deferredBlocks=x.map(b=>b[0]),this.deferredScopes=new Map(x)}getEntitiesInScope(i){return this.scopedNodeEntities.get(i)??new Set}getDirectivesOfNode(i){return this.directives.get(i)||null}getReferenceTarget(i){return this.references.get(i)||null}getConsumerOfBinding(i){return this.bindings.get(i)||null}getExpressionTarget(i){return this.exprTargets.get(i)||null}getDefinitionNodeOfSymbol(i){return this.symbols.get(i)||null}getNestingLevel(i){return this.nestingLevel.get(i)||0}getUsedDirectives(){let i=new Set;return this.directives.forEach(e=>e.forEach(t=>i.add(t))),Array.from(i.values())}getEagerlyUsedDirectives(){let i=new Set(this.eagerDirectives);return Array.from(i.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(i,e){if(!(e instanceof v1)&&!(e instanceof E_)&&!(e instanceof _1))return null;let t=e.reference;if(t===null){let r=null;if(i.placeholder!==null){for(let a of i.placeholder.children)if(!(a instanceof ib)){if(r!==null)return null;a instanceof kc&&(r=a)}}return r}let o=this.findEntityInScope(i,t);if(o instanceof N_&&this.getDefinitionNodeOfSymbol(o)!==i){let r=this.getReferenceTarget(o);if(r!==null)return this.referenceTargetToElement(r)}if(i.placeholder!==null){let r=this.findEntityInScope(i.placeholder,t),a=r instanceof N_?this.getReferenceTarget(r):null;if(a!==null)return this.referenceTargetToElement(a)}return null}isDeferred(i){for(let e of this.deferredBlocks){if(!this.deferredScopes.has(e))continue;let t=[this.deferredScopes.get(e)];for(;t.length>0;){let o=t.pop();if(o.elementLikeInScope.has(i))return!0;t.push(...o.childScopes.values())}}return!1}referencedDirectiveExists(i){return!this.missingDirectives.has(i)}findEntityInScope(i,e){let t=this.getEntitiesInScope(i);for(let o of t)if(o.name===e)return o;return null}referenceTargetToElement(i){return i instanceof kc?i:i instanceof ks||i.node instanceof e_||i.node instanceof QN||i.node instanceof F_?null:this.referenceTargetToElement(i.node)}};function fZ(n,i){let e=new Map;function t(r){if(e.has(r.rootNode))return e.get(r.rootNode);let a=r.namedEntities,c;return r.parentScope!==null?c=new Map([...t(r.parentScope),...a]):c=new Map(a),e.set(r.rootNode,c),c}let o=[n];for(;o.length>0;){let r=o.pop();for(let a of r.childScopes.values())o.push(a);t(r)}for(let[r,a]of e)i.set(r,new Set(a.values()))}var lE=class{},cE=class{jitEvaluator;FactoryTarget=gd;ResourceLoader=lE;elementSchemaRegistry=new Rh;constructor(i=new dT){this.jitEvaluator=i}compilePipe(i,e,t){let o={name:t.name,type:Nr(t.type),typeArgumentCount:0,pipeName:t.pipeName,pure:t.pure,isStandalone:t.isStandalone},r=v5(o);return this.jitExpression(r.expression,i,e,[])}compilePipeDeclaration(i,e,t){let o=AZ(t),r=v5(o);return this.jitExpression(r.expression,i,e,[])}compileInjectable(i,e,t){let{expression:o,statements:r}=l5({name:t.name,type:Nr(t.type),typeArgumentCount:t.typeArgumentCount,providedIn:BN(t.providedIn),useClass:sh(t,"useClass"),useFactory:VN(t,"useFactory"),useValue:sh(t,"useValue"),useExisting:sh(t,"useExisting"),deps:t.deps?.map(h6)},!0);return this.jitExpression(o,i,e,r)}compileInjectableDeclaration(i,e,t){let{expression:o,statements:r}=l5({name:t.type.name,type:Nr(t.type),typeArgumentCount:0,providedIn:BN(t.providedIn),useClass:sh(t,"useClass"),useFactory:VN(t,"useFactory"),useValue:sh(t,"useValue"),useExisting:sh(t,"useExisting"),deps:t.deps?.map(zN)},!0);return this.jitExpression(o,i,e,r)}compileInjector(i,e,t){let o={type:Nr(t.type),providers:t.providers&&t.providers.length>0?new oi(t.providers):null,imports:t.imports.map(a=>new oi(a))},r=_5(o);return this.jitExpression(r.expression,i,e,[])}compileInjectorDeclaration(i,e,t){let o=OZ(t),r=_5(o);return this.jitExpression(r.expression,i,e,[])}compileNgModule(i,e,t){let o={kind:im.Global,type:Nr(t.type),bootstrap:t.bootstrap.map(Nr),declarations:t.declarations.map(Nr),publicDeclarationTypes:null,imports:t.imports.map(Nr),includeImportTypes:!0,exports:t.exports.map(Nr),selectorScopeMode:T1.Inline,containsForwardDecls:!1,schemas:t.schemas?t.schemas.map(Nr):null,id:t.id?new oi(t.id):null},r=MH(o);return this.jitExpression(r.expression,i,e,[])}compileNgModuleDeclaration(i,e,t){let o=kH(t);return this.jitExpression(o,i,e,[])}compileDirective(i,e,t){let o=RN(t);return this.compileDirectiveFromMeta(i,e,o)}compileDirectiveDeclaration(i,e,t){let o=this.createParseSourceSpan("Directive",t.type.name,e),r=p6(t,o);return this.compileDirectiveFromMeta(i,e,r)}compileDirectiveFromMeta(i,e,t){let o=new o1,r=Z1(),a=nZ(t,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileComponent(i,e,t){let{template:o,defer:r}=u6(t.template,t.name,e,t.preserveWhitespaces,void 0),a=it(K(K({},t),RN(t)),{selector:t.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:o,declarations:t.declarations.map(CZ),declarationListEmitMode:0,defer:r,styles:[...t.styles,...o.styles],encapsulation:t.encapsulation,changeDetection:t.changeDetection??null,animations:t.animations!=null?new oi(t.animations):null,viewProviders:t.viewProviders!=null?new oi(t.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null}),c=`ng:///${t.name}.js`;return this.compileComponentFromMeta(i,c,a)}compileComponentDeclaration(i,e,t){let o=this.createParseSourceSpan("Component",t.type.name,e),r=vZ(t,o,e);return this.compileComponentFromMeta(i,e,r)}compileComponentFromMeta(i,e,t){let o=new o1,r=Z1(),a=iZ(t,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileFactory(i,e,t){let o=wp({name:t.name,type:Nr(t.type),typeArgumentCount:t.typeArgumentCount,deps:yZ(t.deps),target:t.target});return this.jitExpression(o.expression,i,e,o.statements)}compileFactoryDeclaration(i,e,t){let o=wp({name:t.type.name,type:Nr(t.type),typeArgumentCount:0,deps:Array.isArray(t.deps)?t.deps.map(zN):t.deps,target:t.target});return this.jitExpression(o.expression,i,e,o.statements)}createParseSourceSpan(i,e,t){return vH(i,e,t)}jitExpression(i,e,t,o){let r=[...o,new Rr("$def",i,void 0,oa.Exported)];return this.jitEvaluator.evaluateStatements(t,r,new pT(e),!0).$def}};function NN(n){return it(K({},n),{isSignal:n.isSignal,predicate:m6(n.predicate),read:n.read?new oi(n.read):null,static:n.static,emitDistinctChangesOnly:n.emitDistinctChangesOnly})}function FN(n){return{propertyName:n.propertyName,first:n.first??!1,predicate:m6(n.predicate),descendants:n.descendants??!1,read:n.read?new oi(n.read):null,static:n.static??!1,emitDistinctChangesOnly:n.emitDistinctChangesOnly??!0,isSignal:!!n.isSignal}}function m6(n){return Array.isArray(n)?n:fE(new oi(n),1)}function RN(n){let i=IZ(n.inputs||[]),e=Nk(n.outputs||[]),t=n.propMetadata,o={},r={};for(let c in t)t.hasOwnProperty(c)&&t[c].forEach(p=>{TZ(p)?o[c]={bindingPropertyName:p.alias||c,classPropertyName:c,required:p.required||!1,isSignal:!!p.isSignal,transformFunction:p.transform!=null?new oi(p.transform):null}:EZ(p)&&(r[c]=p.alias||c)});let a=n.hostDirectives?.length?n.hostDirectives.map(c=>typeof c=="function"?{directive:Nr(c),inputs:null,outputs:null,isForwardReference:!1}:{directive:Nr(c.directive),isForwardReference:!1,inputs:c.inputs?Nk(c.inputs):null,outputs:c.outputs?Nk(c.outputs):null}):null;return it(K({},n),{typeArgumentCount:0,typeSourceSpan:n.typeSourceSpan,type:Nr(n.type),deps:null,host:K({},wZ(n.propMetadata,n.typeSourceSpan,n.host)),inputs:K(K({},i),o),outputs:K(K({},e),r),queries:n.queries.map(NN),providers:n.providers!=null?new oi(n.providers):null,viewQueries:n.viewQueries.map(NN),hostDirectives:a})}function p6(n,i){let e=n.hostDirectives?.length?n.hostDirectives.map(t=>({directive:Nr(t.directive),isForwardReference:!1,inputs:t.inputs?LN(t.inputs):null,outputs:t.outputs?LN(t.outputs):null})):null;return{name:n.type.name,type:Nr(n.type),typeSourceSpan:i,selector:n.selector??null,inputs:n.inputs?DZ(n.inputs):{},outputs:n.outputs??{},host:gZ(n.host),queries:(n.queries??[]).map(FN),viewQueries:(n.viewQueries??[]).map(FN),providers:n.providers!==void 0?new oi(n.providers):null,exportAs:n.exportAs??null,usesInheritance:n.usesInheritance??!1,controlCreate:n.controlCreate??null,lifecycle:{usesOnChanges:n.usesOnChanges??!1},deps:null,typeArgumentCount:0,isStandalone:n.isStandalone??qN(n.version),isSignal:n.isSignal??!1,hostDirectives:e}}function gZ(n={}){return{attributes:_Z(n.attributes??{}),listeners:n.listeners??{},properties:n.properties??{},specialAttributes:{classAttr:n.classAttribute,styleAttr:n.styleAttribute}}}function LN(n){let i=null;for(let e=1;eOk(c,!0))),n.directives&&r.push(...n.directives.map(c=>Ok(c))),n.pipes&&r.push(...bZ(n.pipes)));let a=r.some(({kind:c})=>c===Ih.Directive||c===Ih.NgModule);return it(K({},p6(n,i)),{template:t,styles:n.styles??[],declarations:r,viewProviders:n.viewProviders!==void 0?new oi(n.viewProviders):null,animations:n.animations!==void 0?new oi(n.animations):null,defer:o,changeDetection:n.changeDetection??mE.Default,encapsulation:n.encapsulation??Sp.Emulated,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null,hasDirectiveDependencies:a})}function CZ(n){return it(K({},n),{type:new oi(n.type)})}function Ok(n,i=null){return{kind:Ih.Directive,isComponent:i||n.kind==="component",selector:n.selector,type:new oi(n.type),inputs:n.inputs??[],outputs:n.outputs??[],exportAs:n.exportAs??null}}function bZ(n){return n?Object.keys(n).map(i=>({kind:Ih.Pipe,name:i,type:new oi(n[i])})):[]}function xZ(n){return{kind:Ih.Pipe,name:n.name,type:new oi(n.type)}}function u6(n,i,e,t,o){let r=ZY(n,e,{preserveWhitespaces:t});if(r.errors!==null){let p=r.errors.map(u=>u.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${i}: ${p}`)}let c=new rE(null).bind({template:r.nodes});return{template:r,defer:SZ(c,o)}}function sh(n,i){if(n.hasOwnProperty(i))return fE(new oi(n[i]),0)}function VN(n,i){if(n.hasOwnProperty(i))return new oi(n[i])}function BN(n){let i=typeof n=="function"?new oi(n):new aa(n??null);return fE(i,0)}function yZ(n){return n==null?null:n.map(h6)}function h6(n){let i=n.attribute!=null,e=n.token===null?null:new oi(n.token),t=i?new oi(n.attribute):e;return f6(t,i,n.host,n.optional,n.self,n.skipSelf)}function zN(n){let i=n.attribute??!1,e=n.token===null?null:new oi(n.token);return f6(e,i,n.host??!1,n.optional??!1,n.self??!1,n.skipSelf??!1)}function f6(n,i,e,t,o,r){let a=i?Te("unknown"):null;return{token:n,attributeNameType:a,host:e,optional:t,self:o,skipSelf:r}}function SZ(n,i){let e=n.getDeferBlocks(),t=new Map;for(let o=0;or.msg).join(` `));for(let r in n)n.hasOwnProperty(r)&&n[r].forEach(a=>{MZ(a)?t.properties[a.hostPropertyName||r]=j$("this",r):kZ(a)&&(t.listeners[a.eventName||r]=`${r}(${(a.args||[]).join(",")})`)});return t}function MZ(n){return n.ngMetadataName==="HostBinding"}function kZ(n){return n.ngMetadataName==="HostListener"}function TZ(n){return n.ngMetadataName==="Input"}function EZ(n){return n.ngMetadataName==="Output"}function DZ(n){return Object.keys(n).reduce((i,e)=>{let t=n[e];return typeof t=="string"||Array.isArray(t)?i[e]=PZ(t):i[e]={bindingPropertyName:t.publicName,classPropertyName:e,transformFunction:t.transformFunction!==null?new oi(t.transformFunction):null,required:t.isRequired,isSignal:t.isSignal},i},{})}function PZ(n){return typeof n=="string"?{bindingPropertyName:n,classPropertyName:n,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:n[0],classPropertyName:n[1],transformFunction:n[2]?new oi(n[2]):null,required:!1,isSignal:!1}}function IZ(n){return n.reduce((i,e)=>{if(typeof e=="string"){let[t,o]=g6(e);i[o]={bindingPropertyName:t,classPropertyName:o,required:!1,isSignal:!1,transformFunction:null}}else i[e.name]={bindingPropertyName:e.alias||e.name,classPropertyName:e.name,required:e.required||!1,isSignal:!1,transformFunction:e.transform!=null?new oi(e.transform):null};return i},{})}function Nk(n){return n.reduce((i,e)=>{let[t,o]=g6(e);return i[o]=t,i},{})}function g6(n){let[i,e]=n.split(":",2).map(t=>t.trim());return[e??i,i]}function AZ(n){return{name:n.type.name,type:Nr(n.type),typeArgumentCount:0,pipeName:n.name,deps:null,pure:n.pure??!0,isStandalone:n.isStandalone??qN(n.version)}}function OZ(n){return{name:n.type.name,type:Nr(n.type),providers:n.providers!==void 0&&n.providers.length>0?new oi(n.providers):null,imports:n.imports!==void 0?n.imports.map(i=>new oi(i)):[]}}function NZ(n){let i=n.ng||(n.ng={});i.\u0275compilerFacade=new cE}var dE=class{closedByParent=!1;implicitNamespacePrefix=null;isVoid=!1;ignoreFirstLf=!1;canSelfClose=!0;preventNamespaceInheritance=!1;requireExtraParent(i){return!1}isClosedByChild(i){return!1}getContentType(){return gc.PARSABLE_DATA}},_5e=new dE;var v5e=new jk("21.2.6");NZ(Jg);function RE(n){let i=n.cloneNode(!0),e=i.querySelectorAll("[id]"),t=n.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o=t&&e<=o&&i>=r&&i<=a}function LZ(n,i){let e=i.leftn.right,o=i.topn.bottom;return e||t||o||r}function p0(n,i,e){n.top+=i,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function b6(n,i,e,t){let{top:o,right:r,bottom:a,left:c,width:p,height:u}=n,h=p*i,_=u*i;return t>o-_&&tc-h&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:$E(e)})})}handleScroll(i){let e=Cp(i),t=this.positions.get(e);if(!t)return null;let o=t.scrollPosition,r,a;if(e===this._document){let u=this.getViewportScrollPosition();r=u.top,a=u.left}else r=e.scrollTop,a=e.scrollLeft;let c=o.top-r,p=o.left-a;return this.positions.forEach((u,h)=>{u.clientRect&&e!==h&&e.contains(h)&&p0(u.clientRect,c,p)}),o.top=r,o.left=a,{top:c,left:p}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function A6(n,i){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let t=i.createElement("div");return e.forEach(o=>t.appendChild(o)),t}function HE(n,i,e){for(let t in i)if(i.hasOwnProperty(t)){let o=i[t];o?n.setProperty(t,o,e?.has(t)?"important":""):n.removeProperty(t)}return n}function Hh(n,i){let e=i?"":"none";HE(n.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function x6(n,i,e){HE(n.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},e)}function db(n,i){return i&&i!="none"?n+" "+i:n}function y6(n,i){n.style.width=`${i.width}px`,n.style.height=`${i.height}px`,n.style.transform=u0(i.left,i.top)}function u0(n,i){return`translate3d(${Math.round(n)}px, ${Math.round(i)}px, 0)`}var d0={capture:!0},NE={passive:!1,capture:!0},VZ=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(t,o){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important} `],encapsulation:2,changeDetection:0})}return n})(),O6=(()=>{class n{_ngZone=f(Vi);_document=f(Xi);_styleLoader=f(cr);_renderer=f(sd).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new He;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=ae([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new He;pointerUp=new He;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,NE)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,t){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(VZ),this._activeDragInstances.update(o=>[...o,e]),this._activeDragInstances().length===1)){let o=t.type.startsWith("touch"),r=c=>this.pointerUp.next(c),a=[["scroll",c=>this._scroll.next(c),d0],["selectstart",this._preventDefaultWhileDragging,NE]];o?a.push(["touchend",r,d0],["touchcancel",r,d0]):a.push(["mouseup",r,d0]),o||a.push(["mousemove",c=>this.pointerMove.next(c),NE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=a.map(([c,p,u])=>this._renderer.listen(this._document,c,p,u))})}}stopDragging(e){this._activeDragInstances.update(t=>{let o=t.indexOf(e);return o>-1?(t.splice(o,1),[...t]):t}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let t=[this._scroll];return e&&e!==this._document&&t.push(new Dr(o=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(e,"scroll",a=>{this._activeDragInstances().length&&o.next(a)},d0);return()=>{r()}}))),Hn(...t)}registerDirectiveNode(e,t){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,t)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function S6(n){let i=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*i}function BZ(n){let i=getComputedStyle(n),e=FE(i,"transition-property"),t=e.find(c=>c==="transform"||c==="all");if(!t)return 0;let o=e.indexOf(t),r=FE(i,"transition-duration"),a=FE(i,"transition-delay");return S6(r[o])+S6(a[o])}function FE(n,i){return n.getPropertyValue(i).split(",").map(t=>t.trim())}var zZ=new Set(["position"]),VE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(i,e,t,o,r,a,c,p,u,h){this._document=i,this._rootElement=e,this._direction=t,this._initialDomRect=o,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=c,this._initialTransform=p,this._zIndex=u,this._renderer=h}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),w6(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return BZ(this._preview)}addEventListener(i,e){return this._renderer.listen(this._preview,i,e)}_createPreview(){let i=this._previewTemplate,e=this._previewClass,t=i?i.template:null,o;if(t&&i){let r=i.matchSize?this._initialDomRect:null,a=i.viewContainer.createEmbeddedView(t,i.context);a.detectChanges(),o=A6(a,this._document),this._previewEmbeddedView=a,i.matchSize?y6(o,r):o.style.transform=u0(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else o=RE(this._rootElement),y6(o,this._initialDomRect),this._initialTransform&&(o.style.transform=this._initialTransform);return HE(o.style,{"pointer-events":"none",margin:w6(o)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},zZ),Hh(o,!1),o.classList.add("cdk-drag-preview"),o.setAttribute("popover","manual"),o.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>o.classList.add(r)):o.classList.add(e)),o}};function w6(n){return"showPopover"in n}var jZ={passive:!0},M6={passive:!1},$Z={passive:!1,capture:!0},HZ=800,k6="cdk-drag-placeholder",T6=new Set(["position"]);function UZ(n,i,e={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let t=n.get(Si,null,{optional:!0})||n.get(sd).createRenderer(null,null);return new BE(i,e,n.get(Xi),n.get(Vi),n.get(dd),n.get(O6),t)}var BE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=ae(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new He;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=So.EMPTY;_pointerUpSubscription=So.EMPTY;_scrollSubscription=So.EMPTY;_resizeSubscription=So.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Hh(e,i)))}_disabled=!1;beforeStarted=new He;started=new He;released=new He;ended=new He;entered=new He;exited=new He;dropped=new He;moved=this._moveEvents;data;constrainPosition;constructor(i,e,t,o,r,a,c){this._config=e,this._document=t,this._ngZone=o,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=c,this.withRootElement(i).withParent(e.parentDragRef||null),this._parentPositions=new cb(t),a.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(t=>Al(t)),this._handles.forEach(t=>Hh(t,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){let e=Al(i);if(e!==this._rootElement){this._removeRootElementListeners();let t=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(e,"mousedown",this._pointerDown,M6),t.listen(e,"touchstart",this._pointerDown,jZ),t.listen(e,"dragstart",this._nativeDragStart,M6)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?Al(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&LZ(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let i=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),t=0,o=0;e.lefti.right&&(t=i.right-e.right),e.topi.bottom&&(o=i.bottom-e.bottom);let r=this._activeTransform.x,a=this._activeTransform.y,c=r+t,p=a+o;this._rootElement.style.transform=u0(c,p),this._activeTransform={x:c,y:p},this._passiveTransform={x:c,y:p}}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),Hh(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),Hh(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){let i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){let i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=i=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,i)}else this.disabled||this._initializeDragSequence(this._rootElement,i)};_pointerMove=i=>{let e=this._getPointerPositionOnPage(i);if(!this._hasStartedDragging()){let o=Math.abs(e.x-this._pickupPositionOnPage.x),r=Math.abs(e.y-this._pickupPositionOnPage.y);if(o+r>=this._config.dragStartThreshold){let c=Date.now()>=this._dragStartTime+this._getDragStartDelay(i),p=this._dropContainer;if(!c){this._endDragSequence(i);return}(!p||!p.isDragging()&&!p.isReceiving())&&(i.cancelable&&i.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(i)))}return}i.cancelable&&i.preventDefault();let t=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(t),this._dropContainer)this._updateActiveDropContainer(t,e);else{let o=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=t.x-o.x+this._passiveTransform.x,r.y=t.y-o.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:t,event:i,distance:this._getDragDistance(t),delta:this._pointerDirectionDelta})})};_pointerUp=i=>{this._endDragSequence(i)};_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){m0(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),t=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",GZ,$Z)}),t){let o=this._rootElement,r=o.parentNode,a=this._placeholder=this._createPlaceholderElement(),c=this._marker=this._marker||this._document.createComment("");r.insertBefore(c,o),this._initialTransform=o.style.transform||"",this._preview=new VE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,e)),x6(o,!1,T6),this._document.body.appendChild(r.replaceChild(a,o)),this.started.next({source:this,event:i}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(i,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),o=m0(e),r=!o&&e.button!==0,a=this._rootElement,c=Cp(e),p=!o&&this._lastTouchEventTime&&this._lastTouchEventTime+HZ>Date.now(),u=o?dC(e):cC(e);if(c&&c.draggable&&e.type==="mousedown"&&e.preventDefault(),t||r||p||u)return;if(this._handles.length){let S=a.style;this._rootElementTapHighlight=S.webkitTapHighlightColor||"",S.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(S=>this._updateOnScroll(S)),this._boundaryElement&&(this._boundaryRect=$E(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,e);let _=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:_.x,y:_.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(i){x6(this._rootElement,!0,T6),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,t=e.getItemIndex(this),o=this._getPointerPositionOnPage(i),r=this._getDragDistance(o),a=e._isOverContainer(o.x,o.y);this.ended.next({source:this,distance:r,dropPoint:o,event:i}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:o,event:i}),e.drop(this,t,this._initialIndex,this._initialContainer,a,r,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:e},{x:t,y:o}){let r=this._initialContainer._getSiblingContainerFromPosition(this,i,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let a=this._dropContainer.getItemIndex(this),c=this._dropContainer.getItemAtIndex(a+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,c),this._dropContainer=r,this._dropContainer.enter(this,i,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(t,o),this._dropContainer._sortItem(this,i,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,e):this._applyPreviewTransform(i-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let o=c=>{(!c||this._preview&&Cp(c)===this._preview.element&&c.propertyName==="transform")&&(a(),t(),clearTimeout(r))},r=setTimeout(o,e*1.5),a=this._preview.addEventListener("transitionend",o)}))}_createPlaceholderElement(){let i=this._placeholderTemplate,e=i?i.template:null,t;return e?(this._placeholderRef=i.viewContainer.createEmbeddedView(e,i.context),this._placeholderRef.detectChanges(),t=A6(this._placeholderRef,this._document)):t=RE(this._rootElement),t.style.pointerEvents="none",t.classList.add(k6),t}_getPointerPositionInElement(i,e,t){let o=e===this._rootElement?null:e,r=o?o.getBoundingClientRect():i,a=m0(t)?t.targetTouches[0]:t,c=this._getViewportScrollPosition(),p=a.pageX-r.left-c.left,u=a.pageY-r.top-c.top;return{x:r.left-i.left+p,y:r.top-i.top+u}}_getPointerPositionOnPage(i){let e=this._getViewportScrollPosition(),t=m0(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,o=t.pageX-e.left,r=t.pageY-e.top;if(this._ownerSVGElement){let a=this._ownerSVGElement.getScreenCTM();if(a){let c=this._ownerSVGElement.createSVGPoint();return c.x=o,c.y=r,c.matrixTransform(a.inverse())}}return{x:o,y:r}}_getConstrainedPointerPosition(i){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:o}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if(this.lockAxis==="x"||e==="x"?o=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,c=this._boundaryRect,{width:p,height:u}=this._getPreviewRect(),h=c.top+a,_=c.bottom-(u-a),S=c.left+r,x=c.right-(p-r);t=E6(t,S,x),o=E6(o,h,_)}return{x:t,y:o}}_updatePointerDirectionDelta(i){let{x:e,y:t}=i,o=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(e-r.x),c=Math.abs(t-r.y);return a>this._config.pointerDirectionChangeThreshold&&(o.x=e>r.x?1:-1,r.x=e),c>this._config.pointerDirectionChangeThreshold&&(o.y=t>r.y?1:-1,r.y=t),o}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,Hh(this._rootElement,i))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(i=>i()),this._rootElementCleanups=void 0}_applyRootElementTransform(i,e){let t=1/this.scale,o=u0(i*t,e*t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=db(o,this._initialTransform)}_applyPreviewTransform(i,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,o=u0(i,e);this._preview.setTransform(db(o,t))}_getDragDistance(i){let e=this._pickupPositionOnPage;return e?{x:i.x-e.x,y:i.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:e}=this._passiveTransform;if(i===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),o=this._boundaryElement.getBoundingClientRect();if(o.width===0&&o.height===0||t.width===0&&t.height===0)return;let r=o.left-t.left,a=t.right-o.right,c=o.top-t.top,p=t.bottom-o.bottom;o.width>t.width?(r>0&&(i+=r),a>0&&(i-=a)):i=0,o.height>t.height?(c>0&&(e+=c),p>0&&(e-=p)):e=0,(i!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:i})}_getDragStartDelay(i){let e=this.dragStartDelay;return typeof e=="number"?e:m0(i)?e.touch:e?e.mouse:0}_updateOnScroll(i){let e=this._parentPositions.handleScroll(i);if(e){let t=Cp(i);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&p0(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=sC(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,e){let t=this._previewContainer||"global";if(t==="parent")return i;if(t==="global"){let o=this._document;return e||o.fullscreenElement||o.webkitFullscreenElement||o.mozFullScreenElement||o.msFullscreenElement||o.body}return Al(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=i=>{if(this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&i.preventDefault()}else this.disabled||i.preventDefault()};_getTargetHandle(i){return this._handles.find(e=>i.target&&(i.target===e||e.contains(i.target)))}_conditionallyInsertAnchor(i,e,t){if(i===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let o=this._anchor??=RE(this._placeholder);o.classList.remove(k6),o.classList.add("cdk-drag-anchor"),o.style.transform="",t?t.before(o):Al(e.element).appendChild(o)}}};function E6(n,i,e){return Math.max(i,Math.min(e,n))}function m0(n){return n.type[0]==="t"}function GZ(n){n.preventDefault()}function N6(n,i,e){let t=D6(i,n.length-1),o=D6(e,n.length-1);if(t===o)return;let r=n[t],a=o0)return null;let c=this.orientation==="horizontal",p=r.findIndex(w=>w.drag===i),u=r[a],h=r[p].clientRect,_=u.clientRect,S=p>a?1:-1,x=this._getItemOffsetPx(h,_,S),b=this._getSiblingOffsetPx(p,r,S),M=r.slice();return N6(r,p,a),r.forEach((w,y)=>{if(M[y]===w)return;let E=w.drag===i,I=E?x:b,D=E?i.getPlaceholderElement():w.drag.getRootElement();w.offset+=I;let N=Math.round(w.offset*(1/w.drag.scale));c?(D.style.transform=db(`translate3d(${N}px, 0, 0)`,w.initialTransform),p0(w.clientRect,0,I)):(D.style.transform=db(`translate3d(0, ${N}px, 0)`,w.initialTransform),p0(w.clientRect,I,0))}),this._previousSwap.overlaps=LE(_,e,t),this._previousSwap.drag=u.drag,this._previousSwap.delta=c?o.x:o.y,{previousIndex:p,currentIndex:a}}enter(i,e,t,o){let r=this._activeDraggables,a=r.indexOf(i),c=i.getPlaceholderElement();a>-1&&r.splice(a,1);let p=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,t):o,u=r[p];if(u===i&&(u=r[p+1]),!u&&(p==null||p===-1||p{let e=i.getRootElement();if(e){let t=this._itemPositions.find(o=>o.drag===i)?.initialTransform;e.style.transform=t||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return this._getVisualItemPositions().findIndex(e=>e.drag===i)}getItemAtIndex(i){return this._getVisualItemPositions()[i]?.drag||null}updateOnScroll(i,e){this._itemPositions.forEach(({clientRect:t})=>{p0(t,i,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){let i=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:$E(t)}}).sort((e,t)=>i?e.clientRect.left-t.clientRect.left:e.clientRect.top-t.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(i,e,t){let o=this.orientation==="horizontal",r=o?e.left-i.left:e.top-i.top;return t===-1&&(r+=o?e.width-i.width:e.height-i.height),r}_getSiblingOffsetPx(i,e,t){let o=this.orientation==="horizontal",r=e[i].clientRect,a=e[i+t*-1],c=r[o?"width":"height"]*t;if(a){let p=o?"left":"top",u=o?"right":"bottom";t===-1?c-=a.clientRect[p]-r[u]:c+=r[p]-a.clientRect[u]}return c}_shouldEnterAsFirstChild(i,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,o=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let a=t[t.length-1].clientRect;return o?i>=a.right:e>=a.bottom}else{let a=t[0].clientRect;return o?i<=a.left:e<=a.top}}_getItemIndexFromPointerPosition(i,e,t,o){let r=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:c,clientRect:p})=>{if(c===i)return!1;if(o){let u=r?o.x:o.y;if(c===this._previousSwap.drag&&this._previousSwap.overlaps&&u===this._previousSwap.delta)return!1}return r?e>=Math.floor(p.left)&&e=Math.floor(p.top)&&tp?h.after(u):h.before(u),N6(this._activeItems,p,r);let _=this._getRootNode().elementFromPoint(e,t);return a.deltaX=o.x,a.deltaY=o.y,a.drag=c,a.overlaps=h===_||h.contains(_),{previousIndex:p,currentIndex:r}}enter(i,e,t,o){let r=this._activeItems.indexOf(i);r>-1&&this._activeItems.splice(r,1);let a=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,t):o;a===-1&&(a=this._getClosestItemIndexToPointer(i,e,t));let c=this._activeItems[a];c&&!this._dragDropRegistry.isDragging(c)?(this._activeItems.splice(a,0,i),c.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){let i=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[o,r]=this._relatedNodes[t];o.parentNode===i&&o.nextSibling!==r&&(r===null?i.appendChild(o):r.parentNode===i&&i.insertBefore(o,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}getItemAtIndex(i){return this._activeItems[i]||null}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,e,t){let o=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),r=o?this._activeItems.findIndex(a=>{let c=a.getRootElement();return o===c||c.contains(o)}):-1;return r===-1||!this._sortPredicate(r,i)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=sC(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let o=1/0,r=-1;for(let a=0;a!0;sortPredicate=()=>!0;beforeStarted=new He;entered=new He;exited=new He;dropped=new He;sorted=new He;receivingStarted=new He;receivingStopped=new He;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=So.EMPTY;_verticalScrollDirection=ol.NONE;_horizontalScrollDirection=ja.NONE;_scrollNode;_stopScrollTimers=new He;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(i,e,t,o,r){this._dragDropRegistry=e,this._ngZone=o,this._viewportRuler=r;let a=this.element=Al(i);this._document=t,this.withOrientation("vertical").withElementContainer(a),e.registerDropContainer(this),this._parentPositions=new cb(t)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,e,t,o){this._draggingStarted(),o==null&&this.sortingDisabled&&(o=this._draggables.indexOf(i)),this._sortStrategy.enter(i,e,t,o),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,e,t,o,r,a,c,p={}){this._reset(),this.dropped.next({item:i,currentIndex:e,previousIndex:t,container:this,previousContainer:o,isPointerOverContainer:r,distance:a,dropPoint:c,event:p})}withItems(i){let e=this._draggables;return this._draggables=i,i.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(o=>o.isDragging()).every(o=>i.indexOf(o)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof mb&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if(i==="mixed")this._sortStrategy=new zE(this._document,this._dragDropRegistry);else{let e=new mb(this._dragDropRegistry);e.direction=this._direction,e.orientation=i,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(i){let e=this._container;return this._scrollableElements=i.indexOf(e)===-1?[e,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;let e=Al(this.element),t=this._scrollableElements.indexOf(this._container),o=this._scrollableElements.indexOf(i);return t>-1&&this._scrollableElements.splice(t,1),o>-1&&this._scrollableElements.splice(o,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}getItemAtIndex(i){return this._isDragging?this._sortStrategy.getItemAtIndex(i):this._draggables[i]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,e,t,o){if(this.sortingDisabled||!this._domRect||!b6(this._domRect,P6,e,t))return;let r=this._sortStrategy.sort(i,e,t,o);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,e){if(this.autoScrollDisabled)return;let t,o=ol.NONE,r=ja.NONE;if(this._parentPositions.positions.forEach((a,c)=>{c===this._document||!a.clientRect||t||b6(a.clientRect,P6,i,e)&&([o,r]=qZ(c,a.clientRect,this._direction,i,e),(o||r)&&(t=c))}),!o&&!r){let{width:a,height:c}=this._viewportRuler.getViewportSize(),p={width:a,height:c,top:0,right:a,bottom:c,left:0};o=R6(p,e),r=L6(p,i),t=window}t&&(o!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=o,this._horizontalScrollDirection=r,this._scrollNode=t,(o||r)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),Kv(0,nc).pipe(tt(this._stopScrollTimers)).subscribe(()=>{let i=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===ol.UP?i.scrollBy(0,-e):this._verticalScrollDirection===ol.DOWN&&i.scrollBy(0,e),this._horizontalScrollDirection===ja.LEFT?i.scrollBy(-e,0):this._horizontalScrollDirection===ja.RIGHT&&i.scrollBy(e,0)})};_isOverContainer(i,e){return this._domRect!=null&&LE(this._domRect,i,e)}_getSiblingContainerFromPosition(i,e,t){return this._siblings.find(o=>o._canReceive(i,e,t))}_canReceive(i,e,t){if(!this._domRect||!LE(this._domRect,e,t)||!this.enterPredicate(i,this))return!1;let o=this._getShadowRoot().elementFromPoint(e,t);return o?o===this._container||this._container.contains(o):!1}_startReceiving(i,e){let t=this._activeSiblings;!t.has(i)&&e.every(o=>this.enterPredicate(o,this)||this._draggables.indexOf(o)>-1)&&(t.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:e}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(i);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let i=sC(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let i=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,i))}};function R6(n,i){let{top:e,bottom:t,height:o}=n,r=o*F6;return i>=e-r&&i<=e+r?ol.UP:i>=t-r&&i<=t+r?ol.DOWN:ol.NONE}function L6(n,i){let{left:e,right:t,width:o}=n,r=o*F6;return i>=e-r&&i<=e+r?ja.LEFT:i>=t-r&&i<=t+r?ja.RIGHT:ja.NONE}function qZ(n,i,e,t,o){let r=R6(i,o),a=L6(i,t),c=ol.NONE,p=ja.NONE;if(r){let u=n.scrollTop;r===ol.UP?u>0&&(c=ol.UP):n.scrollHeight-u>n.clientHeight&&(c=ol.DOWN)}if(a){let u=n.scrollLeft;e==="rtl"?a===ja.RIGHT?u<0&&(p=ja.RIGHT):n.scrollWidth+u>n.clientWidth&&(p=ja.LEFT):a===ja.LEFT?u>0&&(p=ja.LEFT):n.scrollWidth-u>n.clientWidth&&(p=ja.RIGHT)}return[c,p]}var QZ=(()=>{class n{_injector=f(Jo);constructor(){}createDrag(e,t){return UZ(this._injector,e,t)}createDropList(e){return WZ(this._injector,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var V6=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({providers:[QZ],imports:[md]})}return n})();var XZ=[[["caption"]],[["colgroup"],["col"]],"*"],KZ=["caption","colgroup, col","*"];function YZ(n,i){n&1&&on(0,2)}function ZZ(n,i){n&1&&(s(0,"thead",0),ro(1,1),l(),s(2,"tbody",0),ro(3,2)(4,3),l(),s(5,"tfoot",0),ro(6,4),l())}function JZ(n,i){n&1&&ro(0,1)(1,2)(2,3)(3,4)}var Vl=new cn("CDK_TABLE");var hb=(()=>{class n{template=f(Oo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),fb=(()=>{class n{template=f(Oo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),j6=(()=>{class n{template=f(Oo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),Cm=(()=>{class n{_table=f(Vl,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,r){if(t&1&&Ki(r,hb,5)(r,fb,5)(r,j6,5),t&2){let a;mt(a=pt())&&(o.cell=a.first),mt(a=pt())&&(o.headerCell=a.first),mt(a=pt())&&(o.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",Ct],stickyEnd:[2,"stickyEnd","stickyEnd",Ct]}})}return n})(),ub=class{constructor(i,e){e.nativeElement.classList.add(...i._columnCssClassName)}},$6=(()=>{class n extends ub{constructor(){super(f(Cm),f(Zt))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[si]})}return n})();var H6=(()=>{class n extends ub{constructor(){let e=f(Cm),t=f(Zt);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[si]})}return n})();var GE=(()=>{class n{template=f(Oo);_differs=f(ld);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof f0?e.headerCell.template:this instanceof WE?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,features:[bn]})}return n})(),f0=(()=>{class n extends GE{_table=f(Vl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(Oo),f(ld))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",Ct]},features:[si,bn]})}return n})(),WE=(()=>{class n extends GE{_table=f(Vl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(Oo),f(ld))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",Ct]},features:[si,bn]})}return n})(),gb=(()=>{class n extends GE{_table=f(Vl,{optional:!0});when;constructor(){super(f(Oo),f(ld))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[si]})}return n})(),nu=(()=>{class n{_viewContainer=f(oo);cells;context;static mostRecentCellOutlet=null;constructor(){n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),qE=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})();var QE=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})(),U6=(()=>{class n{templateRef=f(Oo);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),B6=["top","bottom","left","right"],UE=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(i=>this._updateCachedSizes(i)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(i,e,t=!0,o=!0,r,a,c){this._isNativeHtmlTable=i,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=a,this._tableInjector=c,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(i,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(i);let t=[];for(let o of i)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));Xa({write:()=>{for(let o of t)this._removeStickyStyle(o,e)}},{injector:this._tableInjector})}updateStickyColumns(i,e,t,o=!0,r=!0){if(!i.length||!this._isBrowser||!(e.some(w=>w)||t.some(w=>w))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=i[0],c=a.children.length,p=this.direction==="rtl",u=p?"right":"left",h=p?"left":"right",_=e.lastIndexOf(!0),S=t.indexOf(!0),x,b,M;r&&this._updateStickyColumnReplayQueue({rows:[...i],stickyStartStates:[...e],stickyEndStates:[...t]}),Xa({earlyRead:()=>{x=this._getCellWidths(a,o),b=this._getStickyStartColumnPositions(x,e),M=this._getStickyEndColumnPositions(x,t)},write:()=>{for(let w of i)for(let y=0;y!!w)&&(this._positionListener.stickyColumnsUpdated({sizes:_===-1?[]:x.slice(0,_+1).map((w,y)=>e[y]?w:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:S===-1?[]:x.slice(S).map((w,y)=>t[y+S]?w:null).reverse()}))}},{injector:this._tableInjector})}stickRows(i,e,t){if(!this._isBrowser)return;let o=t==="bottom"?i.slice().reverse():i,r=t==="bottom"?e.slice().reverse():e,a=[],c=[],p=[];Xa({earlyRead:()=>{for(let u=0,h=0;u{let u=r.lastIndexOf(!0);for(let h=0;h{let t=i.querySelector("tfoot");t&&(e.some(o=>!o)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(i,e){if(!i.classList.contains(this._stickCellCss))return;for(let o of e)i.style[o]="",i.classList.remove(this._borderCellCss[o]);B6.some(o=>e.indexOf(o)===-1&&i.style[o])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,e,t,o){i.classList.add(this._stickCellCss),o&&i.classList.add(this._borderCellCss[e]),i.style[e]=`${t}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of B6)i.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(i,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=i.children;for(let r=0;r0;r--)e[r]&&(t[r]=o,o+=i[r]);return t}_retrieveElementSize(i){let e=this._elemSizeCache.get(i);if(e)return e;let t=i.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(i,o),this._resizeObserver.observe(i,{box:"border-box"})),o}_updateStickyColumnReplayQueue(i){this._removeFromStickyColumnReplayQueue(i.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(i)}_removeFromStickyColumnReplayQueue(i){let e=new Set(i);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(i){let e=!1;for(let t of i){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&&eJ(t.target)&&(e=!0),this._elemSizeCache.set(t.target,o)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function eJ(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(i=>n.classList.contains(i))}var h0=new cn("STICKY_POSITIONING_LISTENER");var XE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","rowOutlet",""]]})}return n})(),KE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),YE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),ZE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),JE=(()=>{class n{_differs=f(ld);_changeDetectorRef=f(Q);_elementRef=f(Zt);_dir=f(Ka,{optional:!0});_platform=f($s);_viewRepeater;_viewportRuler=f(dd);_injector=f(Jo);_virtualScrollViewport=f(YO,{optional:!0,host:!0});_positionListener=f(h0,{optional:!0})||f(h0,{optional:!0,skipSelf:!0});_document=f(Xi);_data;_renderedRange;_onDestroy=new He;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new He;_footerRowStickyUpdates=new He;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new He;_dataStream=new He;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new ve;viewChange=new an({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){f(new sc("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(tt(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new XO:new i4,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Uu(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(o,r,a)=>this._getEmbeddedViewArgs(o.item,a),o=>o.item.data,o=>{o.operation===QO.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=t.get(o.currentIndex);r.context.$implicit=o.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=z6(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=z6(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let c=0;c{this._addStickyColumnStyles([r],this._footerRowDefs[a])}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r{let c=o&&o.has(a)?o.get(a):[];if(c.length){let p=c.shift();return p.dataIndex=t,p}else return{data:e,rowDef:a,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),pb(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=pb(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=pb(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=pb(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,c)=>{let p=!!c.getColumnsDiff();return a||p},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||o||r}_switchDataSource(e){this._data=[],Uu(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;Uu(this.dataSource)?e=this.dataSource.connect(this):Ng(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Nn(this.dataSource)),this._renderChangeSubscription=Pr([e,this.viewChange]).pipe(tt(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let o=Array.from(t?.columns||[]).map(c=>{let p=this._columnDefsByName.get(c);return p}),r=o.map(c=>c.sticky),a=o.map(c=>c.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let o=0;o!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&o.push(r)}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,r={$implicit:e.data};return{templateRef:o.template,context:r,index:t}}_renderRow(e,t,o,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,o);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))nu.mostRecentCellOutlet&&nu.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,o)=>t||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new UE(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Nn()).pipe(tt(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?nc:hO;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Ud(0,t),tt(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),Pr([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(tt(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(t){let r=o.createEmbeddedView(e.templateRef),a=r.rootNodes[0];if(r.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE){a.setAttribute("role","row"),a.classList.add(...e._contentClassNames);let c=a.querySelectorAll(e._cellSelector);for(let p=0;p=e.end||t!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.starto.end;let a=e.start-o.start,c=e.end-e.start,p,u;for(let S=0;S-1;S--){let x=r.get(S+a);if(x&&x.rootNodes.length){u=x.rootNodes[x.rootNodes.length-1];break}}let h=p?.getBoundingClientRect?.(),_=u?.getBoundingClientRect?.();return h&&_?_.bottom-h.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,r){if(t&1&&Ki(r,U6,5)(r,Cm,5)(r,gb,5)(r,f0,5)(r,WE,5),t&2){let a;mt(a=pt())&&(o._noDataRow=a.first),mt(a=pt())&&(o._contentColumnDefs=a),mt(a=pt())&&(o._contentRowDefs=a),mt(a=pt())&&(o._contentHeaderRowDefs=a),mt(a=pt())&&(o._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&Be("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",Ct],fixedLayout:[2,"fixedLayout","fixedLayout",Ct],recycleRows:[2,"recycleRows","recycleRows",Ct]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[fn([{provide:Vl,useExisting:n},{provide:h0,useValue:null}])],ngContentSelectors:KZ,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(ii(XZ),on(0),on(1,1),A(2,YZ,1,0),A(3,ZZ,7,0)(4,JZ,4,0)),t&2&&(m(2),O(o._isServer?2:-1),m(),O(o._isNativeHtmlTable?3:4))},dependencies:[KE,XE,ZE,YE],styles:[`.cdk-table-fixed-layout{table-layout:fixed} `],encapsulation:2})}return n})();function pb(n,i){return n.concat(Array.from(i))}function z6(n,i){let e=i.toUpperCase(),t=n.viewContainer.element.nativeElement;for(;t;){let o=t.nodeType===1?t.nodeName:null;if(o===e)return t;if(o==="TABLE")break;t=t.parentNode}return null}var _b=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[mC]})}return n})();var G6=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[md,hi,md]})}return n})();var qn=(function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n})(qn||{}),rl="*";function eD(n,i){return{type:qn.Trigger,name:n,definitions:i,options:{}}}function tD(n,i=null){return{type:qn.Animate,styles:i,timings:n}}function W6(n,i=null){return{type:qn.Sequence,steps:n,options:i}}function ou(n){return{type:qn.Style,styles:n,offset:null}}function vb(n,i,e){return{type:qn.State,name:n,styles:i,options:e}}function nD(n,i,e=null){return{type:qn.Transition,expr:n,animation:i,options:e}}var Pc=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(i=0,e=0){this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},iu=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(i){this.players=i;let e=0,t=0,o=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++e==r&&this._onFinish()}),a.onDestroy(()=>{++t==r&&this._onDestroy()}),a.onStart(()=>{++o==r&&this._onStart()})}),this.totalTime=this.players.reduce((a,c)=>Math.max(a,c.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){let e=i*this.totalTime;this.players.forEach(t=>{let o=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(o)})}getPosition(){let i=this.players.reduce((e,t)=>e===null||t.totalTime>e.totalTime?t:e,null);return i!=null?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Uh="!";function q6(n){return new yi(3e3,!1)}function tJ(){return new yi(3100,!1)}function nJ(){return new yi(3101,!1)}function iJ(n){return new yi(3001,!1)}function oJ(n){return new yi(3003,!1)}function rJ(n){return new yi(3004,!1)}function X6(n,i){return new yi(3005,!1)}function K6(){return new yi(3006,!1)}function Y6(){return new yi(3007,!1)}function Z6(n,i){return new yi(3008,!1)}function J6(n){return new yi(3002,!1)}function eR(n,i,e,t,o){return new yi(3010,!1)}function tR(){return new yi(3011,!1)}function nR(){return new yi(3012,!1)}function iR(){return new yi(3200,!1)}function oR(){return new yi(3202,!1)}function rR(){return new yi(3013,!1)}function aR(n){return new yi(3014,!1)}function sR(n){return new yi(3015,!1)}function lR(n){return new yi(3016,!1)}function cR(n,i){return new yi(3404,!1)}function aJ(n){return new yi(3502,!1)}function dR(n){return new yi(3503,!1)}function mR(){return new yi(3300,!1)}function pR(n){return new yi(3504,!1)}function uR(n){return new yi(3301,!1)}function hR(n,i){return new yi(3302,!1)}function fR(n){return new yi(3303,!1)}function gR(n,i){return new yi(3400,!1)}function _R(n){return new yi(3401,!1)}function vR(n){return new yi(3402,!1)}function CR(n,i){return new yi(3505,!1)}function Md(n){switch(n.length){case 0:return new Pc;case 1:return n[0];default:return new iu(n)}}function aD(n,i,e=new Map,t=new Map){let o=[],r=[],a=-1,c=null;if(i.forEach(p=>{let u=p.get("offset"),h=u==a,_=h&&c||new Map;p.forEach((S,x)=>{let b=x,M=S;if(x!=="offset")switch(b=n.normalizePropertyName(b,o),M){case Uh:M=e.get(x);break;case rl:M=t.get(x);break;default:M=n.normalizeStyleValue(x,b,M,o);break}_.set(b,M)}),h||r.push(_),c=_,a=u}),o.length)throw aJ(o);return r}function Cb(n,i,e,t){switch(i){case"start":n.onStart(()=>t(e&&iD(e,"start",n)));break;case"done":n.onDone(()=>t(e&&iD(e,"done",n)));break;case"destroy":n.onDestroy(()=>t(e&&iD(e,"destroy",n)));break}}function iD(n,i,e){let t=e.totalTime,o=!!e.disabled,r=bb(n.element,n.triggerName,n.fromState,n.toState,i||n.phaseName,t??n.totalTime,o),a=n._data;return a!=null&&(r._data=a),r}function bb(n,i,e,t,o="",r=0,a){return{element:n,triggerName:i,fromState:e,toState:t,phaseName:o,totalTime:r,disabled:!!a}}function ls(n,i,e){let t=n.get(i);return t||n.set(i,t=e),t}function sD(n){let i=n.indexOf(":"),e=n.substring(1,i),t=n.slice(i+1);return[e,t]}var sJ=typeof document>"u"?null:document.documentElement;function xb(n){let i=n.parentNode||n.host||null;return i===sJ?null:i}function lJ(n){return n.substring(1,6)=="ebkit"}var ru=null,Q6=!1;function bR(n){ru||(ru=cJ()||{},Q6=ru.style?"WebkitAppearance"in ru.style:!1);let i=!0;return ru.style&&!lJ(n)&&(i=n in ru.style,!i&&Q6&&(i="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ru.style)),i}function cJ(){return typeof document<"u"?document.body:null}function lD(n,i){for(;i;){if(i===n)return!0;i=xb(i)}return!1}function cD(n,i,e){if(e)return Array.from(n.querySelectorAll(i));let t=n.querySelector(i);return t?[t]:[]}var dJ=1e3,dD="{{",mJ="}}",mD="ng-enter",yb="ng-leave",g0="ng-trigger",_0=".ng-trigger",pD="ng-animating",Sb=".ng-animating";function Ic(n){if(typeof n=="number")return n;let i=n.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:oD(parseFloat(i[1]),i[2])}function oD(n,i){return i==="s"?n*dJ:n}function v0(n,i,e){return n.hasOwnProperty("duration")?n:uJ(n,i,e)}var pJ=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function uJ(n,i,e){let t,o=0,r="";if(typeof n=="string"){let a=n.match(pJ);if(a===null)return i.push(q6(n)),{duration:0,delay:0,easing:""};t=oD(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=oD(parseFloat(c),a[4]));let p=a[5];p&&(r=p)}else t=n;if(!e){let a=!1,c=i.length;t<0&&(i.push(tJ()),a=!0),o<0&&(i.push(nJ()),a=!0),a&&i.splice(c,0,q6(n))}return{duration:t,delay:o,easing:r}}function xR(n){return n.length?n[0]instanceof Map?n:n.map(i=>new Map(Object.entries(i))):[]}function Bl(n,i,e){i.forEach((t,o)=>{let r=wb(o);e&&!e.has(o)&&e.set(o,n.style[r]),n.style[r]=t})}function bm(n,i){i.forEach((e,t)=>{let o=wb(t);n.style[o]=""})}function Gh(n){return Array.isArray(n)?n.length==1?n[0]:W6(n):n}function yR(n,i,e){let t=i.params||{},o=uD(n);o.length&&o.forEach(r=>{t.hasOwnProperty(r)||e.push(iJ(r))})}var rD=new RegExp(`${dD}\\s*(.+?)\\s*${mJ}`,"g");function uD(n){let i=[];if(typeof n=="string"){let e;for(;e=rD.exec(n);)i.push(e[1]);rD.lastIndex=0}return i}function Wh(n,i,e){let t=`${n}`,o=t.replace(rD,(r,a)=>{let c=i[a];return c==null&&(e.push(oJ(a)),c=""),c.toString()});return o==t?n:o}var hJ=/-+([a-z0-9])/g;function wb(n){return n.replace(hJ,(...i)=>i[1].toUpperCase())}function SR(n,i){return n===0||i===0}function wR(n,i,e){if(e.size&&i.length){let t=i[0],o=[];if(e.forEach((r,a)=>{t.has(a)||o.push(a),t.set(a,r)}),o.length)for(let r=1;ra.set(c,Mb(n,c)))}}return i}function cs(n,i,e){switch(i.type){case qn.Trigger:return n.visitTrigger(i,e);case qn.State:return n.visitState(i,e);case qn.Transition:return n.visitTransition(i,e);case qn.Sequence:return n.visitSequence(i,e);case qn.Group:return n.visitGroup(i,e);case qn.Animate:return n.visitAnimate(i,e);case qn.Keyframes:return n.visitKeyframes(i,e);case qn.Style:return n.visitStyle(i,e);case qn.Reference:return n.visitReference(i,e);case qn.AnimateChild:return n.visitAnimateChild(i,e);case qn.AnimateRef:return n.visitAnimateRef(i,e);case qn.Query:return n.visitQuery(i,e);case qn.Stagger:return n.visitStagger(i,e);default:throw rJ(i.type)}}function Mb(n,i){return window.getComputedStyle(n)[i]}var PD=(()=>{class n{validateStyleProperty(e){return bR(e)}containsElement(e,t){return lD(e,t)}getParentElement(e){return xb(e)}query(e,t,o){return cD(e,t,o)}computeStyle(e,t,o){return o||""}animate(e,t,o,r,a,c=[],p){return new Pc(o,r)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})(),su=class{static NOOP=new PD},lu=class{};var fJ=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"]),Pb=class extends lu{normalizePropertyName(i,e){return wb(i)}normalizeStyleValue(i,e,t,o){let r="",a=t.toString().trim();if(fJ.has(e)&&t!==0&&t!=="0")if(typeof t=="number")r="px";else{let c=t.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&o.push(X6(i,t))}return a+r}};var Ib="*";function gJ(n,i){let e=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(t=>_J(t,e,i)):e.push(n),e}function _J(n,i,e){if(n[0]==":"){let p=vJ(n,e);if(typeof p=="function"){i.push(p);return}n=p}let t=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(sR(n)),i;let o=t[1],r=t[2],a=t[3];i.push(MR(o,a));let c=o==Ib&&a==Ib;r[0]=="<"&&!c&&i.push(MR(a,o))}function vJ(n,i){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t) *"}}var kb=new Set(["true","1"]),Tb=new Set(["false","0"]);function MR(n,i){let e=kb.has(n)||Tb.has(n),t=kb.has(i)||Tb.has(i);return(o,r)=>{let a=n==Ib||n==o,c=i==Ib||i==r;return!a&&e&&typeof o=="boolean"&&(a=o?kb.has(n):Tb.has(n)),!c&&t&&typeof r=="boolean"&&(c=r?kb.has(i):Tb.has(i)),a&&c}}var FR=":self",CJ=new RegExp(`s*${FR}s*,?`,"g");function RR(n,i,e,t){return new CD(n).build(i,e,t)}var kR="",CD=class{_driver;constructor(i){this._driver=i}build(i,e,t){let o=new bD(e);return this._resetContextStyleTimingState(o),cs(this,Gh(i),o)}_resetContextStyleTimingState(i){i.currentQuerySelector=kR,i.collectedStyles=new Map,i.collectedStyles.set(kR,new Map),i.currentTime=0}visitTrigger(i,e){let t=e.queryCount=0,o=e.depCount=0,r=[],a=[];return i.name.charAt(0)=="@"&&e.errors.push(K6()),i.definitions.forEach(c=>{if(this._resetContextStyleTimingState(e),c.type==qn.State){let p=c,u=p.name;u.toString().split(/\s*,\s*/).forEach(h=>{p.name=h,r.push(this.visitState(p,e))}),p.name=u}else if(c.type==qn.Transition){let p=this.visitTransition(c,e);t+=p.queryCount,o+=p.depCount,a.push(p)}else e.errors.push(Y6())}),{type:qn.Trigger,name:i.name,states:r,transitions:a,queryCount:t,depCount:o,options:null}}visitState(i,e){let t=this.visitStyle(i.styles,e),o=i.options&&i.options.params||null;if(t.containsDynamicStyles){let r=new Set,a=o||{};t.styles.forEach(c=>{c instanceof Map&&c.forEach(p=>{uD(p).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&e.errors.push(Z6(i.name,[...r.values()]))}return{type:qn.State,name:i.name,style:t,options:o?{params:o}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;let t=cs(this,Gh(i.animation),e),o=gJ(i.expr,e.errors);return{type:qn.Transition,matchers:o,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:au(i.options)}}visitSequence(i,e){return{type:qn.Sequence,steps:i.steps.map(t=>cs(this,t,e)),options:au(i.options)}}visitGroup(i,e){let t=e.currentTime,o=0,r=i.steps.map(a=>{e.currentTime=t;let c=cs(this,a,e);return o=Math.max(o,e.currentTime),c});return e.currentTime=o,{type:qn.Group,steps:r,options:au(i.options)}}visitAnimate(i,e){let t=SJ(i.timings,e.errors);e.currentAnimateTimings=t;let o,r=i.styles?i.styles:ou({});if(r.type==qn.Keyframes)o=this.visitKeyframes(r,e);else{let a=i.styles,c=!1;if(!a){c=!0;let u={};t.easing&&(u.easing=t.easing),a=ou(u)}e.currentTime+=t.duration+t.delay;let p=this.visitStyle(a,e);p.isEmptyStep=c,o=p}return e.currentAnimateTimings=null,{type:qn.Animate,timings:t,style:o,options:null}}visitStyle(i,e){let t=this._makeStyleAst(i,e);return this._validateStyleAst(t,e),t}_makeStyleAst(i,e){let t=[],o=Array.isArray(i.styles)?i.styles:[i.styles];for(let c of o)typeof c=="string"?c===rl?t.push(c):e.errors.push(J6(c)):t.push(new Map(Object.entries(c)));let r=!1,a=null;return t.forEach(c=>{if(c instanceof Map&&(c.has("easing")&&(a=c.get("easing"),c.delete("easing")),!r)){for(let p of c.values())if(p.toString().indexOf(dD)>=0){r=!0;break}}}),{type:qn.Style,styles:t,easing:a,offset:i.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(i,e){let t=e.currentAnimateTimings,o=e.currentTime,r=e.currentTime;t&&r>0&&(r-=t.duration+t.delay),i.styles.forEach(a=>{typeof a!="string"&&a.forEach((c,p)=>{let u=e.collectedStyles.get(e.currentQuerySelector),h=u.get(p),_=!0;h&&(r!=o&&r>=h.startTime&&o<=h.endTime&&(e.errors.push(eR(p,h.startTime,h.endTime,r,o)),_=!1),r=h.startTime),_&&u.set(p,{startTime:r,endTime:o}),e.options&&yR(c,e.options,e.errors)})})}visitKeyframes(i,e){let t={type:qn.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(tR()),t;let o=1,r=0,a=[],c=!1,p=!1,u=0,h=i.steps.map(y=>{let E=this._makeStyleAst(y,e),I=E.offset!=null?E.offset:yJ(E.styles),D=0;return I!=null&&(r++,D=E.offset=I),p=p||D<0||D>1,c=c||D0&&r<_?e.errors.push(oR()):r==0&&(S=o/(_-1));let x=_-1,b=e.currentTime,M=e.currentAnimateTimings,w=M.duration;return h.forEach((y,E)=>{let I=S>0?E==x?1:S*E:a[E],D=I*w;e.currentTime=b+M.delay+D,M.duration=D,this._validateStyleAst(y,e),y.offset=I,t.styles.push(y)}),t}visitReference(i,e){return{type:qn.Reference,animation:cs(this,Gh(i.animation),e),options:au(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:qn.AnimateChild,options:au(i.options)}}visitAnimateRef(i,e){return{type:qn.AnimateRef,animation:this.visitReference(i.animation,e),options:au(i.options)}}visitQuery(i,e){let t=e.currentQuerySelector,o=i.options||{};e.queryCount++,e.currentQuery=i;let[r,a]=bJ(i.selector);e.currentQuerySelector=t.length?t+" "+r:r,ls(e.collectedStyles,e.currentQuerySelector,new Map);let c=cs(this,Gh(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:qn.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:a,animation:c,originalSelector:i.selector,options:au(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(rR());let t=i.timings==="full"?{duration:0,delay:0,easing:"full"}:v0(i.timings,e.errors,!0);return{type:qn.Stagger,animation:cs(this,Gh(i.animation),e),timings:t,options:null}}};function bJ(n){let i=!!n.split(/\s*,\s*/).find(e=>e==FR);return i&&(n=n.replace(CJ,"")),n=n.replace(/@\*/g,_0).replace(/@\w+/g,e=>_0+"-"+e.slice(1)).replace(/:animating/g,Sb),[n,i]}function xJ(n){return n?K({},n):null}var bD=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(i){this.errors=i}};function yJ(n){if(typeof n=="string")return null;let i=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;i=parseFloat(t.get("offset")),t.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;i=parseFloat(e.get("offset")),e.delete("offset")}return i}function SJ(n,i){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=v0(n,i).duration;return hD(r,0,"")}let e=n;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=hD(0,0,"");return r.dynamic=!0,r.strValue=e,r}let o=v0(e,i);return hD(o.duration,o.delay,o.easing)}function au(n){return n?(n=K({},n),n.params&&(n.params=xJ(n.params))):n={},n}function hD(n,i,e){return{duration:n,delay:i,easing:e}}function ID(n,i,e,t,o,r,a=null,c=!1){return{type:1,element:n,keyframes:i,preStyleProps:e,postStyleProps:t,duration:o,delay:r,totalTime:o+r,easing:a,subTimeline:c}}var b0=class{_map=new Map;get(i){return this._map.get(i)||[]}append(i,e){let t=this._map.get(i);t||this._map.set(i,t=[]),t.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}},wJ=1,MJ=":enter",kJ=new RegExp(MJ,"g"),TJ=":leave",EJ=new RegExp(TJ,"g");function LR(n,i,e,t,o,r=new Map,a=new Map,c,p,u=[]){return new xD().buildKeyframes(n,i,e,t,o,r,a,c,p,u)}var xD=class{buildKeyframes(i,e,t,o,r,a,c,p,u,h=[]){u=u||new b0;let _=new yD(i,e,u,o,r,h,[]);_.options=p;let S=p.delay?Ic(p.delay):0;_.currentTimeline.delayNextStep(S),_.currentTimeline.setStyles([a],null,_.errors,p),cs(this,t,_);let x=_.timelines.filter(b=>b.containsAnimation());if(x.length&&c.size){let b;for(let M=x.length-1;M>=0;M--){let w=x[M];if(w.element===e){b=w;break}}b&&!b.allowOnlyTimelineStyles()&&b.setStyles([c],null,_.errors,p)}return x.length?x.map(b=>b.buildKeyframes()):[ID(e,[],[],[],0,S,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){let t=e.subInstructions.get(e.element);if(t){let o=e.createSubContext(i.options),r=e.currentTimeline.currentTime,a=this._visitSubInstructions(t,o,o.options);r!=a&&e.transformIntoNewTimeline(a)}e.previousNode=i}visitAnimateRef(i,e){let t=e.createSubContext(i.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],e,t),this.visitReference(i.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=i}_applyAnimationRefDelays(i,e,t){for(let o of i){let r=o?.delay;if(r){let a=typeof r=="number"?r:Ic(Wh(r,o?.params??{},e.errors));t.delayNextStep(a)}}}_visitSubInstructions(i,e,t){let r=e.currentTimeline.currentTime,a=t.duration!=null?Ic(t.duration):null,c=t.delay!=null?Ic(t.delay):null;return a!==0&&i.forEach(p=>{let u=e.appendInstructionToTimeline(p,a,c);r=Math.max(r,u.duration+u.delay)}),r}visitReference(i,e){e.updateOptions(i.options,!0),cs(this,i.animation,e),e.previousNode=i}visitSequence(i,e){let t=e.subContextCount,o=e,r=i.options;if(r&&(r.params||r.delay)&&(o=e.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==qn.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=Ab);let a=Ic(r.delay);o.delayNextStep(a)}i.steps.length&&(i.steps.forEach(a=>cs(this,a,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>t&&o.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){let t=[],o=e.currentTimeline.currentTime,r=i.options&&i.options.delay?Ic(i.options.delay):0;i.steps.forEach(a=>{let c=e.createSubContext(i.options);r&&c.delayNextStep(r),cs(this,a,c),o=Math.max(o,c.currentTimeline.currentTime),t.push(c.currentTimeline)}),t.forEach(a=>e.currentTimeline.mergeTimelineCollectedStyles(a)),e.transformIntoNewTimeline(o),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){let t=i.strValue,o=e.params?Wh(t,e.params,e.errors):t;return v0(o,e.errors)}else return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){let t=e.currentAnimateTimings=this._visitTiming(i.timings,e),o=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),o.snapshotCurrentStyles());let r=i.style;r.type==qn.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(t.duration),this.visitStyle(r,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){let t=e.currentTimeline,o=e.currentAnimateTimings;!o&&t.hasCurrentStyleProperties()&&t.forwardFrame();let r=o&&o.easing||i.easing;i.isEmptyStep?t.applyEmptyStep(r):t.setStyles(i.styles,r,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){let t=e.currentAnimateTimings,o=e.currentTimeline.duration,r=t.duration,c=e.createSubContext().currentTimeline;c.easing=t.easing,i.styles.forEach(p=>{let u=p.offset||0;c.forwardTime(u*r),c.setStyles(p.styles,p.easing,e.errors,e.options),c.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(c),e.transformIntoNewTimeline(o+r),e.previousNode=i}visitQuery(i,e){let t=e.currentTimeline.currentTime,o=i.options||{},r=o.delay?Ic(o.delay):0;r&&(e.previousNode.type===qn.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Ab);let a=t,c=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=c.length;let p=null;c.forEach((u,h)=>{e.currentQueryIndex=h;let _=e.createSubContext(i.options,u);r&&_.delayNextStep(r),u===e.element&&(p=_.currentTimeline),cs(this,i.animation,_),_.currentTimeline.applyStylesToKeyframe();let S=_.currentTimeline.currentTime;a=Math.max(a,S)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),p&&(e.currentTimeline.mergeTimelineCollectedStyles(p),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){let t=e.parentContext,o=e.currentTimeline,r=i.timings,a=Math.abs(r.duration),c=a*(e.currentQueryTotal-1),p=a*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":p=c-p;break;case"full":p=t.currentStaggerTime;break}let h=e.currentTimeline;p&&h.delayNextStep(p);let _=h.currentTime;cs(this,i.animation,e),e.previousNode=i,t.currentStaggerTime=o.currentTime-_+(o.startTime-t.currentTimeline.startTime)}},Ab={},yD=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ab;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(i,e,t,o,r,a,c,p){this._driver=i,this.element=e,this.subInstructions=t,this._enterClassName=o,this._leaveClassName=r,this.errors=a,this.timelines=c,this.currentTimeline=p||new Ob(this._driver,e,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;let t=i,o=this.options;t.duration!=null&&(o.duration=Ic(t.duration)),t.delay!=null&&(o.delay=Ic(t.delay));let r=t.params;if(r){let a=o.params;a||(a=this.options.params={}),Object.keys(r).forEach(c=>{(!e||!a.hasOwnProperty(c))&&(a[c]=Wh(r[c],a,this.errors))})}}_copyOptions(){let i={};if(this.options){let e=this.options.params;if(e){let t=i.params={};Object.keys(e).forEach(o=>{t[o]=e[o]})}}return i}createSubContext(i=null,e,t){let o=e||this.element,r=new n(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,t||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(i),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(i){return this.previousNode=Ab,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,t){let o={duration:e??i.duration,delay:this.currentTimeline.currentTime+(t??0)+i.delay,easing:""},r=new SD(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,o,i.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,t,o,r,a){let c=[];if(o&&c.push(this.element),i.length>0){i=i.replace(kJ,"."+this._enterClassName),i=i.replace(EJ,"."+this._leaveClassName);let p=t!=1,u=this._driver.query(this.element,i,p);t!==0&&(u=t<0?u.slice(u.length+t,u.length):u.slice(0,t)),c.push(...u)}return!r&&c.length==0&&a.push(aR(e)),c}},Ob=class n{_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(i,e,t,o){this._driver=i,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,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(i){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new n(this._driver,i,e||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+=wJ,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles.set(i,e),this._globalTimelineStyles.set(i,e),this._styleSummary.set(i,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||rl),this._currentKeyframe.set(e,rl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,t,o){e&&this._previousKeyframe.set("easing",e);let r=o&&o.params||{},a=DJ(i,this._globalTimelineStyles);for(let[c,p]of a){let u=Wh(p,r,t);this._pendingStyles.set(c,u),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??rl),this._updateStyle(c,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((i,e)=>{this._currentKeyframe.set(e,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,i)}))}snapshotCurrentStyles(){for(let[i,e]of this._localTimelineStyles)this._pendingStyles.set(i,e),this._updateStyle(i,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((e,t)=>{let o=this._styleSummary.get(t);(!o||e.time>o.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let i=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((c,p)=>{let u=new Map([...this._backFill,...c]);u.forEach((h,_)=>{h===Uh?i.add(_):h===rl&&e.add(_)}),t||u.set("offset",p/this.duration),o.push(u)});let r=[...i.values()],a=[...e.values()];if(t){let c=o[0],p=new Map(c);c.set("offset",0),p.set("offset",1),o=[c,p]}return ID(this.element,o,r,a,this.duration,this.startTime,this.easing,!1)}},SD=class extends Ob{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(i,e,t,o,r,a,c=!1){super(i,e,a.delay),this.keyframes=t,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=c,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:t,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],a=t+e,c=e/a,p=new Map(i[0]);p.set("offset",0),r.push(p);let u=new Map(i[0]);u.set("offset",TR(c)),r.push(u);let h=i.length-1;for(let _=1;_<=h;_++){let S=new Map(i[_]),x=S.get("offset"),b=e+x*t;S.set("offset",TR(b/a)),r.push(S)}t=a,e=0,o="",i=r}return ID(this.element,i,this.preStyleProps,this.postStyleProps,t,e,o,!0)}};function TR(n,i=3){let e=Math.pow(10,i-1);return Math.round(n*e)/e}function DJ(n,i){let e=new Map,t;return n.forEach(o=>{if(o==="*"){t??=i.keys();for(let r of t)e.set(r,rl)}else for(let[r,a]of o)e.set(r,a)}),e}function ER(n,i,e,t,o,r,a,c,p,u,h,_,S){return{type:0,element:n,triggerName:i,isRemovalTransition:o,fromState:e,fromStyles:r,toState:t,toStyles:a,timelines:c,queriedElements:p,preStyleProps:u,postStyleProps:h,totalTime:_,errors:S}}var fD={},Nb=class{_triggerName;ast;_stateStyles;constructor(i,e,t){this._triggerName=i,this.ast=e,this._stateStyles=t}match(i,e,t,o){return PJ(this.ast.matchers,i,e,t,o)}buildStyles(i,e,t){let o=this._stateStyles.get("*");return i!==void 0&&(o=this._stateStyles.get(i?.toString())||o),o?o.buildStyles(e,t):new Map}build(i,e,t,o,r,a,c,p,u,h){let _=[],S=this.ast.options&&this.ast.options.params||fD,x=c&&c.params||fD,b=this.buildStyles(t,x,_),M=p&&p.params||fD,w=this.buildStyles(o,M,_),y=new Set,E=new Map,I=new Map,D=o==="void",N={params:VR(M,S),delay:this.ast.options?.delay},P=h?[]:LR(i,e,this.ast.animation,r,a,b,w,N,u,_),L=0;return P.forEach(re=>{L=Math.max(re.duration+re.delay,L)}),_.length?ER(e,this._triggerName,t,o,D,b,w,[],[],E,I,L,_):(P.forEach(re=>{let oe=re.element,G=ls(E,oe,new Set);re.preStyleProps.forEach(ue=>G.add(ue));let $=ls(I,oe,new Set);re.postStyleProps.forEach(ue=>$.add(ue)),oe!==e&&y.add(oe)}),ER(e,this._triggerName,t,o,D,b,w,P,[...y.values()],E,I,L))}};function PJ(n,i,e,t,o){return n.some(r=>r(i,e,t,o))}function VR(n,i){let e=K({},i);return Object.entries(n).forEach(([t,o])=>{o!=null&&(e[t]=o)}),e}var wD=class{styles;defaultParams;normalizer;constructor(i,e,t){this.styles=i,this.defaultParams=e,this.normalizer=t}buildStyles(i,e){let t=new Map,o=VR(i,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,c)=>{a&&(a=Wh(a,o,e));let p=this.normalizer.normalizePropertyName(c,e);a=this.normalizer.normalizeStyleValue(c,p,a,e),t.set(c,a)})}),t}};function IJ(n,i,e){return new MD(n,i,e)}var MD=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(i,e,t){this.name=i,this.ast=e,this._normalizer=t,e.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new wD(o.style,r,t))}),DR(this.states,"true","1"),DR(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new Nb(i,o,this.states))}),this.fallbackTransition=AJ(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,t,o){return this.transitionFactories.find(a=>a.match(i,e,t,o))||null}matchStyles(i,e,t){return this.fallbackTransition.buildStyles(i,e,t)}};function AJ(n,i,e){let t=[(a,c)=>!0],o={type:qn.Sequence,steps:[],options:null},r={type:qn.Transition,animation:o,matchers:t,options:null,queryCount:0,depCount:0};return new Nb(n,r,i)}function DR(n,i,e){n.has(i)?n.has(e)||n.set(e,n.get(i)):n.has(e)&&n.set(i,n.get(e))}var OJ=new b0,kD=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(i,e,t){this.bodyNode=i,this._driver=e,this._normalizer=t}register(i,e){let t=[],o=[],r=RR(this._driver,e,t,o);if(t.length)throw dR(t);this._animations.set(i,r)}_buildPlayer(i,e,t){let o=i.element,r=aD(this._normalizer,i.keyframes,e,t);return this._driver.animate(o,r,i.duration,i.delay,i.easing,[],!0)}create(i,e,t={}){let o=[],r=this._animations.get(i),a,c=new Map;if(r?(a=LR(this._driver,e,r,mD,yb,new Map,new Map,t,OJ,o),a.forEach(h=>{let _=ls(c,h.element,new Map);h.postStyleProps.forEach(S=>_.set(S,null))})):(o.push(mR()),a=[]),o.length)throw pR(o);c.forEach((h,_)=>{h.forEach((S,x)=>{h.set(x,this._driver.computeStyle(_,x,rl))})});let p=a.map(h=>{let _=c.get(h.element);return this._buildPlayer(h,new Map,_)}),u=Md(p);return this._playersById.set(i,u),u.onDestroy(()=>this.destroy(i)),this.players.push(u),u}destroy(i){let e=this._getPlayer(i);e.destroy(),this._playersById.delete(i);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(i){let e=this._playersById.get(i);if(!e)throw uR(i);return e}listen(i,e,t,o){let r=bb(e,"","","");return Cb(this._getPlayer(i),t,r,o),()=>{}}command(i,e,t,o){if(t=="register"){this.register(i,o[0]);return}if(t=="create"){let a=o[0]||{};this.create(i,e,a);return}let r=this._getPlayer(i);switch(t){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(o[0]));break;case"destroy":this.destroy(i);break}}},PR="ng-animate-queued",NJ=".ng-animate-queued",gD="ng-animate-disabled",FJ=".ng-animate-disabled",RJ="ng-star-inserted",LJ=".ng-star-inserted",VJ=[],BR={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},BJ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},zl="__ng_removed",x0=class{namespaceId;value;options;get params(){return this.options.params}constructor(i,e=""){this.namespaceId=e;let t=i&&i.hasOwnProperty("value"),o=t?i.value:i;if(this.value=jJ(o),t){let r=i,{value:a}=r,c=uO(r,["value"]);this.options=c}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){let e=i.params;if(e){let t=this.options.params;Object.keys(e).forEach(o=>{t[o]==null&&(t[o]=e[o])})}}},C0="void",_D=new x0(C0),TD=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(i,e,t){this.id=i,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+i,al(e,this._hostClassName)}listen(i,e,t,o){if(!this._triggers.has(e))throw hR(t,e);if(t==null||t.length==0)throw fR(e);if(!$J(t))throw gR(t,e);let r=ls(this._elementListeners,i,[]),a={name:e,phase:t,callback:o};r.push(a);let c=ls(this._engine.statesByElement,i,new Map);return c.has(e)||(al(i,g0),al(i,g0+"-"+e),c.set(e,_D)),()=>{this._engine.afterFlush(()=>{let p=r.indexOf(a);p>=0&&r.splice(p,1),this._triggers.has(e)||c.delete(e)})}}register(i,e){return this._triggers.has(i)?!1:(this._triggers.set(i,e),!0)}_getTrigger(i){let e=this._triggers.get(i);if(!e)throw _R(i);return e}trigger(i,e,t,o=!0){let r=this._getTrigger(e),a=new y0(this.id,e,i),c=this._engine.statesByElement.get(i);c||(al(i,g0),al(i,g0+"-"+e),this._engine.statesByElement.set(i,c=new Map));let p=c.get(e),u=new x0(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&p&&u.absorbOptions(p.options),c.set(e,u),p||(p=_D),!(u.value===C0)&&p.value===u.value){if(!GJ(p.params,u.params)){let M=[],w=r.matchStyles(p.value,p.params,M),y=r.matchStyles(u.value,u.params,M);M.length?this._engine.reportError(M):this._engine.afterFlush(()=>{bm(i,w),Bl(i,y)})}return}let S=ls(this._engine.playersByElement,i,[]);S.forEach(M=>{M.namespaceId==this.id&&M.triggerName==e&&M.queued&&M.destroy()});let x=r.matchTransition(p.value,u.value,i,u.params),b=!1;if(!x){if(!o)return;x=r.fallbackTransition,b=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:x,fromState:p,toState:u,player:a,isFallbackTransition:b}),b||(al(i,PR),a.onStart(()=>{qh(i,PR)})),a.onDone(()=>{let M=this.players.indexOf(a);M>=0&&this.players.splice(M,1);let w=this._engine.playersByElement.get(i);if(w){let y=w.indexOf(a);y>=0&&w.splice(y,1)}}),this.players.push(a),S.push(a),a}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(e=>e.delete(i)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(o=>o.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);let e=this._engine.playersByElement.get(i);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){let t=this._engine.driver.query(i,_0,!0);t.forEach(o=>{if(o[zl])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(a=>a.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(i,e,t,o){let r=this._engine.statesByElement.get(i),a=new Map;if(r){let c=[];if(r.forEach((p,u)=>{if(a.set(u,p.value),this._triggers.has(u)){let h=this.trigger(i,u,C0,o);h&&c.push(h)}}),c.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,a),t&&Md(c).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){let e=this._elementListeners.get(i),t=this._engine.statesByElement.get(i);if(e&&t){let o=new Set;e.forEach(r=>{let a=r.name;if(o.has(a))return;o.add(a);let p=this._triggers.get(a).fallbackTransition,u=t.get(a)||_D,h=new x0(C0),_=new y0(this.id,a,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:a,transition:p,fromState:u,toState:h,player:_,isFallbackTransition:!0})})}}removeNode(i,e){let t=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let o=!1;if(t.totalAnimations){let r=t.players.length?t.playersByQueriedElement.get(i):[];if(r&&r.length)o=!0;else{let a=i;for(;a=a.parentNode;)if(t.statesByElement.get(a)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(i),o)t.markElementAsRemoved(this.id,i,!1,e);else{let r=i[zl];(!r||r===BR)&&(t.afterFlush(()=>this.clearElementCache(i)),t.destroyInnerAnimations(i),t._onRemovalComplete(i,e))}}insertNode(i,e){al(i,this._hostClassName)}drainQueuedTransitions(i){let e=[];return this._queue.forEach(t=>{let o=t.player;if(o.destroyed)return;let r=t.element,a=this._elementListeners.get(r);a&&a.forEach(c=>{if(c.name==t.triggerName){let p=bb(r,t.triggerName,t.fromState.value,t.toState.value);p._data=i,Cb(t.player,c.phase,p,c.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(t)}),this._queue=[],e.sort((t,o)=>{let r=t.transition.ast.depCount,a=o.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(t.element,o.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}},ED=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=(i,e)=>{};_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}constructor(i,e,t){this.bodyNode=i,this.driver=e,this._normalizer=t}get queuedPlayers(){let i=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&i.push(t)})}),i}createNamespace(i,e){let t=new TD(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[i]=t}_balanceNamespaceList(i,e){let t=this._namespaceList,o=this.namespacesByHostElement;if(t.length-1>=0){let a=!1,c=this.driver.getParentElement(e);for(;c;){let p=o.get(c);if(p){let u=t.indexOf(p);t.splice(u+1,0,i),a=!0;break}c=this.driver.getParentElement(c)}a||t.unshift(i)}else t.push(i);return o.set(e,i),i}register(i,e){let t=this._namespaceLookup[i];return t||(t=this.createNamespace(i,e)),t}registerTrigger(i,e,t){let o=this._namespaceLookup[i];o&&o.register(e,t)&&this.totalAnimations++}destroy(i,e){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(i);this.namespacesByHostElement.delete(t.hostElement);let o=this._namespaceList.indexOf(t);o>=0&&this._namespaceList.splice(o,1),t.destroy(e),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){let e=new Set,t=this.statesByElement.get(i);if(t){for(let o of t.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&e.add(r)}}return e}trigger(i,e,t,o){if(Eb(e)){let r=this._fetchNamespace(i);if(r)return r.trigger(e,t,o),!0}return!1}insertNode(i,e,t,o){if(!Eb(e))return;let r=e[zl];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(e);a>=0&&this.collectedLeaveElements.splice(a,1)}if(i){let a=this._fetchNamespace(i);a&&a.insertNode(e,t)}o&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),al(i,gD)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),qh(i,gD))}removeNode(i,e,t){if(Eb(e)){let o=i?this._fetchNamespace(i):null;o?o.removeNode(e,t):this.markElementAsRemoved(i,e,!1,t);let r=this.namespacesByHostElement.get(e);r&&r.id!==i&&r.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(i,e,t,o,r){this.collectedLeaveElements.push(e),e[zl]={namespaceId:i,setForRemoval:o,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:r}}listen(i,e,t,o,r){return Eb(e)?this._fetchNamespace(i).listen(e,t,o,r):()=>{}}_buildInstruction(i,e,t,o,r){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,t,o,i.fromState.options,i.toState.options,e,r)}destroyInnerAnimations(i){let e=this.driver.query(i,_0,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(i,Sb,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(i){let e=this.playersByElement.get(i);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(i){let e=this.playersByQueriedElement.get(i);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return Md(this.players).onDone(()=>i());i()})}processLeaveNode(i){let e=i[zl];if(e&&e.setForRemoval){if(i[zl]=BR,e.namespaceId){this.destroyInnerAnimations(i);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(i)}this._onRemovalComplete(i,e.setForRemoval)}i.classList?.contains(gD)&&this.markElementAsDisabled(i,!1),this.driver.query(i,FJ,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,o)=>this._balanceNamespaceList(t,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;tt()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?Md(e).onDone(()=>{t.forEach(o=>o())}):t.forEach(o=>o())}}reportError(i){throw vR(i)}_flushAnimations(i,e){let t=new b0,o=[],r=new Map,a=[],c=new Map,p=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(he=>{h.add(he);let B=this.driver.query(he,NJ,!0);for(let X=0;X{let X=mD+M++;b.set(B,X),he.forEach(se=>al(se,X))});let w=[],y=new Set,E=new Set;for(let he=0;hey.add(se)):E.add(B))}let I=new Map,D=OR(S,Array.from(y));D.forEach((he,B)=>{let X=yb+M++;I.set(B,X),he.forEach(se=>al(se,X))}),i.push(()=>{x.forEach((he,B)=>{let X=b.get(B);he.forEach(se=>qh(se,X))}),D.forEach((he,B)=>{let X=I.get(B);he.forEach(se=>qh(se,X))}),w.forEach(he=>{this.processLeaveNode(he)})});let N=[],P=[];for(let he=this._namespaceList.length-1;he>=0;he--)this._namespaceList[he].drainQueuedTransitions(e).forEach(X=>{let se=X.player,ce=X.element;if(N.push(se),this.collectedEnterElements.length){let Oe=ce[zl];if(Oe&&Oe.setForMove){if(Oe.previousTriggersValues&&Oe.previousTriggersValues.has(X.triggerName)){let We=Oe.previousTriggersValues.get(X.triggerName),ct=this.statesByElement.get(X.element);if(ct&&ct.has(X.triggerName)){let Tt=ct.get(X.triggerName);Tt.value=We,ct.set(X.triggerName,Tt)}}se.destroy();return}}let ke=!_||!this.driver.containsElement(_,ce),ze=I.get(ce),Ke=b.get(ce),Qe=this._buildInstruction(X,t,Ke,ze,ke);if(Qe.errors&&Qe.errors.length){P.push(Qe);return}if(ke){se.onStart(()=>bm(ce,Qe.fromStyles)),se.onDestroy(()=>Bl(ce,Qe.toStyles)),o.push(se);return}if(X.isFallbackTransition){se.onStart(()=>bm(ce,Qe.fromStyles)),se.onDestroy(()=>Bl(ce,Qe.toStyles)),o.push(se);return}let ye=[];Qe.timelines.forEach(Oe=>{Oe.stretchStartingKeyframe=!0,this.disabledNodes.has(Oe.element)||ye.push(Oe)}),Qe.timelines=ye,t.append(ce,Qe.timelines);let q={instruction:Qe,player:se,element:ce};a.push(q),Qe.queriedElements.forEach(Oe=>ls(c,Oe,[]).push(se)),Qe.preStyleProps.forEach((Oe,We)=>{if(Oe.size){let ct=p.get(We);ct||p.set(We,ct=new Set),Oe.forEach((Tt,Xn)=>ct.add(Xn))}}),Qe.postStyleProps.forEach((Oe,We)=>{let ct=u.get(We);ct||u.set(We,ct=new Set),Oe.forEach((Tt,Xn)=>ct.add(Xn))})});if(P.length){let he=[];P.forEach(B=>{he.push(CR(B.triggerName,B.errors))}),N.forEach(B=>B.destroy()),this.reportError(he)}let L=new Map,re=new Map;a.forEach(he=>{let B=he.element;t.has(B)&&(re.set(B,B),this._beforeAnimationBuild(he.player.namespaceId,he.instruction,L))}),o.forEach(he=>{let B=he.element;this._getPreviousPlayers(B,!1,he.namespaceId,he.triggerName,null).forEach(se=>{ls(L,B,[]).push(se),se.destroy()})});let oe=w.filter(he=>NR(he,p,u)),G=new Map;AR(G,this.driver,E,u,rl).forEach(he=>{NR(he,p,u)&&oe.push(he)});let ue=new Map;x.forEach((he,B)=>{AR(ue,this.driver,new Set(he),p,Uh)}),oe.forEach(he=>{let B=G.get(he),X=ue.get(he);G.set(he,new Map([...B?.entries()??[],...X?.entries()??[]]))});let be=[],me=[],De={};a.forEach(he=>{let{element:B,player:X,instruction:se}=he;if(t.has(B)){if(h.has(B)){X.onDestroy(()=>Bl(B,se.toStyles)),X.disabled=!0,X.overrideTotalTime(se.totalTime),o.push(X);return}let ce=De;if(re.size>1){let ze=B,Ke=[];for(;ze=ze.parentNode;){let Qe=re.get(ze);if(Qe){ce=Qe;break}Ke.push(ze)}Ke.forEach(Qe=>re.set(Qe,ce))}let ke=this._buildAnimation(X.namespaceId,se,L,r,ue,G);if(X.setRealPlayer(ke),ce===De)be.push(X);else{let ze=this.playersByElement.get(ce);ze&&ze.length&&(X.parentPlayer=Md(ze)),o.push(X)}}else bm(B,se.fromStyles),X.onDestroy(()=>Bl(B,se.toStyles)),me.push(X),h.has(B)&&o.push(X)}),me.forEach(he=>{let B=r.get(he.element);if(B&&B.length){let X=Md(B);he.setRealPlayer(X)}}),o.forEach(he=>{he.parentPlayer?he.syncPlayerEvents(he.parentPlayer):he.destroy()});for(let he=0;he!ke.destroyed);ce.length?HJ(this,B,ce):this.processLeaveNode(B)}return w.length=0,be.forEach(he=>{this.players.push(he),he.onDone(()=>{he.destroy();let B=this.players.indexOf(he);this.players.splice(B,1)}),he.play()}),be}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,t,o,r){let a=[];if(e){let c=this.playersByQueriedElement.get(i);c&&(a=c)}else{let c=this.playersByElement.get(i);if(c){let p=!r||r==C0;c.forEach(u=>{u.queued||!p&&u.triggerName!=o||a.push(u)})}}return(t||o)&&(a=a.filter(c=>!(t&&t!=c.namespaceId||o&&o!=c.triggerName))),a}_beforeAnimationBuild(i,e,t){let o=e.triggerName,r=e.element,a=e.isRemovalTransition?void 0:i,c=e.isRemovalTransition?void 0:o;for(let p of e.timelines){let u=p.element,h=u!==r,_=ls(t,u,[]);this._getPreviousPlayers(u,h,a,c,e.toState).forEach(x=>{let b=x.getRealPlayer();b.beforeDestroy&&b.beforeDestroy(),x.destroy(),_.push(x)})}bm(r,e.fromStyles)}_buildAnimation(i,e,t,o,r,a){let c=e.triggerName,p=e.element,u=[],h=new Set,_=new Set,S=e.timelines.map(b=>{let M=b.element;h.add(M);let w=M[zl];if(w&&w.removedBeforeQueried)return new Pc(b.duration,b.delay);let y=M!==p,E=UJ((t.get(M)||VJ).map(L=>L.getRealPlayer())).filter(L=>{let re=L;return re.element?re.element===M:!1}),I=r.get(M),D=a.get(M),N=aD(this._normalizer,b.keyframes,I,D),P=this._buildPlayer(b,N,E);if(b.subTimeline&&o&&_.add(M),y){let L=new y0(i,c,M);L.setRealPlayer(P),u.push(L)}return P});u.forEach(b=>{ls(this.playersByQueriedElement,b.element,[]).push(b),b.onDone(()=>zJ(this.playersByQueriedElement,b.element,b))}),h.forEach(b=>al(b,pD));let x=Md(S);return x.onDestroy(()=>{h.forEach(b=>qh(b,pD)),Bl(p,e.toStyles)}),_.forEach(b=>{ls(o,b,[]).push(x)}),x}_buildPlayer(i,e,t){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,t):new Pc(i.duration,i.delay)}},y0=class{namespaceId;triggerName;element;_player=new Pc;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(i,e,t){this.namespaceId=i,this.triggerName=e,this.element=t}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((e,t)=>{e.forEach(o=>Cb(i,t,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){let e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){ls(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}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(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){let e=this._player;e.triggerCallback&&e.triggerCallback(i)}};function zJ(n,i,e){let t=n.get(i);if(t){if(t.length){let o=t.indexOf(e);t.splice(o,1)}t.length==0&&n.delete(i)}return t}function jJ(n){return n??null}function Eb(n){return n&&n.nodeType===1}function $J(n){return n=="start"||n=="done"}function IR(n,i){let e=n.style.display;return n.style.display=i??"none",e}function AR(n,i,e,t,o){let r=[];e.forEach(p=>r.push(IR(p)));let a=[];t.forEach((p,u)=>{let h=new Map;p.forEach(_=>{let S=i.computeStyle(u,_,o);h.set(_,S),(!S||S.length==0)&&(u[zl]=BJ,a.push(u))}),n.set(u,h)});let c=0;return e.forEach(p=>IR(p,r[c++])),a}function OR(n,i){let e=new Map;if(n.forEach(c=>e.set(c,[])),i.length==0)return e;let t=1,o=new Set(i),r=new Map;function a(c){if(!c)return t;let p=r.get(c);if(p)return p;let u=c.parentNode;return e.has(u)?p=u:o.has(u)?p=t:p=a(u),r.set(c,p),p}return i.forEach(c=>{let p=a(c);p!==t&&e.get(p).push(c)}),e}function al(n,i){n.classList?.add(i)}function qh(n,i){n.classList?.remove(i)}function HJ(n,i,e){Md(e).onDone(()=>n.processLeaveNode(i))}function UJ(n){let i=[];return zR(n,i),i}function zR(n,i){for(let e=0;eo.add(r)):i.set(n,t),e.delete(n),!0}var Qh=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(i,e)=>{};constructor(i,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new ED(i.body,e,t),this._timelineEngine=new kD(i.body,e,t),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(i,e,t,o,r){let a=i+"-"+o,c=this._triggerCache[a];if(!c){let p=[],u=[],h=RR(this._driver,r,p,u);if(p.length)throw cR(o,p);c=IJ(o,h,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(e,o,c)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,t,o){this._transitionEngine.insertNode(i,e,t,o)}onRemove(i,e,t){this._transitionEngine.removeNode(i,e,t)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,t,o){if(t.charAt(0)=="@"){let[r,a]=sD(t),c=o;this._timelineEngine.command(r,e,a,c)}else this._transitionEngine.trigger(i,e,t,o)}listen(i,e,t,o,r){if(t.charAt(0)=="@"){let[a,c]=sD(t);return this._timelineEngine.listen(a,e,c,r)}return this._transitionEngine.listen(i,e,t,o,r)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}};function WJ(n,i){let e=null,t=null;return Array.isArray(i)&&i.length?(e=vD(i[0]),i.length>1&&(t=vD(i[i.length-1]))):i instanceof Map&&(e=vD(i)),e||t?new qJ(n,e,t):null}var qJ=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,o){this._element=e,this._startStyles=t,this._endStyles=o;let r=n.initialStylesByElement.get(e);r||n.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Bl(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Bl(this._element,this._initialStyles),this._endStyles&&(Bl(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(bm(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(bm(this._element,this._endStyles),this._endStyles=null),Bl(this._element,this._initialStyles),this._state=3)}}return n})();function vD(n){let i=null;return n.forEach((e,t)=>{QJ(t)&&(i=i||new Map,i.set(t,e))}),i}function QJ(n){return n==="display"||n==="position"}var Fb=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(i,e,t,o){this.element=i,this.keyframes=e,this.options=t,this._specialStyles=o,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let i=this.keyframes,e=this._triggerWebAnimation(this.element,i,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=i.length?i[i.length-1]:new Map;let t=()=>this._onFinish();return e.addEventListener("finish",t),this.onDestroy(()=>{e.removeEventListener("finish",t)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(i){let e=[];return i.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(i,e,t){let o=this._convertKeyframesToObject(e);try{return i.animate(o,t)}catch{return null}}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){let i=this._buildPlayer();i&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),i.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(i=>i()),this._onDestroyFns=[])}setPosition(i){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=i*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 i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,o)=>{o!=="offset"&&i.set(o,this._finished?t:Mb(this.element,o))}),this.currentSnapshot=i}triggerCallback(i){let e=i==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Rb=class{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,e){return lD(i,e)}getParentElement(i){return xb(i)}query(i,e,t){return cD(i,e,t)}computeStyle(i,e,t){return Mb(i,e)}animate(i,e,t,o,r,a=[]){let c=o==0?"both":"forwards",p={duration:t,delay:o,fill:c};r&&(p.easing=r);let u=new Map,h=a.filter(x=>x instanceof Fb);SR(t,o)&&h.forEach(x=>{x.currentSnapshot.forEach((b,M)=>u.set(M,b))});let _=xR(e).map(x=>new Map(x));_=wR(i,_,u);let S=WJ(i,_);return new Fb(i,_,p,S)}};var Db="@",jR="@.disabled",Lb=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(i,e,t,o){this.namespaceId=i,this.delegate=e,this.engine=t,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,t,o=!0){this.delegate.insertBefore(i,e,t),this.engine.onInsert(this.namespaceId,e,i,o)}removeChild(i,e,t,o){if(o){this.delegate.removeChild(i,e,t,o);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,t,o){this.delegate.setAttribute(i,e,t,o)}removeAttribute(i,e,t){this.delegate.removeAttribute(i,e,t)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,t,o){this.delegate.setStyle(i,e,t,o)}removeStyle(i,e,t){this.delegate.removeStyle(i,e,t)}setProperty(i,e,t){e.charAt(0)==Db&&e==jR?this.disableAnimations(i,!!t):this.delegate.setProperty(i,e,t)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,t,o){return this.delegate.listen(i,e,t,o)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}},DD=class extends Lb{factory;constructor(i,e,t,o,r){super(e,t,o,r),this.factory=i,this.namespaceId=e}setProperty(i,e,t){e.charAt(0)==Db?e.charAt(1)=="."&&e==jR?(t=t===void 0?!0:!!t,this.disableAnimations(i,t)):this.engine.process(this.namespaceId,i,e.slice(1),t):this.delegate.setProperty(i,e,t)}listen(i,e,t,o){if(e.charAt(0)==Db){let r=XJ(i),a=e.slice(1),c="";return a.charAt(0)!=Db&&([a,c]=KJ(a)),this.engine.listen(this.namespaceId,r,a,c,p=>{let u=p._data||-1;this.factory.scheduleListenerCallback(u,t,p)})}return this.delegate.listen(i,e,t,o)}};function XJ(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function KJ(n){let i=n.indexOf("."),e=n.substring(0,i),t=n.slice(i+1);return[e,t]}var Vb=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(i,e,t){this.delegate=i,this.engine=e,this._zone=t,e.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(i,e){let o=this.delegate.createRenderer(i,e);if(!i||!e?.data?.animation){let u=this._rendererCache,h=u.get(o);if(!h){let _=()=>u.delete(o);h=new Lb("",o,this.engine,_),u.set(o,h)}return h}let r=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,i);let c=u=>{Array.isArray(u)?u.forEach(c):this.engine.registerTrigger(r,a,i,u.name,u)};return e.data.animation.forEach(c),new DD(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,e,t){if(i>=0&&ie(t));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[a,c]=r;a(c)}),this._animationCallbacksBuffer=[]})}),o.push([e,t])}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(i){this.engine.flush(),this.delegate.componentReplaced?.(i)}};var ZJ=(()=>{class n extends Qh{constructor(e,t,o){super(e,t,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||n)(ge(Xi),ge(su),ge(lu))};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();function JJ(){return new Pb}function eee(){return new Vb(f(VO),f(Qh),f(Vi))}var HR=[{provide:lu,useFactory:JJ},{provide:Qh,useClass:ZJ},{provide:sd,useFactory:eee}],tee=[{provide:su,useClass:PD},{provide:ak,useValue:"NoopAnimations"},...HR],$R=[{provide:su,useFactory:()=>new Rb},{provide:ak,useFactory:()=>"BrowserAnimations"},...HR],UR=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?tee:$R}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({providers:$R,imports:[rC]})}return n})();function nee(n,i){return typeof n>"u"?typeof i>"u"?n:i:n}function FD(n,i){return n=nee(n,i),typeof n=="function"?function(){for(var t=arguments,o=arguments.length,r=Array(o),a=0;a"u"?"undefined":AD(n))==="object"&&n.nodeType===1&&AD(n.style)==="object"&&AD(n.ownerDocument)==="object"};function qR(n,i){if(i=VD(i,!0),!WR(i))return-1;for(var e=0;e0;)e[t]=i[t+1];return e=e.map(VD),iee(n,e)}function ree(n){for(var i=arguments,e=[],t=arguments.length-1;t-- >0;)e[t]=i[t+1];return e.map(VD).reduce(function(o,r){var a=qR(n,r);return a!==-1?o.concat(n.splice(a,1)):o},[])}function VD(n,i){if(typeof n=="string")try{return document.querySelector(n)}catch(e){throw e}if(!WR(n)&&!i)throw new TypeError(n+" is not a DOM element.");return n}function aee(n,i){i=i||{};var e=FD(i.allowUpdate,!0);return function(o){if(o=o||window.event,n.target=o.target||o.srcElement||o.originalTarget,n.element=this,n.type=o.type,!!e(o)){if(o.targetTouches)n.x=o.targetTouches[0].clientX,n.y=o.targetTouches[0].clientY,n.pageX=o.targetTouches[0].pageX,n.pageY=o.targetTouches[0].pageY,n.screenX=o.targetTouches[0].screenX,n.screenY=o.targetTouches[0].screenY;else{if(o.pageX===null&&o.clientX!==null){var r=o.target&&o.target.ownerDocument||document,a=r.documentElement,c=r.body;n.pageX=o.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),n.pageY=o.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)}else n.pageX=o.pageX,n.pageY=o.pageY;n.x=o.clientX,n.y=o.clientY,n.screenX=o.screenX,n.screenY=o.screenY}n.clientX=n.x,n.clientY=n.y}}}function see(){var n={top:{value:0,enumerable:!0},left:{value:0,enumerable:!0},right:{value:window.innerWidth,enumerable:!0},bottom:{value:window.innerHeight,enumerable:!0},width:{value:window.innerWidth,enumerable:!0},height:{value:window.innerHeight,enumerable:!0},x:{value:0,enumerable:!0},y:{value:0,enumerable:!0}};if(Object.create)return Object.create({},n);var i={};return Object.defineProperties(i,n),i}function QR(n){if(n===window)return see();try{var i=n.getBoundingClientRect();return i.x===void 0&&(i.x=i.left,i.y=i.top),i}catch{throw new TypeError("Can't call getBoundingClientRect on "+n)}}function lee(n,i){var e=QR(i);return n.y>e.top&&n.ye.left&&n.x"u")return function(){};for(var n=0,i=w0.length;n"u")return function(){};for(var n=0,i=w0.length;nue.right-e.margin.right?be=Math.ceil(Math.min(1,(a.x-ue.right)/e.margin.right+1)*e.maxSpeed.right):be=0,a.yue.bottom-e.margin.bottom?me=Math.ceil(Math.min(1,(a.y-ue.bottom)/e.margin.bottom+1)*e.maxSpeed.bottom):me=0,e.syncMove()&&p.dispatch($,{pageX:a.pageX+be,pageY:a.pageY+me,clientX:a.x+be,clientY:a.y+me}),setTimeout(function(){me&&oe($,me),be&&G($,be)})}function oe($,ue){$===window?window.scrollTo($.pageXOffset,$.pageYOffset+ue):$.scrollTop+=ue}function G($,ue){$===window?window.scrollTo($.pageXOffset+ue,$.pageYOffset):$.scrollLeft+=ue}}function pee(n,i){return new mee(n,i)}function GR(n,i,e){return e?n.y>e.top&&n.ye.left&&n.x{class n{constructor(){this.currentDrag=new He}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),hee=(()=>{class n{constructor(){this.elementRef=f(Zt)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=ft({type:n,selectors:[["","mwlDraggableScrollContainer",""]]})}}return n})();function fee(n,i,e){e&&e.split(" ").forEach(t=>n.addClass(i.nativeElement,t))}function gee(n,i,e){e&&e.split(" ").forEach(t=>n.removeClass(i.nativeElement,t))}var KR=(()=>{class n{constructor(){this.dragAxis={x:!0,y:!0},this.dragSnapGrid={},this.ghostDragEnabled=!0,this.showOriginalElementWhileDragging=!1,this.dragCursor="",this.autoScroll={margin:20},this.dragPointerDown=new ve,this.dragStart=new ve,this.ghostElementCreated=new ve,this.dragging=new ve,this.dragEnd=new ve,this.pointerDown$=new He,this.pointerMove$=new He,this.pointerUp$=new He,this.eventListenerSubscriptions={},this.destroy$=new He,this.timeLongPress={timerBegin:0,timerEnd:0},this.element=f(Zt),this.renderer=f(Si),this.draggableHelper=f(uee),this.zone=f(Vi),this.vcr=f(oo),this.scrollContainer=f(hee,{optional:!0}),this.document=f(Xi)}ngOnInit(){this.checkEventListeners();let e=this.pointerDown$.pipe(ai(()=>this.canDrag()),ic(t=>{t.event.stopPropagation&&!this.scrollContainer&&t.event.stopPropagation();let o=this.renderer.createElement("style");this.renderer.setAttribute(o,"type","text/css"),this.renderer.appendChild(o,this.renderer.createText(` body * { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; } `)),requestAnimationFrame(()=>{this.document.head.appendChild(o)});let r=this.getScrollPosition(),a=new Dr(x=>{let b=this.scrollContainer?this.scrollContainer.elementRef.nativeElement:"window";return this.renderer.listen(b,"scroll",M=>x.next(M))}).pipe(pi(r),Lt(()=>this.getScrollPosition())),c=new He,p=new Hd;this.dragPointerDown.observers.length>0&&this.zone.run(()=>{this.dragPointerDown.next({x:0,y:0})});let u=Hn(this.pointerUp$,this.pointerDown$,p,this.destroy$).pipe(Dl()),h=Pr([this.pointerMove$,a]).pipe(Lt(([x,b])=>({currentDrag$:c,transformX:x.clientX-t.clientX,transformY:x.clientY-t.clientY,clientX:x.clientX,clientY:x.clientY,scrollLeft:b.left,scrollTop:b.top,target:x.event.target})),Lt(x=>(this.dragSnapGrid.x&&(x.transformX=Math.round(x.transformX/this.dragSnapGrid.x)*this.dragSnapGrid.x),this.dragSnapGrid.y&&(x.transformY=Math.round(x.transformY/this.dragSnapGrid.y)*this.dragSnapGrid.y),x)),Lt(x=>(this.dragAxis.x||(x.transformX=0),this.dragAxis.y||(x.transformY=0),x)),Lt(x=>{let b=x.scrollLeft-r.left,M=x.scrollTop-r.top;return it(K({},x),{x:x.transformX+b,y:x.transformY+M})}),ai(({x,y:b,transformX:M,transformY:w})=>!this.validateDrag||this.validateDrag({x,y:b,transform:{x:M,y:w}})),tt(u),Dl()),_=h.pipe(Ao(1),Dl()),S=h.pipe(xO(1),Dl());return _.subscribe(({clientX:x,clientY:b,x:M,y:w})=>{if(this.dragStart.observers.length>0&&this.zone.run(()=>{this.dragStart.next({cancelDrag$:p})}),this.scroller=XR([this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.defaultView],it(K({},this.autoScroll),{autoScroll(){return!0}})),fee(this.renderer,this.element,this.dragActiveClass),this.ghostDragEnabled){let y=this.element.nativeElement.getBoundingClientRect(),E=this.element.nativeElement.cloneNode(!0);if(this.showOriginalElementWhileDragging||this.renderer.setStyle(this.element.nativeElement,"visibility","hidden"),this.ghostElementAppendTo?this.ghostElementAppendTo.appendChild(E):this.element.nativeElement.parentNode.insertBefore(E,this.element.nativeElement.nextSibling),this.ghostElement=E,this.document.body.style.cursor=this.dragCursor,this.setElementStyles(E,{position:"fixed",top:`${y.top}px`,left:`${y.left}px`,width:`${y.width}px`,height:`${y.height}px`,cursor:this.dragCursor,margin:"0",willChange:"transform",pointerEvents:"none"}),this.ghostElementTemplate){let I=this.vcr.createEmbeddedView(this.ghostElementTemplate);E.innerHTML="",I.rootNodes.filter(D=>D instanceof Node).forEach(D=>{E.appendChild(D)}),S.subscribe(()=>{this.vcr.remove(this.vcr.indexOf(I))})}this.ghostElementCreated.observers.length>0&&this.zone.run(()=>{this.ghostElementCreated.emit({clientX:x-M,clientY:b-w,element:E})}),S.subscribe(()=>{E.parentElement.removeChild(E),this.ghostElement=null,this.renderer.setStyle(this.element.nativeElement,"visibility","")})}this.draggableHelper.currentDrag.next(c)}),S.pipe(ic(x=>{let b=p.pipe(_O(),Ao(1),Lt(M=>it(K({},x),{dragCancelled:M>0})));return p.complete(),b})).subscribe(({x,y:b,dragCancelled:M})=>{this.scroller.destroy(),this.dragEnd.observers.length>0&&this.zone.run(()=>{this.dragEnd.next({x,y:b,dragCancelled:M})}),gee(this.renderer,this.element,this.dragActiveClass),c.complete()}),Hn(u,S).pipe(Ao(1)).subscribe(()=>{requestAnimationFrame(()=>{this.document.head.removeChild(o)})}),h}),Dl());Hn(e.pipe(Ao(1),Lt(t=>[,t])),e.pipe(Yv())).pipe(ai(([t,o])=>t?t.x!==o.x||t.y!==o.y:!0),Lt(([t,o])=>o)).subscribe(({x:t,y:o,currentDrag$:r,clientX:a,clientY:c,transformX:p,transformY:u,target:h})=>{this.dragging.observers.length>0&&this.zone.run(()=>{this.dragging.next({x:t,y:o})}),requestAnimationFrame(()=>{if(this.ghostElement){let _=`translate3d(${p}px, ${u}px, 0px)`;this.setElementStyles(this.ghostElement,{transform:_,"-webkit-transform":_,"-ms-transform":_,"-moz-transform":_,"-o-transform":_})}}),r.next({clientX:a,clientY:c,dropData:this.dropData,target:h})})}ngOnChanges(e){e.dragAxis&&this.checkEventListeners()}ngOnDestroy(){this.unsubscribeEventListeners(),this.pointerDown$.complete(),this.pointerMove$.complete(),this.pointerUp$.complete(),this.destroy$.next()}checkEventListeners(){let e=this.canDrag(),t=Object.keys(this.eventListenerSubscriptions).length>0;e&&!t?this.zone.runOutsideAngular(()=>{this.eventListenerSubscriptions.mousedown=this.renderer.listen(this.element.nativeElement,"mousedown",o=>{this.onMouseDown(o)}),this.eventListenerSubscriptions.mouseup=this.renderer.listen("document","mouseup",o=>{this.onMouseUp(o)}),this.eventListenerSubscriptions.touchstart=this.renderer.listen(this.element.nativeElement,"touchstart",o=>{this.onTouchStart(o)}),this.eventListenerSubscriptions.touchend=this.renderer.listen("document","touchend",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.touchcancel=this.renderer.listen("document","touchcancel",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.mouseenter=this.renderer.listen(this.element.nativeElement,"mouseenter",()=>{this.onMouseEnter()}),this.eventListenerSubscriptions.mouseleave=this.renderer.listen(this.element.nativeElement,"mouseleave",()=>{this.onMouseLeave()})}):!e&&t&&this.unsubscribeEventListeners()}onMouseDown(e){e.button===0&&(this.eventListenerSubscriptions.mousemove||(this.eventListenerSubscriptions.mousemove=this.renderer.listen("document","mousemove",t=>{this.pointerMove$.next({event:t,clientX:t.clientX,clientY:t.clientY})})),this.pointerDown$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onMouseUp(e){e.button===0&&(this.eventListenerSubscriptions.mousemove&&(this.eventListenerSubscriptions.mousemove(),delete this.eventListenerSubscriptions.mousemove),this.pointerUp$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onTouchStart(e){let t,o,r;if(this.touchStartLongPress&&(this.timeLongPress.timerBegin=Date.now(),o=!1,r=this.hasScrollbar(),t=this.getScrollPosition()),!this.eventListenerSubscriptions.touchmove){let a=sr(this.document,"contextmenu").subscribe(p=>{p.preventDefault()}),c=sr(this.document,"touchmove",{passive:!1}).subscribe(p=>{this.touchStartLongPress&&!o&&r&&(o=this.shouldBeginDrag(e,p,t)),(!this.touchStartLongPress||!r||o)&&(p.preventDefault(),this.pointerMove$.next({event:p,clientX:p.targetTouches[0].clientX,clientY:p.targetTouches[0].clientY}))});this.eventListenerSubscriptions.touchmove=()=>{a.unsubscribe(),c.unsubscribe()}}this.pointerDown$.next({event:e,clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})}onTouchEnd(e){this.eventListenerSubscriptions.touchmove&&(this.eventListenerSubscriptions.touchmove(),delete this.eventListenerSubscriptions.touchmove,this.touchStartLongPress&&this.enableScroll()),this.pointerUp$.next({event:e,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY})}onMouseEnter(){this.setCursor(this.dragCursor)}onMouseLeave(){this.setCursor("")}canDrag(){return this.dragAxis.x||this.dragAxis.y}setCursor(e){this.eventListenerSubscriptions.mousemove||this.renderer.setStyle(this.element.nativeElement,"cursor",e)}unsubscribeEventListeners(){Object.keys(this.eventListenerSubscriptions).forEach(e=>{this.eventListenerSubscriptions[e](),delete this.eventListenerSubscriptions[e]})}setElementStyles(e,t){Object.keys(t).forEach(o=>{this.renderer.setStyle(e,o,t[o])})}getScrollElement(){return this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.body}getScrollPosition(){return this.scrollContainer?{top:this.scrollContainer.elementRef.nativeElement.scrollTop,left:this.scrollContainer.elementRef.nativeElement.scrollLeft}:{top:window.pageYOffset||this.document.documentElement.scrollTop,left:window.pageXOffset||this.document.documentElement.scrollLeft}}shouldBeginDrag(e,t,o){let r=this.getScrollPosition(),a={top:Math.abs(r.top-o.top),left:Math.abs(r.left-o.left)},c=Math.abs(t.targetTouches[0].clientX-e.touches[0].clientX)-a.left,p=Math.abs(t.targetTouches[0].clientY-e.touches[0].clientY)-a.top,u=c+p,h=this.touchStartLongPress;return(u>h.delta||a.top>0||a.left>0)&&(this.timeLongPress.timerBegin=Date.now()),this.timeLongPress.timerEnd=Date.now(),this.timeLongPress.timerEnd-this.timeLongPress.timerBegin>=h.delay?(this.disableScroll(),!0):!1}enableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow",""),this.renderer.setStyle(this.document.body,"overflow","")}disableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow","hidden"),this.renderer.setStyle(this.document.body,"overflow","hidden")}hasScrollbar(){let e=this.getScrollElement(),t=e.scrollWidth>e.clientWidth,o=e.scrollHeight>e.clientHeight;return t||o}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=ft({type:n,selectors:[["","mwlDraggable",""]],inputs:{dropData:"dropData",dragAxis:"dragAxis",dragSnapGrid:"dragSnapGrid",ghostDragEnabled:"ghostDragEnabled",showOriginalElementWhileDragging:"showOriginalElementWhileDragging",validateDrag:"validateDrag",dragCursor:"dragCursor",dragActiveClass:"dragActiveClass",ghostElementAppendTo:"ghostElementAppendTo",ghostElementTemplate:"ghostElementTemplate",touchStartLongPress:"touchStartLongPress",autoScroll:"autoScroll"},outputs:{dragPointerDown:"dragPointerDown",dragStart:"dragStart",ghostElementCreated:"ghostElementCreated",dragging:"dragging",dragEnd:"dragEnd"},features:[bn]})}}return n})();var Bb=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=Ht({type:n})}static{this.\u0275inj=$t({})}}return n})();var M0=class{constructor(i){this.rawFile=i;let e=i instanceof HTMLInputElement?i.value:i;this[`_createFrom${typeof e=="string"?"FakePath":"Object"}`](e)}_createFromFakePath(i){this.lastModifiedDate=void 0,this.size=void 0,this.type=`like/${i.slice(i.lastIndexOf(".")+1).toLowerCase()}`,this.name=i.slice(i.lastIndexOf("/")+i.lastIndexOf("\\")+2)}_createFromObject(i){this.size=i.size,this.type=i.type,this.name=i.name}},BD=class{constructor(i,e,t){this.url="/",this.headers=[],this.withCredentials=!0,this.formData=[],this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.uploader=i,this.some=e,this.options=t,this.file=new M0(e),this._file=e,i.options&&(this.method=i.options.method||"POST",this.alias=i.options.itemAlias||"file"),this.url=i.options.url}upload(){try{this.uploader.uploadItem(this)}catch{this.uploader._onCompleteItem(this,"",0,{}),this.uploader._onErrorItem(this,"",0,{})}}cancel(){this.uploader.cancelItem(this)}remove(){this.uploader.removeFromQueue(this)}onBeforeUpload(){}onBuildForm(i){return{form:i}}onProgress(i){return{progress:i}}onSuccess(i,e,t){return{response:i,status:e,headers:t}}onError(i,e,t){return{response:i,status:e,headers:t}}onCancel(i,e,t){return{response:i,status:e,headers:t}}onComplete(i,e,t){return{response:i,status:e,headers:t}}_onBeforeUpload(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()}_onBuildForm(i){this.onBuildForm(i)}_onProgress(i){this.progress=i,this.onProgress(i)}_onSuccess(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=void 0,this.onSuccess(i,e,t)}_onError(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=void 0,this.onError(i,e,t)}_onCancel(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=void 0,this.onCancel(i,e,t)}_onComplete(i,e,t){this.onComplete(i,e,t),this.uploader.options.removeAfterUpload&&this.remove()}_prepareToUploading(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},vee=(()=>{class n{static getMimeClass(e){let t="application";return e?.type&&this.mime_psd.indexOf(e.type)!==-1||e?.type?.match("image.*")?t="image":e?.type?.match("video.*")?t="video":e?.type?.match("audio.*")?t="audio":e?.type==="application/pdf"?t="pdf":e?.type&&this.mime_compress.indexOf(e.type)!==-1?t="compress":e?.type&&this.mime_doc.indexOf(e.type)!==-1?t="doc":e?.type&&this.mime_xsl.indexOf(e.type)!==-1?t="xls":e?.type&&this.mime_ppt.indexOf(e.type)!==-1&&(t="ppt"),t==="application"&&e?.name&&(t=this.fileTypeDetection(e.name)),t}static fileTypeDetection(e){let t={jpg:"image",jpeg:"image",tif:"image",psd:"image",bmp:"image",png:"image",nef:"image",tiff:"image",cr2:"image",dwg:"image",cdr:"image",ai:"image",indd:"image",pin:"image",cdp:"image",skp:"image",stp:"image","3dm":"image",mp3:"audio",wav:"audio",wma:"audio",mod:"audio",m4a:"audio",compress:"compress",zip:"compress",rar:"compress","7z":"compress",lz:"compress",z01:"compress",bz2:"compress",gz:"compress",pdf:"pdf",xls:"xls",xlsx:"xls",ods:"xls",mp4:"video",avi:"video",wmv:"video",mpg:"video",mts:"video",flv:"video","3gp":"video",vob:"video",m4v:"video",mpeg:"video",m2ts:"video",mov:"video",doc:"doc",docx:"doc",eps:"doc",txt:"doc",odt:"doc",rtf:"doc",ppt:"ppt",pptx:"ppt",pps:"ppt",ppsx:"ppt",odp:"ppt"},o=e.split(".");if(o.length<2)return"application";let r=o[o.length-1].toLowerCase();return t[r]===void 0?"application":t[r]}}return n.mime_doc=["application/msword","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-word.document.macroEnabled.12","application/vnd.ms-word.template.macroEnabled.12"],n.mime_xsl=["application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-excel.template.macroEnabled.12","application/vnd.ms-excel.addin.macroEnabled.12","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],n.mime_ppt=["application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/vnd.ms-powerpoint.addin.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],n.mime_psd=["image/photoshop","image/x-photoshop","image/psd","application/photoshop","application/psd","zz-application/zz-winassoc-psd"],n.mime_compress=["application/x-gtar","application/x-gcompress","application/compress","application/x-tar","application/x-rar-compressed","application/octet-stream","application/x-zip-compressed","application/zip-compressed","application/x-7z-compressed","application/gzip","application/x-bzip2"],n})();function Cee(n){return File&&n instanceof File}var $a=class{constructor(i){this.isUploading=!1,this.queue=[],this.progress=0,this._nextIndex=0,this.options={autoUpload:!1,isHTML5:!0,filters:[],removeAfterUpload:!1,disableMultipart:!1,formatDataFunction:e=>e._file,formatDataFunctionIsAsync:!1,url:""},this.setOptions(i),this.response=new ve}setOptions(i){this.options=Object.assign(this.options,i),this.authToken=this.options.authToken,this.authTokenHeader=this.options.authTokenHeader||"Authorization",this.autoUpload=this.options.autoUpload,this.options.filters?.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.options.maxFileSize&&this.options.filters?.unshift({name:"fileSize",fn:this._fileSizeFilter}),this.options.allowedFileType&&this.options.filters?.unshift({name:"fileType",fn:this._fileTypeFilter}),this.options.allowedMimeType&&this.options.filters?.unshift({name:"mimeType",fn:this._mimeTypeFilter});for(let e=0;e{o||(o=this.options);let h=new M0(u);if(this._isValidFile(h,a,o)){let _=new BD(this,u,o);p.push(_),this.queue.push(_),this._onAfterAddingFile(_)}else if(this._failFilterIndex){let _=a[this._failFilterIndex];this._onWhenAddingFileFailed(h,_,o)}}),this.queue.length!==c&&(this._onAfterAddingAll(p),this.progress=this._getTotalProgress()),this._render(),this.options.autoUpload&&this.uploadAll()}removeFromQueue(i){let e=this.getIndexOfItem(i),t=this.queue[e];t.isUploading&&t.cancel(),this.queue.splice(e,1),this.progress=this._getTotalProgress()}clearQueue(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}uploadItem(i){let e=this.getIndexOfItem(i),t=this.queue[e],o=this.options.isHTML5?"_xhrTransport":"_iframeTransport";t._prepareToUploading(),!this.isUploading&&(this.isUploading=!0,this[o](t))}cancelItem(i){let e=this.getIndexOfItem(i),t=this.queue[e],o=this.options.isHTML5?t._xhr:t._form;t&&t.isUploading&&o.abort()}uploadAll(){let i=this.getNotUploadedItems().filter(e=>!e.isUploading);i.length&&(i.map(e=>e._prepareToUploading()),i[0].upload())}cancelAll(){this.getNotUploadedItems().map(e=>e.cancel())}isFile(i){return Cee(i)}isFileLikeObject(i){return i instanceof M0}getIndexOfItem(i){return typeof i=="number"?i:this.queue.indexOf(i)}getNotUploadedItems(){return this.queue.filter(i=>!i.isUploaded)}getReadyItems(){return this.queue.filter(i=>i.isReady&&!i.isUploading).sort((i,e)=>i.index-e.index)}onAfterAddingAll(i){return{fileItems:i}}onBuildItemForm(i,e){return{fileItem:i,form:e}}onAfterAddingFile(i){return{fileItem:i}}onWhenAddingFileFailed(i,e,t){return{item:i,filter:e,options:t}}onBeforeUploadItem(i){return{fileItem:i}}onProgressItem(i,e){return{fileItem:i,progress:e}}onProgressAll(i){return{progress:i}}onSuccessItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onErrorItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCancelItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCompleteItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCompleteAll(){}_mimeTypeFilter(i){return!(i?.type&&this.options.allowedMimeType&&this.options.allowedMimeType?.indexOf(i.type)===-1)}_fileSizeFilter(i){return!(this.options.maxFileSize&&i.size>this.options.maxFileSize)}_fileTypeFilter(i){return!(this.options.allowedFileType&&this.options.allowedFileType.indexOf(vee.getMimeClass(i))===-1)}_onErrorItem(i,e,t,o){i._onError(e,t,o),this.onErrorItem(i,e,t,o)}_onCompleteItem(i,e,t,o){i._onComplete(e,t,o),this.onCompleteItem(i,e,t,o);let r=this.getReadyItems()[0];if(this.isUploading=!1,r){r.upload();return}this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render()}_headersGetter(i){return e=>e?i[e.toLowerCase()]||void 0:i}_xhrTransport(i){let e=this,t=i._xhr=new XMLHttpRequest,o;if(this._onBeforeUploadItem(i),typeof i._file.size!="number")throw new TypeError("The file specified is no longer valid");if(this.options.disableMultipart)this.options.formatDataFunction&&(o=this.options.formatDataFunction(i));else{o=new FormData,this._onBuildItemForm(i,o);let r=()=>o.append(i.alias,i._file,i.file.name);this.options.parametersBeforeFiles||r(),this.options.additionalParameter!==void 0&&Object.keys(this.options.additionalParameter).forEach(a=>{let c=this.options.additionalParameter?.[a];typeof c=="string"&&c.indexOf("{{file_name}}")>=0&&i.file?.name&&(c=c.replace("{{file_name}}",i.file.name)),o.append(a,c)}),r&&this.options.parametersBeforeFiles&&r()}if(t.upload.onprogress=r=>{let a=Math.round(r.lengthComputable?r.loaded*100/r.total:0);this._onProgressItem(i,a)},t.onload=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r),p=`_on${this._isSuccessCode(t.status)?"Success":"Error"}Item`;this[p](i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},t.onerror=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onErrorItem(i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},t.onabort=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onCancelItem(i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},i.method&&i.url&&t.open(i.method,i.url,!0),t.withCredentials=i.withCredentials,this.options.headers)for(let r of this.options.headers)t.setRequestHeader(r.name,r.value);if(i.headers.length)for(let r of i.headers)t.setRequestHeader(r.name,r.value);this.authToken&&this.authTokenHeader&&t.setRequestHeader(this.authTokenHeader,this.authToken),t.onreadystatechange=function(){t.readyState==XMLHttpRequest.DONE&&e.response.emit(t.responseText)},this.options.formatDataFunctionIsAsync?o.then(r=>t.send(JSON.stringify(r))):t.send(o),this._render()}_getTotalProgress(i=0){if(this.options.removeAfterUpload)return i;let e=this.getNotUploadedItems().length,t=e?this.queue.length-e:this.queue.length,o=100/this.queue.length,r=i*o/100;return Math.round(t*o+r)}_getFilters(i){if(!i)return this.options?.filters||[];if(Array.isArray(i))return i;if(typeof i=="string"){let e=i.match(/[^\s,]+/g);return this.options?.filters||[].filter(t=>e?.indexOf(t.name)!==-1)}return this.options?.filters||[]}_render(){}_queueLimitFilter(){return this.options.queueLimit===void 0||this.queue.length(this._failFilterIndex&&this._failFilterIndex++,o.fn.call(this,i,t))):!0}_isSuccessCode(i){return i>=200&&i<300||i===304}_transformResponse(i,e){return i}_parseHeaders(i){let e={},t,o,r;return i&&i.split(` `).map(a=>{r=a.indexOf(":"),t=a.slice(0,r).trim().toLowerCase(),o=a.slice(r+1).trim(),t&&(e[t]=e[t]?e[t]+", "+o:o)}),e}_onWhenAddingFileFailed(i,e,t){this.onWhenAddingFileFailed(i,e,t)}_onAfterAddingFile(i){this.onAfterAddingFile(i)}_onAfterAddingAll(i){this.onAfterAddingAll(i)}_onBeforeUploadItem(i){i._onBeforeUpload(),this.onBeforeUploadItem(i)}_onBuildItemForm(i,e){i._onBuildForm(e),this.onBuildItemForm(i,e)}_onProgressItem(i,e){let t=this._getTotalProgress(e);this.progress=t,i._onProgress(e),this.onProgressItem(i,e),this.onProgressAll(t),this._render()}_onSuccessItem(i,e,t,o){i._onSuccess(e,t,o),this.onSuccessItem(i,e,t,o)}_onCancelItem(i,e,t,o){i._onCancel(e,t,o),this.onCancelItem(i,e,t,o)}};var Ac=(()=>{class n{constructor(e){this.onFileSelected=new ve,this.element=e}getOptions(){return this.uploader?.options}getFilters(){return""}isEmptyAfterSelection(){return!!this.element.nativeElement.attributes.multiple}onChange(){let e=this.element.nativeElement.files,t=this.getOptions(),o=this.getFilters();this.uploader?.addToQueue(e,t,o),this.onFileSelected.emit(e),this.isEmptyAfterSelection()&&(this.element.nativeElement.value="")}}return n.\u0275fac=function(e){return new(e||n)(ot(Zt))},n.\u0275dir=ft({type:n,selectors:[["","ng2FileSelect",""]],hostBindings:function(e,t){e&1&&g("change",function(){return t.onChange()})},inputs:{uploader:"uploader"},outputs:{onFileSelected:"onFileSelected"},standalone:!1}),n})(),sl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ht({type:n}),n.\u0275inj=$t({imports:[ne]}),n})();var du=class{visible;error;clear;constructor(i,e,t=!1){this.visible=i,this.error=e,this.clear=t}},no=(()=>{class n{state=new an(new du(!1));constructor(){}setError(e){this.state.next(new du(!1,e.error))}clear(){this.state.next(new du(!1,null,!0))}activate(){this.state.next(new du(!0))}deactivate(){this.state.next(new du(!1))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();function bee(n,i){n&1&&(s(0,"div",1),R(1,"mat-spinner",3),l())}function xee(n,i){if(n&1){let e=z();s(0,"div",2)(1,"div",4)(2,"mat-icon"),d(3,"error_outline"),l()(),s(4,"div"),d(5),l(),s(6,"div")(7,"button",5),g("click",function(){k(e);let o=v(2);return T(o.refresh())}),s(8,"mat-icon"),d(9,"refresh"),l()(),s(10,"button",6)(11,"mat-icon"),d(12,"home"),l()()()()}if(n&2){let e,t=v(2);m(5),ee("Error occurred: ",(e=t.error())==null?null:e.message)}}function yee(n,i){if(n&1&&(s(0,"div",0),A(1,bee,2,0,"div",1),A(2,xee,13,1,"div",2),l()),n&2){let e=v();m(),O(e.visible()&&!e.error()?1:-1),m(),O(e.error()?2:-1)}}var xm=(()=>{class n{progressService=f(no);router=f(ht);visible=ae(!1);error=ae(null);routerSubscription;ngOnInit(){this.progressService.state.subscribe(e=>{this.visible.set(e.visible),e.error&&!this.error()&&this.error.set(e.error),e.clear&&this.error.set(null)}),this.routerSubscription=this.router.events.subscribe(()=>{this.progressService.clear()})}refresh(){this.router.navigateByUrl(this.router.url)}ngOnDestroy(){this.routerSubscription.unsubscribe()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-progress"]],decls:1,vars:1,consts:[[1,"overlay"],[1,"loading-spinner"],[1,"error-state"],["color","primary"],[1,"error-icon"],["mat-button","","matTooltip","Refresh page","matTooltipClass","custom-tooltip",3,"click"],["mat-button","","routerLink","/","matTooltip","Go to home","matTooltipClass","custom-tooltip"]],template:function(t,o){t&1&&A(0,yee,3,2,"div",0),t&2&&O(o.visible()||o.error()?0:-1)},dependencies:[ne,pn,li,ie,de,W,pe,wt,It,vn],styles:[".overlay[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;inset:0;background-color:color-mix(in srgb,var(--mat-sys-shadow) 50%,transparent);z-index:2000}.loading-spinner[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.error-state[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{text-align:center}.error-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;height:64px}"],changeDetection:0})}return n})();var zb=(()=>{class n{document;router=f(ht);controllerService=f(Je);progressService=f(no);constructor(e){this.document=e}ngOnInit(){this.progressService.activate(),setTimeout(()=>{let e;parseInt(this.document.location.port,10)?e=parseInt(this.document.location.port,10):this.document.location.protocol=="https:"?e=443:e=80,this.controllerService.getLocalController(this.document.location.hostname,e).then(t=>{this.router.navigate(["/controller",t.id,"projects"]),this.progressService.deactivate()})},100)}static \u0275fac=function(t){return new(t||n)(ot(Xi))};static \u0275cmp=F({type:n,selectors:[["app-bundled-controller-finder"]],decls:1,vars:0,template:function(t,o){t&1&&R(0,"app-progress")},dependencies:[xm],encapsulation:2,changeDetection:0})}return n})();var See=["mat-menu-item",""],wee=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Mee=["mat-icon, [matMenuItemIcon]","*"];function kee(n,i){n&1&&(ei(),s(0,"svg",2),R(1,"polygon",3),l())}var Tee=["*"];function Eee(n,i){if(n&1){let e=z();vo(0,"div",0),Jv("click",function(){k(e);let o=v();return T(o.closed.emit("click"))})("animationstart",function(o){k(e);let r=v();return T(r._onAnimationStart(o.animationName))})("animationend",function(o){k(e);let r=v();return T(r._onAnimationDone(o.animationName))})("animationcancel",function(o){k(e);let r=v();return T(r._onAnimationDone(o.animationName))}),vo(1,"div",1),on(2),wo()()}if(n&2){let e=v();er(e._classList),Be("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),Wo("id",e.panelId),qt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var jD=new cn("MAT_MENU_PANEL"),Ze=(()=>{class n{_elementRef=f(Zt);_document=f(Xi);_focusMonitor=f(Aa);_parentMenu=f(jD,{optional:!0});_changeDetectorRef=f(Q);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new He;_focused=new He;_highlighted=!1;_triggersSubmenu=!1;constructor(){f(cr).load(ia),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o{class n{_template=f(Oo);_appRef=f(TO);_injector=f(Jo);_viewContainerRef=f(oo);_document=f(Xi);_changeDetectorRef=f(Q);_portal;_outlet;_attached=new He;constructor(){}attach(e={}){this._portal||(this._portal=new pd(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new e4(this._document.createElement("div"),this._appRef,this._injector));let t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","matMenuContent",""]],features:[fn([{provide:JR,useExisting:n}])]})}return n})(),Dee=new cn("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),zD="_mat-menu-enter",jb="_mat-menu-exit",Qn=(()=>{class n{_elementRef=f(Zt);_changeDetectorRef=f(Q);_injector=f(Jo);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=qo();_allItems;_directDescendantItems=new Il;_classList={};_panelAnimationState="void";_animationDone=new He;_isAnimating=ae(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let t=this._previousPanelClass,o=K({},this._classList);t&&t.length&&t.split(" ").forEach(r=>{o[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{o[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new ve;close=this.closed;panelId=f(Mo).getId("mat-menu-panel-");constructor(){let e=f(Dee);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Gd(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Un(e=>Hn(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let o=e.toArray(),r=Math.max(0,Math.min(o.length-1,t.activeItemIndex||0));o[r]&&!o[r].disabled?t.setActiveItem(r):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Un(t=>Hn(...t.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,o=this._keyManager;switch(t){case 27:fa(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Xa(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=it(K({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===jb;(t||e===zD)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===zD||e===jb)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(jb),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?zD:jb)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(pi(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-menu"]],contentQueries:function(t,o,r){if(t&1&&Ki(r,JR,5)(r,Ze,5)(r,Ze,4),t&2){let a;mt(a=pt())&&(o.lazyContent=a.first),mt(a=pt())&&(o._allItems=a),mt(a=pt())&&(o.items=a)}},viewQuery:function(t,o){if(t&1&&xn(Oo,5),t&2){let r;mt(r=pt())&&(o.templateRef=r.first)}},hostVars:3,hostBindings:function(t,o){t&2&&qt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",Ct],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:Ct(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[fn([{provide:jD,useExisting:n}])],ngContentSelectors:Tee,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,o){t&1&&(ii(),ju(0,Eee,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none} `],encapsulation:2,changeDetection:0})}return n})(),Pee=new cn("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=f(Jo);return()=>pC(n)}});var Kh=new WeakMap,Iee=(()=>{class n{_canHaveBackdrop;_element=f(Zt);_viewContainerRef=f(oo);_menuItemInstance=f(Ze,{optional:!0,self:!0});_dir=f(Ka,{optional:!0});_focusMonitor=f(Aa);_ngZone=f(Vi);_injector=f(Jo);_scrollStrategy=f(Pee);_changeDetectorRef=f(Q);_animationsDisabled=qo();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=So.EMPTY;_menuCloseSubscription=So.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=f(jD,{optional:!0});this._parentMaterialMenu=t instanceof Qn?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Kh.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let o=Kh.get(t);Kh.set(t,this),o&&o!==this&&o._closeMenu();let r=this._createOverlay(t),a=r.getConfig(),c=a.positionStrategy;this._setPosition(t,c),this._canHaveBackdrop?a.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:a.hasBackdrop=t.hasBackdrop??!1,r.hasAttached()||(r.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof Qn&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(tt(t.close)).subscribe(()=>{c.withLockedPosition(!1).reapplyLastPosition(),c.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,o=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),o instanceof Qn&&this._ownsMenu(o)?(this._pendingRemoval=o._animationDone.pipe(Ao(1)).subscribe(()=>{t.detach(),Kh.has(o)||o.lazyContent?.detach()}),o._setIsOpen(!1)):(t.detach(),o?.lazyContent?.detach()),o&&this._ownsMenu(o)&&Kh.delete(o),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=fC(this._injector,t),this._overlayRef.keydownEvents().subscribe(o=>{this._menu instanceof Qn&&this._menu._handleKeydown(o)})}return this._overlayRef}_getOverlayConfig(e){return new uC({positionStrategy:hC(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(o=>{this._ngZone.run(()=>{let r=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(r,a)})})}_setPosition(e,t){let[o,r]=e.xPosition==="before"?["end","start"]:["start","end"],[a,c]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[p,u]=[a,c],[h,_]=[o,r],S=0;if(this._triggersSubmenu()){if(_=o=e.xPosition==="before"?"start":"end",r=h=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let x=this._parentMaterialMenu.items.first;this._parentInnerPadding=x?x._getHostElement().offsetTop:0}S=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(p=a==="top"?"bottom":"top",u=c==="top"?"bottom":"top");t.withPositions([{originX:o,originY:p,overlayX:h,overlayY:a,offsetY:S},{originX:r,originY:p,overlayX:_,overlayY:a,offsetY:S},{originX:o,originY:u,overlayX:h,overlayY:c,offsetY:-S},{originX:r,originY:u,overlayX:_,overlayY:c,offsetY:-S}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Nn(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ai(a=>this._menuOpen&&a!==this._menuItemInstance)):Nn();return Hn(e,o,r,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new pd(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Kh.get(e)===this}_triggerIsAriaDisabled(){return Ct(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){MO()};static \u0275dir=ft({type:n})}return n})(),Fn=(()=>{class n extends Iee{_cleanupTouchstart;_hoverSubscription=So.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new ve;onMenuOpen=this.menuOpened;menuClosed=new ve;onMenuClose=this.menuClosed;constructor(){super(!0);let e=f(Si);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{dC(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){cC(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,o){t&1&&g("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),t&2&&qt("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu==null?null:o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[si]})}return n})();var Ge=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[mc,Qu,hi,md]})}return n})();var Aee=[[["caption"]],[["colgroup"],["col"]],"*"],Oee=["caption","colgroup, col","*"];function Nee(n,i){n&1&&on(0,2)}function Fee(n,i){n&1&&(s(0,"thead",0),ro(1,1),l(),s(2,"tbody",2),ro(3,3)(4,4),l(),s(5,"tfoot",0),ro(6,5),l())}function Ree(n,i){n&1&&ro(0,1)(1,3)(2,4)(3,5)}var Sn=(()=>{class n extends JE{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275cmp=F({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,o){t&2&&Be("mat-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],features:[fn([{provide:JE,useExisting:n},{provide:Vl,useExisting:n},{provide:h0,useValue:null}]),si],ngContentSelectors:Oee,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(ii(Aee),on(0),on(1,1),A(2,Nee,1,0),A(3,Fee,7,0)(4,Ree,4,0)),t&2&&(m(2),O(o._isServer?2:-1),m(),O(o._isNativeHtmlTable?3:4))},dependencies:[KE,XE,ZE,YE],styles:[`.mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:var(--mat-table-header-container-height, 56px)}mat-row{min-height:var(--mat-table-row-item-container-height, 52px)}mat-footer-row{min-height:var(--mat-table-footer-container-height, 52px)}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mat-table-fixed-layout{table-layout:fixed}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:start;text-overflow:ellipsis}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:start}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch} `],encapsulation:2})}return n})(),wn=(()=>{class n extends hb{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matCellDef",""]],features:[fn([{provide:hb,useExisting:n}]),si]})}return n})(),Mn=(()=>{class n extends fb{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matHeaderCellDef",""]],features:[fn([{provide:fb,useExisting:n}]),si]})}return n})();var kn=(()=>{class n extends Cm{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[fn([{provide:Cm,useExisting:n}]),si]})}return n})(),Tn=(()=>{class n extends $6{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[si]})}return n})();var En=(()=>{class n extends H6{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[si]})}return n})();var Dn=(()=>{class n extends f0{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",Ct]},features:[fn([{provide:f0,useExisting:n}]),si]})}return n})();var Pn=(()=>{class n extends gb{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[fn([{provide:gb,useExisting:n}]),si]})}return n})(),In=(()=>{class n extends qE{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275cmp=F({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[fn([{provide:qE,useExisting:n}]),si],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})();var An=(()=>{class n extends QE{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275cmp=F({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[fn([{provide:QE,useExisting:n}]),si],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})();var hn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[_b,hi]})}return n})(),Lee=9007199254740991,pr=class extends cd{_data;_renderData=new an([]);_filter=new an("");_internalPageChanges=new He;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(i,e)=>{let t=i[e];if(WO(t)){let o=Number(t);return o{let t=e.active,o=e.direction;return!t||o==""?i:i.sort((r,a)=>{let c=this.sortingDataAccessor(r,t),p=this.sortingDataAccessor(a,t),u=typeof c,h=typeof p;u!==h&&(u==="number"&&(c+=""),h==="number"&&(p+=""));let _=0;return c!=null&&p!=null?c>p?_=1:c{let t=e.trim().toLowerCase();return Object.values(i).some(o=>`${o}`.toLowerCase().includes(t))};constructor(i=[]){super(),this._data=new an(i),this._updateChangeSubscription()}_updateChangeSubscription(){let i=this._sort?Hn(this._sort.sortChange,this._sort.initialized):Nn(null),e=this._paginator?Hn(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Nn(null),t=this._data,o=Pr([t,this._filter]).pipe(Lt(([c])=>this._filterData(c))),r=Pr([o,i]).pipe(Lt(([c])=>this._orderData(c))),a=Pr([r,e]).pipe(Lt(([c])=>this._pageData(c)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=a.subscribe(c=>this._renderData.next(c))}_filterData(i){return this.filteredData=this.filter==null||this.filter===""?i:i.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;let e=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(e,e+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=i,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,o=Math.min(e.pageIndex,t);o!==e.pageIndex&&(e.pageIndex=o,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var Vee=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms} `],encapsulation:2,changeDetection:0})}return n})(),Bee={passive:!0},t8=(()=>{class n{_platform=f($s);_ngZone=f(Vi);_renderer=f(sd).createRenderer(null,null);_styleLoader=f(cr);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Lu;this._styleLoader.load(Vee);let t=Al(e),o=this._monitoredElements.get(t);if(o)return o.subject;let r=new He,a="cdk-text-field-autofilled",c=u=>{u.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(a)?(t.classList.add(a),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!0}))):u.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(a)&&(t.classList.remove(a),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!1})))},p=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",c,Bee)));return this._monitoredElements.set(t,{subject:r,unlisten:p}),r}stopMonitoring(e){let t=Al(e),o=this._monitoredElements.get(t);o&&(o.unlisten(),o.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var n8=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({})}return n})();var i8=new cn("MAT_INPUT_VALUE_ACCESSOR");var zee=["button","checkbox","file","hidden","image","radio","range","reset","submit"],jee=new cn("MAT_INPUT_CONFIG"),Ee=(()=>{class n{_elementRef=f(Zt);_platform=f($s);ngControl=f(_C,{optional:!0,self:!0});_autofillMonitor=f(t8);_ngZone=f(Vi);_formField=f(Zu,{optional:!0});_renderer=f(Si);_uid=f(Mo).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=f(jee,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new He;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=wC(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Ue.required)??!1}set required(e){this._required=wC(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&mk().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=wC(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>mk().has(e));constructor(){let e=f(Gn,{optional:!0}),t=f(Rt,{optional:!0}),o=f(fd),r=f(i8,{optional:!0,self:!0}),a=this._elementRef.nativeElement,c=a.nodeName.toLowerCase();r?kO(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=a,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(a,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new TC(o,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=c==="select",this._isTextarea=c==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=a.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&ha(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){zee.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,o){t&1&&g("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),t&2&&(Wo("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),qt("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),Be("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Ct]},exportAs:["matInput"],features:[fn([{provide:kC,useExisting:n}]),bn]})}return n})(),Se=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[we,we,n8,hi]})}return n})();var Sm=(()=>{class n{data;dialogRef=f(Ie);templateName=ae("");constructor(e){this.data=e,this.templateName.set(e.templateName)}onNoClick(){this.dialogRef.close(!1)}onYesClick(){this.dialogRef.close(!0)}static \u0275fac=function(t){return new(t||n)(ot(gt))};static \u0275cmp=F({type:n,selectors:[["app-delete-confirmation-dialog"]],decls:9,vars:1,consts:[["mat-dialog-title",""],[1,"mat-mdc-dialog-content"],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click"]],template:function(t,o){t&1&&(s(0,"h2",0),d(1,"Delete template"),l(),s(2,"div",1),d(3),l(),s(4,"div",2)(5,"button",3),g("click",function(){return o.onNoClick()}),d(6,"No, cancel"),l(),s(7,"button",4),g("click",function(){return o.onYesClick()}),d(8,"Yes, delete!"),l()()),t&2&&(m(3),ee("Are you sure you want to delete template ",o.templateName(),"?"))},dependencies:[_e,Ne,Fe,W,pe],encapsulation:2,changeDetection:0})}return n})();var $ee=(n,i)=>i.compute_id;function Hee(n,i){if(n&1&&(s(0,"button",3)(1,"mat-icon"),d(2,"arrow_back"),l()()),n&2){let e=v();C("routerLink","/controller/"+e.controller.id+"/projects")}}function Uee(n,i){if(n&1){let e=z();s(0,"button",13),g("click",function(){k(e);let o=v();return T(o.openAddDialog())}),s(1,"mat-icon"),d(2,"add_circle_outline"),l()()}}function Gee(n,i){n&1&&(s(0,"div",10),d(1,"Loading..."),l())}function Wee(n,i){n&1&&(s(0,"div",11)(1,"mat-icon",14),d(2,"cloud_off"),l(),s(3,"p"),d(4,"No computes found. Click + to add one."),l()())}function qee(n,i){if(n&1&&(s(0,"span",22)(1,"mat-icon",23),d(2,"memory"),l(),d(3),l(),s(4,"span",22)(5,"mat-icon",23),d(6,"storage"),l(),d(7),l(),s(8,"span",22)(9,"mat-icon",23),d(10,"disc_full"),l(),d(11),l()),n&2){let e=v().$implicit,t=v(2);m(3),ee(" ",t.formatPercent(e.cpu_usage_percent)," "),m(4),ee(" ",t.formatPercent(e.memory_usage_percent)," "),m(4),ee(" ",t.formatPercent(e.disk_usage_percent)," ")}}function Qee(n,i){n&1&&(s(0,"span",21),d(1,"Offline"),l())}function Xee(n,i){if(n&1){let e=z();s(0,"button",24),g("click",function(o){return o.stopPropagation()}),s(1,"mat-icon"),d(2,"more_vert"),l()(),s(3,"mat-menu",25,0)(5,"button",26),g("click",function(){k(e);let o=v().$implicit,r=v(2);return T(r.openEditDialog(o))}),s(6,"mat-icon"),d(7,"edit"),l(),s(8,"span"),d(9,"Edit"),l()(),s(10,"button",26),g("click",function(){k(e);let o=v().$implicit,r=v(2);return T(r.connectCompute(o))}),s(11,"mat-icon"),d(12,"link"),l(),s(13,"span"),d(14,"Connect"),l()(),s(15,"button",26),g("click",function(){k(e);let o=v().$implicit,r=v(2);return T(r.deleteCompute(o))}),s(16,"mat-icon"),d(17,"delete"),l(),s(18,"span"),d(19,"Delete"),l()()()}if(n&2){let e=Pe(4);C("matMenuTriggerFor",e)}}function Kee(n,i){if(n&1&&(s(0,"div",15)(1,"mat-icon",16),d(2),l(),s(3,"div",17)(4,"span",18),d(5),l(),s(6,"span",19),d(7),l()(),s(8,"div",20),A(9,qee,12,3)(10,Qee,2,0,"span",21),l(),A(11,Xee,20,1),l()),n&2){let e=i.$implicit,t=v(2);m(),nn("color",t.getStatusColor(e)),C("matTooltip",e.connected?"Connected":"Disconnected"),m(),ee(" ",t.getStatusIcon(e)," "),m(3),j(e.name||e.compute_id),m(2),j(t.formatHost(e)),m(2),O(e.connected?9:10),m(2),O(e.compute_id!=="local"?11:-1)}}function Yee(n,i){if(n&1&&(s(0,"nav",12),Y(1,Kee,12,8,"div",15,$ee),l()),n&2){let e=v();m(),Z(e.computes())}}var Zee=(n,i)=>i.key;function Jee(n,i){if(n&1&&(s(0,"mat-option",6),d(1),l()),n&2){let e=i.$implicit;C("value",e.key),m(),j(e.name)}}function ete(n,i){n&1&&(s(0,"mat-error"),d(1,"You must select a protocol"),l())}function tte(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a host"),l())}function nte(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a port"),l())}function ite(n,i){n&1&&(s(0,"mat-error"),d(1,"Port must be between 1 and 65535"),l())}var r8=(()=>{class n{route=f(lt);controllerService=f(Je);computeService=f(ko);notificationService=f(Ws);toasterService=f(te);dialog=f(nt);cd=f(Q);controller;_computes=ae([]);computes=Jt(()=>[...this._computes()].sort((t,o)=>t.compute_id==="local"?-1:o.compute_id==="local"?1:(t.name||"").localeCompare(o.name||"")));displayedColumns=["status","name","host","connected","cpu","memory","disk","actions"];loading=ae(!0);subscription=new So;ngOnInit(){this.loadControllerAndComputes()}ngOnDestroy(){this.subscription.unsubscribe()}loadControllerAndComputes(){let e=this.route.snapshot.paramMap.get("controller_id");this.controllerService.get(parseInt(e,10)).then(t=>{if(this.controller=t,this.cd.markForCheck(),this.notificationService.hasCachedData()){let o=this.notificationService.getCachedComputes();this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}else this.loadComputes();this.subscription.add(this.notificationService.computeNotificationEmitter.subscribe(o=>{this.handleComputeNotification(o)})),this.subscription.add(this.notificationService.computeCacheUpdated.subscribe(o=>{this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}))},t=>{let o=t.error?.message||t.message||"Failed to load controller";this.toasterService.error(o),this.loading.set(!1),this.cd.markForCheck()})}handleComputeNotification(e){switch(e.action){case"compute.created":this._computes.update(t=>[...t,e.event]),this.toasterService.success(`Compute "${e.event.name}" added`);break;case"compute.updated":this._computes.update(t=>t.map(o=>o.compute_id===e.event.compute_id?e.event:o));break;case"compute.deleted":this._computes.update(t=>t.filter(o=>o.compute_id!==e.event.compute_id)),this.toasterService.success(`Compute "${e.event.name}" deleted`);break}this.cd.markForCheck()}loadComputes(){this.loading.set(!0),this.computeService.getComputes(this.controller).subscribe({next:e=>{this.notificationService.setInitialComputes(e),this._computes.set(e),this.loading.set(!1),this.cd.markForCheck()},error:e=>{let t=e.error?.message||e.message||"Failed to load computes";this.loading.set(!1),this.toasterService.error(t),this.cd.markForCheck()}})}openAddDialog(){this.dialog.open(o8,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller}}).afterClosed().subscribe(t=>{t&&this.computeService.createCompute(this.controller,t).subscribe({next:()=>{this.toasterService.success("Compute added successfully"),this.loadComputes()},error:o=>{let r=o.error?.message||o.message||"Failed to add compute";this.toasterService.error(r),this.cd.markForCheck()}})})}openEditDialog(e){this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:t=>{this.dialog.open(o8,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller,compute:t}}).afterClosed().subscribe(r=>{r&&this.computeService.updateCompute(this.controller,e.compute_id,r).subscribe({next:()=>{this.toasterService.success("Compute updated successfully"),this.loadComputes()},error:a=>{let c=a.error?.message||a.message||"Failed to update compute";this.toasterService.error(c),this.cd.markForCheck()}})})},error:t=>{let o=t.error?.message||t.message||"Failed to load compute details";this.toasterService.error(o),this.cd.markForCheck()}})}deleteCompute(e){this.dialog.open(Sm,{panelClass:["base-confirmation-dialog-panel","confirmation-danger-panel"],autoFocus:!1,disableClose:!0,data:{templateName:e.name||e.compute_id}}).afterClosed().subscribe(o=>{o&&this.computeService.deleteCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Compute deleted successfully"),this.loadComputes()},error:r=>{let a=r.error?.message||r.message||"Failed to delete compute";this.toasterService.error(a),this.cd.markForCheck()}})})}connectCompute(e){this.computeService.connectCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Connection request sent"),this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:t=>{let o=this.computes().map(r=>r.compute_id===t.compute_id?t:r);this._computes.set(o),this.cd.markForCheck()},error:()=>{this.loadComputes()}})},error:t=>{let o=t.error?.message||t.message||"Failed to connect compute";this.toasterService.error(o),this.cd.markForCheck()}})}getStatusIcon(e){return e.connected?"check_circle":"cancel"}getStatusColor(e){return e.connected?"var(--mat-sys-primary)":"var(--mat-sys-error)"}formatPercent(e){return e!=null?`${e.toFixed(1)}%`:"--"}formatHost(e){return`${e.host}:${e.port}`}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-computes"]],decls:15,vars:5,consts:[["menu","matMenu"],[1,"computes"],[1,"computes__header"],["mat-icon-button","",1,"computes__back-btn",3,"routerLink"],[1,"computes__title"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn"],[1,"computes__content"],[1,"computes__info"],[1,"computes__info-icon"],[1,"computes__info-text"],[1,"computes__loading"],[1,"computes__empty"],[1,"computes__list"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn",3,"click"],[1,"computes__empty-icon"],[1,"computes__list-item"],[1,"computes__list-icon",3,"matTooltip"],[1,"computes__list-info"],[1,"computes__list-name"],[1,"computes__list-host"],[1,"computes__list-stats"],[1,"computes__stat","computes__stat--offline"],[1,"computes__stat"],[1,"computes__stat-icon"],["mat-icon-button","",1,"computes__menu-btn",3,"click","matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"]],template:function(t,o){t&1&&(s(0,"div",1)(1,"header",2),A(2,Hee,3,1,"button",3),s(3,"h1",4),d(4,"Computes"),l(),A(5,Uee,3,0,"button",5),l(),s(6,"main",6)(7,"div",7)(8,"mat-icon",8),d(9,"info"),l(),s(10,"p",9),d(11," Once configured and connected, the backend maintains the connection to Compute nodes automatically. This page is used to add/delete/update node configurations and view node status. "),l()(),A(12,Gee,2,0,"div",10),A(13,Wee,5,0,"div",11),A(14,Yee,3,0,"nav",12),l()()),t&2&&(m(2),O(o.controller?2:-1),m(3),O(o.controller?5:-1),m(7),O(o.loading()?12:-1),m(),O(!o.loading()&&!o.computes().length?13:-1),m(),O(!o.loading()&&o.computes().length?14:-1))},dependencies:[ne,dt,vn,W,je,ie,de,Ge,Qn,Ze,Fn,hn,wt,It,_e,we,Se,vt,Dt],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.computes__header[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:32px 20px 16px;display:flex;align-items:center;gap:16px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out}.computes__back-btn[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:12px;color:var(--mat-sys-on-surface);transition:all .2s cubic-bezier(.4,0,.2,1)}.computes__back-btn[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 8%,transparent)}.computes__title[_ngcontent-%COMP%]{font-size:32px;font-weight:500;color:var(--mat-sys-on-surface);margin:0;padding-bottom:8px}.computes__add-btn[_ngcontent-%COMP%]{margin-left:auto;color:var(--mat-sys-primary)}.computes__content[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:0 20px 20px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .1s both}.computes__info[_ngcontent-%COMP%]{display:flex;gap:12px;padding:16px;margin-bottom:20px;background:var(--mat-sys-primary-container);border-radius:12px;border-left:4px solid var(--mat-sys-primary);animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .15s both}.computes__info-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-primary-container);flex-shrink:0;font-size:20px;width:20px;height:20px}.computes__info-text[_ngcontent-%COMP%]{margin:0;font-size:14px;color:var(--mat-sys-on-primary-container);line-height:1.5}.computes__loading[_ngcontent-%COMP%], .computes__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border-radius:16px;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__empty-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;color:var(--mat-sys-on-surface-variant)}.computes__list[_ngcontent-%COMP%]{background:var(--mat-sys-surface);border-radius:16px;overflow:hidden;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__list-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid var(--mat-sys-outline-variant);transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer}.computes__list-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.computes__list-item[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 5%,transparent)}.computes__list-icon[_ngcontent-%COMP%]{flex-shrink:0}.computes__list-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0}.computes__list-name[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:var(--mat-sys-on-surface);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.computes__list-host[_ngcontent-%COMP%]{font-size:13px;color:var(--mat-sys-on-surface-variant)}.computes__list-stats[_ngcontent-%COMP%]{display:flex;gap:16px;flex-shrink:0}.computes__stat[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--mat-sys-on-surface)}.computes__stat--offline[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-style:italic}.computes__stat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--mat-sys-on-surface-variant)}.computes__menu-btn[_ngcontent-%COMP%]{flex-shrink:0}@keyframes _ngcontent-%COMP%_fadeInSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.computes__header[_ngcontent-%COMP%]{padding:24px 16px 12px;gap:12px}.computes__back-btn[_ngcontent-%COMP%]{width:44px;height:44px}.computes__title[_ngcontent-%COMP%]{font-size:24px}.computes__content[_ngcontent-%COMP%]{padding:0 16px 16px}.computes__list-item[_ngcontent-%COMP%]{padding:14px 16px}.computes__list-stats[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})}return n})(),o8=(()=>{class n{dialogRef=f(Ie);data=f(gt);protocols=[{key:"http",name:"HTTP"},{key:"https",name:"HTTPS"}];computeForm=new gr({name:new Ye(""),protocol:new Ye("http",[Ue.required]),host:new Ye("",[Ue.required]),port:new Ye(3080,[Ue.required,Ue.min(1),Ue.max(65535)]),user:new Ye("gns3"),password:new Ye("gns3")});isEditMode=!1;constructor(){this.data.compute&&(this.isEditMode=!0,this.computeForm.patchValue({name:this.data.compute.name,protocol:this.data.compute.protocol,host:this.data.compute.host,port:this.data.compute.port,user:this.data.compute.user,password:""}))}onSaveClick(){if(!this.computeForm.valid)return;let e=this.computeForm.value,t={protocol:e.protocol,host:e.host,port:e.port,user:e.user||void 0,name:e.name||void 0};e.password&&e.password.trim()!==""&&(t.password=e.password),this.dialogRef.close(t)}onCancelClick(){this.dialogRef.close()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-add-compute-dialog"]],decls:39,vars:8,consts:[["mat-dialog-title",""],[3,"formGroup"],["mat-dialog-content",""],["appearance","fill",1,"full-width-field"],["matInput","","tabindex","1","formControlName","name","placeholder","My Compute"],["formControlName","protocol"],[3,"value"],["matInput","","tabindex","1","formControlName","host","placeholder","192.168.1.100"],["matInput","","type","number","tabindex","1","formControlName","port","placeholder","3080"],["matInput","","tabindex","1","formControlName","user","placeholder","gns3"],["matInput","","type","password","tabindex","1","formControlName","password","placeholder","gns3"],["mat-dialog-actions","","align","end"],["mat-button","","tabindex","-1","color","accent",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click","disabled"]],template:function(t,o){t&1&&(s(0,"h2",0),d(1),l(),s(2,"form",1)(3,"div",2)(4,"mat-form-field",3)(5,"mat-label"),d(6,"Name (optional)"),l(),R(7,"input",4),l(),s(8,"mat-form-field",3)(9,"mat-label"),d(10,"Protocol"),l(),s(11,"mat-select",5),Y(12,Jee,2,2,"mat-option",6,Zee),l(),A(14,ete,2,0,"mat-error"),l(),s(15,"mat-form-field",3)(16,"mat-label"),d(17,"Host"),l(),R(18,"input",7),A(19,tte,2,0,"mat-error"),l(),s(20,"mat-form-field",3)(21,"mat-label"),d(22,"Port"),l(),R(23,"input",8),A(24,nte,2,0,"mat-error"),A(25,ite,2,0,"mat-error"),l(),s(26,"mat-form-field",3)(27,"mat-label"),d(28,"User"),l(),R(29,"input",9),l(),s(30,"mat-form-field",3)(31,"mat-label"),d(32,"Password"),l(),R(33,"input",10),l()(),s(34,"div",11)(35,"button",12),g("click",function(){return o.onCancelClick()}),d(36,"Cancel"),l(),s(37,"button",13),g("click",function(){return o.onSaveClick()}),d(38),l()()()),t&2&&(m(),j(o.isEditMode?"Edit Compute":"Add Compute"),m(),C("formGroup",o.computeForm),m(10),Z(o.protocols),m(2),O(o.computeForm.get("protocol").hasError("required")?14:-1),m(5),O(o.computeForm.get("host").hasError("required")?19:-1),m(5),O(o.computeForm.get("port").hasError("required")?24:-1),m(),O(o.computeForm.get("port").hasError("min")||o.computeForm.get("port").hasError("max")?25:-1),m(12),C("disabled",o.computeForm.invalid),m(),ee(" ",o.isEditMode?"Update":"Add"," "))},dependencies:[ne,Dt,at,Ft,_r,Pt,rt,Rt,zt,_e,Ne,Fe,bt,W,pe,we,Me,et,fi,Se,Ee,vt,At,_t],encapsulation:2,changeDetection:0})}return n})();var ote=["*"];var rte=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],ate=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]`,"*"],ste=new cn("MAT_CARD_CONFIG"),On=(()=>{class n{appearance;constructor(){let e=f(ste,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,o){t&2&&Be("mat-mdc-card-outlined",o.appearance==="outlined")("mdc-card--outlined",o.appearance==="outlined")("mat-mdc-card-filled",o.appearance==="filled")("mdc-card--filled",o.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:ote,decls:1,vars:0,template:function(t,o){t&1&&(ii(),on(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end} `],encapsulation:2,changeDetection:0})}return n})(),Oc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return n})();var ll=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return n})();var $b=(()=>{class n{align="start";static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(t,o){t&2&&Be("mat-mdc-card-actions-align-end",o.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return n})(),Nc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:ate,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(t,o){t&1&&(ii(rte),on(0),vo(1,"div",0),on(2,1),wo(),on(3,2))},encapsulation:2,changeDetection:0})}return n})();var Mt=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[hi]})}return n})();var wm=(()=>{class n{dataChange=new an([]);constructor(){}get data(){return this.dataChange.value}addController(e){let t=this.data.slice();t.push(e),this.dataChange.next(t)}addControllers(e){this.dataChange.next(e)}remove(e){let t=this.data.indexOf(e);t>=0&&(this.data.splice(t,1),this.dataChange.next(this.data.slice()))}find(e){return this.data.find(t=>t.name===e)}findById(e){return this.data.find(t=>t.id===e)}findIndex(e){return this.data.findIndex(t=>t.name===e)}findIndexById(e){return this.data.findIndex(t=>t.id===e)}update(e){let t=this.findIndexById(e.id);t>=0&&(this.data[t]=e,this.dataChange.next(this.data.slice()))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var a8=(n,i)=>i.key;function lte(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a value"),l())}function cte(n,i){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=i.$implicit;C("value",e.key),m(),ee(" ",e.name," ")}}function dte(n,i){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=i.$implicit;C("value",e.key),m(),ee(" ",e.name," ")}}var Hb=(()=>{class n{controllerService=f(Je);controllerDatabase=f(wm);route=f(lt);router=f(ht);toasterService=f(te);cdr=f(Q);controllerOptionsVisibility=ae(!1);controllerIp;controllerPort;projectId;protocols=[{key:"http:",name:"HTTP"},{key:"https:",name:"HTTPS"}];locations=[{key:"local",name:"Local"},{key:"remote",name:"Remote"}];controllerForm=new gr({name:new Ye("",[Ue.required]),location:new Ye(""),protocol:new Ye("http:")});constructor(){}async ngOnInit(){this.controllerService.isServiceInitialized&&this.getControllers(),this.controllerService.serviceInitialized.subscribe(async e=>{e&&this.getControllers()})}async getControllers(){this.controllerIp=this.route.snapshot.paramMap.get("controller_ip"),this.controllerPort=+this.route.snapshot.paramMap.get("controller_port"),this.projectId=this.route.snapshot.paramMap.get("project_id");try{let t=(await this.controllerService.findAll()).filter(o=>o.host===this.controllerIp&&o.port===this.controllerPort)[0];t?this.router.navigate(["/controller",t.id,"project",this.projectId]):(this.controllerOptionsVisibility.set(!0),this.cdr.markForCheck())}catch(e){let t=e.error?.message||e.message||"Failed to load controllers";this.toasterService.error(t),this.cdr.markForCheck()}}createController(){if(!this.controllerForm.get("name").hasError&&!this.controllerForm.get("location").hasError&&!this.controllerForm.get("protocol").hasError){this.toasterService.error("Please use correct values");return}let e=new y4;e.host=this.controllerIp,e.port=this.controllerPort,e.name=this.controllerForm.get("name").value,e.location=this.controllerForm.get("location").value,e.protocol=this.controllerForm.get("protocol").value,this.controllerService.create(e).then(t=>{this.router.navigate(["/controller",t.id,"project",this.projectId])},t=>{let o=t.error?.message||t.message||"Failed to create controller";this.toasterService.error(o),this.cdr.markForCheck()})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-direct-link"]],decls:22,vars:3,consts:[[1,"content",3,"hidden"],[1,"default-header"],[1,"row"],[1,"col"],[1,"default-content"],[1,"matCard"],[3,"formGroup"],["matInput","","tabindex","1","formControlName","name","placeholder","Name"],["placeholder","Location","formControlName","location"],[3,"value"],["placeholder","Protocol","formControlName","protocol"],[1,"buttons-bar"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,o){t&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),d(4,"Add new controller"),l()()(),s(5,"div",4)(6,"mat-card",5)(7,"form",6)(8,"mat-form-field"),R(9,"input",7),A(10,lte,2,0,"mat-error"),l(),s(11,"mat-form-field")(12,"mat-select",8),Y(13,cte,2,2,"mat-option",9,a8),l()(),s(15,"mat-form-field")(16,"mat-select",10),Y(17,dte,2,2,"mat-option",9,a8),l()()()(),s(19,"div",11)(20,"button",12),g("click",function(){return o.createController()}),d(21,"Add controller"),l()()()()),t&2&&(C("hidden",!o.controllerOptionsVisibility()),m(7),C("formGroup",o.controllerForm),m(3),O(o.controllerForm.get("name").hasError("required")?10:-1),m(3),Z(o.locations),m(4),Z(o.protocols))},dependencies:[ne,Dt,at,Ft,Pt,rt,Rt,zt,dt,Mt,On,we,Me,fi,Se,Ee,vt,At,_t,Fo,W,pe],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return n})();var $D=new cn("CdkAccordion"),s8=(()=>{class n{_stateChanges=new He;_openCloseAllActions=new He;id=f(Mo).getId("cdk-accordion-");multi=!1;openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",Ct]},exportAs:["cdkAccordion"],features:[fn([{provide:$D,useExisting:n}]),bn]})}return n})(),l8=(()=>{class n{accordion=f($D,{optional:!0,skipSelf:!0});_changeDetectorRef=f(Q);_expansionDispatcher=f(Yu);_openCloseAllSubscription=So.EMPTY;closed=new ve;opened=new ve;destroyed=new ve;expandedChange=new ve;id=f(Mo).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=ae(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",Ct],disabled:[2,"disabled","disabled",Ct]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[fn([{provide:$D,useValue:void 0}])]})}return n})(),Ub=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({})}return n})();var mte=["body"],pte=["bodyWrapper"],ute=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],hte=["mat-expansion-panel-header","*","mat-action-row"];function fte(n,i){}var gte=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],_te=["mat-panel-title","mat-panel-description","*"];function vte(n,i){n&1&&(vo(0,"span",1),ei(),vo(1,"svg",2),bs(2,"path",3),wo()())}var HD=new cn("MAT_ACCORDION"),c8=new cn("MAT_EXPANSION_PANEL"),Cte=(()=>{class n{_template=f(Oo);_expansionPanel=f(c8,{optional:!0});constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]})}return n})(),d8=new cn("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),kd=(()=>{class n extends l8{_viewContainerRef=f(oo);_animationsDisabled=qo();_document=f(Xi);_ngZone=f(Vi);_elementRef=f(Zt);_renderer=f(Si);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new ve;afterCollapse=new ve;_inputChanges=new He;accordion=f(HD,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=f(Mo).getId("mat-expansion-panel-header-");constructor(){super();let e=f(d8,{optional:!0});this._expansionDispatcher=f(Yu),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(pi(null),ai(()=>this.expanded&&!this._portal),Ao(1)).subscribe(()=>{this._portal=new pd(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(t,o,r){if(t&1&&Ki(r,Cte,5),t&2){let a;mt(a=pt())&&(o._lazyContent=a.first)}},viewQuery:function(t,o){if(t&1&&xn(mte,5)(pte,5),t&2){let r;mt(r=pt())&&(o._body=r.first),mt(r=pt())&&(o._bodyWrapper=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,o){t&2&&Be("mat-expanded",o.expanded)("mat-expansion-panel-spacing",o._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",Ct],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[fn([{provide:HD,useValue:void 0},{provide:c8,useExisting:n}]),si,bn],ngContentSelectors:hte,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,o){t&1&&(ii(ute),on(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),on(6,1),xe(7,fte,0,0,"ng-template",5),l(),on(8,2),l()()),t&2&&(m(),qt("inert",o.expanded?null:""),m(2),C("id",o.id),qt("aria-labelledby",o._headerId),m(4),C("cdkPortalOutlet",o._portal))},dependencies:[Gu],styles:[`.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel{position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:var(--mat-expansion-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}@media print{.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-content{font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px} `],encapsulation:2,changeDetection:0})}return n})();var Td=(()=>{class n{panel=f(kd,{host:!0});_element=f(Zt);_focusMonitor=f(Aa);_changeDetectorRef=f(Q);_parentChangeSubscription=So.EMPTY;constructor(){f(cr).load(ia);let e=this.panel,t=f(d8,{optional:!0}),o=f(new sc("tabindex"),{optional:!0}),r=e.accordion?e.accordion._stateChanges.pipe(ai(a=>!!(a.hideToggle||a.togglePosition))):Lu;this.tabIndex=parseInt(o||"")||0,this._parentChangeSubscription=Hn(e.opened,e.closed,r,e._inputChanges.pipe(ai(a=>!!(a.hideToggle||a.disabled||a.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(ai(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:fa(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,o){t&1&&g("click",function(){return o._toggle()})("keydown",function(a){return o._keydown(a)}),t&2&&(qt("id",o.panel._headerId)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o._getPanelId())("aria-expanded",o._isExpanded())("aria-disabled",o.panel.disabled),nn("height",o._getHeaderHeight()),Be("mat-expanded",o._isExpanded())("mat-expansion-toggle-indicator-after",o._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",o._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:No(e)]},ngContentSelectors:_te,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(t,o){t&1&&(ii(gte),vo(0,"span",0),on(1),on(2,1),on(3,2),wo(),A(4,vte,3,0,"span",1)),t&2&&(Be("mat-content-hide-toggle",!o._showToggle()),m(4),O(o._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header::before{border-radius:inherit}.mat-expansion-panel-header{height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}} `],encapsulation:2,changeDetection:0})}return n})(),Gb=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return n})(),Mm=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return n})(),km=(()=>{class n extends s8{_keyManager;_ownHeaders=new Il;_headers;hideToggle=!1;displayMode="default";togglePosition="after";ngAfterContentInit(){this._headers.changes.pipe(pi(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Gd(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-accordion"]],contentQueries:function(t,o,r){if(t&1&&Ki(r,Td,5),t&2){let a;mt(a=pt())&&(o._headers=a)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,o){t&2&&Be("mat-accordion-multi",o.multi)},inputs:{hideToggle:[2,"hideToggle","hideToggle",Ct],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[fn([{provide:HD,useExisting:n}]),si]})}return n})(),cl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[Ub,Wu,hi]})}return n})();var qb=(()=>{class n{httpClient=f(js);sanitizer=f(fr);toasterService=f(te);cd=f(Q);thirdpartylicenses=ae("");releasenotes=ae("");ngOnInit(){this.httpClient.get(window.location.href+"/3rdpartylicenses.txt",{responseType:"text"}).subscribe({next:e=>{let t=e.replace(new RegExp(` `,"g"),"
");this.thirdpartylicenses.set(this.sanitizer.bypassSecurityTrustHtml(t))},error:e=>{if(e.status===404)this.thirdpartylicenses.set("Download Solar-PuTTY");else{let t=e.error?.message||e.message||"Failed to load third party licenses";this.toasterService.error(t)}this.cd.markForCheck()}}),this.httpClient.get("ReleaseNotes.txt",{responseType:"text"}).subscribe({next:e=>{let t=e.replace(new RegExp(` `,"g"),"
");this.releasenotes.set(this.sanitizer.bypassSecurityTrustHtml(t))},error:e=>{let t=e.error?.message||e.message||"Failed to load release notes";this.toasterService.error(t),this.cd.markForCheck()}})}goToDocumentation(){window.location.href="https://docs.gns3.com/docs/"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-help"]],decls:39,vars:2,consts:[[1,"help"],[1,"help__header"],[1,"help__title"],[1,"help__content"],[1,"help__card"],["href","https://downloads.solarwinds.com/solarwinds/GNS3/Solar-PuTTY/Solar-PuTTY-Optional.exe",1,"help__link"],[3,"innerHTML"],["mat-button","","color","primary",1,"help__doc-button",3,"click"]],template:function(t,o){t&1&&(s(0,"div",0)(1,"header",1)(2,"h1",2),d(3,"Help"),l()(),s(4,"main",3)(5,"section",4)(6,"mat-accordion")(7,"mat-expansion-panel")(8,"mat-expansion-panel-header")(9,"mat-panel-title"),d(10," Useful shortcuts "),l()(),s(11,"mat-list")(12,"mat-list-item"),d(13," ctrl + + to zoom in "),l(),s(14,"mat-list-item"),d(15," ctrl + - to zoom out "),l(),s(16,"mat-list-item"),d(17," ctrl + 0 to reset zoom "),l(),s(18,"mat-list-item"),d(19," ctrl + h to hide toolbar "),l(),s(20,"mat-list-item"),d(21," ctrl + a to select all items on map "),l(),s(22,"mat-list-item"),d(23," ctrl + shift + a to deselect all items on map "),l(),s(24,"mat-list-item"),d(25," ctrl + shift + s to go to preferences "),l()()(),s(26,"mat-expansion-panel")(27,"mat-expansion-panel-header")(28,"mat-panel-title"),d(29," Third party components "),l()(),s(30,"a",5),R(31,"div",6),l()(),s(32,"mat-expansion-panel")(33,"mat-expansion-panel-header")(34,"mat-panel-title"),d(35," Release notes "),l()(),R(36,"div",6),l()()(),s(37,"button",7),g("click",function(){return o.goToDocumentation()}),d(38," Go to documentation "),l()()()),t&2&&(m(31),C("innerHTML",o.thirdpartylicenses(),vp),m(5),C("innerHTML",o.releasenotes(),vp))},dependencies:[W,pe,cl,km,kd,Td,Mm,Zi,F4,Wd],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.help__header[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:32px 20px 16px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out}.help__title[_ngcontent-%COMP%]{font-size:32px;font-weight:500;color:var(--mat-sys-on-surface);margin:0;padding-bottom:8px}.help__content[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:0 20px 20px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .1s both}.help__card[_ngcontent-%COMP%]{background:var(--mat-sys-surface);border-radius:16px;overflow:hidden;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none;border-bottom:1px solid var(--mat-sys-outline-variant)}.mat-expansion-panel[_ngcontent-%COMP%]:first-of-type{border-top:none}.mat-expansion-panel-header[_ngcontent-%COMP%]{font-weight:500;color:var(--mat-sys-on-surface)}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface)}.help__doc-button[_ngcontent-%COMP%]{display:block;width:100%;margin-top:20px;height:48px;border-radius:12px;font-size:16px;font-weight:500;text-transform:none;letter-spacing:.5px}.help__link[_ngcontent-%COMP%]{color:var(--mat-sys-primary);text-decoration:none;font-size:14px;font-weight:400}.help__link[_ngcontent-%COMP%]:hover{text-decoration:underline}@keyframes _ngcontent-%COMP%_fadeInSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.help__header[_ngcontent-%COMP%]{padding:24px 16px 12px}.help__title[_ngcontent-%COMP%]{font-size:24px}.help__content[_ngcontent-%COMP%]{padding:0 16px 16px}.help__doc-button[_ngcontent-%COMP%]{height:44px;font-size:15px}}"],changeDetection:0})}return n})();var Qb=(()=>{class n{constructor(){}isWindows(){return navigator.platform.indexOf("Win")>-1}isLinux(){return navigator.platform.indexOf("Linux")>-1}isDarwin(){return navigator.platform.indexOf("Mac")>-1}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var Xb=(()=>{class n{platformService;constructor(e){this.platformService=e}get(){return this.platformService.isWindows()?this.getForWindows():this.platformService.isDarwin()?this.getForDarwin():this.getForLinux()}getForWindows(){let e=[{name:"Wireshark",locations:["C:\\Program Files\\Wireshark\\Wireshark.exe"],type:"web",resource:"https://1.na.dl.wireshark.org/win64/all-versions/Wireshark-win64-2.6.3.exe",binary:"Wireshark.exe",sudo:!0,installation_arguments:[],installed:!1,installer:!0}],t={name:"SolarPuTTY",locations:["SolarPuTTY.exe","external\\SolarPuTTY.exe"],type:"web",resource:"",binary:"SolarPuTTY.exe",sudo:!1,installation_arguments:["--only-ask"],installed:!1,installer:!1};return wi.solarputty_download_url&&(t.resource=wi.solarputty_download_url,e.push(t)),e}getForLinux(){return[]}getForDarwin(){return[]}static \u0275fac=function(t){return new(t||n)(ge(Qb))};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var Kb=(()=>{class n{externalSoftwareDefinition;constructor(e){this.externalSoftwareDefinition=e}list(){return this.externalSoftwareDefinition.get().map(t=>(t.installed=!1,t))}static \u0275fac=function(t){return new(t||n)(ge(Xb))};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var yte=(n,i)=>({hidden:n,lightTheme:i}),Ste=/(.*)<\/a>(.*)\s*