import{a as qn,b as dn,c as z4,d as de,e as oe,f as H4,g as nt,h as W4,i as G4,j as q4,k as Q4,l as Ie,m as Ct,n as it,o as vc,p as Le,q as St,r as Ve,s as ve,t as d5,u as m5,v as zC,w as p5,x as sh}from"./chunk-ERB75MEN.js";import{$ as ui,A as t5,B as n5,C as br,D as ns,E as ie,F as Ak,G as ah,H as qr,I as yr,J as i5,K as Zd,L as o5,M as eo,N as pi,O as r5,P as a5,Q as Wo,R as Go,S as s5,T as l5,U as c5,V as ho,W as Qr,X as Jd,Y as Ei,Z as em,_ as qo,a as Mt,aa as u5,b as ht,c as Xe,d as ni,e as RC,f as ts,g as Ti,h as LC,i as rh,j as Me,k as we,l as Cd,m as VC,n as X4,o as K4,p as BC,q as Y4,r as ft,s as Z4,t as J4,u as Vo,v as Pt,w as e5,x as gt,y as Eo,z as Js}from"./chunk-EXPJ4N52.js";import{$ as te,$a as A,$b as JO,$c as h4,$d as Vt,$e as ki,A as No,Aa as Na,Ab as Xt,Ac as r4,Ad as MC,Ae as Pk,B as Ca,Ba as lC,Bb as Kt,Bc as a4,Bd as S4,Be as NC,C as aC,Ca as Zo,Cb as ke,Cc as fC,Ce as N4,D as Wn,Da as qu,Db as Yt,Dc as gC,Dd as kC,De as FC,E as ci,Ea as m,Eb as Ae,Ec as s4,Ee as Ik,F as Qs,Fa as Ja,Fb as ar,Fc as l4,Fe as vd,G as uo,Ga as Ro,Gb as d,Gc as Xu,Gd as th,Ge as F4,H as Mk,Ha as md,Hb as B,Hc as c4,Hd as w4,He as er,I as kk,Ia as Si,Ib as ee,Ic as d4,Id as _d,Ie as R4,J as VO,Ja as at,Jb as mi,Jc as Ks,Jd as Nt,Je as Tp,K as BO,Ka as qO,Kb as dC,Kc as m4,Kd as TC,Ke as L4,L as Fo,La as ro,Lb as mc,Lc as Ku,Ld as je,Le as V4,M as zO,Ma as F,Mb as pc,Mc as p4,Md as M4,Me as lt,N as jO,Na as Gt,Nb as uc,Nc as xr,Nd as EC,Ne as ih,O as yp,Oa as vt,Ob as Hi,Oc as sr,Od as Dt,Oe as _t,P as $O,Pa as Br,Pb as Mp,Pc as _C,Pd as ot,Pe as vn,Q as HO,Qb as fn,Qc as vC,Qd as DC,Qe as B4,R as sC,Ra as di,Rb as Tt,Rc as kp,Rd as Ho,Re as dt,S as $l,Sa as Ce,Sb as un,Sc as CC,Sd as Gn,T as Sp,Ta as Qu,Tb as aa,Tc as xC,Td as fc,Te as j4,Ua as QO,Ub as mC,Uc as bC,Ud as $e,Ue as Zs,V as gi,Va as XO,Vb as pC,Vc as u4,Vd as k4,Ve as $4,W as Vn,Wa as KO,Wb as nn,Wc as Ul,Wd as rt,We as la,X as Ge,Xa as Qt,Xb as $n,Xc as Es,Xd as Uo,Xe as ze,Y as yi,Yb as sa,Yc as es,Yd as Ys,Ye as _c,Z as Mi,Za as I,Zb as ZO,Zc as ud,Zd as T4,Ze as pe,_ as dd,_a as YO,_b as Kd,_c as Yu,_d as E4,_e as G,a as Z,aa as Wt,ab as Ni,ac as Dk,ad as f4,ae as Ft,af as U4,b as Ye,ba as cn,bb as Oe,bc as $t,bd as g4,be as D4,bf as mn,c as rC,ca as ge,cb as K,cc as hc,cd as _i,ce as P4,cf as Ra,d as ws,da as f,db as Y,dc as e4,dd as _4,de as nh,df as oh,e as Ln,ea as UO,eb as C,ec as $g,ee as gc,f as Gs,fa as WO,fb as s,fc as ae,fe as I4,g as Mo,ga as k,gb as l,gc as Rt,gd as hd,ge as PC,h as Rr,ha as T,hb as R,hc as t4,hd as v4,he as Bn,i as We,ia as ti,ib as Co,id as C4,ie as Je,j as tn,ja as Vr,jb as ko,jc as U,jd as fd,je as Et,k as Xd,ka as rr,kb as ks,kc as X,kd as yC,ke as Fa,l as FO,la as Qi,lb as Fe,lc as pd,ld as To,m as qs,ma as Ms,mb as Re,mc as yt,md as x4,me as IC,n as Uu,na as _e,nb as Fi,nc as Lo,o as Wu,oa as Ai,ob as z,od as gd,p as Nn,pa as GO,pb as Jo,pc as uC,pe as AC,q as $o,qa as Q,qb as _,qc as Ji,qd as b4,r as jg,ra as ur,rb as cC,rc as n4,s as RO,sa as Pn,sb as v,sc as i4,sd as Zu,ta as Oi,tb as ai,tc as Xs,td as Ju,u as Bt,ua as Jt,ub as an,uc as Hg,ud as xa,v as Lr,va as Hl,vb as Zi,vc as Gr,vd as y4,w as dc,wa as Gu,wb as In,wc as o4,wd as SC,we as A4,x as wk,xa as Tk,xb as mt,xc as hC,xd as wC,xe as Yd,y as LO,ya as Ek,yb as pt,yc as ne,yd as eh,ye as OC,z as Yi,za as wp,zc as Ts,ze as O4}from"./chunk-TYGV4UPE.js";var lL=ws((unt,Qb)=>{(function(n,o,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"},i={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,se){if(P.addEventListener){P.addEventListener(L,se,!1);return}P.attachEvent("on"+L,se)}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]:i[P.which]?i[P.which]:String.fromCharCode(P.which).toLowerCase()}function g(P,L){return P.sort().join(",")===L.sort().join(",")}function y(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 b(P){if(P.preventDefault){P.preventDefault();return}P.returnValue=!1}function x(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 S(P,L,se){return se||(se=w()[P]?"keydown":"keypress"),se=="keypress"&&L.length&&(se="keydown"),se}function E(P){return P==="+"?["+"]:(P=P.replace(/\+{2}/g,"+plus"),P.split("+"))}function O(P,L){var se,re,W,$=[];for(se=E(P),W=0;W1){J(ce,ye,De,He);return}q=O(ce,He),L._callbacks[q.key]=L._callbacks[q.key]||[],me(q.key,q.modifiers,{type:q.action},et,ce,Ze),L._callbacks[q.key][et?"unshift":"push"]({callback:De,modifiers:q.modifiers,action:q.action,seq:et,level:Ze,combo:ce})}L._bindMultiple=function(ce,De,He){for(var et=0;et-1||D(L,se.target))return!1;if("composedPath"in P&&typeof P.composedPath=="function"){var re=P.composedPath()[0];re!==P.target&&(L=re)}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(o);for(var L in P)L.charAt(0)!=="_"&&(N[L]=(function(se){return function(){return P[se].apply(P,arguments)}})(L))},N.init(),n.Mousetrap=N,typeof Qb<"u"&&Qb.exports&&(Qb.exports=N),typeof define=="function"&&define.amd&&define(function(){return N})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var g7=ws(HP=>{var f7="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");HP.encode=function(n){if(0<=n&&n{var _7=g7(),UP=5,v7=1<>1;return o?-e:e}WP.encode=function(o){var e="",t,i=dde(o);do t=i&C7,i>>>=UP,i>0&&(t|=x7),e+=_7.encode(t);while(i>0);return e};WP.decode=function(o,e,t){var i=o.length,r=0,a=0,c,p;do{if(e>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(p=_7.decode(o.charCodeAt(e++)),p===-1)throw new Error("Invalid base64 digit: "+o.charAt(e-1));c=!!(p&x7),p&=C7,r=r+(p<{function pde(n,o,e){if(o in n)return n[o];if(arguments.length===3)return e;throw new Error('"'+o+'" is a required argument.')}oa.getArg=pde;var y7=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ude=/^data:.+\,.+$/;function tv(n){var o=n.match(y7);return o?{scheme:o[1],auth:o[2],host:o[3],port:o[4],path:o[5]}:null}oa.urlParse=tv;function Cf(n){var o="";return n.scheme&&(o+=n.scheme+":"),o+="//",n.auth&&(o+=n.auth+"@"),n.host&&(o+=n.host),n.port&&(o+=":"+n.port),n.path&&(o+=n.path),o}oa.urlGenerate=Cf;var hde=32;function fde(n){var o=[];return function(e){for(var t=0;thde&&o.pop(),r}}var GP=fde(function(o){var e=o,t=tv(o);if(t){if(!t.path)return o;e=t.path}for(var i=oa.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=i?"/":"."),t?(t.path=e,Cf(t)):e});oa.normalize=GP;function S7(n,o){n===""&&(n="."),o===""&&(o=".");var e=tv(o),t=tv(n);if(t&&(n=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),Cf(e);if(e||o.match(ude))return o;if(t&&!t.host&&!t.path)return t.host=o,Cf(t);var i=o.charAt(0)==="/"?o:GP(n.replace(/\/+$/,"")+"/"+o);return t?(t.path=i,Cf(t)):i}oa.join=S7;oa.isAbsolute=function(n){return n.charAt(0)==="/"||y7.test(n)};function gde(n,o){n===""&&(n="."),n=n.replace(/\/$/,"");for(var e=0;o.indexOf(n+"/")!==0;){var t=n.lastIndexOf("/");if(t<0||(n=n.slice(0,t),n.match(/^([^\/]+:\/)?\/*$/)))return o;++e}return Array(e+1).join("../")+o.substr(n.length+1)}oa.relative=gde;var w7=(function(){var n=Object.create(null);return!("__proto__"in n)})();function M7(n){return n}function _de(n){return k7(n)?"$"+n:n}oa.toSetString=w7?M7:_de;function vde(n){return k7(n)?n.slice(1):n}oa.fromSetString=w7?M7:vde;function k7(n){if(!n)return!1;var o=n.length;if(o<9||n.charCodeAt(o-1)!==95||n.charCodeAt(o-2)!==95||n.charCodeAt(o-3)!==111||n.charCodeAt(o-4)!==116||n.charCodeAt(o-5)!==111||n.charCodeAt(o-6)!==114||n.charCodeAt(o-7)!==112||n.charCodeAt(o-8)!==95||n.charCodeAt(o-9)!==95)return!1;for(var e=o-10;e>=0;e--)if(n.charCodeAt(e)!==36)return!1;return!0}function Cde(n,o,e){var t=Bd(n.source,o.source);return t!==0||(t=n.originalLine-o.originalLine,t!==0)||(t=n.originalColumn-o.originalColumn,t!==0||e)||(t=n.generatedColumn-o.generatedColumn,t!==0)||(t=n.generatedLine-o.generatedLine,t!==0)?t:Bd(n.name,o.name)}oa.compareByOriginalPositions=Cde;function xde(n,o,e){var t;return t=n.originalLine-o.originalLine,t!==0||(t=n.originalColumn-o.originalColumn,t!==0||e)||(t=n.generatedColumn-o.generatedColumn,t!==0)||(t=n.generatedLine-o.generatedLine,t!==0)?t:Bd(n.name,o.name)}oa.compareByOriginalPositionsNoSource=xde;function bde(n,o,e){var t=n.generatedLine-o.generatedLine;return t!==0||(t=n.generatedColumn-o.generatedColumn,t!==0||e)||(t=Bd(n.source,o.source),t!==0)||(t=n.originalLine-o.originalLine,t!==0)||(t=n.originalColumn-o.originalColumn,t!==0)?t:Bd(n.name,o.name)}oa.compareByGeneratedPositionsDeflated=bde;function yde(n,o,e){var t=n.generatedColumn-o.generatedColumn;return t!==0||e||(t=Bd(n.source,o.source),t!==0)||(t=n.originalLine-o.originalLine,t!==0)||(t=n.originalColumn-o.originalColumn,t!==0)?t:Bd(n.name,o.name)}oa.compareByGeneratedPositionsDeflatedNoLine=yde;function Bd(n,o){return n===o?0:n===null?1:o===null?-1:n>o?1:-1}function Sde(n,o){var e=n.generatedLine-o.generatedLine;return e!==0||(e=n.generatedColumn-o.generatedColumn,e!==0)||(e=Bd(n.source,o.source),e!==0)||(e=n.originalLine-o.originalLine,e!==0)||(e=n.originalColumn-o.originalColumn,e!==0)?e:Bd(n.name,o.name)}oa.compareByGeneratedPositionsInflated=Sde;function wde(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}oa.parseSourceMapInput=wde;function Mde(n,o,e){if(o=o||"",n&&(n[n.length-1]!=="/"&&o[0]!=="/"&&(n+="/"),o=n+o),e){var t=tv(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var i=t.path.lastIndexOf("/");i>=0&&(t.path=t.path.substring(0,i+1))}o=S7(Cf(t),o)}return GP(o)}oa.computeSourceURL=Mde});var E7=ws(T7=>{var qP=gy(),QP=Object.prototype.hasOwnProperty,Su=typeof Map<"u";function zd(){this._array=[],this._set=Su?new Map:Object.create(null)}zd.fromArray=function(o,e){for(var t=new zd,i=0,r=o.length;i=0)return e}else{var t=qP.toSetString(o);if(QP.call(this._set,t))return this._set[t]}throw new Error('"'+o+'" is not in the set.')};zd.prototype.at=function(o){if(o>=0&&o{var D7=gy();function kde(n,o){var e=n.generatedLine,t=o.generatedLine,i=n.generatedColumn,r=o.generatedColumn;return t>e||t==e&&r>=i||D7.compareByGeneratedPositionsInflated(n,o)<=0}function _y(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}_y.prototype.unsortedForEach=function(o,e){this._array.forEach(o,e)};_y.prototype.add=function(o){kde(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))};_y.prototype.toArray=function(){return this._sorted||(this._array.sort(D7.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};P7.MappingList=_y});var O7=ws(A7=>{var nv=b7(),vr=gy(),vy=E7().ArraySet,Tde=I7().MappingList;function El(n){n||(n={}),this._file=vr.getArg(n,"file",null),this._sourceRoot=vr.getArg(n,"sourceRoot",null),this._skipValidation=vr.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=vr.getArg(n,"ignoreInvalidMapping",!1),this._sources=new vy,this._names=new vy,this._mappings=new Tde,this._sourcesContents=null}El.prototype._version=3;El.fromSourceMap=function(o,e){var t=o.sourceRoot,i=new El(Object.assign(e||{},{file:o.file,sourceRoot:t}));return o.eachMapping(function(r){var a={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(a.source=r.source,t!=null&&(a.source=vr.relative(t,a.source)),a.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(a.name=r.name)),i.addMapping(a)}),o.sources.forEach(function(r){var a=r;t!==null&&(a=vr.relative(t,r)),i._sources.has(a)||i._sources.add(a);var c=o.sourceContentFor(r);c!=null&&i.setSourceContent(r,c)}),i};El.prototype.addMapping=function(o){var e=vr.getArg(o,"generated"),t=vr.getArg(o,"original",null),i=vr.getArg(o,"source",null),r=vr.getArg(o,"name",null);!this._skipValidation&&this._validateMapping(e,t,i,r)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),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:i,name:r}))};El.prototype.setSourceContent=function(o,e){var t=o;this._sourceRoot!=null&&(t=vr.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[vr.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[vr.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};El.prototype.applySourceMap=function(o,e,t){var i=e;if(e==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=o.file}var r=this._sourceRoot;r!=null&&(i=vr.relative(r,i));var a=new vy,c=new vy;this._mappings.unsortedForEach(function(p){if(p.source===i&&p.originalLine!=null){var u=o.originalPositionFor({line:p.originalLine,column:p.originalColumn});u.source!=null&&(p.source=u.source,t!=null&&(p.source=vr.join(t,p.source)),r!=null&&(p.source=vr.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 g=p.name;g!=null&&!c.has(g)&&c.add(g)},this),this._sources=a,this._names=c,o.sources.forEach(function(p){var u=o.sourceContentFor(p);u!=null&&(t!=null&&(p=vr.join(t,p)),r!=null&&(p=vr.relative(r,p)),this.setSourceContent(p,u))},this)};El.prototype._validateMapping=function(o,e,t,i){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(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!e&&!t&&!i)){if(o&&"line"in o&&"column"in o&&e&&"line"in e&&"column"in e&&o.line>0&&o.column>=0&&e.line>0&&e.column>=0&&t)return;var r="Invalid mapping: "+JSON.stringify({generated:o,source:t,original:e,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}};El.prototype._serializeMappings=function(){for(var o=0,e=1,t=0,i=0,r=0,a=0,c="",p,u,h,g,y=this._mappings.toArray(),b=0,x=y.length;b0){if(!vr.compareByGeneratedPositionsInflated(u,y[b-1]))continue;p+=","}p+=nv.encode(u.generatedColumn-o),o=u.generatedColumn,u.source!=null&&(g=this._sources.indexOf(u.source),p+=nv.encode(g-a),a=g,p+=nv.encode(u.originalLine-1-i),i=u.originalLine-1,p+=nv.encode(u.originalColumn-t),t=u.originalColumn,u.name!=null&&(h=this._names.indexOf(u.name),p+=nv.encode(h-r),r=h)),c+=p}return c};El.prototype._generateSourcesContent=function(o,e){return o.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=vr.relative(e,t));var i=vr.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};El.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o};El.prototype.toString=function(){return JSON.stringify(this.toJSON())};A7.SourceMapGenerator=El});var mO=ws((A9,Uw)=>{(function(n){"use strict";let o="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${o}\\.${o}\\.${o}\\.${o}$`,"i"),threeOctet:new RegExp(`^${o}\\.${o}\\.${o}$`,"i"),twoOctet:new RegExp(`^${o}\\.${o}$`,"i"),longValue:new RegExp(`^${o}$`,"i")},t=new RegExp("^0[0-7]+$","i"),i=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(`^(?:::)(${o}\\.${o}\\.${o}\\.${o}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${o}\\.${o}\\.${o}\\.${o}(${r})?$`,"i")};function p(b,x){if(b.indexOf("::")!==b.lastIndexOf("::"))return null;let M=0,w=-1,S=(b.match(c.zoneIndex)||[])[0],E,O;for(S&&(S=S.substring(1),b=b.replace(/%.+$/,""));(w=b.indexOf(":",w+1))>=0;)M++;if(b.substr(0,2)==="::"&&M--,b.substr(-2,2)==="::"&&M--,M>x)return null;for(O=x-M,E=":";O--;)E+="0:";return b=b.replace("::",E),b[0]===":"&&(b=b.slice(1)),b[b.length-1]===":"&&(b=b.slice(0,-1)),x=(function(){let D=b.split(":"),N=[];for(let P=0;P0;){if(E=M-w,E<0&&(E=0),b[S]>>E!==x[S]>>E)return!1;w-=M,S+=1}return!0}function h(b){if(i.test(b))return parseInt(b,16);if(b[0]==="0"&&!isNaN(parseInt(b[1],10))){if(t.test(b))return parseInt(b,8);throw new Error(`ipaddr: cannot parse ${b} as octal`)}return parseInt(b,10)}function g(b,x){for(;b.length=0;S-=1)if(E=this.octets[S],E in w){if(O=w[E],M&&O!==0)return null;O!==8&&(M=!0),x+=O}else return null;return 32-x},b.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},b.prototype.toByteArray=function(){return this.octets.slice(0)},b.prototype.toIPv4MappedAddress=function(){return y.IPv6.parse(`::ffff:${this.toString()}`)},b.prototype.toNormalizedString=function(){return this.toString()},b.prototype.toString=function(){return this.octets.join(".")},b})(),y.IPv4.broadcastAddressFromCIDR=function(b){try{let x=this.parseCIDR(b),M=x[0].toByteArray(),w=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],E=0;for(;E<4;)S.push(parseInt(M[E],10)|parseInt(w[E],10)^255),E++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.isIPv4=function(b){return this.parser(b)!==null},y.IPv4.isValid=function(b){try{return new this(this.parser(b)),!0}catch{return!1}},y.IPv4.isValidCIDR=function(b){try{return this.parseCIDR(b),!0}catch{return!1}},y.IPv4.isValidFourPartDecimal=function(b){return!!(y.IPv4.isValid(b)&&b.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},y.IPv4.isValidCIDRFourPartDecimal=function(b){let x=b.match(/^(.+)\/(\d+)$/);return!y.IPv4.isValidCIDR(b)||!x?!1:y.IPv4.isValidFourPartDecimal(x[1])},y.IPv4.networkAddressFromCIDR=function(b){let x,M,w,S,E;try{for(x=this.parseCIDR(b),w=x[0].toByteArray(),E=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],M=0;M<4;)S.push(parseInt(w[M],10)&parseInt(E[M],10)),M++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.parse=function(b){let x=this.parser(b);if(x===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(x)},y.IPv4.parseCIDR=function(b){let x;if(x=b.match(/^(.+)\/(\d+)$/)){let M=parseInt(x[2]);if(M>=0&&M<=32){let w=[this.parse(x[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")},y.IPv4.parser=function(b){let x,M,w;if(x=b.match(e.fourOctet))return(function(){let S=x.slice(1,6),E=[];for(let O=0;O4294967295||w<0)throw new Error("ipaddr: address outside defined range");return(function(){let S=[],E;for(E=0;E<=24;E+=8)S.push(w>>E&255);return S})().reverse()}else return(x=b.match(e.twoOctet))?(function(){let S=x.slice(1,4),E=[];if(w=h(S[1]),w>16777215||w<0)throw new Error("ipaddr: address outside defined range");return E.push(h(S[0])),E.push(w>>16&255),E.push(w>>8&255),E.push(w&255),E})():(x=b.match(e.threeOctet))?(function(){let S=x.slice(1,5),E=[];if(w=h(S[2]),w>65535||w<0)throw new Error("ipaddr: address outside defined range");return E.push(h(S[0])),E.push(h(S[1])),E.push(w>>8&255),E.push(w&255),E})():null},y.IPv4.subnetMaskFromPrefixLength=function(b){if(b=parseInt(b),b<0||b>32)throw new Error("ipaddr: invalid IPv4 prefix length");let x=[0,0,0,0],M=0,w=Math.floor(b/8);for(;M=0;O-=1)if(S=this.parts[O],S in w){if(E=w[S],M&&E!==0)return null;E!==16&&(M=!0),x+=E}else return null;return 128-x},b.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},b.prototype.toByteArray=function(){let x,M=[],w=this.parts;for(let S=0;S>8),M.push(x&255);return M},b.prototype.toFixedLengthString=function(){let x=function(){let w=[];for(let S=0;S>8,M&255,w>>8,w&255])},b.prototype.toNormalizedString=function(){let x=function(){let w=[];for(let S=0;SS&&(w=E.index,S=E[0].length);return S<0?M:`${M.substring(0,w)}::${M.substring(w+S)}`},b.prototype.toString=function(){return this.toRFC5952String()},b})(),y.IPv6.broadcastAddressFromCIDR=function(b){try{let x=this.parseCIDR(b),M=x[0].toByteArray(),w=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],E=0;for(;E<16;)S.push(parseInt(M[E],10)|parseInt(w[E],10)^255),E++;return new this(S)}catch(x){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${x})`)}},y.IPv6.isIPv6=function(b){return this.parser(b)!==null},y.IPv6.isValid=function(b){if(typeof b=="string"&&b.indexOf(":")===-1)return!1;try{let x=this.parser(b);return new this(x.parts,x.zoneId),!0}catch{return!1}},y.IPv6.isValidCIDR=function(b){if(typeof b=="string"&&b.indexOf(":")===-1)return!1;try{return this.parseCIDR(b),!0}catch{return!1}},y.IPv6.networkAddressFromCIDR=function(b){let x,M,w,S,E;try{for(x=this.parseCIDR(b),w=x[0].toByteArray(),E=this.subnetMaskFromPrefixLength(x[1]).toByteArray(),S=[],M=0;M<16;)S.push(parseInt(w[M],10)&parseInt(E[M],10)),M++;return new this(S)}catch(O){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${O})`)}},y.IPv6.parse=function(b){let x=this.parser(b);if(x.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(x.parts,x.zoneId)},y.IPv6.parseCIDR=function(b){let x,M,w;if((M=b.match(/^(.+)\/(\d+)$/))&&(x=parseInt(M[2]),x>=0&&x<=128))return w=[this.parse(M[1]),x],Object.defineProperty(w,"toString",{value:function(){return this.join("/")}}),w;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},y.IPv6.parser=function(b){let x,M,w,S,E,O;if(w=b.match(c.deprecatedTransitional))return this.parser(`::ffff:${w[1]}`);if(c.native.test(b))return p(b,8);if((w=b.match(c.transitional))&&(O=w[6]||"",x=w[1],w[1].endsWith("::")||(x=x.slice(0,-1)),x=p(x+O,6),x.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 x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0,w=Math.floor(b/8);for(;M{(function(n){if(typeof B9=="object")z9.exports=n();else if(typeof define=="function"&&define.amd)define(n);else{var o;try{o=window}catch{o=self}o.SparkMD5=n()}})(function(n){"use strict";var o=function(S,E){return S+E&4294967295},e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(S,E,O,D,N,P){return E=o(o(E,S),o(D,P)),o(E<>>32-N,O)}function i(S,E){var O=S[0],D=S[1],N=S[2],P=S[3];O+=(D&N|~D&P)+E[0]-680876936|0,O=(O<<7|O>>>25)+D|0,P+=(O&D|~O&N)+E[1]-389564586|0,P=(P<<12|P>>>20)+O|0,N+=(P&O|~P&D)+E[2]+606105819|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&O)+E[3]-1044525330|0,D=(D<<22|D>>>10)+N|0,O+=(D&N|~D&P)+E[4]-176418897|0,O=(O<<7|O>>>25)+D|0,P+=(O&D|~O&N)+E[5]+1200080426|0,P=(P<<12|P>>>20)+O|0,N+=(P&O|~P&D)+E[6]-1473231341|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&O)+E[7]-45705983|0,D=(D<<22|D>>>10)+N|0,O+=(D&N|~D&P)+E[8]+1770035416|0,O=(O<<7|O>>>25)+D|0,P+=(O&D|~O&N)+E[9]-1958414417|0,P=(P<<12|P>>>20)+O|0,N+=(P&O|~P&D)+E[10]-42063|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&O)+E[11]-1990404162|0,D=(D<<22|D>>>10)+N|0,O+=(D&N|~D&P)+E[12]+1804603682|0,O=(O<<7|O>>>25)+D|0,P+=(O&D|~O&N)+E[13]-40341101|0,P=(P<<12|P>>>20)+O|0,N+=(P&O|~P&D)+E[14]-1502002290|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&O)+E[15]+1236535329|0,D=(D<<22|D>>>10)+N|0,O+=(D&P|N&~P)+E[1]-165796510|0,O=(O<<5|O>>>27)+D|0,P+=(O&N|D&~N)+E[6]-1069501632|0,P=(P<<9|P>>>23)+O|0,N+=(P&D|O&~D)+E[11]+643717713|0,N=(N<<14|N>>>18)+P|0,D+=(N&O|P&~O)+E[0]-373897302|0,D=(D<<20|D>>>12)+N|0,O+=(D&P|N&~P)+E[5]-701558691|0,O=(O<<5|O>>>27)+D|0,P+=(O&N|D&~N)+E[10]+38016083|0,P=(P<<9|P>>>23)+O|0,N+=(P&D|O&~D)+E[15]-660478335|0,N=(N<<14|N>>>18)+P|0,D+=(N&O|P&~O)+E[4]-405537848|0,D=(D<<20|D>>>12)+N|0,O+=(D&P|N&~P)+E[9]+568446438|0,O=(O<<5|O>>>27)+D|0,P+=(O&N|D&~N)+E[14]-1019803690|0,P=(P<<9|P>>>23)+O|0,N+=(P&D|O&~D)+E[3]-187363961|0,N=(N<<14|N>>>18)+P|0,D+=(N&O|P&~O)+E[8]+1163531501|0,D=(D<<20|D>>>12)+N|0,O+=(D&P|N&~P)+E[13]-1444681467|0,O=(O<<5|O>>>27)+D|0,P+=(O&N|D&~N)+E[2]-51403784|0,P=(P<<9|P>>>23)+O|0,N+=(P&D|O&~D)+E[7]+1735328473|0,N=(N<<14|N>>>18)+P|0,D+=(N&O|P&~O)+E[12]-1926607734|0,D=(D<<20|D>>>12)+N|0,O+=(D^N^P)+E[5]-378558|0,O=(O<<4|O>>>28)+D|0,P+=(O^D^N)+E[8]-2022574463|0,P=(P<<11|P>>>21)+O|0,N+=(P^O^D)+E[11]+1839030562|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^O)+E[14]-35309556|0,D=(D<<23|D>>>9)+N|0,O+=(D^N^P)+E[1]-1530992060|0,O=(O<<4|O>>>28)+D|0,P+=(O^D^N)+E[4]+1272893353|0,P=(P<<11|P>>>21)+O|0,N+=(P^O^D)+E[7]-155497632|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^O)+E[10]-1094730640|0,D=(D<<23|D>>>9)+N|0,O+=(D^N^P)+E[13]+681279174|0,O=(O<<4|O>>>28)+D|0,P+=(O^D^N)+E[0]-358537222|0,P=(P<<11|P>>>21)+O|0,N+=(P^O^D)+E[3]-722521979|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^O)+E[6]+76029189|0,D=(D<<23|D>>>9)+N|0,O+=(D^N^P)+E[9]-640364487|0,O=(O<<4|O>>>28)+D|0,P+=(O^D^N)+E[12]-421815835|0,P=(P<<11|P>>>21)+O|0,N+=(P^O^D)+E[15]+530742520|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^O)+E[2]-995338651|0,D=(D<<23|D>>>9)+N|0,O+=(N^(D|~P))+E[0]-198630844|0,O=(O<<6|O>>>26)+D|0,P+=(D^(O|~N))+E[7]+1126891415|0,P=(P<<10|P>>>22)+O|0,N+=(O^(P|~D))+E[14]-1416354905|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~O))+E[5]-57434055|0,D=(D<<21|D>>>11)+N|0,O+=(N^(D|~P))+E[12]+1700485571|0,O=(O<<6|O>>>26)+D|0,P+=(D^(O|~N))+E[3]-1894986606|0,P=(P<<10|P>>>22)+O|0,N+=(O^(P|~D))+E[10]-1051523|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~O))+E[1]-2054922799|0,D=(D<<21|D>>>11)+N|0,O+=(N^(D|~P))+E[8]+1873313359|0,O=(O<<6|O>>>26)+D|0,P+=(D^(O|~N))+E[15]-30611744|0,P=(P<<10|P>>>22)+O|0,N+=(O^(P|~D))+E[6]-1560198380|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~O))+E[13]+1309151649|0,D=(D<<21|D>>>11)+N|0,O+=(N^(D|~P))+E[4]-145523070|0,O=(O<<6|O>>>26)+D|0,P+=(D^(O|~N))+E[11]-1120210379|0,P=(P<<10|P>>>22)+O|0,N+=(O^(P|~D))+E[2]+718787259|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~O))+E[9]-343485551|0,D=(D<<21|D>>>11)+N|0,S[0]=O+S[0]|0,S[1]=D+S[1]|0,S[2]=N+S[2]|0,S[3]=P+S[3]|0}function r(S){var E=[],O;for(O=0;O<64;O+=4)E[O>>2]=S.charCodeAt(O)+(S.charCodeAt(O+1)<<8)+(S.charCodeAt(O+2)<<16)+(S.charCodeAt(O+3)<<24);return E}function a(S){var E=[],O;for(O=0;O<64;O+=4)E[O>>2]=S[O]+(S[O+1]<<8)+(S[O+2]<<16)+(S[O+3]<<24);return E}function c(S){var E=S.length,O=[1732584193,-271733879,-1732584194,271733878],D,N,P,L,se,re;for(D=64;D<=E;D+=64)i(O,r(S.substring(D-64,D)));for(S=S.substring(D-64),N=S.length,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=0;D>2]|=S.charCodeAt(D)<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(i(O,P),D=0;D<16;D+=1)P[D]=0;return L=E*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),se=parseInt(L[2],16),re=parseInt(L[1],16)||0,P[14]=se,P[15]=re,i(O,P),O}function p(S){var E=S.length,O=[1732584193,-271733879,-1732584194,271733878],D,N,P,L,se,re;for(D=64;D<=E;D+=64)i(O,a(S.subarray(D-64,D)));for(S=D-64>2]|=S[D]<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(i(O,P),D=0;D<16;D+=1)P[D]=0;return L=E*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),se=parseInt(L[2],16),re=parseInt(L[1],16)||0,P[14]=se,P[15]=re,i(O,P),O}function u(S){var E="",O;for(O=0;O<4;O+=1)E+=e[S>>O*8+4&15]+e[S>>O*8&15];return E}function h(S){var E;for(E=0;E>16)+(E>>16)+(O>>16);return D<<16|O&65535}),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function S(E,O){return E=E|0||0,E<0?Math.max(E+O,0):Math.min(E,O)}ArrayBuffer.prototype.slice=function(E,O){var D=this.byteLength,N=S(E,D),P=D,L,se,re,W;return O!==n&&(P=S(O,D)),N>P?new ArrayBuffer(0):(L=P-N,se=new ArrayBuffer(L),re=new Uint8Array(se),W=new Uint8Array(this,N,L),re.set(W),se)}})();function g(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function y(S,E){var O=S.length,D=new ArrayBuffer(O),N=new Uint8Array(D),P;for(P=0;P>2]|=E.charCodeAt(D)<<(D%4<<3);return this._finish(N,O),P=h(this._hash),S&&(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(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(S,E){var O=E,D,N,P;if(S[O>>2]|=128<<(O%4<<3),O>55)for(i(this._hash,S),O=0;O<16;O+=1)S[O]=0;D=this._length*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(D[2],16),P=parseInt(D[1],16)||0,S[14]=N,S[15]=P,i(this._hash,S)},w.hash=function(S,E){return w.hashBinary(g(S),E)},w.hashBinary=function(S,E){var O=c(S),D=h(O);return E?M(D):D},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(S){var E=x(this._buff.buffer,S,!0),O=E.length,D;for(this._length+=S.byteLength,D=64;D<=O;D+=64)i(this._hash,a(E.subarray(D-64,D)));return this._buff=D-64>2]|=E[N]<<(N%4<<3);return this._finish(D,O),P=h(this._hash),S&&(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 S=w.prototype.getState.call(this);return S.buff=b(S.buff),S},w.ArrayBuffer.prototype.setState=function(S){return S.buff=y(S.buff,!0),w.prototype.setState.call(this,S)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(S,E){var O=p(new Uint8Array(S)),D=h(O);return E?M(D):D},w})});var G9=ws(hO=>{"use strict";(function(){var n=typeof hO<"u"&&hO||typeof define<"u"&&{}||this||window;typeof define<"u"&&define("save-svg-as-png",[],function(){return n}),n.default=n;var o="http://www.w3.org/2000/xmlns/",e="http://www.w3.org/1999/xhtml",t="http://www.w3.org/2000/svg",i=']>',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},g=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")},y=function($){for(var ue="",be=new Uint8Array($),me=0;me"u"||me===null||isNaN(parseFloat(me))?0:me},x=function($,ue,be,me){if($.tagName==="svg")return{width:be||b($,ue,"width"),height:me||b($,ue,"height")};if($.getBBox){var Pe=$.getBBox(),he=Pe.x,j=Pe.y,J=Pe.width,le=Pe.height;return{width:he+J,height:j+le}}},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),Pe=new Uint8Array(me),he=0;he"u",He=j||[];return L().forEach(function(et){var Ze=et.rules,ye=et.href;Ze&&Array.from(Ze).forEach(function(q){if(typeof q.style<"u")if(S($,q.selectorText))ce.push(le(q.selectorText,q.style.cssText));else if(De&&q.cssText.match(/^@font-face/)){var Ne=E(q,ye);Ne&&He.push(Ne)}else J||ce.push(q.cssText)})}),N(He).then(function(et){return ce.join(` `)+et})},re=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};n.prepareSvg=function(W,$,ue){p(W);var be=$||{},me=be.left,Pe=me===void 0?0:me,he=be.top,j=he===void 0?0:he,J=be.width,le=be.height,ce=be.scale,De=ce===void 0?1:ce,He=be.responsive,et=He===void 0?!1:He,Ze=be.excludeCss,ye=Ze===void 0?!1:Ze;return O(W).then(function(){var q=W.cloneNode(!0);q.style.backgroundColor=($||{}).backgroundColor||W.style.backgroundColor;var Ne=x(W,q,J,le),Qe=Ne.width,ct=Ne.height;if(W.tagName!=="svg")if(W.getBBox){q.getAttribute("transform")!=null&&q.setAttribute("transform",q.getAttribute("transform").replace(/translate\(.*?\)/,""));var At=document.createElementNS("http://www.w3.org/2000/svg","svg");At.appendChild(q),q=At}else{console.error("Attempted to render non-SVG element",W);return}if(q.setAttribute("version","1.1"),q.setAttribute("viewBox",[Pe,j,Qe,ct].join(" ")),q.getAttribute("xmlns")||q.setAttributeNS(o,"xmlns",t),q.getAttribute("xmlns:xlink")||q.setAttributeNS(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),et?(q.removeAttribute("width"),q.removeAttribute("height"),q.setAttribute("preserveAspectRatio","xMinYMin meet")):(q.setAttribute("width",Qe*De),q.setAttribute("height",ct*De)),Array.from(q.querySelectorAll("foreignObject > *")).forEach(function(vo){vo.setAttributeNS(o,"xmlns",vo.tagName==="svg"?t:e)}),ye){var Yn=document.createElement("div");Yn.appendChild(q);var Oo=Yn.innerHTML;if(typeof ue=="function")ue(Oo,Qe,ct);else return{src:Oo,width:Qe,height:ct}}else return se(W,$).then(function(vo){var Wr=document.createElement("style");Wr.setAttribute("type","text/css"),Wr.innerHTML=``;var Rn=document.createElement("defs");Rn.appendChild(Wr),q.insertBefore(Rn,q.firstChild);var Gd=document.createElement("div");Gd.appendChild(q);var Hu=Gd.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if(typeof ue=="function")ue(Hu,Qe,ct);else return{src:Hu,width:Qe,height:ct}})})},n.svgAsDataUri=function(W,$,ue){return p(W),n.prepareSvg(W,$).then(function(be){var me=be.src,Pe=be.width,he=be.height,j="data:image/svg+xml;base64,"+window.btoa(M(i+me));return typeof ue=="function"&&ue(j,Pe,he),j})},n.svgAsPngUri=function(W,$,ue){p(W);var be=$||{},me=be.encoderType,Pe=me===void 0?"image/png":me,he=be.encoderOptions,j=he===void 0?.8:he,J=be.canvg,le=function(De){var He=De.src,et=De.width,Ze=De.height,ye=document.createElement("canvas"),q=ye.getContext("2d"),Ne=window.devicePixelRatio||1;ye.width=et*Ne,ye.height=Ze*Ne,ye.style.width=ye.width+"px",ye.style.height=ye.height+"px",q.setTransform(Ne,0,0,Ne,0,0),J?J(ye,He):q.drawImage(He,0,0);var Qe=void 0;try{Qe=ye.toDataURL(Pe,j)}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(Qe,ye.width,ye.height),Promise.resolve(Qe)};return J?n.prepareSvg(W,$).then(le):n.svgAsDataUri(W,$).then(function(ce){return new Promise(function(De,He){var et=new Image;et.onload=function(){return De(le({src:et,width:et.width,height:et.height}))},et.onerror=function(){He(`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)},et.src=ce})})},n.download=function(W,$,ue){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(w($),W);else{var be=document.createElement("a");if("download"in be){be.download=W,be.style.display="none",document.body.appendChild(be);try{var me=w($),Pe=URL.createObjectURL(me);be.href=Pe,be.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(Pe)})}}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=W,ue.popup.location.replace($))}},n.saveSvg=function(W,$,ue){var be=re();return u(W).then(function(me){return n.svgAsDataUri(me,ue||{})}).then(function(me){return n.download($,me,be)})},n.saveSvgAsPng=function(W,$,ue){var be=re();return u(W).then(function(me){return n.svgAsPngUri(me,ue||{})}).then(function(me){return n.download($,me,be)})}})()});var xO=ws((q2,CO)=>{(function(n,o){if(typeof q2=="object"&&typeof CO=="object")CO.exports=o();else if(typeof define=="function"&&define.amd)define([],o);else{var e=o();for(var t in e)(typeof q2=="object"?q2:n)[t]=e[t]}})(globalThis,()=>(()=>{"use strict";var n={4567:function(i,r,a){var c=this&&this.__decorate||function(w,S,E,O){var D,N=arguments.length,P=N<3?S:O===null?O=Object.getOwnPropertyDescriptor(S,E):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,S,E,O);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(S,E,P):D(S,E))||P);return N>3&&P&&Object.defineProperty(S,E,P),P},p=this&&this.__param||function(w,S){return function(E,O){S(E,O,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let u=a(9042),h=a(9924),g=a(844),y=a(4725),b=a(2585),x=a(3656),M=r.AccessibilityManager=class extends g.Disposable{constructor(w,S,E,O){super(),this._terminal=w,this._coreBrowserService=E,this._renderService=O,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,x.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(w){for(let S=0;S0?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,S){this._liveRegionDebouncer.refresh(w,S,this._terminal.rows)}_renderRows(w,S){let E=this._terminal.buffer,O=E.lines.length.toString();for(let D=w;D<=S;D++){let N=E.lines.get(E.ydisp+D),P=[],L=N?.translateToString(!0,void 0,void 0,P)||"",se=(E.ydisp+D+1).toString(),re=this._rowElements[D];re&&(L.length===0?(re.innerText="\xA0",this._rowColumns.set(re,[0,1])):(re.textContent=L,this._rowColumns.set(re,P)),re.setAttribute("aria-posinset",se),re.setAttribute("aria-setsize",O))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,S){let E=w.target,O=this._rowElements[S===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(S===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==O)return;let D,N;if(S===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),S===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(S===0?-1:1),this._rowElements[S===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 S={node:w.anchorNode,offset:w.anchorOffset},E={node:w.focusNode,offset:w.focusOffset};if((S.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||S.node===E.node&&S.offset>E.offset)&&([S,E]=[E,S]),S.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(S={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(S.node))return;let O=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(O)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:O,offset:O.textContent?.length??0}),!this._rowContainer.contains(E.node))return;let D=({node:L,offset:se})=>{let re=L instanceof Text?L.parentNode:L,W=parseInt(re?.getAttribute("aria-posinset"),10)-1;if(isNaN(W))return console.warn("row is invalid. Race condition?"),null;let $=this._rowColumns.get(re);if(!$)return console.warn("columns is null. Race condition?"),null;let ue=se<$.length?$[se]:$.slice(-1)[0]+1;return ue>=this._terminal.cols&&(++W,ue=0),{row:W,column:ue}},N=D(S),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 S=this._rowContainer.children.length;Sw;)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,g){return g?"\x1B[200~"+h+"\x1B[201~":h}function p(h,g,y,b){h=c(h=a(h),y.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),y.triggerDataEvent(h,!0),g.value=""}function u(h,g,y){let b=y.getBoundingClientRect(),x=h.clientX-b.left-10,M=h.clientY-b.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${x}px`,g.style.top=`${M}px`,g.style.zIndex="1000",g.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,g){h.clipboardData&&h.clipboardData.setData("text/plain",g.selectionText),h.preventDefault()},r.handlePasteEvent=function(h,g,y,b){h.stopPropagation(),h.clipboardData&&p(h.clipboardData.getData("text/plain"),g,y,b)},r.paste=p,r.moveTextAreaUnderMouseCursor=u,r.rightClickHandler=function(h,g,y,b,x){u(h,g,y),x&&b.rightClickSelect(h),g.value=b.selectionText,g.select()}},7239:(i,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:(i,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(i,r,a){var c=this&&this.__decorate||function(M,w,S,E){var O,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,S,E);else for(var P=M.length-1;P>=0;P--)(O=M[P])&&(N=(D<3?O(N):D>3?O(w,S,N):O(w,S))||N);return D>3&&N&&Object.defineProperty(w,S,N),N},p=this&&this.__param||function(M,w){return function(S,E){w(S,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let u=a(3656),h=a(8460),g=a(844),y=a(2585),b=a(4725),x=r.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(M,w,S,E,O){super(),this._element=M,this._mouseService=w,this._renderService=S,this._bufferService=E,this._linkProviderService=O,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,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.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 S=M.composedPath();for(let E=0;E{E?.forEach(O=>{O.link.dispose&&O.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=M.y);let S=!1;for(let[E,O]of this._linkProviderService.linkProviders.entries())w?this._activeProviderReplies?.get(E)&&(S=this._checkLinkProviderResult(E,M,S)):O.provideLinks(M.y,D=>{if(this._isMouseOut)return;let N=D?.map(P=>({link:P}));this._activeProviderReplies?.set(E,N),S=this._checkLinkProviderResult(E,M,S),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(M.y,this._activeProviderReplies)})}_removeIntersectingLinks(M,w){let S=new Set;for(let E=0;EM?this._bufferService.cols:N.link.range.end.x;for(let se=P;se<=L;se++){if(S.has(se)){O.splice(D--,1);break}S.add(se)}}}}_checkLinkProviderResult(M,w,S){if(!this._activeProviderReplies)return S;let E=this._activeProviderReplies.get(M),O=!1;for(let D=0;Dthis._linkAtPosition(N.link,w));D&&(S=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!S)for(let D=0;Dthis._linkAtPosition(P.link,w));if(N){S=!0,this._handleNewLink(N);break}}return S}_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,g.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:S=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==S&&(this._currentLink.state.decorations.pointerCursor=S,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",S))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:S=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==S&&(this._currentLink.state.decorations.underline=S,this._currentLink.state.isHovered&&this._fireUnderlineEvent(M.link,S))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(S=>{if(!this._currentLink)return;let E=S.start===0?0:S.start+1+this._bufferService.buffer.ydisp,O=this._bufferService.buffer.ydisp+1+S.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=O&&(this._clearCurrentLink(E,O),this._lastMouseEvent)){let D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}})))}_linkHover(M,w,S){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(S,w.text)}_fireUnderlineEvent(M,w){let S=M.range,E=this._bufferService.buffer.ydisp,O=this._createLinkUnderlineEvent(S.start.x-1,S.start.y-E-1,S.end.x,S.end.y-E-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(O)}_linkLeave(M,w,S){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(S,w.text)}_linkAtPosition(M,w){let S=M.range.start.y*this._bufferService.cols+M.range.start.x,E=M.range.end.y*this._bufferService.cols+M.range.end.x,O=w.y*this._bufferService.cols+w.x;return S<=O&&O<=E}_positionFromMouseEvent(M,w,S){let E=S.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,S,E,O){return{x1:M,y1:w,x2:S,y2:E,cols:this._bufferService.cols,fg:O}}};r.Linkifier=x=c([p(1,b.IMouseService),p(2,b.IRenderService),p(3,y.IBufferService),p(4,b.ILinkProviderService)],x)},9042:(i,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(i,r,a){var c=this&&this.__decorate||function(b,x,M,w){var S,E=arguments.length,O=E<3?x:w===null?w=Object.getOwnPropertyDescriptor(x,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(b,x,M,w);else for(var D=b.length-1;D>=0;D--)(S=b[D])&&(O=(E<3?S(O):E>3?S(x,M,O):S(x,M))||O);return E>3&&O&&Object.defineProperty(x,M,O),O},p=this&&this.__param||function(b,x){return function(M,w){x(M,w,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let u=a(511),h=a(2585),g=r.OscLinkProvider=class{constructor(b,x,M){this._bufferService=b,this._optionsService=x,this._oscLinkService=M}provideLinks(b,x){let M=this._bufferService.buffer.lines.get(b-1);if(!M)return void x(void 0);let w=[],S=this._optionsService.rawOptions.linkHandler,E=new u.CellData,O=M.getTrimmedLength(),D=-1,N=-1,P=!1;for(let L=0;LS?S.activate($,ue,re):y(0,ue),hover:($,ue)=>S?.hover?.($,ue,re),leave:($,ue)=>S?.leave?.($,ue,re)})}P=!1,E.hasExtendedAttrs()&&E.extended.urlId?(N=L,D=E.extended.urlId):(N=-1,D=-1)}}x(w)}};function y(b,x){if(confirm(`Do you want to navigate to ${x}? WARNING: This link could potentially be dangerous`)){let M=window.open();if(M){try{M.opener=null}catch{}M.location.href=x}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=g=c([p(0,h.IBufferService),p(1,h.IOptionsService),p(2,h.IOscLinkService)],g)},6193:(i,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:(i,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),g=a(3730),y=a(1680),b=a(3107),x=a(5744),M=a(2950),w=a(1296),S=a(428),E=a(4269),O=a(5114),D=a(8934),N=a(3230),P=a(9312),L=a(4725),se=a(6731),re=a(8055),W=a(8969),$=a(8460),ue=a(844),be=a(6114),me=a(8437),Pe=a(2584),he=a(7399),j=a(5941),J=a(9074),le=a(2585),ce=a(5435),De=a(4567),He=a(779);class et extends W.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(J.DecorationService),this._instantiationService.setService(le.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(He.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((q,Ne)=>this.refresh(q,Ne))),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 Ne,Qe="";switch(q.index){case 256:Ne="foreground",Qe="10";break;case 257:Ne="background",Qe="11";break;case 258:Ne="cursor",Qe="12";break;default:Ne="ansi",Qe="4;"+q.index}switch(q.type){case 0:let ct=re.color.toColorRGB(Ne==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[Ne]);this.coreService.triggerDataEvent(`${Pe.C0.ESC}]${Qe};${(0,j.toRgbString)(ct)}${Pe.C1_ESCAPED.ST}`);break;case 1:if(Ne==="ansi")this._themeService.modifyColors(At=>At.ansi[q.index]=re.channels.toColor(...q.color));else{let At=Ne;this._themeService.modifyColors(Yn=>Yn[At]=re.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(De.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ye){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Pe.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(Pe.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 Ne=Math.min(this.buffer.x,this.cols-1),Qe=this._renderService.dimensions.css.cell.height,ct=q.getWidth(Ne),At=this._renderService.dimensions.css.cell.width*ct,Yn=this.buffer.y*this._renderService.dimensions.css.cell.height,Oo=Ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Oo+"px",this.textarea.style.top=Yn+"px",this.textarea.style.width=At+"px",this.textarea.style.height=Qe+"px",this.textarea.style.lineHeight=Qe+"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",Ne=>this.updateCursorStyle(Ne))),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(O.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",Ne=>this._handleTextAreaFocus(Ne))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(S.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(se.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(Ne=>this._onRender.fire(Ne))),this.onResize(Ne=>this._renderService.resize(Ne.cols,Ne.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(y.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(Ne=>this.scrollLines(Ne.amount,Ne.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(Ne=>this.scrollLines(Ne.amount,Ne.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(Ne=>this._renderService.handleSelectionChanged(Ne.start,Ne.end,Ne.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(Ne=>{this.textarea.value=Ne,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(Ne=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",Ne=>this._selectionService.handleMouseDown(Ne))),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(De.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",Ne=>this._handleScreenReaderModeOptionChange(Ne))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(x.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",Ne=>{!this._overviewRulerRenderer&&Ne&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(x.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 Ne(At){let Yn=ye._mouseService.getMouseReportCoords(At,ye.screenElement);if(!Yn)return!1;let Oo,vo;switch(At.overrideType||At.type){case"mousemove":vo=32,At.buttons===void 0?(Oo=3,At.button!==void 0&&(Oo=At.button<3?At.button:3)):Oo=1&At.buttons?0:4&At.buttons?1:2&At.buttons?2:3;break;case"mouseup":vo=0,Oo=At.button<3?At.button:3;break;case"mousedown":vo=1,Oo=At.button<3?At.button:3;break;case"wheel":if(ye._customWheelEventHandler&&ye._customWheelEventHandler(At)===!1||ye.viewport.getLinesScrolled(At)===0)return!1;vo=At.deltaY<0?0:1,Oo=4;break;default:return!1}return!(vo===void 0||Oo===void 0||Oo>4)&&ye.coreMouseService.triggerMouseEvent({col:Yn.col,row:Yn.row,x:Yn.x,y:Yn.y,button:Oo,action:vo,ctrl:At.ctrlKey,alt:At.altKey,shift:At.shiftKey})}let Qe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ct={mouseup:At=>(Ne(At),At.buttons||(this._document.removeEventListener("mouseup",Qe.mouseup),Qe.mousedrag&&this._document.removeEventListener("mousemove",Qe.mousedrag)),this.cancel(At)),wheel:At=>(Ne(At),this.cancel(At,!0)),mousedrag:At=>{At.buttons&&Ne(At)},mousemove:At=>{At.buttons||Ne(At)}};this.register(this.coreMouseService.onProtocolChange(At=>{At?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(At)),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&At?Qe.mousemove||(q.addEventListener("mousemove",ct.mousemove),Qe.mousemove=ct.mousemove):(q.removeEventListener("mousemove",Qe.mousemove),Qe.mousemove=null),16&At?Qe.wheel||(q.addEventListener("wheel",ct.wheel,{passive:!1}),Qe.wheel=ct.wheel):(q.removeEventListener("wheel",Qe.wheel),Qe.wheel=null),2&At?Qe.mouseup||(Qe.mouseup=ct.mouseup):(this._document.removeEventListener("mouseup",Qe.mouseup),Qe.mouseup=null),4&At?Qe.mousedrag||(Qe.mousedrag=ct.mousedrag):(this._document.removeEventListener("mousemove",Qe.mousedrag),Qe.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(q,"mousedown",At=>{if(At.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(At))return Ne(At),Qe.mouseup&&this._document.addEventListener("mouseup",Qe.mouseup),Qe.mousedrag&&this._document.addEventListener("mousemove",Qe.mousedrag),this.cancel(At)})),this.register((0,p.addDisposableDomListener)(q,"wheel",At=>{if(!Qe.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(At)===!1)return!1;if(!this.buffer.hasScrollback){let Yn=this.viewport.getLinesScrolled(At);if(Yn===0)return;let Oo=Pe.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(At.deltaY<0?"A":"B"),vo="";for(let Wr=0;Wr{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(At),this.cancel(At)},{passive:!0})),this.register((0,p.addDisposableDomListener)(q,"touchmove",At=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(At)?void 0:this.cancel(At)},{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,Ne=0){Ne===1?(super.scrollLines(ye,q,Ne),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,Ne){this._selectionService.setSelection(ye,q,Ne)}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 Ne=(0,he.evaluateKeyboardEvent)(ye,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ye),Ne.type===3||Ne.type===2){let Qe=this.rows-1;return this.scrollLines(Ne.type===2?-Qe:Qe),this.cancel(ye,!0)}return Ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ye)||(Ne.cancel&&this.cancel(ye,!0),!Ne.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):(Ne.key!==Pe.C0.ETX&&Ne.key!==Pe.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Ne.key,domEvent:ye}),this._showCursor(),this.coreService.triggerDataEvent(Ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||ye.altKey||ye.ctrlKey?this.cancel(ye,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ye,q){let Ne=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"?Ne:Ne&&(!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,g=this._debounceThresholdMS-h;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},g)}}_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(i,r,a){var c=this&&this.__decorate||function(M,w,S,E){var O,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,S,E);else for(var P=M.length-1;P>=0;P--)(O=M[P])&&(N=(D<3?O(N):D>3?O(w,S,N):O(w,S))||N);return D>3&&N&&Object.defineProperty(w,S,N),N},p=this&&this.__param||function(M,w){return function(S,E){w(S,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;let u=a(3656),h=a(4725),g=a(8460),y=a(844),b=a(2585),x=r.Viewport=class extends y.Disposable{constructor(M,w,S,E,O,D,N,P){super(),this._viewportElement=M,this._scrollArea=w,this._bufferService=S,this._optionsService=E,this._charSizeService=O,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 g.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 S=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&S0&&(S=re),E=""}}return{bufferElements:O,cursorElement:S}}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 S=this._optionsService.rawOptions.fastScrollModifier;return S==="alt"&&w.altKey||S==="ctrl"&&w.ctrlKey||S==="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=x=c([p(2,b.IBufferService),p(3,b.IOptionsService),p(4,h.ICharSizeService),p(5,h.IRenderService),p(6,h.ICoreBrowserService),p(7,h.IThemeService)],x)},3107:function(i,r,a){var c=this&&this.__decorate||function(b,x,M,w){var S,E=arguments.length,O=E<3?x:w===null?w=Object.getOwnPropertyDescriptor(x,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(b,x,M,w);else for(var D=b.length-1;D>=0;D--)(S=b[D])&&(O=(E<3?S(O):E>3?S(x,M,O):S(x,M))||O);return E>3&&O&&Object.defineProperty(x,M,O),O},p=this&&this.__param||function(b,x){return function(M,w){x(M,w,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;let u=a(4725),h=a(844),g=a(2585),y=r.BufferDecorationRenderer=class extends h.Disposable{constructor(b,x,M,w,S){super(),this._screenElement=b,this._bufferService=x,this._coreBrowserService=M,this._decorationService=w,this._renderService=S,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 b of this._decorationService.decorations)this._renderDecoration(b);this._dimensionsChanged=!1}_renderDecoration(b){this._refreshStyle(b),this._dimensionsChanged&&this._refreshXPosition(b)}_createElement(b){let x=this._coreBrowserService.mainDocument.createElement("div");x.classList.add("xterm-decoration"),x.classList.toggle("xterm-decoration-top-layer",b?.options?.layer==="top"),x.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,x.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",x.style.top=(b.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",x.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let M=b.options.x??0;return M&&M>this._bufferService.cols&&(x.style.display="none"),this._refreshXPosition(b,x),x}_refreshStyle(b){let x=b.marker.line-this._bufferService.buffers.active.ydisp;if(x<0||x>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let M=this._decorationElements.get(b);M||(M=this._createElement(b),b.element=M,this._decorationElements.set(b,M),this._container.appendChild(M),b.onDispose(()=>{this._decorationElements.delete(b),M.remove()})),M.style.top=x*this._renderService.dimensions.css.cell.height+"px",M.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(M)}}_refreshXPosition(b,x=b.element){if(!x)return;let M=b.options.x??0;(b.options.anchor||"left")==="right"?x.style.right=M?M*this._renderService.dimensions.css.cell.width+"px":"":x.style.left=M?M*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(b){this._decorationElements.get(b)?.remove(),this._decorationElements.delete(b),b.dispose()}};r.BufferDecorationRenderer=y=c([p(1,g.IBufferService),p(2,u.ICoreBrowserService),p(3,g.IDecorationService),p(4,u.IRenderService)],y)},5871:(i,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(i,r,a){var c=this&&this.__decorate||function(S,E,O,D){var N,P=arguments.length,L=P<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,O):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(S,E,O,D);else for(var se=S.length-1;se>=0;se--)(N=S[se])&&(L=(P<3?N(L):P>3?N(E,O,L):N(E,O))||L);return P>3&&L&&Object.defineProperty(E,O,L),L},p=this&&this.__param||function(S,E){return function(O,D){E(O,D,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;let u=a(5871),h=a(4725),g=a(844),y=a(2585),b={full:0,left:0,center:0,right:0},x={full:0,left:0,center:0,right:0},M={full:0,left:0,center:0,right:0},w=r.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(S,E,O,D,N,P,L){super(),this._viewportElement=S,this._screenElement=E,this._bufferService=O,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 se=this._canvas.getContext("2d");if(!se)throw new Error("Ctx cannot be null");this._ctx=se,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.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 S=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);x.full=this._canvas.width,x.left=S,x.center=E,x.right=S,this._refreshDrawHeightConstants(),M.full=0,M.left=0,M.center=x.left,M.right=x.left+x.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);let S=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(S,12),6)*this._coreBrowserService.dpr);b.left=E,b.center=E,b.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.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 S=this._colorZoneStore.zones;for(let E of S)E.position!=="full"&&this._renderColorZone(E);for(let E of S)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(S){this._ctx.fillStyle=S.color,this._ctx.fillRect(M[S.position||"full"],Math.round((this._canvas.height-1)*(S.startBufferLine/this._bufferService.buffers.active.lines.length)-b[S.position||"full"]/2),x[S.position||"full"],Math.round((this._canvas.height-1)*((S.endBufferLine-S.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[S.position||"full"]))}_queueRefresh(S,E){this._shouldUpdateDimensions=S||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,y.IBufferService),p(3,y.IDecorationService),p(4,h.IRenderService),p(5,y.IOptionsService),p(6,h.ICoreBrowserService)],w)},2950:function(i,r,a){var c=this&&this.__decorate||function(b,x,M,w){var S,E=arguments.length,O=E<3?x:w===null?w=Object.getOwnPropertyDescriptor(x,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(b,x,M,w);else for(var D=b.length-1;D>=0;D--)(S=b[D])&&(O=(E<3?S(O):E>3?S(x,M,O):S(x,M))||O);return E>3&&O&&Object.defineProperty(x,M,O),O},p=this&&this.__param||function(b,x){return function(M,w){x(M,w,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;let u=a(4725),h=a(2585),g=a(2584),y=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,x,M,w,S,E){this._textarea=b,this._compositionView=x,this._bufferService=M,this._optionsService=w,this._coreService=S,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(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){let x={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let M;this._isSendingComposition=!1,x.start+=this._dataAlreadySent.length,M=this._isComposing?this._textarea.value.substring(x.start,x.end):this._textarea.value.substring(x.start),M.length>0&&this._coreService.triggerDataEvent(M,!0)}},0)}else{this._isSendingComposition=!1;let x=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(x,!0)}}_handleAnyTextareaChanges(){let b=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let x=this._textarea.value,M=x.replace(b,"");this._dataAlreadySent=M,x.length>b.length?this._coreService.triggerDataEvent(M,!0):x.lengththis.updateCompositionElements(!0),0)}}};r.CompositionHelper=y=c([p(2,h.IBufferService),p(3,h.IOptionsService),p(4,h.ICoreService),p(5,u.IRenderService)],y)},9806:(i,r)=>{function a(c,p,u){let h=u.getBoundingClientRect(),g=c.getComputedStyle(u),y=parseInt(g.getPropertyValue("padding-left")),b=parseInt(g.getPropertyValue("padding-top"));return[p.clientX-h.left-y,p.clientY-h.top-b]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=a,r.getCoords=function(c,p,u,h,g,y,b,x,M){if(!y)return;let w=a(c,p,u);return w?(w[0]=Math.ceil((w[0]+(M?b/2:0))/b),w[1]=Math.ceil(w[1]/x),w[0]=Math.min(Math.max(w[0],1),h+(M?1:0)),w[1]=Math.min(Math.max(w[1],1),g),w):void 0}},9504:(i,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;let c=a(2584);function p(x,M,w,S){let E=x-u(x,w),O=M-u(M,w),D=Math.abs(E-O)-(function(N,P,L){let se=0,re=N-u(N,L),W=P-u(P,L);for(let $=0;$=0&&xM?"A":"B"}function g(x,M,w,S,E,O){let D=x,N=M,P="";for(;D!==w||N!==S;)D+=E?1:-1,E&&D>O.cols-1?(P+=O.buffer.translateBufferLineToString(N,!1,x,D),D=0,x=0,N++):!E&&D<0&&(P+=O.buffer.translateBufferLineToString(N,!1,0,x+1),D=O.cols-1,x=D,N--);return P+O.buffer.translateBufferLineToString(N,!1,x,D)}function y(x,M){let w=M?"O":"[";return c.C0.ESC+w+x}function b(x,M){x=Math.floor(x);let w="";for(let S=0;S0?re-u(re,W):L;let be=re,me=(function(Pe,he,j,J,le,ce){let De;return De=p(j,J,le,ce).length>0?J-u(J,le):he,Pe=j&&Dex?"D":"C",b(Math.abs(E-x),y(D,S));D=O>M?"D":"C";let N=Math.abs(O-M);return b((function(P,L){return L.cols-P})(O>M?x:E,w)+(N-1)*w.cols+1+((O>M?E:x)-1),y(D,S))}},1296:function(i,r,a){var c=this&&this.__decorate||function($,ue,be,me){var Pe,he=arguments.length,j=he<3?ue:me===null?me=Object.getOwnPropertyDescriptor(ue,be):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate($,ue,be,me);else for(var J=$.length-1;J>=0;J--)(Pe=$[J])&&(j=(he<3?Pe(j):he>3?Pe(ue,be,j):Pe(ue,be))||j);return he>3&&j&&Object.defineProperty(ue,be,j),j},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),g=a(2223),y=a(6171),b=a(6052),x=a(4725),M=a(8055),w=a(8460),S=a(844),E=a(2585),O="xterm-dom-renderer-owner-",D="xterm-rows",N="xterm-fg-",P="xterm-bg-",L="xterm-focus",se="xterm-selection",re=1,W=r.DomRenderer=class extends S.Disposable{constructor($,ue,be,me,Pe,he,j,J,le,ce,De,He,et){super(),this._terminal=$,this._document=ue,this._element=be,this._screenElement=me,this._viewportElement=Pe,this._helperContainer=he,this._linkifier2=j,this._charSizeService=le,this._optionsService=ce,this._bufferService=De,this._coreBrowserService=He,this._themeService=et,this._terminalClass=re++,this._rowElements=[],this._selectionRenderModel=(0,b.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(se),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,y.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Ze=>this._injectCss(Ze))),this._injectCss(this._themeService.colors),this._rowFactory=J.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(O+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Ze=>this._handleLinkHover(Ze))),this.register(this._linkifier2.onHideLinkUnderline(Ze=>this._handleLinkLeave(Ze))),this.register((0,S.toDisposable)(()=>{this._element.classList.remove(O+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}`,Pe=`blink_block_${this._terminalClass}`;ue+=`@keyframes ${be} { 50% { border-bottom-style: hidden; }}`,ue+=`@keyframes ${me} { 50% { box-shadow: none; }}`,ue+=`@keyframes ${Pe} { 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: ${Pe} 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} .${se} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${se} div { position: absolute; background-color: ${$.selectionBackgroundOpaque.css};}${this._terminalSelector} .${se} div { position: absolute; background-color: ${$.selectionInactiveBackgroundOpaque.css};}`;for(let[he,j]of $.ansi.entries())ue+=`${this._terminalSelector} .${N}${he} { color: ${j.css}; }${this._terminalSelector} .${N}${he}.xterm-dim { color: ${M.color.multiplyOpacity(j,.5).css}; }${this._terminalSelector} .${P}${he} { background-color: ${j.css}; }`;ue+=`${this._terminalSelector} .${N}${g.INVERTED_DEFAULT_COLOR} { color: ${M.color.opaque($.background).css}; }${this._terminalSelector} .${N}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${M.color.multiplyOpacity(M.color.opaque($.background),.5).css}; }${this._terminalSelector} .${P}${g.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,Pe=this._selectionRenderModel.viewportEndRow,he=this._selectionRenderModel.viewportCappedStartRow,j=this._selectionRenderModel.viewportCappedEndRow;if(he>=this._bufferService.rows||j<0)return;let J=this._document.createDocumentFragment();if(be){let le=$[0]>ue[0];J.appendChild(this._createSelectionElement(he,le?ue[0]:$[0],le?$[0]:ue[0],j-he+1))}else{let le=me===he?$[0]:0,ce=he===Pe?ue[0]:this._bufferService.cols;J.appendChild(this._createSelectionElement(he,le,ce));let De=j-he-1;if(J.appendChild(this._createSelectionElement(he+1,0,this._bufferService.cols,De)),he!==j){let He=Pe===j?ue[0]:this._bufferService.cols;J.appendChild(this._createSelectionElement(j,0,He))}}this._selectionContainer.appendChild(J)}_createSelectionElement($,ue,be,me=1){let Pe=this._document.createElement("div"),he=ue*this.dimensions.css.cell.width,j=this.dimensions.css.cell.width*(be-ue);return he+j>this.dimensions.css.canvas.width&&(j=this.dimensions.css.canvas.width-he),Pe.style.height=me*this.dimensions.css.cell.height+"px",Pe.style.top=$*this.dimensions.css.cell.height+"px",Pe.style.left=`${he}px`,Pe.style.width=`${j}px`,Pe}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,Pe=Math.min(be.x,this._bufferService.cols-1),he=this._optionsService.rawOptions.cursorBlink,j=this._optionsService.rawOptions.cursorStyle,J=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=$;le<=ue;le++){let ce=le+be.ydisp,De=this._rowElements[le],He=be.lines.get(ce);if(!De||!He)break;De.replaceChildren(...this._rowFactory.createRow(He,ce,ce===me,j,J,Pe,he,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${O}${this._terminalClass}`}_handleLinkHover($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!0)}_handleLinkLeave($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!1)}_setCellUnderline($,ue,be,me,Pe,he){be<0&&($=0),me<0&&(ue=0);let j=this._bufferService.rows-1;be=Math.max(Math.min(be,j),0),me=Math.max(Math.min(me,j),0),Pe=Math.min(Pe,this._bufferService.cols);let J=this._bufferService.buffer,le=J.ybase+J.y,ce=Math.min(J.x,Pe-1),De=this._optionsService.rawOptions.cursorBlink,He=this._optionsService.rawOptions.cursorStyle,et=this._optionsService.rawOptions.cursorInactiveStyle;for(let Ze=be;Ze<=me;++Ze){let ye=Ze+J.ydisp,q=this._rowElements[Ze],Ne=J.lines.get(ye);if(!q||!Ne)break;q.replaceChildren(...this._rowFactory.createRow(Ne,ye,ye===le,He,et,ce,De,this.dimensions.css.cell.width,this._widthCache,he?Ze===be?$:0:-1,he?(Ze===me?ue:Pe)-1:-1))}}};r.DomRenderer=W=c([p(7,E.IInstantiationService),p(8,x.ICharSizeService),p(9,E.IOptionsService),p(10,E.IBufferService),p(11,x.ICoreBrowserService),p(12,x.IThemeService)],W)},3787:function(i,r,a){var c=this&&this.__decorate||function(D,N,P,L){var se,re=arguments.length,W=re<3?N:L===null?L=Object.getOwnPropertyDescriptor(N,P):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(D,N,P,L);else for(var $=D.length-1;$>=0;$--)(se=D[$])&&(W=(re<3?se(W):re>3?se(N,P,W):se(N,P))||W);return re>3&&W&&Object.defineProperty(N,P,W),W},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),g=a(511),y=a(2585),b=a(8055),x=a(4725),M=a(4269),w=a(6171),S=a(3734),E=r.DomRendererRowFactory=class{constructor(D,N,P,L,se,re,W){this._document=D,this._characterJoinerService=N,this._optionsService=P,this._coreBrowserService=L,this._coreService=se,this._decorationService=re,this._themeService=W,this._workCell=new g.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,se,re,W,$,ue,be,me){let Pe=[],he=this._characterJoinerService.getJoinedCharacters(N),j=this._themeService.colors,J,le=D.getNoBgTrimmedLength();P&&le0&&Yn===he[0][0]){vo=!0;let Yo=he.shift();Rn=new M.JoinedCellData(this._workCell,D.translateToString(!0,Yo[0],Yo[1]),Yo[1]-Yo[0]),Wr=Yo[1]-1,Oo=Rn.getWidth()}let Gd=this._isCellInSelection(Yn,N),Hu=P&&Yn===re,bk=At&&Yn>=be&&Yn<=me,yk=!1;this._decorationService.forEachDecorationAtCell(Yn,N,void 0,Yo=>{yk=!0});let iC=Rn.getChars()||h.WHITESPACE_CELL_CHAR;if(iC===" "&&(Rn.isUnderline()||Rn.isOverline())&&(iC="\xA0"),Qe=Oo*$-ue.get(iC,Rn.isBold(),Rn.isItalic()),J){if(ce&&(Gd&&Ne||!Gd&&!Ne&&Rn.bg===He)&&(Gd&&Ne&&j.selectionForeground||Rn.fg===et)&&Rn.extended.ext===Ze&&bk===ye&&Qe===q&&!Hu&&!vo&&!yk){Rn.isInvisible()?De+=h.WHITESPACE_CELL_CHAR:De+=iC,ce++;continue}ce&&(J.textContent=De),J=this._document.createElement("span"),ce=0,De=""}else J=this._document.createElement("span");if(He=Rn.bg,et=Rn.fg,Ze=Rn.extended.ext,ye=bk,q=Qe,Ne=Gd,vo&&re>=Yn&&re<=Wr&&(re=Yn),!this._coreService.isCursorHidden&&Hu&&this._coreService.isCursorInitialized){if(ct.push("xterm-cursor"),this._coreBrowserService.isFocused)W&&ct.push("xterm-cursor-blink"),ct.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(se)switch(se){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"),De=Rn.isInvisible()?h.WHITESPACE_CELL_CHAR:Rn.getChars()||h.WHITESPACE_CELL_CHAR,Rn.isUnderline()&&(ct.push(`xterm-underline-${Rn.extended.underlineStyle}`),De===" "&&(De="\xA0"),!Rn.isUnderlineColorDefault()))if(Rn.isUnderlineColorRGB())J.style.textDecorationColor=`rgb(${S.AttributeData.toColorRGB(Rn.getUnderlineColor()).join(",")})`;else{let Yo=Rn.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Rn.isBold()&&Yo<8&&(Yo+=8),J.style.textDecorationColor=j.ansi[Yo].css}Rn.isOverline()&&(ct.push("xterm-overline"),De===" "&&(De="\xA0")),Rn.isStrikethrough()&&ct.push("xterm-strikethrough"),bk&&(J.style.textDecoration="underline");let Ws=Rn.getFgColor(),Vg=Rn.getFgColorMode(),cc=Rn.getBgColor(),Bg=Rn.getBgColorMode(),Sk=!!Rn.isInverse();if(Sk){let Yo=Ws;Ws=cc,cc=Yo;let V$=Vg;Vg=Bg,Bg=V$}let qd,oC,Qd,zg=!1;switch(this._decorationService.forEachDecorationAtCell(Yn,N,void 0,Yo=>{Yo.options.layer!=="top"&&zg||(Yo.backgroundColorRGB&&(Bg=50331648,cc=Yo.backgroundColorRGB.rgba>>8&16777215,qd=Yo.backgroundColorRGB),Yo.foregroundColorRGB&&(Vg=50331648,Ws=Yo.foregroundColorRGB.rgba>>8&16777215,oC=Yo.foregroundColorRGB),zg=Yo.options.layer==="top")}),!zg&&Gd&&(qd=this._coreBrowserService.isFocused?j.selectionBackgroundOpaque:j.selectionInactiveBackgroundOpaque,cc=qd.rgba>>8&16777215,Bg=50331648,zg=!0,j.selectionForeground&&(Vg=50331648,Ws=j.selectionForeground.rgba>>8&16777215,oC=j.selectionForeground)),zg&&ct.push("xterm-decoration-top"),Bg){case 16777216:case 33554432:Qd=j.ansi[cc],ct.push(`xterm-bg-${cc}`);break;case 50331648:Qd=b.channels.toColor(cc>>16,cc>>8&255,255&cc),this._addStyle(J,`background-color:#${O((cc>>>0).toString(16),"0",6)}`);break;default:Sk?(Qd=j.foreground,ct.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):Qd=j.background}switch(qd||Rn.isDim()&&(qd=b.color.multiplyOpacity(Qd,.5)),Vg){case 16777216:case 33554432:Rn.isBold()&&Ws<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ws+=8),this._applyMinimumContrast(J,Qd,j.ansi[Ws],Rn,qd,void 0)||ct.push(`xterm-fg-${Ws}`);break;case 50331648:let Yo=b.channels.toColor(Ws>>16&255,Ws>>8&255,255&Ws);this._applyMinimumContrast(J,Qd,Yo,Rn,qd,oC)||this._addStyle(J,`color:#${O(Ws.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(J,Qd,j.foreground,Rn,qd,oC)||Sk&&ct.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ct.length&&(J.className=ct.join(" "),ct.length=0),Hu||vo||yk?J.textContent=De:ce++,Qe!==this.defaultSpacing&&(J.style.letterSpacing=`${Qe}px`),Pe.push(J),Yn=Wr}return J&&ce&&(J.textContent=De),Pe}_applyMinimumContrast(D,N,P,L,se,re){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(L.getCode()))return!1;let W=this._getContrastCache(L),$;if(se||re||($=W.getColor(N.rgba,P.rgba)),$===void 0){let ue=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);$=b.color.ensureContrastRatio(se||N,re||P,ue),W.setColor((se||N).rgba,(re||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 O(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 g=a.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[p,u,h,g],this._container.appendChild(p),this._container.appendChild(u),this._container.appendChild(h),this._container.appendChild(g),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 y=this._measure(a,0);return y>0&&(this._flat[u]=y),y}let h=a;c&&(h+="B"),p&&(h+="I");let g=this._holey.get(h);if(g===void 0){let y=0;c&&(y|=1),p&&(y|=2),g=this._measure(a,y),g>0&&this._holey.set(h,g)}return g}_measure(a,c){let p=this._measureElements[c];return p.textContent=a.repeat(32),p.offsetWidth/32}}},2223:(i,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:(i,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,g){return u===1&&h>Math.ceil(1.5*g)&&p!==void 0&&p>255&&!c(p)&&!a(p)&&!(function(y){return 57344<=y&&y<=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:(i,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,g=!1){if(this.selectionStart=u,this.selectionEnd=h,!u||!h||u[0]===h[0]&&u[1]===h[1])return void this.clear();let y=p.buffers.active.ydisp,b=u[1]-y,x=h[1]-y,M=Math.max(b,0),w=Math.min(x,p.rows-1);M>=p.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=b,this.viewportEndRow=x,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:(i,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(i,r,a){var c=this&&this.__decorate||function(w,S,E,O){var D,N=arguments.length,P=N<3?S:O===null?O=Object.getOwnPropertyDescriptor(S,E):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,S,E,O);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(S,E,P):D(S,E))||P);return N>3&&P&&Object.defineProperty(S,E,P),P},p=this&&this.__param||function(w,S){return function(E,O){S(E,O,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;let u=a(2585),h=a(8460),g=a(844),y=r.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,S,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 x(w,S,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=y=c([p(2,u.IOptionsService)],y);class b extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(S,E){S!==void 0&&S>0&&E!==void 0&&E>0&&(this._result.width=S,this._result.height=E)}}class x extends b{constructor(S,E,O){super(),this._document=S,this._parentElement=E,this._optionsService=O,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 b{constructor(S){super(),this._optionsService=S,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 S=this._ctx.measureText("W");return this._validateAndSet(S.width,S.fontBoundingBoxAscent+S.fontBoundingBoxDescent),this._result}}},4269:function(i,r,a){var c=this&&this.__decorate||function(M,w,S,E){var O,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,S,E);else for(var P=M.length-1;P>=0;P--)(O=M[P])&&(N=(D<3?O(N):D>3?O(w,S,N):O(w,S))||N);return D>3&&N&&Object.defineProperty(w,S,N),N},p=this&&this.__param||function(M,w){return function(S,E){w(S,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;let u=a(3734),h=a(643),g=a(511),y=a(2585);class b extends u.AttributeData{constructor(w,S,E){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=S,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=b;let x=r.CharacterJoinerService=class cj{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(w){let S={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(S),S.id}deregister(w){for(let S=0;S1){let W=this._getJoinedRanges(O,P,N,S,D);for(let $=0;$1){let re=this._getJoinedRanges(O,P,N,S,D);for(let W=0;W{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(b,x,M){super(),this._textarea=b,this._window=x,this.mainDocument=M,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(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(b){this._window!==b&&(this._window=b,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 g extends c.Disposable{constructor(b){super(),this._parentWindow=b,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(b){this._parentWindow=b,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:(i,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 g=this.linkProviders.indexOf(h);g!==-1&&this.linkProviders.splice(g,1)}}}}r.LinkProviderService=p},8934:function(i,r,a){var c=this&&this.__decorate||function(y,b,x,M){var w,S=arguments.length,E=S<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,x):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(y,b,x,M);else for(var O=y.length-1;O>=0;O--)(w=y[O])&&(E=(S<3?w(E):S>3?w(b,x,E):w(b,x))||E);return S>3&&E&&Object.defineProperty(b,x,E),E},p=this&&this.__param||function(y,b){return function(x,M){b(x,M,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;let u=a(4725),h=a(9806),g=r.MouseService=class{constructor(y,b){this._renderService=y,this._charSizeService=b}getCoords(y,b,x,M,w){return(0,h.getCoords)(window,y,b,x,M,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(y,b){let x=(0,h.getCoordsRelativeToElement)(window,y,b);if(this._charSizeService.hasValidSize)return x[0]=Math.min(Math.max(x[0],0),this._renderService.dimensions.css.canvas.width-1),x[1]=Math.min(Math.max(x[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(x[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(x[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(x[0]),y:Math.floor(x[1])}}};r.MouseService=g=c([p(0,u.IRenderService),p(1,u.ICharSizeService)],g)},3230:function(i,r,a){var c=this&&this.__decorate||function(w,S,E,O){var D,N=arguments.length,P=N<3?S:O===null?O=Object.getOwnPropertyDescriptor(S,E):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,S,E,O);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(S,E,P):D(S,E))||P);return N>3&&P&&Object.defineProperty(S,E,P),P},p=this&&this.__param||function(w,S){return function(E,O){S(E,O,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;let u=a(6193),h=a(4725),g=a(8460),y=a(844),b=a(7226),x=a(2585),M=r.RenderService=class extends y.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,S,E,O,D,N,P,L){super(),this._rowCount=w,this._charSizeService=O,this._renderer=this.register(new y.MutableDisposable),this._pausedResizeTask=new b.DebouncedIdleTask,this._observerDisposable=this.register(new y.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 g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((se,re)=>this._renderRows(se,re),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,S),this.register(P.onWindowChange(se=>this._registerIntersectionObserver(se,S)))}_registerIntersectionObserver(w,S){if("IntersectionObserver"in w){let E=new w.IntersectionObserver(O=>this._handleIntersectionChange(O[O.length-1]),{threshold:0});E.observe(S),this._observerDisposable.value=(0,y.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,S,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,S,this._rowCount))}_renderRows(w,S){this._renderer.value&&(w=Math.min(w,this._rowCount-1),S=Math.min(S,this._rowCount-1),this._renderer.value.renderRows(w,S),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:S}),this._onRender.fire({start:w,end:S}),this._isNextRenderRedrawOnly=!0)}resize(w,S){this._rowCount=S,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(S=>this.refreshRows(S.start,S.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,S){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(w,S)):this._renderer.value.handleResize(w,S),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(w,S,E){this._selectionState.start=w,this._selectionState.end=S,this._selectionState.columnSelectMode=E,this._renderer.value?.handleSelectionChanged(w,S,E)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};r.RenderService=M=c([p(2,x.IOptionsService),p(3,h.ICharSizeService),p(4,x.IDecorationService),p(5,x.IBufferService),p(6,h.ICoreBrowserService),p(7,h.IThemeService)],M)},9312:function(i,r,a){var c=this&&this.__decorate||function(P,L,se,re){var W,$=arguments.length,ue=$<3?L:re===null?re=Object.getOwnPropertyDescriptor(L,se):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(P,L,se,re);else for(var be=P.length-1;be>=0;be--)(W=P[be])&&(ue=($<3?W(ue):$>3?W(L,se,ue):W(L,se))||ue);return $>3&&ue&&Object.defineProperty(L,se,ue),ue},p=this&&this.__param||function(P,L){return function(se,re){L(se,re,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;let u=a(9806),h=a(9504),g=a(456),y=a(4725),b=a(8460),x=a(844),M=a(6114),w=a(4841),S=a(511),E=a(2585),O="\xA0",D=new RegExp(O,"g"),N=r.SelectionService=class extends x.Disposable{constructor(P,L,se,re,W,$,ue,be,me){super(),this._element=P,this._screenElement=L,this._linkifier=se,this._bufferService=re,this._coreService=W,this._mouseService=$,this._optionsService=ue,this._renderService=be,this._coreBrowserService=me,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new S.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Pe=>this._handleMouseMove(Pe),this._mouseUpListener=Pe=>this._handleMouseUp(Pe),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(Pe=>this._handleTrim(Pe)),this.register(this._bufferService.buffers.onBufferActivate(Pe=>this._handleBufferActivate(Pe))),this.enable(),this._model=new g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,x.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 se=this._bufferService.buffer,re=[];if(this._activeSelectionMode===3){if(P[0]===L[0])return"";let W=P[0]W.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),se=this._model.finalSelectionStart,re=this._model.finalSelectionEnd;return!!(se&&re&&L)&&this._areCoordsInSelection(L,se,re)}isCellInSelection(P,L){let se=this._model.finalSelectionStart,re=this._model.finalSelectionEnd;return!(!se||!re)&&this._areCoordsInSelection([P,L],se,re)}_areCoordsInSelection(P,L,se){return P[1]>L[1]&&P[1]=L[0]&&P[0]=L[0]}_selectWordAtCursor(P,L){let se=this._linkifier.currentLink?.link?.range;if(se)return this._model.selectionStart=[se.start.x-1,se.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(se,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let re=this._getMouseBufferCoords(P);return!!re&&(this._selectWordAt(re,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],se=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=se?0:(L>se&&(L-=se),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 se=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 se=this._mouseService.getCoords(P,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(se&&se[0]!==void 0&&se[1]!==void 0){let re=(0,h.moveToCellSequence)(se[0]-1,se[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(re,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let P=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,se=!(!P||!L||P[0]===L[0]&&P[1]===L[1]);se?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,se)):this._oldHasSelection&&this._fireOnSelectionChange(P,L,se)}_fireOnSelectionChange(P,L,se){this._oldSelectionStart=P,this._oldSelectionEnd=L,this._oldHasSelection=se,this._onSelectionChange.fire()}_handleBufferActivate(P){this.clearSelection(),this._trimListener.dispose(),this._trimListener=P.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(P,L){let se=L;for(let re=0;L>=re;re++){let W=P.loadCell(re,this._workCell).getChars().length;this._workCell.getWidth()===0?se--:W>1&&L!==re&&(se+=W-1)}return se}setSelection(P,L,se){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[P,L],this._model.selectionStartLength=se,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(P){this._isClickInSelection(P)||(this._selectWordAtCursor(P,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(P,L,se=!0,re=!0){if(P[0]>=this._bufferService.cols)return;let W=this._bufferService.buffer,$=W.lines.get(P[1]);if(!$)return;let ue=W.translateBufferLineToString(P[1],!1),be=this._convertViewportColToCharacterIndex($,P[0]),me=be,Pe=P[0]-be,he=0,j=0,J=0,le=0;if(ue.charAt(be)===" "){for(;be>0&&ue.charAt(be-1)===" ";)be--;for(;me1&&(le+=Ze-1,me+=Ze-1);He>0&&be>0&&!this._isCharWordSeparator($.loadCell(He-1,this._workCell));){$.loadCell(He-1,this._workCell);let ye=this._workCell.getChars().length;this._workCell.getWidth()===0?(he++,He--):ye>1&&(J+=ye-1,be-=ye-1),be--,He--}for(;et<$.length&&me+11&&(le+=ye-1,me+=ye-1),me++,et++}}me++;let ce=be+Pe-he+J,De=Math.min(this._bufferService.cols,me-be+he+j-J-le);if(L||ue.slice(be,me).trim()!==""){if(se&&ce===0&&$.getCodePoint(0)!==32){let He=W.lines.get(P[1]-1);if(He&&$.isWrapped&&He.getCodePoint(this._bufferService.cols-1)!==32){let et=this._getWordAt([this._bufferService.cols-1,P[1]-1],!1,!0,!1);if(et){let Ze=this._bufferService.cols-et.start;ce-=Ze,De+=Ze}}}if(re&&ce+De===this._bufferService.cols&&$.getCodePoint(this._bufferService.cols-1)!==32){let He=W.lines.get(P[1]+1);if(He?.isWrapped&&He.getCodePoint(0)!==32){let et=this._getWordAt([0,P[1]+1],!1,!1,!0);et&&(De+=et.length)}}return{start:ce,length:De}}}_selectWordAt(P,L){let se=this._getWordAt(P,L);if(se){for(;se.start<0;)se.start+=this._bufferService.cols,P[1]--;this._model.selectionStart=[se.start,P[1]],this._model.selectionStartLength=se.length}}_selectToWordAt(P){let L=this._getWordAt(P,!0);if(L){let se=P[1];for(;L.start<0;)L.start+=this._bufferService.cols,se--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,se++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,se]}}_isCharWordSeparator(P){return P.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(P.getChars())>=0}_selectLineAt(P){let L=this._bufferService.buffer.getWrappedRangeForLine(P),se={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)(se,this._bufferService.cols)}};r.SelectionService=N=c([p(3,E.IBufferService),p(4,E.ICoreService),p(5,y.IMouseService),p(6,E.IOptionsService),p(7,y.IRenderService),p(8,y.ICoreBrowserService)],N)},4725:(i,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(i,r,a){var c=this&&this.__decorate||function(N,P,L,se){var re,W=arguments.length,$=W<3?P:se===null?se=Object.getOwnPropertyDescriptor(P,L):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(N,P,L,se);else for(var ue=N.length-1;ue>=0;ue--)(re=N[ue])&&($=(W<3?re($):W>3?re(P,L,$):re(P,L))||$);return W>3&&$&&Object.defineProperty(P,L,$),$},p=this&&this.__param||function(N,P){return function(L,se){P(L,se,N)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;let u=a(7239),h=a(8055),g=a(8460),y=a(844),b=a(2585),x=h.css.toColor("#ffffff"),M=h.css.toColor("#000000"),w=h.css.toColor("#ffffff"),S=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 se=P[L/36%6|0],re=P[L/6%6|0],W=P[L%6];N.push({css:h.channels.toCss(se,re,W),rgba:h.channels.toRgba(se,re,W)})}for(let L=0;L<24;L++){let se=8+10*L;N.push({css:h.channels.toCss(se,se,se),rgba:h.channels.toRgba(se,se,se)})}return N})());let O=r.ThemeService=class extends y.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 g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:x,background:M,cursor:w,cursorAccent:S,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,x),P.background=D(N.background,M),P.cursor=D(N.cursor,w),P.cursorAccent=D(N.cursorAccent,S),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 se=0;se{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;let c=a(8460),p=a(844);class u extends p.Disposable{constructor(g){super(),this._maxLength=g,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(g){if(this._maxLength===g)return;let y=new Array(g);for(let b=0;bthis._length)for(let y=this._length;y=g;x--)this._array[this._getCyclicIndex(x+b.length)]=this._array[this._getCyclicIndex(x)];for(let x=0;xthis._maxLength){let x=this._length+b.length-this._maxLength;this._startIndex+=x,this._length=this._maxLength,this.onTrimEmitter.fire(x)}else this._length+=b.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,y,b){if(!(y<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let M=y-1;M>=0;M--)this.set(g+M+b,this.get(g+M));let x=g+y+b-this._length;if(x>0)for(this._length+=x;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let x=0;x{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:(i,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,g,y,b,x;function M(S){let E=S.toString(16);return E.length<2?"0"+E:E}function w(S,E){return S>>0},S.toColor=function(E,O,D,N){return{css:S.toCss(E,O,D,N),rgba:S.toRgba(E,O,D,N)}}})(h||(r.channels=h={})),(function(S){function E(O,D){return u=Math.round(255*D),[a,c,p]=x.toChannels(O.rgba),{css:h.toCss(a,c,p,u),rgba:h.toRgba(a,c,p,u)}}S.blend=function(O,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,se=O.rgba>>24&255,re=O.rgba>>16&255,W=O.rgba>>8&255;return a=se+Math.round((N-se)*u),c=re+Math.round((P-re)*u),p=W+Math.round((L-W)*u),{css:h.toCss(a,c,p),rgba:h.toRgba(a,c,p)}},S.isOpaque=function(O){return(255&O.rgba)==255},S.ensureContrastRatio=function(O,D,N){let P=x.ensureContrastRatio(O.rgba,D.rgba,N);if(P)return h.toColor(P>>24&255,P>>16&255,P>>8&255)},S.opaque=function(O){let D=(255|O.rgba)>>>0;return[a,c,p]=x.toChannels(D),{css:h.toCss(a,c,p),rgba:D}},S.opacity=E,S.multiplyOpacity=function(O,D){return u=255&O.rgba,E(O,u*D/255)},S.toColorRGB=function(O){return[O.rgba>>24&255,O.rgba>>16&255,O.rgba>>8&255]}})(g||(r.color=g={})),(function(S){let E,O;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",O=E.createLinearGradient(0,0,1,1))}catch{}S.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||!O)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=O,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}}})(y||(r.css=y={})),(function(S){function E(O,D,N){let P=O/255,L=D/255,se=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*(se<=.03928?se/12.92:Math.pow((se+.055)/1.055,2.4))}S.relativeLuminance=function(O){return E(O>>16&255,O>>8&255,255&O)},S.relativeLuminance2=E})(b||(r.rgb=b={})),(function(S){function E(D,N,P){let L=D>>24&255,se=D>>16&255,re=D>>8&255,W=N>>24&255,$=N>>16&255,ue=N>>8&255,be=w(b.relativeLuminance2(W,$,ue),b.relativeLuminance2(L,se,re));for(;be0||$>0||ue>0);)W-=Math.max(0,Math.ceil(.1*W)),$-=Math.max(0,Math.ceil(.1*$)),ue-=Math.max(0,Math.ceil(.1*ue)),be=w(b.relativeLuminance2(W,$,ue),b.relativeLuminance2(L,se,re));return(W<<24|$<<16|ue<<8|255)>>>0}function O(D,N,P){let L=D>>24&255,se=D>>16&255,re=D>>8&255,W=N>>24&255,$=N>>16&255,ue=N>>8&255,be=w(b.relativeLuminance2(W,$,ue),b.relativeLuminance2(L,se,re));for(;be>>0}S.blend=function(D,N){if(u=(255&N)/255,u===1)return N;let P=N>>24&255,L=N>>16&255,se=N>>8&255,re=D>>24&255,W=D>>16&255,$=D>>8&255;return a=re+Math.round((P-re)*u),c=W+Math.round((L-W)*u),p=$+Math.round((se-$)*u),h.toRgba(a,c,p)},S.ensureContrastRatio=function(D,N,P){let L=b.relativeLuminance(D>>8),se=b.relativeLuminance(N>>8);if(w(L,se)>8));if(uew(L,b.relativeLuminance(be>>8))?$:be}return $}let re=O(D,N,P),W=w(L,b.relativeLuminance(re>>8));if(Ww(L,b.relativeLuminance($>>8))?re:$}return re}},S.reduceLuminance=E,S.increaseLuminance=O,S.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(x||(r.rgba=x={})),r.toPaddedHex=M,r.contrastRatio=w},8969:(i,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),g=a(744),y=a(7302),b=a(6975),x=a(8460),M=a(1753),w=a(1480),S=a(7994),E=a(9282),O=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 x.EventEmitter),this._onScroll.event(re=>{this._onScrollApi?.fire(re.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(re){for(let W in re)this.optionsService.options[W]=re[W]}constructor(re){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new x.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new x.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new x.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new x.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new x.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new x.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new y.OptionsService(re)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.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(b.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(S.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 O.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,x.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,x.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,x.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,x.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(W=>{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(W=>{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((W,$)=>this._inputHandler.parse(W,$))),this.register((0,x.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(re,W){this._writeBuffer.write(re,W)}writeSync(re,W){this._logService.logLevel<=p.LogLevelEnum.WARN&&!P&&(this._logService.warn("writeSync is unreliable and will be removed soon."),P=!0),this._writeBuffer.writeSync(re,W)}input(re,W=!0){this.coreService.triggerDataEvent(re,W)}resize(re,W){isNaN(re)||isNaN(W)||(re=Math.max(re,g.MINIMUM_COLS),W=Math.max(W,g.MINIMUM_ROWS),this._bufferService.resize(re,W))}scroll(re,W=!1){this._bufferService.scroll(re,W)}scrollLines(re,W,$){this._bufferService.scrollLines(re,W,$)}scrollPages(re){this.scrollLines(re*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(re){let W=re-this._bufferService.buffer.ydisp;W!==0&&this.scrollLines(W)}registerEscHandler(re,W){return this._inputHandler.registerEscHandler(re,W)}registerDcsHandler(re,W){return this._inputHandler.registerDcsHandler(re,W)}registerCsiHandler(re,W){return this._inputHandler.registerCsiHandler(re,W)}registerOscHandler(re,W){return this._inputHandler.registerOscHandler(re,W)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let re=!1,W=this.optionsService.rawOptions.windowsPty;W&&W.buildNumber!==void 0&&W.buildNumber!==void 0?re=W.backend==="conpty"&&W.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(re=!0),re?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let re=[];re.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),re.push(this.registerCsiHandler({final:"H"},()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(let W of re)W.dispose()})}}}r.CoreTerminal=L},8460:(i,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(i,r,a){var c=this&&this.__decorate||function(he,j,J,le){var ce,De=arguments.length,He=De<3?j:le===null?le=Object.getOwnPropertyDescriptor(j,J):le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")He=Reflect.decorate(he,j,J,le);else for(var et=he.length-1;et>=0;et--)(ce=he[et])&&(He=(De<3?ce(He):De>3?ce(j,J,He):ce(j,J))||He);return De>3&&He&&Object.defineProperty(j,J,He),He},p=this&&this.__param||function(he,j){return function(J,le){j(J,le,he)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;let u=a(2584),h=a(7116),g=a(2015),y=a(844),b=a(482),x=a(8437),M=a(8460),w=a(643),S=a(511),E=a(3734),O=a(2585),D=a(1480),N=a(6242),P=a(6351),L=a(5941),se={"(":0,")":1,"*":2,"+":3,"-":1,".":2},re=131072;function W(he,j){if(he>24)return j.setWinLines||!1;switch(he){case 1:return!!j.restoreWin;case 2:return!!j.minimizeWin;case 3:return!!j.setWinPosition;case 4:return!!j.setWinSizePixels;case 5:return!!j.raiseWin;case 6:return!!j.lowerWin;case 7:return!!j.refreshWin;case 8:return!!j.setWinSizeChars;case 9:return!!j.maximizeWin;case 10:return!!j.fullscreenWin;case 11:return!!j.getWinState;case 13:return!!j.getWinPosition;case 14:return!!j.getWinSizePixels;case 15:return!!j.getScreenSizePixels;case 16:return!!j.getCellSizePixels;case 18:return!!j.getWinSizeChars;case 19:return!!j.getScreenSizeChars;case 20:return!!j.getIconTitle;case 21:return!!j.getWinTitle;case 22:return!!j.pushTitle;case 23:return!!j.popTitle;case 24:return!!j.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 y.Disposable{getAttrData(){return this._curAttrData}constructor(j,J,le,ce,De,He,et,Ze,ye=new g.EscapeSequenceParser){super(),this._bufferService=j,this._charsetService=J,this._coreService=le,this._logService=ce,this._optionsService=De,this._oscLinkService=He,this._coreMouseService=et,this._unicodeService=Ze,this._parser=ye,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new S.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=x.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=x.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,Ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:Ne.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,Ne,Qe)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:Ne,data:Qe})}),this._parser.setDcsHandlerFallback((q,Ne,Qe)=>{Ne==="HOOK"&&(Qe=Qe.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:Ne,payload:Qe})}),this._parser.setPrintHandler((q,Ne,Qe)=>this.print(q,Ne,Qe)),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,Ne)=>this.requestStatusString(q,Ne)))}_preserveStack(j,J,le,ce){this._parseStack.paused=!0,this._parseStack.cursorStartX=j,this._parseStack.cursorStartY=J,this._parseStack.decodedLength=le,this._parseStack.position=ce}_logSlowResolvingAsync(j){this._logService.logLevel<=O.LogLevelEnum.WARN&&Promise.race([j,new Promise((J,le)=>setTimeout(()=>le("#SLOW_TIMEOUT"),5e3))]).catch(J=>{if(J!=="#SLOW_TIMEOUT")throw J;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(j,J){let le,ce=this._activeBuffer.x,De=this._activeBuffer.y,He=0,et=this._parseStack.paused;if(et){if(le=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,J))return this._logSlowResolvingAsync(le),le;ce=this._parseStack.cursorStartX,De=this._parseStack.cursorStartY,this._parseStack.paused=!1,j.length>re&&(He=this._parseStack.position+re)}if(this._logService.logLevel<=O.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof j=="string"?` "${j}"`:` "${Array.prototype.map.call(j,q=>String.fromCharCode(q)).join("")}"`),typeof j=="string"?j.split("").map(q=>q.charCodeAt(0)):j),this._parseBuffer.lengthre)for(let q=He;q0&&Qe.getWidth(this._activeBuffer.x-1)===2&&Qe.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Ne);let ct=this._parser.precedingJoinState;for(let At=J;AtZe){if(ye){let Wr=Qe,Rn=this._activeBuffer.x-vo;for(this._activeBuffer.x=vo,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),Qe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),vo>0&&Qe instanceof x.BufferLine&&Qe.copyCellsFrom(Wr,Rn,0,vo,!1);Rn=0;)Qe.setCellFromCodepoint(this._activeBuffer.x++,0,0,Ne)}else if(q&&(Qe.insertCells(this._activeBuffer.x,De-vo,this._activeBuffer.getNullCell(Ne)),Qe.getWidth(Ze-1)===2&&Qe.setCellFromCodepoint(Ze-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,Ne)),Qe.setCellFromCodepoint(this._activeBuffer.x++,ce,De,Ne),De>0)for(;--De;)Qe.setCellFromCodepoint(this._activeBuffer.x++,0,0,Ne)}this._parser.precedingJoinState=ct,this._activeBuffer.x0&&Qe.getWidth(this._activeBuffer.x)===0&&!Qe.hasContent(this._activeBuffer.x)&&Qe.setCellFromCodepoint(this._activeBuffer.x,0,1,Ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(j,J){return j.final!=="t"||j.prefix||j.intermediates?this._parser.registerCsiHandler(j,J):this._parser.registerCsiHandler(j,le=>!W(le.params[0],this._optionsService.rawOptions.windowOptions)||J(le))}registerDcsHandler(j,J){return this._parser.registerDcsHandler(j,new P.DcsHandler(J))}registerEscHandler(j,J){return this._parser.registerEscHandler(j,J)}registerOscHandler(j,J){return this._parser.registerOscHandler(j,new N.OscHandler(J))}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 j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);j.hasWidth(this._activeBuffer.x)&&!j.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let j=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-j),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(j=this._bufferService.cols-1){this._activeBuffer.x=Math.min(j,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(j,J){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=j,this._activeBuffer.y=this._activeBuffer.scrollTop+J):(this._activeBuffer.x=j,this._activeBuffer.y=J),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(j,J){this._restrictCursor(),this._setCursor(this._activeBuffer.x+j,this._activeBuffer.y+J)}cursorUp(j){let J=this._activeBuffer.y-this._activeBuffer.scrollTop;return J>=0?this._moveCursor(0,-Math.min(J,j.params[0]||1)):this._moveCursor(0,-(j.params[0]||1)),!0}cursorDown(j){let J=this._activeBuffer.scrollBottom-this._activeBuffer.y;return J>=0?this._moveCursor(0,Math.min(J,j.params[0]||1)):this._moveCursor(0,j.params[0]||1),!0}cursorForward(j){return this._moveCursor(j.params[0]||1,0),!0}cursorBackward(j){return this._moveCursor(-(j.params[0]||1),0),!0}cursorNextLine(j){return this.cursorDown(j),this._activeBuffer.x=0,!0}cursorPrecedingLine(j){return this.cursorUp(j),this._activeBuffer.x=0,!0}cursorCharAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(j){return this._setCursor(j.length>=2?(j.params[1]||1)-1:0,(j.params[0]||1)-1),!0}charPosAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(j){return this._moveCursor(j.params[0]||1,0),!0}linePosAbsolute(j){return this._setCursor(this._activeBuffer.x,(j.params[0]||1)-1),!0}vPositionRelative(j){return this._moveCursor(0,j.params[0]||1),!0}hVPosition(j){return this.cursorPosition(j),!0}tabClear(j){let J=j.params[0];return J===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:J===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let J=j.params[0]||1;for(;J--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let J=j.params[0]||1;for(;J--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(j){let J=j.params[0];return J===1&&(this._curAttrData.bg|=536870912),J!==2&&J!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(j,J,le,ce=!1,De=!1){let He=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);He.replaceCells(J,le,this._activeBuffer.getNullCell(this._eraseAttrData()),De),ce&&(He.isWrapped=!1)}_resetBufferLine(j,J=!1){let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);le&&(le.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),J),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+j),le.isWrapped=!1)}eraseInDisplay(j,J=!1){let le;switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:for(le=this._activeBuffer.y,this._dirtyRowTracker.markDirty(le),this._eraseInBufferLine(le++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,J);le=this._bufferService.cols&&(this._activeBuffer.lines.get(le+1).isWrapped=!1);le--;)this._resetBufferLine(le,J);this._dirtyRowTracker.markDirty(0);break;case 2:for(le=this._bufferService.rows,this._dirtyRowTracker.markDirty(le-1);le--;)this._resetBufferLine(le,J);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(j,J=!1){switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,J);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,J);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,J)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(j){this._restrictCursor();let J=j.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=Ze;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(j){return j.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(j.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(j){return(this._optionsService.rawOptions.termName+"").indexOf(j)===0}setMode(j){for(let J=0;JOo?1:2,ct=j.params[0];return At=ct,Yn=J?ct===2?4:ct===4?Qe(He.modes.insertMode):ct===12?3:ct===20?Qe(Ne.convertEol):0:ct===1?Qe(le.applicationCursorKeys):ct===3?Ne.windowOptions.setWinLines?Ze===80?2:Ze===132?1:0:0:ct===6?Qe(le.origin):ct===7?Qe(le.wraparound):ct===8?3:ct===9?Qe(ce==="X10"):ct===12?Qe(Ne.cursorBlink):ct===25?Qe(!He.isCursorHidden):ct===45?Qe(le.reverseWraparound):ct===66?Qe(le.applicationKeypad):ct===67?4:ct===1e3?Qe(ce==="VT200"):ct===1002?Qe(ce==="DRAG"):ct===1003?Qe(ce==="ANY"):ct===1004?Qe(le.sendFocus):ct===1005?4:ct===1006?Qe(De==="SGR"):ct===1015?4:ct===1016?Qe(De==="SGR_PIXELS"):ct===1048?1:ct===47||ct===1047||ct===1049?Qe(ye===q):ct===2004?Qe(le.bracketedPasteMode):0,He.triggerDataEvent(`${u.C0.ESC}[${J?"":"?"}${At};${Yn}$y`),!0;var At,Yn}_updateAttrColor(j,J,le,ce,De){return J===2?(j|=50331648,j&=-16777216,j|=E.AttributeData.fromColorRGB([le,ce,De])):J===5&&(j&=-50331904,j|=33554432|255&le),j}_extractColor(j,J,le){let ce=[0,0,-1,0,0,0],De=0,He=0;do{if(ce[He+De]=j.params[J+He],j.hasSubParams(J+He)){let et=j.getSubParams(J+He),Ze=0;do ce[1]===5&&(De=1),ce[He+Ze+1+De]=et[Ze];while(++Ze=2||ce[1]===2&&He+De>=5)break;ce[1]&&(De=1)}while(++He+J5)&&(j=1),J.extended.underlineStyle=j,J.fg|=268435456,j===0&&(J.fg&=-268435457),J.updateExtended()}_processSGR0(j){j.fg=x.DEFAULT_ATTR_DATA.fg,j.bg=x.DEFAULT_ATTR_DATA.bg,j.extended=j.extended.clone(),j.extended.underlineStyle=0,j.extended.underlineColor&=-67108864,j.updateExtended()}charAttributes(j){if(j.length===1&&j.params[0]===0)return this._processSGR0(this._curAttrData),!0;let J=j.length,le,ce=this._curAttrData;for(let De=0;De=30&&le<=37?(ce.fg&=-50331904,ce.fg|=16777216|le-30):le>=40&&le<=47?(ce.bg&=-50331904,ce.bg|=16777216|le-40):le>=90&&le<=97?(ce.fg&=-50331904,ce.fg|=16777224|le-90):le>=100&&le<=107?(ce.bg&=-50331904,ce.bg|=16777224|le-100):le===0?this._processSGR0(ce):le===1?ce.fg|=134217728:le===3?ce.bg|=67108864:le===4?(ce.fg|=268435456,this._processUnderline(j.hasSubParams(De)?j.getSubParams(De)[0]:1,ce)):le===5?ce.fg|=536870912:le===7?ce.fg|=67108864:le===8?ce.fg|=1073741824:le===9?ce.fg|=2147483648:le===2?ce.bg|=134217728:le===21?this._processUnderline(2,ce):le===22?(ce.fg&=-134217729,ce.bg&=-134217729):le===23?ce.bg&=-67108865:le===24?(ce.fg&=-268435457,this._processUnderline(0,ce)):le===25?ce.fg&=-536870913:le===27?ce.fg&=-67108865:le===28?ce.fg&=-1073741825:le===29?ce.fg&=2147483647:le===39?(ce.fg&=-67108864,ce.fg|=16777215&x.DEFAULT_ATTR_DATA.fg):le===49?(ce.bg&=-67108864,ce.bg|=16777215&x.DEFAULT_ATTR_DATA.bg):le===38||le===48||le===58?De+=this._extractColor(j,De,ce):le===53?ce.bg|=1073741824:le===55?ce.bg&=-1073741825:le===59?(ce.extended=ce.extended.clone(),ce.extended.underlineColor=-1,ce.updateExtended()):le===100?(ce.fg&=-67108864,ce.fg|=16777215&x.DEFAULT_ATTR_DATA.fg,ce.bg&=-67108864,ce.bg|=16777215&x.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",le);return!0}deviceStatus(j){switch(j.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:let J=this._activeBuffer.y+1,le=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${J};${le}R`)}return!0}deviceStatusPrivate(j){if(j.params[0]===6){let J=this._activeBuffer.y+1,le=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${J};${le}R`)}return!0}softReset(j){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=x.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(j){let J=j.params[0]||1;switch(J){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 le=J%2==1;return this._optionsService.options.cursorBlink=le,!0}setScrollRegion(j){let J=j.params[0]||1,le;return(j.length<2||(le=j.params[1])>this._bufferService.rows||le===0)&&(le=this._bufferService.rows),le>J&&(this._activeBuffer.scrollTop=J-1,this._activeBuffer.scrollBottom=le-1,this._setCursor(0,0)),!0}windowOptions(j){if(!W(j.params[0],this._optionsService.rawOptions.windowOptions))return!0;let J=j.length>1?j.params[1]:0;switch(j.params[0]){case 14:J!==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:J!==0&&J!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),J!==0&&J!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:J!==0&&J!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),J!==0&&J!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(j){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(j){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(j){return this._windowTitle=j,this._onTitleChange.fire(j),!0}setIconName(j){return this._iconName=j,!0}setOrReportIndexedColor(j){let J=[],le=j.split(";");for(;le.length>1;){let ce=le.shift(),De=le.shift();if(/^\d+$/.exec(ce)){let He=parseInt(ce);if(Pe(He))if(De==="?")J.push({type:0,index:He});else{let et=(0,L.parseColor)(De);et&&J.push({type:1,index:He,color:et})}}}return J.length&&this._onColor.fire(J),!0}setHyperlink(j){let J=j.split(";");return!(J.length<2)&&(J[1]?this._createHyperlink(J[0],J[1]):!J[0]&&this._finishHyperlink())}_createHyperlink(j,J){this._getCurrentLinkId()&&this._finishHyperlink();let le=j.split(":"),ce,De=le.findIndex(He=>He.startsWith("id="));return De!==-1&&(ce=le[De].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:ce,uri:J}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(j,J){let le=j.split(";");for(let ce=0;ce=this._specialColors.length);++ce,++J)if(le[ce]==="?")this._onColor.fire([{type:0,index:this._specialColors[J]}]);else{let De=(0,L.parseColor)(le[ce]);De&&this._onColor.fire([{type:1,index:this._specialColors[J],color:De}])}return!0}setOrReportFgColor(j){return this._setOrReportSpecialColor(j,0)}setOrReportBgColor(j){return this._setOrReportSpecialColor(j,1)}setOrReportCursorColor(j){return this._setOrReportSpecialColor(j,2)}restoreIndexedColor(j){if(!j)return this._onColor.fire([{type:2}]),!0;let J=[],le=j.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 j=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,j,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=x.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=x.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(j){return this._charsetService.setgLevel(j),!0}screenAlignmentPattern(){let j=new S.CellData;j.content=4194373,j.fg=this._curAttrData.fg,j.bg=this._curAttrData.bg,this._setCursor(0,0);for(let J=0;J(this._coreService.triggerDataEvent(`${u.C0.ESC}${De}${u.C0.ESC}\\`),!0))(j==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:j==='"p'?'P1$r61;1"p':j==="r"?`P1$r${le.scrollTop+1};${le.scrollBottom+1}r`:j==="m"?"P1$r0m":j===" q"?`P1$r${{block:2,underline:4,bar:6}[ce.cursorStyle]-(ce.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(j,J){this._dirtyRowTracker.markRangeDirty(j,J)}}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,j){he>j&&(ue=he,he=j,j=ue),hethis.end&&(this.end=j)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Pe(he){return 0<=he&&he<256}me=c([p(0,O.IBufferService)],me)},844:(i,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:(i,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,g){this._data.get(c,p)||this._data.set(c,p,new a),this._data.get(c,p).set(u,h,g)}get(c,p,u,h){return this._data.get(c,p)?.get(u,h)}clear(){this._data.clear()}}},6114:(i,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:(i,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,g=this._getKey(this._array[h]);if(g>c)u=h-1;else{if(!(g0&&this._getKey(this._array[h-1])===c;)h--;return h}p=h+1}}return p}}},7226:(i,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(g){this._tasks.push(g),this._start()}flush(){for(;this._iM)return x-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(x-y))}ms`),void this._start();x=M}this.clear()}}class u extends p{_requestCallback(g){return setTimeout(()=>g(this._createDeadline(16)))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){let y=Date.now()+g;return{timeRemaining:()=>Math.max(0,y-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:(i,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),g=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);g&&h&&(g.isWrapped=h[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&h[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(i,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:(i,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),g=a(4634),y=a(511),b=a(643),x=a(4863),M=a(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(w,S,E){this._hasScrollback=w,this._optionsService=S,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=y.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=y.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.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,S){return new h.BufferLine(this._bufferService.cols,this.getNullCell(w),S)}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:S}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=h.DEFAULT_ATTR_DATA);let S=this._rows;for(;S--;)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,S){let E=this.getNullCell(h.DEFAULT_ATTR_DATA),O=0,D=this._getCorrectBufferLength(S);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>S;P--)this.lines.length>S+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,S-1),N&&(this.y+=N),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=S-1,this._isReflowEnabled&&(this._reflow(w,S),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 S=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,S){this._cols!==w&&(w>this._cols?this._reflowLarger(w,S):this._reflowSmaller(w,S))}_reflowLarger(w,S){let E=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(E.length>0){let O=(0,g.reflowLargerCreateNewLayout)(this.lines,E);(0,g.reflowLargerApplyNewLayout)(this.lines,O.layout),this._reflowLargerAdjustViewport(w,S,O.countRemoved)}}_reflowLargerAdjustViewport(w,S,E){let O=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 se=this.ybase+this.y;if(se>=N&&se0&&(O.push({start:N+L.length+D,newLines:be}),D+=be.length),L.push(...be);let me=W.length-1,Pe=W[me];Pe===0&&(me--,Pe=W[me]);let he=L.length-$-1,j=re;for(;he>=0;){let le=Math.min(j,Pe);if(L[me]===void 0)break;if(L[me].copyCellsFrom(L[he],j-le,Pe-le,le,!0),Pe-=le,Pe===0&&(me--,Pe=W[me]),j-=le,j===0){he--;let ce=Math.max(he,0);j=(0,g.getWrappedLineTrimmedLength)(L,ce,this._cols)}}for(let le=0;le0;)this.ybase===0?this.y0){let N=[],P=[];for(let me=0;me=0;me--)if(W&&W.start>se+$){for(let Pe=W.newLines.length-1;Pe>=0;Pe--)this.lines.set(me--,W.newLines[Pe]);me++,N.push({index:se+1,amount:W.newLines.length}),$+=W.newLines.length,W=O[++re]}else this.lines.set(me,P[se--]);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,S,E=0,O){let D=this.lines.get(w);return D?D.translateToString(S,E,O):""}getWrappedRangeForLine(w){let S=w,E=w;for(;S>0&&this.lines.get(S).isWrapped;)S--;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 S=0;S{S.line-=E,S.line<0&&S.dispose()})),S.register(this.lines.onInsert(E=>{S.line>=E.index&&(S.line+=E.amount)})),S.register(this.lines.onDelete(E=>{S.line>=E.index&&S.lineE.index&&(S.line-=E.amount)})),S.register(S.onDispose(()=>this._removeMarker(S))),S}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(i,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 g=0;class y{constructor(x,M,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*x);let S=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[x].charCodeAt(this._combined[x].length-1):w]}set(x,M){this._data[3*x+1]=M[u.CHAR_DATA_ATTR_INDEX],M[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[x]=M[1],this._data[3*x+0]=2097152|x|M[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*x+0]=M[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|M[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(x){return this._data[3*x+0]>>22}hasWidth(x){return 12582912&this._data[3*x+0]}getFg(x){return this._data[3*x+1]}getBg(x){return this._data[3*x+2]}hasContent(x){return 4194303&this._data[3*x+0]}getCodePoint(x){let M=this._data[3*x+0];return 2097152&M?this._combined[x].charCodeAt(this._combined[x].length-1):2097151&M}isCombined(x){return 2097152&this._data[3*x+0]}getString(x){let M=this._data[3*x+0];return 2097152&M?this._combined[x]:2097151&M?(0,h.stringFromCodePoint)(2097151&M):""}isProtected(x){return 536870912&this._data[3*x+2]}loadCell(x,M){return g=3*x,M.content=this._data[g+0],M.fg=this._data[g+1],M.bg=this._data[g+2],2097152&M.content&&(M.combinedData=this._combined[x]),268435456&M.bg&&(M.extended=this._extendedAttrs[x]),M}setCell(x,M){2097152&M.content&&(this._combined[x]=M.combinedData),268435456&M.bg&&(this._extendedAttrs[x]=M.extended),this._data[3*x+0]=M.content,this._data[3*x+1]=M.fg,this._data[3*x+2]=M.bg}setCellFromCodepoint(x,M,w,S){268435456&S.bg&&(this._extendedAttrs[x]=S.extended),this._data[3*x+0]=M|w<<22,this._data[3*x+1]=S.fg,this._data[3*x+2]=S.bg}addCodepointToCell(x,M,w){let S=this._data[3*x+0];2097152&S?this._combined[x]+=(0,h.stringFromCodePoint)(M):2097151&S?(this._combined[x]=(0,h.stringFromCodePoint)(2097151&S)+(0,h.stringFromCodePoint)(M),S&=-2097152,S|=2097152):S=M|4194304,w&&(S&=-12582913,S|=w<<22),this._data[3*x+0]=S}insertCells(x,M,w){if((x%=this.length)&&this.getWidth(x-1)===2&&this.setCellFromCodepoint(x-1,0,1,w),M=0;--E)this.setCell(x+M+E,this.loadCell(x+E,S));for(let E=0;Ethis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{let S=new Uint32Array(w);S.set(this._data),this._data=S}for(let S=this.length;S=x&&delete this._combined[D]}let E=Object.keys(this._extendedAttrs);for(let O=0;O=x&&delete this._extendedAttrs[D]}}return this.length=x,4*w*2=0;--x)if(4194303&this._data[3*x+0])return x+(this._data[3*x+0]>>22);return 0}getNoBgTrimmedLength(){for(let x=this.length-1;x>=0;--x)if(4194303&this._data[3*x+0]||50331648&this._data[3*x+2])return x+(this._data[3*x+0]>>22);return 0}copyCellsFrom(x,M,w,S,E){let O=x._data;if(E)for(let N=S-1;N>=0;N--){for(let P=0;P<3;P++)this._data[3*(w+N)+P]=O[3*(M+N)+P];268435456&O[3*(M+N)+2]&&(this._extendedAttrs[w+N]=x._extendedAttrs[M+N])}else for(let N=0;N=M&&(this._combined[P-M+w]=x._combined[P])}}translateToString(x,M,w,S){M=M??0,w=w??this.length,x&&(w=Math.min(w,this.getTrimmedLength())),S&&(S.length=0);let E="";for(;M>22||1}return S&&S.push(M),E}}r.BufferLine=y},4841:(i,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:(i,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,g=c[p+1].getWidth(0)===2;return h&&g?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,g){let y=[];for(let b=0;b=b&&h0&&(P>S||w[P].getTrimmedLength()===0);P--)N++;N>0&&(y.push(b+w.length-N),y.push(N)),b+=w.length-1}return y},r.reflowLargerCreateNewLayout=function(c,p){let u=[],h=0,g=p[h],y=0;for(let b=0;ba(c,w,p)).reduce((M,w)=>M+w),y=0,b=0,x=0;for(;xM&&(y-=M,b++);let w=c[b].getWidth(y-1)===2;w&&y--;let S=w?u-1:u;h.push(S),x+=S}return h},r.getWrappedLineTrimmedLength=a},5295:(i,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(y,b){super(),this._optionsService=y,this._bufferService=b,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(y){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(y),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(y,b){this._normal.resize(y,b),this._alt.resize(y,b),this.setupTabStops(y)}setupTabStops(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)}}r.BufferSet=h},511:(i,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(y){let b=new h;return b.setFromCharData(y),b}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(y){this.fg=y[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(y[p.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(y[p.CHAR_DATA_CHAR_INDEX].length===2){let x=y[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=x&&x<=56319){let M=y[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=M&&M<=57343?this.content=1024*(x-55296)+M-56320+65536|y[p.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=y[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[p.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=y[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=h},643:(i,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:(i,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(g){this.line=g,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(g){return this._disposables.push(g),g}}r.Marker=u,u._nextId=1},7116:(i,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:(i,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:(i,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,g,y){let b={type:0,cancel:!1,key:void 0},x=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?b.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?b.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?b.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(b.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:b.key=u.ctrlKey?"\b":c.C0.DEL,u.altKey&&(b.key=c.C0.ESC+b.key);break;case 9:if(u.shiftKey){b.key=c.C0.ESC+"[Z";break}b.key=c.C0.HT,b.cancel=!0;break;case 13:b.key=u.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,b.cancel=!0;break;case 27:b.key=c.C0.ESC,u.altKey&&(b.key=c.C0.ESC+c.C0.ESC),b.cancel=!0;break;case 37:if(u.metaKey)break;x?(b.key=c.C0.ESC+"[1;"+(x+1)+"D",b.key===c.C0.ESC+"[1;3D"&&(b.key=c.C0.ESC+(g?"b":"[1;5D"))):b.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(u.metaKey)break;x?(b.key=c.C0.ESC+"[1;"+(x+1)+"C",b.key===c.C0.ESC+"[1;3C"&&(b.key=c.C0.ESC+(g?"f":"[1;5C"))):b.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(u.metaKey)break;x?(b.key=c.C0.ESC+"[1;"+(x+1)+"A",g||b.key!==c.C0.ESC+"[1;3A"||(b.key=c.C0.ESC+"[1;5A")):b.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(u.metaKey)break;x?(b.key=c.C0.ESC+"[1;"+(x+1)+"B",g||b.key!==c.C0.ESC+"[1;3B"||(b.key=c.C0.ESC+"[1;5B")):b.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(b.key=c.C0.ESC+"[2~");break;case 46:b.key=x?c.C0.ESC+"[3;"+(x+1)+"~":c.C0.ESC+"[3~";break;case 36:b.key=x?c.C0.ESC+"[1;"+(x+1)+"H":h?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:b.key=x?c.C0.ESC+"[1;"+(x+1)+"F":h?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:u.shiftKey?b.type=2:u.ctrlKey?b.key=c.C0.ESC+"[5;"+(x+1)+"~":b.key=c.C0.ESC+"[5~";break;case 34:u.shiftKey?b.type=3:u.ctrlKey?b.key=c.C0.ESC+"[6;"+(x+1)+"~":b.key=c.C0.ESC+"[6~";break;case 112:b.key=x?c.C0.ESC+"[1;"+(x+1)+"P":c.C0.ESC+"OP";break;case 113:b.key=x?c.C0.ESC+"[1;"+(x+1)+"Q":c.C0.ESC+"OQ";break;case 114:b.key=x?c.C0.ESC+"[1;"+(x+1)+"R":c.C0.ESC+"OR";break;case 115:b.key=x?c.C0.ESC+"[1;"+(x+1)+"S":c.C0.ESC+"OS";break;case 116:b.key=x?c.C0.ESC+"[15;"+(x+1)+"~":c.C0.ESC+"[15~";break;case 117:b.key=x?c.C0.ESC+"[17;"+(x+1)+"~":c.C0.ESC+"[17~";break;case 118:b.key=x?c.C0.ESC+"[18;"+(x+1)+"~":c.C0.ESC+"[18~";break;case 119:b.key=x?c.C0.ESC+"[19;"+(x+1)+"~":c.C0.ESC+"[19~";break;case 120:b.key=x?c.C0.ESC+"[20;"+(x+1)+"~":c.C0.ESC+"[20~";break;case 121:b.key=x?c.C0.ESC+"[21;"+(x+1)+"~":c.C0.ESC+"[21~";break;case 122:b.key=x?c.C0.ESC+"[23;"+(x+1)+"~":c.C0.ESC+"[23~";break;case 123:b.key=x?c.C0.ESC+"[24;"+(x+1)+"~":c.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(g&&!y||!u.altKey||u.metaKey)!g||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?b.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(b.key=c.C0.US),u.key==="@"&&(b.key=c.C0.NUL)):u.keyCode===65&&(b.type=1);else{let M=p[u.keyCode],w=M?.[u.shiftKey?1:0];if(w)b.key=c.C0.ESC+w;else if(u.keyCode>=65&&u.keyCode<=90){let S=u.ctrlKey?u.keyCode-64:u.keyCode+32,E=String.fromCharCode(S);u.shiftKey&&(E=E.toUpperCase()),b.key=c.C0.ESC+E}else if(u.keyCode===32)b.key=c.C0.ESC+(u.ctrlKey?c.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let S=u.code.slice(3,4);u.shiftKey||(S=S.toLowerCase()),b.key=c.C0.ESC+S,b.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?b.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?b.key=c.C0.NUL:u.keyCode>=51&&u.keyCode<=55?b.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?b.key=c.C0.DEL:u.keyCode===219?b.key=c.C0.ESC:u.keyCode===220?b.key=c.C0.FS:u.keyCode===221&&(b.key=c.C0.GS)}return b}},482:(i,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?(g-=65536,u+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):u+=String.fromCharCode(g)}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 g=a.charCodeAt(h++);56320<=g&&g<=57343?c[u++]=1024*(this._interim-55296)+g-56320+65536:(c[u++]=this._interim,c[u++]=g),this._interim=0}for(let g=h;g=p)return this._interim=y,u;let b=a.charCodeAt(g);56320<=b&&b<=57343?c[u++]=1024*(y-55296)+b-56320+65536:(c[u++]=y,c[u++]=b)}else y!==65279&&(c[u++]=y)}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,g,y,b=0,x=0,M=0;if(this.interim[0]){let E=!1,O=this.interim[0];O&=(224&O)==192?31:(240&O)==224?15:7;let D,N=0;for(;(D=63&this.interim[++N])&&N<4;)O<<=6,O|=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,O<<=6,O|=63&D}E||(P===2?O<128?M--:c[b++]=O:P===3?O<2048||O>=55296&&O<=57343||O===65279||(c[b++]=O):O<65536||O>1114111||(c[b++]=O)),this.interim.fill(0)}let w=p-4,S=M;for(;S=p)return this.interim[0]=u,b;if(h=a[S++],(192&h)!=128){S--;continue}if(x=(31&u)<<6|63&h,x<128){S--;continue}c[b++]=x}else if((240&u)==224){if(S>=p)return this.interim[0]=u,b;if(h=a[S++],(192&h)!=128){S--;continue}if(S>=p)return this.interim[0]=u,this.interim[1]=h,b;if(g=a[S++],(192&g)!=128){S--;continue}if(x=(15&u)<<12|(63&h)<<6|63&g,x<2048||x>=55296&&x<=57343||x===65279)continue;c[b++]=x}else if((248&u)==240){if(S>=p)return this.interim[0]=u,b;if(h=a[S++],(192&h)!=128){S--;continue}if(S>=p)return this.interim[0]=u,this.interim[1]=h,b;if(g=a[S++],(192&g)!=128){S--;continue}if(S>=p)return this.interim[0]=u,this.interim[1]=h,this.interim[2]=g,b;if(y=a[S++],(192&y)!=128){S--;continue}if(x=(7&u)<<18|(63&h)<<12|(63&g)<<6|63&y,x<65536||x>1114111)continue;c[b++]=x}}return b}}},225:(i,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 g=0;gb[w][1])return!1;for(;w>=M;)if(x=M+w>>1,y>b[x][1])M=x+1;else{if(!(y=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,y){let b=this.wcwidth(g),x=b===0&&y!==0;if(x){let M=c.UnicodeService.extractWidth(y);M===0?x=!1:M>b&&(b=M)}return c.UnicodeService.createPropertyValue(0,b,x)}}},5981:(i,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(g){super(),this._action=g,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(g,y){if(y!==void 0&&this._syncCalls>y)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let b;for(this._isSyncWriting=!0;b=this._writeBuffer.shift();){this._action(b);let x=this._callbacks.shift();x&&x()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,y){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+=g.length,this._writeBuffer.push(g),this._callbacks.push(y),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(y)}_innerWrite(g=0,y=!0){let b=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){let x=this._writeBuffer[this._bufferOffset],M=this._action(x,y);if(M){let S=E=>Date.now()-b>=12?setTimeout(()=>this._innerWrite(0,E)):this._innerWrite(b,E);return void M.catch(E=>(queueMicrotask(()=>{throw E}),Promise.resolve(!1))).then(S)}let w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=x.length,Date.now()-b>=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:(i,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 g=u.toString(16),y=g.length<2?"0"+g:g;switch(h){case 4:return g[0];case 8:return y;case 12:return(y+y).slice(0,3);default:return y+y}}r.parseColor=function(u){if(!u)return;let h=u.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);let g=a.exec(h);if(g){let y=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/y*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/y*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/y*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),c.exec(h)&&[3,6,9,12].includes(h.length))){let g=h.length/3,y=[0,0,0];for(let b=0;b<3;++b){let x=parseInt(h.slice(g*b,g*b+g),16);y[b]=g===1?x<<4:g===2?x:g===3?x>>4:x>>8}return y}},r.toRgbString=function(u,h=16){let[g,y,b]=u;return`rgb:${p(g,h)}/${p(y,h)}/${p(b,h)}`}},5770:(i,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(i,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(y,b){this._handlers[y]===void 0&&(this._handlers[y]=[]);let x=this._handlers[y];return x.push(b),{dispose:()=>{let M=x.indexOf(b);M!==-1&&x.splice(M,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}reset(){if(this._active.length)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(y,b){if(this.reset(),this._ident=y,this._active=this._handlers[y]||h,this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(y,b,x){if(this._active.length)for(let M=this._active.length-1;M>=0;M--)this._active[M].put(y,b,x);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(y,b,x))}unhook(y,b=!0){if(this._active.length){let x=!1,M=this._active.length-1,w=!1;if(this._stack.paused&&(M=this._stack.loopPosition-1,x=b,w=this._stack.fallThrough,this._stack.paused=!1),!w&&x===!1){for(;M>=0&&(x=this._active[M].unhook(y),x!==!0);M--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!1,x;M--}for(;M>=0;M--)if(x=this._active[M].unhook(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!0,x}else this._handlerFb(this._ident,"UNHOOK",y);this._active=h,this._ident=0}};let g=new p.Params;g.addParam(0),r.DcsHandler=class{constructor(y){this._handler=y,this._data="",this._params=g,this._hitLimit=!1}hook(y){this._params=y.length>1||y.params[0]?y.clone():g,this._data="",this._hitLimit=!1}put(y,b,x){this._hitLimit||(this._data+=(0,c.utf32ToString)(y,b,x),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(y){let b=!1;if(this._hitLimit)b=!1;else if(y&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then(x=>(this._params=g,this._data="",this._hitLimit=!1,x));return this._params=g,this._data="",this._hitLimit=!1,b}}},2015:(i,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 g{constructor(M){this.table=new Uint8Array(M)}setDefault(M,w){this.table.fill(M<<4|w)}add(M,w,S,E){this.table[w<<8|M]=S<<4|E}addMany(M,w,S,E){for(let O=0;OP),w=(N,P)=>M.slice(N,P),S=w(32,127),E=w(0,24);E.push(25),E.push.apply(E,w(28,32));let O=w(0,14),D;for(D in x.setDefault(1,0),x.addMany(S,0,2,0),O)x.addMany([24,26,153,154],D,3,0),x.addMany(w(128,144),D,3,0),x.addMany(w(144,152),D,3,0),x.add(156,D,0,0),x.add(27,D,11,1),x.add(157,D,4,8),x.addMany([152,158,159],D,0,7),x.add(155,D,11,3),x.add(144,D,11,9);return x.addMany(E,0,3,0),x.addMany(E,1,3,1),x.add(127,1,0,1),x.addMany(E,8,0,8),x.addMany(E,3,3,3),x.add(127,3,0,3),x.addMany(E,4,3,4),x.add(127,4,0,4),x.addMany(E,6,3,6),x.addMany(E,5,3,5),x.add(127,5,0,5),x.addMany(E,2,3,2),x.add(127,2,0,2),x.add(93,1,4,8),x.addMany(S,8,5,8),x.add(127,8,5,8),x.addMany([156,27,24,26,7],8,6,0),x.addMany(w(28,32),8,0,8),x.addMany([88,94,95],1,0,7),x.addMany(S,7,0,7),x.addMany(E,7,0,7),x.add(156,7,0,0),x.add(127,7,0,7),x.add(91,1,11,3),x.addMany(w(64,127),3,7,0),x.addMany(w(48,60),3,8,4),x.addMany([60,61,62,63],3,9,4),x.addMany(w(48,60),4,8,4),x.addMany(w(64,127),4,7,0),x.addMany([60,61,62,63],4,0,6),x.addMany(w(32,64),6,0,6),x.add(127,6,0,6),x.addMany(w(64,127),6,0,0),x.addMany(w(32,48),3,9,5),x.addMany(w(32,48),5,9,5),x.addMany(w(48,64),5,0,6),x.addMany(w(64,127),5,7,0),x.addMany(w(32,48),4,9,5),x.addMany(w(32,48),1,9,2),x.addMany(w(32,48),2,9,2),x.addMany(w(48,127),2,10,0),x.addMany(w(48,80),1,10,0),x.addMany(w(81,88),1,10,0),x.addMany([89,90,92],1,10,0),x.addMany(w(96,127),1,10,0),x.add(80,1,11,9),x.addMany(E,9,0,9),x.add(127,9,0,9),x.addMany(w(28,32),9,0,9),x.addMany(w(32,48),9,9,12),x.addMany(w(48,60),9,8,10),x.addMany([60,61,62,63],9,9,10),x.addMany(E,11,0,11),x.addMany(w(32,128),11,0,11),x.addMany(w(28,32),11,0,11),x.addMany(E,10,0,10),x.add(127,10,0,10),x.addMany(w(28,32),10,0,10),x.addMany(w(48,60),10,8,10),x.addMany([60,61,62,63],10,0,11),x.addMany(w(32,48),10,9,12),x.addMany(E,12,0,12),x.add(127,12,0,12),x.addMany(w(28,32),12,0,12),x.addMany(w(32,48),12,9,12),x.addMany(w(48,64),12,0,11),x.addMany(w(64,127),12,12,13),x.addMany(w(64,127),10,12,13),x.addMany(w(64,127),9,12,13),x.addMany(E,13,13,13),x.addMany(S,13,13,13),x.add(127,13,0,13),x.addMany([27,156,24,26],13,14,0),x.add(y,0,2,0),x.add(y,8,5,8),x.add(y,6,0,6),x.add(y,11,0,11),x.add(y,13,13,13),x})();class b 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,S,E)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,S)=>{},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 S=0;if(M.prefix){if(M.prefix.length>1)throw new Error("only one byte as prefix supported");if(S=M.prefix.charCodeAt(0),S&&60>S||S>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 O=0;OD||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");S<<=8,S|=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 S<<=8,S|=E,S}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 S=this._identifier(M,[48,126]);this._escHandlers[S]===void 0&&(this._escHandlers[S]=[]);let E=this._escHandlers[S];return E.push(w),{dispose:()=>{let O=E.indexOf(w);O!==-1&&E.splice(O,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 S=this._identifier(M);this._csiHandlers[S]===void 0&&(this._csiHandlers[S]=[]);let E=this._csiHandlers[S];return E.push(w),{dispose:()=>{let O=E.indexOf(w);O!==-1&&E.splice(O,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,S,E,O){this._parseStack.state=M,this._parseStack.handlers=w,this._parseStack.handlerPos=S,this._parseStack.transition=E,this._parseStack.chunkPos=O}parse(M,w,S){let E,O=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(S===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(S===!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(S===!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(O=M[this._parseStack.chunkPos],E=this._dcsParser.unhook(O!==24&&O!==26,S),E)return E;O===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(O=M[this._parseStack.chunkPos],E=this._oscParser.end(O!==24&&O!==26,S),E)return E;O===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||(O=M[$])<32||O>126&&O=w||(O=M[$])<32||O>126&&O=w||(O=M[$])<32||O>126&&O=w||(O=M[$])<32||O>126&&O=0&&(E=L[se](this._params),E!==!0);se--)if(E instanceof Promise)return this._preserveStack(3,L,se,D,P),E;se<0&&this._csiHandlerFb(this._collect<<8|O,this._params),this.precedingJoinState=0;break;case 8:do switch(O){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(O-48)}while(++P47&&O<60);P--;break;case 9:this._collect<<=8,this._collect|=O;break;case 10:let re=this._escHandlers[this._collect<<8|O],W=re?re.length-1:-1;for(;W>=0&&(E=re[W](),E!==!0);W--)if(E instanceof Promise)return this._preserveStack(4,re,W,D,P),E;W<0&&this._escHandlerFb(this._collect<<8|O),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|O,this._params);break;case 13:for(let $=P+1;;++$)if($>=w||(O=M[$])===24||O===26||O===27||O>127&&O=w||(O=M[$])<32||O>127&&O{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,g){this._handlers[h]===void 0&&(this._handlers[h]=[]);let y=this._handlers[h];return y.push(g),{dispose:()=>{let b=y.indexOf(g);b!==-1&&y.splice(b,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,g,y){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(h,g,y);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(h,g,y))}start(){this.reset(),this._state=1}put(h,g,y){if(this._state!==3){if(this._state===1)for(;g0&&this._put(h,g,y)}}end(h,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let y=!1,b=this._active.length-1,x=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,y=g,x=this._stack.fallThrough,this._stack.paused=!1),!x&&y===!1){for(;b>=0&&(y=this._active[b].end(h),y!==!0);b--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,y;b--}for(;b>=0;b--)if(y=this._active[b].end(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,y}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,g,y){this._hitLimit||(this._data+=(0,p.utf32ToString)(h,g,y),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let g=!1;if(this._hitLimit)g=!1;else if(h&&(g=this._handler(this._data),g instanceof Promise))return g.then(y=>(this._data="",this._hitLimit=!1,y));return this._data="",this._hitLimit=!1,g}}},8742:(i,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 g=Array.isArray(u[0])?1:0;g256)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,y=255&this._subParamsIdx[h];y-g>0&&u.push(Array.prototype.slice.call(this._subParams,g,y))}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,g=255&this._subParamsIdx[u];return g-h>0?this._subParams.subarray(h,g):null}getSubParamsAll(){let u={};for(let h=0;h>8,y=255&this._subParamsIdx[h];y-g>0&&(u[h]=this._subParams.slice(g,y))}return u}addDigit(u){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let g=this._digitIsSub?this._subParams:this.params,y=g[h-1];g[h-1]=~y?Math.min(10*y+u,a):u}}r.Params=c},5741:(i,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:(i,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:(i,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(y){super(),this._core=y,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:(i,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:(i,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(i,r,a){var c=this&&this.__decorate||function(x,M,w,S){var E,O=arguments.length,D=O<3?M:S===null?S=Object.getOwnPropertyDescriptor(M,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,M,w,S);else for(var N=x.length-1;N>=0;N--)(E=x[N])&&(D=(O<3?E(D):O>3?E(M,w,D):E(M,w))||D);return O>3&&D&&Object.defineProperty(M,w,D),D},p=this&&this.__param||function(x,M){return function(w,S){M(w,S,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;let u=a(8460),h=a(844),g=a(5295),y=a(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let b=r.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(x){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(x.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(x.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(x,this))}resize(x,M){this.cols=x,this.rows=M,this.buffers.resize(x,M),this._onResize.fire({cols:x,rows:M})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(x,M=!1){let w=this.buffer,S;S=this._cachedBlankLine,S&&S.length===this.cols&&S.getFg(0)===x.fg&&S.getBg(0)===x.bg||(S=w.getBlankLine(x,M),this._cachedBlankLine=S),S.isWrapped=M;let E=w.ybase+w.scrollTop,O=w.ybase+w.scrollBottom;if(w.scrollTop===0){let D=w.lines.isFull;O===w.lines.length-1?D?w.lines.recycle().copyFrom(S):w.lines.push(S.clone()):w.lines.splice(O+1,0,S.clone()),D?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{let D=O-E+1;w.lines.shiftElements(E+1,D-1,-1),w.lines.set(O,S.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(x,M,w){let S=this.buffer;if(x<0){if(S.ydisp===0)return;this.isUserScrolling=!0}else x+S.ydisp>=S.ybase&&(this.isUserScrolling=!1);let E=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+x,S.ybase),0),E!==S.ydisp&&(M||this._onScroll.fire(S.ydisp))}};r.BufferService=b=c([p(0,y.IOptionsService)],b)},7994:(i,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(i,r,a){var c=this&&this.__decorate||function(S,E,O,D){var N,P=arguments.length,L=P<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,O):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(S,E,O,D);else for(var se=S.length-1;se>=0;se--)(N=S[se])&&(L=(P<3?N(L):P>3?N(E,O,L):N(E,O))||L);return P>3&&L&&Object.defineProperty(E,O,L),L},p=this&&this.__param||function(S,E){return function(O,D){E(O,D,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;let u=a(2585),h=a(8460),g=a(844),y={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:S=>S.button!==4&&S.action===1&&(S.ctrl=!1,S.alt=!1,S.shift=!1,!0)},VT200:{events:19,restrict:S=>S.action!==32},DRAG:{events:23,restrict:S=>S.action!==32||S.button!==3},ANY:{events:31,restrict:S=>!0}};function b(S,E){let O=(S.ctrl?16:0)|(S.shift?4:0)|(S.alt?8:0);return S.button===4?(O|=64,O|=S.action):(O|=3&S.button,4&S.button&&(O|=64),8&S.button&&(O|=128),S.action===32?O|=32:S.action!==0||E||(O|=3)),O}let x=String.fromCharCode,M={DEFAULT:S=>{let E=[b(S,!1)+32,S.col+32,S.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${x(E[0])}${x(E[1])}${x(E[2])}`},SGR:S=>{let E=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${b(S,!0)};${S.col};${S.row}${E}`},SGR_PIXELS:S=>{let E=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${b(S,!0)};${S.x};${S.y}${E}`}},w=r.CoreMouseService=class extends g.Disposable{constructor(S,E){super(),this._bufferService=S,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 O of Object.keys(y))this.addProtocol(O,y[O]);for(let O of Object.keys(M))this.addEncoding(O,M[O]);this.reset()}addProtocol(S,E){this._protocols[S]=E}addEncoding(S,E){this._encodings[S]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(S){if(!this._protocols[S])throw new Error(`unknown protocol "${S}"`);this._activeProtocol=S,this._onProtocolChange.fire(this._protocols[S].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(S){if(!this._encodings[S])throw new Error(`unknown encoding "${S}"`);this._activeEncoding=S}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(S){if(S.col<0||S.col>=this._bufferService.cols||S.row<0||S.row>=this._bufferService.rows||S.button===4&&S.action===32||S.button===3&&S.action!==32||S.button!==4&&(S.action===2||S.action===3)||(S.col++,S.row++,S.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,S,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(S))return!1;let E=this._encodings[this._activeEncoding](S);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=S,!0}explainEvents(S){return{down:!!(1&S),up:!!(2&S),drag:!!(4&S),move:!!(8&S),wheel:!!(16&S)}}_equalEvents(S,E,O){if(O){if(S.x!==E.x||S.y!==E.y)return!1}else if(S.col!==E.col||S.row!==E.row)return!1;return S.button===E.button&&S.action===E.action&&S.ctrl===E.ctrl&&S.alt===E.alt&&S.shift===E.shift}};r.CoreMouseService=w=c([p(0,u.IBufferService),p(1,u.ICoreService)],w)},6975:function(i,r,a){var c=this&&this.__decorate||function(w,S,E,O){var D,N=arguments.length,P=N<3?S:O===null?O=Object.getOwnPropertyDescriptor(S,E):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,S,E,O);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(S,E,P):D(S,E))||P);return N>3&&P&&Object.defineProperty(S,E,P),P},p=this&&this.__param||function(w,S){return function(E,O){S(E,O,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;let u=a(1439),h=a(8460),g=a(844),y=a(2585),b=Object.freeze({insertMode:!1}),x=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),M=r.CoreService=class extends g.Disposable{constructor(w,S,E){super(),this._bufferService=w,this._logService=S,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)(b),this.decPrivateModes=(0,u.clone)(x)}reset(){this.modes=(0,u.clone)(b),this.decPrivateModes=(0,u.clone)(x)}triggerDataEvent(w,S=!1){if(this._optionsService.rawOptions.disableStdin)return;let E=this._bufferService.buffer;S&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),S&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,()=>w.split("").map(O=>O.charCodeAt(0))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,()=>w.split("").map(S=>S.charCodeAt(0))),this._onBinary.fire(w))}};r.CoreService=M=c([p(0,y.IBufferService),p(1,y.ILogService),p(2,y.IOptionsService)],M)},9074:(i,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),g=0,y=0;class b 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 S=new x(w);if(S){let E=S.marker.onDispose(()=>S.dispose());S.onDispose(()=>{S&&(this._decorations.delete(S)&&this._onDecorationRemoved.fire(S),E.dispose())}),this._decorations.insert(S),this._onDecorationRegistered.fire(S)}return S}reset(){for(let w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,S,E){let O=0,D=0;for(let N of this._decorations.getKeyIterator(S))O=N.options.x??0,D=O+(N.options.width??1),w>=O&&w{g=D.options.x??0,y=g+(D.options.width??1),w>=g&&w{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;let c=a(2585),p=a(8343);class u{constructor(...g){this._entries=new Map;for(let[y,b]of g)this.set(y,b)}set(g,y){let b=this._entries.get(g);return this._entries.set(g,y),b}forEach(g){for(let[y,b]of this._entries.entries())g(y,b)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}r.ServiceCollection=u,r.InstantiationService=class{constructor(){this._services=new u,this._services.set(c.IInstantiationService,this)}setService(h,g){this._services.set(h,g)}getService(h){return this._services.get(h)}createInstance(h,...g){let y=(0,p.getServiceDependencies)(h).sort((M,w)=>M.index-w.index),b=[];for(let M of y){let w=this._services.get(M.id);if(!w)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${M.id}.`);b.push(w)}let x=y.length>0?y[0].index:g.length;if(g.length!==x)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${x+1} conflicts with ${g.length} static arguments`);return new h(...g,...b)}}},7866:function(i,r,a){var c=this&&this.__decorate||function(x,M,w,S){var E,O=arguments.length,D=O<3?M:S===null?S=Object.getOwnPropertyDescriptor(M,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,M,w,S);else for(var N=x.length-1;N>=0;N--)(E=x[N])&&(D=(O<3?E(D):O>3?E(M,w,D):E(M,w))||D);return O>3&&D&&Object.defineProperty(M,w,D),D},p=this&&this.__param||function(x,M){return function(w,S){M(w,S,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;let u=a(844),h=a(2585),g={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},y,b=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(x){super(),this._optionsService=x,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),y=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(x){for(let M=0;MJSON.stringify(D)).join(", ")})`);let O=S.apply(this,E);return y.trace(`GlyphRenderer#${S.name} return`,O),O}}},7302:(i,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 g extends p.Disposable{constructor(b){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;let x=Z({},r.DEFAULT_OPTIONS);for(let M in b)if(M in x)try{let w=b[M];x[M]=this._sanitizeAndValidateOption(M,w)}catch(w){console.error(w)}this.rawOptions=x,this.options=Z({},x),this._setupOptions(),this.register((0,p.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(b,x){return this.onOptionChange(M=>{M===b&&x(this.rawOptions[b])})}onMultipleOptionChange(b,x){return this.onOptionChange(M=>{b.indexOf(M)!==-1&&x()})}_setupOptions(){let b=M=>{if(!(M in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${M}"`);return this.rawOptions[M]},x=(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:b.bind(this,M),set:x.bind(this,M)};Object.defineProperty(this.options,M,w)}}_sanitizeAndValidateOption(b,x){switch(b){case"cursorStyle":if(x||(x=r.DEFAULT_OPTIONS[b]),!(function(M){return M==="block"||M==="underline"||M==="bar"})(x))throw new Error(`"${x}" is not a valid value for ${b}`);break;case"wordSeparator":x||(x=r.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof x=="number"&&1<=x&&x<=1e3)break;x=h.includes(x)?x:r.DEFAULT_OPTIONS[b];break;case"cursorWidth":x=Math.floor(x);case"lineHeight":case"tabStopWidth":if(x<1)throw new Error(`${b} cannot be less than 1, value: ${x}`);break;case"minimumContrastRatio":x=Math.max(1,Math.min(21,Math.round(10*x)/10));break;case"scrollback":if((x=Math.min(x,4294967295))<0)throw new Error(`${b} cannot be less than 0, value: ${x}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(x<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${x}`);break;case"rows":case"cols":if(!x&&x!==0)throw new Error(`${b} must be numeric, value: ${x}`);break;case"windowsPty":x=x??{}}return x}}r.OptionsService=g},2660:function(i,r,a){var c=this&&this.__decorate||function(g,y,b,x){var M,w=arguments.length,S=w<3?y:x===null?x=Object.getOwnPropertyDescriptor(y,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(g,y,b,x);else for(var E=g.length-1;E>=0;E--)(M=g[E])&&(S=(w<3?M(S):w>3?M(y,b,S):M(y,b))||S);return w>3&&S&&Object.defineProperty(y,b,S),S},p=this&&this.__param||function(g,y){return function(b,x){y(b,x,g)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;let u=a(2585),h=r.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){let y=this._bufferService.buffer;if(g.id===void 0){let E=y.addMarker(y.ybase+y.y),O={data:g,id:this._nextId++,lines:[E]};return E.onDispose(()=>this._removeMarkerFromLink(O,E)),this._dataByLinkId.set(O.id,O),O.id}let b=g,x=this._getEntryIdKey(b),M=this._entriesWithId.get(x);if(M)return this.addLineToLink(M.id,y.ybase+y.y),M.id;let w=y.addMarker(y.ybase+y.y),S={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[w]};return w.onDispose(()=>this._removeMarkerFromLink(S,w)),this._entriesWithId.set(S.key,S),this._dataByLinkId.set(S.id,S),S.id}addLineToLink(g,y){let b=this._dataByLinkId.get(g);if(b&&b.lines.every(x=>x.line!==y)){let x=this._bufferService.buffer.addMarker(y);b.lines.push(x),x.onDispose(()=>this._removeMarkerFromLink(b,x))}}getLinkData(g){return this._dataByLinkId.get(g)?.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,y){let b=g.lines.indexOf(y);b!==-1&&(g.lines.splice(b,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};r.OscLinkService=h=c([p(0,u.IBufferService)],h)},8343:(i,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,g,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,x,M){x[a]===x?x[c].push({id:b,index:M}):(x[c]=[{id:b,index:M}],x[a]=x)})(u,h,y)};return u.toString=()=>p,r.serviceRegistry.set(p,u),u}},2585:(i,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:(i,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;let c=a(8460),p=a(225);class u{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,y,b=!1){return(16777215&g)<<3|(3&y)<<1|(b?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;let g=new p.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let y=0,b=0,x=g.length;for(let M=0;M=x)return y+this.wcwidth(w);let O=g.charCodeAt(M);56320<=O&&O<=57343?w=1024*(w-55296)+O-56320+65536:y+=this.wcwidth(O)}let S=this.charProperties(w,b),E=u.extractWidth(S);u.extractShouldJoin(S)&&(E-=u.extractWidth(b)),y+=E,b=S}return y}charProperties(g,y){return this._activeProvider.charProperties(g,y)}}r.UnicodeService=u}},o={};function e(i){var r=o[i];if(r!==void 0)return r.exports;var a=o[i]={exports:{}};return n[i].call(a.exports,a,a.exports,e),a.exports}var t={};return(()=>{var i=t;Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;let r=e(9042),a=e(3236),c=e(844),p=e(5741),u=e(8285),h=e(7975),g=e(7090),y=["cols","rows"];class b extends c.Disposable{constructor(M){super(),this._core=this.register(new a.Terminal(M)),this._addonManager=this.register(new p.AddonManager),this._publicOptions=Z({},this._core.options);let w=E=>this._core.options[E],S=(E,O)=>{this._checkReadonlyOptions(E),this._core.options[E]=O};for(let E in this._core.options){let O={get:w.bind(this,E),set:S.bind(this,E)};Object.defineProperty(this._publicOptions,E,O)}}_checkReadonlyOptions(M){if(y.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 g.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,S){this._verifyIntegers(M,w,S),this._core.select(M,w,S)}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")}}i.Terminal=b})(),t})())});var yO=ws((Q2,bO)=>{(function(n,o){typeof Q2=="object"&&typeof bO=="object"?bO.exports=o():typeof define=="function"&&define.amd?define([],o):typeof Q2=="object"?Q2.AttachAddon=o():n.AttachAddon=o()})(self,()=>(()=>{"use strict";var n={};return(()=>{var o=n;function e(t,i,r){return t.addEventListener(i,r),{dispose:()=>{r&&t.removeEventListener(i,r)}}}Object.defineProperty(o,"__esModule",{value:!0}),o.AttachAddon=void 0,o.AttachAddon=class{constructor(t,i){this._disposables=[],this._socket=t,this._socket.binaryType="arraybuffer",this._bidirectional=!(i&&i.bidirectional===!1)}activate(t){this._disposables.push(e(this._socket,"message",i=>{let r=i.data;t.write(typeof r=="string"?r:new Uint8Array(r))})),this._bidirectional&&(this._disposables.push(t.onData(i=>this._sendData(i))),this._disposables.push(t.onBinary(i=>this._sendBinary(i)))),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 i=new Uint8Array(t.length);for(let r=0;r{(function(n,o){typeof X2=="object"&&typeof SO=="object"?SO.exports=o():typeof define=="function"&&define.amd?define([],o):typeof X2=="object"?X2.FitAddon=o():n.FitAddon=o()})(self,()=>(()=>{"use strict";var n={};return(()=>{var o=n;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.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 i=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")))-i;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 h5=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),Mh=class n{element=null;classNames=[];attrs=[];notSelectors=[];static parse(o){let e=[],t=(p,u)=>{u.notSelectors.length>0&&!u.element&&u.classNames.length==0&&u.attrs.length==0&&(u.element="*"),p.push(u)},i=new n,r,a=i,c=!1;for(h5.lastIndex=0;r=h5.exec(o);){if(r[1]){if(c)throw new Error("Nesting :not in a selector is not allowed");c=!0,a=new n,i.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=i),r[8]){if(c)throw new Error("Multiple selectors in :not are not supported");t(e,i),i=a=new n}}return t(e,i),e}unescapeAttribute(o){let e="",t=!1;for(let i=0;i0&&o.push("class",this.classNames.join(" ")),o.concat(this.attrs)}addAttribute(o,e=""){this.attrs.push(o,e&&e.toLowerCase()||"")}addClassName(o){this.classNames.push(o.toLowerCase())}toString(){let o=this.element||"";if(this.classNames&&this.classNames.forEach(e=>o+=`.${e}`),this.attrs)for(let e=0;eo+=`:not(${e})`),o}},o1=class n{static createNotMatcher(o){let e=new n;return e.addSelectables(o,null),e}_elementMap=new Map;_elementPartialMap=new Map;_classMap=new Map;_classPartialMap=new Map;_attrValueMap=new Map;_attrValuePartialMap=new Map;_listContexts=[];addSelectables(o,e){let t=null;o.length>1&&(t=new tT(o),this._listContexts.push(t));for(let i=0;i0&&(!this.listContext||!this.listContext.alreadyMatched)&&(t=!o1.createNotMatcher(this.notSelectors).match(o,null)),t&&e&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),t}},r1=class{registry;constructor(o){this.registry=o}match(o){return this.registry.has(o)?this.registry.get(o):[]}},fi=(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})(fi||{}),JC,f5="svg",B$="math";function z$(){return JC||(JC={},tm(fi.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),tm(fi.STYLE,void 0,[["*",["style"]]]),tm(fi.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),tm(fi.URL,B$,[["annotation",["href","xlink:href"]],["annotation-xml",["href","xlink:href"]],["maction",["href","xlink:href"]],["malignmark",["href","xlink:href"]],["math",["href","xlink:href"]],["mroot",["href","xlink:href"]],["msqrt",["href","xlink:href"]],["merror",["href","xlink:href"]],["mfrac",["href","xlink:href"]],["mglyph",["href","xlink:href"]],["msub",["href","xlink:href"]],["msup",["href","xlink:href"]],["msubsup",["href","xlink:href"]],["mmultiscripts",["href","xlink:href"]],["mprescripts",["href","xlink:href"]],["mi",["href","xlink:href"]],["mn",["href","xlink:href"]],["mo",["href","xlink:href"]],["mpadded",["href","xlink:href"]],["mphantom",["href","xlink:href"]],["mrow",["href","xlink:href"]],["ms",["href","xlink:href"]],["mspace",["href","xlink:href"]],["mstyle",["href","xlink:href"]],["mtable",["href","xlink:href"]],["mtd",["href","xlink:href"]],["mtr",["href","xlink:href"]],["mtext",["href","xlink:href"]],["mover",["href","xlink:href"]],["munder",["href","xlink:href"]],["munderover",["href","xlink:href"]],["semantics",["href","xlink:href"]],["none",["href","xlink:href"]]]),tm(fi.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),tm(fi.URL,f5,[["a",["href","xlink:href"]]]),tm(fi.ATTRIBUTE_NO_BINDING,f5,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),tm(fi.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),JC}function tm(n,o,e){for(let[t,i]of e){let r=o&&t!=="*"&&t!=="unknown"?`:${o}:${t}`:t;r=r.toLowerCase();for(let a of i)JC[`${r}|${a.toLowerCase()}`]=n}}var Pp=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(Pp||{}),IE=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n[n.Eager=1]="Eager",n})(IE||{}),e_=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(e_||{}),g5={name:"custom-elements"},_5={name:"no-errors-schema"};function j$(n){let o=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return[n.element&&n.element!=="*"?n.element:"",...n.attrs,...o]}function $$(n){let o=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return n.element?[5,n.element,...n.attrs,...o]:n.attrs.length?[3,...n.attrs,...o]:n.classNames&&n.classNames.length?[9,...n.classNames]:[]}function H$(n){let o=j$(n),e=n.notSelectors&&n.notSelectors.length?n.notSelectors.map(t=>$$(t)):[];return o.concat(...e)}function AE(n){return n?Mh.parse(n).map(H$):[]}var xd=(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})(xd||{});var a1;function U$(n){return Q$(q$(n.nodes).join("")+`[${n.meaning}]`)}function W$(n){return n.id||cF(n)}function cF(n){let o=new iT,e=n.nodes.map(t=>t.visit(o,null));return dF(e.join(""),n.meaning)}var s1=class{visitText(o,e){return o.value}visitContainer(o,e){return`[${o.children.map(t=>t.visit(this)).join(", ")}]`}visitIcu(o,e){let t=Object.keys(o.cases).map(i=>`${i} {${o.cases[i].visit(this)}}`);return`{${o.expression}, ${o.type}, ${t.join(", ")}}`}visitTagPlaceholder(o,e){return o.isVoid?``:`${o.children.map(t=>t.visit(this)).join(", ")}`}visitPlaceholder(o,e){return o.value?`${o.value}`:``}visitIcuPlaceholder(o,e){return`${o.value.visit(this)}`}visitBlockPlaceholder(o,e){return`${o.children.map(t=>t.visit(this)).join(", ")}`}},G$=new s1;function q$(n){return n.map(o=>o.visit(G$,null))}var iT=class extends s1{visitIcu(o){let e=Object.keys(o.cases).map(t=>`${t} {${o.cases[t].visit(this)}}`);return`{${o.type}, ${e.join(", ")}}`}};function Q$(n){a1??=new TextEncoder;let o=[...a1.encode(n)],e=Y$(o,OE.Big),t=o.length*8,i=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 X$(n,o,e,t){return n<20?[o&e|~o&t,1518500249]:n<40?[o^e^t,1859775393]:n<60?[o&e|o&t|e&t,2400959708]:[o^e^t,3395469782]}function v5(n){a1??=new TextEncoder;let o=a1.encode(n),e=new DataView(o.buffer,o.byteOffset,o.byteLength),t=C5(e,o.length,0),i=C5(e,o.length,102072);return t==0&&(i==0||i==1)&&(t=t^319790063,i=i^-1801410264),BigInt.asUintN(32,BigInt(t))<>BigInt(63)&BigInt(1),e+=v5(o)),BigInt.asUintN(63,e).toString()}function C5(n,o,e){let t=2654435769,i=2654435769,r=0,a=o-12;for(;r<=a;r+=12){t+=n.getUint32(r,!0),i+=n.getUint32(r+4,!0),e+=n.getUint32(r+8,!0);let p=x5(t,i,e);t=p[0],i=p[1],e=p[2]}let c=o-r;return e+=o,c>=4?(t+=n.getUint32(r,!0),r+=4,c>=8?(i+=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&&(i+=n.getUint8(r++)),c>=6&&(i+=n.getUint8(r++)<<8),c===7&&(i+=n.getUint8(r++)<<16))):(c>=1&&(t+=n.getUint8(r++)),c>=2&&(t+=n.getUint8(r++)<<8),c===3&&(t+=n.getUint8(r++)<<16)),x5(t,i,e)[2]}function x5(n,o,e){return n-=o,n-=e,n^=e>>>13,o-=e,o-=n,o^=n<<8,e-=n,e-=o,e^=o>>>13,n-=o,n-=e,n^=e>>>12,o-=e,o-=n,o^=n<<16,e-=n,e-=o,e^=o>>>5,n-=o,n-=e,n^=e>>>3,o-=e,o-=n,o^=n<<10,e-=n,e-=o,e^=o>>>15,[n,o,e]}var OE=(function(n){return n[n.Little=0]="Little",n[n.Big=1]="Big",n})(OE||{});function lh(n,o){return K$(n,o)[1]}function K$(n,o){let e=(n&65535)+(o&65535),t=(n>>>16)+(o>>>16)+(e>>>16);return[t>>>16,t<<16|e&65535]}function Ok(n,o){return n<>>32-o}function Y$(n,o){let e=n.length+3>>>2,t=[];for(let i=0;i=n.length?0:n[o]}function Z$(n,o,e){let t=0;if(e===OE.Big)for(let i=0;i<4;i++)t+=b5(n,o+i)<<24-8*i;else for(let i=0;i<4;i++)t+=b5(n,o+i)<<8*i;return t}var mF=(function(n){return n[n.None=0]="None",n[n.Const=1]="Const",n})(mF||{}),l1=class{modifiers;constructor(o=mF.None){this.modifiers=o}hasModifier(o){return(this.modifiers&o)!==0}},Ed=(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})(Ed||{}),Tc=class extends l1{name;constructor(o,e){super(e),this.name=o}visitType(o,e){return o.visitBuiltinType(this,e)}},ll=class extends l1{value;typeParams;constructor(o,e,t=null){super(e),this.value=o,this.typeParams=t}visitType(o,e){return o.visitExpressionType(this,e)}};var ls=new Tc(Ed.Dynamic),Wl=new Tc(Ed.Inferred),J$=new Tc(Ed.Bool),e6e=new Tc(Ed.Int),Gp=new Tc(Ed.Number),NE=new Tc(Ed.String),t6e=new Tc(Ed.Function),Ec=new Tc(Ed.None),f_=(function(n){return n[n.Minus=0]="Minus",n[n.Plus=1]="Plus",n})(f_||{}),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 eH(n,o){return n==null||o==null?n==o:n.isEquivalent(o)}function pF(n,o,e){let t=n.length;if(t!==o.length)return!1;for(let i=0;ie.isEquivalent(t))}var Ui=class{type;sourceSpan;constructor(o,e){this.type=o||null,this.sourceSpan=e||null}prop(o,e){return new Fs(this,o,null,e)}key(o,e,t){return new Md(this,o,e,t)}callFn(o,e,t){return new cs(this,o,null,e,t)}instantiate(o,e,t){return new __(this,o,e,t)}conditional(o,e=null,t){return new Dc(this,o,e,null,t)}equals(o,e){return new vi(st.Equals,this,o,null,e)}notEquals(o,e){return new vi(st.NotEquals,this,o,null,e)}identical(o,e){return new vi(st.Identical,this,o,null,e)}notIdentical(o,e){return new vi(st.NotIdentical,this,o,null,e)}minus(o,e){return new vi(st.Minus,this,o,null,e)}plus(o,e){return new vi(st.Plus,this,o,null,e)}divide(o,e){return new vi(st.Divide,this,o,null,e)}multiply(o,e){return new vi(st.Multiply,this,o,null,e)}modulo(o,e){return new vi(st.Modulo,this,o,null,e)}power(o,e){return new vi(st.Exponentiation,this,o,null,e)}and(o,e){return new vi(st.And,this,o,null,e)}bitwiseOr(o,e){return new vi(st.BitwiseOr,this,o,null,e)}bitwiseAnd(o,e){return new vi(st.BitwiseAnd,this,o,null,e)}or(o,e){return new vi(st.Or,this,o,null,e)}lower(o,e){return new vi(st.Lower,this,o,null,e)}lowerEquals(o,e){return new vi(st.LowerEquals,this,o,null,e)}bigger(o,e){return new vi(st.Bigger,this,o,null,e)}biggerEquals(o,e){return new vi(st.BiggerEquals,this,o,null,e)}isBlank(o){return this.equals(rH,o)}nullishCoalesce(o,e){return new vi(st.NullishCoalesce,this,o,null,e)}toStmt(){return new pa(this,null)}},Gl=class n extends Ui{name;constructor(o,e,t){super(e,t),this.name=o}isEquivalent(o){return o instanceof n&&this.name===o.name}isConstant(){return!1}visitExpression(o,e){return o.visitReadVarExpr(this,e)}clone(){return new n(this.name,this.type,this.sourceSpan)}set(o){return new vi(st.Assign,this,o,null,this.sourceSpan)}},kh=class n extends Ui{expr;constructor(o,e,t){super(e,t),this.expr=o}visitExpression(o,e){return o.visitTypeofExpr(this,e)}isEquivalent(o){return o instanceof n&&o.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},c1=class n extends Ui{expr;constructor(o,e,t){super(e,t),this.expr=o}visitExpression(o,e){return o.visitVoidExpr(this,e)}isEquivalent(o){return o instanceof n&&o.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},si=class n extends Ui{node;constructor(o,e,t){super(e,t),this.node=o}isEquivalent(o){return o instanceof n&&this.node===o.node}isConstant(){return!1}visitExpression(o,e){return o.visitWrappedNodeExpr(this,e)}clone(){return new n(this.node,this.type,this.sourceSpan)}},cs=class n extends Ui{fn;args;pure;constructor(o,e,t,i,r=!1){super(t,i),this.fn=o,this.args=e,this.pure=r}get receiver(){return this.fn}isEquivalent(o){return o instanceof n&&this.fn.isEquivalent(o.fn)&&Ns(this.args,o.args)&&this.pure===o.pure}isConstant(){return!1}visitExpression(o,e){return o.visitInvokeFunctionExpr(this,e)}clone(){return new n(this.fn.clone(),this.args.map(o=>o.clone()),this.type,this.sourceSpan,this.pure)}},g_=class n extends Ui{tag;template;constructor(o,e,t,i){super(t,i),this.tag=o,this.template=e}isEquivalent(o){return o instanceof n&&this.tag.isEquivalent(o.tag)&&this.template.isEquivalent(o.template)}isConstant(){return!1}visitExpression(o,e){return o.visitTaggedTemplateLiteralExpr(this,e)}clone(){return new n(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},__=class n extends Ui{classExpr;args;constructor(o,e,t,i){super(t,i),this.classExpr=o,this.args=e}isEquivalent(o){return o instanceof n&&this.classExpr.isEquivalent(o.classExpr)&&Ns(this.args,o.args)}isConstant(){return!1}visitExpression(o,e){return o.visitInstantiateExpr(this,e)}clone(){return new n(this.classExpr.clone(),this.args.map(o=>o.clone()),this.type,this.sourceSpan)}},Th=class n extends Ui{body;flags;constructor(o,e,t){super(null,t),this.body=o,this.flags=e}isEquivalent(o){return o instanceof n&&this.body===o.body&&this.flags===o.flags}isConstant(){return!0}visitExpression(o,e){return o.visitRegularExpressionLiteral(this,e)}clone(){return new n(this.body,this.flags,this.sourceSpan)}},ma=class n extends Ui{value;constructor(o,e,t){super(e,t),this.value=o}isEquivalent(o){return o instanceof n&&this.value===o.value}isConstant(){return!0}visitExpression(o,e){return o.visitLiteralExpr(this,e)}clone(){return new n(this.value,this.type,this.sourceSpan)}},v_=class n extends Ui{elements;expressions;constructor(o,e,t){super(null,t),this.elements=o,this.expressions=e}isEquivalent(o){return o instanceof n&&pF(this.elements,o.elements,(e,t)=>e.text===t.text)&&Ns(this.expressions,o.expressions)}isConstant(){return!1}visitExpression(o,e){return o.visitTemplateLiteralExpr(this,e)}clone(){return new n(this.elements.map(o=>o.clone()),this.expressions.map(o=>o.clone()))}},d1=class n extends Ui{text;rawText;constructor(o,e,t){super(NE,e),this.text=o,this.rawText=t??oT(e1(o))}visitExpression(o,e){return o.visitTemplateLiteralElementExpr(this,e)}isEquivalent(o){return o instanceof n&&o.text===this.text&&o.rawText===this.rawText}isConstant(){return!0}clone(){return new n(this.text,this.sourceSpan,this.rawText)}},Vp=class{text;sourceSpan;constructor(o,e){this.text=o,this.sourceSpan=e}},yh=class{text;sourceSpan;associatedMessage;constructor(o,e,t){this.text=o,this.sourceSpan=e,this.associatedMessage=t}},tH="|",y5="@@",nH="\u241F",m1=class n extends Ui{metaBlock;messageParts;placeHolderNames;expressions;constructor(o,e,t,i,r){super(NE,r),this.metaBlock=o,this.messageParts=e,this.placeHolderNames=t,this.expressions=i}isEquivalent(o){return!1}isConstant(){return!1}visitExpression(o,e){return o.visitLocalizedString(this,e)}clone(){return new n(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(o=>o.clone()),this.sourceSpan)}serializeI18nHead(){let o=this.metaBlock.description||"";return this.metaBlock.meaning&&(o=`${this.metaBlock.meaning}${tH}${o}`),this.metaBlock.customId&&(o=`${o}${y5}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(e=>{o=`${o}${nH}${e}`}),S5(o,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(o){return this.messageParts[o]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(o){return this.placeHolderNames[o]?.sourceSpan??this.expressions[o]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(o){let e=this.placeHolderNames[o-1],t=this.messageParts[o],i=e.text;return e.associatedMessage?.legacyIds.length===0&&(i+=`${y5}${dF(e.associatedMessage.messageString,e.associatedMessage.meaning)}`),S5(i,t.text,this.getMessagePartSourceSpan(o))}},e1=n=>n.replace(/\\/g,"\\\\"),iH=n=>n.replace(/^:/,"\\:"),oH=n=>n.replace(/:/g,"\\:"),oT=n=>n.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function S5(n,o,e){return n===""?{cooked:o,raw:oT(iH(e1(o))),range:e}:{cooked:`:${n}:${o}`,raw:oT(`:${oH(e1(n))}:${e1(o)}`),range:e}}var qp=class n extends Ui{value;typeParams;constructor(o,e,t=null,i){super(e,i),this.value=o,this.typeParams=t}isEquivalent(o){return o instanceof n&&this.value.name===o.value.name&&this.value.moduleName===o.value.moduleName}isConstant(){return!1}visitExpression(o,e){return o.visitExternalExpr(this,e)}clone(){return new n(this.value,this.type,this.typeParams,this.sourceSpan)}};var Dc=class n extends Ui{condition;falseCase;trueCase;constructor(o,e,t=null,i,r){super(i||e.type,r),this.condition=o,this.falseCase=t,this.trueCase=e}isEquivalent(o){return o instanceof n&&this.condition.isEquivalent(o.condition)&&this.trueCase.isEquivalent(o.trueCase)&&eH(this.falseCase,o.falseCase)}isConstant(){return!1}visitExpression(o,e){return o.visitConditionalExpr(this,e)}clone(){return new n(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}};var C_=class n extends Ui{condition;constructor(o,e){super(J$,e),this.condition=o}isEquivalent(o){return o instanceof n&&this.condition.isEquivalent(o.condition)}isConstant(){return!1}visitExpression(o,e){return o.visitNotExpr(this,e)}clone(){return new n(this.condition.clone(),this.sourceSpan)}},Mr=class n{name;type;constructor(o,e=null){this.name=o,this.type=e}isEquivalent(o){return this.name===o.name}clone(){return new n(this.name,this.type)}},mm=class n extends Ui{params;statements;name;constructor(o,e,t,i,r){super(t,i),this.params=o,this.statements=e,this.name=r}isEquivalent(o){return(o instanceof n||o instanceof x_)&&Ns(this.params,o.params)&&Ns(this.statements,o.statements)}isConstant(){return!1}visitExpression(o,e){return o.visitFunctionExpr(this,e)}toDeclStmt(o,e){return new x_(o,this.params,this.statements,this.type,e,this.sourceSpan)}clone(){return new n(this.params.map(o=>o.clone()),this.statements,this.type,this.sourceSpan,this.name)}},su=class rT extends Ui{params;body;constructor(o,e,t,i){super(t,i),this.params=o,this.body=e}isEquivalent(o){return!(o instanceof rT)||!Ns(this.params,o.params)?!1:this.body instanceof Ui&&o.body instanceof Ui?this.body.isEquivalent(o.body):Array.isArray(this.body)&&Array.isArray(o.body)?Ns(this.body,o.body):!1}isConstant(){return!1}visitExpression(o,e){return o.visitArrowFunctionExpr(this,e)}clone(){return new rT(this.params.map(o=>o.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(o,e){return new Hr(o,this,Wl,e,this.sourceSpan)}},Qp=class n extends Ui{operator;expr;parens;constructor(o,e,t,i,r=!0){super(t||Gp,i),this.operator=o,this.expr=e,this.parens=r}isEquivalent(o){return o instanceof n&&this.operator===o.operator&&this.expr.isEquivalent(o.expr)}isConstant(){return!1}visitExpression(o,e){return o.visitUnaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},ql=class n extends Ui{expr;constructor(o,e,t){super(e,t),this.expr=o}visitExpression(o,e){return o.visitParenthesizedExpr(this,e)}isEquivalent(o){return o instanceof n&&o.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},vi=class n extends Ui{operator;rhs;lhs;constructor(o,e,t,i,r){super(i||e.type,r),this.operator=o,this.rhs=t,this.lhs=e}isEquivalent(o){return o instanceof n&&this.operator===o.operator&&this.lhs.isEquivalent(o.lhs)&&this.rhs.isEquivalent(o.rhs)}isConstant(){return!1}visitExpression(o,e){return o.visitBinaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let o=this.operator;return o===st.Assign||o===st.AdditionAssignment||o===st.SubtractionAssignment||o===st.MultiplicationAssignment||o===st.DivisionAssignment||o===st.RemainderAssignment||o===st.ExponentiationAssignment||o===st.AndAssignment||o===st.OrAssignment||o===st.NullishCoalesceAssignment}},Fs=class n extends Ui{receiver;name;constructor(o,e,t,i){super(t,i),this.receiver=o,this.name=e}get index(){return this.name}isEquivalent(o){return o instanceof n&&this.receiver.isEquivalent(o.receiver)&&this.name===o.name}isConstant(){return!1}visitExpression(o,e){return o.visitReadPropExpr(this,e)}set(o){return new vi(st.Assign,this.receiver.prop(this.name),o,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},Md=class n extends Ui{receiver;index;constructor(o,e,t,i){super(t,i),this.receiver=o,this.index=e}isEquivalent(o){return o instanceof n&&this.receiver.isEquivalent(o.receiver)&&this.index.isEquivalent(o.index)}isConstant(){return!1}visitExpression(o,e){return o.visitReadKeyExpr(this,e)}set(o){return new vi(st.Assign,this.receiver.key(this.index),o,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},Pc=class n extends Ui{entries;constructor(o,e,t){super(e,t),this.entries=o}isConstant(){return this.entries.every(o=>o.isConstant())}isEquivalent(o){return o instanceof n&&Ns(this.entries,o.entries)}visitExpression(o,e){return o.visitLiteralArrayExpr(this,e)}clone(){return new n(this.entries.map(o=>o.clone()),this.type,this.sourceSpan)}},Eh=class n{key;value;quoted;constructor(o,e,t){this.key=o,this.value=e,this.quoted=t}isEquivalent(o){return this.key===o.key&&this.value.isEquivalent(o.value)}clone(){return new n(this.key,this.value.clone(),this.quoted)}isConstant(){return this.value.isConstant()}},pm=class n{expression;constructor(o){this.expression=o}isEquivalent(o){return o instanceof n&&this.expression.isEquivalent(o.expression)}clone(){return new n(this.expression.clone())}isConstant(){return this.expression.isConstant()}},Ql=class n extends Ui{entries;valueType=null;constructor(o,e,t){super(e,t),this.entries=o,e&&(this.valueType=e.valueType)}isEquivalent(o){return o instanceof n&&Ns(this.entries,o.entries)}isConstant(){return this.entries.every(o=>o.isConstant())}visitExpression(o,e){return o.visitLiteralMapExpr(this,e)}clone(){let o=this.entries.map(e=>e.clone());return new n(o,this.type,this.sourceSpan)}};var Xp=class n extends Ui{expression;constructor(o,e){super(null,e),this.expression=o}isEquivalent(o){return o instanceof n&&this.expression.isEquivalent(o.expression)}isConstant(){return this.expression.isConstant()}visitExpression(o,e){return o.visitSpreadElementExpr(this,e)}clone(){return new n(this.expression.clone(),this.sourceSpan)}},Dh=new ma(null,null,null),rH=new ma(null,Wl,null),ca=(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})(ca||{}),aT=class{text;multiline;trailingNewline;constructor(o,e,t){this.text=o,this.multiline=e,this.trailingNewline=t}toString(){return this.multiline?` ${this.text} `:this.text}},p1=class extends aT{tags;constructor(o){super("",!0,!0),this.tags=o}toString(){return dH(this.tags)}},Kp=class{modifiers;sourceSpan;leadingComments;constructor(o=ca.None,e=null,t){this.modifiers=o,this.sourceSpan=e,this.leadingComments=t}hasModifier(o){return(this.modifiers&o)!==0}addLeadingComment(o){this.leadingComments=this.leadingComments??[],this.leadingComments.push(o)}},Hr=class n extends Kp{name;value;type;constructor(o,e,t,i,r,a){super(i,r,a),this.name=o,this.value=e,this.type=t||e&&e.type||null}isEquivalent(o){return o instanceof n&&this.name===o.name&&(this.value?!!o.value&&this.value.isEquivalent(o.value):!o.value)}visitStatement(o,e){return o.visitDeclareVarStmt(this,e)}},x_=class n extends Kp{name;params;statements;type;constructor(o,e,t,i,r,a,c){super(r,a,c),this.name=o,this.params=e,this.statements=t,this.type=i||null}isEquivalent(o){return o instanceof n&&Ns(this.params,o.params)&&Ns(this.statements,o.statements)}visitStatement(o,e){return o.visitDeclareFunctionStmt(this,e)}},pa=class n extends Kp{expr;constructor(o,e,t){super(ca.None,e,t),this.expr=o}isEquivalent(o){return o instanceof n&&this.expr.isEquivalent(o.expr)}visitStatement(o,e){return o.visitExpressionStmt(this,e)}},kr=class n extends Kp{value;constructor(o,e=null,t){super(ca.None,e,t),this.value=o}isEquivalent(o){return o instanceof n&&this.value.isEquivalent(o.value)}visitStatement(o,e){return o.visitReturnStmt(this,e)}},u1=class n extends Kp{condition;trueCase;falseCase;constructor(o,e,t=[],i,r){super(ca.None,i,r),this.condition=o,this.trueCase=e,this.falseCase=t}isEquivalent(o){return o instanceof n&&this.condition.isEquivalent(o.condition)&&Ns(this.trueCase,o.trueCase)&&Ns(this.falseCase,o.falseCase)}visitStatement(o,e){return o.visitIfStmt(this,e)}};function aH(n=[]){return new p1(n)}function Jn(n,o,e){return new Gl(n,o,e)}function jt(n,o=null,e){return new qp(n,null,o,e)}function da(n,o,e){return new ll(n,o,e)}function p0(n){return new kh(n)}function Xi(n,o,e){return new Pc(n,o,e)}function cl(n,o=null){return new Ql(n.map(e=>new Eh(e.key,e.value,e.quoted)),o,null)}function sH(n,o){return new C_(n,o)}function um(n,o,e,t,i){return new mm(n,o,e,t,i)}function Rs(n,o,e,t){return new su(n,o,e,t)}function px(n,o,e,t,i){return new u1(n,o,e,t,i)}function lH(n,o,e,t){return new g_(n,o,e,t)}function Ee(n,o,e){return new ma(n,o,e)}function cH(n,o,e,t,i){return new m1(n,o,e,t,i)}function w5(n){let o="";if(n.tagName&&(o+=` @${n.tagName}`),n.text){if(n.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');o+=" "+n.text.replace(/@/g,"\\@")}return o}function dH(n){if(n.length===0)return"";if(n.length===1&&n[0].tagName&&!n[0].text)return`*${w5(n[0])} `;let o=`* `;for(let e of n)o+=" *",o+=w5(e).replace(/\n/g,` * `),o+=` `;return o+=" ",o}var mH="_c",pH={},uH=50,h1=class n extends Ui{resolved;original;shared=!1;constructor(o){super(o.type),this.resolved=o,this.original=o}visitExpression(o,e){return e===pH?this.original.visitExpression(o,e):this.resolved.visitExpression(o,e)}isEquivalent(o){return o instanceof n&&this.resolved.isEquivalent(o.resolved)}isConstant(){return!0}clone(){throw new Error("Not supported.")}fixup(o){this.resolved=o,this.shared=!0}},f1=class{isClosureCompilerEnabled;statements=[];literals=new Map;literalFactories=new Map;sharedConstants=new Map;_claimedNames=new Map;nextNameIndex=0;constructor(o=!1){this.isClosureCompilerEnabled=o}getConstLiteral(o,e){if(o instanceof ma&&!M5(o)||o instanceof h1)return o;let t=b_.INSTANCE.keyOf(o),i=this.literals.get(t),r=!1;if(i||(i=new h1(o),this.literals.set(t,i),r=!0),!r&&!i.shared||r&&e){let a=this.freshName(),c,p;this.isClosureCompilerEnabled&&M5(o)?(c=new mm([],[new kr(o)]),p=Jn(a).callFn([])):(c=o,p=Jn(a)),this.statements.push(new Hr(a,c,Wl,ca.Final)),i.fixup(p)}return i}getSharedConstant(o,e){let t=o.keyOf(e);if(!this.sharedConstants.has(t)){let i=this.freshName();this.sharedConstants.set(t,Jn(i)),this.statements.push(o.toSharedConstantDeclaration(i,e))}return this.sharedConstants.get(t)}getSharedFunctionReference(o,e,t=!0){let i=o instanceof su;for(let a of this.statements)if(i&&a instanceof Hr&&a.value?.isEquivalent(o)||!i&&a instanceof x_&&o instanceof mm&&o.isEquivalent(a))return Jn(a.name);let r=t?this.uniqueName(e):e;return this.statements.push(o instanceof mm?o.toDeclStmt(r,ca.Final):new Hr(r,o,Wl,ca.Final,o.sourceSpan)),Jn(r)}uniqueName(o,e=!0){let t=this._claimedNames.get(o)??0,i=t===0&&!e?`${o}`:`${o}${t}`;return this._claimedNames.set(o,t+1),i}freshName(){return this.uniqueName(mH)}},b_=class n{static INSTANCE=new n;keyOf(o){if(o instanceof ma&&typeof o.value=="string")return`"${o.value}"`;if(o instanceof ma)return String(o.value);if(o instanceof Th)return`/${o.body}/${o.flags??""}`;if(o instanceof Pc){let e=[];for(let t of o.entries)e.push(this.keyOf(t));return`[${e.join(",")}]`}else if(o instanceof Ql){let e=[];for(let t of o.entries)if(t instanceof pm)e.push("..."+this.keyOf(t.expression));else{let i=t.key;t.quoted&&(i=`"${i}"`),e.push(i+":"+this.keyOf(t.value))}return`{${e.join(",")}}`}else{if(o instanceof qp)return`import("${o.value.moduleName}", ${o.value.name})`;if(o instanceof Gl)return`read(${o.name})`;if(o instanceof kh)return`typeof(${this.keyOf(o.expr)})`;if(o instanceof Xp)return`...${this.keyOf(o.expression)}`;throw new Error(`${this.constructor.name} does not handle expressions of type ${o.constructor.name}`)}}};function M5(n){return n instanceof ma&&typeof n.value=="string"&&n.value.length>=uH}var xe="@angular/core",fe=(()=>{class n{static core={name:null,moduleName:xe};static namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:xe};static namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:xe};static namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:xe};static element={name:"\u0275\u0275element",moduleName:xe};static elementStart={name:"\u0275\u0275elementStart",moduleName:xe};static elementEnd={name:"\u0275\u0275elementEnd",moduleName:xe};static domElement={name:"\u0275\u0275domElement",moduleName:xe};static domElementStart={name:"\u0275\u0275domElementStart",moduleName:xe};static domElementEnd={name:"\u0275\u0275domElementEnd",moduleName:xe};static domElementContainer={name:"\u0275\u0275domElementContainer",moduleName:xe};static domElementContainerStart={name:"\u0275\u0275domElementContainerStart",moduleName:xe};static domElementContainerEnd={name:"\u0275\u0275domElementContainerEnd",moduleName:xe};static domTemplate={name:"\u0275\u0275domTemplate",moduleName:xe};static domListener={name:"\u0275\u0275domListener",moduleName:xe};static advance={name:"\u0275\u0275advance",moduleName:xe};static syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:xe};static syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:xe};static attribute={name:"\u0275\u0275attribute",moduleName:xe};static classProp={name:"\u0275\u0275classProp",moduleName:xe};static elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:xe};static elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:xe};static elementContainer={name:"\u0275\u0275elementContainer",moduleName:xe};static styleMap={name:"\u0275\u0275styleMap",moduleName:xe};static classMap={name:"\u0275\u0275classMap",moduleName:xe};static styleProp={name:"\u0275\u0275styleProp",moduleName:xe};static interpolate={name:"\u0275\u0275interpolate",moduleName:xe};static interpolate1={name:"\u0275\u0275interpolate1",moduleName:xe};static interpolate2={name:"\u0275\u0275interpolate2",moduleName:xe};static interpolate3={name:"\u0275\u0275interpolate3",moduleName:xe};static interpolate4={name:"\u0275\u0275interpolate4",moduleName:xe};static interpolate5={name:"\u0275\u0275interpolate5",moduleName:xe};static interpolate6={name:"\u0275\u0275interpolate6",moduleName:xe};static interpolate7={name:"\u0275\u0275interpolate7",moduleName:xe};static interpolate8={name:"\u0275\u0275interpolate8",moduleName:xe};static interpolateV={name:"\u0275\u0275interpolateV",moduleName:xe};static nextContext={name:"\u0275\u0275nextContext",moduleName:xe};static resetView={name:"\u0275\u0275resetView",moduleName:xe};static templateCreate={name:"\u0275\u0275template",moduleName:xe};static defer={name:"\u0275\u0275defer",moduleName:xe};static deferWhen={name:"\u0275\u0275deferWhen",moduleName:xe};static deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:xe};static deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:xe};static deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:xe};static deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:xe};static deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:xe};static deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:xe};static deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:xe};static deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:xe};static deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:xe};static deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:xe};static deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:xe};static deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:xe};static deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:xe};static deferHydrateWhen={name:"\u0275\u0275deferHydrateWhen",moduleName:xe};static deferHydrateNever={name:"\u0275\u0275deferHydrateNever",moduleName:xe};static deferHydrateOnIdle={name:"\u0275\u0275deferHydrateOnIdle",moduleName:xe};static deferHydrateOnImmediate={name:"\u0275\u0275deferHydrateOnImmediate",moduleName:xe};static deferHydrateOnTimer={name:"\u0275\u0275deferHydrateOnTimer",moduleName:xe};static deferHydrateOnHover={name:"\u0275\u0275deferHydrateOnHover",moduleName:xe};static deferHydrateOnInteraction={name:"\u0275\u0275deferHydrateOnInteraction",moduleName:xe};static deferHydrateOnViewport={name:"\u0275\u0275deferHydrateOnViewport",moduleName:xe};static deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:xe};static conditionalCreate={name:"\u0275\u0275conditionalCreate",moduleName:xe};static conditionalBranchCreate={name:"\u0275\u0275conditionalBranchCreate",moduleName:xe};static conditional={name:"\u0275\u0275conditional",moduleName:xe};static repeater={name:"\u0275\u0275repeater",moduleName:xe};static repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:xe};static repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:xe};static repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:xe};static componentInstance={name:"\u0275\u0275componentInstance",moduleName:xe};static text={name:"\u0275\u0275text",moduleName:xe};static enableBindings={name:"\u0275\u0275enableBindings",moduleName:xe};static disableBindings={name:"\u0275\u0275disableBindings",moduleName:xe};static getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:xe};static textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:xe};static textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:xe};static textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:xe};static textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:xe};static textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:xe};static textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:xe};static textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:xe};static textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:xe};static textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:xe};static textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:xe};static restoreView={name:"\u0275\u0275restoreView",moduleName:xe};static pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:xe};static pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:xe};static pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:xe};static pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:xe};static pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:xe};static pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:xe};static pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:xe};static pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:xe};static pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:xe};static pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:xe};static pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:xe};static pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:xe};static pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:xe};static pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:xe};static pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:xe};static domProperty={name:"\u0275\u0275domProperty",moduleName:xe};static ariaProperty={name:"\u0275\u0275ariaProperty",moduleName:xe};static property={name:"\u0275\u0275property",moduleName:xe};static control={name:"\u0275\u0275control",moduleName:xe};static controlCreate={name:"\u0275\u0275controlCreate",moduleName:xe};static animationEnterListener={name:"\u0275\u0275animateEnterListener",moduleName:xe};static animationLeaveListener={name:"\u0275\u0275animateLeaveListener",moduleName:xe};static animationEnter={name:"\u0275\u0275animateEnter",moduleName:xe};static animationLeave={name:"\u0275\u0275animateLeave",moduleName:xe};static i18n={name:"\u0275\u0275i18n",moduleName:xe};static i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:xe};static i18nExp={name:"\u0275\u0275i18nExp",moduleName:xe};static i18nStart={name:"\u0275\u0275i18nStart",moduleName:xe};static i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:xe};static i18nApply={name:"\u0275\u0275i18nApply",moduleName:xe};static i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:xe};static pipe={name:"\u0275\u0275pipe",moduleName:xe};static projection={name:"\u0275\u0275projection",moduleName:xe};static projectionDef={name:"\u0275\u0275projectionDef",moduleName:xe};static reference={name:"\u0275\u0275reference",moduleName:xe};static inject={name:"\u0275\u0275inject",moduleName:xe};static injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:xe};static directiveInject={name:"\u0275\u0275directiveInject",moduleName:xe};static invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:xe};static invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:xe};static templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:xe};static forwardRef={name:"forwardRef",moduleName:xe};static resolveForwardRef={name:"resolveForwardRef",moduleName:xe};static replaceMetadata={name:"\u0275\u0275replaceMetadata",moduleName:xe};static getReplaceMetadataURL={name:"\u0275\u0275getReplaceMetadataURL",moduleName:xe};static \u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:xe};static declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:xe};static InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:xe};static resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:xe};static resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:xe};static resolveBody={name:"\u0275\u0275resolveBody",moduleName:xe};static getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:xe};static defineComponent={name:"\u0275\u0275defineComponent",moduleName:xe};static declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:xe};static setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:xe};static ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:xe};static ViewEncapsulation={name:"ViewEncapsulation",moduleName:xe};static ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:xe};static FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:xe};static declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:xe};static FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:xe};static defineDirective={name:"\u0275\u0275defineDirective",moduleName:xe};static declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:xe};static DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:xe};static InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:xe};static InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:xe};static defineInjector={name:"\u0275\u0275defineInjector",moduleName:xe};static declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:xe};static NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:xe};static ModuleWithProviders={name:"ModuleWithProviders",moduleName:xe};static defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:xe};static declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:xe};static setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:xe};static registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:xe};static PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:xe};static definePipe={name:"\u0275\u0275definePipe",moduleName:xe};static declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:xe};static declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:xe};static declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:xe};static setClassMetadata={name:"\u0275setClassMetadata",moduleName:xe};static setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:xe};static setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:xe};static queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:xe};static viewQuery={name:"\u0275\u0275viewQuery",moduleName:xe};static loadQuery={name:"\u0275\u0275loadQuery",moduleName:xe};static contentQuery={name:"\u0275\u0275contentQuery",moduleName:xe};static viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:xe};static contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:xe};static queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:xe};static twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:xe};static twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:xe};static twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:xe};static declareLet={name:"\u0275\u0275declareLet",moduleName:xe};static storeLet={name:"\u0275\u0275storeLet",moduleName:xe};static readContextLet={name:"\u0275\u0275readContextLet",moduleName:xe};static arrowFunction={name:"\u0275\u0275arrowFunction",moduleName:xe};static attachSourceLocations={name:"\u0275\u0275attachSourceLocations",moduleName:xe};static NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:xe};static ControlFeature={name:"\u0275\u0275ControlFeature",moduleName:xe};static InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:xe};static ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:xe};static HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:xe};static ExternalStylesFeature={name:"\u0275\u0275ExternalStylesFeature",moduleName:xe};static listener={name:"\u0275\u0275listener",moduleName:xe};static getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:xe};static sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:xe};static sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:xe};static validateAttribute={name:"\u0275\u0275validateAttribute",moduleName:xe};static sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:xe};static sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:xe};static sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:xe};static sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:xe};static trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:xe};static trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:xe};static inputDecorator={name:"Input",moduleName:xe};static outputDecorator={name:"Output",moduleName:xe};static viewChildDecorator={name:"ViewChild",moduleName:xe};static viewChildrenDecorator={name:"ViewChildren",moduleName:xe};static contentChildDecorator={name:"ContentChild",moduleName:xe};static contentChildrenDecorator={name:"ContentChildren",moduleName:xe};static InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:xe};static UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:xe};static unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:xe};static assertType={name:"\u0275assertType",moduleName:xe}}return n})(),hH=/-+([a-z0-9])/g;function fH(n){return n.replace(hH,(...o)=>o[1].toUpperCase())}function gH(n,o){return uF(n,":",o)}function _H(n,o){return uF(n,".",o)}function uF(n,o,e){let t=n.indexOf(o);return t==-1?e:[n.slice(0,t).trim(),n.slice(t+1).trim()]}function vH(n){let o=[];for(let e=0;e=55296&&t<=56319&&n.length>e+1){let i=n.charCodeAt(e+1);i>=56320&&i<=57343&&(e++,t=(t-55296<<10)+i-56320+65536)}t<=127?o.push(t):t<=2047?o.push(t>>6&31|192,t&63|128):t<=65535?o.push(t>>12|224,t>>6&63|128,t&63|128):t<=2097151&&o.push(t>>18&7|240,t>>12&63|128,t>>6&63|128,t&63|128)}return o}function hF(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(hF).join(", ")}]`;if(n==null)return""+n;let o=n.overriddenName||n.name;if(o)return`${o}`;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 sT=class{full;major;minor;patch;constructor(o){this.full=o;let e=o.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},a_=globalThis,CH=/^([1-9]|1[0-8])\./;function fF(n){return n.startsWith("0.")?!0:!CH.test(n)}var xH=3,bH="# sourceMappingURL=data:application/json;base64,",lT=class{file;sourcesContent=new Map;lines=[];lastCol0=0;hasMappings=!1;constructor(o=null){this.file=o}addSource(o,e=null){return this.sourcesContent.has(o)||this.sourcesContent.set(o,e),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(o,e,t,i){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(o==null)throw new Error("The column in the generated code must be provided");if(o{o.set(u,h),e.push(u),t.push(this.sourcesContent.get(u)||null)});let i="",r=0,a=0,c=0,p=0;return this.lines.forEach(u=>{r=0,i+=u.map(h=>{let g=jC(h.col0-r);return r=h.col0,h.sourceUrl!=null&&(g+=jC(o.get(h.sourceUrl)-a),a=o.get(h.sourceUrl),g+=jC(h.sourceLine0-c),c=h.sourceLine0,g+=jC(h.sourceCol0-p),p=h.sourceCol0),g}).join(","),i+=";"}),i=i.slice(0,-1),{file:this.file||"",version:xH,sourceRoot:"",sources:e,sourcesContent:t,mappings:i}}toJsComment(){return this.hasMappings?"//"+bH+yH(JSON.stringify(this,null,0)):""}};function yH(n){let o="",e=vH(n);for(let t=0;t>2),o+=t_((i&3)<<4|(r===null?0:r>>4)),o+=r===null?"=":t_((r&15)<<2|(a===null?0:a>>6)),o+=r===null||a===null?"=":t_(a&63)}return o}function jC(n){n=n<0?(-n<<1)+1:n<<1;let o="";do{let e=n&31;n=n>>5,n>0&&(e=e|32),o+=t_(e)}while(n>0);return o}var SH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function t_(n){if(n<0||n>=64)throw new Error("Can only encode value in the range [0, 63]");return SH[n]}var wH=/'|\\|\n|\r|\$/g,MH=/^[$A-Z_][0-9A-Z_$]*$/i,cT=" ",g1=class{indent;partsLength=0;parts=[];srcSpans=[];constructor(o){this.indent=o}},kH=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,"??="]]),dT=class n{_indent;static createRoot(){return new n(0)}_lines;constructor(o){this._indent=o,this._lines=[new g1(o)]}get _currentLine(){return this._lines[this._lines.length-1]}println(o,e=""){this.print(o||null,e,!0)}lineIsEmpty(){return this._currentLine.parts.length===0}lineLength(){return this._currentLine.indent*cT.length+this._currentLine.partsLength}print(o,e,t=!1){e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(o&&o.sourceSpan||null)),t&&this._lines.push(new g1(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(o=>o.parts.length>0?k5(o.indent)+o.parts.join(""):"").join(` `)}toSourceMapGenerator(o,e=0){let t=new lT(o),i=!1,r=()=>{i||(t.addSource(o," ").addMapping(0,o,0,0),i=!0)};for(let a=0;a{t.addLine();let p=a.srcSpans,u=a.parts,h=a.indent*cT.length,g=0;for(;gi)return t.srcSpans[r];i-=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}},mT=class{_escapeDollarInStrings;lastIfCondition=null;constructor(o){this._escapeDollarInStrings=o}printLeadingComments(o,e){if(o.leadingComments!==void 0)for(let t of o.leadingComments)t instanceof p1?e.print(o,`/*${t.toString()}*/`,t.trailingNewline):t.multiline?e.print(o,`/* ${t.text} */`,t.trailingNewline):t.text.split(` `).forEach(i=>{e.println(o,`// ${i}`)})}visitExpressionStmt(o,e){return this.printLeadingComments(o,e),o.expr.visitExpression(this,e),e.println(o,";"),null}visitReturnStmt(o,e){return this.printLeadingComments(o,e),e.print(o,"return "),o.value.visitExpression(this,e),e.println(o,";"),null}visitIfStmt(o,e){this.printLeadingComments(o,e),e.print(o,"if ("),this.lastIfCondition=o.condition,o.condition.visitExpression(this,e),this.lastIfCondition=null,e.print(o,") {");let t=o.falseCase!=null&&o.falseCase.length>0;return o.trueCase.length<=1&&!t?(e.print(o," "),this.visitAllStatements(o.trueCase,e),e.removeEmptyLastLine(),e.print(o," ")):(e.println(),e.incIndent(),this.visitAllStatements(o.trueCase,e),e.decIndent(),t&&(e.println(o,"} else {"),e.incIndent(),this.visitAllStatements(o.falseCase,e),e.decIndent())),e.println(o,"}"),null}visitInvokeFunctionExpr(o,e){let t=o.fn instanceof su;return t&&e.print(o.fn,"("),o.fn.visitExpression(this,e),t&&e.print(o.fn,")"),e.print(o,"("),this.visitAllExpressions(o.args,e,","),e.print(o,")"),null}visitTaggedTemplateLiteralExpr(o,e){return o.tag.visitExpression(this,e),o.template.visitExpression(this,e),null}visitTemplateLiteralExpr(o,e){e.print(o,"`");for(let t=0;t{t instanceof pm?(e.print(o,"..."),t.expression.visitExpression(this,e)):(e.print(o,`${Np(t.key,this._escapeDollarInStrings,t.quoted)}:`),t.value.visitExpression(this,e))},o.entries,e,","),e.print(o,"}"),null}visitCommaExpr(o,e){return e.print(o,"("),this.visitAllExpressions(o.parts,e,","),e.print(o,")"),null}visitParenthesizedExpr(o,e){o.expr.visitExpression(this,e)}visitSpreadElementExpr(o,e){e.print(o,"..."),o.expression.visitExpression(this,e)}visitAllExpressions(o,e,t){this.visitAllObjects(i=>i.visitExpression(this,e),o,e,t)}visitAllObjects(o,e,t,i){let r=!1;for(let a=0;a0&&(t.lineLength()>80?(t.print(null,i,!0),r||(t.incIndent(),t.incIndent(),r=!0)):t.print(null,i,!1)),o(e[a]);r&&(t.decIndent(),t.decIndent())}visitAllStatements(o,e){o.forEach(t=>t.visitStatement(this,e))}};function Np(n,o,e=!0){if(n==null)return null;let t=n.replace(wH,(...r)=>r[0]=="$"?o?"\\$":"$":r[0]==` `?"\\n":r[0]=="\r"?"\\r":`\\${r[0]}`);return e||!MH.test(t)?`'${t}'`:t}function k5(n){let o="";for(let e=0;et.value));return o?Rs([],e):e}function FE(n,o){return{expression:n,forwardRef:o}}function PH({expression:n,forwardRef:o}){switch(o){case 0:case 1:return n;case 2:return IH(n)}}function IH(n){return jt(fe.forwardRef).callFn([Rs([],n)])}var _1=(function(n){return n[n.Class=0]="Class",n[n.Function=1]="Function",n})(_1||{});function Ip(n){let o=Jn("__ngFactoryType__"),e=null,t=E5(n)?o:new vi(st.Or,o,n.type.value),i=null;n.deps!==null?n.deps!=="invalid"&&(i=new __(t,T5(n.deps,n.target))):(e=Jn(`\u0275${n.name}_BaseFactory`),i=e.callFn([t]));let r=[],a=null;function c(u){let h=Jn("__ngConditionalFactory__");r.push(new Hr(h.name,Dh,Wl));let g=i!==null?h.set(i).toStmt():jt(fe.invalidFactory).callFn([]).toStmt();return r.push(px(o,[g],[h.set(u).toStmt()])),h}if(E5(n)){let u=T5(n.delegateDeps,n.target),h=new(n.delegateType===_1.Class?__:cs)(n.delegate,u);a=c(h)}else RH(n)?a=c(n.expression):a=i;if(a===null)r.push(jt(fe.invalidFactory).callFn([]).toStmt());else if(e!==null){let u=jt(fe.getInheritedFactory).callFn([n.type.value]),h=new vi(st.Or,e,e.set(u));r.push(new kr(h.callFn([t])))}else r.push(new kr(a));let p=um([new Mr(o.name,ls)],r,Wl,void 0,`${n.name}_Factory`);return e!==null&&(p=Rs([],[new Hr(e.name),new kr(p)]).callFn([],void 0,!0)),{expression:p,statements:[],type:AH(n)}}function AH(n){let o=n.deps!==null&&n.deps!=="invalid"?NH(n.deps):Ec;return da(jt(fe.FactoryDeclaration,[ux(n.type.type,n.typeArgumentCount),o]))}function T5(n,o){return n.map((e,t)=>OH(e,o,t))}function OH(n,o,e){if(n.token===null)return jt(fe.invalidFactoryDep).callFn([Ee(e)]);if(n.attributeNameType===null){let t=0|(n.self?2:0)|(n.skipSelf?4:0)|(n.host?1:0)|(n.optional?8:0)|(o===xd.Pipe?16:0),i=t!==0||n.optional?Ee(t):null,r=[n.token];i&&r.push(i);let a=LH(o);return jt(a).callFn(r)}else return jt(fe.injectAttribute).callFn([n.token])}function NH(n){let o=!1,e=n.map(t=>{let i=FH(t);return i!==null?(o=!0,i):Ee(null)});return o?da(Xi(e)):Ec}function FH(n){let o=[];return n.attributeNameType!==null&&o.push({key:"attribute",value:n.attributeNameType,quoted:!1}),n.optional&&o.push({key:"optional",value:Ee(!0),quoted:!1}),n.host&&o.push({key:"host",value:Ee(!0),quoted:!1}),n.self&&o.push({key:"self",value:Ee(!0),quoted:!1}),n.skipSelf&&o.push({key:"skipSelf",value:Ee(!0),quoted:!1}),o.length>0?cl(o):null}function E5(n){return n.delegateType!==void 0}function RH(n){return n.expression!==void 0}function LH(n){switch(n){case xd.Component:case xd.Directive:case xd.Pipe:return fe.directiveInject;case xd.NgModule:case xd.Injectable:default:return fe.inject}}var Yp=class{start;end;constructor(o,e){this.start=o,this.end=e}toAbsolute(o){return new As(o+this.start,o+this.end)}},no=class{span;sourceSpan;constructor(o,e){this.span=o,this.sourceSpan=e}toString(){return"AST"}},y_=class extends no{nameSpan;constructor(o,e,t){super(o,e),this.nameSpan=t}},ba=class extends no{visit(o,e=null){return o.visitEmptyExpr?.(this,e)}},Ic=class extends no{visit(o,e=null){return o.visitImplicitReceiver(this,e)}},S_=class extends no{visit(o,e=null){return o.visitThisReceiver?.(this,e)}},Ph=class extends no{expressions;constructor(o,e,t){super(o,e),this.expressions=t}visit(o,e=null){return o.visitChain(this,e)}},v1=class extends no{condition;trueExp;falseExp;constructor(o,e,t,i,r){super(o,e),this.condition=t,this.trueExp=i,this.falseExp=r}visit(o,e=null){return o.visitConditional(this,e)}},Mc=class extends y_{receiver;name;constructor(o,e,t,i,r){super(o,e,t),this.receiver=i,this.name=r}visit(o,e=null){return o.visitPropertyRead(this,e)}},w_=class extends y_{receiver;name;constructor(o,e,t,i,r){super(o,e,t),this.receiver=i,this.name=r}visit(o,e=null){return o.visitSafePropertyRead(this,e)}},Zp=class extends no{receiver;key;constructor(o,e,t,i){super(o,e),this.receiver=t,this.key=i}visit(o,e=null){return o.visitKeyedRead(this,e)}},M_=class extends no{receiver;key;constructor(o,e,t,i){super(o,e),this.receiver=t,this.key=i}visit(o,e=null){return o.visitSafeKeyedRead(this,e)}},t1=(function(n){return n[n.ReferencedByName=0]="ReferencedByName",n[n.ReferencedDirectly=1]="ReferencedDirectly",n})(t1||{}),C1=class extends y_{exp;name;args;type;constructor(o,e,t,i,r,a,c){super(o,e,c),this.exp=t,this.name=i,this.args=r,this.type=a}visit(o,e=null){return o.visitPipe(this,e)}},os=class extends no{value;constructor(o,e,t){super(o,e),this.value=t}visit(o,e=null){return o.visitLiteralPrimitive(this,e)}},k_=class extends no{expressions;constructor(o,e,t){super(o,e),this.expressions=t}visit(o,e=null){return o.visitLiteralArray(this,e)}},x1=class extends no{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitSpreadElement(this,e)}},Jp=class extends no{keys;values;constructor(o,e,t,i){super(o,e),this.keys=t,this.values=i}visit(o,e=null){return o.visitLiteralMap(this,e)}},u0=class extends no{strings;expressions;constructor(o,e,t,i){super(o,e),this.strings=t,this.expressions=i}visit(o,e=null){return o.visitInterpolation(this,e)}},La=class extends no{operation;left;right;constructor(o,e,t,i,r){super(o,e),this.operation=t,this.left=i,this.right=r}visit(o,e=null){return o.visitBinary(this,e)}static isAssignmentOperation(o){return o==="="||o==="+="||o==="-="||o==="*="||o==="/="||o==="%="||o==="**="||o==="&&="||o==="||="||o==="??="}},Sh=class n extends La{operator;expr;left=null;right=null;operation=null;static createMinus(o,e,t){return new n(o,e,"-",t,"-",new os(o,e,0),t)}static createPlus(o,e,t){return new n(o,e,"+",t,"-",t,new os(o,e,0))}constructor(o,e,t,i,r,a,c){super(o,e,r,a,c),this.operator=t,this.expr=i}visit(o,e=null){return o.visitUnary!==void 0?o.visitUnary(this,e):o.visitBinary(this,e)}},T_=class extends no{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitPrefixNot(this,e)}},E_=class extends no{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitTypeofExpression(this,e)}},D_=class extends no{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitVoidExpression(this,e)}},P_=class extends no{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e=null){return o.visitNonNullAssert(this,e)}},Ih=class extends no{receiver;args;argumentSpan;constructor(o,e,t,i,r){super(o,e),this.receiver=t,this.args=i,this.argumentSpan=r}visit(o,e=null){return o.visitCall(this,e)}},b1=class extends no{receiver;args;argumentSpan;constructor(o,e,t,i,r){super(o,e),this.receiver=t,this.args=i,this.argumentSpan=r}visit(o,e=null){return o.visitSafeCall(this,e)}},I_=class extends no{tag;template;constructor(o,e,t,i){super(o,e),this.tag=t,this.template=i}visit(o,e){return o.visitTaggedTemplateLiteral(this,e)}},A_=class extends no{elements;expressions;constructor(o,e,t,i){super(o,e),this.elements=t,this.expressions=i}visit(o,e){return o.visitTemplateLiteral(this,e)}},y1=class extends no{text;constructor(o,e,t){super(o,e),this.text=t}visit(o,e){return o.visitTemplateLiteralElement(this,e)}},O_=class extends no{expression;constructor(o,e,t){super(o,e),this.expression=t}visit(o,e){return o.visitParenthesizedExpression(this,e)}},pT=class{name;span;sourceSpan;constructor(o,e,t){this.name=o,this.span=e,this.sourceSpan=t}},S1=class extends no{parameters;body;constructor(o,e,t,i){super(o,e),this.parameters=t,this.body=i}visit(o,e){return o.visitArrowFunction(this,e)}},w1=class extends no{body;flags;constructor(o,e,t,i){super(o,e),this.body=t,this.flags=i}visit(o,e){return o.visitRegularExpressionLiteral(this,e)}},As=class{start;end;constructor(o,e){this.start=o,this.end=e}},as=class extends no{ast;source;location;errors;constructor(o,e,t,i,r){super(new Yp(0,e===null?0:e.length),new As(i,e===null?i:i+e.length)),this.ast=o,this.source=e,this.location=t,this.errors=r}visit(o,e=null){return o.visitASTWithSource?o.visitASTWithSource(this,e):this.ast.visit(o,e)}toString(){return`${this.source} in ${this.location}`}},N_=class{sourceSpan;key;value;constructor(o,e,t){this.sourceSpan=o,this.key=e,this.value=t}},uT=class{sourceSpan;key;value;constructor(o,e,t){this.sourceSpan=o,this.key=e,this.value=t}},Ah=class{visit(o,e){o.visit(this,e)}visitUnary(o,e){this.visit(o.expr,e)}visitBinary(o,e){this.visit(o.left,e),this.visit(o.right,e)}visitChain(o,e){this.visitAll(o.expressions,e)}visitConditional(o,e){this.visit(o.condition,e),this.visit(o.trueExp,e),this.visit(o.falseExp,e)}visitPipe(o,e){this.visit(o.exp,e),this.visitAll(o.args,e)}visitImplicitReceiver(o,e){}visitThisReceiver(o,e){}visitInterpolation(o,e){this.visitAll(o.expressions,e)}visitKeyedRead(o,e){this.visit(o.receiver,e),this.visit(o.key,e)}visitLiteralArray(o,e){this.visitAll(o.expressions,e)}visitLiteralMap(o,e){this.visitAll(o.values,e)}visitLiteralPrimitive(o,e){}visitPrefixNot(o,e){this.visit(o.expression,e)}visitTypeofExpression(o,e){this.visit(o.expression,e)}visitVoidExpression(o,e){this.visit(o.expression,e)}visitNonNullAssert(o,e){this.visit(o.expression,e)}visitPropertyRead(o,e){this.visit(o.receiver,e)}visitSafePropertyRead(o,e){this.visit(o.receiver,e)}visitSafeKeyedRead(o,e){this.visit(o.receiver,e),this.visit(o.key,e)}visitCall(o,e){this.visit(o.receiver,e),this.visitAll(o.args,e)}visitSafeCall(o,e){this.visit(o.receiver,e),this.visitAll(o.args,e)}visitTemplateLiteral(o,e){for(let t=0;tt!==null);Nk(o,e)}visitTriggers(o,e,t){Nk(t,o.map(i=>e[i]))}},P1=class extends ds{expression;groups;unknownBlocks;exhaustiveCheck;constructor(o,e,t,i,r,a,c,p){super(p,r,a,c),this.expression=o,this.groups=e,this.unknownBlocks=t,this.exhaustiveCheck=i}visit(o){return o.visitSwitchBlock(this)}},ST=class extends ds{expression;constructor(o,e,t,i,r){super(r,e,t,i),this.expression=o}visit(o){return o.visitSwitchBlockCase(this)}},B_=class extends ds{cases;children;i18n;constructor(o,e,t,i,r,a,c){super(a,t,i,r),this.cases=o,this.children=e,this.i18n=c}visit(o){return o.visitSwitchBlockCaseGroup(this)}},wT=class extends ds{constructor(o,e,t,i){super(i,o,e,t)}visit(o){return o.visitSwitchExhaustiveCheck(this)}},Fh=class extends ds{item;expression;trackBy;trackKeywordSpan;contextVariables;children;empty;mainBlockSpan;i18n;constructor(o,e,t,i,r,a,c,p,u,h,g,y,b){super(y,p,h,g),this.item=o,this.expression=e,this.trackBy=t,this.trackKeywordSpan=i,this.contextVariables=r,this.children=a,this.empty=c,this.mainBlockSpan=u,this.i18n=b}visit(o){return o.visitForLoopBlock(this)}},z_=class extends ds{children;i18n;constructor(o,e,t,i,r,a){super(r,e,t,i),this.children=o,this.i18n=a}visit(o){return o.visitForLoopBlockEmpty(this)}},I1=class extends ds{branches;constructor(o,e,t,i,r){super(r,e,t,i),this.branches=o}visit(o){return o.visitIfBlock(this)}},Bp=class extends ds{expression;children;expressionAlias;i18n;constructor(o,e,t,i,r,a,c,p){super(c,i,r,a),this.expression=o,this.children=e,this.expressionAlias=t,this.i18n=p}visit(o){return o.visitIfBlockBranch(this)}},A1=class{name;sourceSpan;nameSpan;constructor(o,e,t){this.name=o,this.sourceSpan=e,this.nameSpan=t}visit(o){return o.visitUnknownBlock(this)}},RE=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.nameSpan=i,this.valueSpan=r}visit(o){return o.visitLetDeclaration(this)}},s_=class{componentName;tagName;fullName;attributes;inputs;outputs;directives;children;references;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(o,e,t,i,r,a,c,p,u,h,g,y,b,x){this.componentName=o,this.tagName=e,this.fullName=t,this.attributes=i,this.inputs=r,this.outputs=a,this.directives=c,this.children=p,this.references=u,this.isSelfClosing=h,this.sourceSpan=g,this.startSourceSpan=y,this.endSourceSpan=b,this.i18n=x}visit(o){return o.visitComponent(this)}},gF=class{name;attributes;inputs;outputs;references;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(o,e,t,i,r,a,c,p,u){this.name=o,this.attributes=e,this.inputs=t,this.outputs=i,this.references=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=p,this.i18n=u}visit(o){return o.visitDirective(this)}},Os=class{tagName;attributes;inputs;outputs;directives;templateAttrs;children;references;variables;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(o,e,t,i,r,a,c,p,u,h,g,y,b,x){this.tagName=o,this.attributes=e,this.inputs=t,this.outputs=i,this.directives=r,this.templateAttrs=a,this.children=c,this.references=p,this.variables=u,this.isSelfClosing=h,this.sourceSpan=g,this.startSourceSpan=y,this.endSourceSpan=b,this.i18n=x}visit(o){return o.visitTemplate(this)}},Rh=class{selector;attributes;children;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;name="ng-content";constructor(o,e,t,i,r,a,c,p){this.selector=o,this.attributes=e,this.children=t,this.isSelfClosing=i,this.sourceSpan=r,this.startSourceSpan=a,this.endSourceSpan=c,this.i18n=p}visit(o){return o.visitContent(this)}},hm=class{name;value;sourceSpan;keySpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.keySpan=i,this.valueSpan=r}visit(o){return o.visitVariable(this)}},j_=class{name;value;sourceSpan;keySpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.keySpan=i,this.valueSpan=r}visit(o){return o.visitReference(this)}},_F=class{vars;placeholders;sourceSpan;i18n;constructor(o,e,t,i){this.vars=o,this.placeholders=e,this.sourceSpan=t,this.i18n=i}visit(o){return o.visitIcu(this)}},$_=class{tagNames;bindings;listeners;sourceSpan;constructor(o,e,t,i){if(this.tagNames=o,this.bindings=e,this.listeners=t,this.sourceSpan=i,o.length===0)throw new Error("HostElement must have at least one tag name.")}visit(){throw new Error("HostElement cannot be visited")}};function Nk(n,o){let e=[];if(n.visit)for(let t of o)n.visit(t);else for(let t of o){let i=t.visit(n);i&&e.push(i)}return e}var Ha=class{nodes;placeholders;placeholderToMessage;meaning;description;customId;sources;id;legacyIds=[];messageString;constructor(o,e,t,i,r,a){this.nodes=o,this.placeholders=e,this.placeholderToMessage=t,this.meaning=i,this.description=r,this.customId=a,this.id=this.customId,this.messageString=BH(this.nodes),o.length?this.sources=[{filePath:o[0].sourceSpan.start.file.url,startLine:o[0].sourceSpan.start.line+1,startCol:o[0].sourceSpan.start.col+1,endLine:o[o.length-1].sourceSpan.end.line+1,endCol:o[0].sourceSpan.start.col+1}]:this.sources=[]}},Wg=class{value;sourceSpan;constructor(o,e){this.value=o,this.sourceSpan=e}visit(o,e){return o.visitText(this,e)}},Sd=class{children;sourceSpan;constructor(o,e){this.children=o,this.sourceSpan=e}visit(o,e){return o.visitContainer(this,e)}},O1=class{expression;type;cases;sourceSpan;expressionPlaceholder;constructor(o,e,t,i,r){this.expression=o,this.type=e,this.cases=t,this.sourceSpan=i,this.expressionPlaceholder=r}visit(o,e){return o.visitIcu(this,e)}},fm=class{tag;attrs;startName;closeName;children;isVoid;sourceSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,a,c,p,u){this.tag=o,this.attrs=e,this.startName=t,this.closeName=i,this.children=r,this.isVoid=a,this.sourceSpan=c,this.startSourceSpan=p,this.endSourceSpan=u}visit(o,e){return o.visitTagPlaceholder(this,e)}},H_=class{value;name;sourceSpan;constructor(o,e,t){this.value=o,this.name=e,this.sourceSpan=t}visit(o,e){return o.visitPlaceholder(this,e)}},Lh=class{value;name;sourceSpan;previousMessage;constructor(o,e,t){this.value=o,this.name=e,this.sourceSpan=t}visit(o,e){return o.visitIcuPlaceholder(this,e)}},gm=class{name;parameters;startName;closeName;children;sourceSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,a,c,p){this.name=o,this.parameters=e,this.startName=t,this.closeName=i,this.children=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=p}visit(o,e){return o.visitBlockPlaceholder(this,e)}};function BH(n){let o=new MT;return n.map(t=>t.visit(o)).join("")}var MT=class{visitText(o){return o.value}visitContainer(o){return o.children.map(e=>e.visit(this)).join("")}visitIcu(o){let e=Object.keys(o.cases).map(t=>`${t} {${o.cases[t].visit(this)}}`);return`{${o.expressionPlaceholder}, ${o.type}, ${e.join(" ")}}`}visitTagPlaceholder(o){let e=o.children.map(t=>t.visit(this)).join("");return`{$${o.startName}}${e}{$${o.closeName}}`}visitPlaceholder(o){return`{$${o.name}}`}visitIcuPlaceholder(o){return`{$${o.name}}`}visitBlockPlaceholder(o){let e=o.children.map(t=>t.visit(this)).join("");return`{$${o.startName}}${e}{$${o.closeName}}`}};var zH=class{visitTag(o){let e=this._serializeAttributes(o.attrs);if(o.children.length==0)return`<${o.name}${e}/>`;let t=o.children.map(i=>i.visit(this));return`<${o.name}${e}>${t.join("")}`}visitText(o){return o.value}visitDeclaration(o){return``}_serializeAttributes(o){let e=Object.keys(o).map(t=>`${t}="${o[t]}"`).join(" ");return e.length>0?" "+e:""}visitDoctype(o){return``}},u6e=new zH;function jH(n){return n.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}var vF="i18n",kT="i18n-",$H="VAR_";function CF(n){return n===vF||n.startsWith(kT)}function HH(n){return n.attrs.some(o=>CF(o.name))}function xF(n){return n.nodes[0]}function LE(n={},o){let e={};return n&&Object.keys(n).length&&Object.keys(n).forEach(t=>e[h0(t,o)]=n[t]),e}function h0(n,o=!0){let e=jH(n);if(!o)return e;let t=e.split("_");if(t.length===1)return n.toLowerCase();let i;/^\d+$/.test(t[t.length-1])&&(i=t.pop());let r=t.shift().toLowerCase();return t.length&&(r+=t.map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join("")),i?`${r}_${i}`:r}var UH=/[-.]/,VE="_t",Ls="ctx",Wh="rf";function bF(n,o){let e=null;return()=>(e||(n(new Hr(VE,void 0,ls)),e=Jn(o)),e)}function vh(n){return Array.isArray(n)?Xi(n.map(vh)):Ee(n,Wl)}function P5(n,o){let e=Object.getOwnPropertyNames(n);return e.length===0?null:cl(e.map(t=>{let i=n[t],r,a,c,p;if(typeof i=="string")r=t,c=t,a=i,p=vh(a);else{c=t,r=i.classPropertyName,a=i.bindingPropertyName;let u=a!==r,h=i.transformFunction!==null,g=e_.None;if(i.isSignal&&(g|=e_.SignalBased),h&&(g|=e_.HasDecoratorInputTransform),o&&(u||h||g!==e_.None)){let y=[Ee(g),vh(a)];(u||h)&&(y.push(vh(r)),h&&y.push(i.transformFunction)),p=Xi(y)}else p=vh(a)}return{key:c,quoted:UH.test(c),value:p}}))}var _m=class{values=[];set(o,e){if(e){let t=this.values.find(i=>i.key===o);t?t.value=e:this.values.push({key:o,value:e,quoted:!1})}}toLiteralMap(){return cl(this.values)}};function WH(n){let o=n instanceof Ac?n.name:"ng-template",e=GH(n),t=new Mh,i=Sa(o)[1];return t.setElement(i),Object.getOwnPropertyNames(e).forEach(r=>{let a=Sa(r)[1],c=e[r];t.addAttribute(a,c),r.toLowerCase()==="class"&&c.trim().split(/\s+/).forEach(u=>t.addClassName(u))}),t}function GH(n){let o={};return n instanceof Os&&n.tagName!=="ng-template"?n.templateAttrs.forEach(e=>o[e.name]=""):(n.attributes.forEach(e=>{CF(e.name)||(o[e.name]=e.value)}),n.inputs.forEach(e=>{(e.type===Di.Property||e.type===Di.TwoWay)&&(o[e.name]="")}),n.outputs.forEach(e=>{o[e.name]=""})),o}function I5(n,o){let e=null,t={name:n.name,type:n.type,typeArgumentCount:n.typeArgumentCount,deps:[],target:xd.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=Ip(Ye(Z({},t),{delegate:n.useClass.expression,delegateDeps:p,delegateType:_1.Class})):c?e=Ip(t):e={statements:[],expression:A5(n.type.value,n.useClass.expression,o)}}else n.useFactory!==void 0?n.deps!==void 0?e=Ip(Ye(Z({},t),{delegate:n.useFactory,delegateDeps:n.deps||[],delegateType:_1.Function})):e={statements:[],expression:Rs([],n.useFactory.callFn([]))}:n.useValue!==void 0?e=Ip(Ye(Z({},t),{expression:n.useValue.expression})):n.useExisting!==void 0?e=Ip(Ye(Z({},t),{expression:jt(fe.inject).callFn([n.useExisting.expression])})):e={statements:[],expression:A5(n.type.value,n.type.value,o)};let i=n.type.value,r=new _m;return r.set("token",i),r.set("factory",e.expression),n.providedIn.expression.value!==null&&r.set("providedIn",PH(n.providedIn)),{expression:jt(fe.\u0275\u0275defineInjectable).callFn([r.toLiteralMap()],void 0,!0),type:qH(n),statements:e.statements}}function qH(n){return new ll(jt(fe.InjectableDeclaration,[ux(n.type.type,n.typeArgumentCount)]))}function A5(n,o,e){if(n.node===o.node)return o.prop("\u0275fac");if(!e)return O5(o);let t=jt(fe.resolveForwardRef).callFn([o]);return O5(t)}function O5(n){let o=new Mr("__ngFactoryType__",ls);return Rs([o],n.prop("\u0275fac").callFn([Jn(o.name)]))}var Yr=0,QH=8,BE=9,zp=10,yF=11,SF=12,zE=13,wF=32,TT=33,U_=34,MF=35,fx=36,XH=37,N1=38,W_=39,ja=40,Sr=41,N5=42,kF=43,ya=44,F1=45,Dp=46,tl=47,Sc=58,rs=59,wh=60,Xr=61,Ps=62,F5=63,jE=48,KH=55,TF=57,Sm=65,YH=69,ZH=70,JH=88,Gh=90,kc=91,jp=92,bd=93,eU=94,wm=95,tu=97,tU=98,nU=101,$E=102,EF=110,DF=114,PF=116,IF=117,AF=118,OF=120,f0=122,ol=123,R5=124,Ba=125,NF=160,ch=64,ET=96;function G_(n){return n>=BE&&n<=wF||n==NF}function nl(n){return jE<=n&&n<=TF}function vm(n){return n>=tu&&n<=f0||n>=Sm&&n<=Gh}function iU(n){return n>=tu&&n<=$E||n>=Sm&&n<=ZH||nl(n)}function R1(n){return n===zp||n===zE}function L5(n){return jE<=n&&n<=KH}function l_(n){return n===W_||n===U_||n===ET}var q_=class n{file;offset;line;col;constructor(o,e,t,i){this.file=o,this.offset=e,this.line=t,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(o){let e=this.file.content,t=e.length,i=this.offset,r=this.line,a=this.col;for(;i>0&&o<0;)if(i--,o++,e.charCodeAt(i)==zp){r--;let p=e.substring(0,i-1).lastIndexOf(String.fromCharCode(zp));a=p>0?i-p:i}else a--;for(;i0;){let c=e.charCodeAt(i);i++,o--,c==zp?(r++,a=0):a++}return new n(this.file,i,r,a)}getContext(o,e){let t=this.file.content,i=this.offset;if(i!=null){i>t.length-1&&(i=t.length-1);let r=i,a=0,c=0;for(;a0&&(i--,a++,!(t[i]==` `&&++c==e)););for(a=0,c=0;a]${o.after}")`:this.msg}toString(){let o=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${o}`}};function oU(n,o,e){let t=`in ${n} ${o} in ${e}`,i=new L1("",t);return new gn(new q_(i,-1,-1,-1),new q_(i,-1,-1,-1))}var rU=0;function aU(n){if(!n||!n.reference)return null;let o=n.reference;if(o.__anonymousType)return o.__anonymousType;if(o.__forward_ref__)return"__forward_ref__";let e=hF(o);return e.indexOf("(")>=0?(e=`anonymous_${rU++}`,o.__anonymousType=e):e=Ap(e),e}function Ap(n){return n.replace(/\W/g,"_")}var V5='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})',DT=class extends mT{constructor(){super(!1)}visitWrappedNodeExpr(o,e){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(o,e){return e.print(o,`var ${o.name}`),o.value&&(e.print(o," = "),o.value.visitExpression(this,e)),e.println(o,";"),null}visitTaggedTemplateLiteralExpr(o,e){let t=o.template.elements;return o.tag.visitExpression(this,e),e.print(o,`(${V5}(`),e.print(o,`[${t.map(i=>Np(i.text,!1)).join(", ")}], `),e.print(o,`[${t.map(i=>Np(i.rawText,!1)).join(", ")}])`),o.template.expressions.forEach(i=>{e.print(o,", "),i.visitExpression(this,e)}),e.print(o,")"),null}visitTemplateLiteralExpr(o,e){e.print(o,"`");for(let t=0;t"),Array.isArray(o.body))e.println(o,"{"),e.incIndent(),this.visitAllStatements(o.body,e),e.decIndent(),e.print(o,"}");else{let t=o.body instanceof Ql;t&&e.print(o,"("),o.body.visitExpression(this,e),t&&e.print(o,")")}return null}visitDeclareFunctionStmt(o,e){return e.print(o,`function ${o.name}(`),this._visitParams(o.params,e),e.println(o,") {"),e.incIndent(),this.visitAllStatements(o.statements,e),e.decIndent(),e.println(o,"}"),null}visitLocalizedString(o,e){e.print(o,`$localize(${V5}(`);let t=[o.serializeI18nHead()];for(let i=1;iNp(i.cooked,!1)).join(", ")}], `),e.print(o,`[${t.map(i=>Np(i.raw,!1)).join(", ")}])`),o.expressions.forEach(i=>{e.print(o,", "),i.visitExpression(this,e)}),e.print(o,")"),null}_visitParams(o,e){this.visitAllObjects(t=>e.print(null,t.name),o,e,",")}},$C;function sU(){if($C===void 0){let n=a_.trustedTypes;if($C=null,n)try{$C=n.createPolicy("angular#unsafe-jit",{createScript:o=>o})}catch{}}return $C}function lU(n){return sU()?.createScript(n)||n}function B5(...n){if(!a_.trustedTypes)return new Function(...n);let o=n.slice(0,-1).join(","),e=n[n.length-1],t=`(function anonymous(${o} ) { ${e} })`,i=a_.eval(lU(t));return i.bind===void 0?new Function(...n):(i.toString=()=>t,i.bind(a_))}var PT=class{evaluateStatements(o,e,t,i){let r=new IT(t),a=dT.createRoot();return e.length>0&&!cU(e[0])&&(e=[Ee("use strict").toStmt(),...e]),r.visitAllStatements(e,a),r.createReturnStmt(a),this.evaluateCode(o,a,r.getArgs(),i)}evaluateCode(o,e,t,i){let r=`"use strict";${e.toSource()} //# sourceURL=${o}`,a=[],c=[];for(let u in t)c.push(t[u]),a.push(u);if(i){let u=B5(...a.concat("return null;")).toString(),h=u.slice(0,u.indexOf("return null;")).split(` `).length-1;r+=` ${e.toSourceMapGenerator(o,h).toJsComment()}`}let p=B5(...a.concat(r));return this.executeFunction(p,c)}executeFunction(o,e){return o(...e)}},IT=class extends DT{refResolver;_evalArgNames=[];_evalArgValues=[];_evalExportedVars=[];constructor(o){super(),this.refResolver=o}createReturnStmt(o){new kr(new Ql(this._evalExportedVars.map(t=>new Eh(t,Jn(t),!1)))).visitStatement(this,o)}getArgs(){let o={};for(let e=0;e0&&o.set("imports",Xi(n.imports));let e=jt(fe.defineInjector).callFn([o.toLiteralMap()],void 0,!0),t=dU(n);return{expression:e,type:t,statements:[]}}function dU(n){return new ll(jt(fe.InjectorDeclaration,[new ll(n.type.type)]))}var AT=class{context;constructor(o){this.context=o}resolveExternalReference(o){if(o.moduleName!=="@angular/core")throw new Error(`Cannot resolve external reference to ${o.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(o.name))throw new Error(`No value provided for @angular/core symbol '${o.name}'.`);return this.context[o.name]}},V1=(function(n){return n[n.Inline=0]="Inline",n[n.SideEffect=1]="SideEffect",n[n.Omit=2]="Omit",n})(V1||{}),dm=(function(n){return n[n.Global=0]="Global",n[n.Local=1]="Local",n})(dm||{});function mU(n){let o=[],e=new _m;if(e.set("type",n.type.value),n.kind===dm.Global&&n.bootstrap.length>0&&e.set("bootstrap",Fp(n.bootstrap,n.containsForwardDecls)),n.selectorScopeMode===V1.Inline)n.declarations.length>0&&e.set("declarations",Fp(n.declarations,n.containsForwardDecls)),n.imports.length>0&&e.set("imports",Fp(n.imports,n.containsForwardDecls)),n.exports.length>0&&e.set("exports",Fp(n.exports,n.containsForwardDecls));else if(n.selectorScopeMode===V1.SideEffect){let r=hU(n);r!==null&&o.push(r)}n.schemas!==null&&n.schemas.length>0&&e.set("schemas",Xi(n.schemas.map(r=>r.value))),n.id!==null&&(e.set("id",n.id),o.push(jt(fe.registerNgModuleType).callFn([n.type.value,n.id]).toStmt()));let t=jt(fe.defineNgModule).callFn([e.toLiteralMap()],void 0,!0),i=uU(n);return{expression:t,type:i,statements:o}}function pU(n){let o=new _m;return o.set("type",new si(n.type)),n.bootstrap!==void 0&&o.set("bootstrap",new si(n.bootstrap)),n.declarations!==void 0&&o.set("declarations",new si(n.declarations)),n.imports!==void 0&&o.set("imports",new si(n.imports)),n.exports!==void 0&&o.set("exports",new si(n.exports)),n.schemas!==void 0&&o.set("schemas",new si(n.schemas)),n.id!==void 0&&o.set("id",new si(n.id)),jt(fe.defineNgModule).callFn([o.toLiteralMap()])}function uU(n){if(n.kind===dm.Local)return new ll(n.type.value);let{type:o,declarations:e,exports:t,imports:i,includeImportTypes:r,publicDeclarationTypes:a}=n;return new ll(jt(fe.NgModuleDeclaration,[new ll(o.type),a===null?Fk(e):fU(a),r?Fk(i):Ec,Fk(t)]))}function hU(n){let o=new _m;if(n.kind===dm.Global?n.declarations.length>0&&o.set("declarations",Fp(n.declarations,n.containsForwardDecls)):n.declarationsExpression&&o.set("declarations",n.declarationsExpression),n.kind===dm.Global?n.imports.length>0&&o.set("imports",Fp(n.imports,n.containsForwardDecls)):n.importsExpression&&o.set("imports",n.importsExpression),n.kind===dm.Global?n.exports.length>0&&o.set("exports",Fp(n.exports,n.containsForwardDecls)):n.exportsExpression&&o.set("exports",n.exportsExpression),n.kind===dm.Local&&n.bootstrapExpression&&o.set("bootstrap",n.bootstrapExpression),Object.keys(o.values).length===0)return null;let e=new cs(jt(fe.setNgModuleScope),[n.type.value,o.toLiteralMap()]),t=EH(e),i=new mm([],[t.toStmt()]);return new cs(i,[]).toStmt()}function Fk(n){let o=n.map(e=>p0(e.type));return n.length>0?da(Xi(o)):Ec}function fU(n){let o=n.map(e=>p0(e));return n.length>0?da(Xi(o)):Ec}function j5(n){let o=[];o.push({key:"name",value:Ee(n.pipeName??n.name),quoted:!1}),o.push({key:"type",value:n.type.value,quoted:!1}),o.push({key:"pure",value:Ee(n.pure),quoted:!1}),n.isStandalone===!1&&o.push({key:"standalone",value:Ee(!1),quoted:!1});let e=jt(fe.definePipe).callFn([cl(o)],void 0,!0),t=gU(n);return{expression:e,type:t,statements:[]}}function gU(n){return new ll(jt(fe.PipeDeclaration,[ux(n.type.type,n.typeArgumentCount),new ll(new ma(n.pipeName)),new ll(new ma(n.isStandalone))]))}var Vh=(function(n){return n[n.Directive=0]="Directive",n[n.Pipe=1]="Pipe",n[n.NgModule=2]="NgModule",n})(Vh||{}),_U=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"]),vU=["@media","@supports","@document","@layer","@container","@scope","@starting-style"],OT=class{shimCssText(o,e,t=""){let i=[];o=o.replace(NU,c=>{if(c.match(FU))i.push(c);else{let p=c.match(OU);i.push(p?.join("")??"")}return UE}),o=this._insertDirectives(o);let r=this._scopeCssText(o,e,t),a=0;return r.replace(RU,()=>i[a++])}_insertDirectives(o){return o=this._insertPolyfillDirectivesInCssText(o),this._insertPolyfillRulesInCssText(o)}_scopeKeyframesRelatedCss(o,e){let t=new Set,i=HC(o,r=>this._scopeLocalKeyframeDeclarations(r,e,t));return HC(i,r=>this._scopeAnimationRule(r,e,t))}_scopeLocalKeyframeDeclarations(o,e,t){return Ye(Z({},o),{selector:o.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(i,r,a,c,p)=>(t.add(U5(c,a)),`${r}${a}${e}_${c}${a}${p}`))})}_scopeAnimationKeyframe(o,e,t){return o.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(i,r,a,c,p)=>(c=`${t.has(U5(c,a))?e+"_":""}${c}`,`${r}${a}${c}${a}${p}`))}_animationDeclarationKeyframesRe=/(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;_scopeAnimationRule(o,e,t){let i=o.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g,(r,a,c)=>a+c.replace(this._animationDeclarationKeyframesRe,(p,u,h="",g,y)=>g?`${u}${this._scopeAnimationKeyframe(`${h}${g}${h}`,e,t)}`:_U.has(y)?p:`${u}${this._scopeAnimationKeyframe(y,e,t)}`));return i=i.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(r,a,c)=>`${a}${c.split(",").map(p=>this._scopeAnimationKeyframe(p,e,t)).join(",")}`),Ye(Z({},o),{content:i})}_insertPolyfillDirectivesInCssText(o){return o.replace(xU,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(o){return o.replace(bU,(...e)=>{let t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(o,e,t){let i=this._extractUnscopedRulesFromCssText(o);return o=this._insertPolyfillHostInCssText(o),o=this._convertColonHost(o),o=this._convertColonHostContext(o),o=this._convertShadowDOMSelectors(o),e&&(o=this._scopeKeyframesRelatedCss(o,e),o=this._scopeSelectors(o,e,t)),o=o+` `+i,o.trim()}_extractUnscopedRulesFromCssText(o){let e="",t;for($5.lastIndex=0;(t=$5.exec(o))!==null;){let i=t[0].replace(t[2],"").replace(t[1],t[4]);e+=i+` `}return e}_convertColonHost(o){return o.replace(MU,(e,t,i)=>{if(t){let r=[];for(let a of this._splitOnTopLevelCommas(t,!0)){let c=a.trim();if(!c)break;let p=am+c.replace(B1,"")+i;r.push(p)}return r.join(",")}else return am+i})}*_splitOnTopLevelCommas(o,e){let t=o.length,i=0,r=0;for(let a=0;a{let i=[[]],r=e.indexOf(fh);for(;r!==-1;){let a=e.substring(r+fh.length);if(!a||a[0]!=="("){e=a,r=e.indexOf(fh);continue}let c=[],p=0;for(let h of this._splitOnTopLevelCommas(a.substring(1),!0)){p=p+h.length+1;let g=h.trim();g&&c.push(g)}let u=i.length;qU(i,c.length);for(let h=0;hGU(a,e,t)).join(", ")})}_convertShadowDOMSelectors(o){return DU.reduce((e,t)=>e.replace(t," "),o)}_scopeSelectors(o,e,t){return HC(o,i=>{let r=i.selector,a=i.content;return i.selector[0]!=="@"?r=this._scopeSelector({selector:r,scopeSelector:e,hostSelector:t,isParentSelector:!0}):vU.some(c=>i.selector.startsWith(c))?a=this._scopeSelectors(i.content,e,t):(i.selector.startsWith("@font-face")||i.selector.startsWith("@page"))&&(a=this._stripScopingSelectors(i.content)),new Q_(r,a)})}_stripScopingSelectors(o){return HC(o,e=>{let t=e.selector.replace(H5," ").replace(Rk," ");return new Q_(t,e.content)})}_safeSelector;_shouldScopeIndicator;_scopeSelector({selector:o,scopeSelector:e,hostSelector:t,isParentSelector:i=!1}){let r=/ ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;return o.split(r).map(a=>a.split(H5)).map(a=>{let[c,...p]=a;return[(h=>this._selectorNeedsScoping(h,e)?this._applySelectorScope({selector:h,scopeSelector:e,hostSelector:t,isParentSelector:i}):h)(c),...p].join(" ")}).join(", ")}_selectorNeedsScoping(o,e){return!this._makeScopeMatcher(e).test(o)}_makeScopeMatcher(o){let e=/\[/g,t=/\]/g;return o=o.replace(e,"\\[").replace(t,"\\]"),new RegExp("^("+o+")"+PU,"m")}_applySimpleSelectorScope(o,e,t){if(Ch.lastIndex=0,Ch.test(o)){let i=`[${t}]`,r=o;for(;r.match(Rk);)r=r.replace(Rk,(a,c)=>c.replace(/([^:\)]*)(:*)(.*)/,(p,u,h,g)=>u+i+h+g));return r.replace(Ch,i)}return e+" "+o}_applySelectorScope({selector:o,scopeSelector:e,hostSelector:t,isParentSelector:i}){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(am)){if(w=this._applySimpleSelectorScope(M,e,t),!M.match(EU)){let[S,E,O,D]=w.match(/([^:]*)(:*)([\s\S]*)/);w=E+a+O+D}}else{let S=M.replace(Ch,"");if(S.length>0){let E=S.match(/([^:]*)(:*)([\s\S]*)/);E&&(w=E[1]+a+E[2]+E[3])}}return w},p=M=>{let w="",S=[],E;for(;(E=Gg.exec(M))!==null;){let O=1,D=Gg.lastIndex;for(;D{let[D]=O.match(Gg)??[],N=O.slice(D?.length,-1);N.includes(am)&&(this._shouldScopeIndicator=!0);let P=this._scopeSelector({selector:N,scopeSelector:e,hostSelector:t});return`${D}${P})`}).join(""):(this._shouldScopeIndicator=this._shouldScopeIndicator||M.includes(am),w=this._shouldScopeIndicator?c(M):M),w};i&&(this._safeSelector=new NT(o),o=this._safeSelector.content());let u="",h=0,g,y=/( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g,b=o.includes(am);for((i||this._shouldScopeIndicator)&&(this._shouldScopeIndicator=!b);(g=y.exec(o))!==null;){let M=g[1],w=o.slice(h,g.index);if(w.match(/__esc-ph-(\d+)__/)&&o[g.index+1]?.match(/[a-fA-F\d]/))continue;let S=p(w);u+=`${S} ${M} `,h=y.lastIndex}let x=o.substring(h);return u+=p(x),this._safeSelector.restore(u)}_insertPolyfillHostInCssText(o){return o.replace(AU,fh).replace(IU,B1)}},NT=class{placeholders=[];index=0;_content;constructor(o){o=this._escapeRegexMatches(o,/(\[[^\]]*\])/g),o=o.replace(/(\\.)/g,(e,t)=>{let i=`__esc-ph-${this.index}__`;return this.placeholders.push(t),this.index++,i}),this._content=o.replace(wU,(e,t,i)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(`(${i})`),this.index++,t+r})}restore(o){return o.replace(/__(?:ph|esc-ph)-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}_escapeRegexMatches(o,e){return o.replace(e,(t,i)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(i),this.index++,r})}},CU="(:(where|is)\\()?",Gg=/:(where|is)\(/gi,xU=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,bU=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,$5=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,B1="-shadowcsshost",fh="-shadowcsscontext",FT="[^)(]*",yU=String.raw`(?:\(${FT}\)|${FT})+?`,SU=String.raw`(?:\(${yU}\)|${FT})+?`,HE=String.raw`(?:\((${SU})\))`,wU=new RegExp(String.raw`(:nth-[-\w]+)`+HE,"g"),MU=new RegExp(B1+HE+"?([^,{]*)","gim"),kU=fh+HE+"?([^{]*)",TU=new RegExp(`${CU}(${kU})`,"gim"),am=B1+"-no-combinator",EU=new RegExp(`${am}(?![^(]*\\))`,"g"),Rk=/-shadowcsshost-no-combinator([^\s,]*)/,DU=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],H5=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,PU="([>\\s~+[.,{:][\\s\\S]*)?$",Ch=/-shadowcsshost/gim,IU=/:host/gim,AU=/:host-context/gim,OU=/\r?\n/g,NU=/\/\*[\s\S]*?\*\//g,FU=/\/\*\s*#\s*source(Mapping)?URL=/g,UE="%COMMENT%",RU=new RegExp(UE,"g"),Lk="%BLOCK%",LU=new RegExp(`(\\s*(?:${UE}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),VU=new Map([["{","}"]]),FF="%COMMA_IN_PLACEHOLDER%",RF="%SEMI_IN_PLACEHOLDER%",LF="%COLON_IN_PLACEHOLDER%",BU=new RegExp(FF,"g"),zU=new RegExp(RF,"g"),jU=new RegExp(LF,"g"),Q_=class{selector;content;constructor(o,e){this.selector=o,this.content=e}};function HC(n,o){let e=UU(n),t=$U(e,VU,Lk),i=0,r=t.escapedString.replace(LU,(...a)=>{let c=a[2],p="",u=a[4],h="";u&&u.startsWith("{"+Lk)&&(p=t.blocks[i++],u=u.substring(Lk.length+1),h="{");let g=o(new Q_(c,p));return`${a[1]}${g.selector}${a[3]}${h}${g.content}${u}`});return WU(r)}var RT=class{escapedString;blocks;constructor(o,e){this.escapedString=o,this.blocks=e}};function $U(n,o,e){let t=[],i=[],r=0,a=0,c=-1,p,u;for(let h=0;h0;){let a=r.length,c=n.pop();for(let p=0;pi?`${e}${a}${o}`:`${e}${a}${t}${o}, ${e}${a} ${t}${o}`).join(",")}function qU(n,o){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 i of e)this.push(i);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,i=this.head;for(let r of e)i.next=r,r.prev=i,i=r;i.next=t,t.prev=i}*[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 i=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=i,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 i of e)n.insertBefore(i,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 Vs(n){return Z({kind:V.Statement,statement:n},_n)}function lm(n,o,e,t){return Z({kind:V.Variable,xref:n,variable:o,initializer:e,flags:t},_n)}var _n={debugListId:null,prev:null,next:null},VF=Symbol("ConsumesSlot"),WE=Symbol("DependsOnSlotContext"),lu=Symbol("ConsumesVars"),g0=Symbol("UsesVarOffset"),dl={[VF]:!0,numSlotsUsed:1},ms={[WE]:!0},ps={[lu]:!0};function Qh(n){return n[VF]===!0}function K_(n){return n[WE]===!0}function Vk(n){return n[lu]===!0}function W5(n){return n[g0]===!0}function QU(n,o,e){return Z(Z(Z({kind:V.InterpolateText,target:n,interpolation:o,sourceSpan:e},ms),ps),_n)}var tr=class{strings;expressions;i18nPlaceholders;constructor(o,e,t){if(this.strings=o,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 nu(n,o,e,t,i,r,a,c,p,u,h){return Z({kind:V.Binding,bindingKind:o,target:n,name:e,expression:t,unit:i,securityContext:r,isTextAttribute:a,isStructuralTemplateAttribute:c,templateKind:p,i18nContext:null,i18nMessage:u,sourceSpan:h},_n)}function XU(n,o,e,t,i,r,a,c,p,u){return Z(Z(Z({kind:V.Property,target:n,name:o,expression:e,bindingKind:t,securityContext:i,sanitizer:null,isStructuralTemplateAttribute:r,templateKind:a,i18nContext:c,i18nMessage:p,sourceSpan:u},ms),ps),_n)}function KU(n,o,e,t,i,r,a,c,p){return Z(Z(Z({kind:V.TwoWayProperty,target:n,name:o,expression:e,securityContext:t,sanitizer:null,isStructuralTemplateAttribute:i,templateKind:r,i18nContext:a,i18nMessage:c,sourceSpan:p},ms),ps),_n)}function YU(n,o,e,t,i){return Z(Z(Z({kind:V.StyleProp,target:n,name:o,expression:e,unit:t,sourceSpan:i},ms),ps),_n)}function ZU(n,o,e,t){return Z(Z(Z({kind:V.ClassProp,target:n,name:o,expression:e,sourceSpan:t},ms),ps),_n)}function JU(n,o,e){return Z(Z(Z({kind:V.StyleMap,target:n,expression:o,sourceSpan:e},ms),ps),_n)}function eW(n,o,e){return Z(Z(Z({kind:V.ClassMap,target:n,expression:o,sourceSpan:e},ms),ps),_n)}function G5(n,o,e,t,i,r,a,c,p,u){return Z(Z(Z({kind:V.Attribute,target:n,namespace:o,name:e,expression:t,securityContext:i,sanitizer:null,isTextAttribute:r,isStructuralTemplateAttribute:a,templateKind:c,i18nContext:null,i18nMessage:p,sourceSpan:u},ms),ps),_n)}function tW(n,o){return Z({kind:V.Advance,delta:n,sourceSpan:o},_n)}function BF(n,o,e,t){return Z(Z(Z({kind:V.Conditional,target:n,test:o,conditions:e,processed:null,sourceSpan:t,contextValue:null},_n),ms),ps)}function nW(n,o,e,t){return Z(Z({kind:V.Repeater,target:n,targetSlot:o,collection:e,sourceSpan:t},_n),ms)}function q5(n,o,e,t,i,r,a){return Z({kind:V.AnimationBinding,name:n,target:o,animationKind:e,expression:t,i18nMessage:null,securityContext:i,sanitizer:null,sourceSpan:r,animationBindingKind:a},_n)}function iW(n,o,e,t){return Z(Z(Z({kind:V.DeferWhen,target:n,expr:o,modifier:e,sourceSpan:t},_n),ms),ps)}function zF(n,o,e,t,i,r,a,c,p,u,h){return Z(Z(Z({kind:V.I18nExpression,context:n,target:o,i18nOwner:e,handle:t,expression:i,icuPlaceholder:r,i18nPlaceholder:a,resolutionTime:c,usage:p,name:u,sourceSpan:h},_n),ps),ms)}function oW(n,o,e){return Z({kind:V.I18nApply,owner:n,handle:o,sourceSpan:e},_n)}function rW(n,o,e,t){return Z(Z(Z({kind:V.StoreLet,target:n,declaredName:o,value:e,sourceSpan:t},ms),ps),_n)}function aW(n,o){return Z(Z({kind:V.Control,sourceSpan:o,target:n},ms),_n)}function Nc(n){return n instanceof Ki}var Ki=class extends Ui{constructor(o=null){super(null,o)}},Kr=class n extends Ki{name;kind=Zt.LexicalRead;constructor(o){super(),this.name=o}visitExpression(o,e){}isEquivalent(o){return this.name===o.name}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.name)}},z1=class n extends Ki{target;targetSlot;offset;kind=Zt.Reference;constructor(o,e,t){super(),this.target=o,this.targetSlot=e,this.offset=t}visitExpression(){}isEquivalent(o){return o instanceof n&&o.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot,this.offset)}},Y_=class n extends Ki{target;value;sourceSpan;kind=Zt.StoreLet;[lu]=!0;[WE]=!0;constructor(o,e,t){super(),this.target=o,this.value=e,this.sourceSpan=t}visitExpression(){}isEquivalent(o){return o instanceof n&&o.target===this.target&&o.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(o,e){this.value=zt(this.value,o,e)}clone(){return new n(this.target,this.value,this.sourceSpan)}},Z_=class n extends Ki{target;targetSlot;kind=Zt.ContextLetReference;constructor(o,e){super(),this.target=o,this.targetSlot=e}visitExpression(){}isEquivalent(o){return o instanceof n&&o.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot)}},Cm=class n extends Ki{view;kind=Zt.Context;constructor(o){super(),this.view=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},LT=class n extends Ki{view;kind=Zt.TrackContext;constructor(o){super(),this.view=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},j1=class n extends Ki{kind=Zt.NextContext;steps=1;visitExpression(){}isEquivalent(o){return o instanceof n&&o.steps===this.steps}isConstant(){return!1}transformInternalExpressions(){}clone(){let o=new n;return o.steps=this.steps,o}},VT=class n extends Ki{kind=Zt.GetCurrentView;constructor(){super()}visitExpression(){}isEquivalent(o){return o instanceof n}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n}},J_=class n extends Ki{view;kind=Zt.RestoreView;constructor(o){super(),this.view=o}visitExpression(o,e){typeof this.view!="number"&&this.view.visitExpression(o,e)}isEquivalent(o){return!(o instanceof n)||typeof o.view!=typeof this.view?!1:typeof this.view=="number"?this.view===o.view:this.view.isEquivalent(o.view)}isConstant(){return!1}transformInternalExpressions(o,e){typeof this.view!="number"&&(this.view=zt(this.view,o,e))}clone(){return new n(this.view instanceof Ui?this.view.clone():this.view)}},$1=class n extends Ki{expr;kind=Zt.ResetView;constructor(o){super(),this.expr=o}visitExpression(o,e){this.expr.visitExpression(o,e)}isEquivalent(o){return o instanceof n&&this.expr.isEquivalent(o.expr)}isConstant(){return!1}transformInternalExpressions(o,e){this.expr=zt(this.expr,o,e)}clone(){return new n(this.expr.clone())}},H1=class n extends Ki{target;value;kind=Zt.TwoWayBindingSet;constructor(o,e){super(),this.target=o,this.value=e}visitExpression(o,e){this.target.visitExpression(o,e),this.value.visitExpression(o,e)}isEquivalent(o){return this.target.isEquivalent(o.target)&&this.value.isEquivalent(o.value)}isConstant(){return!1}transformInternalExpressions(o,e){this.target=zt(this.target,o,e),this.value=zt(this.value,o,e)}clone(){return new n(this.target,this.value)}},wd=class n extends Ki{xref;kind=Zt.ReadVariable;name=null;constructor(o){super(),this.xref=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.xref===this.xref}isConstant(){return!1}transformInternalExpressions(){}clone(){let o=new n(this.xref);return o.name=this.name,o}},iu=class n extends Ki{kind=Zt.PureFunctionExpr;[lu]=!0;[g0]=!0;varOffset=null;body;args;fn=null;constructor(o,e){super(),this.body=o,this.args=e}visitExpression(o,e){this.body?.visitExpression(o,e);for(let t of this.args)t.visitExpression(o,e)}isEquivalent(o){return!(o instanceof n)||o.args.length!==this.args.length?!1:o.body!==null&&this.body!==null&&o.body.isEquivalent(this.body)&&o.args.every((e,t)=>e.isEquivalent(this.args[t]))}isConstant(){return!1}transformInternalExpressions(o,e){this.body!==null?this.body=zt(this.body,o,e|Qn.InChildOperation):this.fn!==null&&(this.fn=zt(this.fn,o,e));for(let t=0;te.clone()));return o.fn=this.fn?.clone()??null,o.varOffset=this.varOffset,o}},xm=class n extends Ki{index;kind=Zt.PureFunctionParameterExpr;constructor(o){super(),this.index=o}visitExpression(){}isEquivalent(o){return o instanceof n&&o.index===this.index}isConstant(){return!0}transformInternalExpressions(){}clone(){return new n(this.index)}},ou=class n extends Ki{target;targetSlot;name;args;kind=Zt.PipeBinding;[lu]=!0;[g0]=!0;varOffset=null;constructor(o,e,t,i){super(),this.target=o,this.targetSlot=e,this.name=t,this.args=i}visitExpression(o,e){for(let t of this.args)t.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){for(let t=0;te.clone()));return o.varOffset=this.varOffset,o}},e0=class n extends Ki{target;targetSlot;name;args;numArgs;kind=Zt.PipeBindingVariadic;[lu]=!0;[g0]=!0;varOffset=null;constructor(o,e,t,i,r){super(),this.target=o,this.targetSlot=e,this.name=t,this.args=i,this.numArgs=r}visitExpression(o,e){this.args.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.args=zt(this.args,o,e)}clone(){let o=new n(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return o.varOffset=this.varOffset,o}},Bh=class n extends Ki{receiver;name;kind=Zt.SafePropertyRead;constructor(o,e){super(),this.receiver=o,this.name=e}get index(){return this.name}visitExpression(o,e){this.receiver.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.receiver=zt(this.receiver,o,e)}clone(){return new n(this.receiver.clone(),this.name)}},zh=class n extends Ki{receiver;index;kind=Zt.SafeKeyedRead;constructor(o,e,t){super(t),this.receiver=o,this.index=e}visitExpression(o,e){this.receiver.visitExpression(o,e),this.index.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.receiver=zt(this.receiver,o,e),this.index=zt(this.index,o,e)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.sourceSpan)}},ru=class n extends Ki{receiver;args;kind=Zt.SafeInvokeFunction;constructor(o,e){super(),this.receiver=o,this.args=e}visitExpression(o,e){this.receiver.visitExpression(o,e);for(let t of this.args)t.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.receiver=zt(this.receiver,o,e);for(let t=0;to.clone()))}},jh=class n extends Ki{guard;expr;kind=Zt.SafeTernaryExpr;constructor(o,e){super(),this.guard=o,this.expr=e}visitExpression(o,e){this.guard.visitExpression(o,e),this.expr.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.guard=zt(this.guard,o,e),this.expr=zt(this.expr,o,e)}clone(){return new n(this.guard.clone(),this.expr.clone())}},t0=class n extends Ki{kind=Zt.EmptyExpr;visitExpression(o,e){}isEquivalent(o){return o instanceof n}isConstant(){return!0}clone(){return new n}transformInternalExpressions(){}},Fc=class n extends Ki{expr;xref;kind=Zt.AssignTemporaryExpr;name=null;constructor(o,e){super(),this.expr=o,this.xref=e}visitExpression(o,e){this.expr.visitExpression(o,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(o,e){this.expr=zt(this.expr,o,e)}clone(){let o=new n(this.expr.clone(),this.xref);return o.name=this.name,o}},bm=class n extends Ki{xref;kind=Zt.ReadTemporaryExpr;name=null;constructor(o){super(),this.xref=o}visitExpression(o,e){}isEquivalent(){return this.xref===this.xref}isConstant(){return!1}transformInternalExpressions(o,e){}clone(){let o=new n(this.xref);return o.name=this.name,o}},U1=class n extends Ki{slot;kind=Zt.SlotLiteralExpr;constructor(o){super(),this.slot=o}visitExpression(o,e){}isEquivalent(o){return o instanceof n&&o.slot===this.slot}isConstant(){return!0}clone(){return new n(this.slot)}transformInternalExpressions(){}},W1=class n extends Ki{expr;target;targetSlot;alias;kind=Zt.ConditionalCase;constructor(o,e,t,i=null){super(),this.expr=o,this.target=e,this.targetSlot=t,this.alias=i}visitExpression(o,e){this.expr!==null&&this.expr.visitExpression(o,e)}isEquivalent(o){return o instanceof n&&o.expr===this.expr}isConstant(){return!0}clone(){return new n(this.expr,this.target,this.targetSlot)}transformInternalExpressions(o,e){this.expr!==null&&(this.expr=zt(this.expr,o,e))}},n0=class n extends Ki{expr;kind=Zt.ConstCollected;constructor(o){super(),this.expr=o}transformInternalExpressions(o,e){this.expr=o(this.expr,e)}visitExpression(o,e){this.expr.visitExpression(o,e)}isEquivalent(o){return o instanceof n?this.expr.isEquivalent(o.expr):!1}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr)}},BT=class n extends Ki{parameters;body;kind=Zt.ArrowFunction;[lu]=!0;[g0]=!0;contextName=Ls;currentViewName="view";varOffset=null;ops;constructor(o,e){super(),this.parameters=o,this.body=e,this.ops=new Ke,this.ops.push([Vs(new kr(e,e.sourceSpan))])}visitExpression(o,e){for(let t of this.ops)fr(t,i=>{i.visitExpression(o,e)})}isEquivalent(o){return o instanceof n&&o.parameters.length===this.parameters.length&&o.parameters.every((e,t)=>e.isEquivalent(this.parameters[t]))&&o.body.isEquivalent(this.body)}isConstant(){return!1}transformInternalExpressions(o,e){for(let t of this.ops)nr(t,o,e|(Qn.InChildOperation|Qn.InArrowFunctionOperation))}clone(){let o=new n(this.parameters,this.body);return o.varOffset=this.varOffset,o.ops=this.ops,o}};function fr(n,o){nr(n,(e,t)=>(o(e,t),e),Qn.None)}var Qn=(function(n){return n[n.None=0]="None",n[n.InChildOperation=1]="InChildOperation",n[n.InArrowFunctionOperation=2]="InArrowFunctionOperation",n})(Qn||{});function Bk(n,o,e){for(let t=0;tzt(t,o,e));else if(n instanceof su)if(Array.isArray(n.body))for(let t=0;t{!a&&K_(c)&&c.target!==r.xref&&(a=!0)}),a)break;e=e.next}}}}function OW(n){if(!(!n.enableDebugLocations||n.relativeTemplatePath===null))for(let o of n.units){let e=[];for(let t of o.create)if(t.kind===V.ElementStart||t.kind===V.Element){let i=t.startSourceSpan.start;e.push({targetSlot:t.handle,offset:i.offset,line:i.line,column:i.col})}e.length>0&&o.create.push(MW(n.relativeTemplatePath,e))}}function KF(n){let o=new Map;for(let e of n.create)Qh(e)&&(o.set(e.xref,e),e.kind===V.RepeaterCreate&&e.emptyView!==null&&o.set(e.emptyView,e));return o}function NW(n){for(let o of n.units){let e=KF(o);for(let t of o.ops())switch(t.kind){case V.Attribute:FW(o,t,e);break;case V.Property:if(t.bindingKind!==Ht.LegacyAnimation&&t.bindingKind!==Ht.Animation){let i;t.i18nMessage!==null&&t.templateKind===null?i=Ht.I18n:t.isStructuralTemplateAttribute?i=Ht.Template:i=Ht.Property,Ke.insertBefore(al(t.target,i,null,t.name,null,null,null,t.securityContext),gh(e,t.target))}break;case V.TwoWayProperty:Ke.insertBefore(al(t.target,Ht.TwoWayProperty,null,t.name,null,null,null,t.securityContext),gh(e,t.target));break;case V.StyleProp:case V.ClassProp:t.expression instanceof t0&&Ke.insertBefore(al(t.target,Ht.Property,null,t.name,null,null,null,fi.STYLE),gh(e,t.target));break;case V.Listener:if(!t.isLegacyAnimationListener){let i=al(t.target,Ht.Property,null,t.name,null,null,null,fi.NONE);if(n.kind===Ot.Host)break;Ke.insertBefore(i,gh(e,t.target))}break;case V.TwoWayListener:if(n.kind!==Ot.Host){let i=al(t.target,Ht.Property,null,t.name,null,null,null,fi.NONE);Ke.insertBefore(i,gh(e,t.target))}break}}}function gh(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function FW(n,o,e){if(!(o.expression instanceof tr)&&o.isTextAttribute){let t=al(o.target,o.isStructuralTemplateAttribute?Ht.Template:Ht.Attribute,o.namespace,o.name,o.expression,o.i18nContext,o.i18nMessage,o.securityContext);if(n.job.kind===Ot.Host)n.create.push(t);else{let i=gh(e,o.target);Ke.insertBefore(t,i)}Ke.remove(o)}}var Q5="aria-";function YF(n){return n.startsWith(Q5)&&n.length>Q5.length}function RW(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function LW(n){let o=new Map;for(let e of n.units)for(let t of e.create)ym(t)&&o.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 Ht.Attribute:if(t.name==="ngNonBindable"){Ke.remove(t);let i=RW(o,t.target);i.nonBindable=!0}else if(t.name.startsWith("animate."))Ke.replace(t,q5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,0));else{let[i,r]=Sa(t.name);Ke.replace(t,G5(t.target,i,r,t.expression,t.securityContext,t.isTextAttribute,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan))}break;case Ht.Animation:Ke.replace(t,q5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,1));break;case Ht.Property:case Ht.LegacyAnimation:n.mode===is.DomOnly&&YF(t.name)?Ke.replace(t,G5(t.target,null,t.name,t.expression,t.securityContext,!1,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan)):n.kind===Ot.Host?Ke.replace(t,TW(t.name,t.expression,t.bindingKind,t.i18nContext,t.securityContext,t.sourceSpan)):Ke.replace(t,XU(t.target,t.name,t.expression,t.bindingKind,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case Ht.TwoWayProperty:if(!(t.expression instanceof Ui))throw new Error(`Expected value of two-way property binding "${t.name}" to be an expression`);Ke.replace(t,KU(t.target,t.name,t.expression,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case Ht.I18n:case Ht.ClassName:case Ht.StyleProperty:throw new Error(`Unhandled binding of kind ${Ht[t.bindingKind]}`)}}var X5=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]]),VW=256;function BW(n){for(let o of n.units)K5(o.create),K5(o.update)}function K5(n){let o=null;for(let e of n){if(e.kind!==V.Statement||!(e.statement instanceof pa)){o=null;continue}if(!(e.statement.expr instanceof cs)||!(e.statement.expr.fn instanceof qp)){o=null;continue}let t=e.statement.expr.fn.value;if(!X5.has(t)){o=null;continue}if(o!==null&&X5.get(o.instruction)===t&&o.lengthi==="")&&(e.expression=e.expression.expressions[0])}function jW(n){for(let o of n.units)for(let e of o.ops()){if(e.kind!==V.Conditional)continue;let t,i=e.conditions.findIndex(c=>c.expr===null);if(i>=0){let c=e.conditions.splice(i,1)[0].targetSlot;t=new U1(c)}else t=Ee(-1);let r=e.test==null?null:new Fc(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 bm(r.xref);p.expr=new vi(st.Identical,u,p.expr)}else p.alias!==null&&(a??=n.allocateXrefId(),p.expr=new Fc(p.expr,a),e.contextValue=new bm(a));t=new Dc(p.expr,new U1(p.targetSlot),t)}}e.processed=t,e.conditions=[]}}var $W=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 ZF(n){let o=new Map([["svg",wr.SVG],["math",wr.Math]]);return n===null?wr.HTML:o.get(n)??wr.HTML}function HW(n){let o=new Map([["svg",wr.SVG],["math",wr.Math]]);for(let[e,t]of o.entries())if(t===n)return e;return null}function UW(n,o){return o===wr.HTML?n:`:${HW(o)}:${n}`}function $h(n){return Array.isArray(n)?Xi(n.map($h)):Ee(n)}function WW(n){let o=new Map;for(let e of n.units)for(let t of e.create)if(t.kind===V.ExtractedAttribute){let i=o.get(t.target)||new jT;o.set(t.target,i),i.add(t.bindingKind,t.name,t.expression,t.namespace,t.trustedValueFn),Ke.remove(t)}if(n instanceof i0)for(let e of n.units)for(let t of e.create)if(t.kind==V.Projection){let i=o.get(t.xref);if(i!==void 0){let r=$T(i);r.entries.length>0&&(t.attributes=n.pool.getConstLiteral(r,!0))}}else ym(t)&&(t.attributes=Y5(n,o,t.xref),t.kind===V.RepeaterCreate&&t.emptyView!==null&&(t.emptyAttributes=Y5(n,o,t.emptyView)));else if(n instanceof X1)for(let[e,t]of o.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 i=$T(t);i.entries.length>0&&(n.root.attributes=i)}}function Y5(n,o,e){let t=o.get(e);if(t!==void 0){let i=$T(t);if(i.entries.length>0)return n.addConst(i)}return null}var dh=Object.freeze([]),jT=class{known=new Map;byKind=new Map;propertyBindings=null;projectAs=null;get attributes(){return this.byKind.get(Ht.Attribute)??dh}get classes(){return this.byKind.get(Ht.ClassName)??dh}get styles(){return this.byKind.get(Ht.StyleProperty)??dh}get bindings(){return this.propertyBindings??dh}get template(){return this.byKind.get(Ht.Template)??dh}get i18n(){return this.byKind.get(Ht.I18n)??dh}isKnown(o,e){let t=this.known.get(o)??new Set;return this.known.set(o,t),t.has(e)?!0:(t.add(e),!1)}add(o,e,t,i,r){if(!(o===Ht.Attribute||o===Ht.ClassName||o===Ht.StyleProperty)&&this.isKnown(o,e))return;if(e==="ngProjectAs"){if(t===null||!(t instanceof ma)||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(o);if(c.push(...GW(i,e)),o===Ht.Attribute||o===Ht.StyleProperty){if(t===null)throw Error("Attribute, i18n attribute, & style element attributes must have a value");r!==null&&jF(t)?c.push(lH(r,new v_([new d1(t.value)],[]),void 0,t.sourceSpan)):c.push(t)}}arrayFor(o){return o===Ht.Property||o===Ht.TwoWayProperty?(this.propertyBindings??=[],this.propertyBindings):(this.byKind.has(o)||this.byKind.set(o,[]),this.byKind.get(o))}};function GW(n,o){let e=Ee(o);return n?[Ee(0),Ee(n),e]:[e]}function $T({attributes:n,bindings:o,classes:e,i18n:t,projectAs:i,styles:r,template:a}){let c=[...n];if(i!==null){let p=AE(i)[0];c.push(Ee(5),$h(p))}return e.length>0&&c.push(Ee(1),...e),r.length>0&&c.push(Ee(2),...r),o.length>0&&c.push(Ee(3),...o),a.length>0&&c.push(Ee(4),...a),t.length>0&&c.push(Ee(6),...t),Xi(c)}function qW(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function QW(n){let o=new Map;for(let e of n.units)for(let t of e.create)ym(t)&&o.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===V.AnimationBinding){let i=XW(t);n.kind===Ot.Host?e.create.push(i):Ke.insertAfter(i,qW(o,t.target)),Ke.remove(t)}}function XW(n){if(n.animationBindingKind===0)return uW(n.name,n.target,n.name==="animate.enter"?"enter":"leave",n.expression,n.securityContext,n.sourceSpan);{let o=n.expression;return hW(n.name,n.target,n.name==="animate.enter"?"enter":"leave",[Vs(new kr(o,o.sourceSpan))],n.securityContext,n.sourceSpan)}}function KW(n){let o=new Map;for(let e of n.units){for(let t of e.create)t.kind===V.I18nAttributes&&o.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 tr))continue;let i=o.get(t.target);if(i===void 0)throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");if(i.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}),Qn.None),nr(e,pG,Qn.None)}function Ds(n){return n instanceof Qp?Ds(n.expr):n instanceof vi?Ds(n.lhs)||Ds(n.rhs):n instanceof Dc?n.falseCase&&Ds(n.falseCase)?!0:Ds(n.condition)||Ds(n.trueCase):n instanceof C_?Ds(n.condition):n instanceof Fc?Ds(n.expr):n instanceof Fs?Ds(n.receiver):n instanceof Md?Ds(n.receiver)||Ds(n.index):n instanceof ql?Ds(n.expr):n instanceof cs||n instanceof Pc||n instanceof Ql||n instanceof ru||n instanceof ou}function aG(n){let o=new Set;return zt(n,e=>(e instanceof Fc&&o.add(e.xref),e),Qn.None),o}function sG(n,o,e){return zt(n,t=>{if(t instanceof Fc&&o.has(t.xref)){let i=new bm(t.xref);return new Fc(i,i.xref)}return t},Qn.None),n}function mh(n,o,e){let t;if(Ds(n)){let i=e.job.allocateXrefId();t=[new Fc(n,i),new bm(i)]}else t=[n,n.clone()],sG(t[1],aG(t[0]));return new jh(t[0],o(t[1]))}function lG(n){return n instanceof Bh||n instanceof zh||n instanceof ru}function cG(n){return n instanceof Fs||n instanceof Md||n instanceof cs}function JF(n){return lG(n)||cG(n)}function dG(n){if(JF(n)&&n.receiver instanceof jh){let o=n.receiver;for(;o.expr instanceof jh;)o=o.expr;return o}return null}function mG(n,o){if(!JF(n))return n;let e=dG(n);if(e){if(n instanceof cs)return e.expr=e.expr.callFn(n.args),n.receiver;if(n instanceof Fs)return e.expr=e.expr.prop(n.name),n.receiver;if(n instanceof Md)return e.expr=e.expr.key(n.index),n.receiver;if(n instanceof ru)return e.expr=mh(e.expr,t=>t.callFn(n.args),o),n.receiver;if(n instanceof Bh)return e.expr=mh(e.expr,t=>t.prop(n.name),o),n.receiver;if(n instanceof zh)return e.expr=mh(e.expr,t=>t.key(n.index),o),n.receiver}else{if(n instanceof ru)return mh(n.receiver,t=>t.callFn(n.args),o);if(n instanceof Bh)return mh(n.receiver,t=>t.prop(n.name),o);if(n instanceof zh)return mh(n.receiver,t=>t.key(n.index),o)}return n}function pG(n){return n instanceof jh?new ql(new Dc(new vi(st.Equals,n.guard,Dh),Dh,n.expr)):n}var Z5="\uFFFD",uG="#",hG="*",fG="/",gG=":",_G="[",vG="]",CG="|";function xG(n){let o=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=bG(n,a);r.create.push(c),o.set(a.xref,c),t.set(a.xref,a);break;case V.I18nStart:e.set(a.xref,a);break}let i=null;for(let r of n.units)for(let a of r.create)switch(a.kind){case V.IcuStart:i=a,Ke.remove(a);let c=t.get(a.context);if(c.contextKind!==Lp.Icu)continue;let p=e.get(c.i18nBlock);if(p.context===c.xref)continue;let u=e.get(p.root),h=o.get(u.context);if(h===void 0)throw Error("AssertionError: ICU sub-message should belong to a root message.");let g=o.get(c.xref);g.messagePlaceholder=a.messagePlaceholder,h.subMessages.push(g.xref);break;case V.IcuEnd:i=null,Ke.remove(a);break;case V.IcuPlaceholder:if(i===null||i.context==null)throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");o.get(i.context).postprocessingParams.set(a.name,Ee(yG(a))),Ke.remove(a);break}}function bG(n,o,e){let t=J5(o.params),i=J5(o.postprocessingParams),r=[...o.params.values()].some(a=>a.length>1);return bW(n.allocateXrefId(),o.xref,o.i18nBlock,o.message,null,t,i,r)}function yG(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 o=n.expressionPlaceholders.map(xh);return n.strings.flatMap((e,t)=>[e,o[t]||""]).join("")}function J5(n){let o=new Map;for(let[e,t]of n){let i=SG(t);i!==null&&o.set(e,Ee(i))}return o}function SG(n){if(n.length===0)return null;let o=n.map(e=>xh(e));return o.length===1?o[0]:`${_G}${o.join(CG)}${vG}`}function xh(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 i=xh(Ye(Z({},n),{value:n.value.element,flags:n.flags&~ao.TemplateTag})),r=xh(Ye(Z({},n),{value:n.value.template,flags:n.flags&~ao.ElementTag}));return n.flags&ao.OpenTag&&n.flags&ao.CloseTag?`${r}${i}${r}`:n.flags&ao.CloseTag?`${i}${r}`:`${r}${i}`}if(n.flags&ao.OpenTag&&n.flags&ao.CloseTag)return`${xh(Ye(Z({},n),{flags:n.flags&~ao.CloseTag}))}${xh(Ye(Z({},n),{flags:n.flags&~ao.OpenTag}))}`;if(n.flags===ao.None)return`${n.value}`;let o="",e="";n.flags&ao.ElementTag?o=uG:n.flags&ao.TemplateTag&&(o=hG),o!==""&&(e=n.flags&ao.CloseTag?fG:"");let t=n.subTemplateIndex===null?"":`${gG}${n.subTemplateIndex}`;return`${Z5}${e}${o}${n.value}${t}${Z5}`}function wG(n){for(let o of n.units){let e=new Map;for(let i of o.create){if(Qh(i)){if(i.handle.slot===null)throw new Error("AssertionError: expected slots to have been allocated before generating advance() calls")}else continue;e.set(i.xref,i.handle.slot)}let t=0;for(let i of o.update){let r=null;if(K_(i)?r=i:fr(i,c=>{r===null&&K_(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");Ke.insertBefore(tW(c,r.sourceSpan),i),t=a}}}}function MG(n){for(let o of n.units)for(let e of o.update){if(e.kind!==V.StoreLet)continue;let t={kind:Zr.Identifier,name:null,identifier:e.declaredName,local:!0};Ke.replace(e,lm(n.allocateXrefId(),t,new Y_(e.target,e.value,e.sourceSpan),rl.None))}}function kG(n){let e=[],t=0;for(let i of n.units)for(let r of i.create)r.kind===V.Projection&&(e.push(r.selector),r.projectionSlotIndex=t++);if(e.length>0){let i=null;if(e.length>1||e[0]!=="*"){let r=e.map(a=>a==="*"?a:AE(a));i=n.pool.getConstLiteral($h(r),!0)}n.contentSelectors=n.pool.getConstLiteral($h(e),!0),n.root.create.prepend([_W(i)])}}function TG(n){n_(n.root,null)}function n_(n,o){let e=eN(n,o);for(let t of n.create)switch(t.kind){case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:n_(n.job.views.get(t.xref),e);break;case V.Projection:t.fallbackView!==null&&n_(n.job.views.get(t.fallbackView),e);break;case V.RepeaterCreate:n_(n.job.views.get(t.xref),e),t.emptyView&&n_(n.job.views.get(t.emptyView),e),t.trackByOps!==null&&t.trackByOps.prepend(i_(n,e,!1));break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:t.handlerOps.prepend(i_(n,e,!0));break}n.update.prepend(i_(n,e,!1));for(let t of n.functions)t.ops.prepend(i_(n,eN(n,o),!0))}function eN(n,o){let e={view:n.xref,viewContextVariable:{kind:Zr.Context,name:null,view:n.xref},contextVariables:new Map,aliases:n.aliases,references:[],letDeclarations:[],parent:o};for(let t of n.contextVariables.keys())e.contextVariables.set(t,{kind:Zr.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 i=0;it instanceof n0?Ee(n.addConst(t.expr)):t,Qn.None)}var tN="style.",nN="class.",DG="style!",iN="class!",oN="!important";function PG(n){for(let o of n.root.update)if(o.kind===V.Binding&&o.bindingKind===Ht.Property)if(o.name.endsWith(oN)&&(o.name=o.name.substring(0,o.name.length-oN.length)),o.name.startsWith(tN)){o.bindingKind=Ht.StyleProperty,o.name=o.name.substring(tN.length),IG(o.name)||(o.name=AG(o.name));let{property:e,suffix:t}=jk(o.name);o.name=e,o.unit=t}else o.name.startsWith(DG)?(o.bindingKind=Ht.StyleProperty,o.name="style"):o.name.startsWith(nN)?(o.bindingKind=Ht.ClassName,o.name=jk(o.name.substring(nN.length)).property):o.name.startsWith(iN)&&(o.bindingKind=Ht.ClassName,o.name=jk(o.name.substring(iN.length)).property)}function IG(n){return n.startsWith("--")}function AG(n){return n.replace(/[a-z][A-Z]/g,o=>o.charAt(0)+"-"+o.charAt(1)).toLowerCase()}function jk(n){let o=n.indexOf("!important");o!==-1&&(n=o>0?n.substring(0,o):"");let e=null,t=n,i=n.lastIndexOf(".");return i>0&&(e=n.slice(i+1),t=n.substring(0,i)),{property:t,suffix:e}}function HT(n,o=!1){return cl(Object.keys(n).map(e=>({key:e,quoted:o,value:n[e]})))}var UT=class{visitText(o){return o.value}visitContainer(o){return o.children.map(e=>e.visit(this)).join("")}visitIcu(o){let e=Object.keys(o.cases).map(i=>`${i} {${o.cases[i].visit(this)}}`);return`{${o.expressionPlaceholder}, ${o.type}, ${e.join(" ")}}`}visitTagPlaceholder(o){return o.isVoid?this.formatPh(o.startName):`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitPlaceholder(o){return this.formatPh(o.name)}visitBlockPlaceholder(o){return`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitIcuPlaceholder(o,e){return this.formatPh(o.name)}formatPh(o){return`{${h0(o,!1)}}`}},OG=new UT;function e6(n){return n.visit(OG)}var kd=class{sourceSpan;i18n;constructor(o,e){this.sourceSpan=o,this.i18n=e}},au=class extends kd{value;tokens;constructor(o,e,t,i){super(e,i),this.value=o,this.tokens=t}visit(o,e){return o.visitText(this,e)}},$p=class extends kd{switchValue;type;cases;switchValueSourceSpan;constructor(o,e,t,i,r,a){super(i,a),this.switchValue=o,this.type=e,this.cases=t,this.switchValueSourceSpan=r}visit(o,e){return o.visitExpansion(this,e)}},K1=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(o,e,t,i,r){this.value=o,this.expression=e,this.sourceSpan=t,this.valueSourceSpan=i,this.expSourceSpan=r}visit(o,e){return o.visitExpansionCase(this,e)}},WT=class extends kd{name;value;keySpan;valueSpan;valueTokens;constructor(o,e,t,i,r,a,c){super(t,c),this.name=o,this.value=e,this.keySpan=i,this.valueSpan=r,this.valueTokens=a}visit(o,e){return o.visitAttribute(this,e)}},el=class extends kd{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;isVoid;constructor(o,e,t,i,r,a,c,p=null,u,h){super(a,h),this.name=o,this.attrs=e,this.directives=t,this.children=i,this.isSelfClosing=r,this.startSourceSpan=c,this.endSourceSpan=p,this.isVoid=u}visit(o,e){return o.visitElement(this,e)}},o0=class{value;sourceSpan;constructor(o,e){this.value=o,this.sourceSpan=e}visit(o,e){return o.visitComment(this,e)}},il=class extends kd{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,a,c=null,p){super(i,p),this.name=o,this.parameters=e,this.children=t,this.nameSpan=r,this.startSourceSpan=a,this.endSourceSpan=c}visit(o,e){return o.visitBlock(this,e)}},Va=class extends kd{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r,a,c,p,u,h=null,g){super(p,g),this.componentName=o,this.tagName=e,this.fullName=t,this.attrs=i,this.directives=r,this.children=a,this.isSelfClosing=c,this.startSourceSpan=u,this.endSourceSpan=h}visit(o,e){return o.visitComponent(this,e)}},GT=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(o,e,t,i,r=null){this.name=o,this.attrs=e,this.sourceSpan=t,this.startSourceSpan=i,this.endSourceSpan=r}visit(o,e){return o.visitDirective(this,e)}},Y1=class{expression;sourceSpan;constructor(o,e){this.expression=o,this.sourceSpan=e}visit(o,e){return o.visitBlockParameter(this,e)}},Z1=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(o,e,t,i,r){this.name=o,this.value=e,this.sourceSpan=t,this.nameSpan=i,this.valueSpan=r}visit(o,e){return o.visitLetDeclaration(this,e)}};function xo(n,o,e=null){let t=[],i=n.visit?r=>n.visit(r,e)||r.visit(n,e):r=>r.visit(n,e);return o.forEach(r=>{let a=i(r);a&&t.push(a)}),t}var r0={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"},t6="\uE500";r0.ngsp=t6;var qT=class{tokens;errors;nonNormalizedIcuExpressions;constructor(o,e,t){this.tokens=o,this.errors=e,this.nonNormalizedIcuExpressions=t}};function NG(n,o,e,t={}){let i=new XT(new L1(n,o),e,t);return i.tokenize(),new qT(UG(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var FG=/\r\n?/g;function ph(n){return`Unexpected character "${n===Yr?"EOF":String.fromCharCode(n)}"`}function rN(n){return`Unknown entity "${n}" - use the "&#;" or "&#x;" syntax`}function RG(n,o){return`Unable to parse entity "${o}" - ${n} character reference entities must end with ";"`}var QT=(function(n){return n.HEX="hexadecimal",n.DEC="decimal",n})(QT||{}),LG=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],qg={start:"{{",end:"}}"},XT=class{_getTagDefinition;_cursor;_tokenizeIcu;_leadingTriviaCodePoints;_currentTokenStart=null;_currentTokenType=null;_expansionCaseStack=[];_openDirectiveCount=0;_inInterpolation=!1;_preserveLineEndings;_i18nNormalizeLineEndingsInICUs;_tokenizeBlocks;_tokenizeLet;_selectorlessEnabled;tokens=[];errors=[];nonNormalizedIcuExpressions=[];constructor(o,e,t){this._getTagDefinition=e,this._tokenizeIcu=t.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=t.leadingTriviaChars&&t.leadingTriviaChars.map(r=>r.codePointAt(0)||0);let i=t.range||{endPos:o.content.length,startPos:0,startLine:0,startCol:0};this._cursor=t.escapedString?new KT(o,i):new J1(o,i),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(o){return this._preserveLineEndings?o:o.replace(FG,` `)}tokenize(){for(;this._cursor.peek()!==Yr;){let o=this._cursor.clone();try{this._attemptCharCode(wh)?this._attemptCharCode(TT)?this._attemptCharCode(kc)?this._consumeCdata(o):this._attemptCharCode(F1)?this._consumeComment(o):this._consumeDocType(o):this._attemptCharCode(tl)?this._consumeTagClose(o):this._consumeTagOpen(o):this._tokenizeLet&&this._cursor.peek()===ch&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(o):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(o):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(Ba)?this._consumeBlockEnd(o):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(41),this._endToken([])}_getBlockName(){let o=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(t=>G_(t)?!o:HG(t)?(o=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(o){this._requireCharCode(ch),this._beginToken(24,o);let e=this._endToken([this._getBlockName()]);if(e.parts[0]==="default never"&&this._attemptCharCode(rs)){this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([]);return}if(this._cursor.peek()===ja)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Bo),this._attemptCharCode(Sr))this._attemptCharCodeUntilFn(Bo);else{e.type=28;return}this._attemptCharCode(ol)?(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(o){this._beginToken(26,o),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(sN);this._cursor.peek()!==Sr&&this._cursor.peek()!==Yr;){this._beginToken(27);let o=this._cursor.clone(),e=null,t=0;for(;this._cursor.peek()!==rs&&this._cursor.peek()!==Yr||e!==null;){let i=this._cursor.peek();if(i===jp)this._cursor.advance();else if(i===e)e=null;else if(e===null&&l_(i))e=i;else if(i===ja&&e===null)t++;else if(i===Sr&&e===null){if(t===0)break;t>0&&t--}this._cursor.advance()}this._endToken([this._cursor.getChars(o)]),this._attemptCharCodeUntilFn(sN)}}_consumeLetDeclaration(o){if(this._requireStr("@let"),this._beginToken(29,o),G_(this._cursor.peek()))this._attemptCharCodeUntilFn(Bo);else{let i=this._endToken([this._cursor.getChars(o)]);i.type=32;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Bo),!this._attemptCharCode(Xr)){e.type=32;return}this._attemptCharCodeUntilFn(i=>Bo(i)&&!R1(i)),this._consumeLetDeclarationValue(),this._cursor.peek()===rs?(this._beginToken(31),this._cursor.advance(),this._endToken([])):(e.type=32,e.sourceSpan=this._cursor.getSpan(o))}_getLetDeclarationName(){let o=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(t=>vm(t)||t===fx||t===wm||e&&nl(t)?(e=!0,!1):!0),this._cursor.getChars(o).trim()}_consumeLetDeclarationValue(){let o=this._cursor.clone();for(this._beginToken(30,o);this._cursor.peek()!==Yr;){let e=this._cursor.peek();if(e===rs)break;l_(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(t=>t===jp?(this._cursor.advance(),!1):t===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(o)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(jG(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Ba){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(o,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=o}_endToken(o,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:o,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(t),this._currentTokenStart=null,this._currentTokenType=null,t}_createError(o,e){this._isInExpansionForm()&&(o+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let t=new sn(e,o);return this._currentTokenStart=null,this._currentTokenType=null,t}handleError(o){if(o instanceof a0&&(o=this._createError(o.msg,this._cursor.getSpan(o.cursor))),o instanceof sn)this.errors.push(o);else throw o}_attemptCharCode(o){return this._cursor.peek()===o?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(o){return $G(this._cursor.peek(),o)?(this._cursor.advance(),!0):!1}_requireCharCode(o){let e=this._cursor.clone();if(!this._attemptCharCode(o))throw this._createError(ph(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(o){let e=o.length;if(this._cursor.charsLeft()this._peekStr(o))}_isLetStart(){return this._cursor.peek()===ch&&this._peekStr("@let")}_consumeEntity(o){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(MF)){let t=this._attemptCharCode(OF)||this._attemptCharCode(JH),i=this._cursor.clone();if(this._attemptCharCodeUntilFn(BG),this._cursor.peek()!=rs){this._cursor.advance();let a=t?QT.HEX:QT.DEC;throw this._createError(RG(a,this._cursor.getChars(e)),this._cursor.getSpan())}let r=this._cursor.getChars(i);this._cursor.advance();try{let a=parseInt(r,t?16:10);this._endToken([String.fromCodePoint(a),this._cursor.getChars(e)])}catch{throw this._createError(rN(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let t=this._cursor.clone();if(this._attemptCharCodeUntilFn(zG),this._cursor.peek()!=rs)this._beginToken(o,e),this._cursor=t,this._endToken(["&"]);else{let i=this._cursor.getChars(t);this._cursor.advance();let r=r0.hasOwnProperty(i)&&r0[i];if(!r)throw this._createError(rN(i),this._cursor.getSpan(e));this._endToken([r,`&${i};`])}}}_consumeRawText(o,e){this._beginToken(o?6:7);let t=[];for(;;){let i=this._cursor.clone(),r=e();if(this._cursor=i,r)break;o&&this._cursor.peek()===N1?(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(o){this._beginToken(10,o),this._requireCharCode(F1),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeCdata(o){this._beginToken(12,o),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(o){this._beginToken(18,o);let e=this._cursor.clone();this._attemptUntilChar(Ps);let t=this._cursor.getChars(e);this._cursor.advance(),this._endToken([t])}_consumePrefixAndName(o){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==Sc&&!VG(this._cursor.peek());)this._cursor.advance();let i;this._cursor.peek()===Sc?(t=this._cursor.getChars(e),this._cursor.advance(),i=this._cursor.clone()):i=e,this._requireCharCodeUntilFn(o,t===""?0:1);let r=this._cursor.getChars(i);return[t,r]}_consumeTagOpen(o){let e,t,i,r;try{if(this._selectorlessEnabled&&UC(this._cursor.peek()))r=this._consumeComponentOpenStart(o),[i,t,e]=r.parts,t&&(i+=`:${t}`),e&&(i+=`:${e}`),this._attemptCharCodeUntilFn(Bo);else{if(!vm(this._cursor.peek()))throw this._createError(ph(this._cursor.peek()),this._cursor.getSpan(o));r=this._consumeTagOpenStart(o),t=r.parts[0],e=i=r.parts[1],this._attemptCharCodeUntilFn(Bo)}for(;!cN(this._cursor.peek());)if(this._selectorlessEnabled&&this._cursor.peek()===ch){let c=this._cursor.clone(),p=c.clone();p.advance(),UC(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,o),this._endToken(["<"]));return}throw c}let a=this._getTagDefinition(e).getContentType(t);a===yc.RAW_TEXT?this._consumeRawTextWithTagClose(r,i,!1):a===yc.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,i,!0)}_consumeRawTextWithTagClose(o,e,t){this._consumeRawText(t,()=>!this._attemptCharCode(wh)||!this._attemptCharCode(tl)||(this._attemptCharCodeUntilFn(Bo),!this._attemptStrCaseInsensitive(e))?!1:(this._attemptCharCodeUntilFn(Bo),this._attemptCharCode(Ps))),this._beginToken(o.type===33?36:3),this._requireCharCodeUntilFn(i=>i===Ps,3),this._cursor.advance(),this._endToken(o.parts)}_consumeTagOpenStart(o){this._beginToken(0,o);let e=this._consumePrefixAndName(Ep);return this._endToken(e)}_consumeComponentOpenStart(o){this._beginToken(33,o);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let o=this._cursor.clone();for(;lN(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(o),t="",i="";return this._cursor.peek()===Sc&&(this._cursor.advance(),[t,i]=this._consumePrefixAndName(Ep)),[e,t,i]}_consumeAttribute(){this._consumeAttributeName(),this._attemptCharCodeUntilFn(Bo),this._attemptCharCode(Xr)&&(this._attemptCharCodeUntilFn(Bo),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Bo)}_consumeAttributeName(){let o=this._cursor.peek();if(o===W_||o===U_)throw this._createError(ph(o),this._cursor.getSpan());this._beginToken(14);let e;if(this._openDirectiveCount>0){let i=0;e=r=>{if(this._openDirectiveCount>0){if(r===ja)i++;else if(r===Sr){if(i===0)return!0;i--}}return Ep(r)}}else if(o===kc){let i=0;e=r=>(r===kc?i++:r===bd&&i--,i<=0?Ep(r):R1(r))}else e=Ep;let t=this._consumePrefixAndName(e);this._endToken(t)}_consumeAttributeValue(){if(this._cursor.peek()===W_||this._cursor.peek()===U_){let o=this._cursor.peek();this._consumeQuote(o);let e=()=>this._cursor.peek()===o;this._consumeWithInterpolation(16,17,e,e),this._consumeQuote(o)}else{let o=()=>Ep(this._cursor.peek());this._consumeWithInterpolation(16,17,o,o)}}_consumeQuote(o){this._beginToken(15),this._requireCharCode(o),this._endToken([String.fromCodePoint(o)])}_consumeTagOpenEnd(){let o=this._attemptCharCode(tl)?2:1;this._beginToken(o),this._requireCharCode(Ps),this._endToken([])}_consumeComponentOpenEnd(){let o=this._attemptCharCode(tl)?35:34;this._beginToken(o),this._requireCharCode(Ps),this._endToken([])}_consumeTagClose(o){if(this._selectorlessEnabled){let t=o.clone();for(;t.peek()!==Ps&&!UC(t.peek());)t.advance();if(UC(t.peek())){this._beginToken(36,o);let i=this._consumeComponentName();this._attemptCharCodeUntilFn(Bo),this._requireCharCode(Ps),this._endToken(i);return}}this._beginToken(3,o),this._attemptCharCodeUntilFn(Bo);let e=this._consumePrefixAndName(Ep);this._attemptCharCodeUntilFn(Bo),this._requireCharCode(Ps),this._endToken(e)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(ol),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);let o=this._readUntil(ya),e=this._processCarriageReturns(o);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let i=this._endToken([o]);e!==o&&this.nonNormalizedIcuExpressions.push(i)}this._requireCharCode(ya),this._attemptCharCodeUntilFn(Bo),this._beginToken(7);let t=this._readUntil(ya);this._endToken([t]),this._requireCharCode(ya),this._attemptCharCodeUntilFn(Bo)}_consumeExpansionCaseStart(){this._beginToken(20);let o=this._readUntil(ol).trim();this._endToken([o]),this._attemptCharCodeUntilFn(Bo),this._beginToken(21),this._requireCharCode(ol),this._endToken([]),this._attemptCharCodeUntilFn(Bo),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Ba),this._endToken([]),this._attemptCharCodeUntilFn(Bo),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Ba),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(o,e,t,i){this._beginToken(o);let r=[];for(;!t();){let a=this._cursor.clone();this._attemptStr(qg.start)?(this._endToken([this._processCarriageReturns(r.join(""))],a),r.length=0,this._consumeInterpolation(e,a,i),this._beginToken(o)):this._cursor.peek()===N1?(this._endToken([this._processCarriageReturns(r.join(""))]),r.length=0,this._consumeEntity(o),this._beginToken(o)):r.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(r.join(""))])}_consumeInterpolation(o,e,t){let i=[];this._beginToken(o,e),i.push(qg.start);let r=this._cursor.clone(),a=null,c=!1;for(;this._cursor.peek()!==Yr&&(t===null||!t());){let p=this._cursor.clone();if(this._isTagStart()){this._cursor=p,i.push(this._getProcessedChars(r,p)),this._endToken(i);return}if(a===null)if(this._attemptStr(qg.end)){i.push(this._getProcessedChars(r,p)),i.push(qg.end),this._endToken(i);return}else this._attemptStr("//")&&(c=!0);let u=this._cursor.peek();this._cursor.advance(),u===jp?this._cursor.advance():u===a?a=null:!c&&a===null&&l_(u)&&(a=u)}i.push(this._getProcessedChars(r,this._cursor)),this._endToken(i)}_consumeDirective(o,e){for(this._requireCharCode(ch),this._cursor.advance();lN(this._cursor.peek());)this._cursor.advance();this._beginToken(38,o);let t=this._cursor.getChars(e);if(this._endToken([t]),this._attemptCharCodeUntilFn(Bo),this._cursor.peek()===ja){for(this._openDirectiveCount++,this._beginToken(39),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Bo);!cN(this._cursor.peek())&&this._cursor.peek()!==Sr;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(Bo),this._openDirectiveCount--,this._cursor.peek()!==Sr){if(this._cursor.peek()===Ps||this._cursor.peek()===tl)return;throw this._createError(ph(this._cursor.peek()),this._cursor.getSpan(o))}this._beginToken(40),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Bo)}}_getProcessedChars(o,e){return this._processCarriageReturns(e.getChars(o))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===Yr||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Ba&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===Ba))}_isTagStart(){if(this._cursor.peek()===wh){let o=this._cursor.clone();o.advance();let e=o.peek();if(tu<=e&&e<=f0||Sm<=e&&e<=Gh||e===tl||e===TT)return!0}return!1}_readUntil(o){let e=this._cursor.clone();return this._attemptUntilChar(o),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()!==ol)return!1;let o=this._cursor.clone(),e=this._attemptStr(qg.start);return this._cursor=o,!e}};function Bo(n){return!G_(n)||n===Yr}function Ep(n){return G_(n)||n===Ps||n===wh||n===tl||n===W_||n===U_||n===Xr||n===Yr}function VG(n){return(nTF)}function BG(n){return n===rs||n===Yr||!iU(n)}function zG(n){return n===rs||n===Yr||!(vm(n)||nl(n))}function jG(n){return n!==Ba}function $G(n,o){return aN(n)===aN(o)}function aN(n){return n>=tu&&n<=f0?n-tu+Sm:n}function HG(n){return vm(n)||nl(n)||n===wm}function sN(n){return n!==rs&&Bo(n)}function UC(n){return n===wm||n>=Sm&&n<=Gh}function lN(n){return vm(n)||nl(n)||n===wm}function cN(n){return n===tl||n===Ps||n===wh||n===Yr}function UG(n){let o=[],e;for(let t=0;t0&&e.indexOf(o.peek())!==-1;)t===o&&(o=o.clone()),o.advance();let i=this.locationFromCursor(o),r=this.locationFromCursor(this),a=t!==o?this.locationFromCursor(t):i;return new gn(i,r,a)}getChars(o){return this.input.substring(o.state.offset,this.state.offset)}charAt(o){return this.input.charCodeAt(o)}advanceState(o){if(o.offset>=this.end)throw this.state=o,new a0('Unexpected character "EOF"',this);let e=this.charAt(o.offset);e===zp?(o.line++,o.column=0):R1(e)||o.column++,o.offset++,this.updatePeek(o)}updatePeek(o){o.peek=o.offset>=this.end?Yr:this.charAt(o.offset)}locationFromCursor(o){return new q_(o.file,o.state.offset,o.state.line,o.state.column)}},KT=class n extends J1{internalState;constructor(o,e){o instanceof n?(super(o),this.internalState=Z({},o.internalState)):(super(o,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(o){let e=o.clone(),t="";for(;e.internalState.offsetthis.internalState.peek;if(o()===jp)if(this.internalState=Z({},this.state),this.advanceState(this.internalState),o()===EF)this.state.peek=zp;else if(o()===DF)this.state.peek=zE;else if(o()===AF)this.state.peek=yF;else if(o()===PF)this.state.peek=BE;else if(o()===tU)this.state.peek=QH;else if(o()===$E)this.state.peek=SF;else if(o()===IF)if(this.advanceState(this.internalState),o()===ol){this.advanceState(this.internalState);let e=this.clone(),t=0;for(;o()!==Ba;)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(o()===OF){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(L5(o())){let e="",t=0,i=this.clone();for(;L5(o())&&t<3;)i=this.clone(),e+=String.fromCodePoint(o()),this.advanceState(this.internalState),t++;this.state.peek=parseInt(e,8),this.internalState=i.internalState}else R1(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(o,e){let t=this.input.slice(o.internalState.offset,o.internalState.offset+e),i=parseInt(t,16);if(isNaN(i))throw o.state=o.internalState,new a0("Invalid hexadecimal escape sequence",o);return i}},a0=class extends Error{msg;cursor;constructor(o,e){super(o),this.msg=o,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},hr=class n extends sn{elementName;static create(o,e,t){return new n(o,e,t)}constructor(o,e,t){super(e,t),this.elementName=o}},ex=class{rootNodes;errors;constructor(o,e){this.rootNodes=o,this.errors=e}},WG=class{getTagDefinition;constructor(o){this.getTagDefinition=o}parse(o,e,t){let i=NG(o,e,this.getTagDefinition,t),r=new YT(i.tokens,this.getTagDefinition);return r.build(),new ex(r.rootNodes,[...i.errors,...r.errors])}},YT=class n{tokens;tagDefinitionResolver;_index=-1;_peek;_containerStack=[];rootNodes=[];errors=[];constructor(o,e){this.tokens=o,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 o of this._containerStack)o instanceof il&&this.errors.push(hr.create(o.name,o.sourceSpan,`Unclosed block "${o.name}"`))}_advance(){let o=this._peek;return this._index0)return this.errors=this.errors.concat(r.errors),null;let a=new gn(o.sourceSpan.start,i.sourceSpan.end,o.sourceSpan.fullStart),c=new gn(e.sourceSpan.start,i.sourceSpan.end,e.sourceSpan.fullStart);return new K1(o.parts[0],r.rootNodes,a,o.sourceSpan,c)}_collectExpansionExpTokens(o){let e=[],t=[21];for(;;){if((this._peek.type===19||this._peek.type===21)&&t.push(this._peek.type),this._peek.type===22)if(dN(t,21)){if(t.pop(),t.length===0)return e}else return this.errors.push(hr.create(null,o.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===23)if(dN(t,19))t.pop();else return this.errors.push(hr.create(null,o.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===41)return this.errors.push(hr.create(null,o.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}}_consumeText(o){let e=[o],t=o.sourceSpan,i=o.parts[0];if(i.length>0&&i[0]===` `){let r=this._getContainer();r!=null&&r.children.length===0&&this._getTagDefinition(r)?.ignoreFirstLf&&(i=i.substring(1),e[0]={type:o.type,sourceSpan:o.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)o=this._advance(),e.push(o),o.type===8?i+=o.parts.join("").replace(/&([^;]+);/g,mN):o.type===9?i+=o.parts[0]:i+=o.parts.join("");if(i.length>0){let r=o.sourceSpan;this._addToParent(new au(i,new gn(t.start,r.end,t.fullStart,t.details),e))}}_closeVoidElement(){let o=this._getContainer();o!==null&&this._getTagDefinition(o)?.isVoid&&this._containerStack.pop()}_consumeElementStartTag(o){let e=[],t=[];this._consumeAttributesAndDirectives(e,t);let i=this._getElementFullName(o,this._getClosestElementLikeParent()),r=this._getTagDefinition(i),a=!1;this._peek.type===2?(this._advance(),a=!0,r?.canSelfClose||gT(i)!==null||r?.isVoid||this.errors.push(hr.create(i,o.sourceSpan,`Only void, custom and foreign elements can be self closed "${o.parts[1]}"`))):this._peek.type===1&&(this._advance(),a=!1);let c=this._peek.sourceSpan.fullStart,p=new gn(o.sourceSpan.start,c,o.sourceSpan.fullStart),u=new gn(o.sourceSpan.start,c,o.sourceSpan.fullStart),h=new el(i,e,t,[],a,p,u,void 0,r?.isVoid??!1),g=this._getContainer(),y=g!==null&&!!this._getTagDefinition(g)?.isClosedByChild(h.name);this._pushContainer(h,y),a?this._popContainer(i,el,p):o.type===4&&(this._popContainer(i,el,null),this.errors.push(hr.create(i,p,`Opening tag "${i}" not terminated.`)))}_consumeComponentStartTag(o){let e=o.parts[0],t=[],i=[];this._consumeAttributesAndDirectives(t,i);let r=this._getClosestElementLikeParent(),a=this._getComponentTagName(o,r),c=this._getComponentFullName(o,r),p=this._peek.type===35;this._advance();let u=this._peek.sourceSpan.fullStart,h=new gn(o.sourceSpan.start,u,o.sourceSpan.fullStart),g=new gn(o.sourceSpan.start,u,o.sourceSpan.fullStart),y=new Va(e,a,c,t,i,[],p,h,g,void 0),b=this._getContainer(),x=b!==null&&y.tagName!==null&&!!this._getTagDefinition(b)?.isClosedByChild(y.tagName);this._pushContainer(y,x),p?this._popContainer(c,Va,h):o.type===37&&(this._popContainer(c,Va,null),this.errors.push(hr.create(c,h,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(o,e){for(;this._peek.type===14||this._peek.type===38;)this._peek.type===38?e.push(this._consumeDirective(this._peek)):o.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(o){let e=this._getComponentFullName(o,this._getClosestElementLikeParent());if(!this._popContainer(e,Va,o.sourceSpan)){let t=this._containerStack[this._containerStack.length-1],i;t instanceof Va&&t.componentName===o.parts[0]?i=`, did you mean "${t.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let r=`Unexpected closing tag "${e}"${i}`;this.errors.push(hr.create(e,o.sourceSpan,r))}}_getTagDefinition(o){return typeof o=="string"?this.tagDefinitionResolver(o):o instanceof el?this.tagDefinitionResolver(o.name):o instanceof Va&&o.tagName!==null?this.tagDefinitionResolver(o.tagName):null}_pushContainer(o,e){e&&this._containerStack.pop(),this._addToParent(o),this._containerStack.push(o)}_consumeElementEndTag(o){let e=this._getElementFullName(o,this._getClosestElementLikeParent());if(this._getTagDefinition(e)?.isVoid)this.errors.push(hr.create(e,o.sourceSpan,`Void elements do not have end tags "${o.parts[1]}"`));else if(!this._popContainer(e,el,o.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(hr.create(e,o.sourceSpan,t))}}_popContainer(o,e,t){let i=!1;for(let r=this._containerStack.length-1;r>=0;r--){let a=this._containerStack[r];if(((a instanceof Va?a.fullName:a.name)===o||o===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),!i;(a instanceof il||!this._getTagDefinition(a)?.closedByParent)&&(i=!0)}return!1}_consumeAttr(o){let e=n1(o.parts[0],o.parts[1]),t=o.sourceSpan.end;this._peek.type===15&&this._advance();let i="",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?i+=h.parts.join("").replace(/&([^;]+);/g,mN):h.type===9?i+=h.parts[0]:i+=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 WT(e,i,new gn(o.sourceSpan.start,t,o.sourceSpan.fullStart),o.sourceSpan,u,r.length>0?r:void 0,void 0)}_consumeDirective(o){let e=[],t=o.sourceSpan.end,i=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?(i=this._peek.sourceSpan,this._advance()):this.errors.push(hr.create(null,o.sourceSpan,"Unterminated directive definition"))}let r=new gn(o.sourceSpan.start,t,o.sourceSpan.fullStart),a=new gn(r.start,i===null?o.sourceSpan.end:i.end,r.fullStart);return new GT(o.parts[0],e,a,r,i)}_consumeBlockOpen(o){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new Y1(c.parts[0],c.sourceSpan))}this._peek.type===25&&this._advance();let t=this._peek.sourceSpan.fullStart,i=new gn(o.sourceSpan.start,t,o.sourceSpan.fullStart),r=new gn(o.sourceSpan.start,t,o.sourceSpan.fullStart),a=new il(o.parts[0],e,[],i,o.sourceSpan,r);this._pushContainer(a,!1)}_consumeBlockClose(o){let e=this._containerStack.length,t=this._containerStack[e-1];if(!this._popContainer(null,il,o.sourceSpan)){if(this._containerStack.length element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));return}this.errors.push(hr.create(null,o.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(o){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new Y1(c.parts[0],c.sourceSpan))}let t=this._peek.sourceSpan.fullStart,i=new gn(o.sourceSpan.start,t,o.sourceSpan.fullStart),r=new gn(o.sourceSpan.start,t,o.sourceSpan.fullStart),a=new il(o.parts[0],e,[],i,o.sourceSpan,r);this._pushContainer(a,!1),this._popContainer(null,il,null),this.errors.push(hr.create(o.parts[0],i,`Incomplete block "${o.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(o){let e=o.parts[0],t,i;if(this._peek.type!==30){this.errors.push(hr.create(o.parts[0],o.sourceSpan,`Invalid @let declaration "${e}". Declaration must have a value.`));return}else t=this._advance();if(this._peek.type!==31){this.errors.push(hr.create(o.parts[0],o.sourceSpan,`Unterminated @let declaration "${e}". Declaration must be terminated with a semicolon.`));return}else i=this._advance();let r=i.sourceSpan.end,a=new gn(o.sourceSpan.start,r,o.sourceSpan.fullStart),c=o.sourceSpan.toString().lastIndexOf(e),p=o.sourceSpan.start.moveBy(c),u=new gn(p,o.sourceSpan.end),h=new Z1(e,t.parts[0],a,u,t.sourceSpan);this._addToParent(h)}_consumeIncompleteLet(o){let e=o.parts[0]??"",t=e?` "${e}"`:"";if(e.length>0){let i=o.sourceSpan.toString().lastIndexOf(e),r=o.sourceSpan.start.moveBy(i),a=new gn(r,o.sourceSpan.end),c=new gn(o.sourceSpan.start,o.sourceSpan.start.moveBy(0)),p=new Z1(e,"",o.sourceSpan,a,c);this._addToParent(p)}this.errors.push(hr.create(o.parts[0],o.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 o=this._containerStack.length-1;o>-1;o--){let e=this._containerStack[o];if(e instanceof el||e instanceof Va)return e}return null}_addToParent(o){let e=this._getContainer();e===null?this.rootNodes.push(o):e.children.push(o)}_getElementFullName(o,e){let t=this._getPrefix(o,e);return n1(t,o.parts[1])}_getComponentFullName(o,e){let t=o.parts[0],i=this._getComponentTagName(o,e);return i===null?t:i.startsWith(":")?t+i:`${t}:${i}`}_getComponentTagName(o,e){let t=this._getPrefix(o,e),i=o.parts[2];return!t&&!i?null:!t&&i?i:n1(t,i||"ng-component")}_getPrefix(o,e){let t,i;if(o.type===33||o.type===37||o.type===36?(t=o.parts[1],i=o.parts[2]):(t=o.parts[0],i=o.parts[1]),t=t||this._getTagDefinition(i)?.implicitNamespacePrefix||"",!t&&e){let r=e instanceof el?e.name:e.tagName;if(r!==null){let a=Sa(r)[1],c=this._getTagDefinition(a);c!==null&&!c.preventNamespaceInheritance&&(t=gT(r))}}return t}};function dN(n,o){return n.length>0&&n[n.length-1]===o}function mN(n,o){return r0[o]!==void 0?r0[o]||n:/^#x[a-f0-9]+$/i.test(o)?String.fromCodePoint(parseInt(o.slice(2),16)):/^#\d+$/.test(o)?String.fromCodePoint(parseInt(o.slice(1),10)):n}var n6="ngPreserveWhitespaces",pN=new Set(["pre","template","textarea","script","style"]),i6=` \f \r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,GG=new RegExp(`[^${i6}]`),qG=new RegExp(`[${i6}]{2,}`,"g");function uN(n){return n.some(o=>o.name===n6)}function o6(n){return n.replace(new RegExp(t6,"g")," ")}var tx=class{preserveSignificantWhitespace;originalNodeMap;requireContext;icuExpansionDepth=0;constructor(o,e,t=!0){this.preserveSignificantWhitespace=o,this.originalNodeMap=e,this.requireContext=t}visitElement(o,e){if(pN.has(o.name)||uN(o.attrs)){let i=new el(o.name,Cc(this,o.attrs),Cc(this,o.directives),o.children,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid,o.i18n);return this.originalNodeMap?.set(i,o),i}let t=new el(o.name,o.attrs,o.directives,Cc(this,o.children),o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid,o.i18n);return this.originalNodeMap?.set(t,o),t}visitAttribute(o,e){return o.name!==n6?o:null}visitText(o,e){let t=o.value.match(GG),i=e&&(e.prev instanceof $p||e.next instanceof $p);if(this.icuExpansionDepth>0&&this.preserveSignificantWhitespace)return o;if(t||i){let a=o.tokens.map(h=>h.type===5?YG(h):h);if(!this.preserveSignificantWhitespace&&a.length>0){let h=a[0];a.splice(0,1,QG(h,e));let g=a[a.length-1];a.splice(a.length-1,1,XG(g,e))}let c=a6(o.value),p=this.preserveSignificantWhitespace?c:KG(c,e),u=new au(p,o.sourceSpan,a,o.i18n);return this.originalNodeMap?.set(u,o),u}return null}visitComment(o,e){return o}visitExpansion(o,e){this.icuExpansionDepth++;let t;try{t=new $p(o.switchValue,o.type,Cc(this,o.cases),o.sourceSpan,o.switchValueSourceSpan,o.i18n)}finally{this.icuExpansionDepth--}return this.originalNodeMap?.set(t,o),t}visitExpansionCase(o,e){let t=new K1(o.value,Cc(this,o.expression),o.sourceSpan,o.valueSourceSpan,o.expSourceSpan);return this.originalNodeMap?.set(t,o),t}visitBlock(o,e){let t=new il(o.name,o.parameters,Cc(this,o.children),o.sourceSpan,o.nameSpan,o.startSourceSpan,o.endSourceSpan);return this.originalNodeMap?.set(t,o),t}visitBlockParameter(o,e){return o}visitLetDeclaration(o,e){return o}visitComponent(o,e){if(o.tagName&&pN.has(o.tagName)||uN(o.attrs)){let i=new Va(o.componentName,o.tagName,o.fullName,Cc(this,o.attrs),Cc(this,o.directives),o.children,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n);return this.originalNodeMap?.set(i,o),i}let t=new Va(o.componentName,o.tagName,o.fullName,o.attrs,o.directives,Cc(this,o.children),o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n);return this.originalNodeMap?.set(t,o),t}visitDirective(o,e){return o}visit(o,e){if(this.requireContext&&!e)throw new Error("WhitespaceVisitor requires context. Visit via `visitAllWithSiblings` to get this context.");return!1}};function QG(n,o){return n.type!==5||!!o?.prev?n:r6(n,t=>t.trimStart())}function XG(n,o){return n.type!==5||!!o?.next?n:r6(n,t=>t.trimEnd())}function KG(n,o){let e=!o?.prev,t=!o?.next,i=e?n.trimStart():n;return t?i.trimEnd():i}function YG({type:n,parts:o,sourceSpan:e}){return{type:n,parts:[a6(o[0])],sourceSpan:e}}function r6({type:n,parts:o,sourceSpan:e},t){return{type:n,parts:[t(o[0])],sourceSpan:e}}function a6(n){return o6(n).replace(qG," ")}function Cc(n,o){let e=[];return o.forEach((t,i)=>{let r={prev:o[i-1],next:o[i+1]},a=t.visit(n,r);a&&e.push(a)}),e}var hn=(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})(hn||{}),Hp=(function(n){return n[n.Plain=0]="Plain",n[n.TemplateLiteralPart=1]="TemplateLiteralPart",n[n.TemplateLiteralEnd=2]="TemplateLiteralEnd",n})(Hp||{}),ZG=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],s0=class{tokenize(o){return new ZT(o).scan()}},Bs=class{index;end;type;numValue;strValue;constructor(o,e,t,i,r){this.index=o,this.end=e,this.type=t,this.numValue=i,this.strValue=r}isCharacter(o){return this.type===hn.Character&&this.numValue===o}isNumber(){return this.type===hn.Number}isString(){return this.type===hn.String}isOperator(o){return this.type===hn.Operator&&this.strValue===o}isIdentifier(){return this.type===hn.Identifier}isPrivateIdentifier(){return this.type===hn.PrivateIdentifier}isKeyword(){return this.type===hn.Keyword}isKeywordLet(){return this.type===hn.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===hn.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===hn.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===hn.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===hn.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===hn.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===hn.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===hn.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===hn.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===hn.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===hn.Keyword&&this.strValue==="instanceof"}isError(){return this.type===hn.Error}isRegExpBody(){return this.type===hn.RegExpBody}isRegExpFlags(){return this.type===hn.RegExpFlags}toNumber(){return this.type===hn.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===Hp.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===Hp.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case hn.Character:case hn.Identifier:case hn.Keyword:case hn.Operator:case hn.PrivateIdentifier:case hn.String:case hn.Error:case hn.RegExpBody:case hn.RegExpFlags:return this.strValue;case hn.Number:return this.numValue.toString();default:return null}}},c_=class extends Bs{kind;constructor(o,e,t,i){super(o,e,hn.String,0,t),this.kind=i}};function Qg(n,o,e){return new Bs(n,o,hn.Character,e,String.fromCharCode(e))}function JG(n,o,e){return new Bs(n,o,hn.Identifier,0,e)}function eq(n,o,e){return new Bs(n,o,hn.PrivateIdentifier,0,e)}function tq(n,o,e){return new Bs(n,o,hn.Keyword,0,e)}function nm(n,o,e){return new Bs(n,o,hn.Operator,0,e)}function nq(n,o,e){return new Bs(n,o,hn.Number,e,"")}function iq(n,o,e){return new Bs(n,o,hn.Error,0,e)}function oq(n,o,e){return new Bs(n,o,hn.RegExpBody,0,e)}function rq(n,o,e){return new Bs(n,o,hn.RegExpFlags,0,e)}var Xg=new Bs(-1,-1,hn.Character,0,""),ZT=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(o){this.input=o,this.length=o.length,this.advance()}scan(){let o=this.scanToken();for(;o!==null;)this.tokens.push(o),o=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Yr:this.input.charCodeAt(this.index)}scanToken(){let o=this.input,e=this.length,t=this.peek,i=this.index;for(;t<=wF;)if(++i>=e){t=Yr;break}else t=o.charCodeAt(i);if(this.peek=t,this.index=i,i>=e)return null;if(hN(t))return this.scanIdentifier();if(nl(t))return this.scanNumber(i);let r=i;switch(t){case Dp:return this.advance(),nl(this.peek)?this.scanNumber(r):this.peek!==Dp?Qg(r,this.index,Dp):(this.advance(),this.peek===Dp?(this.advance(),nm(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(t)}]`,0));case ja:case Sr:case kc:case bd:case ya:case Sc:case rs:return this.scanCharacter(r,t);case ol:return this.scanOpenBrace(r,t);case Ba:return this.scanCloseBrace(r,t);case W_:case U_:return this.scanString();case ET:return this.advance(),this.scanTemplateLiteralPart(r);case MF:return this.scanPrivateIdentifier();case kF:return this.scanComplexOperator(r,"+",Xr,"=");case F1:return this.scanComplexOperator(r,"-",Xr,"=");case tl:return this.isStartOfRegex()?this.scanRegex(i):this.scanComplexOperator(r,"/",Xr,"=");case XH:return this.scanComplexOperator(r,"%",Xr,"=");case eU:return this.scanOperator(r,"^");case N5:return this.scanStar(r);case F5:return this.scanQuestion(r);case wh:case Ps:return this.scanComplexOperator(r,String.fromCharCode(t),Xr,"=");case TT:return this.scanComplexOperator(r,"!",Xr,"=",Xr,"=");case Xr:return this.scanEquals(r);case N1:return this.scanComplexOperator(r,"&",N1,"&",Xr,"=");case R5:return this.scanComplexOperator(r,"|",R5,"|",Xr,"=");case NF:for(;G_(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(t)}]`,0)}scanCharacter(o,e){return this.advance(),Qg(o,this.index,e)}scanOperator(o,e){return this.advance(),nm(o,this.index,e)}scanOpenBrace(o,e){return this.braceStack.push("expression"),this.advance(),Qg(o,this.index,e)}scanCloseBrace(o,e){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(Qg(o,this.index,Ba)),this.scanTemplateLiteralPart(this.index)):Qg(o,this.index,e)}scanComplexOperator(o,e,t,i,r,a){this.advance();let c=e;return this.peek==t&&(this.advance(),c+=i),r!=null&&this.peek==r&&(this.advance(),c+=a),nm(o,this.index,c)}scanEquals(o){this.advance();let e="=";if(this.peek===Xr)this.advance(),e+="=";else if(this.peek===Ps)return this.advance(),e+=">",nm(o,this.index,e);return this.peek===Xr&&(this.advance(),e+="="),nm(o,this.index,e)}scanIdentifier(){let o=this.index;for(this.advance();fN(this.peek);)this.advance();let e=this.input.substring(o,this.index);return ZG.indexOf(e)>-1?tq(o,this.index,e):JG(o,this.index,e)}scanPrivateIdentifier(){let o=this.index;if(this.advance(),!hN(this.peek))return this.error("Invalid character [#]",-1);for(;fN(this.peek);)this.advance();let e=this.input.substring(o,this.index);return eq(o,this.index,e)}scanNumber(o){let e=this.index===o,t=!1;for(this.advance();;){if(!nl(this.peek))if(this.peek===wm){if(!nl(this.input.charCodeAt(this.index-1))||!nl(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);t=!0}else if(this.peek===Dp)e=!1;else if(aq(this.peek)){if(this.advance(),sq(this.peek)&&this.advance(),!nl(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let i=this.input.substring(o,this.index);t&&(i=i.replace(/_/g,""));let r=e?cq(i):parseFloat(i);return nq(o,this.index,r)}scanString(){let o=this.index,e=this.peek;this.advance();let t="",i=this.index,r=this.input;for(;this.peek!=e;)if(this.peek==jp){let c=this.scanStringBackslash(t,i);if(typeof c!="string")return c;t=c,i=this.index}else{if(this.peek==Yr)return this.error("Unterminated quote",0);this.advance()}let a=r.substring(i,this.index);return this.advance(),new c_(o,this.index,t+a,Hp.Plain)}scanQuestion(o){this.advance();let e="?";return this.peek===F5?(e+="?",this.advance(),this.peek===Xr&&(e+="=",this.advance())):this.peek===Dp&&(e+=".",this.advance()),nm(o,this.index,e)}scanTemplateLiteralPart(o){let e="",t=this.index;for(;this.peek!==ET;)if(this.peek===jp){let r=this.scanStringBackslash(e,t);if(typeof r!="string")return r;e=r,t=this.index}else if(this.peek===fx){let r=this.index;if(this.advance(),this.peek===ol)return this.braceStack.push("interpolation"),this.tokens.push(new c_(o,r,e+this.input.substring(t,r),Hp.TemplateLiteralPart)),this.advance(),nm(r,this.index,this.input.substring(r,this.index))}else{if(this.peek===Yr)return this.error("Unterminated template literal",0);this.advance()}let i=this.input.substring(t,this.index);return this.advance(),new c_(o,this.index,e+i,Hp.TemplateLiteralEnd)}error(o,e){let t=this.index+e;return iq(t,this.index,`Lexer Error: ${o} at column ${t} in expression [${this.input}]`)}scanStringBackslash(o,e){o+=this.input.substring(e,this.index);let t;if(this.advance(),this.peek===IF){let i=this.input.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(i))t=parseInt(i,16);else return this.error(`Invalid unicode escape [\\u${i}]`,0);for(let r=0;r<5;r++)this.advance()}else t=lq(this.peek),this.advance();return o+=String.fromCharCode(t),o}scanStar(o){this.advance();let e="*";return this.peek===N5?(e+="*",this.advance(),this.peek===Xr&&(e+="=",this.advance())):this.peek===Xr&&(e+="=",this.advance()),nm(o,this.index,e)}isStartOfRegex(){if(this.tokens.length===0)return!0;let o=this.tokens[this.tokens.length-1];if(o.isOperator("!")){let e=this.tokens.length>1?this.tokens[this.tokens.length-2]:null;return e===null||e.type!==hn.Identifier&&!e.isCharacter(Sr)&&!e.isCharacter(bd)}return o.type===hn.Operator||o.isCharacter(ja)||o.isCharacter(kc)||o.isCharacter(ya)||o.isCharacter(Sc)}scanRegex(o){this.advance();let e=this.index,t=!1,i=!1;for(;;){let p=this.peek;if(p===Yr)return this.error("Unterminated regular expression",0);if(t)t=!1;else if(p===jp)t=!0;else if(p===kc)i=!0;else if(p===bd)i=!1;else if(p===tl&&!i)break;this.advance()}let r=this.input.substring(e,this.index);this.advance();let a=oq(o,this.index,r),c=this.scanRegexFlags(this.index);return c!==null?(this.tokens.push(a),c):a}scanRegexFlags(o){if(!vm(this.peek))return null;for(;vm(this.peek);)this.advance();return rq(o,this.index,this.input.substring(o,this.index))}};function hN(n){return tu<=n&&n<=f0||Sm<=n&&n<=Gh||n==wm||n==fx}function fN(n){return vm(n)||nl(n)||n==wm||n==fx}function aq(n){return n==nU||n==YH}function sq(n){return n==F1||n==kF}function lq(n){switch(n){case EF:return zp;case $E:return SF;case DF:return zE;case PF:return BE;case AF:return yF;default:return n}}function cq(n){let o=parseInt(n);if(isNaN(o))throw new Error("Invalid integer literal when parsing "+n);return o}var JT=class{strings;expressions;offsets;constructor(o,e,t){this.strings=o,this.expressions=e,this.offsets=t}},eE=class{templateBindings;warnings;errors;constructor(o,e,t){this.templateBindings=o,this.warnings=e,this.errors=t}};function sm(n){return n.start.toString()||"(unknown)"}var nx=class{_lexer;_supportsDirectPipeReferences;constructor(o,e=!1){this._lexer=o,this._supportsDirectPipeReferences=e}parseAction(o,e,t){let i=[];this._checkNoInterpolation(i,o,e);let{stripped:r}=this._stripComments(o),a=this._lexer.tokenize(r),c=new Op(o,e,t,a,1,i,0,this._supportsDirectPipeReferences).parseChain();return new as(c,o,sm(e),t,i)}parseBinding(o,e,t){let i=[],r=this._parseBindingAst(o,e,t,i);return new as(r,o,sm(e),t,i)}checkSimpleExpression(o){let e=new tE;return o.visit(e),e.errors}parseSimpleBinding(o,e,t){let i=[],r=this._parseBindingAst(o,e,t,i),a=this.checkSimpleExpression(r);return a.length>0&&i.push(bh(`Host binding expression cannot contain ${a.join(" ")}`,o,"",e)),new as(r,o,sm(e),t,i)}_parseBindingAst(o,e,t,i){this._checkNoInterpolation(i,o,e);let{stripped:r}=this._stripComments(o),a=this._lexer.tokenize(r);return new Op(o,e,t,a,0,i,0,this._supportsDirectPipeReferences).parseChain()}parseTemplateBindings(o,e,t,i,r){let a=this._lexer.tokenize(e),c=[];return new Op(e,t,r,a,0,c,0,this._supportsDirectPipeReferences).parseTemplateBindings({source:o,span:new As(i,i+o.length)})}parseInterpolation(o,e,t,i){let r=[],{strings:a,expressions:c,offsets:p}=this.splitInterpolation(o,e,r,i);if(c.length===0)return null;let u=[];for(let h=0;hh.text),u,o,sm(e),t,r)}parseInterpolationExpression(o,e,t){let{stripped:i}=this._stripComments(o),r=this._lexer.tokenize(i),a=[],c=new Op(o,e,t,r,0,a,0,this._supportsDirectPipeReferences).parseChain(),p=["",""];return this.createInterpolationAst(p,[c],o,sm(e),t,a)}createInterpolationAst(o,e,t,i,r,a){let c=new Yp(0,t.length),p=new u0(c,c.toAbsolute(r),o,e);return new as(p,t,i,r,a)}splitInterpolation(o,e,t,i){let r=[],a=[],c=[],p=i?dq(i):null,u=0,h=!1,g=!1,y="{{",b="}}";for(;u-1)break;i>-1&&r>-1&&o.push(bh("Got interpolation ({{}}) where expression was expected",e,`at column ${i} in`,t))}_getInterpolationEndIndex(o,e,t){for(let i of this._forEachUnquotedChar(o,t)){if(o.startsWith(e,i))return i;if(o.startsWith("//",i))return o.indexOf(e,i)}return-1}*_forEachUnquotedChar(o,e){let t=null,i=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(o,e){let t=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(t=e),o>t){let i=t;t=o,o=i}return new Yp(o,t)}sourceSpan(o,e){let t=`${o}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(o,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(o,e){this.context|=o;let t=e();return this.context^=o,t}consumeOptionalCharacter(o){return this.next.isCharacter(o)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(o){this.consumeOptionalCharacter(o)||this.error(`Missing expected ${String.fromCharCode(o)}`)}consumeOptionalOperator(o){return this.next.isOperator(o)?(this.advance(),!0):!1}isAssignmentOperator(o){return o.type===hn.Operator&&La.isAssignmentOperation(o.strValue)}expectOperator(o){this.consumeOptionalOperator(o)||this.error(`Missing expected operator ${o}`)}prettyPrintToken(o){return o===Xg?"end of input":`token ${o}`}expectIdentifierOrKeyword(){let o=this.next;return!o.isIdentifier()&&!o.isKeyword()?(o.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(o,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(o)}, expected identifier or keyword`),null):(this.advance(),o.toString())}expectIdentifierOrKeywordOrString(){let o=this.next;return!o.isIdentifier()&&!o.isKeyword()&&!o.isString()?(o.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(o,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(o)}, expected identifier, keyword, or string`),""):(this.advance(),o.toString())}parseChain(){let o=[],e=this.inputIndex;for(;this.index=Sm&&u<=Gh?t1.ReferencedDirectly:t1.ReferencedByName}else p=t1.ReferencedByName;e=new C1(this.span(o),this.sourceSpan(o,a),e,i,c,p,r)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let o=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let t=this.parsePipe(),i;if(this.consumeOptionalCharacter(Sc))i=this.parsePipe();else{let r=this.inputIndex,a=this.input.substring(o,r);this.error(`Conditional expression ${a} requires all 3 expressions`),i=new ba(this.span(o),this.sourceSpan(o))}return new v1(this.span(o),this.sourceSpan(o),e,t,i)}else return e}parseLogicalOr(){let o=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let t=this.parseLogicalAnd();e=new La(this.span(o),this.sourceSpan(o),"||",e,t)}return e}parseLogicalAnd(){let o=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let t=this.parseNullishCoalescing();e=new La(this.span(o),this.sourceSpan(o),"&&",e,t)}return e}parseNullishCoalescing(){let o=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let t=this.parseEquality();e=new La(this.span(o),this.sourceSpan(o),"??",e,t)}return e}parseEquality(){let o=this.inputIndex,e=this.parseRelational();for(;this.next.type==hn.Operator;){let t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();let i=this.parseRelational();e=new La(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseRelational(){let o=this.inputIndex,e=this.parseAdditive();for(;this.next.type==hn.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 i=this.parseAdditive();e=new La(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseAdditive(){let o=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==hn.Operator;){let t=this.next.strValue;switch(t){case"+":case"-":this.advance();let i=this.parseMultiplicative();e=new La(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseMultiplicative(){let o=this.inputIndex,e=this.parseExponentiation();for(;this.next.type==hn.Operator;){let t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let i=this.parseExponentiation();e=new La(this.span(o),this.sourceSpan(o),t,e,i);continue}break}return e}parseExponentiation(){let o=this.inputIndex,e=this.parsePrefix();for(;this.next.type==hn.Operator&&this.next.strValue==="**";){(e instanceof Sh||e instanceof T_||e instanceof E_||e instanceof D_)&&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 La(this.span(o),this.sourceSpan(o),"**",e,t)}return e}parsePrefix(){if(this.next.type==hn.Operator){let o=this.inputIndex,e=this.next.strValue,t;switch(e){case"+":return this.advance(),t=this.parsePrefix(),Sh.createPlus(this.span(o),this.sourceSpan(o),t);case"-":return this.advance(),t=this.parsePrefix(),Sh.createMinus(this.span(o),this.sourceSpan(o),t);case"!":return this.advance(),t=this.parsePrefix(),new T_(this.span(o),this.sourceSpan(o),t)}}else if(this.next.isKeywordTypeof()){let o=this.inputIndex;this.advance();let e=this.parsePrefix();return new E_(this.span(o),this.sourceSpan(o),e)}else if(this.next.isKeywordVoid()){let o=this.inputIndex;this.advance();let e=this.parsePrefix();return new D_(this.span(o),this.sourceSpan(o),e)}return this.parseCallChain()}parseCallChain(){let o=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(Dp))e=this.parseAccessMember(e,o,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(ja)?e=this.parseCall(e,o,!0):e=this.consumeOptionalCharacter(kc)?this.parseKeyedReadOrWrite(e,o,!0):this.parseAccessMember(e,o,!0);else if(this.consumeOptionalCharacter(kc))e=this.parseKeyedReadOrWrite(e,o,!1);else if(this.consumeOptionalCharacter(ja))e=this.parseCall(e,o,!1);else if(this.consumeOptionalOperator("!"))e=new P_(this.span(o),this.sourceSpan(o),e);else if(this.next.isTemplateLiteralEnd())e=this.parseNoInterpolationTaggedTemplateLiteral(e,o);else if(this.next.isTemplateLiteralPart())e=this.parseTaggedTemplateLiteral(e,o);else return e}parsePrimary(){let o=this.inputIndex;if(this.isArrowFunction())return this.parseArrowFunction(o);if(this.consumeOptionalCharacter(ja)){this.rparensExpected++;let e=this.parsePipe();return this.consumeOptionalCharacter(Sr)||(this.error("Missing closing parentheses"),this.consumeOptionalCharacter(Sr)),this.rparensExpected--,new O_(this.span(o),this.sourceSpan(o),e)}else{if(this.next.isKeywordNull())return this.advance(),new os(this.span(o),this.sourceSpan(o),null);if(this.next.isKeywordUndefined())return this.advance(),new os(this.span(o),this.sourceSpan(o),void 0);if(this.next.isKeywordTrue())return this.advance(),new os(this.span(o),this.sourceSpan(o),!0);if(this.next.isKeywordFalse())return this.advance(),new os(this.span(o),this.sourceSpan(o),!1);if(this.next.isKeywordIn())return this.advance(),new os(this.span(o),this.sourceSpan(o),"in");if(this.next.isKeywordThis())return this.advance(),new S_(this.span(o),this.sourceSpan(o));if(this.consumeOptionalCharacter(kc))return this.parseLiteralArray(o);if(this.next.isCharacter(ol))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new Ic(this.span(o),this.sourceSpan(o)),o,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new os(this.span(o),this.sourceSpan(o),e)}else{if(this.next.isTemplateLiteralEnd())return this.parseNoInterpolationTemplateLiteral();if(this.next.isTemplateLiteralPart())return this.parseTemplateLiteral();if(this.next.isString()&&this.next.kind===Hp.Plain){let e=this.next.toString();return this.advance(),new os(this.span(o),this.sourceSpan(o),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new ba(this.span(o),this.sourceSpan(o))):this.next.isRegExpBody()?this.parseRegularExpressionLiteral():this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new ba(this.span(o),this.sourceSpan(o))):(this.error(`Unexpected token ${this.next}`),new ba(this.span(o),this.sourceSpan(o)))}}}parseLiteralArray(o){this.rbracketsExpected++;let e=[];do if(this.next.isOperator("..."))e.push(this.parseSpreadElement());else if(!this.next.isCharacter(bd))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(ya));return this.rbracketsExpected--,this.expectCharacter(bd),new k_(this.span(o),this.sourceSpan(o),e)}parseLiteralMap(){let o=[],e=[],t=this.inputIndex;if(this.expectCharacter(ol),!this.consumeOptionalCharacter(Ba)){this.rbracesExpected++;do{let i=this.inputIndex;if(this.next.isOperator("...")){this.advance(),o.push({kind:"spread",span:this.span(i),sourceSpan:this.sourceSpan(i)}),e.push(this.parsePipe());continue}let r=this.next.isString(),a=this.expectIdentifierOrKeywordOrString(),c=this.span(i),p=this.sourceSpan(i),u={kind:"property",key:a,quoted:r,span:c,sourceSpan:p};o.push(u),r?(this.expectCharacter(Sc),e.push(this.parsePipe())):this.consumeOptionalCharacter(Sc)?e.push(this.parsePipe()):(u.isShorthandInitialized=!0,e.push(new Mc(c,p,p,new Ic(c,p),a)))}while(this.consumeOptionalCharacter(ya)&&!this.next.isCharacter(Ba));this.rbracesExpected--,this.expectCharacter(Ba)}return new Jp(this.span(t),this.sourceSpan(t),o,e)}parseAccessMember(o,e,t){let i=this.inputIndex,r=this.withContext(o_.Writable,()=>{let c=this.expectIdentifierOrKeyword()??"";return c.length===0&&this.error("Expected identifier for property access",o.span.end),c}),a=this.sourceSpan(i);if(t)return this.isAssignmentOperator(this.next)?(this.advance(),this.error("The '?.' operator cannot be used in the assignment"),new ba(this.span(e),this.sourceSpan(e))):new w_(this.span(e),this.sourceSpan(e),a,o,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 ba(this.span(e),this.sourceSpan(e));let p=new Mc(this.span(e),this.sourceSpan(e),a,o,r);this.advance();let u=this.parseConditional();return new La(this.span(e),this.sourceSpan(e),c,p,u)}else return new Mc(this.span(e),this.sourceSpan(e),a,o,r)}parseCall(o,e,t){let i=this.inputIndex;this.rparensExpected++;let r=this.parseCallArguments(),a=this.span(i,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(Sr),this.rparensExpected--;let c=this.span(e),p=this.sourceSpan(e);return t?new b1(c,p,o,r,a):new Ih(c,p,o,r,a)}parseCallArguments(){if(this.next.isCharacter(Sr))return[];let o=[];do o.push(this.next.isOperator("...")?this.parseSpreadElement():this.parsePipe());while(this.consumeOptionalCharacter(ya));return o}parseSpreadElement(){this.next.isOperator("...")||this.error("Spread element must start with '...' operator");let o=this.inputIndex;this.advance();let e=this.parsePipe(),t=this.span(o),i=this.sourceSpan(o);return new x1(t,i,e)}expectTemplateBindingKey(){let o="",e=!1,t=this.currentAbsoluteOffset;do o+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(o+="-");while(e);return{source:o,span:new As(t,t+o.length)}}parseTemplateBindings(o){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(o));this.index{this.rbracketsExpected++;let i=this.parsePipe();if(i instanceof ba&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(bd),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 Zp(this.span(e),this.sourceSpan(e),o,i);this.advance();let c=this.parseConditional();return new La(this.span(e),this.sourceSpan(e),r,a,c)}}else return t?new M_(this.span(e),this.sourceSpan(e),o,i):new Zp(this.span(e),this.sourceSpan(e),o,i);return new ba(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(o){let e=[];this.consumeOptionalCharacter(Sc);let t=this.getDirectiveBoundTarget(),i=this.currentAbsoluteOffset,r=this.parseAsBinding(o);r||(this.consumeStatementTerminator(),i=this.currentAbsoluteOffset);let a=new As(o.span.start,i);return e.push(new uT(a,o,t)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===Xg||this.peekKeywordAs()||this.peekKeywordLet())return null;let o=this.parsePipe(),{start:e,end:t}=o.span,i=this.input.substring(e,t);return new as(o,i,sm(this.parseSourceSpan),this.absoluteOffset+e,this.errors)}parseAsBinding(o){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let t=new As(o.span.start,this.currentAbsoluteOffset);return new N_(t,e,o)}parseLetBinding(){if(!this.peekKeywordLet())return null;let o=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),t=null;this.consumeOptionalOperator("=")&&(t=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let i=new As(o,this.currentAbsoluteOffset);return new N_(i,e,t)}parseNoInterpolationTaggedTemplateLiteral(o,e){let t=this.parseNoInterpolationTemplateLiteral();return new I_(this.span(e),this.sourceSpan(e),o,t)}parseNoInterpolationTemplateLiteral(){let o=this.next.strValue,e=this.inputIndex;this.advance();let t=this.span(e),i=this.sourceSpan(e);return new A_(t,i,[new y1(t,i,o)],[])}parseTaggedTemplateLiteral(o,e){let t=this.parseTemplateLiteral();return new I_(this.span(e),this.sourceSpan(e),o,t)}parseTemplateLiteral(){let o=[],e=[],t=this.inputIndex;for(;this.next!==Xg;){let i=this.next;if(i.isTemplateLiteralPart()||i.isTemplateLiteralEnd()){let r=this.inputIndex;if(this.advance(),o.push(new y1(this.span(r),this.sourceSpan(r),i.strValue)),i.isTemplateLiteralEnd())break}else if(i.isTemplateLiteralInterpolationStart()){this.advance(),this.rbracesExpected++;let r=this.parsePipe();r instanceof ba?this.error("Template literal interpolation cannot be empty"):e.push(r),this.rbracesExpected--}else this.advance()}return new A_(this.span(t),this.sourceSpan(t),o,e)}parseRegularExpressionLiteral(){let o=this.next;if(this.advance(),!o.isRegExpBody())return new ba(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=o.index,i=e?e.end:o.end;return new w1(this.span(t,i),this.sourceSpan(t,i),o.strValue,e?e.strValue:null)}parseArrowFunction(o){let e;if(this.next.isIdentifier()){let i=this.next;this.advance(),e=[this.getArrowFunctionIdentifierArg(i)]}else this.next.isCharacter(ja)?(this.rparensExpected++,this.advance(),e=this.parseArrowFunctionParameters(),this.rparensExpected--):(e=[],this.error(`Unexpected token ${this.next}`));this.expectOperator("=>");let t;if(this.next.isCharacter(ol))this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."),t=new ba(this.span(o),this.sourceSpan(o));else{let i=this.parseFlags;this.parseFlags=1,t=this.parseExpression(),this.parseFlags=i}return new S1(this.span(o),this.sourceSpan(o),e,t)}parseArrowFunctionParameters(){let o=[];if(!this.consumeOptionalCharacter(Sr))for(;this.next!==Xg;)if(this.next.isIdentifier()){let e=this.next;if(this.advance(),o.push(this.getArrowFunctionIdentifierArg(e)),this.consumeOptionalCharacter(Sr))break;this.expectCharacter(ya)}else{this.error(`Unexpected token ${this.next}`);break}return o}getArrowFunctionIdentifierArg(o){return new pT(o.strValue,this.span(o.index),this.sourceSpan(o.index))}isArrowFunction(){let o=this.index,e=this.tokens;if(o>e.length-2)return!1;if(e[o].isIdentifier()&&e[o+1].isOperator("=>"))return!0;if(e[o].isCharacter(ja)){let t=o+1;for(t;t")}return!1}consumeStatementTerminator(){this.consumeOptionalCharacter(rs)||this.consumeOptionalCharacter(ya)}error(o,e=this.index){this.errors.push(bh(o,this.input,this.getErrorLocationText(e),this.parseSourceSpan)),this.skip()}getErrorLocationText(o){return o0&&(e=` ${e} `);let i=sm(t),r=`Parser Error: ${n}${e}[${o}] in ${i}`;return new sn(t,r)}var tE=class extends Ah{errors=[];visitPipe(){this.errors.push("pipes")}};function dq(n){let o=new Map,e=0,t=0,i=0;for(;ic+p.length,0);t+=a,e+=a}o.set(t,e),i++}return o}function mq(n){return n.visit(new nE)}var nE=class{visitUnary(o,e){return`${o.operator}${o.expr.visit(this,e)}`}visitBinary(o,e){return`${o.left.visit(this,e)} ${o.operation} ${o.right.visit(this,e)}`}visitChain(o,e){return o.expressions.map(t=>t.visit(this,e)).join("; ")}visitConditional(o,e){return`${o.condition.visit(this,e)} ? ${o.trueExp.visit(this,e)} : ${o.falseExp.visit(this,e)}`}visitThisReceiver(){return"this"}visitImplicitReceiver(){return""}visitInterpolation(o,e){return uq(o.strings,o.expressions.map(t=>t.visit(this,e))).join("")}visitKeyedRead(o,e){return`${o.receiver.visit(this,e)}[${o.key.visit(this,e)}]`}visitLiteralArray(o,e){return`[${o.expressions.map(t=>t.visit(this,e)).join(", ")}]`}visitLiteralMap(o,e){return`{${pq(o.keys.map(t=>t.kind==="spread"?"...":t.quoted?`'${t.key}'`:t.key),o.values.map(t=>t.visit(this,e))).map(([t,i])=>`${t}: ${i}`).join(", ")}}`}visitLiteralPrimitive(o){if(o.value===null)return"null";switch(typeof o.value){case"number":case"boolean":return o.value.toString();case"undefined":return"undefined";case"string":return`'${o.value.replace(/'/g,"\\'")}'`;default:throw new Error(`Unsupported primitive type: ${o.value}`)}}visitPipe(o,e){return`${o.exp.visit(this,e)} | ${o.name}`}visitPrefixNot(o,e){return`!${o.expression.visit(this,e)}`}visitNonNullAssert(o,e){return`${o.expression.visit(this,e)}!`}visitPropertyRead(o,e){return o.receiver instanceof Ic||o.receiver instanceof S_?o.name:`${o.receiver.visit(this,e)}.${o.name}`}visitSafePropertyRead(o,e){return`${o.receiver.visit(this,e)}?.${o.name}`}visitSafeKeyedRead(o,e){return`${o.receiver.visit(this,e)}?.[${o.key.visit(this,e)}]`}visitCall(o,e){return`${o.receiver.visit(this,e)}(${o.args.map(t=>t.visit(this,e)).join(", ")})`}visitSafeCall(o,e){return`${o.receiver.visit(this,e)}?.(${o.args.map(t=>t.visit(this,e)).join(", ")})`}visitTypeofExpression(o,e){return`typeof ${o.expression.visit(this,e)}`}visitVoidExpression(o,e){return`void ${o.expression.visit(this,e)}`}visitRegularExpressionLiteral(o,e){return`/${o.body}/${o.flags||""}`}visitArrowFunction(o,e){let t;return o.parameters.length===1?t=o.parameters[0].name:t=`(${o.parameters.map(i=>i.name).join(", ")})`,`${t} => ${o.body.visit(this,e)}`}visitASTWithSource(o,e){return o.ast.visit(this,e)}visitTemplateLiteral(o,e){let t="";for(let i=0;i[e,o[t]])}function uq(n,o){let e=[];for(let t=0;t(n.set(o,e),n),new Map),Hh=class extends iE{_schema=new Map;_eventSchema=new Map;constructor(){super(),vq.forEach(o=>{let e=new Map,t=new Set,[i,r]=o.split("|"),a=r.split(","),[c,p]=i.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,g]of u)e.set(h,g);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),hq);break;case"#":e.set(h.substring(1),fq);break;case"%":e.set(h.substring(1),_q);break;default:e.set(h,gq)}})})}hasProperty(o,e,t){if(t.some(a=>a.name===_5.name))return!0;let i=Kg(o);if(i.includes("-")){if(D5(i)||fT(i))return!1;if(t.some(a=>a.name===g5.name))return!0}return(this._schema.get(i)||this._schema.get("unknown")).has(e)}hasElement(o,e){if(e.some(i=>i.name===_5.name))return!0;let t=Kg(o);return t.includes("-")&&(D5(t)||fT(t)||e.some(i=>i.name===g5.name))?!0:this._schema.has(t)}securityContext(o,e,t){t&&(e=this.getMappedPropName(e));let i=Kg(o);e=e.toLowerCase();let r=z$();return r[i+"|"+e]??r["*|"+e]??fi.NONE}getMappedPropName(o){return s6.get(o)??o}getDefaultComponentElementName(){return"ng-component"}validateProperty(o){return o.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${o}' is disallowed for security reasons, please use (${o.slice(2)})=... If '${o}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(o){return o.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${o}' is disallowed for security reasons, please use (${o.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(o){let e=Kg(o),t=this._schema.get(e)||this._schema.get("unknown");return Array.from(t.keys()).map(i=>Cq.get(i)??i)}allKnownEventsOfElement(o){let e=Kg(o);return Array.from(this._eventSchema.get(e)??[])}normalizeAnimationStyleProperty(o){return fH(o)}normalizeAnimationStyleValue(o,e,t){let i="",r=t.toString().trim(),a=null;if(xq(o)&&t!==0&&t!=="0")if(typeof t=="number")i="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+i}}};function xq(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 Zn=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:o,implicitNamespacePrefix:e,contentType:t=yc.PARSABLE_DATA,closedByParent:i=!1,isVoid:r=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:c=!1,canSelfClose:p=!1}={}){o&&o.length>0&&o.forEach(u=>this.closedByChildren[u]=!0),this.isVoid=r,this.closedByParent=i||r,this.implicitNamespacePrefix=e||null,this.contentType=t,this.ignoreFirstLf=a,this.preventNamespaceInheritance=c,this.canSelfClose=p??r}isClosedByChild(o){return this.isVoid||o.toLowerCase()in this.closedByChildren}getContentType(o){return typeof this.contentType=="object"?(o===void 0?void 0:this.contentType[o])??this.contentType.default:this.contentType}},_N,uh;function oE(n){return uh||(_N=new Zn({canSelfClose:!0}),uh=Object.assign(Object.create(null),{base:new Zn({isVoid:!0}),meta:new Zn({isVoid:!0}),area:new Zn({isVoid:!0}),embed:new Zn({isVoid:!0}),link:new Zn({isVoid:!0}),img:new Zn({isVoid:!0}),input:new Zn({isVoid:!0}),param:new Zn({isVoid:!0}),hr:new Zn({isVoid:!0}),br:new Zn({isVoid:!0}),source:new Zn({isVoid:!0}),track:new Zn({isVoid:!0}),wbr:new Zn({isVoid:!0}),p:new Zn({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 Zn({closedByChildren:["tbody","tfoot"]}),tbody:new Zn({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Zn({closedByChildren:["tbody"],closedByParent:!0}),tr:new Zn({closedByChildren:["tr"],closedByParent:!0}),td:new Zn({closedByChildren:["td","th"],closedByParent:!0}),th:new Zn({closedByChildren:["td","th"],closedByParent:!0}),col:new Zn({isVoid:!0}),svg:new Zn({implicitNamespacePrefix:"svg"}),foreignObject:new Zn({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new Zn({implicitNamespacePrefix:"math"}),li:new Zn({closedByChildren:["li"],closedByParent:!0}),dt:new Zn({closedByChildren:["dt","dd"]}),dd:new Zn({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Zn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Zn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Zn({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Zn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Zn({closedByChildren:["optgroup"],closedByParent:!0}),option:new Zn({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Zn({ignoreFirstLf:!0}),listing:new Zn({ignoreFirstLf:!0}),style:new Zn({contentType:yc.RAW_TEXT}),script:new Zn({contentType:yc.RAW_TEXT}),title:new Zn({contentType:{default:yc.ESCAPABLE_RAW_TEXT,svg:yc.PARSABLE_DATA}}),textarea:new Zn({contentType:yc.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Hh().allKnownElementNames().forEach(o=>{!uh[o]&&gT(o)===null&&(uh[o]=new Zn({canSelfClose:!1}))})),uh[n]??uh[n.toLowerCase()]??_N}var vN={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"},rE=class{_placeHolderNameCounts={};_signatureToName={};getStartTagPlaceholderName(o,e,t){let i=this._hashTag(o,e,t);if(this._signatureToName[i])return this._signatureToName[i];let r=o.toUpperCase(),a=vN[r]||`TAG_${r}`,c=this._generateUniqueName(t?a:`START_${a}`);return this._signatureToName[i]=c,c}getCloseTagPlaceholderName(o){let e=this._hashClosingTag(o);if(this._signatureToName[e])return this._signatureToName[e];let t=o.toUpperCase(),i=vN[t]||`TAG_${t}`,r=this._generateUniqueName(`CLOSE_${i}`);return this._signatureToName[e]=r,r}getPlaceholderName(o,e){let t=o.toUpperCase(),i=`PH: ${t}=${e}`;if(this._signatureToName[i])return this._signatureToName[i];let r=this._generateUniqueName(t);return this._signatureToName[i]=r,r}getUniquePlaceholder(o){return this._generateUniqueName(o.toUpperCase())}getStartBlockPlaceholderName(o,e){let t=this._hashBlock(o,e);if(this._signatureToName[t])return this._signatureToName[t];let i=this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(o)}`);return this._signatureToName[t]=i,i}getCloseBlockPlaceholderName(o){let e=this._hashClosingBlock(o);if(this._signatureToName[e])return this._signatureToName[e];let t=this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(o)}`);return this._signatureToName[e]=t,t}_hashTag(o,e,t){let i=`<${o}`,r=Object.keys(e).sort().map(c=>` ${c}=${e[c]}`).join(""),a=t?"/>":`>`;return i+r+a}_hashClosingTag(o){return this._hashTag(`/${o}`,{},!1)}_hashBlock(o,e){let t=e.length===0?"":` (${e.sort().join("; ")})`;return`@${o}${t} {}`}_hashClosingBlock(o){return this._hashBlock(`close_${o}`,[])}_toSnakeCase(o){return o.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_generateUniqueName(o){if(!this._placeHolderNameCounts.hasOwnProperty(o))return this._placeHolderNameCounts[o]=1,o;let t=this._placeHolderNameCounts[o];return this._placeHolderNameCounts[o]=t+1,`${o}_${t}`}},bq=new nx(new s0);function yq(n,o){let e=new aE(bq,n,o);return(t,i,r,a,c)=>e.toI18nMessage(t,i,r,a,c)}function Sq(n,o){return o}var aE=class{_expressionParser;_retainEmptyTokens;_preserveExpressionWhitespace;constructor(o,e,t){this._expressionParser=o,this._retainEmptyTokens=e,this._preserveExpressionWhitespace=t}toI18nMessage(o,e="",t="",i="",r){let a={isIcu:o.length==1&&o[0]instanceof $p,icuDepth:0,placeholderRegistry:new rE,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||Sq},c=xo(this,o,a);return new Ha(c,a.placeholderToContent,a.placeholderToMessage,e,t,i)}visitElement(o,e){return this._visitElementLike(o,e)}visitComponent(o,e){return this._visitElementLike(o,e)}visitDirective(o,e){throw new Error("Unreachable code")}visitAttribute(o,e){let t=o.valueTokens===void 0||o.valueTokens.length===1?new Wg(o.value,o.valueSpan||o.sourceSpan):this._visitTextWithInterpolation(o.valueTokens,o.valueSpan||o.sourceSpan,e,o.i18n);return e.visitNodeFn(o,t)}visitText(o,e){let t=o.tokens.length===1?new Wg(o.value,o.sourceSpan):this._visitTextWithInterpolation(o.tokens,o.sourceSpan,e,o.i18n);return e.visitNodeFn(o,t)}visitComment(o,e){return null}visitExpansion(o,e){e.icuDepth++;let t={},i=new O1(o.switchValue,o.type,t,o.sourceSpan);if(o.cases.forEach(c=>{t[c.value]=new Sd(c.expression.map(p=>p.visit(this,e)),c.expSourceSpan)}),e.icuDepth--,e.isIcu||e.icuDepth>0){let c=e.placeholderRegistry.getUniquePlaceholder(`VAR_${o.type}`);return i.expressionPlaceholder=c,e.placeholderToContent[c]={text:o.switchValue,sourceSpan:o.switchValueSourceSpan},e.visitNodeFn(o,i)}let r=e.placeholderRegistry.getPlaceholderName("ICU",o.sourceSpan.toString());e.placeholderToMessage[r]=this.toI18nMessage([o],"","","",void 0);let a=new Lh(i,r,o.sourceSpan);return e.visitNodeFn(o,a)}visitExpansionCase(o,e){throw new Error("Unreachable code")}visitBlock(o,e){let t=xo(this,o.children,e);if(o.name==="switch")return new Sd(t,o.sourceSpan);let i=o.parameters.map(p=>p.expression),r=e.placeholderRegistry.getStartBlockPlaceholderName(o.name,i),a=e.placeholderRegistry.getCloseBlockPlaceholderName(o.name);e.placeholderToContent[r]={text:o.startSourceSpan.toString(),sourceSpan:o.startSourceSpan},e.placeholderToContent[a]={text:o.endSourceSpan?o.endSourceSpan.toString():"}",sourceSpan:o.endSourceSpan??o.sourceSpan};let c=new gm(o.name,i,r,a,t,o.sourceSpan,o.startSourceSpan,o.endSourceSpan);return e.visitNodeFn(o,c)}visitBlockParameter(o,e){throw new Error("Unreachable code")}visitLetDeclaration(o,e){return null}_visitElementLike(o,e){let t=xo(this,o.children,e),i={},r=g=>{i[g.name]=g.value},a,c;o instanceof el?(a=o.name,c=oE(o.name).isVoid):(a=o.fullName,c=o.tagName?oE(o.tagName).isVoid:!1),o.attrs.forEach(r),o.directives.forEach(g=>g.attrs.forEach(r));let p=e.placeholderRegistry.getStartTagPlaceholderName(a,i,c);e.placeholderToContent[p]={text:o.startSourceSpan.toString(),sourceSpan:o.startSourceSpan};let u="";c||(u=e.placeholderRegistry.getCloseTagPlaceholderName(a),e.placeholderToContent[u]={text:``,sourceSpan:o.endSourceSpan??o.sourceSpan});let h=new fm(a,i,p,u,t,c,o.sourceSpan,o.startSourceSpan,o.endSourceSpan);return e.visitNodeFn(o,h)}_visitTextWithInterpolation(o,e,t,i){let r=[],a=!1;for(let c of o)switch(c.type){case 8:case 17:a=!0;let[p,u,h]=c.parts,g=Eq(u)||"INTERPOLATION",y=t.placeholderRegistry.getPlaceholderName(g,u);if(this._preserveExpressionWhitespace)t.placeholderToContent[y]={text:c.parts.join(""),sourceSpan:c.sourceSpan},r.push(new H_(u,y,c.sourceSpan));else{let b=this.normalizeExpression(c);t.placeholderToContent[y]={text:`${p}${b}${h}`,sourceSpan:c.sourceSpan},r.push(new H_(b,y,c.sourceSpan))}break;default:if(c.parts[0].length>0||this._retainEmptyTokens){let b=r[r.length-1];b instanceof Wg?(b.value+=c.parts[0],b.sourceSpan=new gn(b.sourceSpan.start,c.sourceSpan.end,b.sourceSpan.fullStart,b.sourceSpan.details)):r.push(new Wg(c.parts[0],c.sourceSpan))}else this._retainEmptyTokens&&r.push(new Wg(c.parts[0],c.sourceSpan));break}return a?(wq(r,i),new Sd(r,e)):r[0]}normalizeExpression(o){let e=o.parts[1],t=this._expressionParser.parseBinding(e,o.sourceSpan,o.sourceSpan.start.offset);return mq(t)}};function wq(n,o){if(o instanceof Ha&&(Mq(o),o=o.nodes[0]),o instanceof Sd){kq(o.children,n);for(let e=0;e`"${e.sourceSpan.toString()}"`).join(` `)} Second pass (${o.length} tokens): ${o.map(e=>`"${e.sourceSpan.toString()}"`).join(` `)} `.trim());if(n.some((e,t)=>o[t].constructor!==e.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}var Tq=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;function Eq(n){return n.split(Tq)[2]}var CN=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","iframe|src","object|codebase","object|data"]);function xN(n,o){return n=n.toLowerCase(),o=o.toLowerCase(),CN.has(n+"|"+o)||CN.has("*|"+o)}var Dq=n=>(o,e)=>{let t=n.get(o)??o;return t instanceof kd&&(e instanceof Lh&&t.i18n instanceof Ha&&(e.previousMessage=t.i18n),t.i18n=e),e},ix=class{keepI18nAttrs;enableI18nLegacyMessageIdFormat;preserveSignificantWhitespace;retainEmptyTokens;hasI18nMeta=!1;_errors=[];constructor(o=!1,e=!1,t=!0,i=!t){this.keepI18nAttrs=o,this.enableI18nLegacyMessageIdFormat=e,this.preserveSignificantWhitespace=t,this.retainEmptyTokens=i}_generateI18nMessage(o,e="",t){let{meaning:i,description:r,customId:a}=this._parseMetadata(e),p=yq(this.retainEmptyTokens,this.preserveSignificantWhitespace)(o,i,r,a,t);return this._setMessageId(p,e),this._setLegacyIds(p,e),p}visitAllWithErrors(o){let e=o.map(t=>t.visit(this,null));return new ex(e,this._errors)}visitElement(o){return this._visitElementLike(o),o}visitComponent(o,e){return this._visitElementLike(o),o}visitExpansion(o,e){let t,i=o.i18n;if(this.hasI18nMeta=!0,i instanceof Lh){let r=i.name;t=this._generateI18nMessage([o],i);let a=xF(t);a.name=r,e!==null&&(e.placeholderToMessage[r]=t)}else t=this._generateI18nMessage([o],e||i);return o.i18n=t,o}visitText(o){return o}visitAttribute(o){return o}visitComment(o){return o}visitExpansionCase(o){return o}visitBlock(o,e){return xo(this,o.children,e),o}visitBlockParameter(o,e){return o}visitLetDeclaration(o,e){return o}visitDirective(o,e){return o}_visitElementLike(o){let e;if(HH(o)){this.hasI18nMeta=!0;let t=[],i={};for(let r of o.attrs)if(r.name===vF){let a=o.i18n||r.value,c=new Map,p=this.preserveSignificantWhitespace?o.children:Cc(new tx(!1,c),o.children);e=this._generateI18nMessage(p,a,Dq(c)),e.nodes.length===0&&(e=void 0),o.i18n=e}else if(r.name.startsWith(kT)){let a=r.name.slice(kT.length),c;o instanceof Va?c=o.tagName===null?!1:xN(o.tagName,a):c=xN(o.name,a),c?this._reportError(r,`Translating attribute '${a}' is disallowed for security reasons.`):i[a]=r.value}else t.push(r);if(Object.keys(i).length)for(let r of t){let a=i[r.name];a!==void 0&&r.value&&(r.i18n=this._generateI18nMessage([r],r.i18n||a))}this.keepI18nAttrs||(o.attrs=t)}xo(this,o.children,e)}_parseMetadata(o){return typeof o=="string"?Aq(o):o instanceof Ha?o:{}}_setMessageId(o,e){o.id||(o.id=e instanceof Ha&&e.id||W$(o))}_setLegacyIds(o,e){if(this.enableI18nLegacyMessageIdFormat)o.legacyIds=[U$(o),cF(o)];else if(typeof e!="string"){let t=e instanceof Ha?e:e instanceof Lh?e.previousMessage:void 0;o.legacyIds=t?t.legacyIds:[]}}_reportError(o,e){this._errors.push(new sn(o.sourceSpan,e))}},Pq="|",Iq="@@";function Aq(n=""){let o,e,t;if(n=n.trim(),n){let i=n.indexOf(Iq),r=n.indexOf(Pq),a;[a,o]=i>-1?[n.slice(0,i),n.slice(i+2)]:[n,""],[e,t]=r>-1?[a.slice(0,r),a.slice(r+1)]:["",a]}return{customId:o,meaning:e,description:t}}function Oq(n){let o=[];return n.description?o.push({tagName:"desc",text:n.description}):o.push({tagName:"suppress",text:"{msgDescriptions}"}),n.meaning&&o.push({tagName:"meaning",text:n.meaning}),aH(o)}var Nq="goog.getMsg";function Fq(n,o,e,t){let i=Lq(o),r=[Ee(i)];Object.keys(t).length&&(r.push(HT(LE(t,!0),!0)),r.push(HT({original_code:cl(Object.keys(t).map(p=>({key:h0(p),quoted:!0,value:o.placeholders[p]?Ee(o.placeholders[p].sourceSpan.toString()):Ee(o.placeholderToMessage[p].nodes.map(u=>u.sourceSpan.toString()).join(""))})))})));let a=new Hr(e.name,Jn(Nq).callFn(r),Wl,ca.Final);a.addLeadingComment(Oq(o));let c=new pa(n.set(e));return[a,c]}var sE=class{formatPh(o){return`{$${h0(o)}}`}visitText(o){return o.value}visitContainer(o){return o.children.map(e=>e.visit(this)).join("")}visitIcu(o){return e6(o)}visitTagPlaceholder(o){return o.isVoid?this.formatPh(o.startName):`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitPlaceholder(o){return this.formatPh(o.name)}visitBlockPlaceholder(o){return`${this.formatPh(o.startName)}${o.children.map(e=>e.visit(this)).join("")}${this.formatPh(o.closeName)}`}visitIcuPlaceholder(o,e){return this.formatPh(o.name)}},Rq=new sE;function Lq(n){return n.nodes.map(o=>o.visit(Rq,null)).join("")}function Vq(n,o,e){let{messageParts:t,placeHolders:i}=Bq(o),r=zq(o),a=i.map(u=>e[u.text]),c=cH(o,t,i,a,r),p=n.set(c);return[new pa(p)]}var lE=class{placeholderToMessage;pieces;constructor(o,e){this.placeholderToMessage=o,this.pieces=e}visitText(o){if(this.pieces[this.pieces.length-1]instanceof Vp)this.pieces[this.pieces.length-1].text+=o.value;else{let e=new gn(o.sourceSpan.fullStart,o.sourceSpan.end,o.sourceSpan.fullStart,o.sourceSpan.details);this.pieces.push(new Vp(o.value,e))}}visitContainer(o){o.children.forEach(e=>e.visit(this))}visitIcu(o){this.pieces.push(new Vp(e6(o),o.sourceSpan))}visitTagPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.startName,o.startSourceSpan??o.sourceSpan)),o.isVoid||(o.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(o.closeName,o.endSourceSpan??o.sourceSpan)))}visitPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.name,o.sourceSpan))}visitBlockPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.startName,o.startSourceSpan??o.sourceSpan)),o.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(o.closeName,o.endSourceSpan??o.sourceSpan))}visitIcuPlaceholder(o){this.pieces.push(this.createPlaceholderPiece(o.name,o.sourceSpan,this.placeholderToMessage[o.name]))}createPlaceholderPiece(o,e,t){return new yh(h0(o,!1),e,t)}};function Bq(n){let o=[],e=new lE(n.placeholderToMessage,o);return n.nodes.forEach(t=>t.visit(e)),jq(o)}function zq(n){let o=n.nodes[0],e=n.nodes[n.nodes.length-1];return new gn(o.sourceSpan.fullStart,e.sourceSpan.end,o.sourceSpan.fullStart,o.sourceSpan.details)}function jq(n){let o=[],e=[];n[0]instanceof yh&&o.push($k(n[0].sourceSpan.start));for(let t=0;t{let M=y.has(x.name);return y.add(x.name),!M});let b=g.flatMap(x=>{let M=a.get(x.context);if(M===void 0)throw new Error("AssertionError: Could not find i18n expression's value");return[Ee(x.name),M]});h.i18nAttributesConfig=n.addConst(new Pc(b))}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 l6(n,o,e,t){let i=[],r=new Map;for(let u of t.subMessages){let h=e.get(u),{mainVar:g,statements:y}=l6(n,o,e,h);i.push(...y);let b=r.get(h.messagePlaceholder)??[];b.push(g),r.set(h.messagePlaceholder,b)}qq(t,r),t.params=new Map([...t.params.entries()].sort());let a=Jn(n.pool.uniqueName($q)),c=Kq(n.pool,t.message.id,o,n.i18nUseExternalIds),p;if(t.needsPostprocessing||t.postprocessingParams.size>0){let u=Object.fromEntries([...t.postprocessingParams.entries()].sort()),h=LE(u,!1),g=[];t.postprocessingParams.size>0&&g.push(HT(h,!0)),p=y=>jt(fe.i18nPostprocess).callFn([y,...g])}return i.push(...Qq(t.message,a,c,t.params,p)),{mainVar:a,statements:i}}function qq(n,o){for(let[e,t]of o)t.length===1?n.params.set(e,t[0]):(n.params.set(e,Ee(`${yN}${Hq}${e}${yN}`)),n.postprocessingParams.set(e,Xi(t)))}function Qq(n,o,e,t,i){let r=Object.fromEntries(t),a=[Wq(o),px(Xq(),Fq(o,n,e,r),Vq(o,n,LE(r,!1)))];return i&&a.push(new pa(o.set(i(o)))),a}function Xq(){return p0(Jn(bN)).notIdentical(Ee("undefined",NE)).and(Jn(bN))}function Kq(n,o,e,t){let i,r=e;if(t){let a=SN("EXTERNAL_"),c=n.uniqueName(r);i=`${a}${Ap(o)}$$${c}`}else{let a=SN(r);i=n.uniqueName(a)}return Jn(i)}function Yq(n){for(let o of n.units){let e=null,t=null,i=new Map,r=new Map,a=new Map;for(let c of o.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(i.set(c.xref,e),r.set(c.xref,t),c.icuPlaceholder!==null){let p=wW(n.allocateXrefId(),c.icuPlaceholder,[c.initialValue]);Ke.replace(c,p),a.set(c.xref,p)}else Ke.remove(c);break}for(let c of o.update)switch(c.kind){case V.InterpolateText:if(!i.has(c.target))continue;let p=i.get(c.target),u=r.get(c.target),h=a.get(c.target),g=u?u.context:p.context,y=u?X_.Postproccessing:X_.Creation,b=[];for(let x=0;x0){let t=Jq(e.localRefs);e.localRefs=n.addConst(t)}else e.localRefs=null;break}}function Jq(n){let o=[];for(let e of n)o.push(Ee(e.name),Ee(e.target));return Xi(o)}function eQ(n){for(let o of n.units){let e=wr.HTML;for(let t of o.create)t.kind===V.ElementStart&&t.namespace!==e&&(Ke.insertBefore(gW(t.namespace),t),e=t.namespace)}}function tQ(n){let o=[],e=0,t=0,i=0,r=0,a=0,c=null;for(;e0&&t===0&&i===0){let u=n.substring(r,e-1).trim();o.push(c,u),a=e,r=0,c=null}break}if(c&&r){let p=n.slice(r).trim();o.push(c,p)}return o}function c6(n){return n.replace(/[a-z][A-Z]/g,o=>o.charAt(0)+"-"+o.charAt(1)).toLowerCase()}function nQ(n){let o=new Map;for(let e of n.units)for(let t of e.create)ym(t)&&o.set(t.xref,t);for(let e of n.units)for(let t of e.create)if(t.kind===V.ExtractedAttribute&&t.bindingKind===Ht.Attribute&&jF(t.expression)){let i=o.get(t.target);if(i!==void 0&&(i.kind===V.Template||i.kind===V.ConditionalCreate||i.kind===V.ConditionalBranchCreate)&&i.templateKind===ss.Structural)continue;if(t.name==="style"){let r=tQ(t.expression.value);for(let a=0;a{if(!(!(r instanceof wd)||r.name!==null)){if(!t.has(r.xref))throw new Error(`Variable ${r.xref} not yet named`);r.name=t.get(r.xref)}})}function oQ(n,o){if(n.name===null)switch(n.kind){case Zr.Context:n.name=`ctx_r${o.index++}`;break;case Zr.Identifier:let e=n.identifier===Ls?"i":"";n.name=`${n.identifier}_${e}r${++o.index}`;break;default:n.name=`_r${++o.index}`;break}return n.name}function rQ(n){return n.startsWith("--")?n:c6(n)}function wN(n){let o=n.indexOf("!important");return o>-1?n.substring(0,o):n}function aQ(n){for(let o of n.units){for(let e of o.functions)Hk(e.ops);for(let e of o.create)(e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener)&&Hk(e.handlerOps);Hk(o.update)}}function Hk(n){for(let o of n){if(o.kind!==V.Statement||!(o.statement instanceof pa)||!(o.statement.expr instanceof j1))continue;let e=o.statement.expr.steps,t=!0;for(let i=o.next;i.kind!==V.ListEnd&&t;i=i.next)fr(i,(r,a)=>{if(!Nc(r))return r;if(t&&!(a&Qn.InChildOperation))switch(r.kind){case Zt.NextContext:r.steps+=e,Ke.remove(o),t=!1;break;case Zt.GetCurrentView:case Zt.Reference:case Zt.ContextLetReference:t=!1;break}})}}var sQ="ng-container";function lQ(n){for(let o of n.units){let e=new Set;for(let t of o.create)t.kind===V.ElementStart&&t.tag===sQ&&(t.kind=V.ContainerStart,e.add(t.xref)),t.kind===V.ElementEnd&&e.has(t.xref)&&(t.kind=V.ContainerEnd)}}function cQ(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function dQ(n){let o=new Map;for(let e of n.units)for(let t of e.create)ym(t)&&o.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&&Ke.insertAfter(mW(t.xref),t),(t.kind===V.ElementEnd||t.kind===V.ContainerEnd)&&cQ(o,t.xref).nonBindable&&Ke.insertBefore(pW(t.xref),t)}function wc(n){return o=>o.kind===n}function d_(n,o){return e=>e.kind===n&&o===e.expression instanceof tr}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 pQ(n){return(n.kind===V.Property||n.kind===V.TwoWayProperty)&&!(n.expression instanceof tr)}var uQ=[{test:n=>n.kind===V.Listener&&n.hostListener&&n.isLegacyAnimationListener},{test:mQ}],hQ=[{test:wc(V.StyleMap),transform:ox},{test:wc(V.ClassMap),transform:ox},{test:wc(V.StyleProp)},{test:wc(V.ClassProp)},{test:d_(V.Attribute,!0)},{test:d_(V.Property,!0)},{test:pQ},{test:d_(V.Attribute,!1)},{test:wc(V.Control)}],fQ=[{test:d_(V.DomProperty,!0)},{test:d_(V.DomProperty,!1)},{test:wc(V.Attribute)},{test:wc(V.StyleMap),transform:ox},{test:wc(V.ClassMap),transform:ox},{test:wc(V.StyleProp)},{test:wc(V.ClassProp)}],MN=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 gQ(n){for(let o of n.units){kN(o.create,uQ);let e=o.job.kind===Ot.Host?fQ:hQ;kN(o.update,e)}}function kN(n,o){let e=[],t=null;for(let i of n){let r=K_(i)?i.target:null;(!MN.has(i.kind)||r!==t&&t!==null&&r!==null)&&(Ke.insertBefore(TN(e,o),i),e=[],t=null),MN.has(i.kind)&&(e.push(i),Ke.remove(i),t=r??t)}n.push(TN(e,o))}function TN(n,o){let e=Array.from(o,()=>new Array);for(let t of n){let i=o.findIndex(r=>r.test(t));e[i].push(t)}return e.flatMap((t,i)=>{let r=o[i].transform;return r?r(t):t})}function ox(n){return n.slice(n.length-1)}function _Q(n){for(let o of n.units){let e=KF(o);for(let t of o.ops())if(t.kind===V.Binding){let i=CQ(e,t.target);vQ(t.name)&&i.kind===V.Projection&&Ke.remove(t)}}}function vQ(n){return n.toLowerCase()==="select"}function CQ(n,o){let e=n.get(o);if(e===void 0)throw new Error("All attributes should have an slottable target.");return e}function xQ(n){for(let o of n.units)bQ(o)}function bQ(n){for(let o of n.update)fr(o,(e,t)=>{if(!Nc(e)||e.kind!==Zt.PipeBinding)return;if(t&Qn.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(o.target==null)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");yQ(n,o.target,e)})}function yQ(n,o,e){for(let t=n.create.head.next;t.kind!==V.ListEnd;t=t.next){if(!Qh(t)||t.xref!==o)continue;for(;t.next.kind===V.Pipe;)t=t.next;let i=fW(e.target,e.targetSlot,e.name);Ke.insertBefore(i,t.next);return}throw new Error(`AssertionError: unable to find insertion point for pipe ${e.name}`)}function SQ(n){for(let o of n.units)for(let e of o.update)nr(e,t=>!(t instanceof ou)||t.args.length<=4?t:new e0(t.target,t.targetSlot,t.name,Xi(t.args),t.args.length),Qn.None)}function wQ(n){d6(n.root,0)}function d6(n,o){let e=null;for(let t of n.create)switch(t.kind){case V.I18nStart:t.subTemplateIndex=o===0?null:o,e=t;break;case V.I18nEnd:e.subTemplateIndex===null&&(o=0),e=null;break;case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:o=WC(n.job.views.get(t.xref),e,t.i18nPlaceholder,o);break;case V.RepeaterCreate:let i=n.job.views.get(t.xref);o=WC(i,e,t.i18nPlaceholder,o),t.emptyView!==null&&(o=WC(n.job.views.get(t.emptyView),e,t.emptyI18nPlaceholder,o));break;case V.Projection:t.fallbackView!==null&&(o=WC(n.job.views.get(t.fallbackView),e,t.fallbackViewI18nPlaceholder,o));break}return o}function WC(n,o,e,t){if(e!==void 0){if(o===null)throw Error("Expected template with i18n placeholder to be in an i18n block.");t++,MQ(n,o)}return d6(n,t)}function MQ(n,o){if(n.create.head.next?.kind!==V.I18nStart){let e=n.job.allocateXrefId();Ke.insertAfter(gx(e,o.message,o.root,null),n.create.head),Ke.insertBefore(_x(e,null),n.create.tail)}}function kQ(n){for(let o of n.units)for(let e of o.ops())fr(e,t=>{if(!(t instanceof iu)||t.body===null)return;let i=new cE(t.args.length);t.fn=n.pool.getSharedConstant(i,t.body),t.body=null})}var cE=class extends b_{numArgs;constructor(o){super(),this.numArgs=o}keyOf(o){return o instanceof xm?`param(${o.index})`:super.keyOf(o)}toSharedConstantDeclaration(o,e){let t=[];for(let r=0;rr instanceof xm?Jn("a"+r.index):r,Qn.None);return new Hr(o,new su(t,i),void 0,ca.Final)}};function TQ(n){for(let o of n.units)for(let e of o.update)nr(e,(t,i)=>i&Qn.InChildOperation?t:t instanceof Pc?EQ(t):t instanceof Ql?DQ(t):t,Qn.None)}function EQ(n){let o=[],e=[];for(let t of n.entries){if(t instanceof Xp){if(t.expression.isConstant())o.push(t);else{let i=e.length;e.push(t.expression),o.push(new Xp(new xm(i)))}continue}if(t.isConstant())o.push(t);else{let i=e.length;e.push(t),o.push(new xm(i))}}return new iu(Xi(o),e)}function DQ(n){let o=[],e=[];for(let t of n.entries){if(t instanceof pm){if(t.expression.isConstant())o.push(t);else{let i=e.length;e.push(t.expression),o.push(new pm(new xm(i)))}continue}if(t.value.isConstant())o.push(t);else{let i=e.length;e.push(t.value),o.push(new Eh(t.key,new xm(i),t.quoted))}}return new iu(new Ql(o),e)}function PQ(n){for(let o of n.units)for(let e of o.ops())nr(e,t=>t instanceof Th&&(t.flags===null||!t.flags.includes("g"))?n.pool.getSharedConstant(new dE,t):t,Qn.None)}var dE=class extends b_{toSharedConstantDeclaration(o,e){return new Hr(o,e,void 0,ca.Final)}};function IQ(n,o,e,t,i){return Mm(fe.element,n,o,e,t,i)}function AQ(n,o,e,t,i){return Mm(fe.elementStart,n,o,e,t,i)}function Mm(n,o,e,t,i,r){let a=[Ee(o)];return e!==null&&a.push(Ee(e)),i!==null?a.push(Ee(t),Ee(i)):t!==null&&a.push(Ee(t)),An(n,a,r)}function m6(n,o,e,t,i,r,a,c,p){let u=[Ee(o),e,Ee(t),Ee(i),Ee(r),Ee(a)];for(c!==null&&(u.push(Ee(c)),u.push(jt(fe.templateRefExtractor)));u[u.length-1].isEquivalent(Dh);)u.pop();return An(n,u,p)}function qE(n,o,e,t,i){let r=[Ee(o)];return e instanceof tr?r.push(Xh(e,i)):r.push(e),t!==null&&r.push(t),An(n,r,i)}function OQ(n){return An(fe.elementEnd,[],n)}function NQ(n,o,e,t){return Mm(fe.elementContainerStart,n,null,o,e,t)}function FQ(n,o,e,t){return Mm(fe.elementContainer,n,null,o,e,t)}function RQ(){return An(fe.elementContainerEnd,[],null)}function LQ(n,o,e,t,i,r,a,c){return m6(fe.templateCreate,n,o,e,t,i,r,a,c)}function VQ(){return An(fe.disableBindings,[],null)}function BQ(){return An(fe.enableBindings,[],null)}function zQ(n,o,e,t,i){let r=[Ee(n),o];return e!==null&&r.push(jt(e)),An(t?fe.syntheticHostListener:fe.listener,r,i)}function EN(n,o){return jt(fe.twoWayBindingSet).callFn([n,o])}function jQ(n,o,e){return An(fe.twoWayListener,[Ee(n),o],e)}function $Q(n,o){return An(fe.pipe,[Ee(n),Ee(o)],null)}function HQ(){return An(fe.namespaceHTML,[],null)}function UQ(){return An(fe.namespaceSVG,[],null)}function WQ(){return An(fe.namespaceMathML,[],null)}function GQ(n,o){return An(fe.advance,n>1?[Ee(n)]:[],o)}function qQ(n){return jt(fe.reference).callFn([Ee(n)])}function QQ(n){return jt(fe.nextContext).callFn(n===1?[]:[Ee(n)])}function XQ(){return jt(fe.getCurrentView).callFn([])}function KQ(n){return jt(fe.restoreView).callFn([n])}function YQ(n){return jt(fe.resetView).callFn([n])}function ZQ(n,o,e){let t=[Ee(n,null)];return o!==""&&t.push(Ee(o)),An(fe.text,t,e)}function JQ(n,o,e,t,i,r,a,c,p,u,h){let g=[Ee(n),Ee(o),e??Ee(null),Ee(t),Ee(i),Ee(r),a??Ee(null),c??Ee(null),p?jt(fe.deferEnableTimerScheduling):Ee(null),Ee(h)],y;for(;(y=g[g.length-1])!==null&&y instanceof ma&&y.value===null;)g.pop();return An(fe.defer,g,u)}var eX=new Map([[to.Idle,{none:fe.deferOnIdle,prefetch:fe.deferPrefetchOnIdle,hydrate:fe.deferHydrateOnIdle}],[to.Immediate,{none:fe.deferOnImmediate,prefetch:fe.deferPrefetchOnImmediate,hydrate:fe.deferHydrateOnImmediate}],[to.Timer,{none:fe.deferOnTimer,prefetch:fe.deferPrefetchOnTimer,hydrate:fe.deferHydrateOnTimer}],[to.Hover,{none:fe.deferOnHover,prefetch:fe.deferPrefetchOnHover,hydrate:fe.deferHydrateOnHover}],[to.Interaction,{none:fe.deferOnInteraction,prefetch:fe.deferPrefetchOnInteraction,hydrate:fe.deferHydrateOnInteraction}],[to.Viewport,{none:fe.deferOnViewport,prefetch:fe.deferPrefetchOnViewport,hydrate:fe.deferHydrateOnViewport}],[to.Never,{none:fe.deferHydrateNever,prefetch:fe.deferHydrateNever,hydrate:fe.deferHydrateNever}]]);function tX(n,o,e,t){let i=eX.get(n)?.[e];if(i===void 0)throw new Error(`Unable to determine instruction for trigger ${n}`);return An(i,o,t)}function nX(n){return An(fe.projectionDef,n?[n]:[],null)}function iX(n,o,e,t,i,r,a){let c=[Ee(n)];return(o!==0||e!==null||t!==null)&&(c.push(Ee(o)),e!==null&&c.push(e),t!==null&&(e===null&&c.push(Ee(null)),c.push(Jn(t),Ee(i),Ee(r)))),An(fe.projection,c,a)}function oX(n,o,e,t){let i=[Ee(n),Ee(o)];return e!==null&&i.push(Ee(e)),An(fe.i18nStart,i,t)}function rX(n,o,e,t,i,r,a,c){let p=[Ee(n),o,Ee(e),Ee(t),Ee(i),Ee(r)];for(a!==null&&(p.push(Ee(a)),p.push(jt(fe.templateRefExtractor)));p[p.length-1].isEquivalent(Dh);)p.pop();return An(fe.conditionalCreate,p,c)}function aX(n,o,e,t,i,r,a,c){let p=[Ee(n),o,Ee(e),Ee(t),Ee(i),Ee(r)];for(a!==null&&(p.push(Ee(a)),p.push(jt(fe.templateRefExtractor)));p[p.length-1].isEquivalent(Dh);)p.pop();return An(fe.conditionalBranchCreate,p,c)}function sX(n,o,e,t,i,r,a,c,p,u,h,g,y,b){let x=[Ee(n),Jn(o),Ee(e),Ee(t),Ee(i),Ee(r),a];return(c||p!==null)&&(x.push(Ee(c)),p!==null&&(x.push(Jn(p),Ee(u),Ee(h)),(g!==null||y!==null)&&x.push(Ee(g)),y!==null&&x.push(Ee(y)))),An(fe.repeaterCreate,x,b)}function lX(n,o){return An(fe.repeater,[n],o)}function cX(n,o,e){return n==="prefetch"?An(fe.deferPrefetchWhen,[o],e):n==="hydrate"?An(fe.deferHydrateWhen,[o],e):An(fe.deferWhen,[o],e)}function dX(n,o){return An(fe.declareLet,[Ee(n)],o)}function mX(n,o){return jt(fe.storeLet).callFn([n],o)}function pX(n){return jt(fe.readContextLet).callFn([Ee(n)])}function uX(n,o,e,t){let i=[Ee(n),Ee(o)];return e&&i.push(Ee(e)),An(fe.i18n,i,t)}function hX(n){return An(fe.i18nEnd,[],n)}function fX(n,o){let e=[Ee(n),Ee(o)];return An(fe.i18nAttributes,e,null)}function gX(n,o,e){return qE(fe.ariaProperty,n,o,null,e)}function _X(n,o,e,t){return qE(fe.property,n,o,e,t)}function vX(n){return An(fe.control,[],n)}function CX(n){return An(fe.controlCreate,[],n)}function xX(n,o,e,t){let i=[Ee(n),o];return e!==null&&i.push(e),An(fe.twoWayProperty,i,t)}function bX(n,o,e,t,i){let r=[Ee(n)];return o instanceof tr?r.push(Xh(o,i)):r.push(o),(e!==null||t!==null)&&r.push(e??Ee(null)),t!==null&&r.push(Ee(t)),An(fe.attribute,r,null)}function yX(n,o,e,t){let i=[Ee(n)];return o instanceof tr?i.push(Xh(o,t)):i.push(o),e!==null&&i.push(Ee(e)),An(fe.styleProp,i,t)}function SX(n,o,e){return An(fe.classProp,[Ee(n),o],e)}function wX(n,o){let e=n instanceof tr?Xh(n,o):n;return An(fe.styleMap,[e],o)}function MX(n,o){let e=n instanceof tr?Xh(n,o):n;return An(fe.classMap,[e],o)}function kX(n,o,e,t,i){return Mm(fe.domElement,n,o,e,t,i)}function TX(n,o,e,t,i){return Mm(fe.domElementStart,n,o,e,t,i)}function EX(n){return An(fe.domElementEnd,[],n)}function DX(n,o,e,t){return Mm(fe.domElementContainerStart,n,null,o,e,t)}function PX(n,o,e,t){return Mm(fe.domElementContainer,n,null,o,e,t)}function IX(){return An(fe.domElementContainerEnd,[],null)}function AX(n,o,e,t){let i=[Ee(n),o];return e!==null&&i.push(jt(e)),An(fe.domListener,i,t)}function OX(n,o,e,t,i,r,a,c){return m6(fe.domTemplate,n,o,e,t,i,r,a,c)}var DN=[fe.pipeBind1,fe.pipeBind2,fe.pipeBind3,fe.pipeBind4];function NX(n,o,e){if(e.length<1||e.length>DN.length)throw new Error("pipeBind() argument count out of bounds");let t=DN[e.length-1];return jt(t).callFn([Ee(n),Ee(o),...e])}function FX(n,o,e){return jt(fe.pipeBindV).callFn([Ee(n),Ee(o),e])}function RX(n,o,e){let t=p6(n,o);return YX(QX,[],t,e)}function LX(n,o){return An(fe.i18nExp,[n],o)}function VX(n,o){return An(fe.i18nApply,[Ee(n)],o)}function BX(n,o,e,t){return qE(fe.domProperty,n,o,e,t)}function zX(n,o,e,t){let i=[o];e!==null&&i.push(e);let r=n==="enter"?fe.animationEnter:fe.animationLeave;return An(r,i,t)}function jX(n,o,e,t){let r=[o instanceof tr?Xh(o,t):o];e!==null&&r.push(e);let a=n==="enter"?fe.animationEnter:fe.animationLeave;return An(a,r,t)}function $X(n,o,e,t){let i=[o],r=n==="enter"?fe.animationEnterListener:fe.animationLeaveListener;return An(r,i,t)}function HX(n,o,e){return An(fe.syntheticHostProperty,[Ee(n),o],e)}function UX(n,o,e){return QE(KX,[Ee(n),o],e,null)}function WX(n,o){return An(fe.attachSourceLocations,[Ee(n),o],null)}function GX(n,o,e){return jt(fe.arrowFunction).callFn([Ee(n),o,e])}function p6(n,o){if(n.length<1||o.length!==n.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");let e=[];if(o.length===1&&n[0]===""&&n[1]==="")e.push(o[0]);else{let t;for(t=0;t{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},XX={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}},KX={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 QE(n,o,e,t){let i=n.mapping(e.length),r=e.at(-1);if(e.length>1&&r instanceof ma&&r.value===""&&e.pop(),iu6(n,t),Qn.None),e.kind){case V.Text:Ke.replace(e,ZQ(e.handle.slot,e.initialValue,e.sourceSpan));break;case V.ElementStart:Ke.replace(e,n.job.mode===is.DomOnly?TX(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan):AQ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.Element:Ke.replace(e,n.job.mode===is.DomOnly?kX(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan):IQ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan));break;case V.ElementEnd:Ke.replace(e,n.job.mode===is.DomOnly?EX(e.sourceSpan):OQ(e.sourceSpan));break;case V.ContainerStart:Ke.replace(e,n.job.mode===is.DomOnly?DX(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan):NQ(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan));break;case V.Container:Ke.replace(e,n.job.mode===is.DomOnly?PX(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan):FQ(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan));break;case V.ContainerEnd:Ke.replace(e,n.job.mode===is.DomOnly?IX():RQ());break;case V.I18nStart:Ke.replace(e,oX(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case V.I18nEnd:Ke.replace(e,hX(e.sourceSpan));break;case V.I18n:Ke.replace(e,uX(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");Ke.replace(e,fX(e.handle.slot,e.i18nAttributesConfig));break;case V.Template:if(!(n instanceof sl))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);Ke.replace(e,e.templateKind===ss.Block||n.job.mode===is.DomOnly?OX(e.handle.slot,Jn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan):LQ(e.handle.slot,Jn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.DisableBindings:Ke.replace(e,VQ());break;case V.EnableBindings:Ke.replace(e,BQ());break;case V.Pipe:Ke.replace(e,$Q(e.handle.slot,e.name));break;case V.DeclareLet:Ke.replace(e,dX(e.handle.slot,e.sourceSpan));break;case V.AnimationString:Ke.replace(e,jX(e.animationKind,e.expression,e.sanitizer,e.sourceSpan));break;case V.Animation:let i=GC(n,e.handlerFnName,e.handlerOps,!1);Ke.replace(e,zX(e.animationKind,i,e.sanitizer,e.sourceSpan));break;case V.AnimationListener:let r=GC(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent);Ke.replace(e,$X(e.animationKind,r,null,e.sourceSpan));break;case V.Listener:let a=GC(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent),c=e.eventTarget?ZX.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.`);Ke.replace(e,n.job.mode===is.DomOnly&&!e.hostListener&&!e.isLegacyAnimationListener?AX(e.name,a,c,e.sourceSpan):zQ(e.name,a,c,e.hostListener&&e.isLegacyAnimationListener,e.sourceSpan));break;case V.TwoWayListener:Ke.replace(e,jQ(e.name,GC(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}`);Ke.replace(e,Vs(new Hr(e.variable.name,e.initializer,void 0,ca.Final)));break;case V.Namespace:switch(e.active){case wr.HTML:Ke.replace(e,HQ());break;case wr.SVG:Ke.replace(e,UQ());break;case wr.Math:Ke.replace(e,WQ());break}break;case V.Defer:let p=!!e.loadingMinimumTime||!!e.loadingAfterTime||!!e.placeholderMinimumTime;Ke.replace(e,JQ(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 to.Never:case to.Idle:case to.Immediate:break;case to.Timer:u=[Ee(e.trigger.delay)];break;case to.Viewport:e.modifier==="hydrate"?u=e.trigger.options?[e.trigger.options]:[]:(u=[Ee(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0?u.push(Ee(e.trigger.targetSlotViewSteps)):e.trigger.options&&u.push(Ee(null)),e.trigger.options&&u.push(e.trigger.options));break;case to.Interaction:case to.Hover:e.modifier==="hydrate"?u=[]:(u=[Ee(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0&&u.push(Ee(e.trigger.targetSlotViewSteps)));break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${e.trigger.kind}`)}Ke.replace(e,tX(e.trigger.kind,u,e.modifier,e.sourceSpan));break;case V.ProjectionDef:Ke.replace(e,nX(e.def));break;case V.Projection:if(e.handle.slot===null)throw new Error("No slot was assigned for project instruction");let h=null,g=null,y=null;if(e.fallbackView!==null){if(!(n instanceof sl))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,g=D.decls,y=D.vars}Ke.replace(e,iX(e.handle.slot,e.projectionSlotIndex,e.attributes,h,g,y,e.sourceSpan));break;case V.ConditionalCreate:if(!(n instanceof sl))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);Ke.replace(e,rX(e.handle.slot,Jn(b.fnName),b.decls,b.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.ConditionalBranchCreate:if(!(n instanceof sl))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);Ke.replace(e,aX(e.handle.slot,Jn(x.fnName),x.decls,x.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 sl))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,S=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,S=D.decls,E=D.vars}Ke.replace(e,sX(e.handle.slot,M.fnName,e.decls,e.vars,e.tag,e.attributes,oK(n,e),e.usesComponentInstance,w,S,E,e.emptyTag,e.emptyAttributes,e.wholeSourceSpan));break;case V.SourceLocation:let O=Xi(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 Xi([Ee(D.slot),Ee(N),Ee(P),Ee(L)])}));Ke.replace(e,WX(e.templatePath,O));break;case V.ControlCreate:Ke.replace(e,CX(e.sourceSpan));break;case V.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${V[e.kind]}`)}}function xx(n,o){for(let e of o)switch(nr(e,t=>u6(n,t),Qn.None),e.kind){case V.Advance:Ke.replace(e,GQ(e.delta,e.sourceSpan));break;case V.Property:Ke.replace(e,n.job.mode===is.DomOnly&&e.bindingKind!==Ht.LegacyAnimation&&e.bindingKind!==Ht.Animation?PN(e):nK(e));break;case V.Control:Ke.replace(e,iK(e));break;case V.TwoWayProperty:Ke.replace(e,xX(e.name,e.expression,e.sanitizer,e.sourceSpan));break;case V.StyleProp:Ke.replace(e,yX(e.name,e.expression,e.unit,e.sourceSpan));break;case V.ClassProp:Ke.replace(e,SX(e.name,e.expression,e.sourceSpan));break;case V.StyleMap:Ke.replace(e,wX(e.expression,e.sourceSpan));break;case V.ClassMap:Ke.replace(e,MX(e.expression,e.sourceSpan));break;case V.I18nExpression:Ke.replace(e,LX(e.expression,e.sourceSpan));break;case V.I18nApply:Ke.replace(e,VX(e.handle.slot,e.sourceSpan));break;case V.InterpolateText:Ke.replace(e,RX(e.interpolation.strings,e.interpolation.expressions,e.sourceSpan));break;case V.Attribute:Ke.replace(e,bX(e.name,e.expression,e.sanitizer,e.namespace,e.sourceSpan));break;case V.DomProperty:if(e.expression instanceof tr)throw new Error("not yet handled");e.bindingKind===Ht.LegacyAnimation||e.bindingKind===Ht.Animation?Ke.replace(e,HX(e.name,e.expression,e.sourceSpan)):Ke.replace(e,PN(e));break;case V.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);Ke.replace(e,Vs(new Hr(e.variable.name,e.initializer,void 0,ca.Final)));break;case V.Conditional:if(e.processed===null)throw new Error("Conditional test was not set.");Ke.replace(e,qX(e.processed,e.contextValue,e.sourceSpan));break;case V.Repeater:Ke.replace(e,lX(e.collection,e.sourceSpan));break;case V.DeferWhen:Ke.replace(e,cX(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 PN(n){return BX(JX.get(n.name)??n.name,n.expression,n.sanitizer,n.sourceSpan)}function nK(n){return YF(n.name)?gX(n.name,n.expression,n.sourceSpan):_X(n.name,n.expression,n.sanitizer,n.sourceSpan)}function iK(n){return vX(n.sourceSpan)}function u6(n,o){if(!Nc(o))return o;switch(o.kind){case Zt.NextContext:return QQ(o.steps);case Zt.Reference:return qQ(o.targetSlot.slot+1+o.offset);case Zt.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${o.name}`);case Zt.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case Zt.RestoreView:if(typeof o.view=="number")throw new Error("AssertionError: unresolved RestoreView");return KQ(o.view);case Zt.ResetView:return YQ(o.expr);case Zt.GetCurrentView:return XQ();case Zt.ReadVariable:if(o.name===null)throw new Error(`Read of unnamed variable ${o.xref}`);return Jn(o.name);case Zt.ReadTemporaryExpr:if(o.name===null)throw new Error(`Read of unnamed temporary ${o.xref}`);return Jn(o.name);case Zt.AssignTemporaryExpr:if(o.name===null)throw new Error(`Assign of unnamed temporary ${o.xref}`);return Jn(o.name).set(o.expr);case Zt.PureFunctionExpr:if(o.fn===null)throw new Error("AssertionError: expected PureFunctions to have been extracted");return UX(o.varOffset,o.fn,o.args);case Zt.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case Zt.PipeBinding:return NX(o.targetSlot.slot,o.varOffset,o.args);case Zt.PipeBindingVariadic:return FX(o.targetSlot.slot,o.varOffset,o.args);case Zt.SlotLiteralExpr:return Ee(o.slot.slot);case Zt.ContextLetReference:return pX(o.targetSlot.slot);case Zt.StoreLet:return mX(o.value,o.sourceSpan);case Zt.TrackContext:return Jn("this");case Zt.ArrowFunction:if(o.varOffset===null)throw new Error("AssertionError: variable offset was not assigned to arrow function");return GX(o.varOffset,n.job.pool.getSharedFunctionReference(rK(n,o),"arrowFn"),Jn(Ls));default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${Zt[o.kind]}`)}}function GC(n,o,e,t){xx(n,e);let i=[];for(let a of e){if(a.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[a.kind]}`);i.push(a.statement)}let r=[];return t&&r.push(new Mr("$event",ls)),um(r,i,void 0,void 0,o)}function oK(n,o){if(o.trackByFn!==null)return o.trackByFn;let e=[new Mr("$index",Gp),new Mr("$item",ls)],t;if(o.trackByOps===null)t=o.usesComponentInstance?um(e,[new kr(o.track)]):Rs(e,o.track);else{xx(n,o.trackByOps);let i=[];for(let r of o.trackByOps){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[r.kind]}`);i.push(r.statement)}t=o.usesComponentInstance||i.length!==1||!(i[0]instanceof kr)?um(e,i):Rs(e,i[0].value)}return o.trackByFn=n.job.pool.getSharedFunctionReference(t,"_forTrack"),o.trackByFn}function rK(n,o){xx(n,o.ops);let e=[];for(let i of o.ops){if(i.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[i.kind]}`);e.push(i.statement)}let t=e.length===1&&e[0]instanceof kr?e[0].value:e;return Rs([new Mr(o.contextName,ls),new Mr(o.currentViewName,ls)],Rs(o.parameters,t))}function aK(n){for(let o of n.units)for(let e of o.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 t0&&Ke.remove(e);break}}function sK(n){for(let o of n.units)for(let e of o.create)switch(e.kind){case V.I18nContext:Ke.remove(e);break;case V.I18nStart:e.context=null;break}}function lK(n){for(let o of n.units)for(let e of o.update){if(e.kind!==V.Variable||e.variable.kind!==Zr.Identifier||!(e.initializer instanceof Y_))continue;let t=e.variable.identifier,i=e;for(;i&&i.kind!==V.ListEnd;)nr(i,r=>r instanceof Kr&&r.name===t?Ee(void 0):r,Qn.None),i=i.prev}}function cK(n){for(let o of n.units){let e=new Set;for(let t of o.update)t.kind===V.I18nExpression&&e.add(t.i18nOwner);for(let t of o.create)switch(t.kind){case V.I18nAttributes:if(e.has(t.xref))continue;Ke.remove(t)}}}function dK(n){for(let o of n.units){for(let e of o.functions)m_(o,e.ops);m_(o,o.create),m_(o,o.update)}}function m_(n,o){let e=new Map;e.set(n.xref,Jn(Ls));for(let t of o)switch(t.kind){case V.Variable:t.variable.kind===Zr.Context&&e.set(t.variable.view,new wd(t.xref));break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:m_(n,t.handlerOps);break;case V.RepeaterCreate:t.trackByOps!==null&&m_(n,t.trackByOps);break}n===n.job.root&&e.set(n.xref,Jn(Ls));for(let t of o)nr(t,i=>{if(i instanceof Cm){if(!e.has(i.view))throw new Error(`No context found for reference to view ${i.view} from view ${n.xref}`);return e.get(i.view)}else return i},Qn.None)}function mK(n){for(let o of n.units)for(let e of o.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=o.fnName?.replace("_Template","");e.resolverFn=n.pool.getSharedFunctionReference(e.ownResolverFn,`${t}_Defer_${e.handle.slot}_DepsFn`,!1)}}}function pK(n){for(let o of n.units)IN(o.create),IN(o.update)}function IN(n){for(let o of n)(o.kind===V.Listener||o.kind===V.TwoWayListener||o.kind===V.AnimationListener)&&nr(o,e=>e instanceof Kr&&e.name==="$event"?((o.kind===V.Listener||o.kind===V.AnimationListener)&&(o.consumesDollarEvent=!0),new Gl(e.name)):e,Qn.InChildOperation)}function uK(n){let o=new Map,e=new Map;for(let t of n.units)for(let i of t.create)switch(i.kind){case V.I18nContext:o.set(i.xref,i);break;case V.ElementStart:e.set(i.xref,i);break}xc(n,n.root,o,e)}function xc(n,o,e,t,i){let r=null,a=new Map;for(let c of o.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");AN(c,r.i18nContext,r.i18nBlock,i),i&&c.i18nPlaceholder.closeName&&a.set(c.xref,i),i=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");ON(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");AN(c,r.i18nContext,r.i18nBlock,i),ON(c,r.i18nContext,r.i18nBlock,i),i=void 0}if(c.fallbackView!==null){let y=n.views.get(c.fallbackView);if(c.fallbackViewI18nPlaceholder===void 0)xc(n,y,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");qC(n,y,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,i),xc(n,y,e,t),QC(n,y,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0}}break;case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:let u=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)xc(n,u,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");c.templateKind===ss.Structural?xc(n,u,e,t,c):(qC(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),xc(n,u,e,t),QC(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0)}break;case V.RepeaterCreate:if(i!==void 0)throw Error("AssertionError: Unexpected structural directive associated with @for block");let h=c.handle.slot+1,g=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)xc(n,g,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");qC(n,g,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),xc(n,g,e,t),QC(n,g,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0}if(c.emptyView!==null){let y=c.handle.slot+2,b=n.views.get(c.emptyView);if(c.emptyI18nPlaceholder===void 0)xc(n,b,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");qC(n,b,y,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,i),xc(n,b,e,t),QC(n,b,y,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,i),i=void 0}}break}}function AN(n,o,e,t){let{startName:i,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),Uh(o.params,i,c,e.subTemplateIndex,a)}function ON(n,o,e,t){let{closeName:i}=n.i18nPlaceholder;if(i){let r=ao.ElementTag|ao.CloseTag,a=n.handle.slot;t!==void 0&&(r|=ao.TemplateTag,a={element:a,template:t.handle.slot}),Uh(o.params,i,a,e.subTemplateIndex,r)}}function qC(n,o,e,t,i,r,a){let{startName:c,closeName:p}=t,u=ao.TemplateTag|ao.OpenTag;p||(u|=ao.CloseTag),a!==void 0&&Uh(i.params,c,a.handle.slot,r.subTemplateIndex,u),Uh(i.params,c,e,h6(n,r,o),u)}function QC(n,o,e,t,i,r,a){let{closeName:c}=t,p=ao.TemplateTag|ao.CloseTag;c&&(Uh(i.params,c,e,h6(n,r,o),p),a!==void 0&&Uh(i.params,c,a.handle.slot,r.subTemplateIndex,p))}function h6(n,o,e){for(let t of e.create)if(t.kind===V.I18nStart)return t.subTemplateIndex;return o.subTemplateIndex}function Uh(n,o,e,t,i){let r=n.get(o)??[];r.push({value:e,subTemplateIndex:t,flags:i}),n.set(o,r)}function hK(n){let o=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:o.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 i=new Map,r=a=>a.usage===qh.I18nText?a.i18nOwner:a.context;for(let a of n.units)for(let c of a.update)if(c.kind===V.I18nExpression){let p=i.get(r(c))||0,u=o.get(c.i18nOwner)??null,h={value:p,subTemplateIndex:u,flags:ao.ExpressionIndex};fK(c,h,e,t),i.set(r(c),p+1)}}function fK(n,o,e,t){if(n.i18nPlaceholder!==null){let i=e.get(n.context),r=n.resolutionTime===X_.Creation?i.params:i.postprocessingParams,a=r.get(n.i18nPlaceholder)||[];a.push(o),r.set(n.i18nPlaceholder,a)}n.icuPlaceholder!==null&&t.get(n.icuPlaceholder)?.expressionPlaceholders.push(o)}function gK(n){let o=new Map;for(let e of n.units)for(let t of e.ops())if(t.kind===V.ElementStart||t.kind===V.Template){let i=t.tag??"";switch(t.namespace){case wr.SVG:i=`:${vx}:${i}`;break;case wr.Math:i=`:${Cx}:${i}`;break}o.set(t.xref,i)}for(let e of n.units)for(let t of e.create)if(t.kind===V.ExtractedAttribute&&t.i18nContext!==null&&t.expression!==null){let i=o.get(t.target)??"",r=t.expression;switch(t.securityContext){case fi.HTML:r=jt(fe.sanitizeHtml).callFn([r]);break;case fi.STYLE:r=jt(fe.sanitizeStyle).callFn([r]);break;case fi.SCRIPT:r=jt(fe.sanitizeScript).callFn([r]);break;case fi.URL:r=jt(fe.sanitizeUrl).callFn([r]);break;case fi.RESOURCE_URL:r=jt(fe.sanitizeResourceUrl).callFn([r]);break;case fi.ATTRIBUTE_NO_BINDING:r=jt(fe.validateAttribute).callFn([r,Ee(i),Ee(t.name)]);break}t.expression=r}}function _K(n){for(let o of n.units){for(let e of o.functions)p_(o,e.ops,null);p_(o,o.create,null),p_(o,o.update,null)}}function p_(n,o,e){let t=new Map,i=new Map;for(let r of o)switch(r.kind){case V.Variable:switch(r.variable.kind){case Zr.Identifier:if(r.variable.local){if(i.has(r.variable.identifier))continue;i.set(r.variable.identifier,r.xref)}else if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Zr.Alias:if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Zr.SavedView:e={view:r.variable.view,variable:r.xref};break}break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:p_(n,r.handlerOps,e);break;case V.RepeaterCreate:r.trackByOps!==null&&p_(n,r.trackByOps,e);break}for(let r of o)r.kind===V.Listener||r.kind===V.TwoWayListener||r.kind===V.Animation||r.kind===V.AnimationListener||nr(r,a=>{if(a instanceof Kr)return i.has(a.name)?new wd(i.get(a.name)):t.has(a.name)?new wd(t.get(a.name)):new Fs(new Cm(n.job.root.xref),a.name);if(a instanceof J_&&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 wd(e.variable),a}else return a},Qn.None);for(let r of o)fr(r,a=>{if(a instanceof Kr)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${a.name}`)})}var vK=new Map([[fi.HTML,fe.sanitizeHtml],[fi.RESOURCE_URL,fe.sanitizeResourceUrl],[fi.SCRIPT,fe.sanitizeScript],[fi.STYLE,fe.sanitizeStyle],[fi.URL,fe.sanitizeUrl],[fi.ATTRIBUTE_NO_BINDING,fe.validateAttribute]]),CK=new Map([[fi.HTML,fe.trustConstantHtml],[fi.RESOURCE_URL,fe.trustConstantResourceUrl]]);function xK(n){for(let o of n.units){if(n.kind!==Ot.Host){for(let e of o.create)if(e.kind===V.ExtractedAttribute){let t=CK.get(NN(e.securityContext))??null;e.trustedValueFn=t!==null?jt(t):null}}for(let e of o.update)switch(e.kind){case V.Property:case V.Attribute:case V.DomProperty:case V.TwoWayProperty:let t=null;Array.isArray(e.securityContext)&&e.securityContext.length===2&&e.securityContext.includes(fi.URL)&&e.securityContext.includes(fi.RESOURCE_URL)?t=fe.sanitizeUrlOrResourceUrl:t=vK.get(NN(e.securityContext))??null,e.sanitizer=t!==null?jt(t):null;break}}}function NN(n){if(Array.isArray(n)){if(n.length>1)throw Error("AssertionError: Ambiguous security context");return n[0]||fi.NONE}return n}function bK(n){for(let o of n.units){for(let e of o.functions)FN(n,o,e.ops)&&RN(o,e.ops,Jn(e.currentViewName));o.create.prepend([lm(o.job.allocateXrefId(),{kind:Zr.SavedView,name:null,view:o.xref},new VT,rl.None)]);for(let e of o.create)(e.kind===V.Listener||e.kind===V.TwoWayListener||e.kind===V.Animation||e.kind===V.AnimationListener)&&FN(n,o,e.handlerOps)&&RN(o,e.handlerOps,o.xref)}}function FN(n,o,e){let t=o!==n.root;if(!t)for(let i of e)fr(i,r=>{(r instanceof z1||r instanceof Z_)&&(t=!0)});return t}function RN(n,o,e){o.prepend([lm(n.job.allocateXrefId(),{kind:Zr.Context,name:null,view:n.xref},new J_(e),rl.None)]);for(let t of o)t.kind===V.Statement&&t.statement instanceof kr&&(t.statement.value=new $1(t.statement.value))}function yK(n){let o=new Map;for(let e of n.units){let t=0;for(let i of e.create)Qh(i)&&(i.handle.slot=t,o.set(i.xref,i.handle.slot),t+=i.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 i=n.views.get(t.xref);t.decls=i.decls}}function SK(n){let o=new Set,e=new Map;for(let t of n.units)for(let i of t.ops())i.kind===V.DeclareLet&&e.set(i.xref,i),fr(i,r=>{r instanceof Z_&&o.add(r.target)});for(let t of n.units)for(let i of t.update)nr(i,r=>r instanceof Y_&&!o.has(r.target)?(wK(r)||Ke.remove(e.get(r.target)),r.value):r,Qn.None)}function wK(n){let o=!1;return zt(n,e=>((e instanceof ou||e instanceof e0)&&(o=!0),e),Qn.None),o}function MK(n){let o=new Set;for(let e of n.units)for(let t of e.ops())fr(t,i=>{if(i instanceof vi)switch(i.operator){case st.Exponentiation:kK(i,o);break;case st.NullishCoalesce:TK(i,o);break;case st.And:case st.Or:EK(i,o)}});for(let e of n.units)for(let t of e.ops())nr(t,i=>i instanceof ql?o.has(i)?i:i.expr:i,Qn.None)}function kK(n,o){n.lhs instanceof ql&&n.lhs.expr instanceof Qp&&o.add(n.lhs)}function TK(n,o){n.lhs instanceof ql&&(LN(n.lhs.expr)||n.lhs.expr instanceof Dc)&&o.add(n.lhs),n.rhs instanceof ql&&(LN(n.rhs.expr)||n.rhs.expr instanceof Dc)&&o.add(n.rhs)}function EK(n,o){n.lhs instanceof ql&&n.lhs.expr instanceof vi&&n.lhs.expr.operator===st.NullishCoalesce&&o.add(n.lhs)}function LN(n){return n instanceof vi&&(n.operator===st.And||n.operator===st.Or)}function DK(n){for(let o of n.units)for(let e of o.update)if(e.kind===V.Binding)switch(e.bindingKind){case Ht.ClassName:if(e.expression instanceof tr)throw new Error("Unexpected interpolation in ClassName binding");Ke.replace(e,ZU(e.target,e.name,e.expression,e.sourceSpan));break;case Ht.StyleProperty:Ke.replace(e,YU(e.target,e.name,e.expression,e.unit,e.sourceSpan));break;case Ht.Property:case Ht.Template:e.name==="style"?Ke.replace(e,JU(e.target,e.expression,e.sourceSpan)):e.name==="class"&&Ke.replace(e,eW(e.target,e.expression,e.sourceSpan));break}}function PK(n){for(let o of n.units){o.create.prepend(u_(o.create)),o.update.prepend(u_(o.update));for(let e of o.functions)e.ops.prepend(u_(e.ops))}}function u_(n){let o=0,e=[];for(let t of n){let i=new Map;fr(t,(u,h)=>{h&Qn.InChildOperation||u instanceof bm&&i.set(u.xref,u)});let r=0,a=new Set,c=new Set,p=new Map;fr(t,(u,h)=>{h&Qn.InChildOperation||(u instanceof Fc?(a.has(u.xref)||(a.add(u.xref),p.set(u.xref,`tmp_${o}_${r++}`)),VN(p,u)):u instanceof bm&&(i.get(u.xref)===u&&(c.add(u.xref),r--),VN(p,u)))}),e.push(...Array.from(new Set(p.values())).map(u=>Vs(new Hr(u)))),o++,t.kind===V.Listener||t.kind===V.Animation||t.kind===V.AnimationListener||t.kind===V.TwoWayListener?t.handlerOps.prepend(u_(t.handlerOps)):t.kind===V.RepeaterCreate&&t.trackByOps!==null&&t.trackByOps.prepend(u_(t.trackByOps))}return e}function VN(n,o){let e=n.get(o.xref);if(e===void 0)throw new Error(`Found xref with unassigned name: ${o.xref}`);o.name=e}function IK(n){for(let o of n.units)for(let e of o.create)if(e.kind===V.RepeaterCreate)if(e.track instanceof Gl&&e.track.name==="$index")e.trackByFn=jt(fe.repeaterTrackByIndex);else if(e.track instanceof Gl&&e.track.name==="$item")e.trackByFn=jt(fe.repeaterTrackByIdentity);else if(AK(n.root.xref,e.track))e.usesComponentInstance=!0,e.track.receiver.receiver.view===o.xref?e.trackByFn=e.track.receiver:(e.trackByFn=jt(fe.componentInstance).callFn([]).prop(e.track.receiver.name),e.track=e.trackByFn);else{e.track=zt(e.track,i=>{if(i instanceof ou||i instanceof e0)throw new Error("Illegal State: Pipes are not allowed in this context");return i instanceof Cm?(e.usesComponentInstance=!0,new LT(i.view)):i},Qn.None);let t=new Ke;t.push(Vs(new kr(e.track,e.track.sourceSpan))),e.trackByOps=t}}function AK(n,o){if(!(o instanceof cs)||o.args.length===0||o.args.length>2||!(o.receiver instanceof Fs&&o.receiver.receiver instanceof Cm)||o.receiver.receiver.view!==n)return!1;let[e,t]=o.args;return!(e instanceof Gl)||e.name!=="$index"?!1:o.args.length===1?!0:!(!(t instanceof Gl)||t.name!=="$item")}function OK(n){for(let o of n.units)for(let e of o.create)e.kind===V.RepeaterCreate&&(e.track=zt(e.track,t=>{if(t instanceof Kr){if(e.varNames.$index.has(t.name))return Jn("$index");if(t.name===e.varNames.$implicit)return Jn("$item")}return t},Qn.None))}function NK(n){for(let o of n.units)for(let e of o.create)e.kind===V.TwoWayListener&&nr(e,t=>{if(!(t instanceof H1))return t;let{target:i,value:r}=t;if(i instanceof Fs||i instanceof Md)return EN(i,r).or(i.set(r));if(i instanceof wd)return EN(i,r);throw new Error("Unsupported expression in two-way action binding.")},Qn.InChildOperation)}function FK(n){for(let o of n.units){let e=0;for(let r of o.ops())Vk(r)&&(e+=RK(r));let t=r=>{Nc(r)&&(r instanceof iu||(W5(r)&&(r.varOffset=e),Vk(r)&&(e+=BN(r))))},i=r=>{!Nc(r)||!(r instanceof iu)||(W5(r)&&(r.varOffset=e),Vk(r)&&(e+=BN(r)))};for(let r of o.create)fr(r,t);for(let r of o.update)fr(r,t);for(let r of o.create)fr(r,i);for(let r of o.update)fr(r,i);o.vars=e}if(n instanceof i0)for(let o of n.units)for(let e of o.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 RK(n){let o;switch(n.kind){case V.Attribute:return o=1,n.expression instanceof tr&&!LK(n.expression)&&(o+=n.expression.expressions.length),o;case V.Property:case V.DomProperty:return o=1,n.expression instanceof tr&&(o+=n.expression.expressions.length),o;case V.Control:return 2;case V.TwoWayProperty:return 1;case V.StyleProp:case V.ClassProp:case V.StyleMap:case V.ClassMap:return o=2,n.expression instanceof tr&&(o+=n.expression.expressions.length),o;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 BN(n){switch(n.kind){case Zt.PureFunctionExpr:return 1+n.args.length;case Zt.PipeBinding:return 1+n.args.length;case Zt.PipeBindingVariadic:return 1+n.numArgs;case Zt.StoreLet:case Zt.ArrowFunction:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${n.constructor.name}`)}}function LK(n){return!(n.expressions.length!==1||n.strings.length!==2||n.strings[0]!==""||n.strings[1]!=="")}function VK(n){for(let o of n.units){for(let e of o.functions)Yg(e.ops);Yg(o.create),Yg(o.update);for(let e of o.create)e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener?Yg(e.handlerOps):e.kind===V.RepeaterCreate&&e.trackByOps!==null&&Yg(e.trackByOps);for(let e of o.functions)Zg(e.ops,null),zN(e.ops);for(let e of o.create)e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener?(Zg(e.handlerOps,XC),zN(e.handlerOps)):e.kind===V.RepeaterCreate&&e.trackByOps!==null&&Zg(e.trackByOps,XC);Zg(o.create,XC),Zg(o.update,XC)}}var $r=(function(n){return n[n.None=0]="None",n[n.ViewContextRead=1]="ViewContextRead",n[n.ViewContextWrite=2]="ViewContextWrite",n[n.SideEffectful=4]="SideEffectful",n})($r||{});function XC(n){return!(n&Qn.InArrowFunctionOperation)}function Yg(n){let o=new Map;for(let e of n)e.kind===V.Variable&&e.flags&rl.AlwaysInline&&(fr(e,t=>{if(Nc(t)&&XE(t)!==$r.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),o.set(e.xref,e)),nr(e,t=>t instanceof wd&&o.has(t.xref)?o.get(t.xref).initializer.clone():t,Qn.None);for(let e of o.values())Ke.remove(e)}function Zg(n,o){let e=new Map,t=new Map,i=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,BK(u,o)),zK(u,t,i,o)}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&$r.ViewContextWrite||h.fences&$r.SideEffectful){let g=Vs(u.initializer.toStmt());r.set(g,h),Ke.replace(u,g)}else jK(u,t),Ke.remove(u);r.delete(u),e.delete(u.xref),t.delete(u.xref);continue}h.fences&$r.ViewContextRead&&(a=!0)}let c=[];for(let[u,h]of t){let y=!!(e.get(u).flags&rl.AlwaysInline);h!==1||y||i.has(u)||c.push(u)}let p;for(;p=c.pop();){let u=e.get(p),h=r.get(u);if(!!(u.flags&rl.AlwaysInline))throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let y=u.next;y.kind!==V.ListEnd;y=y.next){let b=r.get(y);if(b.variablesUsed.has(p)){if(!HK(u,y))break;if($K(p,u.initializer,y,h.fences)){b.variablesUsed.delete(p);for(let x of h.variablesUsed)b.variablesUsed.add(x);b.fences|=h.fences,e.delete(p),t.delete(p),r.delete(u),Ke.remove(u)}break}if(!f6(b.fences,h.fences))break}}}function XE(n){switch(n.kind){case Zt.NextContext:return $r.ViewContextRead|$r.ViewContextWrite;case Zt.RestoreView:return $r.ViewContextRead|$r.ViewContextWrite|$r.SideEffectful;case Zt.StoreLet:return $r.SideEffectful;case Zt.Reference:case Zt.ContextLetReference:return $r.ViewContextRead;default:return $r.None}}function BK(n,o){let e=$r.None,t=new Set;return fr(n,(i,r)=>{!Nc(i)||o!==null&&!o(r)||(i.kind===Zt.ReadVariable?t.add(i.xref):e|=XE(i))}),{fences:e,variablesUsed:t}}function zK(n,o,e,t){fr(n,(i,r)=>{if(!Nc(i)||t!==null&&!t(r)||i.kind!==Zt.ReadVariable)return;let a=o.get(i.xref);a!==void 0&&(o.set(i.xref,a+1),r&Qn.InChildOperation&&e.add(i.xref))})}function jK(n,o){fr(n,e=>{if(!Nc(e)||e.kind!==Zt.ReadVariable)return;let t=o.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`);o.set(e.xref,t-1)}})}function f6(n,o){if(n&$r.ViewContextWrite){if(o&$r.ViewContextRead)return!1}else if(n&$r.ViewContextRead&&o&$r.ViewContextWrite)return!1;return!0}function $K(n,o,e,t){let i=!1,r=!0;return nr(e,(a,c)=>{if(!Nc(a)||i||!r)return a;if(c&Qn.InChildOperation&&t&$r.ViewContextRead)return a;switch(a.kind){case Zt.ReadVariable:if(a.xref===n)return i=!0,o;break;default:let p=XE(a);r=r&&f6(p,t);break}return a},Qn.None),i}function HK(n,o){switch(n.variable.kind){case Zr.Identifier:return n.initializer instanceof Gl&&n.initializer.name===Ls;case Zr.Context:return o.kind===V.Variable;default:return!0}}function zN(n){let o=n.head.next,e=n.tail.prev;o!==null&&e!==null&&o.next===e&&o.kind===V.Statement&&o.statement instanceof pa&&o.statement.expr instanceof J_&&e.kind===V.Statement&&e.statement instanceof kr&&e.statement.value instanceof $1&&(Ke.remove(o),e.statement.value=e.statement.value.expr)}function UK(n){for(let o of n.units){let e=null,t=null;for(let i of o.create)switch(i.kind){case V.I18nStart:e=i;break;case V.I18nEnd:e=null;break;case V.IcuStart:e===null&&(t=n.allocateXrefId(),Ke.insertBefore(gx(t,i.message,void 0,null),i));break;case V.IcuEnd:t!==null&&(Ke.insertAfter(_x(t,null),i),t=null);break}}}function WK(n){for(let o of n.units){for(let e of o.create)e.kind!==V.Animation&&e.kind!==V.AnimationListener&&e.kind!==V.Listener&&e.kind!==V.TwoWayListener&&jN(o,e);for(let e of o.update)jN(o,e)}}function jN(n,o){nr(o,(e,t)=>{if(!(e instanceof su)||t&Qn.InChildOperation)return e;if(Array.isArray(e.body))throw new Error("AssertionError: unexpected multi-line arrow function");let i=new BT(e.params,e.body);return n.functions.add(i),i},Qn.None)}var GK=new Set(["formField"]);function qK(n){for(let o of n.units)QK(o)}function QK(n){for(let o of n.update)o.kind===V.Property&&GK.has(o.name)&&ZK(n,o)}var XK=new Set([V.Container,V.ContainerStart,V.ContainerEnd,V.Element,V.ElementStart,V.ElementEnd,V.Template]);function KK(n){return XK.has(n.kind)}function YK(n,o){let e=null;for(let t of n.create)!KK(t)||t.xref!==o||(e=t);return e}function ZK(n,o){let e=YK(n,o.target);if(e===null)throw new Error(`No create instruction found for control target ${o.target}`);let t=kW(o.sourceSpan);Ke.insertAfter(t,e),Ke.insertAfter(aW(o.target,o.sourceSpan),o)}var JK=[{kind:Ot.Tmpl,fn:_Q},{kind:Ot.Both,fn:PQ},{kind:Ot.Host,fn:PG},{kind:Ot.Tmpl,fn:eQ},{kind:Ot.Tmpl,fn:wQ},{kind:Ot.Tmpl,fn:UK},{kind:Ot.Both,fn:ZW},{kind:Ot.Both,fn:DK},{kind:Ot.Both,fn:LW},{kind:Ot.Tmpl,fn:qK},{kind:Ot.Both,fn:QW},{kind:Ot.Both,fn:NW},{kind:Ot.Tmpl,fn:YW},{kind:Ot.Both,fn:nQ},{kind:Ot.Tmpl,fn:aK},{kind:Ot.Both,fn:zW},{kind:Ot.Both,fn:gQ},{kind:Ot.Tmpl,fn:jW},{kind:Ot.Tmpl,fn:xQ},{kind:Ot.Tmpl,fn:JW},{kind:Ot.Tmpl,fn:SQ},{kind:Ot.Both,fn:WK},{kind:Ot.Both,fn:TQ},{kind:Ot.Tmpl,fn:kG},{kind:Ot.Tmpl,fn:MG},{kind:Ot.Tmpl,fn:TG},{kind:Ot.Tmpl,fn:bK},{kind:Ot.Both,fn:EW},{kind:Ot.Both,fn:pK},{kind:Ot.Tmpl,fn:OK},{kind:Ot.Tmpl,fn:lK},{kind:Ot.Both,fn:_K},{kind:Ot.Tmpl,fn:eG},{kind:Ot.Tmpl,fn:NK},{kind:Ot.Tmpl,fn:IK},{kind:Ot.Both,fn:dK},{kind:Ot.Both,fn:xK},{kind:Ot.Tmpl,fn:Zq},{kind:Ot.Both,fn:rG},{kind:Ot.Both,fn:MK},{kind:Ot.Both,fn:PK},{kind:Ot.Both,fn:VK},{kind:Ot.Both,fn:SK},{kind:Ot.Tmpl,fn:Yq},{kind:Ot.Tmpl,fn:KW},{kind:Ot.Tmpl,fn:cK},{kind:Ot.Tmpl,fn:AW},{kind:Ot.Tmpl,fn:PW},{kind:Ot.Tmpl,fn:yK},{kind:Ot.Tmpl,fn:uK},{kind:Ot.Tmpl,fn:hK},{kind:Ot.Tmpl,fn:xG},{kind:Ot.Tmpl,fn:Gq},{kind:Ot.Tmpl,fn:gK},{kind:Ot.Tmpl,fn:EG},{kind:Ot.Both,fn:WW},{kind:Ot.Tmpl,fn:sK},{kind:Ot.Both,fn:FK},{kind:Ot.Tmpl,fn:wG},{kind:Ot.Both,fn:iQ},{kind:Ot.Tmpl,fn:mK},{kind:Ot.Tmpl,fn:aQ},{kind:Ot.Tmpl,fn:lQ},{kind:Ot.Tmpl,fn:oG},{kind:Ot.Tmpl,fn:OW},{kind:Ot.Tmpl,fn:dQ},{kind:Ot.Both,fn:kQ},{kind:Ot.Both,fn:eK},{kind:Ot.Both,fn:BW}];function g6(n,o){for(let e of JK)(e.kind===o||e.kind===Ot.Both)&&e.fn(n)}function eY(n,o){let e=v6(n.root);return _6(n.root,o),e}function _6(n,o){for(let e of n.job.units){if(e.parent!==n.xref)continue;_6(e,o);let t=v6(e);o.statements.push(t.toDeclStmt(t.name))}}function v6(n){if(n.fnName===null)throw new Error(`AssertionError: view ${n.xref} is unnamed`);let o=[];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]}`);o.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=rx(1,o),i=rx(2,e);return um([new Mr(Wh,Gp),new Mr(Ls,ls)],[...t,...i],void 0,void 0,n.fnName)}function rx(n,o){return o.length===0?[]:[px(new vi(st.BitwiseAnd,Jn(Wh),Ee(n)),o)]}function tY(n){if(n.root.fnName===null)throw new Error("AssertionError: host binding function is unnamed");let o=[];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]}`);o.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(o.length===0&&e.length===0)return null;let t=rx(1,o),i=rx(2,e);return um([new Mr(Wh,Gp),new Mr(Ls,ls)],[...t,...i],void 0,void 0,n.root.fnName)}var Up=new Hh,Wp="ng-template",nY="animate.";function i1(n){return n instanceof Ha}function iY(n){return i1(n)&&n.nodes.length===1&&n.nodes[0]instanceof O1}function oY(n,o,e,t,i,r,a,c,p,u){let h=new i0(n,e,t,i,r,a,c,p,u);return Td(h.root,o),h}function rY(n,o,e){let t=new X1(n.componentName,e,is.DomOnly);for(let i of n.properties??[]){let r=Ht.Property;i.name.startsWith("attr.")&&(i.name=i.name.substring(5),r=Ht.Attribute),i.isLegacyAnimation&&(r=Ht.LegacyAnimation),i.isAnimation&&(r=Ht.Animation);let a=o.calcPossibleSecurityContexts(n.componentSelector,i.name,r===Ht.Attribute).filter(c=>c!==fi.NONE);aY(t,i,r,a)}for(let[i,r]of Object.entries(n.attributes)??[]){let a=o.calcPossibleSecurityContexts(n.componentSelector,i,!0).filter(c=>c!==fi.NONE);sY(t,i,r,a)}for(let i of n.events??[])lY(t,i);return t}function aY(n,o,e,t){let i,r=o.expression.ast;r instanceof u0?i=new tr(r.strings,r.expressions.map(a=>zn(a,n,o.sourceSpan)),[]):i=zn(r,n,o.sourceSpan),n.root.update.push(nu(n.root.xref,e,o.name,i,null,t,!1,!1,null,null,o.sourceSpan))}function sY(n,o,e,t){let i=nu(n.root.xref,Ht.Attribute,o,e,null,t,!0,!1,null,null,e.sourceSpan);n.root.update.push(i)}function lY(n,o){let e;if(o.type===$a.Animation)e=GF(n.root.xref,new ua,o.name,null,l0(n.root,o.handler,o.handlerSpan),o.name.endsWith("enter")?"enter":"leave",o.targetOrPhase,!0,o.sourceSpan);else{let[t,i]=o.type!==$a.LegacyAnimation?[null,o.targetOrPhase]:[o.targetOrPhase,null];e=GE(n.root.xref,new ua,o.name,null,l0(n.root,o.handler,o.handlerSpan),t,i,!0,o.sourceSpan)}n.root.create.push(e)}function Td(n,o){for(let e of o)if(e instanceof Ac)cY(n,e);else if(e instanceof Os)dY(n,e);else if(e instanceof Rh)mY(n,e);else if(e instanceof Rp)C6(n,e,null);else if(e instanceof Oh)x6(n,e,null);else if(e instanceof I1)pY(n,e);else if(e instanceof P1)uY(n,e);else if(e instanceof eu)hY(n,e);else if(e instanceof _F)gY(n,e);else if(e instanceof Fh)_Y(n,e);else if(e instanceof RE)CY(n,e);else if(!(e instanceof s_))throw new Error(`Unsupported template node: ${e.constructor.name}`)}function cY(n,o){if(o.i18n!==void 0&&!(o.i18n instanceof Ha||o.i18n instanceof fm))throw Error(`Unhandled i18n metadata type for element: ${o.i18n.constructor.name}`);let e=n.job.allocateXrefId(),[t,i]=Sa(o.name),r=lW(i,e,ZF(t),o.i18n instanceof fm?o.i18n:void 0,o.startSourceSpan,o.sourceSpan);n.create.push(r),bY(n,r,o),S6(r,o);let a=null;o.i18n instanceof Ha&&(a=n.job.allocateXrefId(),n.create.push(gx(a,o.i18n,void 0,o.startSourceSpan))),Td(n,o.children);let c=dW(e,o.endSourceSpan??o.startSourceSpan);n.create.push(c),a!==null&&Ke.insertBefore(_x(a,o.endSourceSpan??o.startSourceSpan),c)}function dY(n,o){if(o.i18n!==void 0&&!(o.i18n instanceof Ha||o.i18n instanceof fm))throw Error(`Unhandled i18n metadata type for template: ${o.i18n.constructor.name}`);let e=n.job.allocateView(n.xref),t=o.tagName,i="";o.tagName&&([i,t]=Sa(o.tagName));let r=o.i18n instanceof fm?o.i18n:void 0,a=ZF(i),c=t===null?"":UW(t,a),p=xY(o)?ss.NgTemplate:ss.Structural,u=$F(e.xref,p,t,c,a,r,o.startSourceSpan,o.sourceSpan);n.create.push(u),yY(n,u,o,p),S6(u,o),Td(e,o.children);for(let{name:h,value:g}of o.variables)e.contextVariables.set(h,g!==""?g:"$implicit");if(p===ss.NgTemplate&&o.i18n instanceof Ha){let h=n.job.allocateXrefId();Ke.insertAfter(gx(h,o.i18n,void 0,o.startSourceSpan),e.create.head),Ke.insertBefore(_x(h,o.endSourceSpan??o.startSourceSpan),e.create.tail)}}function mY(n,o){if(o.i18n!==void 0&&!(o.i18n instanceof fm))throw Error(`Unhandled i18n metadata type for element: ${o.i18n.constructor.name}`);let e=null;o.children.some(r=>!(r instanceof hx)&&(!(r instanceof Rp)||r.value.trim().length>0))&&(e=n.job.allocateView(n.xref),Td(e,o.children));let t=n.job.allocateXrefId(),i=vW(t,o.selector,o.i18n,e?.xref??null,o.sourceSpan);for(let r of o.attributes){let a=Up.securityContext(o.name,r.name,!0);n.update.push(nu(i.xref,Ht.Attribute,r.name,Ee(r.value),null,a,!0,!1,null,yd(r.i18n),r.sourceSpan))}n.create.push(i)}function C6(n,o,e){n.create.push(WF(n.job.allocateXrefId(),o.value,e,o.sourceSpan))}function x6(n,o,e){let t=o.value;if(t instanceof as&&(t=t.ast),!(t instanceof u0))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${t.constructor.name}`);if(o.i18n!==void 0&&!(o.i18n instanceof Sd))throw Error(`Unhandled i18n metadata type for text interpolation: ${o.i18n?.constructor.name}`);let i=o.i18n instanceof Sd?o.i18n.children.filter(a=>a instanceof H_).map(a=>a.name):[];if(i.length>0&&i.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(WF(r,"",e,o.sourceSpan)),n.update.push(QU(r,new tr(t.strings,t.expressions.map(a=>zn(a,n.job,null)),i),o.sourceSpan))}function pY(n,o){let e=null,t=[];for(let i=0;iy.modifier==="none")||h.some(y=>y.modifier==="none")||u.push(rm(c,{kind:to.Idle},"none",null)),n.create.push(u),n.update.push(h)}function fY(n){return Object.keys(n.hydrateTriggers).length>0?1:null}function Uk(n,o,e,t,i,r){if(o.idle!==void 0){let a=rm(r,{kind:to.Idle},n,o.idle.sourceSpan);e.push(a)}if(o.immediate!==void 0){let a=rm(r,{kind:to.Immediate},n,o.immediate.sourceSpan);e.push(a)}if(o.timer!==void 0){let a=rm(r,{kind:to.Timer,delay:o.timer.delay},n,o.timer.sourceSpan);e.push(a)}if(o.hover!==void 0){let a=rm(r,{kind:to.Hover,targetName:o.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,o.hover.sourceSpan);e.push(a)}if(o.interaction!==void 0){let a=rm(r,{kind:to.Interaction,targetName:o.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,o.interaction.sourceSpan);e.push(a)}if(o.viewport!==void 0){let a=rm(r,{kind:to.Viewport,targetName:o.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null,options:o.viewport.options?zn(o.viewport.options,i.job,o.viewport.sourceSpan):null},n,o.viewport.sourceSpan);e.push(a)}if(o.never!==void 0){let a=rm(r,{kind:to.Never},n,o.never.sourceSpan);e.push(a)}if(o.when!==void 0){if(o.when.value instanceof u0)throw new Error("Unexpected interpolation in defer block when trigger");let a=iW(r,zn(o.when.value,i.job,o.when.sourceSpan),n,o.when.sourceSpan);t.push(a)}}function gY(n,o){if(o.i18n instanceof Ha&&iY(o.i18n)){let e=n.job.allocateXrefId();n.create.push(yW(e,o.i18n,xF(o.i18n).name,null));for(let[t,i]of Object.entries(Z(Z({},o.vars),o.placeholders)))i instanceof Oh?x6(n,i,t):C6(n,i,t);n.create.push(SW(e))}else throw Error(`Unhandled i18n metadata type for ICU: ${o.i18n?.constructor.name}`)}function _Y(n,o){let e=n.job.allocateView(n.xref),t=`\u0275$index_${e.xref}`,i=`\u0275$count_${e.xref}`,r=new Set;e.contextVariables.set(o.item.name,o.item.value);for(let S of o.contextVariables)S.value==="$index"&&r.add(S.name),S.name==="$index"?e.contextVariables.set("$index",S.value).set(t,S.value):S.name==="$count"?e.contextVariables.set("$count",S.value).set(i,S.value):e.aliases.add({kind:Zr.Alias,name:null,identifier:S.name,expression:vY(S,t,i)});let a=zr(o.trackBy.span,o.sourceSpan),c=zn(o.trackBy,n.job,a);Td(e,o.children);let p=null,u=null;o.empty!==null&&(p=n.job.allocateView(n.xref),Td(p,o.empty.children),u=ax(n,p.xref,o.empty));let h={$index:r,$implicit:o.item.name};if(o.i18n!==void 0&&!(o.i18n instanceof gm))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(o.empty?.i18n!==void 0&&!(o.empty.i18n instanceof gm))throw Error("AssertionError: Unhandled i18n metadata type or @empty");let g=o.i18n,y=o.empty?.i18n,b=ax(n,e.xref,o),x=cW(e.xref,p?.xref??null,b,c,h,u,g,y,o.startSourceSpan,o.sourceSpan);n.create.push(x);let M=zn(o.expression,n.job,zr(o.expression.span,o.sourceSpan)),w=nW(x.xref,x.handle,M,o.sourceSpan);n.update.push(w)}function vY(n,o,e){switch(n.value){case"$index":return new Kr(o);case"$count":return new Kr(e);case"$first":return new Kr(o).identical(Ee(0));case"$last":return new Kr(o).identical(new Kr(e).minus(Ee(1)));case"$even":return new Kr(o).modulo(Ee(2)).identical(Ee(0));case"$odd":return new Kr(o).modulo(Ee(2)).notIdentical(Ee(0));default:throw new Error(`AssertionError: unknown @for loop variable ${n.value}`)}}function CY(n,o){let e=n.job.allocateXrefId();n.create.push(xW(e,o.name,o.sourceSpan)),n.update.push(rW(e,o.name,zn(o.value,n.job,o.valueSpan),o.sourceSpan))}function zn(n,o,e){if(n instanceof as)return zn(n.ast,o,e);if(n instanceof Mc)return n.receiver instanceof Ic?new Kr(n.name):new Fs(zn(n.receiver,o,e),n.name,null,zr(n.span,e));if(n instanceof Ih){if(n.receiver instanceof Ic)throw new Error("Unexpected ImplicitReceiver");return new cs(zn(n.receiver,o,e),n.args.map(t=>zn(t,o,e)),void 0,zr(n.span,e))}else{if(n instanceof os)return Ee(n.value,void 0,zr(n.span,e));if(n instanceof Sh)switch(n.operator){case"+":return new Qp(f_.Plus,zn(n.expr,o,e),void 0,zr(n.span,e));case"-":return new Qp(f_.Minus,zn(n.expr,o,e),void 0,zr(n.span,e));default:throw new Error(`AssertionError: unknown unary operator ${n.operator}`)}else if(n instanceof La){let t=$W.get(n.operation);if(t===void 0)throw new Error(`AssertionError: unknown binary operator ${n.operation}`);return new vi(t,zn(n.left,o,e),zn(n.right,o,e),void 0,zr(n.span,e))}else{if(n instanceof S_)return new Cm(o.root.xref);if(n instanceof Zp)return new Md(zn(n.receiver,o,e),zn(n.key,o,e),void 0,zr(n.span,e));if(n instanceof Ph)throw new Error("AssertionError: Chain in unknown context");if(n instanceof Jp){let t=n.keys.map((i,r)=>{let a=zn(n.values[r],o,e);return i.kind==="spread"?new pm(a):new Eh(i.key,a,i.quoted)});return new Ql(t,void 0,zr(n.span,e))}else{if(n instanceof k_)return new Pc(n.expressions.map(t=>zn(t,o,e)));if(n instanceof v1)return new Dc(zn(n.condition,o,e),zn(n.trueExp,o,e),zn(n.falseExp,o,e),void 0,zr(n.span,e));if(n instanceof P_)return zn(n.expression,o,e);if(n instanceof C1)return new ou(o.allocateXrefId(),new ua,n.name,[zn(n.exp,o,e),...n.args.map(t=>zn(t,o,e))]);if(n instanceof M_)return new zh(zn(n.receiver,o,e),zn(n.key,o,e),zr(n.span,e));if(n instanceof w_)return new Bh(zn(n.receiver,o,e),n.name);if(n instanceof b1)return new ru(zn(n.receiver,o,e),n.args.map(t=>zn(t,o,e)));if(n instanceof ba)return new t0(zr(n.span,e));if(n instanceof T_)return sH(zn(n.expression,o,e),zr(n.span,e));if(n instanceof E_)return p0(zn(n.expression,o,e));if(n instanceof D_)return new c1(zn(n.expression,o,e),void 0,zr(n.span,e));if(n instanceof A_)return $N(n,o,e);if(n instanceof I_)return new g_(zn(n.tag,o,e),$N(n.template,o,e),void 0,zr(n.span,e));if(n instanceof O_)return new ql(zn(n.expression,o,e),void 0,zr(n.span,e));if(n instanceof w1)return new Th(n.body,n.flags,e);if(n instanceof x1)return new Xp(zn(n.expression,o,e));if(n instanceof S1)return wY(Rs(n.parameters.map(t=>new Mr(t.name,ls)),zn(n.body,o,e)));throw new Error(`Unhandled expression type "${n.constructor.name}" in file "${e?.start.file.url}"`)}}}}function $N(n,o,e){return new v_(n.elements.map(t=>new d1(t.text,zr(t.span,e))),n.expressions.map(t=>zn(t,o,e)),zr(n.span,e))}function mE(n,o,e,t){let i;return o instanceof u0?i=new tr(o.strings,o.expressions.map(r=>zn(r,n,null)),Object.keys(yd(e)?.placeholders??{})):o instanceof no?i=zn(o,n,null):i=Ee(o),i}var b6=new Map([[Di.Property,Ht.Property],[Di.TwoWay,Ht.TwoWayProperty],[Di.Attribute,Ht.Attribute],[Di.Class,Ht.ClassName],[Di.Style,Ht.StyleProperty],[Di.LegacyAnimation,Ht.LegacyAnimation],[Di.Animation,Ht.Animation]]);function xY(n){return Sa(n.tagName??"")[1]===Wp}function yd(n){if(n==null)return null;if(!(n instanceof Ha))throw Error(`Expected i18n meta to be a Message, but got: ${n.constructor.name}`);return n}function bY(n,o,e){let t=new Array,i=new Set;for(let r of e.attributes){let[a,c]=Sa(e.name),p=a;if(!a)switch(o.namespace){case wr.SVG:p=vx;break;case wr.Math:p=Cx;break}let u=Up.securityContext(p?`:${p}:${c}`:c,r.name,!0);t.push(nu(o.xref,Ht.Attribute,r.name,mE(n.job,r.value,r.i18n),null,u,!0,!1,null,yd(r.i18n),r.sourceSpan)),r.i18n&&i.add(r.name)}for(let r of e.inputs)i.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(nu(o.xref,b6.get(r.type),r.name,mE(n.job,c0(r.value),r.i18n),r.unit,r.securityContext,!1,!1,null,yd(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===$a.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");r.type===$a.TwoWay?n.create.push(qF(o.xref,o.handle,r.name,o.tag,y6(n,r.handler,r.handlerSpan),r.sourceSpan)):r.type===$a.Animation?n.create.push(GF(o.xref,o.handle,r.name,o.tag,l0(n,r.handler,r.handlerSpan),r.name.endsWith("enter")?"enter":"leave",r.target,!1,r.sourceSpan)):n.create.push(GE(o.xref,o.handle,r.name,o.tag,l0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))}t.some(r=>r?.i18nMessage)!==null&&n.create.push(QF(n.job.allocateXrefId(),new ua,o.xref))}function yY(n,o,e,t){let i=new Array;for(let r of e.templateAttrs)if(r instanceof Nh){let a=Up.securityContext(Wp,r.name,!0);i.push(YC(n,o.xref,Di.Attribute,r.name,r.value,null,a,!0,t,yd(r.i18n),r.sourceSpan))}else i.push(YC(n,o.xref,r.type,r.name,c0(r.value),r.unit,r.securityContext,!0,t,yd(r.i18n),r.sourceSpan));for(let r of e.attributes){let a=Up.securityContext(Wp,r.name,!0);i.push(YC(n,o.xref,Di.Attribute,r.name,r.value,null,a,!1,t,yd(r.i18n),r.sourceSpan))}for(let r of e.inputs)i.push(YC(n,o.xref,r.type,r.name,c0(r.value),r.unit,r.securityContext,!1,t,yd(r.i18n),r.sourceSpan));n.create.push(i.filter(r=>r?.kind===V.ExtractedAttribute)),n.update.push(i.filter(r=>r?.kind===V.Binding));for(let r of e.outputs){if(r.type===$a.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");if(t===ss.NgTemplate&&(r.type===$a.TwoWay?n.create.push(qF(o.xref,o.handle,r.name,o.tag,y6(n,r.handler,r.handlerSpan),r.sourceSpan)):n.create.push(GE(o.xref,o.handle,r.name,o.tag,l0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))),t===ss.Structural&&r.type!==$a.LegacyAnimation){let a=Up.securityContext(Wp,r.name,!1);n.create.push(al(o.xref,Ht.Property,null,r.name,null,null,null,a))}}i.some(r=>r?.i18nMessage)!==null&&n.create.push(QF(n.job.allocateXrefId(),new ua,o.xref))}function YC(n,o,e,t,i,r,a,c,p,u,h){let g=typeof i=="string";if(p===ss.Structural){if(!c)switch(e){case Di.Property:case Di.Class:case Di.Style:return al(o,Ht.Property,null,t,null,null,u,a);case Di.TwoWay:return al(o,Ht.TwoWayProperty,null,t,null,null,u,a)}if(!g&&(e===Di.Attribute||e===Di.LegacyAnimation||e===Di.Animation))return null}let y=b6.get(e);return p===ss.NgTemplate&&(e===Di.Class||e===Di.Style||e===Di.Attribute&&!g)&&(y=Ht.Property),nu(o,y,t,mE(n.job,i,u),r,a,g,c,p,u,h)}function l0(n,o,e){o=c0(o);let t=new Array,i=o instanceof Ph?o.expressions:[o];if(i.length===0)throw new Error("Expected listener to have non-empty expression list.");let r=i.map(c=>zn(c,n.job,e)),a=r.pop();return t.push(...r.map(c=>Vs(new pa(c,c.sourceSpan)))),t.push(Vs(new kr(a,a.sourceSpan))),t}function y6(n,o,e){o=c0(o);let t=new Array;if(o instanceof Ph)if(o.expressions.length===1)o=o.expressions[0];else throw new Error("Expected two-way listener to have a single expression.");let i=zn(o,n.job,e),r=new Kr("$event"),a=new H1(i,r);return t.push(Vs(new pa(a))),t.push(Vs(new kr(r))),t}function c0(n){return n instanceof as?n.ast:n}function S6(n,o){SY(n.localRefs);for(let{name:e,value:t}of o.references)n.localRefs.push({name:e,target:t})}function SY(n){if(!Array.isArray(n))throw new Error("AssertionError: expected an array")}function zr(n,o){if(o===null)return null;let e=o.start.moveBy(n.start),t=o.start.moveBy(n.end),i=o.fullStart.moveBy(n.start);return new gn(e,t,i)}function ax(n,o,e){let t=null;for(let i of e.children)if(!(i instanceof hx||i instanceof RE)){if(t!==null)return null;if(i instanceof Ac||i instanceof Os&&i.tagName!==null)t=i;else return null}if(t!==null){for(let r of t.attributes)if(!r.name.startsWith(nY)){let a=Up.securityContext(Wp,r.name,!0);n.update.push(nu(o,Ht.Attribute,r.name,Ee(r.value),null,a,!0,!1,null,yd(r.i18n),r.sourceSpan))}for(let r of t.inputs)if(r.type!==Di.LegacyAnimation&&r.type!==Di.Animation&&r.type!==Di.Attribute){let a=Up.securityContext(Wp,r.name,!0);n.create.push(al(o,Ht.Property,null,r.name,null,null,null,a))}let i=t instanceof Ac?t.name:t.tagName;return i===Wp?null:i}return null}function wY(n){let o=new Set(n.params.map(e=>e.name));return zt(n,e=>{if(e instanceof su)for(let t of e.params)o.add(t.name);else if(e instanceof Kr&&o.has(e.name))return Jn(e.name);return e},Qn.None)}var MY=!1;function kY(){return MY}function sx(n,o){return px(Jn(Wh).bitwiseAnd(Ee(n),null),o)}function TY(n){return(n.descendants?1:0)|(n.static?2:0)|(n.emitDistinctChangesOnly?4:0)}function EY(n,o){if(Array.isArray(n.predicate)){let e=[];return n.predicate.forEach(t=>{let i=t.split(",").map(r=>Ee(r.trim()));e.push(...i)}),o.getConstLiteral(Xi(e),!0)}else switch(n.predicate.forwardRef){case 0:case 2:return n.predicate.expression;case 1:return jt(fe.resolveForwardRef).callFn([n.predicate.expression])}}function w6(n,o,e){let t=[];return e!==void 0&&t.push(...e),n.isSignal&&t.push(new Fs(Jn(Ls),n.propertyName)),t.push(EY(n,o),Ee(TY(n))),n.read&&t.push(n.read),t}var KE=Symbol("queryAdvancePlaceholder");function M6(n){let o=[],e=0,t=()=>{e>0&&(o.unshift(jt(fe.queryAdvance).callFn(e===1?[]:[Ee(e)]).toStmt()),e=0)};for(let i=n.length-1;i>=0;i--){let r=n[i];r===KE?e++:(t(),o.unshift(r))}return t(),o}function DY(n,o,e){let t=[],i=[],r=bF(u=>i.push(u),VE),a=null,c=null;n.forEach(u=>{let h=w6(u,o);if(u.isSignal?(a??=jt(fe.viewQuerySignal),a=a.callFn(h)):(c??=jt(fe.viewQuery),c=c.callFn(h)),u.isSignal){i.push(KE);return}let g=r(),y=jt(fe.loadQuery).callFn([]),b=jt(fe.queryRefresh).callFn([g.set(y)]),x=Jn(Ls).prop(u.propertyName).set(u.first?g.prop("first"):g);i.push(b.and(x).toStmt())}),a!==null&&t.push(new pa(a)),c!==null&&t.push(new pa(c));let p=e?`${e}_Query`:null;return um([new Mr(Wh,Gp),new Mr(Ls,ls)],[sx(1,t),sx(2,M6(i))],Wl,null,p)}function PY(n,o,e){let t=[],i=[],r=bF(u=>i.push(u),VE),a=null,c=null;for(let u of n){let h=w6(u,o,[Jn("dirIndex")]);if(u.isSignal?(a??=jt(fe.contentQuerySignal),a=a.callFn(h)):(c??=jt(fe.contentQuery),c=c.callFn(h)),u.isSignal){i.push(KE);continue}let g=r(),y=jt(fe.loadQuery).callFn([]),b=jt(fe.queryRefresh).callFn([g.set(y)]),x=Jn(Ls).prop(u.propertyName).set(u.first?g.prop("first"):g);i.push(b.and(x).toStmt())}a!==null&&t.push(new pa(a)),c!==null&&t.push(new pa(c));let p=e?`${e}_ContentQueries`:null;return um([new Mr(Wh,Gp),new Mr(Ls,ls),new Mr("dirIndex",Gp)],[sx(1,t),sx(2,M6(i))],Wl,null,p)}var pE=class extends WG{constructor(){super(oE)}parse(o,e,t){return super.parse(o,e,t)}},ZC=".",IY="attr",Wk="animate",AY="class",OY="style",NY="*",Gk="animate-",uE=class{_exprParser;_schemaRegistry;errors;constructor(o,e,t){this._exprParser=o,this._schemaRegistry=e,this.errors=t}createBoundHostProperties(o,e){let t=[];for(let i of Object.keys(o)){let r=o[i];typeof r=="string"?this.parsePropertyBinding(i,r,!0,!1,e,e.start.offset,void 0,[],t,e):this._reportError(`Value of the host property binding "${i}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}createDirectiveHostEventAsts(o,e){let t=[];for(let i of Object.keys(o)){let r=o[i];typeof r=="string"?this.parseEvent(i,r,!1,e,e,[],t,e):this._reportError(`Value of the host listener "${i}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}parseInterpolation(o,e,t){let i=e.fullStart.offset;try{let r=this._exprParser.parseInterpolation(o,e,i,t);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,i)}}parseInterpolationExpression(o,e){let t=e.start.offset;try{let i=this._exprParser.parseInterpolationExpression(o,e,t);return i&&this.errors.push(...i.errors),i}catch(i){return this._reportError(`${i}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}parseInlineTemplateBinding(o,e,t,i,r,a,c,p){let u=t.start.offset+NY.length,h=this._parseTemplateBindings(o,e,t,u,i);for(let g of h){let y=im(t,g.sourceSpan),b=g.key.source,x=im(t,g.key.span);if(g instanceof N_){let M=g.value?g.value.source:"$implicit",w=g.value?im(t,g.value.span):void 0;c.push(new hT(b,M,y,x,w))}else if(g.value){let M=p?y:t,w=im(t,g.value.ast.sourceSpan);this._parsePropertyAst(b,g.value,!1,M,x,w,r,a)}else r.push([b,""]),this.parseLiteralAttr(b,null,x,i,void 0,r,a,x)}}_parseTemplateBindings(o,e,t,i,r){try{let a=this._exprParser.parseTemplateBindings(o,e,t,i,r);return a.errors.forEach(c=>this.errors.push(c)),a.warnings.forEach(c=>{this._reportError(c,t,cm.WARNING)}),a.templateBindings}catch(a){return this._reportError(`${a}`,t),[]}}parseLiteralAttr(o,e,t,i,r,a,c,p){qk(o)?(o=o.substring(1),p!==void 0&&(p=im(p,new As(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,cm.ERROR),this._parseLegacyAnimation(o,e,t,i,p,r,a,c)):c.push(new _h(o,this._exprParser.wrapLiteralPrimitive(e,"",i),bc.LITERAL_ATTR,t,p,r))}parsePropertyBinding(o,e,t,i,r,a,c,p,u,h){o.length===0&&this._reportError("Property name is missing in binding",r);let g=!1;o.startsWith(Gk)?(g=!0,o=o.substring(Gk.length),h!==void 0&&(h=im(h,new As(h.start.offset+Gk.length,h.end.offset)))):qk(o)&&(g=!0,o=o.substring(1),h!==void 0&&(h=im(h,new As(h.start.offset+1,h.end.offset)))),g?this._parseLegacyAnimation(o,e,r,a,h,c,p,u):o.startsWith(`${Wk}${ZC}`)?this._parseAnimation(o,this.parseBinding(e,t,c||r,a),r,h,c,p,u):this._parsePropertyAst(o,this.parseBinding(e,t,c||r,a),i,r,h,c,p,u)}parsePropertyInterpolation(o,e,t,i,r,a,c,p){let u=this.parseInterpolation(e,i||t,p);return u?(this._parsePropertyAst(o,u,!1,t,c,i,r,a),!0):!1}_parsePropertyAst(o,e,t,i,r,a,c,p){c.push([o,e.source]),p.push(new _h(o,e,t?bc.TWO_WAY:bc.DEFAULT,i,r,a))}_parseAnimation(o,e,t,i,r,a,c){a.push([o,e.source]),c.push(new _h(o,e,bc.ANIMATION,t,i,r))}_parseLegacyAnimation(o,e,t,i,r,a,c,p){o.length===0&&this._reportError("Animation trigger is missing",t);let u=this.parseBinding(e||"undefined",!1,a||t,i);c.push([o,u.source]),p.push(new _h(o,u,bc.LEGACY_ANIMATION,t,r,a))}parseBinding(o,e,t,i){try{let r=e?this._exprParser.parseSimpleBinding(o,t,i):this._exprParser.parseBinding(o,t,i);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,t),this._exprParser.wrapLiteralPrimitive("ERROR",t,i)}}createBoundElementProperty(o,e,t=!1,i=!0){if(e.isLegacyAnimation)return new k1(e.name,Di.LegacyAnimation,fi.NONE,e.expression,null,e.sourceSpan,e.keySpan,e.valueSpan);let r=null,a,c=null,p=e.name.split(ZC),u;if(p.length>1)if(p[0]==IY){c=p.slice(1).join(ZC),t||this._validatePropertyOrAttributeName(c,e.sourceSpan,!0),u=Qk(this._schemaRegistry,o,c,!0);let h=c.indexOf(":");if(h>-1){let g=c.substring(0,h),y=c.substring(h+1);c=n1(g,y)}a=Di.Attribute}else p[0]==AY?(c=p[1],a=Di.Class,u=[fi.NONE]):p[0]==OY?(r=p.length>2?p[2]:null,c=p[1],a=Di.Style,u=[fi.STYLE]):p[0]==Wk&&(c=e.name,a=Di.Animation,u=[fi.NONE]);if(c===null){let h=this._schemaRegistry.getMappedPropName(e.name);c=i?h:e.name,u=Qk(this._schemaRegistry,o,h,!1),a=e.type===bc.TWO_WAY?Di.TwoWay:Di.Property,t||this._validatePropertyOrAttributeName(h,e.sourceSpan,!1)}return new k1(c,a,u[0],e.expression,r,e.sourceSpan,e.keySpan,e.valueSpan)}parseEvent(o,e,t,i,r,a,c,p){o.length===0&&this._reportError("Event name is missing in binding",i),qk(o)?(o=o.slice(1),p!==void 0&&(p=im(p,new As(p.start.offset+1,p.end.offset))),this._parseLegacyAnimationEvent(o,e,i,r,c,p)):this._parseRegularEvent(o,e,t,i,r,a,c,p)}calcPossibleSecurityContexts(o,e,t){let i=this._schemaRegistry.getMappedPropName(e);return Qk(this._schemaRegistry,o,i,t)}parseEventListenerName(o){let[e,t]=gH(o,[null,o]);return{eventName:t,target:e}}parseLegacyAnimationEventName(o){let e=_H(o,[o,null]);return{eventName:e[0],phase:e[1]===null?null:e[1].toLowerCase()}}_parseLegacyAnimationEvent(o,e,t,i,r,a){let{eventName:c,phase:p}=this.parseLegacyAnimationEventName(o),u=this._parseAction(e,i);r.push(new M1(c,p,$a.LegacyAnimation,u,t,i,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(o,e,t,i,r,a,c,p){let{eventName:u,target:h}=this.parseEventListenerName(o),g=this.errors.length,y=this._parseAction(e,r),b=this.errors.length===g;a.push([o,y.source]),t&&b&&!this._isAllowedAssignmentEvent(y)&&this._reportError("Unsupported expression in a two-way binding",i);let x=$a.Regular;t&&(x=$a.TwoWay),o.startsWith(`${Wk}${ZC}`)&&(x=$a.Animation),c.push(new M1(u,h,x,y,i,r,p))}_parseAction(o,e){let t=e&&e.start?e.start.offset:0;try{let i=this._exprParser.parseAction(o,e,t);return i&&this.errors.push(...i.errors),!i||i.ast instanceof ba?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)):i}catch(i){return this._reportError(`${i}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}_reportError(o,e,t=cm.ERROR){this.errors.push(new sn(e,o,t))}_validatePropertyOrAttributeName(o,e,t){let i=t?this._schemaRegistry.validateAttribute(o):this._schemaRegistry.validateProperty(o);i.error&&this._reportError(i.msg,e,cm.ERROR)}_isAllowedAssignmentEvent(o){return o instanceof as?this._isAllowedAssignmentEvent(o.ast):o instanceof P_?this._isAllowedAssignmentEvent(o.expression):o instanceof Ih&&o.args.length===1&&o.receiver instanceof Mc&&o.receiver.name==="$any"&&o.receiver.receiver instanceof Ic?this._isAllowedAssignmentEvent(o.args[0]):(o instanceof Mc||o instanceof Zp)&&!hE(o)}};function hE(n){return n instanceof w_||n instanceof M_?!0:n instanceof O_?hE(n.expression):n instanceof Mc||n instanceof Zp||n instanceof Ih?hE(n.receiver):!1}function qk(n){return n[0]=="@"}function Qk(n,o,e,t){let i,[r,a]=o?Sa(o,!1):[null,o],c=u=>{let[h,g]=Sa(u,!1),y=h??r,b=y?`:${y}:${g}`:g;return n.securityContext(b,e,t)},p=n.allKnownElementNames();return a===null?i=p.map(c):(i=[],Mh.parse(a).forEach(u=>{let h=u.element?[u.element]:p;if(u.element&&!n.hasElement(u.element,[])){let b=`:${vx}:${u.element}`,x=`:${Cx}:${u.element}`;n.hasElement(b,[])?h=[b]:n.hasElement(x,[])&&(h=[x])}let g=new Set(u.notSelectors.filter(b=>b.isElementSelector()).map(b=>b.element?.toLowerCase())),y=h.filter(b=>{let x=b.toLowerCase();return!g.has(x)&&!g.has(Sa(x)[1])});i.push(...y.map(c))})),i.length===0?[fi.NONE]:Array.from(new Set(i)).sort()}function im(n,o){let e=o.start-n.start.offset,t=o.end-n.end.offset;return new gn(n.start.moveBy(e),n.end.moveBy(t),n.fullStart.moveBy(e),n.details)}function FY(n){if(n==null||n.length===0||n[0]=="/")return!1;let o=n.match(RY);return o===null||o[1]=="package"||o[1]=="asset"}var RY=/^([^:/?#]+):/,LY="select",VY="link",BY="rel",zY="href",jY="stylesheet",$Y="style",HY=new Set([":svg:script","script"]),UY="ngNonBindable",WY="ngProjectAs";function k6(n){let o=null,e=null,t=null,i=!1,r="";for(let p of n.attrs){let u=p.name.toLowerCase();u==LY?o=p.value:u==zY?e=p.value:u==BY?t=p.value:p.name==UY?i=!0:p.name==WY&&p.value.length>0&&(r=p.value)}o||="*";let a=n.name.toLowerCase(),c=Is.OTHER;return fT(a)?c=Is.NG_CONTENT:$Y===a?c=Is.STYLE:HY.has(a)?c=Is.SCRIPT:a==VY&&t==jY&&(c=Is.STYLESHEET),new fE(c,o,e,i,r)}var Is=(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})(Is||{}),fE=class{type;selectAttr;hrefAttr;nonBindable;projectAs;constructor(o,e,t,i,r){this.type=o,this.selectAttr=e,this.hrefAttr=t,this.nonBindable=i,this.projectAs=r}},GY=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,qY=/^track\s+([\S\s]*)/,QY=/^(as\s+)(.*)/,bx=/^else[^\S\r\n]+if/,XY=/^let\s+([\S\s]*)/,KY=/^[$A-Z_][0-9A-Z_$]*$/i,HN=/(\s*)(\S+)(\s*)/,h_=new Set(["$index","$first","$last","$even","$odd","$count"]);function UN(n){return n==="empty"}function WN(n){return n==="else"||bx.test(n)}function YY(n,o,e,t){let i=iZ(o),r=[],a=GN(n,i,t);a!==null&&r.push(new Bp(a.expression,xo(e,n.children,n.children),a.expressionAlias,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan,n.i18n));for(let g of o)if(bx.test(g.name)){let y=GN(g,i,t);if(y!==null){let b=xo(e,g.children,g.children);r.push(new Bp(y.expression,b,y.expressionAlias,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan,g.i18n))}}else if(g.name==="else"){let y=xo(e,g.children,g.children);r.push(new Bp(null,y,null,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan,g.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 I1(r,u,n.startSourceSpan,p,n.nameSpan),errors:i}}function ZY(n,o,e,t){let i=[],r=eZ(n,i,t),a=null,c=null;for(let p of o)p.name==="empty"?c!==null?i.push(new sn(p.sourceSpan,"@for loop can only have one @empty block")):p.parameters.length>0?i.push(new sn(p.sourceSpan,"@empty block cannot have parameters")):c=new z_(xo(e,p.children,p.children),p.sourceSpan,p.startSourceSpan,p.endSourceSpan,p.nameSpan,p.i18n):i.push(new sn(p.sourceSpan,`Unrecognized @for loop block "${p.name}"`));if(r!==null)if(r.trackBy===null)i.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);tZ(r.trackBy.expression,r.trackBy.keywordSpan,i),a=new Fh(r.itemName,r.expression,r.trackBy.expression,r.trackBy.keywordSpan,r.context,xo(e,n.children,n.children),c,u,n.sourceSpan,n.startSourceSpan,p,n.nameSpan,n.i18n)}return{node:a,errors:i}}function JY(n,o,e){let t=oZ(n),i=n.parameters.length>0?d0(n.parameters[0],e):e.parseBinding("",!1,n.sourceSpan,0),r=[],a=[],c=[],p=null,u=null;for(let g of n.children){if(!(g instanceof il))continue;if((g.name!=="case"||g.parameters.length===0)&&g.name!=="default"&&g.name!=="default never"){a.push(new A1(g.name,g.sourceSpan,g.nameSpan));continue}u!==null&&t.push(new sn(g.sourceSpan,'@default block with "never" parameter must be the last case in a switch'));let y=g.name==="case",b=null;if(y)b=d0(g.parameters[0],e);else if(g.name==="default never"){(g.children.length>0||g.endSourceSpan!==null&&g.endSourceSpan.start.offset!==g.endSourceSpan.end.offset)&&t.push(new sn(g.sourceSpan,'@default block with "never" parameter cannot have a body')),c.length>0&&t.push(new sn(g.sourceSpan,'A @case block with no body cannot be followed by a @default block with "never" parameter')),u=new wT(g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan);continue}let x=new ST(b,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan);if(c.push(x),g.children.length===0&&g.endSourceSpan!==null&&g.endSourceSpan.start.offset===g.endSourceSpan.end.offset){p===null&&(p=g.sourceSpan);continue}let w=g.sourceSpan,S=g.startSourceSpan;p!==null&&(w=new gn(p.start,g.sourceSpan.end),S=new gn(p.start,g.startSourceSpan.end),p=null);let E=new B_(c,xo(o,g.children,g.children),w,S,g.endSourceSpan,g.nameSpan,g.i18n);r.push(E),c=[]}return{node:new P1(i,r,a,u,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan),errors:t}}function eZ(n,o,e){if(n.parameters.length===0)return o.push(new sn(n.startSourceSpan,"@for loop does not have an expression")),null;let[t,...i]=n.parameters,r=rZ(t,o)?.match(GY);if(!r||r[2].trim().length===0)return o.push(new sn(t.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern " of "')),null;let[,a,c]=r;h_.has(a)&&o.push(new sn(t.sourceSpan,`@for loop item name cannot be one of ${Array.from(h_).join(", ")}.`));let p=t.expression.split(" ")[0],u=new gn(t.sourceSpan.start,t.sourceSpan.start.moveBy(p.length)),h={itemName:new hm(a,"$implicit",u,u),trackBy:null,expression:d0(t,e,c),context:Array.from(h_,g=>{let y=new gn(n.startSourceSpan.end,n.startSourceSpan.end);return new hm(g,g,y,y)})};for(let g of i){let y=g.expression.match(XY);if(y!==null){let x=new gn(g.sourceSpan.start.moveBy(y[0].length-y[1].length),g.sourceSpan.end);nZ(g.sourceSpan,y[1],x,a,h.context,o);continue}let b=g.expression.match(qY);if(b!==null){if(h.trackBy!==null)o.push(new sn(g.sourceSpan,'@for loop can only have one "track" expression'));else{let x=d0(g,e,b[1]);x.ast instanceof ba&&o.push(new sn(n.startSourceSpan,'@for loop must have a "track" expression'));let M=new gn(g.sourceSpan.start,g.sourceSpan.start.moveBy(5));h.trackBy={expression:x,keywordSpan:M}}continue}o.push(new sn(g.sourceSpan,`Unrecognized @for loop parameter "${g.expression}"`))}return h}function tZ(n,o,e){let t=new gE;n.ast.visit(t),t.hasPipe&&e.push(new sn(o,"Cannot use pipes in track expressions"))}function nZ(n,o,e,t,i,r){let a=o.split(","),c=e.start;for(let p of a){let u=p.split("="),h=u.length===2?u[0].trim():"",g=u.length===2?u[1].trim():"";if(h.length===0||g.length===0)r.push(new sn(n,'Invalid @for loop "let" parameter. Parameter should match the pattern " = "'));else if(!h_.has(g))r.push(new sn(n,`Unknown "let" parameter variable "${g}". The allowed variables are: ${Array.from(h_).join(", ")}`));else if(h===t)r.push(new sn(n,`Invalid @for loop "let" parameter. Variable cannot be called "${t}"`));else if(i.some(y=>y.name===h))r.push(new sn(n,`Duplicate "let" parameter variable "${g}"`));else{let[,y,b]=u[0].match(HN)??[],x=y!==void 0&&u.length===2?new gn(c.moveBy(y.length),c.moveBy(y.length+b.length)):e,M;if(u.length===2){let[,S,E]=u[1].match(HN)??[];M=S!==void 0?new gn(c.moveBy(u[0].length+1+S.length),c.moveBy(u[0].length+1+S.length+E.length)):void 0}let w=new gn(x.start,M?.end??x.end);i.push(new hm(h,g,w,x,M))}c=c.moveBy(p.length+1)}}function iZ(n){let o=[],e=!1;for(let t=0;t1&&t0&&o.push(new sn(i.startSourceSpan,"@else block cannot have parameters")),e=!0):bx.test(i.name)||o.push(new sn(i.startSourceSpan,`Unrecognized conditional block @${i.name}`))}return o}function oZ(n){let o=[],e=!1;if(n.parameters.length!==1)return o.push(new sn(n.startSourceSpan,"@switch block must have exactly one parameter")),o;for(let t of n.children)if(!(t instanceof o0||t instanceof au&&t.value.trim().length===0)){if(!(t instanceof il)||t.name!=="case"&&t.name!=="default"&&t.name!=="default never"){o.push(new sn(t.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}t.name==="default never"?(e&&o.push(new sn(t.startSourceSpan,"@switch block can only have one @default block")),e=!0):t.name==="default"?(e?o.push(new sn(t.startSourceSpan,"@switch block can only have one @default block")):t.parameters.length>0&&o.push(new sn(t.startSourceSpan,"@default block cannot have parameters")),e=!0):t.name==="case"&&t.parameters.length!==1&&o.push(new sn(t.startSourceSpan,"@case block must have exactly one parameter"))}return o}function d0(n,o,e){let t,i;return typeof e=="string"?(t=Math.max(0,n.expression.lastIndexOf(e)),i=t+e.length):(t=0,i=n.expression.length),o.parseBinding(n.expression.slice(t,i),!1,n.sourceSpan,n.sourceSpan.start.offset+t)}function GN(n,o,e){if(n.parameters.length===0)return o.push(new sn(n.startSourceSpan,"Conditional block does not have an expression")),null;let t=d0(n.parameters[0],e),i=null;for(let r=1;r-1;c--){let p=e[c];if(p===")"){if(a=c,i--,i===0)break}else{if(t.test(p))continue;break}}return i!==0?(o.push(new sn(n.sourceSpan,"Unclosed parentheses in expression")),null):e.slice(r,a)}var gE=class extends Ah{hasPipe=!1;visitPipe(){this.hasPipe=!0}},aZ=/^\d+\.?\d*(ms|s)?$/,sZ=/^\s$/,qN=new Map([[ol,Ba],[kc,bd],[ja,Sr]]),za=(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})(za||{});function lZ({expression:n,sourceSpan:o},e,t){let i=n.indexOf("never"),r=new gn(o.start.moveBy(i),o.start.moveBy(i+5)),a=YE(n,o),c=ZE(n,o);i===-1?t.push(new sn(o,'Could not find "never" keyword in expression')):JE("never",e,t,new CT(r,o,a,null,c))}function Xk({expression:n,sourceSpan:o},e,t,i){let r=n.indexOf("when"),a=new gn(o.start.moveBy(r),o.start.moveBy(r+4)),c=YE(n,o),p=ZE(n,o);if(r===-1)i.push(new sn(o,'Could not find "when" keyword in expression'));else{let u=m0(n,r+1),h=e.parseBinding(n.slice(u),!1,o,o.start.offset+u);JE("when",t,i,new T1(h,o,c,a,p))}}function Kk({expression:n,sourceSpan:o},e,t,i,r){let a=n.indexOf("on"),c=new gn(o.start.moveBy(a),o.start.moveBy(a+2)),p=YE(n,o),u=ZE(n,o);if(a===-1)i.push(new sn(o,'Could not find "on" keyword in expression'));else{let h=m0(n,a+1),g=n.startsWith("hydrate");new _E(n,e,h,o,t,i,g?gZ:fZ,g,p,c,u).parse()}}function YE(n,o){return n.startsWith("prefetch")?new gn(o.start,o.start.moveBy(8)):null}function ZE(n,o){return n.startsWith("hydrate")?new gn(o.start,o.start.moveBy(7)):null}var _E=class{expression;bindingParser;start;span;triggers;errors;validator;isHydrationTrigger;prefetchSpan;onSourceSpan;hydrateSpan;index=0;tokens;constructor(o,e,t,i,r,a,c,p,u,h,g){this.expression=o,this.bindingParser=e,this.start=t,this.span=i,this.triggers=r,this.errors=a,this.validator=c,this.isHydrationTrigger=p,this.prefetchSpan=u,this.onSourceSpan=h,this.hydrateSpan=g,this.tokens=new s0().tokenize(o.slice(t))}parse(){for(;this.tokens.length>0&&this.index0&&i.isCharacter(e[e.length-1])&&e.pop(),e.length===0&&i.isCharacter(ya)&&t.length>0){o.push({expression:this.tokenRangeText(t),start:t[0].index}),this.advance(),t=[];continue}t.push(i),this.advance()}return(!this.token().isCharacter(Sr)||e.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index0)throw new Error(`"${za.IDLE}" trigger cannot have parameters`);return new xT(o,e,t,i,r)}function dZ(n,o,e,t,i,r){if(n.length!==1)throw new Error(`"${za.TIMER}" trigger must have exactly one parameter`);let a=lx(n[0].expression);if(a===null)throw new Error(`Could not parse time value of trigger "${za.TIMER}"`);return new yT(a,o,e,t,i,r)}function mZ(n,o,e,t,i,r){if(n.length>0)throw new Error(`"${za.IMMEDIATE}" trigger cannot have parameters`);return new bT(o,e,t,i,r)}function pZ(n,o,e,t,i,r,a){return a(za.HOVER,n),new E1(n[0]?.expression??null,o,e,t,i,r)}function uZ(n,o,e,t,i,r,a){return a(za.INTERACTION,n),new D1(n[0]?.expression??null,o,e,t,i,r)}function hZ(n,o,e,t,i,r,a,c,p,u){u(za.VIEWPORT,t);let h,g;if(t.length===0)h=g=null;else if(!t[0].expression.startsWith("{"))h=t[0].expression,g=null;else{let y=e.parseBinding(t[0].expression,!1,r,r.start.offset+n+t[0].start);if(y.ast instanceof Jp){if(y.ast.keys.some(x=>x.kind==="spread"))throw new Error("Spread operator are not allowed in this context");if(y.ast.keys.some(x=>x.kind==="property"&&x.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 b=y.ast.keys.findIndex(x=>x.kind==="property"&&x.key==="trigger");if(b===-1)h=null,g=y.ast;else{let x=y.ast.values[b],M=(w,S)=>S!==b;if(!(x instanceof Mc)||!(x.receiver instanceof Ic))throw new Error('"trigger" option of the "viewport" trigger must be an identifier');h=x.name,g=new Jp(y.ast.span,y.ast.sourceSpan,y.ast.keys.filter(M),y.ast.values.filter(M))}}if(o&&h!==null)throw new Error('"viewport" hydration trigger cannot have a "trigger"');if(g){let y=vE.findDynamicNode(g);if(y!==null)throw new Error(`Options of the "viewport" trigger must be an object literal containing only literal values, but "${y.constructor.name}" was found`)}return new F_(h,g,i,r,a,c,p)}function fZ(n,o){if(o.length>1)throw new Error(`"${n}" trigger can only have zero or one parameters`)}function gZ(n,o){if(n===za.VIEWPORT){if(o.length>1)throw new Error(`Hydration trigger "${n}" cannot have more than one parameter`);return}if(o.length>0)throw new Error(`Hydration trigger "${n}" cannot have parameters`)}function m0(n,o=0){let e=!1;for(let t=o;t0){let M=o[o.length-1];g=M.endSourceSpan,y=M.sourceSpan.end}let b=new gn(n.sourceSpan.start,y);return{node:new eu(xo(e,n.children,n.children),p,u,h,r,a,c,n.nameSpan,b,n.sourceSpan,n.startSourceSpan,g,n.i18n),errors:i}}function kZ(n,o,e){let t=null,i=null,r=null;for(let a of n)try{if(!CE(a.name)){o.push(new sn(a.startSourceSpan,`Unrecognized block "@${a.name}"`));break}switch(a.name){case"placeholder":t!==null?o.push(new sn(a.startSourceSpan,"@defer block can only have one @placeholder block")):t=TZ(a,e);break;case"loading":i!==null?o.push(new sn(a.startSourceSpan,"@defer block can only have one @loading block")):i=EZ(a,e);break;case"error":r!==null?o.push(new sn(a.startSourceSpan,"@defer block can only have one @error block")):r=DZ(a,e);break}}catch(c){o.push(new sn(a.startSourceSpan,c.message))}return{placeholder:t,loading:i,error:r}}function TZ(n,o){let e=null;for(let t of n.parameters)if(T6.test(t.expression)){if(e!=null)throw new Error('@placeholder block can only have one "minimum" parameter');let i=lx(t.expression.slice(m0(t.expression)));if(i===null)throw new Error('Could not parse time value of parameter "minimum"');e=i}else throw new Error(`Unrecognized parameter in @placeholder block: "${t.expression}"`);return new R_(xo(o,n.children,n.children),e,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function EZ(n,o){let e=null,t=null;for(let i of n.parameters)if(yZ.test(i.expression)){if(e!=null)throw new Error('@loading block can only have one "after" parameter');let r=lx(i.expression.slice(m0(i.expression)));if(r===null)throw new Error('Could not parse time value of parameter "after"');e=r}else if(T6.test(i.expression)){if(t!=null)throw new Error('@loading block can only have one "minimum" parameter');let r=lx(i.expression.slice(m0(i.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: "${i.expression}"`);return new L_(xo(o,n.children,n.children),e,t,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function DZ(n,o){if(n.parameters.length>0)throw new Error("@error block cannot have parameters");return new V_(xo(o,n.children,n.children),n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function PZ(n,o,e,t){let i={},r={},a={};for(let c of n.parameters)SZ.test(c.expression)?Xk(c,o,i,e):wZ.test(c.expression)?Kk(c,o,i,e):_Z.test(c.expression)?Xk(c,o,r,e):vZ.test(c.expression)?Kk(c,o,r,e):CZ.test(c.expression)?Xk(c,o,a,e):xZ.test(c.expression)?Kk(c,o,a,e):bZ.test(c.expression)?lZ(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:i,prefetchTriggers:r,hydrateTriggers:a}}var IZ=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,QN=1,XN=2,KN=3,YN=4,ZN=5,AZ=6,Jg=7,om={BANANA_BOX:{start:"[(",end:")]"},PROPERTY:{start:"[",end:"]"},EVENT:{start:"(",end:")"}},Yk="*",OZ=new Set(["link","style","script","ng-template","ng-container","ng-content"]),NZ=new Set(["ngProjectAs","ngNonBindable"]);function FZ(n,o,e){let t=new xE(o,e),i=xo(t,n,n),r=o.errors.concat(t.errors),a={nodes:i,errors:r,styleUrls:t.styleUrls,styles:t.styles,ngContentSelectors:t.ngContentSelectors};return e.collectCommentNodes&&(a.commentNodes=t.commentNodes),a}var xE=class{bindingParser;options;errors=[];styles=[];styleUrls=[];ngContentSelectors=[];commentNodes=[];inI18nBlock=!1;processedNodes=new Set;constructor(o,e){this.bindingParser=o,this.options=e}visitElement(o){let e=i1(o.i18n);e&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",o.sourceSpan),this.inI18nBlock=!0);let t=k6(o);if(t.type===Is.SCRIPT)return null;if(t.type===Is.STYLE){let S=RZ(o);return S!==null&&this.styles.push(S),null}else if(t.type===Is.STYLESHEET&&FY(t.hrefAttr))return this.styleUrls.push(t.hrefAttr),null;let i=VH(o.name),{attributes:r,boundEvents:a,references:c,variables:p,templateVariables:u,elementHasInlineTemplate:h,parsedProperties:g,templateParsedProperties:y,i18nAttrsMeta:b}=this.prepareAttributes(o.attrs,i),x=this.extractDirectives(o),M;t.nonBindable?M=xo(JN,o.children).flat(1/0):M=xo(this,o.children,o.children);let w;if(t.type===Is.NG_CONTENT){let S=t.selectAttr,E=o.attrs.map(O=>this.visitAttribute(O));w=new Rh(S,E,M,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n),this.ngContentSelectors.push(S)}else if(i){let S=this.categorizePropertyAttributes(o.name,g,b);w=new Os(o.name,r,S.bound,a,x,[],M,c,p,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n)}else{let S=this.categorizePropertyAttributes(o.name,g,b);if(o.name==="ng-container")for(let E of S.bound)E.type===Di.Attribute&&this.reportError("Attribute bindings are not supported on ng-container. Use property bindings instead.",E.sourceSpan);w=new Ac(o.name,r,S.bound,a,x,M,c,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid,o.i18n)}return h&&(w=this.wrapInTemplate(w,y,u,b,i,e)),e&&(this.inI18nBlock=!1),w}visitAttribute(o){return new Nh(o.name,o.value,o.sourceSpan,o.keySpan,o.valueSpan,o.i18n)}visitText(o){return this.processedNodes.has(o)?null:this._visitTextWithInterpolation(o.value,o.sourceSpan,o.tokens,o.i18n)}visitExpansion(o){if(!o.i18n)return null;if(!i1(o.i18n))throw new Error(`Invalid type "${o.i18n.constructor}" for "i18n" property of ${o.sourceSpan.toString()}. Expected a "Message"`);let e=o.i18n,t={},i={};return Object.keys(e.placeholders).forEach(r=>{let a=e.placeholders[r];if(r.startsWith($H)){let c=r.trim(),p=this.bindingParser.parseInterpolationExpression(a.text,a.sourceSpan);t[c]=new Oh(p,a.sourceSpan)}else i[r]=this._visitTextWithInterpolation(a.text,a.sourceSpan,null)}),new _F(t,i,o.sourceSpan,e)}visitExpansionCase(o){return null}visitComment(o){return this.options.collectCommentNodes&&this.commentNodes.push(new hx(o.value||"",o.sourceSpan)),null}visitLetDeclaration(o,e){let t=this.bindingParser.parseBinding(o.value,!1,o.valueSpan,o.valueSpan.start.offset);return t.errors.length===0&&t.ast instanceof ba&&this.reportError("@let declaration value cannot be empty",o.valueSpan),new RE(o.name,t,o.sourceSpan,o.nameSpan,o.valueSpan)}visitComponent(o){let e=i1(o.i18n);if(e&&(this.inI18nBlock&&this.reportError("Cannot mark a component as translatable inside of a translatable section. Please remove the nested i18n marker.",o.sourceSpan),this.inI18nBlock=!0),o.tagName!==null&&OZ.has(o.tagName))return this.reportError(`Tag name "${o.tagName}" cannot be used as a component tag`,o.startSourceSpan),null;let{attributes:t,boundEvents:i,references:r,templateVariables:a,elementHasInlineTemplate:c,parsedProperties:p,templateParsedProperties:u,i18nAttrsMeta:h}=this.prepareAttributes(o.attrs,!1);this.validateSelectorlessReferences(r);let g=this.extractDirectives(o),y;o.attrs.find(M=>M.name==="ngNonBindable")?y=xo(JN,o.children).flat(1/0):y=xo(this,o.children,o.children);let b=this.categorizePropertyAttributes(o.tagName,p,h),x=new s_(o.componentName,o.tagName,o.fullName,t,b.bound,i,g,y,r,o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.i18n);return c&&(x=this.wrapInTemplate(x,u,a,h,!1,e)),e&&(this.inI18nBlock=!1),x}visitDirective(){return null}visitBlockParameter(){return null}visitBlock(o,e){let t=Array.isArray(e)?e.indexOf(o):-1;if(t===-1)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(o))return null;let i=null;switch(o.name){case"defer":i=MZ(o,this.findConnectedBlocks(t,e,CE),this,this.bindingParser);break;case"switch":i=JY(o,this,this.bindingParser);break;case"for":i=ZY(o,this.findConnectedBlocks(t,e,UN),this,this.bindingParser);break;case"if":i=YY(o,this.findConnectedBlocks(t,e,WN),this,this.bindingParser);break;default:let r;CE(o.name)?(r=`@${o.name} block can only be used after an @defer block.`,this.processedNodes.add(o)):UN(o.name)?(r=`@${o.name} block can only be used after an @for block.`,this.processedNodes.add(o)):WN(o.name)?(r=`@${o.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(o)):r=`Unrecognized block @${o.name}.`,i={node:new A1(o.name,o.sourceSpan,o.nameSpan),errors:[new sn(o.sourceSpan,r)]};break}return this.errors.push(...i.errors),i.node}findConnectedBlocks(o,e,t){let i=[];for(let r=o+1;r{let c=t[a.name];if(a.isLiteral)r.push(new Nh(a.name,a.expression.source||"",a.sourceSpan,a.keySpan,a.valueSpan,c));else{let p=a.name.toLowerCase().startsWith("attr.on"),u=this.bindingParser.createBoundElementProperty(o,a,!p,!1);i.push(_T.fromBoundElementProperty(u,c))}}),{bound:i,literal:r}}prepareAttributes(o,e){let t=[],i=[],r=[],a=[],c=[],p={},u=[],h=[],g=!1;for(let y of o){let b=!1,x=eF(y.name),M=!1;if(y.i18n&&(p[y.name]=y.i18n),x.startsWith(Yk)){g&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",y.sourceSpan),M=!0,g=!0;let w=y.value,S=x.substring(Yk.length),E=[],O=y.valueSpan?y.valueSpan.fullStart.offset:y.sourceSpan.fullStart.offset+y.name.length;this.bindingParser.parseInlineTemplateBinding(S,w,y.sourceSpan,O,[],u,E,!0),h.push(...E.map(D=>new hm(D.name,D.value,D.sourceSpan,D.keySpan,D.valueSpan)))}else b=this.parseAttribute(e,y,[],t,i,r,a);!b&&!M&&c.push(this.visitAttribute(y))}return{attributes:c,boundEvents:i,references:a,variables:r,templateVariables:h,elementHasInlineTemplate:g,parsedProperties:t,templateParsedProperties:u,i18nAttrsMeta:p}}parseAttribute(o,e,t,i,r,a,c){let p=eF(e.name),u=e.value,h=e.sourceSpan,g=e.valueSpan?e.valueSpan.fullStart.offset:h.fullStart.offset;function y(S,E,O){let D=e.name.length-p.length,N=S.start.moveBy(E.length+D),P=N.moveBy(O.length);return new gn(N,P,N,O)}let b=p.match(IZ);if(b){if(b[QN]!=null){let S=b[Jg],E=y(h,b[QN],S);this.bindingParser.parsePropertyBinding(S,u,!1,!1,h,g,e.valueSpan,t,i,E)}else if(b[XN])if(o){let S=b[Jg],E=y(h,b[XN],S);this.parseVariable(S,u,h,E,e.valueSpan,a)}else this.reportError('"let-" is only supported on ng-template elements.',h);else if(b[KN]){let S=b[Jg],E=y(h,b[KN],S);this.parseReference(S,u,h,E,e.valueSpan,c)}else if(b[YN]){let S=[],E=b[Jg],O=y(h,b[YN],E);this.bindingParser.parseEvent(E,u,!1,h,e.valueSpan||h,t,S,O),Zk(S,r)}else if(b[ZN]){let S=b[Jg],E=y(h,b[ZN],S);this.bindingParser.parsePropertyBinding(S,u,!1,!0,h,g,e.valueSpan,t,i,E),this.parseAssignmentEvent(S,u,h,e.valueSpan,t,r,E,g)}else if(b[AZ]){let S=y(h,"",p);this.bindingParser.parseLiteralAttr(p,u,h,g,e.valueSpan,t,i,S)}return!0}let x=null;if(p.startsWith(om.BANANA_BOX.start)?x=om.BANANA_BOX:p.startsWith(om.PROPERTY.start)?x=om.PROPERTY:p.startsWith(om.EVENT.start)&&(x=om.EVENT),x!==null&&p.endsWith(x.end)&&p.length>x.start.length+x.end.length){let S=p.substring(x.start.length,p.length-x.end.length),E=y(h,x.start,S);if(x.start===om.BANANA_BOX.start)this.bindingParser.parsePropertyBinding(S,u,!1,!0,h,g,e.valueSpan,t,i,E),this.parseAssignmentEvent(S,u,h,e.valueSpan,t,r,E,g);else if(x.start===om.PROPERTY.start)this.bindingParser.parsePropertyBinding(S,u,!1,!1,h,g,e.valueSpan,t,i,E);else{let O=[];this.bindingParser.parseEvent(S,u,!1,h,e.valueSpan||h,t,O,E),Zk(O,r)}return!0}let M=y(h,"",p);return this.bindingParser.parsePropertyInterpolation(p,u,h,e.valueSpan,t,i,M,e.valueTokens??null)}extractDirectives(o){let e=o instanceof Va?o.tagName:o.name,t=[],i=new Set;for(let r of o.directives){let a=!1;for(let b of r.attrs)b.name.startsWith(Yk)?(a=!0,this.reportError(`Shorthand template syntax "${b.name}" is not supported inside a directive context`,b.sourceSpan)):NZ.has(b.name)&&(a=!0,this.reportError(`Attribute "${b.name}" is not supported in a directive context`,b.sourceSpan));if(!a&&i.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:g}=this.prepareAttributes(r.attrs,!1);this.validateSelectorlessReferences(h);let{bound:y}=this.categorizePropertyAttributes(e,p,g);for(let b of y)b.type!==Di.Property&&b.type!==Di.TwoWay&&(a=!0,this.reportError("Binding is not supported in a directive context",b.sourceSpan));a||(i.add(r.name),t.push(new gF(r.name,c,y,u,h,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,void 0)))}return t}filterAnimationAttributes(o){return o.filter(e=>!e.name.startsWith("animate."))}filterAnimationInputs(o){return o.filter(e=>e.type!==Di.Animation)}wrapInTemplate(o,e,t,i,r,a){let c=this.categorizePropertyAttributes("ng-template",e,i),p=[];c.literal.forEach(y=>p.push(y)),c.bound.forEach(y=>p.push(y));let u={attributes:[],inputs:[],outputs:[]};(o instanceof Ac||o instanceof s_)&&(u.attributes.push(...this.filterAnimationAttributes(o.attributes)),u.inputs.push(...this.filterAnimationInputs(o.inputs)),u.outputs.push(...o.outputs));let h=r&&a?void 0:o.i18n,g;return o instanceof s_?g=o.tagName:o instanceof Os?g=null:g=o.name,new Os(g,u.attributes,u.inputs,u.outputs,[],p,[o],[],t,!1,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,h)}_visitTextWithInterpolation(o,e,t,i){let r=o6(o),a=this.bindingParser.parseInterpolation(r,e,t);return a?new Oh(a,e,i):new Rp(r,e)}parseVariable(o,e,t,i,r,a){o.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',t):o.length===0&&this.reportError("Variable does not have a name",t),a.push(new hm(o,e,t,i,r))}parseReference(o,e,t,i,r,a){o.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',t):o.length===0?this.reportError("Reference does not have a name",t):a.some(c=>c.name===o)&&this.reportError(`Reference "#${o}" is defined more than once`,t),a.push(new j_(o,e,t,i,r))}parseAssignmentEvent(o,e,t,i,r,a,c,p){let u=[];this.bindingParser.parseEvent(`${o}Change`,e,!0,t,i||t,r,u,c),Zk(u,a)}validateSelectorlessReferences(o){if(o.length===0)return;let e=new Set;for(let t of o)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(o,e,t=cm.ERROR){this.errors.push(new sn(e,o,t))}},bE=class{visitElement(o){let e=k6(o);if(e.type===Is.SCRIPT||e.type===Is.STYLE||e.type===Is.STYLESHEET)return null;let t=xo(this,o.children,null);return new Ac(o.name,xo(this,o.attrs),[],[],[],t,[],o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,o.isVoid)}visitComment(o){return null}visitAttribute(o){return new Nh(o.name,o.value,o.sourceSpan,o.keySpan,o.valueSpan,o.i18n)}visitText(o){return new Rp(o.value,o.sourceSpan)}visitExpansion(o){return null}visitExpansionCase(o){return null}visitBlock(o,e){let t=[new Rp(o.startSourceSpan.toString(),o.startSourceSpan),...xo(this,o.children)];return o.endSourceSpan!==null&&t.push(new Rp(o.endSourceSpan.toString(),o.endSourceSpan)),t}visitBlockParameter(o,e){return null}visitLetDeclaration(o,e){return new Rp(`@let ${o.name} = ${o.value};`,o.sourceSpan)}visitComponent(o,e){let t=xo(this,o.children,null);return new Ac(o.fullName,xo(this,o.attrs),[],[],[],t,[],o.isSelfClosing,o.sourceSpan,o.startSourceSpan,o.endSourceSpan,!1)}visitDirective(o,e){return null}},JN=new bE;function eF(n){return/^data-/i.test(n)?n.substring(5):n}function Zk(n,o){o.push(...n.map(e=>vT.fromParsedEvent(e)))}function RZ(n){return n.children.length!==1||!(n.children[0]instanceof au)?null:n.children[0].value}var LZ=[" ",` `,"\r"," "];function VZ(n,o,e={}){let{preserveWhitespaces:t,enableI18nLegacyMessageIdFormat:i}=e,r=e.enableSelectorless??!1,a=cx(r),p=new pE().parse(n,o,Ye(Z({leadingTriviaChars:LZ},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),g=new ix(!t,i,e.preserveSignificantWhitespace,h),y=g.visitAllWithErrors(u);if(!e.alwaysAttemptHtmlToR3AstConversion&&y.errors&&y.errors.length>0){let D={preserveWhitespaces:t,errors:y.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}u=y.rootNodes,t||(u=xo(new tx(!0,void 0,!1),u),g.hasI18nMeta&&(u=xo(new ix(!1,void 0,!0,h),u)));let{nodes:b,errors:x,styleUrls:M,styles:w,ngContentSelectors:S,commentNodes:E}=FZ(u,a,{collectCommentNodes:!!e.collectCommentNodes});x.push(...p.errors,...y.errors);let O={preserveWhitespaces:t,errors:x.length>0?x:null,nodes:b,styleUrls:M,styles:w,ngContentSelectors:S};return e.collectCommentNodes&&(O.commentNodes=E),O}var BZ=new Hh;function cx(n=!1){return new uE(new nx(new s0,n),BZ,[])}var E6="%COMP%",zZ=`_nghost-${E6}`,jZ=`_ngcontent-${E6}`;function D6(n,o,e){let t=new _m,i=AE(n.selector);return t.set("type",n.type.value),i.length>0&&t.set("selectors",vh(i)),n.queries.length>0&&t.set("contentQueries",PY(n.queries,o,n.name)),n.viewQueries.length&&t.set("viewQuery",DY(n.viewQueries,o,n.name)),t.set("hostBindings",XZ(n.host,n.typeSourceSpan,e,o,n.selector||"",n.name,t)),t.set("inputs",P5(n.inputs,!0)),t.set("outputs",P5(n.outputs)),n.exportAs!==null&&t.set("exportAs",Xi(n.exportAs.map(r=>Ee(r)))),n.isStandalone===!1&&t.set("standalone",Ee(!1)),n.isSignal&&t.set("signals",Ee(!0)),t}function P6(n,o){let e=[],t=o.providers,i=o.viewProviders;if(t||i){let r=[t||new Pc([])];i&&r.push(i),e.push(jt(fe.ProvidersFeature).callFn(r))}if(o.hostDirectives?.length&&e.push(jt(fe.HostDirectivesFeature).callFn([eJ(o.hostDirectives)])),o.usesInheritance&&e.push(jt(fe.InheritDefinitionFeature)),o.lifecycle.usesOnChanges&&e.push(jt(fe.NgOnChangesFeature)),o.controlCreate!==null&&e.push(jt(fe.ControlFeature).callFn([Ee(o.controlCreate.passThroughInput)])),"externalStyles"in o&&o.externalStyles?.length){let r=o.externalStyles.map(a=>Ee(a));e.push(jt(fe.ExternalStylesFeature).callFn([Xi(r)]))}e.length&&n.set("features",Xi(e))}function $Z(n,o,e){let t=D6(n,o,e);P6(t,n);let i=jt(fe.defineDirective).callFn([t.toLiteralMap()],void 0,!0),r=QZ(n);return{expression:i,type:r,statements:[]}}function HZ(n,o,e){let t=D6(n,o,e);P6(t,n);let i=n.selector&&Mh.parse(n.selector),r=i&&i[0];if(r){let x=r.getAttrs();x.length&&t.set("attrs",o.getConstLiteral(Xi(x.map(M=>M!=null?Ee(M):Ee(void 0))),!0))}let a=n.name,c=null;if(n.defer.mode===1&&n.defer.dependenciesFn!==null){let x=`${a}_DeferFn`;o.statements.push(new Hr(x,n.defer.dependenciesFn,void 0,ca.Final)),c=Jn(x)}let p=n.isStandalone&&!n.hasDirectiveDependencies?is.DomOnly:is.Full,u=oY(n.name,n.template.nodes,o,p,n.relativeContextFilePath,n.i18nUseExternalIds,n.defer,c,n.relativeTemplatePath,kY());g6(u,Ot.Tmpl);let h=eY(u,o);if(u.contentSelectors!==null&&t.set("ngContentSelectors",u.contentSelectors),t.set("decls",Ee(u.root.decls)),t.set("vars",Ee(u.root.vars)),u.consts.length>0&&(u.constsInitializers.length>0?t.set("consts",Rs([],[...u.constsInitializers,new kr(Xi(u.consts))])):t.set("consts",Xi(u.consts))),t.set("template",h),n.declarationListEmitMode!==3&&n.declarations.length>0)t.set("dependencies",WZ(Xi(n.declarations.map(x=>x.type)),n.declarationListEmitMode));else if(n.declarationListEmitMode===3){let x=[n.type.value];n.rawImports&&x.push(n.rawImports),t.set("dependencies",jt(fe.getComponentDepsFactory).callFn(x))}n.encapsulation===null&&(n.encapsulation=Pp.Emulated);let g=!!n.externalStyles?.length;if(n.styles&&n.styles.length){let M=(n.encapsulation==Pp.Emulated?JZ(n.styles,jZ,zZ):n.styles).reduce((w,S)=>(S.trim().length>0&&w.push(o.getConstLiteral(Ee(S))),w),[]);M.length>0&&(g=!0,t.set("styles",Xi(M)))}!g&&n.encapsulation===Pp.Emulated&&(n.encapsulation=Pp.None),n.encapsulation!==Pp.Emulated&&t.set("encapsulation",Ee(n.encapsulation)),n.animations!==null&&t.set("data",cl([{key:"animation",value:n.animations,quoted:!1}])),n.changeDetection!==null&&(typeof n.changeDetection=="number"&&n.changeDetection!==IE.Default?t.set("changeDetection",Ee(n.changeDetection)):typeof n.changeDetection=="object"&&t.set("changeDetection",n.changeDetection));let y=jt(fe.defineComponent).callFn([t.toLiteralMap()],void 0,!0),b=UZ(n);return{expression:y,type:b,statements:[]}}function UZ(n){let o=I6(n);return o.push(SE(n.template.ngContentSelectors)),o.push(da(Ee(n.isStandalone))),o.push(A6(n)),n.isSignal&&o.push(da(Ee(n.isSignal))),da(jt(fe.ComponentDeclaration,o))}function WZ(n,o){switch(o){case 0:return n;case 1:return Rs([],n);case 2:let e=n.prop("map").callFn([jt(fe.resolveForwardRef)]);return Rs([],e);case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}function GZ(n){return da(Ee(n))}function yE(n){let o=Object.keys(n).map(e=>{let t=Array.isArray(n[e])?n[e][0]:n[e];return{key:e,value:Ee(t),quoted:!0}});return cl(o)}function SE(n){return n.length>0?da(Xi(n.map(o=>Ee(o)))):Ec}function I6(n){let o=n.selector!==null?n.selector.replace(/\n/g,""):null;return[ux(n.type.type,n.typeArgumentCount),o!==null?GZ(o):Ec,n.exportAs!==null?SE(n.exportAs):Ec,da(qZ(n)),da(yE(n.outputs)),SE(n.queries.map(e=>e.propertyName))]}function qZ(n){return cl(Object.keys(n.inputs).map(o=>{let e=n.inputs[o],t=[{key:"alias",value:Ee(e.bindingPropertyName),quoted:!0},{key:"required",value:Ee(e.required),quoted:!0}];return e.isSignal&&t.push({key:"isSignal",value:Ee(e.isSignal),quoted:!0}),{key:o,value:cl(t),quoted:!0}}))}function QZ(n){let o=I6(n);return o.push(Ec),o.push(da(Ee(n.isStandalone))),o.push(A6(n)),n.isSignal&&o.push(da(Ee(n.isSignal))),da(jt(fe.DirectiveDeclaration,o))}function XZ(n,o,e,t,i,r,a){let c=e.createBoundHostProperties(n.properties,o),p=e.createDirectiveHostEventAsts(n.listeners,o);n.specialAttributes.styleAttr&&(n.attributes.style=Ee(n.specialAttributes.styleAttr)),n.specialAttributes.classAttr&&(n.attributes.class=Ee(n.specialAttributes.classAttr));let u=rY({componentName:r,componentSelector:i,properties:c,events:p,attributes:n.attributes},e,t);g6(u,Ot.Host),a.set("hostAttrs",u.root.attributes);let h=u.root.vars;return h!==null&&h>0&&a.set("hostVars",Ee(h)),tY(u)}function KZ(n){let o={},e={},t={},i={};for(let r of Object.keys(n)){let a=n[r];if(r.startsWith("(")&&r.endsWith(")")){if(typeof a!="string")throw new Error("Event binding must be string");e[r.slice(1,-1)]=a}else if(r.startsWith("[")&&r.endsWith("]")){if(typeof a!="string")throw new Error("Property binding must be string");t[r.slice(1,-1)]=a}else switch(r){case"class":if(typeof a!="string")throw new Error("Class binding must be string");i.classAttr=a;break;case"style":if(typeof a!="string")throw new Error("Style binding must be string");i.styleAttr=a;break;default:typeof a=="string"?o[r]=Ee(a):o[r]=a}}return{attributes:o,listeners:e,properties:t,specialAttributes:i}}function YZ(n,o){let e=cx();return e.createDirectiveHostEventAsts(n.listeners,o),e.createBoundHostProperties(n.properties,o),ZZ(n,e,o),e.errors}function ZZ(n,o,e){for(let t in n.properties){let i=t.startsWith("attr."),r=i?t.slice(5):t;if(r.toLowerCase().startsWith("on")){let a=i?"attribute":"property",c=`(${r.slice(2)})=...`,p=`Binding to event ${a} '${r}' is disallowed for security reasons, please use ${c}`;i||(p+=` If '${t}' is a directive input, make sure the directive is imported by the current module.`),o.errors.push(new sn(e,p))}}}function JZ(n,o,e){let t=new OT;return n.map(i=>t.shimCssText(i,o,e))}function A6(n){return n.hostDirectives?.length?da(Xi(n.hostDirectives.map(o=>cl([{key:"directive",value:p0(o.directive.type),quoted:!1},{key:"inputs",value:yE(o.inputs||{}),quoted:!1},{key:"outputs",value:yE(o.outputs||{}),quoted:!1}])))):Ec}function eJ(n){let o=[],e=!1;for(let t of n){if(!t.inputs&&!t.outputs)o.push(t.directive.type);else{let i=[{key:"directive",value:t.directive.type,quoted:!1}];if(t.inputs){let r=tF(t.inputs);r&&i.push({key:"inputs",value:r,quoted:!1})}if(t.outputs){let r=tF(t.outputs);r&&i.push({key:"outputs",value:r,quoted:!1})}o.push(cl(i))}t.isForwardReference&&(e=!0)}return e?new mm([],[new kr(Xi(o))]):Xi(o)}function tF(n){let o=[];for(let e in n)n.hasOwnProperty(e)&&o.push(Ee(e),Ee(n[e]));return o.length>0?Xi(o):null}var wE=class extends Ah{visit(o){o instanceof as?this.visit(o.ast):o.visit(this)}visitElement(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.directives),this.visitAllTemplateNodes(o.references),this.visitAllTemplateNodes(o.children)}visitTemplate(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.directives),this.visitAllTemplateNodes(o.templateAttrs),this.visitAllTemplateNodes(o.variables),this.visitAllTemplateNodes(o.references),this.visitAllTemplateNodes(o.children)}visitContent(o){this.visitAllTemplateNodes(o.children)}visitBoundAttribute(o){this.visit(o.value)}visitBoundEvent(o){this.visit(o.handler)}visitBoundText(o){this.visit(o.value)}visitIcu(o){Object.keys(o.vars).forEach(e=>this.visit(o.vars[e])),Object.keys(o.placeholders).forEach(e=>this.visit(o.placeholders[e]))}visitDeferredBlock(o){o.visitAll(this)}visitDeferredTrigger(o){o instanceof T1?this.visit(o.value):o instanceof F_&&o.options!==null&&this.visit(o.options)}visitDeferredBlockPlaceholder(o){this.visitAllTemplateNodes(o.children)}visitDeferredBlockError(o){this.visitAllTemplateNodes(o.children)}visitDeferredBlockLoading(o){this.visitAllTemplateNodes(o.children)}visitSwitchBlock(o){this.visit(o.expression),this.visitAllTemplateNodes(o.groups)}visitSwitchBlockCase(o){o.expression&&this.visit(o.expression)}visitSwitchBlockCaseGroup(o){this.visitAllTemplateNodes(o.cases),this.visitAllTemplateNodes(o.children)}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){o.item.visit(this),this.visitAllTemplateNodes(o.contextVariables),this.visit(o.expression),this.visitAllTemplateNodes(o.children),o.empty?.visit(this)}visitForLoopBlockEmpty(o){this.visitAllTemplateNodes(o.children)}visitIfBlock(o){this.visitAllTemplateNodes(o.branches)}visitIfBlockBranch(o){o.expression&&this.visit(o.expression),o.expressionAlias?.visit(this),this.visitAllTemplateNodes(o.children)}visitLetDeclaration(o){this.visit(o.value)}visitComponent(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.directives),this.visitAllTemplateNodes(o.references),this.visitAllTemplateNodes(o.children)}visitDirective(o){this.visitAllTemplateNodes(o.attributes),this.visitAllTemplateNodes(o.inputs),this.visitAllTemplateNodes(o.outputs),this.visitAllTemplateNodes(o.references)}visitVariable(o){}visitReference(o){}visitTextAttribute(o){}visitText(o){}visitUnknownBlock(o){}visitAllTemplateNodes(o){for(let e of o)this.visit(e)}};var ME=class{directiveMatcher;constructor(o){this.directiveMatcher=o}bind(o){if(!o.template&&!o.host)throw new Error("Empty bound targets are not supported");let e=new Map,t=[],i=new Set,r=new Map,a=new Map,c=new Map,p=new Map,u=new Map,h=new Map,g=new Set,y=new Set,b=[];if(o.template){let x=dx.apply(o.template);tJ(x,c),kE.apply(o.template,this.directiveMatcher,e,t,i,r,a),mx.applyWithScope(o.template,x,p,u,h,g,y,b)}return o.host&&(e.set(o.host.node,o.host.directives),mx.applyWithScope(o.host.node,dx.apply(o.host.node),p,u,h,g,y,b)),new TE(o,e,t,i,r,a,p,u,h,c,g,y,b)}},dx=class n{parentScope;rootNode;namedEntities=new Map;elementLikeInScope=new Set;childScopes=new Map;isDeferred;constructor(o,e){this.parentScope=o,this.rootNode=e,this.isDeferred=o!==null&&o.isDeferred?!0:e instanceof eu}static newRootScope(){return new n(null,null)}static apply(o){let e=n.newRootScope();return e.ingest(o),e}ingest(o){o instanceof Os?(o.variables.forEach(e=>this.visitVariable(e)),o.children.forEach(e=>e.visit(this))):o instanceof Bp?(o.expressionAlias!==null&&this.visitVariable(o.expressionAlias),o.children.forEach(e=>e.visit(this))):o instanceof Fh?(this.visitVariable(o.item),o.contextVariables.forEach(e=>this.visitVariable(e)),o.children.forEach(e=>e.visit(this))):o instanceof B_||o instanceof z_||o instanceof eu||o instanceof V_||o instanceof R_||o instanceof L_||o instanceof Rh?o.children.forEach(e=>e.visit(this)):o instanceof $_||o.forEach(e=>e.visit(this))}visitElement(o){this.visitElementLike(o)}visitTemplate(o){o.directives.forEach(e=>e.visit(this)),o.references.forEach(e=>this.visitReference(e)),this.ingestScopedNode(o)}visitVariable(o){this.maybeDeclare(o)}visitReference(o){this.maybeDeclare(o)}visitDeferredBlock(o){this.ingestScopedNode(o),o.placeholder?.visit(this),o.loading?.visit(this),o.error?.visit(this)}visitDeferredBlockPlaceholder(o){this.ingestScopedNode(o)}visitDeferredBlockError(o){this.ingestScopedNode(o)}visitDeferredBlockLoading(o){this.ingestScopedNode(o)}visitSwitchBlock(o){o.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(o){}visitSwitchBlockCaseGroup(o){this.ingestScopedNode(o)}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){this.ingestScopedNode(o),o.empty?.visit(this)}visitForLoopBlockEmpty(o){this.ingestScopedNode(o)}visitIfBlock(o){o.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(o){this.ingestScopedNode(o)}visitContent(o){this.ingestScopedNode(o)}visitLetDeclaration(o){this.maybeDeclare(o)}visitComponent(o){this.visitElementLike(o)}visitDirective(o){o.references.forEach(e=>this.visitReference(e))}visitBoundAttribute(o){}visitBoundEvent(o){}visitBoundText(o){}visitText(o){}visitTextAttribute(o){}visitIcu(o){}visitDeferredTrigger(o){}visitUnknownBlock(o){}visitElementLike(o){o.directives.forEach(e=>e.visit(this)),o.references.forEach(e=>this.visitReference(e)),o.children.forEach(e=>e.visit(this)),this.elementLikeInScope.add(o)}maybeDeclare(o){this.namedEntities.has(o.name)||this.namedEntities.set(o.name,o)}lookup(o){return this.namedEntities.has(o)?this.namedEntities.get(o):this.parentScope!==null?this.parentScope.lookup(o):null}getChildScope(o){let e=this.childScopes.get(o);if(e===void 0)throw new Error(`Assertion error: child scope for ${o} not found`);return e}ingestScopedNode(o){let e=new n(this,o);e.ingest(o),this.childScopes.set(o,e)}},kE=class n{directiveMatcher;directives;eagerDirectives;missingDirectives;bindings;references;isInDeferBlock=!1;constructor(o,e,t,i,r,a){this.directiveMatcher=o,this.directives=e,this.eagerDirectives=t,this.missingDirectives=i,this.bindings=r,this.references=a}static apply(o,e,t,i,r,a,c){new n(e,t,i,r,a,c).ingest(o)}ingest(o){o.forEach(e=>e.visit(this))}visitElement(o){this.visitElementOrTemplate(o)}visitTemplate(o){this.visitElementOrTemplate(o)}visitDeferredBlock(o){let e=this.isInDeferBlock;this.isInDeferBlock=!0,o.children.forEach(t=>t.visit(this)),this.isInDeferBlock=e,o.placeholder?.visit(this),o.loading?.visit(this),o.error?.visit(this)}visitDeferredBlockPlaceholder(o){o.children.forEach(e=>e.visit(this))}visitDeferredBlockError(o){o.children.forEach(e=>e.visit(this))}visitDeferredBlockLoading(o){o.children.forEach(e=>e.visit(this))}visitSwitchBlock(o){o.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(o){}visitSwitchBlockCaseGroup(o){o.children.forEach(e=>e.visit(this))}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){o.item.visit(this),o.contextVariables.forEach(e=>e.visit(this)),o.children.forEach(e=>e.visit(this)),o.empty?.visit(this)}visitForLoopBlockEmpty(o){o.children.forEach(e=>e.visit(this))}visitIfBlock(o){o.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(o){o.expressionAlias?.visit(this),o.children.forEach(e=>e.visit(this))}visitContent(o){o.children.forEach(e=>e.visit(this))}visitComponent(o){if(this.directiveMatcher instanceof r1){let e=this.directiveMatcher.match(o.componentName);e.length>0?this.trackSelectorlessMatchesAndDirectives(o,e):this.missingDirectives.add(o.componentName)}o.directives.forEach(e=>e.visit(this)),o.children.forEach(e=>e.visit(this))}visitDirective(o){if(this.directiveMatcher instanceof r1){let e=this.directiveMatcher.match(o.name);e.length>0?this.trackSelectorlessMatchesAndDirectives(o,e):this.missingDirectives.add(o.name)}}visitElementOrTemplate(o){if(this.directiveMatcher instanceof o1){let e=[],t=WH(o);this.directiveMatcher.match(t,(i,r)=>e.push(...r)),this.trackSelectorBasedBindingsAndDirectives(o,e)}else o.references.forEach(e=>{e.value.trim()===""&&this.references.set(e,o)});o.directives.forEach(e=>e.visit(this)),o.children.forEach(e=>e.visit(this))}trackMatchedDirectives(o,e){e.length>0&&(this.directives.set(o,e),this.isInDeferBlock||this.eagerDirectives.push(...e))}trackSelectorlessMatchesAndDirectives(o,e){if(e.length===0)return;this.trackMatchedDirectives(o,e);let t=(i,r,a)=>{i[a].hasBindingPropertyName(r.name)&&this.bindings.set(r,i)};for(let i of e)o.inputs.forEach(r=>t(i,r,"inputs")),o.attributes.forEach(r=>t(i,r,"inputs")),o.outputs.forEach(r=>t(i,r,"outputs"));o.references.forEach(i=>this.references.set(i,{directive:e[0],node:o}))}trackSelectorBasedBindingsAndDirectives(o,e){this.trackMatchedDirectives(o,e),o.references.forEach(i=>{let r=null;if(i.value.trim()==="")r=e.find(a=>a.isComponent)||null;else if(r=e.find(a=>a.exportAs!==null&&a.exportAs.some(c=>c===i.value))||null,r===null)return;r!==null?this.references.set(i,{directive:r,node:o}):this.references.set(i,o)});let t=(i,r)=>{let a=e.find(p=>p[r].hasBindingPropertyName(i.name)),c=a!==void 0?a:o;this.bindings.set(i,c)};o.inputs.forEach(i=>t(i,"inputs")),o.attributes.forEach(i=>t(i,"inputs")),o instanceof Os&&o.templateAttrs.forEach(i=>t(i,"inputs")),o.outputs.forEach(i=>t(i,"outputs"))}visitVariable(o){}visitReference(o){}visitTextAttribute(o){}visitBoundAttribute(o){}visitBoundEvent(o){}visitBoundAttributeOrEvent(o){}visitText(o){}visitBoundText(o){}visitIcu(o){}visitDeferredTrigger(o){}visitUnknownBlock(o){}visitLetDeclaration(o){}},mx=class n extends wE{bindings;symbols;usedPipes;eagerPipes;deferBlocks;nestingLevel;scope;rootNode;level;visitNode=o=>o.visit(this);constructor(o,e,t,i,r,a,c,p,u){super(),this.bindings=o,this.symbols=e,this.usedPipes=t,this.eagerPipes=i,this.deferBlocks=r,this.nestingLevel=a,this.scope=c,this.rootNode=p,this.level=u}static applyWithScope(o,e,t,i,r,a,c,p){let u=o instanceof Os?o:null;new n(t,i,a,c,p,r,e,u,0).ingest(o)}ingest(o){if(o instanceof Os)o.variables.forEach(this.visitNode),o.children.forEach(this.visitNode),this.nestingLevel.set(o,this.level);else if(o instanceof Bp)o.expressionAlias!==null&&this.visitNode(o.expressionAlias),o.children.forEach(this.visitNode),this.nestingLevel.set(o,this.level);else if(o instanceof Fh)this.visitNode(o.item),o.contextVariables.forEach(e=>this.visitNode(e)),o.trackBy.visit(this),o.children.forEach(this.visitNode),this.nestingLevel.set(o,this.level);else if(o instanceof eu){if(this.scope.rootNode!==o)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${o}`);this.deferBlocks.push([o,this.scope]),o.children.forEach(e=>e.visit(this)),this.nestingLevel.set(o,this.level)}else o instanceof B_||o instanceof z_||o instanceof V_||o instanceof R_||o instanceof L_||o instanceof Rh?(o.children.forEach(e=>e.visit(this)),this.nestingLevel.set(o,this.level)):o instanceof $_?this.nestingLevel.set(o,0):o.forEach(this.visitNode)}visitTemplate(o){o.inputs.forEach(this.visitNode),o.outputs.forEach(this.visitNode),o.directives.forEach(this.visitNode),o.templateAttrs.forEach(this.visitNode),o.references.forEach(this.visitNode),this.ingestScopedNode(o)}visitVariable(o){this.rootNode!==null&&this.symbols.set(o,this.rootNode)}visitReference(o){this.rootNode!==null&&this.symbols.set(o,this.rootNode)}visitDeferredBlock(o){this.ingestScopedNode(o),o.triggers.when?.value.visit(this),o.prefetchTriggers.when?.value.visit(this),o.hydrateTriggers.when?.value.visit(this),o.hydrateTriggers.never?.visit(this),o.placeholder&&this.visitNode(o.placeholder),o.loading&&this.visitNode(o.loading),o.error&&this.visitNode(o.error)}visitDeferredBlockPlaceholder(o){this.ingestScopedNode(o)}visitDeferredBlockError(o){this.ingestScopedNode(o)}visitDeferredBlockLoading(o){this.ingestScopedNode(o)}visitSwitchBlockCase(o){o.expression?.visit(this)}visitSwitchBlockCaseGroup(o){o.cases.forEach(e=>e.visit(this)),this.ingestScopedNode(o)}visitSwitchExhaustiveCheck(o){}visitForLoopBlock(o){o.expression.visit(this),this.ingestScopedNode(o),o.empty?.visit(this)}visitForLoopBlockEmpty(o){this.ingestScopedNode(o)}visitIfBlockBranch(o){o.expression?.visit(this),this.ingestScopedNode(o)}visitContent(o){this.ingestScopedNode(o)}visitLetDeclaration(o){super.visitLetDeclaration(o),this.rootNode!==null&&this.symbols.set(o,this.rootNode)}visitPipe(o,e){return this.usedPipes.add(o.name),this.scope.isDeferred||this.eagerPipes.add(o.name),super.visitPipe(o,e)}visitPropertyRead(o,e){return this.maybeMap(o,o.name),super.visitPropertyRead(o,e)}visitSafePropertyRead(o,e){return this.maybeMap(o,o.name),super.visitSafePropertyRead(o,e)}ingestScopedNode(o){let e=this.scope.getChildScope(o);new n(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,e,o,this.level+1).ingest(o)}maybeMap(o,e){if(!(o.receiver instanceof Ic))return;let t=this.scope.lookup(e);t!==null&&this.bindings.set(o,t)}},TE=class{target;directives;eagerDirectives;missingDirectives;bindings;references;exprTargets;symbols;nestingLevel;scopedNodeEntities;usedPipes;eagerPipes;deferredBlocks;deferredScopes;constructor(o,e,t,i,r,a,c,p,u,h,g,y,b){this.target=o,this.directives=e,this.eagerDirectives=t,this.missingDirectives=i,this.bindings=r,this.references=a,this.exprTargets=c,this.symbols=p,this.nestingLevel=u,this.scopedNodeEntities=h,this.usedPipes=g,this.eagerPipes=y,this.deferredBlocks=b.map(x=>x[0]),this.deferredScopes=new Map(b)}getEntitiesInScope(o){return this.scopedNodeEntities.get(o)??new Set}getDirectivesOfNode(o){return this.directives.get(o)||null}getReferenceTarget(o){return this.references.get(o)||null}getConsumerOfBinding(o){return this.bindings.get(o)||null}getExpressionTarget(o){return this.exprTargets.get(o)||null}getDefinitionNodeOfSymbol(o){return this.symbols.get(o)||null}getNestingLevel(o){return this.nestingLevel.get(o)||0}getUsedDirectives(){let o=new Set;return this.directives.forEach(e=>e.forEach(t=>o.add(t))),Array.from(o.values())}getEagerlyUsedDirectives(){let o=new Set(this.eagerDirectives);return Array.from(o.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(o,e){if(!(e instanceof D1)&&!(e instanceof F_)&&!(e instanceof E1))return null;let t=e.reference;if(t===null){let r=null;if(o.placeholder!==null){for(let a of o.placeholder.children)if(!(a instanceof hx)){if(r!==null)return null;a instanceof Ac&&(r=a)}}return r}let i=this.findEntityInScope(o,t);if(i instanceof j_&&this.getDefinitionNodeOfSymbol(i)!==o){let r=this.getReferenceTarget(i);if(r!==null)return this.referenceTargetToElement(r)}if(o.placeholder!==null){let r=this.findEntityInScope(o.placeholder,t),a=r instanceof j_?this.getReferenceTarget(r):null;if(a!==null)return this.referenceTargetToElement(a)}return null}isDeferred(o){for(let e of this.deferredBlocks){if(!this.deferredScopes.has(e))continue;let t=[this.deferredScopes.get(e)];for(;t.length>0;){let i=t.pop();if(i.elementLikeInScope.has(o))return!0;t.push(...i.childScopes.values())}}return!1}referencedDirectiveExists(o){return!this.missingDirectives.has(o)}findEntityInScope(o,e){let t=this.getEntitiesInScope(o);for(let i of t)if(i.name===e)return i;return null}referenceTargetToElement(o){return o instanceof Ac?o:o instanceof Os||o.node instanceof s_||o.node instanceof gF||o.node instanceof $_?null:this.referenceTargetToElement(o.node)}};function tJ(n,o){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 i=[n];for(;i.length>0;){let r=i.pop();for(let a of r.childScopes.values())i.push(a);t(r)}for(let[r,a]of e)o.set(r,new Set(a.values()))}var EE=class{},DE=class{jitEvaluator;FactoryTarget=xd;ResourceLoader=EE;elementSchemaRegistry=new Hh;constructor(o=new PT){this.jitEvaluator=o}compilePipe(o,e,t){let i={name:t.name,type:jr(t.type),typeArgumentCount:0,pipeName:t.pipeName,pure:t.pure,isStandalone:t.isStandalone},r=j5(i);return this.jitExpression(r.expression,o,e,[])}compilePipeDeclaration(o,e,t){let i=vJ(t),r=j5(i);return this.jitExpression(r.expression,o,e,[])}compileInjectable(o,e,t){let{expression:i,statements:r}=I5({name:t.name,type:jr(t.type),typeArgumentCount:t.typeArgumentCount,providedIn:sF(t.providedIn),useClass:hh(t,"useClass"),useFactory:aF(t,"useFactory"),useValue:hh(t,"useValue"),useExisting:hh(t,"useExisting"),deps:t.deps?.map(R6)},!0);return this.jitExpression(i,o,e,r)}compileInjectableDeclaration(o,e,t){let{expression:i,statements:r}=I5({name:t.type.name,type:jr(t.type),typeArgumentCount:0,providedIn:sF(t.providedIn),useClass:hh(t,"useClass"),useFactory:aF(t,"useFactory"),useValue:hh(t,"useValue"),useExisting:hh(t,"useExisting"),deps:t.deps?.map(lF)},!0);return this.jitExpression(i,o,e,r)}compileInjector(o,e,t){let i={type:jr(t.type),providers:t.providers&&t.providers.length>0?new si(t.providers):null,imports:t.imports.map(a=>new si(a))},r=z5(i);return this.jitExpression(r.expression,o,e,[])}compileInjectorDeclaration(o,e,t){let i=CJ(t),r=z5(i);return this.jitExpression(r.expression,o,e,[])}compileNgModule(o,e,t){let i={kind:dm.Global,type:jr(t.type),bootstrap:t.bootstrap.map(jr),declarations:t.declarations.map(jr),publicDeclarationTypes:null,imports:t.imports.map(jr),includeImportTypes:!0,exports:t.exports.map(jr),selectorScopeMode:V1.Inline,containsForwardDecls:!1,schemas:t.schemas?t.schemas.map(jr):null,id:t.id?new si(t.id):null},r=mU(i);return this.jitExpression(r.expression,o,e,[])}compileNgModuleDeclaration(o,e,t){let i=pU(t);return this.jitExpression(i,o,e,[])}compileDirective(o,e,t){let i=oF(t);return this.compileDirectiveFromMeta(o,e,i)}compileDirectiveDeclaration(o,e,t){let i=this.createParseSourceSpan("Directive",t.type.name,e),r=N6(t,i);return this.compileDirectiveFromMeta(o,e,r)}compileDirectiveFromMeta(o,e,t){let i=new f1,r=cx(),a=$Z(t,i,r);return this.jitExpression(a.expression,o,e,i.statements)}compileComponent(o,e,t){let{template:i,defer:r}=F6(t.template,t.name,e,t.preserveWhitespaces,void 0),a=Ye(Z(Z({},t),oF(t)),{selector:t.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,declarations:t.declarations.map(rJ),declarationListEmitMode:0,defer:r,styles:[...t.styles,...i.styles],encapsulation:t.encapsulation,changeDetection:t.changeDetection??null,animations:t.animations!=null?new si(t.animations):null,viewProviders:t.viewProviders!=null?new si(t.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null}),c=`ng:///${t.name}.js`;return this.compileComponentFromMeta(o,c,a)}compileComponentDeclaration(o,e,t){let i=this.createParseSourceSpan("Component",t.type.name,e),r=oJ(t,i,e);return this.compileComponentFromMeta(o,e,r)}compileComponentFromMeta(o,e,t){let i=new f1,r=cx(),a=HZ(t,i,r);return this.jitExpression(a.expression,o,e,i.statements)}compileFactory(o,e,t){let i=Ip({name:t.name,type:jr(t.type),typeArgumentCount:t.typeArgumentCount,deps:lJ(t.deps),target:t.target});return this.jitExpression(i.expression,o,e,i.statements)}compileFactoryDeclaration(o,e,t){let i=Ip({name:t.type.name,type:jr(t.type),typeArgumentCount:0,deps:Array.isArray(t.deps)?t.deps.map(lF):t.deps,target:t.target});return this.jitExpression(i.expression,o,e,i.statements)}createParseSourceSpan(o,e,t){return oU(o,e,t)}jitExpression(o,e,t,i){let r=[...i,new Hr("$def",o,void 0,ca.Exported)];return this.jitEvaluator.evaluateStatements(t,r,new AT(e),!0).$def}};function nF(n){return Ye(Z({},n),{isSignal:n.isSignal,predicate:O6(n.predicate),read:n.read?new si(n.read):null,static:n.static,emitDistinctChangesOnly:n.emitDistinctChangesOnly})}function iF(n){return{propertyName:n.propertyName,first:n.first??!1,predicate:O6(n.predicate),descendants:n.descendants??!1,read:n.read?new si(n.read):null,static:n.static??!1,emitDistinctChangesOnly:n.emitDistinctChangesOnly??!0,isSignal:!!n.isSignal}}function O6(n){return Array.isArray(n)?n:FE(new si(n),1)}function oF(n){let o=_J(n.inputs||[]),e=eT(n.outputs||[]),t=n.propMetadata,i={},r={};for(let c in t)t.hasOwnProperty(c)&&t[c].forEach(p=>{uJ(p)?i[c]={bindingPropertyName:p.alias||c,classPropertyName:c,required:p.required||!1,isSignal:!!p.isSignal,transformFunction:p.transform!=null?new si(p.transform):null}:hJ(p)&&(r[c]=p.alias||c)});let a=n.hostDirectives?.length?n.hostDirectives.map(c=>typeof c=="function"?{directive:jr(c),inputs:null,outputs:null,isForwardReference:!1}:{directive:jr(c.directive),isForwardReference:!1,inputs:c.inputs?eT(c.inputs):null,outputs:c.outputs?eT(c.outputs):null}):null;return Ye(Z({},n),{typeArgumentCount:0,typeSourceSpan:n.typeSourceSpan,type:jr(n.type),deps:null,host:Z({},dJ(n.propMetadata,n.typeSourceSpan,n.host)),inputs:Z(Z({},o),i),outputs:Z(Z({},e),r),queries:n.queries.map(nF),providers:n.providers!=null?new si(n.providers):null,viewQueries:n.viewQueries.map(nF),hostDirectives:a})}function N6(n,o){let e=n.hostDirectives?.length?n.hostDirectives.map(t=>({directive:jr(t.directive),isForwardReference:!1,inputs:t.inputs?rF(t.inputs):null,outputs:t.outputs?rF(t.outputs):null})):null;return{name:n.type.name,type:jr(n.type),typeSourceSpan:o,selector:n.selector??null,inputs:n.inputs?fJ(n.inputs):{},outputs:n.outputs??{},host:nJ(n.host),queries:(n.queries??[]).map(iF),viewQueries:(n.viewQueries??[]).map(iF),providers:n.providers!==void 0?new si(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??fF(n.version),isSignal:n.isSignal??!1,hostDirectives:e}}function nJ(n={}){return{attributes:iJ(n.attributes??{}),listeners:n.listeners??{},properties:n.properties??{},specialAttributes:{classAttr:n.classAttribute,styleAttr:n.styleAttribute}}}function rF(n){let o=null;for(let e=1;eJk(c,!0))),n.directives&&r.push(...n.directives.map(c=>Jk(c))),n.pipes&&r.push(...aJ(n.pipes)));let a=r.some(({kind:c})=>c===Vh.Directive||c===Vh.NgModule);return Ye(Z({},N6(n,o)),{template:t,styles:n.styles??[],declarations:r,viewProviders:n.viewProviders!==void 0?new si(n.viewProviders):null,animations:n.animations!==void 0?new si(n.animations):null,defer:i,changeDetection:n.changeDetection??IE.Default,encapsulation:n.encapsulation??Pp.Emulated,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null,hasDirectiveDependencies:a})}function rJ(n){return Ye(Z({},n),{type:new si(n.type)})}function Jk(n,o=null){return{kind:Vh.Directive,isComponent:o||n.kind==="component",selector:n.selector,type:new si(n.type),inputs:n.inputs??[],outputs:n.outputs??[],exportAs:n.exportAs??null}}function aJ(n){return n?Object.keys(n).map(o=>({kind:Vh.Pipe,name:o,type:new si(n[o])})):[]}function sJ(n){return{kind:Vh.Pipe,name:n.name,type:new si(n.type)}}function F6(n,o,e,t,i){let r=VZ(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 ${o}: ${p}`)}let c=new ME(null).bind({template:r.nodes});return{template:r,defer:cJ(c,i)}}function hh(n,o){if(n.hasOwnProperty(o))return FE(new si(n[o]),0)}function aF(n,o){if(n.hasOwnProperty(o))return new si(n[o])}function sF(n){let o=typeof n=="function"?new si(n):new ma(n??null);return FE(o,0)}function lJ(n){return n==null?null:n.map(R6)}function R6(n){let o=n.attribute!=null,e=n.token===null?null:new si(n.token),t=o?new si(n.attribute):e;return L6(t,o,n.host,n.optional,n.self,n.skipSelf)}function lF(n){let o=n.attribute??!1,e=n.token===null?null:new si(n.token);return L6(e,o,n.host??!1,n.optional??!1,n.self??!1,n.skipSelf??!1)}function L6(n,o,e,t,i,r){let a=o?Ee("unknown"):null;return{token:n,attributeNameType:a,host:e,optional:t,self:i,skipSelf:r}}function cJ(n,o){let e=n.getDeferBlocks(),t=new Map;for(let i=0;i{mJ(a)?t.properties[a.hostPropertyName||r]=TH("this",r):pJ(a)&&(t.listeners[a.eventName||r]=`${r}(${(a.args||[]).join(",")})`)});let i=YZ(t,o);if(i.length)throw new Error(i.map(r=>r.msg).join(` `));return t}function mJ(n){return n.ngMetadataName==="HostBinding"}function pJ(n){return n.ngMetadataName==="HostListener"}function uJ(n){return n.ngMetadataName==="Input"}function hJ(n){return n.ngMetadataName==="Output"}function fJ(n){return Object.keys(n).reduce((o,e)=>{let t=n[e];return typeof t=="string"||Array.isArray(t)?o[e]=gJ(t):o[e]={bindingPropertyName:t.publicName,classPropertyName:e,transformFunction:t.transformFunction!==null?new si(t.transformFunction):null,required:t.isRequired,isSignal:t.isSignal},o},{})}function gJ(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 si(n[2]):null,required:!1,isSignal:!1}}function _J(n){return n.reduce((o,e)=>{if(typeof e=="string"){let[t,i]=V6(e);o[i]={bindingPropertyName:t,classPropertyName:i,required:!1,isSignal:!1,transformFunction:null}}else o[e.name]={bindingPropertyName:e.alias||e.name,classPropertyName:e.name,required:e.required||!1,isSignal:!1,transformFunction:e.transform!=null?new si(e.transform):null};return o},{})}function eT(n){return n.reduce((o,e)=>{let[t,i]=V6(e);return o[i]=t,o},{})}function V6(n){let[o,e]=n.split(":",2).map(t=>t.trim());return[e??o,o]}function vJ(n){return{name:n.type.name,type:jr(n.type),typeArgumentCount:0,pipeName:n.name,deps:null,pure:n.pure??!0,isStandalone:n.isStandalone??fF(n.version)}}function CJ(n){return{name:n.type.name,type:jr(n.type),providers:n.providers!==void 0&&n.providers.length>0?new si(n.providers):null,imports:n.imports!==void 0?n.imports.map(o=>new si(o)):[]}}function xJ(n){let o=n.ng||(n.ng={});o.\u0275compilerFacade=new DE}var PE=class{closedByParent=!1;implicitNamespacePrefix=null;isVoid=!1;ignoreFirstLf=!1;canSelfClose=!0;preventNamespaceInheritance=!1;requireExtraParent(o){return!1}isClosedByChild(o){return!1}getContentType(){return yc.PARSABLE_DATA}},g6e=new PE;var _6e=new sT("21.2.18");xJ(a_);function nD(n){let o=n.cloneNode(!0),e=o.querySelectorAll("[id]"),t=n.nodeName.toLowerCase();o.removeAttribute("id");for(let i=0;i=t&&e<=i&&o>=r&&o<=a}function yJ(n,o){let e=o.leftn.right,i=o.topn.bottom;return e||t||i||r}function C0(n,o,e){n.top+=o,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function $6(n,o,e,t){let{top:i,right:r,bottom:a,left:c,width:p,height:u}=n,h=p*o,g=u*o;return t>i-g&&tc-h&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:lD(e)})})}handleScroll(o){let e=kp(o),t=this.positions.get(e);if(!t)return null;let i=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=i.top-r,p=i.left-a;return this.positions.forEach((u,h)=>{u.clientRect&&e!==h&&e.contains(h)&&C0(u.clientRect,c,p)}),i.top=r,i.left=a,{top:c,left:p}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function eR(n,o){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===o.ELEMENT_NODE)return e[0];let t=o.createElement("div");return e.forEach(i=>t.appendChild(i)),t}function cD(n,o,e){for(let t in o)if(o.hasOwnProperty(t)){let i=o[t];i?n.setProperty(t,i,e?.has(t)?"important":""):n.removeProperty(t)}return n}function Kh(n,o){let e=o?"":"none";cD(n.style,{"touch-action":o?"":"none","-webkit-user-drag":o?"":"none","-webkit-tap-highlight-color":o?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function H6(n,o,e){cD(n.style,{position:o?"":"fixed",top:o?"":"0",opacity:o?"":"0",left:o?"":"-999em"},e)}function Sx(n,o){return o&&o!="none"?n+" "+o:n}function U6(n,o){n.style.width=`${o.width}px`,n.style.height=`${o.height}px`,n.style.transform=x0(o.left,o.top)}function x0(n,o){return`translate3d(${Math.round(n)}px, ${Math.round(o)}px, 0)`}var _0={capture:!0},eD={passive:!1,capture:!0},SJ=(()=>{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,i){},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})(),tR=(()=>{class n{_ngZone=f(Ai);_document=f(Qi);_styleLoader=f(sr);_renderer=f(md).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new We;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Q([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new We;pointerUp=new We;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,eD)})}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(SJ),this._activeDragInstances.update(i=>[...i,e]),this._activeDragInstances().length===1)){let i=t.type.startsWith("touch"),r=c=>this.pointerUp.next(c),a=[["scroll",c=>this._scroll.next(c),_0],["selectstart",this._preventDefaultWhileDragging,eD]];i?a.push(["touchend",r,_0],["touchcancel",r,_0]):a.push(["mouseup",r,_0]),i||a.push(["mousemove",c=>this.pointerMove.next(c),eD]),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 i=t.indexOf(e);return i>-1?(t.splice(i,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 Rr(i=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(e,"scroll",a=>{this._activeDragInstances().length&&i.next(a)},_0);return()=>{r()}}))),Wn(...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=te({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function W6(n){let o=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*o}function wJ(n){let o=getComputedStyle(n),e=tD(o,"transition-property"),t=e.find(c=>c==="transform"||c==="all");if(!t)return 0;let i=e.indexOf(t),r=tD(o,"transition-duration"),a=tD(o,"transition-delay");return W6(r[i])+W6(a[i])}function tD(n,o){return n.getPropertyValue(o).split(",").map(t=>t.trim())}var MJ=new Set(["position"]),oD=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(o,e,t,i,r,a,c,p,u,h){this._document=o,this._rootElement=e,this._direction=t,this._initialDomRect=i,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=c,this._initialTransform=p,this._zIndex=u,this._renderer=h}attach(o){this._preview=this._createPreview(),o.appendChild(this._preview),G6(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(o){this._preview.style.transform=o}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(o){this._preview.classList.add(o)}getTransitionDuration(){return wJ(this._preview)}addEventListener(o,e){return this._renderer.listen(this._preview,o,e)}_createPreview(){let o=this._previewTemplate,e=this._previewClass,t=o?o.template:null,i;if(t&&o){let r=o.matchSize?this._initialDomRect:null,a=o.viewContainer.createEmbeddedView(t,o.context);a.detectChanges(),i=eR(a,this._document),this._previewEmbeddedView=a,o.matchSize?U6(i,r):i.style.transform=x0(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=nD(this._rootElement),U6(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return cD(i.style,{"pointer-events":"none",margin:G6(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},MJ),Kh(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>i.classList.add(r)):i.classList.add(e)),i}};function G6(n){return"showPopover"in n}var kJ={passive:!0},q6={passive:!1},TJ={passive:!1,capture:!0},EJ=800,Q6="cdk-drag-placeholder",X6=new Set(["position"]);function DJ(n,o,e={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let t=n.get(Si,null,{optional:!0})||n.get(md).createRenderer(null,null);return new rD(o,e,n.get(Qi),n.get(Ai),n.get(hd),n.get(tR),t)}var rD=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=Q(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new We;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=Mo.EMPTY;_pointerUpSubscription=Mo.EMPTY;_scrollSubscription=Mo.EMPTY;_resizeSubscription=Mo.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(o){o!==this._disabled&&(this._disabled=o,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Kh(e,o)))}_disabled=!1;beforeStarted=new We;started=new We;released=new We;ended=new We;entered=new We;exited=new We;dropped=new We;moved=this._moveEvents;data;constrainPosition;constructor(o,e,t,i,r,a,c){this._config=e,this._document=t,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=c,this.withRootElement(o).withParent(e.parentDragRef||null),this._parentPositions=new yx(t),a.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(o){this._handles=o.map(t=>Ul(t)),this._handles.forEach(t=>Kh(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(o){return this._previewTemplate=o,this}withPlaceholderTemplate(o){return this._placeholderTemplate=o,this}withRootElement(o){let e=Ul(o);if(e!==this._rootElement){this._removeRootElementListeners();let t=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(e,"mousedown",this._pointerDown,q6),t.listen(e,"touchstart",this._pointerDown,kJ),t.listen(e,"dragstart",this._nativeDragStart,q6)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(o){return this._boundaryElement=o?Ul(o):null,this._resizeSubscription.unsubscribe(),o&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(o){return this._parentDragRef=o,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&&yJ(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let o=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),t=0,i=0;e.lefto.right&&(t=o.right-e.right),e.topo.bottom&&(i=o.bottom-e.bottom);let r=this._activeTransform.x,a=this._activeTransform.y,c=r+t,p=a+i;this._rootElement.style.transform=x0(c,p),this._activeTransform={x:c,y:p},this._passiveTransform={x:c,y:p}}}disableHandle(o){!this._disabledHandles.has(o)&&this._handles.indexOf(o)>-1&&(this._disabledHandles.add(o),Kh(o,!0))}enableHandle(o){this._disabledHandles.has(o)&&(this._disabledHandles.delete(o),Kh(o,this.disabled))}withDirection(o){return this._direction=o,this}_withDropContainer(o){this._dropContainer=o}getFreeDragPosition(){let o=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:o.x,y:o.y}}setFreeDragPosition(o){return this._activeTransform={x:0,y:0},this._passiveTransform.x=o.x,this._passiveTransform.y=o.y,this._dropContainer||this._applyRootElementTransform(o.x,o.y),this}withPreviewContainer(o){return this._previewContainer=o,this}_sortFromLastPointerPosition(){let o=this._lastKnownPointerPosition;o&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(o),o)}_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=o=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,o)}else this.disabled||this._initializeDragSequence(this._rootElement,o)};_pointerMove=o=>{let e=this._getPointerPositionOnPage(o);if(!this._hasStartedDragging()){let i=Math.abs(e.x-this._pickupPositionOnPage.x),r=Math.abs(e.y-this._pickupPositionOnPage.y);if(i+r>=this._config.dragStartThreshold){let c=Date.now()>=this._dragStartTime+this._getDragStartDelay(o),p=this._dropContainer;if(!c){this._endDragSequence(o);return}(!p||!p.isDragging()&&!p.isReceiving())&&(o.cancelable&&o.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(o)))}return}o.cancelable&&o.preventDefault();let t=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(t),this._dropContainer)this._updateActiveDropContainer(t,e);else{let i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=t.x-i.x+this._passiveTransform.x,r.y=t.y-i.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:o,distance:this._getDragDistance(t),delta:this._pointerDirectionDelta})})};_pointerUp=o=>{this._endDragSequence(o)};_endDragSequence(o){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:o}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(o),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(o);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:o})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(o){v0(o)&&(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",PJ,TJ)}),t){let i=this._rootElement,r=i.parentNode,a=this._placeholder=this._createPlaceholderElement(),c=this._marker=this._marker||this._document.createComment("");r.insertBefore(c,i),this._initialTransform=i.style.transform||"",this._preview=new oD(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)),H6(i,!1,X6),this._document.body.appendChild(r.replaceChild(a,i)),this.started.next({source:this,event:o}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:o}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(o,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),i=v0(e),r=!i&&e.button!==0,a=this._rootElement,c=kp(e),p=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+EJ>Date.now(),u=i?xC(e):CC(e);if(c&&c.draggable&&e.type==="mousedown"&&e.preventDefault(),t||r||p||u)return;if(this._handles.length){let y=a.style;this._rootElementTapHighlight=y.webkitTapHighlightColor||"",y.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(y=>this._updateOnScroll(y)),this._boundaryElement&&(this._boundaryRect=lD(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,o,e);let g=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:g.x,y:g.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(o){H6(this._rootElement,!0,X6),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),i=this._getPointerPositionOnPage(o),r=this._getDragDistance(i),a=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:r,dropPoint:i,event:o}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:i,event:o}),e.drop(this,t,this._initialIndex,this._initialContainer,a,r,i,o),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:o,y:e},{x:t,y:i}){let r=this._initialContainer._getSiblingContainerFromPosition(this,o,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(o,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,o,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,i),this._dropContainer._sortItem(this,o,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(o,e):this._applyPreviewTransform(o-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let o=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(o.left,o.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let i=c=>{(!c||this._preview&&kp(c)===this._preview.element&&c.propertyName==="transform")&&(a(),t(),clearTimeout(r))},r=setTimeout(i,e*1.5),a=this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let o=this._placeholderTemplate,e=o?o.template:null,t;return e?(this._placeholderRef=o.viewContainer.createEmbeddedView(e,o.context),this._placeholderRef.detectChanges(),t=eR(this._placeholderRef,this._document)):t=nD(this._rootElement),t.style.pointerEvents="none",t.classList.add(Q6),t}_getPointerPositionInElement(o,e,t){let i=e===this._rootElement?null:e,r=i?i.getBoundingClientRect():o,a=v0(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-o.left+p,y:r.top-o.top+u}}_getPointerPositionOnPage(o){let e=this._getViewportScrollPosition(),t=v0(o)?o.touches[0]||o.changedTouches[0]||{pageX:0,pageY:0}:o,i=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=i,c.y=r,c.matrixTransform(a.inverse())}}return{x:i,y:r}}_getConstrainedPointerPosition(o){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:i}=this.constrainPosition?this.constrainPosition(o,this,this._initialDomRect,this._pickupPositionInElement):o;if(this.lockAxis==="x"||e==="x"?i=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,g=c.bottom-(u-a),y=c.left+r,b=c.right-(p-r);t=K6(t,y,b),i=K6(i,h,g)}return{x:t,y:i}}_updatePointerDirectionDelta(o){let{x:e,y:t}=o,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(e-r.x),c=Math.abs(t-r.y);return a>this._config.pointerDirectionChangeThreshold&&(i.x=e>r.x?1:-1,r.x=e),c>this._config.pointerDirectionChangeThreshold&&(i.y=t>r.y?1:-1,r.y=t),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let o=this._handles.length>0||!this.isDragging();o!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=o,Kh(this._rootElement,o))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(o=>o()),this._rootElementCleanups=void 0}_applyRootElementTransform(o,e){let t=1/this.scale,i=x0(o*t,e*t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=Sx(i,this._initialTransform)}_applyPreviewTransform(o,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,i=x0(o,e);this._preview.setTransform(Sx(i,t))}_getDragDistance(o){let e=this._pickupPositionOnPage;return e?{x:o.x-e.x,y:o.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:o,y:e}=this._passiveTransform;if(o===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||t.width===0&&t.height===0)return;let r=i.left-t.left,a=t.right-i.right,c=i.top-t.top,p=t.bottom-i.bottom;i.width>t.width?(r>0&&(o+=r),a>0&&(o-=a)):o=0,i.height>t.height?(c>0&&(e+=c),p>0&&(e-=p)):e=0,(o!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:o})}_getDragStartDelay(o){let e=this.dragStartDelay;return typeof e=="number"?e:v0(o)?e.touch:e?e.mouse:0}_updateOnScroll(o){let e=this._parentPositions.handleScroll(o);if(e){let t=kp(o);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&C0(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=_C(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(o,e){let t=this._previewContainer||"global";if(t==="parent")return o;if(t==="global"){let i=this._document;return e||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return Ul(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=o=>{if(this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&o.preventDefault()}else this.disabled||o.preventDefault()};_getTargetHandle(o){return this._handles.find(e=>o.target&&(o.target===e||e.contains(o.target)))}_conditionallyInsertAnchor(o,e,t){if(o===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let i=this._anchor??=nD(this._placeholder);i.classList.remove(Q6),i.classList.add("cdk-drag-anchor"),i.style.transform="",t?t.before(i):Ul(e.element).appendChild(i)}}};function K6(n,o,e){return Math.max(o,Math.min(e,n))}function v0(n){return n.type[0]==="t"}function PJ(n){n.preventDefault()}function nR(n,o,e){let t=Y6(o,n.length-1),i=Y6(e,n.length-1);if(t===i)return;let r=n[t],a=i0)return null;let c=this.orientation==="horizontal",p=r.findIndex(w=>w.drag===o),u=r[a],h=r[p].clientRect,g=u.clientRect,y=p>a?1:-1,b=this._getItemOffsetPx(h,g,y),x=this._getSiblingOffsetPx(p,r,y),M=r.slice();return nR(r,p,a),r.forEach((w,S)=>{if(M[S]===w)return;let E=w.drag===o,O=E?b:x,D=E?o.getPlaceholderElement():w.drag.getRootElement();w.offset+=O;let N=Math.round(w.offset*(1/w.drag.scale));c?(D.style.transform=Sx(`translate3d(${N}px, 0, 0)`,w.initialTransform),C0(w.clientRect,0,O)):(D.style.transform=Sx(`translate3d(0, ${N}px, 0)`,w.initialTransform),C0(w.clientRect,O,0))}),this._previousSwap.overlaps=iD(g,e,t),this._previousSwap.drag=u.drag,this._previousSwap.delta=c?i.x:i.y,{previousIndex:p,currentIndex:a}}enter(o,e,t,i){let r=this._activeDraggables,a=r.indexOf(o),c=o.getPlaceholderElement();a>-1&&r.splice(a,1);let p=i==null||i<0?this._getItemIndexFromPointerPosition(o,e,t):i,u=r[p];if(u===o&&(u=r[p+1]),!u&&(p==null||p===-1||p{let e=o.getRootElement();if(e){let t=this._itemPositions.find(i=>i.drag===o)?.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(o){return this._getVisualItemPositions().findIndex(e=>e.drag===o)}getItemAtIndex(o){return this._getVisualItemPositions()[o]?.drag||null}updateOnScroll(o,e){this._itemPositions.forEach(({clientRect:t})=>{C0(t,o,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(o){this._element=o}_cacheItemPositions(){let o=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:lD(t)}}).sort((e,t)=>o?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(o,e,t){let i=this.orientation==="horizontal",r=i?e.left-o.left:e.top-o.top;return t===-1&&(r+=i?e.width-o.width:e.height-o.height),r}_getSiblingOffsetPx(o,e,t){let i=this.orientation==="horizontal",r=e[o].clientRect,a=e[o+t*-1],c=r[i?"width":"height"]*t;if(a){let p=i?"left":"top",u=i?"right":"bottom";t===-1?c-=a.clientRect[p]-r[u]:c+=r[p]-a.clientRect[u]}return c}_shouldEnterAsFirstChild(o,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,i=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let a=t[t.length-1].clientRect;return i?o>=a.right:e>=a.bottom}else{let a=t[0].clientRect;return i?o<=a.left:e<=a.top}}_getItemIndexFromPointerPosition(o,e,t,i){let r=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:c,clientRect:p})=>{if(c===o)return!1;if(i){let u=r?i.x:i.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),nR(this._activeItems,p,r);let g=this._getRootNode().elementFromPoint(e,t);return a.deltaX=i.x,a.deltaY=i.y,a.drag=c,a.overlaps=h===g||h.contains(g),{previousIndex:p,currentIndex:r}}enter(o,e,t,i){let r=this._activeItems.indexOf(o);r>-1&&this._activeItems.splice(r,1);let a=i==null||i<0?this._getItemIndexFromPointerPosition(o,e,t):i;a===-1&&(a=this._getClosestItemIndexToPointer(o,e,t));let c=this._activeItems[a];c&&!this._dragDropRegistry.isDragging(c)?(this._activeItems.splice(a,0,o),c.getRootElement().before(o.getPlaceholderElement())):(this._activeItems.push(o),this._element.appendChild(o.getPlaceholderElement()))}withItems(o){this._activeItems=o.slice()}withSortPredicate(o){this._sortPredicate=o}reset(){let o=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[i,r]=this._relatedNodes[t];i.parentNode===o&&i.nextSibling!==r&&(r===null?o.appendChild(i):r.parentNode===o&&o.insertBefore(i,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(o){return this._activeItems.indexOf(o)}getItemAtIndex(o){return this._activeItems[o]||null}updateOnScroll(){this._activeItems.forEach(o=>{this._dragDropRegistry.isDragging(o)&&o._sortFromLastPointerPosition()})}withElementContainer(o){o!==this._element&&(this._element=o,this._rootNode=void 0)}_getItemIndexFromPointerPosition(o,e,t){let i=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),r=i?this._activeItems.findIndex(a=>{let c=a.getRootElement();return i===c||c.contains(i)}):-1;return r===-1||!this._sortPredicate(r,o)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=_C(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(o,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,r=-1;for(let a=0;a!0;sortPredicate=()=>!0;beforeStarted=new We;entered=new We;exited=new We;dropped=new We;sorted=new We;receivingStarted=new We;receivingStopped=new We;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=Mo.EMPTY;_verticalScrollDirection=ml.NONE;_horizontalScrollDirection=Ua.NONE;_scrollNode;_stopScrollTimers=new We;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(o,e,t,i,r){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=r;let a=this.element=Ul(o);this._document=t,this.withOrientation("vertical").withElementContainer(a),e.registerDropContainer(this),this._parentPositions=new yx(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(o,e,t,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(o)),this._sortStrategy.enter(o,e,t,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:o,container:this,currentIndex:this.getItemIndex(o)})}exit(o){this._reset(),this.exited.next({item:o,container:this})}drop(o,e,t,i,r,a,c,p={}){this._reset(),this.dropped.next({item:o,currentIndex:e,previousIndex:t,container:this,previousContainer:i,isPointerOverContainer:r,distance:a,dropPoint:c,event:p})}withItems(o){let e=this._draggables;return this._draggables=o,o.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(i=>i.isDragging()).every(i=>o.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(o){return this._direction=o,this._sortStrategy instanceof wx&&(this._sortStrategy.direction=o),this}connectedTo(o){return this._siblings=o.slice(),this}withOrientation(o){if(o==="mixed")this._sortStrategy=new aD(this._document,this._dragDropRegistry);else{let e=new wx(this._dragDropRegistry);e.direction=this._direction,e.orientation=o,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(o){let e=this._container;return this._scrollableElements=o.indexOf(e)===-1?[e,...o]:o.slice(),this}withElementContainer(o){if(o===this._container)return this;let e=Ul(this.element),t=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(o);return t>-1&&this._scrollableElements.splice(t,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(o),this._cachedShadowRoot=null,this._scrollableElements.unshift(o),this._container=o,this}getScrollableParents(){return this._scrollableElements}getItemIndex(o){return this._isDragging?this._sortStrategy.getItemIndex(o):this._draggables.indexOf(o)}getItemAtIndex(o){return this._isDragging?this._sortStrategy.getItemAtIndex(o):this._draggables[o]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(o,e,t,i){if(this.sortingDisabled||!this._domRect||!$6(this._domRect,Z6,e,t))return;let r=this._sortStrategy.sort(o,e,t,i);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:o})}_startScrollingIfNecessary(o,e){if(this.autoScrollDisabled)return;let t,i=ml.NONE,r=Ua.NONE;if(this._parentPositions.positions.forEach((a,c)=>{c===this._document||!a.clientRect||t||$6(a.clientRect,Z6,o,e)&&([i,r]=AJ(c,a.clientRect,this._direction,o,e),(i||r)&&(t=c))}),!i&&!r){let{width:a,height:c}=this._viewportRuler.getViewportSize(),p={width:a,height:c,top:0,right:a,bottom:c,left:0};i=oR(p,e),r=rR(p,o),t=window}t&&(i!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=r,this._scrollNode=t,(i||r)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let o=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=o.msScrollSnapType||o.scrollSnapType||"",o.scrollSnapType=o.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 o=this._container.style;o.scrollSnapType=o.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),aC(0,qs).pipe(Ge(this._stopScrollTimers)).subscribe(()=>{let o=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===ml.UP?o.scrollBy(0,-e):this._verticalScrollDirection===ml.DOWN&&o.scrollBy(0,e),this._horizontalScrollDirection===Ua.LEFT?o.scrollBy(-e,0):this._horizontalScrollDirection===Ua.RIGHT&&o.scrollBy(e,0)})};_isOverContainer(o,e){return this._domRect!=null&&iD(this._domRect,o,e)}_getSiblingContainerFromPosition(o,e,t){return this._siblings.find(i=>i._canReceive(o,e,t))}_canReceive(o,e,t){if(!this._domRect||!iD(this._domRect,e,t)||!this.enterPredicate(o,this))return!1;let i=this._getShadowRoot().elementFromPoint(e,t);return i?i===this._container||this._container.contains(i):!1}_startReceiving(o,e){let t=this._activeSiblings;!t.has(o)&&e.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(t.add(o),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:o,receiver:this,items:e}))}_stopReceiving(o){this._activeSiblings.delete(o),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:o,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(o=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(o);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let o=_C(this._container);this._cachedShadowRoot=o||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let o=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,o))}};function oR(n,o){let{top:e,bottom:t,height:i}=n,r=i*iR;return o>=e-r&&o<=e+r?ml.UP:o>=t-r&&o<=t+r?ml.DOWN:ml.NONE}function rR(n,o){let{left:e,right:t,width:i}=n,r=i*iR;return o>=e-r&&o<=e+r?Ua.LEFT:o>=t-r&&o<=t+r?Ua.RIGHT:Ua.NONE}function AJ(n,o,e,t,i){let r=oR(o,i),a=rR(o,t),c=ml.NONE,p=Ua.NONE;if(r){let u=n.scrollTop;r===ml.UP?u>0&&(c=ml.UP):n.scrollHeight-u>n.clientHeight&&(c=ml.DOWN)}if(a){let u=n.scrollLeft;e==="rtl"?a===Ua.RIGHT?u<0&&(p=Ua.RIGHT):n.scrollWidth+u>n.clientWidth&&(p=Ua.LEFT):a===Ua.LEFT?u>0&&(p=Ua.LEFT):n.scrollWidth-u>n.clientWidth&&(p=Ua.RIGHT)}return[c,p]}var OJ=(()=>{class n{_injector=f(rr);constructor(){}createDrag(e,t){return DJ(this._injector,e,t)}createDropList(e){return IJ(this._injector,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var aR=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({providers:[OJ],imports:[fd]})}return n})();var NJ=[[["caption"]],[["colgroup"],["col"]],"*"],FJ=["caption","colgroup, col","*"];function RJ(n,o){n&1&&an(0,2)}function LJ(n,o){n&1&&(s(0,"thead",0),Fi(1,1),l(),s(2,"tbody",0),Fi(3,2)(4,3),l(),s(5,"tfoot",0),Fi(6,4),l())}function VJ(n,o){n&1&&Fi(0,1)(1,2)(2,3)(3,4)}var Xl=new cn("CDK_TABLE");var Tx=(()=>{class n{template=f(Ro);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),Ex=(()=>{class n{template=f(Ro);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),cR=(()=>{class n{template=f(Ro);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),km=(()=>{class n{_table=f(Xl,{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=vt({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,i,r){if(t&1&&Zi(r,Tx,5)(r,Ex,5)(r,cR,5),t&2){let a;mt(a=pt())&&(i.cell=a.first),mt(a=pt())&&(i.headerCell=a.first),mt(a=pt())&&(i.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",yt],stickyEnd:[2,"stickyEnd","stickyEnd",yt]}})}return n})(),kx=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}},dR=(()=>{class n extends kx{constructor(){super(f(km),f(Jt))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[di]})}return n})();var mR=(()=>{class n extends kx{constructor(){let e=f(km),t=f(Jt);super(e,t);let i=e._table?._getCellRole();i&&t.nativeElement.setAttribute("role",i)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[di]})}return n})();var mD=(()=>{class n{template=f(Ro);_differs=f(pd);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 y0?e.headerCell.template:this instanceof pD?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,features:[Pn]})}return n})(),y0=(()=>{class n extends mD{_table=f(Xl,{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(Ro),f(pd))}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=vt({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",yt]},features:[di,Pn]})}return n})(),pD=(()=>{class n extends mD{_table=f(Xl,{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(Ro),f(pd))}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=vt({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",yt]},features:[di,Pn]})}return n})(),Dx=(()=>{class n extends mD{_table=f(Xl,{optional:!0});when;constructor(){super(f(Ro),f(pd))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[di]})}return n})(),cu=(()=>{class n{_viewContainer=f(ro);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=vt({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),uD=(()=>{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,i){t&1&&Fi(0,0)},dependencies:[cu],encapsulation:2})}return n})();var hD=(()=>{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,i){t&1&&Fi(0,0)},dependencies:[cu],encapsulation:2})}return n})(),pR=(()=>{class n{templateRef=f(Ro);_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=vt({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),sR=["top","bottom","left","right"],dD=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(o,e,t=!0,i=!0,r,a,c){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=i,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(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let t=[];for(let i of o)i.nodeType===i.ELEMENT_NODE&&t.push(i,...Array.from(i.children));Ja({write:()=>{for(let i of t)this._removeStickyStyle(i,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,i=!0,r=!0){if(!o.length||!this._isBrowser||!(e.some(w=>w)||t.some(w=>w))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=o[0],c=a.children.length,p=this.direction==="rtl",u=p?"right":"left",h=p?"left":"right",g=e.lastIndexOf(!0),y=t.indexOf(!0),b,x,M;r&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),Ja({earlyRead:()=>{b=this._getCellWidths(a,i),x=this._getStickyStartColumnPositions(b,e),M=this._getStickyEndColumnPositions(b,t)},write:()=>{for(let w of o)for(let S=0;S!!w)&&(this._positionListener.stickyColumnsUpdated({sizes:g===-1?[]:b.slice(0,g+1).map((w,S)=>e[S]?w:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:y===-1?[]:b.slice(y).map((w,S)=>t[S+y]?w:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let i=t==="bottom"?o.slice().reverse():o,r=t==="bottom"?e.slice().reverse():e,a=[],c=[],p=[];Ja({earlyRead:()=>{for(let u=0,h=0;u{let u=r.lastIndexOf(!0);for(let h=0;h{let t=o.querySelector("tfoot");t&&(e.some(i=>!i)?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(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let i of e)o.style[i]="",o.classList.remove(this._borderCellCss[i]);sR.some(i=>e.indexOf(i)===-1&&o.style[i])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss))}_addStickyStyle(o,e,t,i){o.classList.add(this._stickCellCss),i&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},t=0;for(let i of sR)o.style[i]&&(t+=e[i]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],i=o.children;for(let r=0;r0;r--)e[r]&&(t[r]=i,i+=o[r]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),i={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(o,i),this._resizeObserver.observe(o,{box:"border-box"})),i}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o)}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(i=>!e.has(i));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let i=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};i.width!==this._elemSizeCache.get(t.target)?.width&&BJ(t.target)&&(e=!0),this._elemSizeCache.set(t.target,i)}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 BJ(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>n.classList.contains(o))}var b0=new cn("STICKY_POSITIONING_LISTENER");var fD=(()=>{class n{viewContainer=f(ro);elementRef=f(Jt);constructor(){let e=f(Xl);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","rowOutlet",""]]})}return n})(),gD=(()=>{class n{viewContainer=f(ro);elementRef=f(Jt);constructor(){let e=f(Xl);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),_D=(()=>{class n{viewContainer=f(ro);elementRef=f(Jt);constructor(){let e=f(Xl);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),vD=(()=>{class n{viewContainer=f(ro);elementRef=f(Jt);constructor(){let e=f(Xl);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),CD=(()=>{class n{_differs=f(pd);_changeDetectorRef=f(X);_elementRef=f(Jt);_dir=f(es,{optional:!0});_platform=f(Es);_viewRepeater;_viewportRuler=f(hd);_injector=f(rr);_virtualScrollViewport=f(v4,{optional:!0,host:!0});_positionListener=f(b0,{optional:!0})||f(b0,{optional:!0,skipSelf:!0});_document=f(Qi);_data;_renderedRange;_onDestroy=new We;_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 We;_footerRowStickyUpdates=new We;_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 We;_dataStream=new We;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 _e;viewChange=new tn({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){f(new hc("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,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Ge(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new g4:new w4,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(),Yu(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,(i,r,a)=>this._getEmbeddedViewArgs(i.item,a),i=>i.item.data,i=>{i.operation===f4.INSERTED&&i.context&&this._renderCellTemplateForItem(i.record.item.rowDef,i.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(i=>{let r=t.get(i.currentIndex);r.context.$implicit=i.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 i=lR(this._headerRowOutlet,"thead");i&&(i.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let i=lR(this._footerRowOutlet,"tfoot");i&&(i.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...i],["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),i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r{let c=i&&i.has(a)?i.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(),Mx(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=Mx(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Mx(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Mx(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 i=this._headerRowDefs.reduce(e,!1);i&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||i||r}_switchDataSource(e){this._data=[],Yu(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;Yu(this.dataSource)?e=this.dataSource.connect(this):jg(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Nn(this.dataSource)),this._renderChangeSubscription=Lr([e,this.viewChange]).pipe(Ge(this._onDestroy)).subscribe(([t,i])=>{this._data=t||[],this._renderedRange=i,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 i=Array.from(t?.columns||[]).map(c=>{let p=this._columnDefsByName.get(c);return p}),r=i.map(c=>c.sticky),a=i.map(c=>c.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let i=0;i!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&i.push(r)}return i.length,i}_getEmbeddedViewArgs(e,t){let i=e.rowDef,r={$implicit:e.data};return{templateRef:i.template,context:r,index:t}}_renderRow(e,t,i,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,i);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let i of this._getCellTemplates(e))cu.mostRecentCellOutlet&&cu.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,i=e.length;t{let i=this._columnDefsByName.get(t);return e.extractCellTemplate(i)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,i)=>t||i.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 dD(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Nn()).pipe(Ge(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?qs:FO;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Qs(0,t),Ge(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(i,r)=>this._measureRangeSize(i,r)}),Lr([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Ge(this._onDestroy)).subscribe(([i,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 i=this._noDataRowOutlet.viewContainer;if(t){let r=i.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 i=this.viewChange.value,r=this._rowOutlet.viewContainer;e.starti.end;let a=e.start-i.start,c=e.end-e.start,p,u;for(let y=0;y-1;y--){let b=r.get(y+a);if(b&&b.rootNodes.length){u=b.rootNodes[b.rootNodes.length-1];break}}let h=p?.getBoundingClientRect?.(),g=u?.getBoundingClientRect?.();return h&&g?g.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,i,r){if(t&1&&Zi(r,pR,5)(r,km,5)(r,Dx,5)(r,y0,5)(r,pD,5),t&2){let a;mt(a=pt())&&(i._noDataRow=a.first),mt(a=pt())&&(i._contentColumnDefs=a),mt(a=pt())&&(i._contentRowDefs=a),mt(a=pt())&&(i._contentHeaderRowDefs=a),mt(a=pt())&&(i._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,i){t&2&&Ae("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",yt],fixedLayout:[2,"fixedLayout","fixedLayout",yt],recycleRows:[2,"recycleRows","recycleRows",yt]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[fn([{provide:Xl,useExisting:n},{provide:b0,useValue:null}])],ngContentSelectors:FJ,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(ai(NJ),an(0),an(1,1),I(2,RJ,1,0),I(3,LJ,7,0)(4,VJ,4,0)),t&2&&(m(2),A(i._isServer?2:-1),m(),A(i._isNativeHtmlTable?3:4))},dependencies:[gD,fD,vD,_D],styles:[`.cdk-table-fixed-layout { table-layout: fixed; } `],encapsulation:2})}return n})();function Mx(n,o){return n.concat(Array.from(o))}function lR(n,o){let e=o.toUpperCase(),t=n.viewContainer.element.nativeElement;for(;t;){let i=t.nodeType===1?t.nodeName:null;if(i===e)return t;if(i==="TABLE")break;t=t.parentNode}return null}var Px=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({imports:[yC]})}return n})();var uR=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({imports:[fd,_i,fd]})}return n})();var Xn=(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})(Xn||{}),pl="*";function xD(n,o){return{type:Xn.Trigger,name:n,definitions:o,options:{}}}function bD(n,o=null){return{type:Xn.Animate,styles:o,timings:n}}function hR(n,o=null){return{type:Xn.Sequence,steps:n,options:o}}function mu(n){return{type:Xn.Style,styles:n,offset:null}}function Ix(n,o,e){return{type:Xn.State,name:n,styles:o,options:e}}function yD(n,o,e=null){return{type:Xn.Transition,expr:n,animation:o,options:e}}var Rc=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(o=0,e=0){this.totalTime=o+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(o=>o()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(o){this._position=this.totalTime?o*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(o){let e=o=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},du=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(o){this.players=o;let e=0,t=0,i=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(()=>{++i==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(o=>o()),this._onDoneFns=[])}init(){this.players.forEach(o=>o.init())}onStart(o){this._onStartFns.push(o)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(o=>o()),this._onStartFns=[])}onDone(o){this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(o=>o.play())}pause(){this.players.forEach(o=>o.pause())}restart(){this.players.forEach(o=>o.restart())}finish(){this._onFinish(),this.players.forEach(o=>o.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(o=>o.destroy()),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this.players.forEach(o=>o.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(o){let e=o*this.totalTime;this.players.forEach(t=>{let i=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(i)})}getPosition(){let o=this.players.reduce((e,t)=>e===null||t.totalTime>e.totalTime?t:e,null);return o!=null?o.getPosition():0}beforeDestroy(){this.players.forEach(o=>{o.beforeDestroy&&o.beforeDestroy()})}triggerCallback(o){let e=o=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Yh="!";function fR(n){return new Mi(3e3,!1)}function zJ(){return new Mi(3100,!1)}function jJ(){return new Mi(3101,!1)}function $J(n){return new Mi(3001,!1)}function HJ(n){return new Mi(3003,!1)}function UJ(n){return new Mi(3004,!1)}function _R(n,o){return new Mi(3005,!1)}function vR(){return new Mi(3006,!1)}function CR(){return new Mi(3007,!1)}function xR(n,o){return new Mi(3008,!1)}function bR(n){return new Mi(3002,!1)}function yR(n,o,e,t,i){return new Mi(3010,!1)}function SR(){return new Mi(3011,!1)}function wR(){return new Mi(3012,!1)}function MR(){return new Mi(3200,!1)}function kR(){return new Mi(3202,!1)}function TR(){return new Mi(3013,!1)}function ER(n){return new Mi(3014,!1)}function DR(n){return new Mi(3015,!1)}function PR(n){return new Mi(3016,!1)}function IR(n,o){return new Mi(3404,!1)}function WJ(n){return new Mi(3502,!1)}function AR(n){return new Mi(3503,!1)}function OR(){return new Mi(3300,!1)}function NR(n){return new Mi(3504,!1)}function FR(n){return new Mi(3301,!1)}function RR(n,o){return new Mi(3302,!1)}function LR(n){return new Mi(3303,!1)}function VR(n,o){return new Mi(3400,!1)}function BR(n){return new Mi(3401,!1)}function zR(n){return new Mi(3402,!1)}function jR(n,o){return new Mi(3505,!1)}function Dd(n){switch(n.length){case 0:return new Rc;case 1:return n[0];default:return new du(n)}}function kD(n,o,e=new Map,t=new Map){let i=[],r=[],a=-1,c=null;if(o.forEach(p=>{let u=p.get("offset"),h=u==a,g=h&&c||new Map;p.forEach((y,b)=>{let x=b,M=y;if(b!=="offset")switch(x=n.normalizePropertyName(x,i),M){case Yh:M=e.get(b);break;case pl:M=t.get(b);break;default:M=n.normalizeStyleValue(b,x,M,i);break}g.set(x,M)}),h||r.push(g),c=g,a=u}),i.length)throw WJ(i);return r}function Ax(n,o,e,t){switch(o){case"start":n.onStart(()=>t(e&&SD(e,"start",n)));break;case"done":n.onDone(()=>t(e&&SD(e,"done",n)));break;case"destroy":n.onDestroy(()=>t(e&&SD(e,"destroy",n)));break}}function SD(n,o,e){let t=e.totalTime,i=!!e.disabled,r=Ox(n.element,n.triggerName,n.fromState,n.toState,o||n.phaseName,t??n.totalTime,i),a=n._data;return a!=null&&(r._data=a),r}function Ox(n,o,e,t,i="",r=0,a){return{element:n,triggerName:o,fromState:e,toState:t,phaseName:i,totalTime:r,disabled:!!a}}function us(n,o,e){let t=n.get(o);return t||n.set(o,t=e),t}function TD(n){let o=n.indexOf(":"),e=n.substring(1,o),t=n.slice(o+1);return[e,t]}var GJ=typeof document>"u"?null:document.documentElement;function Nx(n){let o=n.parentNode||n.host||null;return o===GJ?null:o}function qJ(n){return n.substring(1,6)=="ebkit"}var pu=null,gR=!1;function $R(n){pu||(pu=QJ()||{},gR=pu.style?"WebkitAppearance"in pu.style:!1);let o=!0;return pu.style&&!qJ(n)&&(o=n in pu.style,!o&&gR&&(o="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in pu.style)),o}function QJ(){return typeof document<"u"?document.body:null}function ED(n,o){for(;o;){if(o===n)return!0;o=Nx(o)}return!1}function DD(n,o,e){if(e)return Array.from(n.querySelectorAll(o));let t=n.querySelector(o);return t?[t]:[]}var XJ=1e3,PD="{{",KJ="}}",ID="ng-enter",Fx="ng-leave",S0="ng-trigger",w0=".ng-trigger",AD="ng-animating",Rx=".ng-animating";function Lc(n){if(typeof n=="number")return n;let o=n.match(/^(-?[\.\d]+)(m?s)/);return!o||o.length<2?0:wD(parseFloat(o[1]),o[2])}function wD(n,o){return o==="s"?n*XJ:n}function M0(n,o,e){return n.hasOwnProperty("duration")?n:ZJ(n,o,e)}var YJ=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function ZJ(n,o,e){let t,i=0,r="";if(typeof n=="string"){let a=n.match(YJ);if(a===null)return o.push(fR(n)),{duration:0,delay:0,easing:""};t=wD(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(i=wD(parseFloat(c),a[4]));let p=a[5];p&&(r=p)}else t=n;if(!e){let a=!1,c=o.length;t<0&&(o.push(zJ()),a=!0),i<0&&(o.push(jJ()),a=!0),a&&o.splice(c,0,fR(n))}return{duration:t,delay:i,easing:r}}function HR(n){return n.length?n[0]instanceof Map?n:n.map(o=>new Map(Object.entries(o))):[]}function Kl(n,o,e){o.forEach((t,i)=>{let r=Lx(i);e&&!e.has(i)&&e.set(i,n.style[r]),n.style[r]=t})}function Tm(n,o){o.forEach((e,t)=>{let i=Lx(t);n.style[i]=""})}function Zh(n){return Array.isArray(n)?n.length==1?n[0]:hR(n):n}function UR(n,o,e){let t=o.params||{},i=OD(n);i.length&&i.forEach(r=>{t.hasOwnProperty(r)||e.push($J(r))})}var MD=new RegExp(`${PD}\\s*(.+?)\\s*${KJ}`,"g");function OD(n){let o=[];if(typeof n=="string"){let e;for(;e=MD.exec(n);)o.push(e[1]);MD.lastIndex=0}return o}function Jh(n,o,e){let t=`${n}`,i=t.replace(MD,(r,a)=>{let c=o[a];return c==null&&(e.push(HJ(a)),c=""),c.toString()});return i==t?n:i}var JJ=/-+([a-z0-9])/g;function Lx(n){return n.replace(JJ,(...o)=>o[1].toUpperCase())}function WR(n,o){return n===0||o===0}function GR(n,o,e){if(e.size&&o.length){let t=o[0],i=[];if(e.forEach((r,a)=>{t.has(a)||i.push(a),t.set(a,r)}),i.length)for(let r=1;ra.set(c,Vx(n,c)))}}return o}function hs(n,o,e){switch(o.type){case Xn.Trigger:return n.visitTrigger(o,e);case Xn.State:return n.visitState(o,e);case Xn.Transition:return n.visitTransition(o,e);case Xn.Sequence:return n.visitSequence(o,e);case Xn.Group:return n.visitGroup(o,e);case Xn.Animate:return n.visitAnimate(o,e);case Xn.Keyframes:return n.visitKeyframes(o,e);case Xn.Style:return n.visitStyle(o,e);case Xn.Reference:return n.visitReference(o,e);case Xn.AnimateChild:return n.visitAnimateChild(o,e);case Xn.AnimateRef:return n.visitAnimateRef(o,e);case Xn.Query:return n.visitQuery(o,e);case Xn.Stagger:return n.visitStagger(o,e);default:throw UJ(o.type)}}function Vx(n,o){return window.getComputedStyle(n)[o]}var KD=(()=>{class n{validateStyleProperty(e){return $R(e)}containsElement(e,t){return ED(e,t)}getParentElement(e){return Nx(e)}query(e,t,i){return DD(e,t,i)}computeStyle(e,t,i){return i||""}animate(e,t,i,r,a,c=[],p){return new Rc(i,r)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=te({token:n,factory:n.\u0275fac})}return n})(),hu=class{static NOOP=new KD},fu=class{};var eee=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"]),Hx=class extends fu{normalizePropertyName(o,e){return Lx(o)}normalizeStyleValue(o,e,t,i){let r="",a=t.toString().trim();if(eee.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&&i.push(_R(o,t))}return a+r}};var Ux="*";function tee(n,o){let e=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(t=>nee(t,e,o)):e.push(n),e}function nee(n,o,e){if(n[0]==":"){let p=iee(n,e);if(typeof p=="function"){o.push(p);return}n=p}let t=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(DR(n)),o;let i=t[1],r=t[2],a=t[3];o.push(qR(i,a));let c=i==Ux&&a==Ux;r[0]=="<"&&!c&&o.push(qR(a,i))}function iee(n,o){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 Bx=new Set(["true","1"]),zx=new Set(["false","0"]);function qR(n,o){let e=Bx.has(n)||zx.has(n),t=Bx.has(o)||zx.has(o);return(i,r)=>{let a=n==Ux||n==i,c=o==Ux||o==r;return!a&&e&&typeof i=="boolean"&&(a=i?Bx.has(n):zx.has(n)),!c&&t&&typeof r=="boolean"&&(c=r?Bx.has(o):zx.has(o)),a&&c}}var i8=":self",oee=new RegExp(`s*${i8}s*,?`,"g");function o8(n,o,e,t){return new BD(n).build(o,e,t)}var QR="",BD=class{_driver;constructor(o){this._driver=o}build(o,e,t){let i=new zD(e);return this._resetContextStyleTimingState(i),hs(this,Zh(o),i)}_resetContextStyleTimingState(o){o.currentQuerySelector=QR,o.collectedStyles=new Map,o.collectedStyles.set(QR,new Map),o.currentTime=0}visitTrigger(o,e){let t=e.queryCount=0,i=e.depCount=0,r=[],a=[];return o.name.charAt(0)=="@"&&e.errors.push(vR()),o.definitions.forEach(c=>{if(this._resetContextStyleTimingState(e),c.type==Xn.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==Xn.Transition){let p=this.visitTransition(c,e);t+=p.queryCount,i+=p.depCount,a.push(p)}else e.errors.push(CR())}),{type:Xn.Trigger,name:o.name,states:r,transitions:a,queryCount:t,depCount:i,options:null}}visitState(o,e){let t=this.visitStyle(o.styles,e),i=o.options&&o.options.params||null;if(t.containsDynamicStyles){let r=new Set,a=i||{};t.styles.forEach(c=>{c instanceof Map&&c.forEach(p=>{OD(p).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&e.errors.push(xR(o.name,[...r.values()]))}return{type:Xn.State,name:o.name,style:t,options:i?{params:i}:null}}visitTransition(o,e){e.queryCount=0,e.depCount=0;let t=hs(this,Zh(o.animation),e),i=tee(o.expr,e.errors);return{type:Xn.Transition,matchers:i,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:uu(o.options)}}visitSequence(o,e){return{type:Xn.Sequence,steps:o.steps.map(t=>hs(this,t,e)),options:uu(o.options)}}visitGroup(o,e){let t=e.currentTime,i=0,r=o.steps.map(a=>{e.currentTime=t;let c=hs(this,a,e);return i=Math.max(i,e.currentTime),c});return e.currentTime=i,{type:Xn.Group,steps:r,options:uu(o.options)}}visitAnimate(o,e){let t=lee(o.timings,e.errors);e.currentAnimateTimings=t;let i,r=o.styles?o.styles:mu({});if(r.type==Xn.Keyframes)i=this.visitKeyframes(r,e);else{let a=o.styles,c=!1;if(!a){c=!0;let u={};t.easing&&(u.easing=t.easing),a=mu(u)}e.currentTime+=t.duration+t.delay;let p=this.visitStyle(a,e);p.isEmptyStep=c,i=p}return e.currentAnimateTimings=null,{type:Xn.Animate,timings:t,style:i,options:null}}visitStyle(o,e){let t=this._makeStyleAst(o,e);return this._validateStyleAst(t,e),t}_makeStyleAst(o,e){let t=[],i=Array.isArray(o.styles)?o.styles:[o.styles];for(let c of i)typeof c=="string"?c===pl?t.push(c):e.errors.push(bR(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(PD)>=0){r=!0;break}}}),{type:Xn.Style,styles:t,easing:a,offset:o.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(o,e){let t=e.currentAnimateTimings,i=e.currentTime,r=e.currentTime;t&&r>0&&(r-=t.duration+t.delay),o.styles.forEach(a=>{typeof a!="string"&&a.forEach((c,p)=>{let u=e.collectedStyles.get(e.currentQuerySelector),h=u.get(p),g=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(e.errors.push(yR(p,h.startTime,h.endTime,r,i)),g=!1),r=h.startTime),g&&u.set(p,{startTime:r,endTime:i}),e.options&&UR(c,e.options,e.errors)})})}visitKeyframes(o,e){let t={type:Xn.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(SR()),t;let i=1,r=0,a=[],c=!1,p=!1,u=0,h=o.steps.map(S=>{let E=this._makeStyleAst(S,e),O=E.offset!=null?E.offset:see(E.styles),D=0;return O!=null&&(r++,D=E.offset=O),p=p||D<0||D>1,c=c||D0&&r{let O=y>0?E==b?1:y*E:a[E],D=O*w;e.currentTime=x+M.delay+D,M.duration=D,this._validateStyleAst(S,e),S.offset=O,t.styles.push(S)}),t}visitReference(o,e){return{type:Xn.Reference,animation:hs(this,Zh(o.animation),e),options:uu(o.options)}}visitAnimateChild(o,e){return e.depCount++,{type:Xn.AnimateChild,options:uu(o.options)}}visitAnimateRef(o,e){return{type:Xn.AnimateRef,animation:this.visitReference(o.animation,e),options:uu(o.options)}}visitQuery(o,e){let t=e.currentQuerySelector,i=o.options||{};e.queryCount++,e.currentQuery=o;let[r,a]=ree(o.selector);e.currentQuerySelector=t.length?t+" "+r:r,us(e.collectedStyles,e.currentQuerySelector,new Map);let c=hs(this,Zh(o.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:Xn.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:c,originalSelector:o.selector,options:uu(o.options)}}visitStagger(o,e){e.currentQuery||e.errors.push(TR());let t=o.timings==="full"?{duration:0,delay:0,easing:"full"}:M0(o.timings,e.errors,!0);return{type:Xn.Stagger,animation:hs(this,Zh(o.animation),e),timings:t,options:null}}};function ree(n){let o=!!n.split(/\s*,\s*/).find(e=>e==i8);return o&&(n=n.replace(oee,"")),n=n.replace(/@\*/g,w0).replace(/@\w+/g,e=>w0+"-"+e.slice(1)).replace(/:animating/g,Rx),[n,o]}function aee(n){return n?Z({},n):null}var zD=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(o){this.errors=o}};function see(n){if(typeof n=="string")return null;let o=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;o=parseFloat(t.get("offset")),t.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;o=parseFloat(e.get("offset")),e.delete("offset")}return o}function lee(n,o){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=M0(n,o).duration;return ND(r,0,"")}let e=n;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=ND(0,0,"");return r.dynamic=!0,r.strValue=e,r}let i=M0(e,o);return ND(i.duration,i.delay,i.easing)}function uu(n){return n?(n=Z({},n),n.params&&(n.params=aee(n.params))):n={},n}function ND(n,o,e){return{duration:n,delay:o,easing:e}}function YD(n,o,e,t,i,r,a=null,c=!1){return{type:1,element:n,keyframes:o,preStyleProps:e,postStyleProps:t,duration:i,delay:r,totalTime:i+r,easing:a,subTimeline:c}}var T0=class{_map=new Map;get(o){return this._map.get(o)||[]}append(o,e){let t=this._map.get(o);t||this._map.set(o,t=[]),t.push(...e)}has(o){return this._map.has(o)}clear(){this._map.clear()}},cee=1,dee=":enter",mee=new RegExp(dee,"g"),pee=":leave",uee=new RegExp(pee,"g");function r8(n,o,e,t,i,r=new Map,a=new Map,c,p,u=[]){return new jD().buildKeyframes(n,o,e,t,i,r,a,c,p,u)}var jD=class{buildKeyframes(o,e,t,i,r,a,c,p,u,h=[]){u=u||new T0;let g=new $D(o,e,u,i,r,h,[]);g.options=p;let y=p.delay?Lc(p.delay):0;g.currentTimeline.delayNextStep(y),g.currentTimeline.setStyles([a],null,g.errors,p),hs(this,t,g);let b=g.timelines.filter(x=>x.containsAnimation());if(b.length&&c.size){let x;for(let M=b.length-1;M>=0;M--){let w=b[M];if(w.element===e){x=w;break}}x&&!x.allowOnlyTimelineStyles()&&x.setStyles([c],null,g.errors,p)}return b.length?b.map(x=>x.buildKeyframes()):[YD(e,[],[],[],0,y,"",!1)]}visitTrigger(o,e){}visitState(o,e){}visitTransition(o,e){}visitAnimateChild(o,e){let t=e.subInstructions.get(e.element);if(t){let i=e.createSubContext(o.options),r=e.currentTimeline.currentTime,a=this._visitSubInstructions(t,i,i.options);r!=a&&e.transformIntoNewTimeline(a)}e.previousNode=o}visitAnimateRef(o,e){let t=e.createSubContext(o.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([o.options,o.animation.options],e,t),this.visitReference(o.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=o}_applyAnimationRefDelays(o,e,t){for(let i of o){let r=i?.delay;if(r){let a=typeof r=="number"?r:Lc(Jh(r,i?.params??{},e.errors));t.delayNextStep(a)}}}_visitSubInstructions(o,e,t){let r=e.currentTimeline.currentTime,a=t.duration!=null?Lc(t.duration):null,c=t.delay!=null?Lc(t.delay):null;return a!==0&&o.forEach(p=>{let u=e.appendInstructionToTimeline(p,a,c);r=Math.max(r,u.duration+u.delay)}),r}visitReference(o,e){e.updateOptions(o.options,!0),hs(this,o.animation,e),e.previousNode=o}visitSequence(o,e){let t=e.subContextCount,i=e,r=o.options;if(r&&(r.params||r.delay)&&(i=e.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==Xn.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Wx);let a=Lc(r.delay);i.delayNextStep(a)}o.steps.length&&(o.steps.forEach(a=>hs(this,a,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>t&&i.transformIntoNewTimeline()),e.previousNode=o}visitGroup(o,e){let t=[],i=e.currentTimeline.currentTime,r=o.options&&o.options.delay?Lc(o.options.delay):0;o.steps.forEach(a=>{let c=e.createSubContext(o.options);r&&c.delayNextStep(r),hs(this,a,c),i=Math.max(i,c.currentTimeline.currentTime),t.push(c.currentTimeline)}),t.forEach(a=>e.currentTimeline.mergeTimelineCollectedStyles(a)),e.transformIntoNewTimeline(i),e.previousNode=o}_visitTiming(o,e){if(o.dynamic){let t=o.strValue,i=e.params?Jh(t,e.params,e.errors):t;return M0(i,e.errors)}else return{duration:o.duration,delay:o.delay,easing:o.easing}}visitAnimate(o,e){let t=e.currentAnimateTimings=this._visitTiming(o.timings,e),i=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),i.snapshotCurrentStyles());let r=o.style;r.type==Xn.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(t.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=o}visitStyle(o,e){let t=e.currentTimeline,i=e.currentAnimateTimings;!i&&t.hasCurrentStyleProperties()&&t.forwardFrame();let r=i&&i.easing||o.easing;o.isEmptyStep?t.applyEmptyStep(r):t.setStyles(o.styles,r,e.errors,e.options),e.previousNode=o}visitKeyframes(o,e){let t=e.currentAnimateTimings,i=e.currentTimeline.duration,r=t.duration,c=e.createSubContext().currentTimeline;c.easing=t.easing,o.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(i+r),e.previousNode=o}visitQuery(o,e){let t=e.currentTimeline.currentTime,i=o.options||{},r=i.delay?Lc(i.delay):0;r&&(e.previousNode.type===Xn.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Wx);let a=t,c=e.invokeQuery(o.selector,o.originalSelector,o.limit,o.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=c.length;let p=null;c.forEach((u,h)=>{e.currentQueryIndex=h;let g=e.createSubContext(o.options,u);r&&g.delayNextStep(r),u===e.element&&(p=g.currentTimeline),hs(this,o.animation,g),g.currentTimeline.applyStylesToKeyframe();let y=g.currentTimeline.currentTime;a=Math.max(a,y)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),p&&(e.currentTimeline.mergeTimelineCollectedStyles(p),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=o}visitStagger(o,e){let t=e.parentContext,i=e.currentTimeline,r=o.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 g=h.currentTime;hs(this,o.animation,e),e.previousNode=o,t.currentStaggerTime=i.currentTime-g+(i.startTime-t.currentTimeline.startTime)}},Wx={},$D=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Wx;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(o,e,t,i,r,a,c,p){this._driver=o,this.element=e,this.subInstructions=t,this._enterClassName=i,this._leaveClassName=r,this.errors=a,this.timelines=c,this.currentTimeline=p||new Gx(this._driver,e,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(o,e){if(!o)return;let t=o,i=this.options;t.duration!=null&&(i.duration=Lc(t.duration)),t.delay!=null&&(i.delay=Lc(t.delay));let r=t.params;if(r){let a=i.params;a||(a=this.options.params={}),Object.keys(r).forEach(c=>{(!e||!a.hasOwnProperty(c))&&(a[c]=Jh(r[c],a,this.errors))})}}_copyOptions(){let o={};if(this.options){let e=this.options.params;if(e){let t=o.params={};Object.keys(e).forEach(i=>{t[i]=e[i]})}}return o}createSubContext(o=null,e,t){let i=e||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,t||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(o),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(o){return this.previousNode=Wx,this.currentTimeline=this.currentTimeline.fork(this.element,o),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(o,e,t){let i={duration:e??o.duration,delay:this.currentTimeline.currentTime+(t??0)+o.delay,easing:""},r=new HD(this._driver,o.element,o.keyframes,o.preStyleProps,o.postStyleProps,i,o.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(o){this.currentTimeline.forwardTime(this.currentTimeline.duration+o)}delayNextStep(o){o>0&&this.currentTimeline.delayNextStep(o)}invokeQuery(o,e,t,i,r,a){let c=[];if(i&&c.push(this.element),o.length>0){o=o.replace(mee,"."+this._enterClassName),o=o.replace(uee,"."+this._leaveClassName);let p=t!=1,u=this._driver.query(this.element,o,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(ER(e)),c}},Gx=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(o,e,t,i){this._driver=o,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=i,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(o){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+o),e&&this.snapshotCurrentStyles()):this.startTime+=o}fork(o,e){return this.applyStylesToKeyframe(),new n(this._driver,o,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+=cee,this._loadKeyframe()}forwardTime(o){this.applyStylesToKeyframe(),this.duration=o,this._loadKeyframe()}_updateStyle(o,e){this._localTimelineStyles.set(o,e),this._globalTimelineStyles.set(o,e),this._styleSummary.set(o,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(o){o&&this._previousKeyframe.set("easing",o);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||pl),this._currentKeyframe.set(e,pl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(o,e,t,i){e&&this._previousKeyframe.set("easing",e);let r=i&&i.params||{},a=hee(o,this._globalTimelineStyles);for(let[c,p]of a){let u=Jh(p,r,t);this._pendingStyles.set(c,u),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??pl),this._updateStyle(c,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((o,e)=>{this._currentKeyframe.set(e,o)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((o,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,o)}))}snapshotCurrentStyles(){for(let[o,e]of this._localTimelineStyles)this._pendingStyles.set(o,e),this._updateStyle(o,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let o=[];for(let e in this._currentKeyframe)o.push(e);return o}mergeTimelineCollectedStyles(o){o._styleSummary.forEach((e,t)=>{let i=this._styleSummary.get(t);(!i||e.time>i.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let o=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((c,p)=>{let u=new Map([...this._backFill,...c]);u.forEach((h,g)=>{h===Yh?o.add(g):h===pl&&e.add(g)}),t||u.set("offset",p/this.duration),i.push(u)});let r=[...o.values()],a=[...e.values()];if(t){let c=i[0],p=new Map(c);c.set("offset",0),p.set("offset",1),i=[c,p]}return YD(this.element,i,r,a,this.duration,this.startTime,this.easing,!1)}},HD=class extends Gx{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(o,e,t,i,r,a,c=!1){super(o,e,a.delay),this.keyframes=t,this.preStyleProps=i,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 o=this.keyframes,{delay:e,duration:t,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],a=t+e,c=e/a,p=new Map(o[0]);p.set("offset",0),r.push(p);let u=new Map(o[0]);u.set("offset",XR(c)),r.push(u);let h=o.length-1;for(let g=1;g<=h;g++){let y=new Map(o[g]),b=y.get("offset"),x=e+b*t;y.set("offset",XR(x/a)),r.push(y)}t=a,e=0,i="",o=r}return YD(this.element,o,this.preStyleProps,this.postStyleProps,t,e,i,!0)}};function XR(n,o=3){let e=Math.pow(10,o-1);return Math.round(n*e)/e}function hee(n,o){let e=new Map,t;return n.forEach(i=>{if(i==="*"){t??=o.keys();for(let r of t)e.set(r,pl)}else for(let[r,a]of i)e.set(r,a)}),e}function KR(n,o,e,t,i,r,a,c,p,u,h,g,y){return{type:0,element:n,triggerName:o,isRemovalTransition:i,fromState:e,fromStyles:r,toState:t,toStyles:a,timelines:c,queriedElements:p,preStyleProps:u,postStyleProps:h,totalTime:g,errors:y}}var FD={},qx=class{_triggerName;ast;_stateStyles;constructor(o,e,t){this._triggerName=o,this.ast=e,this._stateStyles=t}match(o,e,t,i){return fee(this.ast.matchers,o,e,t,i)}buildStyles(o,e,t){let i=this._stateStyles.get("*");return o!==void 0&&(i=this._stateStyles.get(o?.toString())||i),i?i.buildStyles(e,t):new Map}build(o,e,t,i,r,a,c,p,u,h){let g=[],y=this.ast.options&&this.ast.options.params||FD,b=c&&c.params||FD,x=this.buildStyles(t,b,g),M=p&&p.params||FD,w=this.buildStyles(i,M,g),S=new Set,E=new Map,O=new Map,D=i==="void",N={params:a8(M,y),delay:this.ast.options?.delay},P=h?[]:r8(o,e,this.ast.animation,r,a,x,w,N,u,g),L=0;return P.forEach(se=>{L=Math.max(se.duration+se.delay,L)}),g.length?KR(e,this._triggerName,t,i,D,x,w,[],[],E,O,L,g):(P.forEach(se=>{let re=se.element,W=us(E,re,new Set);se.preStyleProps.forEach(ue=>W.add(ue));let $=us(O,re,new Set);se.postStyleProps.forEach(ue=>$.add(ue)),re!==e&&S.add(re)}),KR(e,this._triggerName,t,i,D,x,w,P,[...S.values()],E,O,L))}};function fee(n,o,e,t,i){return n.some(r=>r(o,e,t,i))}function a8(n,o){let e=Z({},o);return Object.entries(n).forEach(([t,i])=>{i!=null&&(e[t]=i)}),e}var UD=class{styles;defaultParams;normalizer;constructor(o,e,t){this.styles=o,this.defaultParams=e,this.normalizer=t}buildStyles(o,e){let t=new Map,i=a8(o,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,c)=>{a&&(a=Jh(a,i,e));let p=this.normalizer.normalizePropertyName(c,e);a=this.normalizer.normalizeStyleValue(c,p,a,e),t.set(c,a)})}),t}};function gee(n,o,e){return new WD(n,o,e)}var WD=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(o,e,t){this.name=o,this.ast=e,this._normalizer=t,e.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new UD(i.style,r,t))}),YR(this.states,"true","1"),YR(this.states,"false","0"),e.transitions.forEach(i=>{this.transitionFactories.push(new qx(o,i,this.states))}),this.fallbackTransition=_ee(o,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(o,e,t,i){return this.transitionFactories.find(a=>a.match(o,e,t,i))||null}matchStyles(o,e,t){return this.fallbackTransition.buildStyles(o,e,t)}};function _ee(n,o,e){let t=[(a,c)=>!0],i={type:Xn.Sequence,steps:[],options:null},r={type:Xn.Transition,animation:i,matchers:t,options:null,queryCount:0,depCount:0};return new qx(n,r,o)}function YR(n,o,e){n.has(o)?n.has(e)||n.set(e,n.get(o)):n.has(e)&&n.set(o,n.get(e))}var vee=new T0,GD=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(o,e,t){this.bodyNode=o,this._driver=e,this._normalizer=t}register(o,e){let t=[],i=[],r=o8(this._driver,e,t,i);if(t.length)throw AR(t);this._animations.set(o,r)}_buildPlayer(o,e,t){let i=o.element,r=kD(this._normalizer,o.keyframes,e,t);return this._driver.animate(i,r,o.duration,o.delay,o.easing,[],!0)}create(o,e,t={}){let i=[],r=this._animations.get(o),a,c=new Map;if(r?(a=r8(this._driver,e,r,ID,Fx,new Map,new Map,t,vee,i),a.forEach(h=>{let g=us(c,h.element,new Map);h.postStyleProps.forEach(y=>g.set(y,null))})):(i.push(OR()),a=[]),i.length)throw NR(i);c.forEach((h,g)=>{h.forEach((y,b)=>{h.set(b,this._driver.computeStyle(g,b,pl))})});let p=a.map(h=>{let g=c.get(h.element);return this._buildPlayer(h,new Map,g)}),u=Dd(p);return this._playersById.set(o,u),u.onDestroy(()=>this.destroy(o)),this.players.push(u),u}destroy(o){let e=this._getPlayer(o);e.destroy(),this._playersById.delete(o);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(o){let e=this._playersById.get(o);if(!e)throw FR(o);return e}listen(o,e,t,i){let r=Ox(e,"","","");return Ax(this._getPlayer(o),t,r,i),()=>{}}command(o,e,t,i){if(t=="register"){this.register(o,i[0]);return}if(t=="create"){let a=i[0]||{};this.create(o,e,a);return}let r=this._getPlayer(o);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(i[0]));break;case"destroy":this.destroy(o);break}}},ZR="ng-animate-queued",Cee=".ng-animate-queued",RD="ng-animate-disabled",xee=".ng-animate-disabled",bee="ng-star-inserted",yee=".ng-star-inserted",See=[],s8={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},wee={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Yl="__ng_removed",E0=class{namespaceId;value;options;get params(){return this.options.params}constructor(o,e=""){this.namespaceId=e;let t=o&&o.hasOwnProperty("value"),i=t?o.value:o;if(this.value=kee(i),t){let r=o,{value:a}=r,c=rC(r,["value"]);this.options=c}else this.options={};this.options.params||(this.options.params={})}absorbOptions(o){let e=o.params;if(e){let t=this.options.params;Object.keys(e).forEach(i=>{t[i]==null&&(t[i]=e[i])})}}},k0="void",LD=new E0(k0),qD=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(o,e,t){this.id=o,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+o,ul(e,this._hostClassName)}listen(o,e,t,i){if(!this._triggers.has(e))throw RR(t,e);if(t==null||t.length==0)throw LR(e);if(!Tee(t))throw VR(t,e);let r=us(this._elementListeners,o,[]),a={name:e,phase:t,callback:i};r.push(a);let c=us(this._engine.statesByElement,o,new Map);return c.has(e)||(ul(o,S0),ul(o,S0+"-"+e),c.set(e,LD)),()=>{this._engine.afterFlush(()=>{let p=r.indexOf(a);p>=0&&r.splice(p,1),this._triggers.has(e)||c.delete(e)})}}register(o,e){return this._triggers.has(o)?!1:(this._triggers.set(o,e),!0)}_getTrigger(o){let e=this._triggers.get(o);if(!e)throw BR(o);return e}trigger(o,e,t,i=!0){let r=this._getTrigger(e),a=new D0(this.id,e,o),c=this._engine.statesByElement.get(o);c||(ul(o,S0),ul(o,S0+"-"+e),this._engine.statesByElement.set(o,c=new Map));let p=c.get(e),u=new E0(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&p&&u.absorbOptions(p.options),c.set(e,u),p||(p=LD),!(u.value===k0)&&p.value===u.value){if(!Pee(p.params,u.params)){let M=[],w=r.matchStyles(p.value,p.params,M),S=r.matchStyles(u.value,u.params,M);M.length?this._engine.reportError(M):this._engine.afterFlush(()=>{Tm(o,w),Kl(o,S)})}return}let y=us(this._engine.playersByElement,o,[]);y.forEach(M=>{M.namespaceId==this.id&&M.triggerName==e&&M.queued&&M.destroy()});let b=r.matchTransition(p.value,u.value,o,u.params),x=!1;if(!b){if(!i)return;b=r.fallbackTransition,x=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:e,transition:b,fromState:p,toState:u,player:a,isFallbackTransition:x}),x||(ul(o,ZR),a.onStart(()=>{ef(o,ZR)})),a.onDone(()=>{let M=this.players.indexOf(a);M>=0&&this.players.splice(M,1);let w=this._engine.playersByElement.get(o);if(w){let S=w.indexOf(a);S>=0&&w.splice(S,1)}}),this.players.push(a),y.push(a),a}deregister(o){this._triggers.delete(o),this._engine.statesByElement.forEach(e=>e.delete(o)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(i=>i.name!=o))})}clearElementCache(o){this._engine.statesByElement.delete(o),this._elementListeners.delete(o);let e=this._engine.playersByElement.get(o);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(o))}_signalRemovalForInnerTriggers(o,e){let t=this._engine.driver.query(o,w0,!0);t.forEach(i=>{if(i[Yl])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(a=>a.triggerLeaveAnimation(i,e,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(o,e,t,i){let r=this._engine.statesByElement.get(o),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(o,u,k0,i);h&&c.push(h)}}),c.length)return this._engine.markElementAsRemoved(this.id,o,!0,e,a),t&&Dd(c).onDone(()=>this._engine.processLeaveNode(o)),!0}return!1}prepareLeaveAnimationListeners(o){let e=this._elementListeners.get(o),t=this._engine.statesByElement.get(o);if(e&&t){let i=new Set;e.forEach(r=>{let a=r.name;if(i.has(a))return;i.add(a);let p=this._triggers.get(a).fallbackTransition,u=t.get(a)||LD,h=new E0(k0),g=new D0(this.id,a,o);this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:a,transition:p,fromState:u,toState:h,player:g,isFallbackTransition:!0})})}}removeNode(o,e){let t=this._engine;if(o.childElementCount&&this._signalRemovalForInnerTriggers(o,e),this.triggerLeaveAnimation(o,e,!0))return;let i=!1;if(t.totalAnimations){let r=t.players.length?t.playersByQueriedElement.get(o):[];if(r&&r.length)i=!0;else{let a=o;for(;a=a.parentNode;)if(t.statesByElement.get(a)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(o),i)t.markElementAsRemoved(this.id,o,!1,e);else{let r=o[Yl];(!r||r===s8)&&(t.afterFlush(()=>this.clearElementCache(o)),t.destroyInnerAnimations(o),t._onRemovalComplete(o,e))}}insertNode(o,e){ul(o,this._hostClassName)}drainQueuedTransitions(o){let e=[];return this._queue.forEach(t=>{let i=t.player;if(i.destroyed)return;let r=t.element,a=this._elementListeners.get(r);a&&a.forEach(c=>{if(c.name==t.triggerName){let p=Ox(r,t.triggerName,t.fromState.value,t.toState.value);p._data=o,Ax(t.player,c.phase,p,c.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(t)}),this._queue=[],e.sort((t,i)=>{let r=t.transition.ast.depCount,a=i.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(t.element,i.element)?1:-1})}destroy(o){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,o)}},QD=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=(o,e)=>{};_onRemovalComplete(o,e){this.onRemovalComplete(o,e)}constructor(o,e,t){this.bodyNode=o,this.driver=e,this._normalizer=t}get queuedPlayers(){let o=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&o.push(t)})}),o}createNamespace(o,e){let t=new qD(o,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[o]=t}_balanceNamespaceList(o,e){let t=this._namespaceList,i=this.namespacesByHostElement;if(t.length-1>=0){let a=!1,c=this.driver.getParentElement(e);for(;c;){let p=i.get(c);if(p){let u=t.indexOf(p);t.splice(u+1,0,o),a=!0;break}c=this.driver.getParentElement(c)}a||t.unshift(o)}else t.push(o);return i.set(e,o),o}register(o,e){let t=this._namespaceLookup[o];return t||(t=this.createNamespace(o,e)),t}registerTrigger(o,e,t){let i=this._namespaceLookup[o];i&&i.register(e,t)&&this.totalAnimations++}destroy(o,e){o&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(o);this.namespacesByHostElement.delete(t.hostElement);let i=this._namespaceList.indexOf(t);i>=0&&this._namespaceList.splice(i,1),t.destroy(e),delete this._namespaceLookup[o]}))}_fetchNamespace(o){return this._namespaceLookup[o]}fetchNamespacesByElement(o){let e=new Set,t=this.statesByElement.get(o);if(t){for(let i of t.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&e.add(r)}}return e}trigger(o,e,t,i){if(jx(e)){let r=this._fetchNamespace(o);if(r)return r.trigger(e,t,i),!0}return!1}insertNode(o,e,t,i){if(!jx(e))return;let r=e[Yl];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(e);a>=0&&this.collectedLeaveElements.splice(a,1)}if(o){let a=this._fetchNamespace(o);a&&a.insertNode(e,t)}i&&this.collectEnterElement(e)}collectEnterElement(o){this.collectedEnterElements.push(o)}markElementAsDisabled(o,e){e?this.disabledNodes.has(o)||(this.disabledNodes.add(o),ul(o,RD)):this.disabledNodes.has(o)&&(this.disabledNodes.delete(o),ef(o,RD))}removeNode(o,e,t){if(jx(e)){let i=o?this._fetchNamespace(o):null;i?i.removeNode(e,t):this.markElementAsRemoved(o,e,!1,t);let r=this.namespacesByHostElement.get(e);r&&r.id!==o&&r.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(o,e,t,i,r){this.collectedLeaveElements.push(e),e[Yl]={namespaceId:o,setForRemoval:i,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:r}}listen(o,e,t,i,r){return jx(e)?this._fetchNamespace(o).listen(e,t,i,r):()=>{}}_buildInstruction(o,e,t,i,r){return o.transition.build(this.driver,o.element,o.fromState.value,o.toState.value,t,i,o.fromState.options,o.toState.options,e,r)}destroyInnerAnimations(o){let e=this.driver.query(o,w0,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(o,Rx,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(o){let e=this.playersByElement.get(o);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(o){let e=this.playersByQueriedElement.get(o);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(o=>{if(this.players.length)return Dd(this.players).onDone(()=>o());o()})}processLeaveNode(o){let e=o[Yl];if(e&&e.setForRemoval){if(o[Yl]=s8,e.namespaceId){this.destroyInnerAnimations(o);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(o)}this._onRemovalComplete(o,e.setForRemoval)}o.classList?.contains(RD)&&this.markElementAsDisabled(o,!1),this.driver.query(o,xee,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(o=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,i)=>this._balanceNamespaceList(t,i)),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?Dd(e).onDone(()=>{t.forEach(i=>i())}):t.forEach(i=>i())}}reportError(o){throw zR(o)}_flushAnimations(o,e){let t=new T0,i=[],r=new Map,a=[],c=new Map,p=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(he=>{h.add(he);let j=this.driver.query(he,Cee,!0);for(let J=0;J{let J=ID+M++;x.set(j,J),he.forEach(le=>ul(le,J))});let w=[],S=new Set,E=new Set;for(let he=0;heS.add(le)):E.add(j))}let O=new Map,D=t8(y,Array.from(S));D.forEach((he,j)=>{let J=Fx+M++;O.set(j,J),he.forEach(le=>ul(le,J))}),o.push(()=>{b.forEach((he,j)=>{let J=x.get(j);he.forEach(le=>ef(le,J))}),D.forEach((he,j)=>{let J=O.get(j);he.forEach(le=>ef(le,J))}),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(J=>{let le=J.player,ce=J.element;if(N.push(le),this.collectedEnterElements.length){let Ne=ce[Yl];if(Ne&&Ne.setForMove){if(Ne.previousTriggersValues&&Ne.previousTriggersValues.has(J.triggerName)){let Qe=Ne.previousTriggersValues.get(J.triggerName),ct=this.statesByElement.get(J.element);if(ct&&ct.has(J.triggerName)){let At=ct.get(J.triggerName);At.value=Qe,ct.set(J.triggerName,At)}}le.destroy();return}}let De=!g||!this.driver.containsElement(g,ce),He=O.get(ce),et=x.get(ce),Ze=this._buildInstruction(J,t,et,He,De);if(Ze.errors&&Ze.errors.length){P.push(Ze);return}if(De){le.onStart(()=>Tm(ce,Ze.fromStyles)),le.onDestroy(()=>Kl(ce,Ze.toStyles)),i.push(le);return}if(J.isFallbackTransition){le.onStart(()=>Tm(ce,Ze.fromStyles)),le.onDestroy(()=>Kl(ce,Ze.toStyles)),i.push(le);return}let ye=[];Ze.timelines.forEach(Ne=>{Ne.stretchStartingKeyframe=!0,this.disabledNodes.has(Ne.element)||ye.push(Ne)}),Ze.timelines=ye,t.append(ce,Ze.timelines);let q={instruction:Ze,player:le,element:ce};a.push(q),Ze.queriedElements.forEach(Ne=>us(c,Ne,[]).push(le)),Ze.preStyleProps.forEach((Ne,Qe)=>{if(Ne.size){let ct=p.get(Qe);ct||p.set(Qe,ct=new Set),Ne.forEach((At,Yn)=>ct.add(Yn))}}),Ze.postStyleProps.forEach((Ne,Qe)=>{let ct=u.get(Qe);ct||u.set(Qe,ct=new Set),Ne.forEach((At,Yn)=>ct.add(Yn))})});if(P.length){let he=[];P.forEach(j=>{he.push(jR(j.triggerName,j.errors))}),N.forEach(j=>j.destroy()),this.reportError(he)}let L=new Map,se=new Map;a.forEach(he=>{let j=he.element;t.has(j)&&(se.set(j,j),this._beforeAnimationBuild(he.player.namespaceId,he.instruction,L))}),i.forEach(he=>{let j=he.element;this._getPreviousPlayers(j,!1,he.namespaceId,he.triggerName,null).forEach(le=>{us(L,j,[]).push(le),le.destroy()})});let re=w.filter(he=>n8(he,p,u)),W=new Map;e8(W,this.driver,E,u,pl).forEach(he=>{n8(he,p,u)&&re.push(he)});let ue=new Map;b.forEach((he,j)=>{e8(ue,this.driver,new Set(he),p,Yh)}),re.forEach(he=>{let j=W.get(he),J=ue.get(he);W.set(he,new Map([...j?.entries()??[],...J?.entries()??[]]))});let be=[],me=[],Pe={};a.forEach(he=>{let{element:j,player:J,instruction:le}=he;if(t.has(j)){if(h.has(j)){J.onDestroy(()=>Kl(j,le.toStyles)),J.disabled=!0,J.overrideTotalTime(le.totalTime),i.push(J);return}let ce=Pe;if(se.size>1){let He=j,et=[];for(;He=He.parentNode;){let Ze=se.get(He);if(Ze){ce=Ze;break}et.push(He)}et.forEach(Ze=>se.set(Ze,ce))}let De=this._buildAnimation(J.namespaceId,le,L,r,ue,W);if(J.setRealPlayer(De),ce===Pe)be.push(J);else{let He=this.playersByElement.get(ce);He&&He.length&&(J.parentPlayer=Dd(He)),i.push(J)}}else Tm(j,le.fromStyles),J.onDestroy(()=>Kl(j,le.toStyles)),me.push(J),h.has(j)&&i.push(J)}),me.forEach(he=>{let j=r.get(he.element);if(j&&j.length){let J=Dd(j);he.setRealPlayer(J)}}),i.forEach(he=>{he.parentPlayer?he.syncPlayerEvents(he.parentPlayer):he.destroy()});for(let he=0;he!De.destroyed);ce.length?Eee(this,j,ce):this.processLeaveNode(j)}return w.length=0,be.forEach(he=>{this.players.push(he),he.onDone(()=>{he.destroy();let j=this.players.indexOf(he);this.players.splice(j,1)}),he.play()}),be}afterFlush(o){this._flushFns.push(o)}afterFlushAnimationsDone(o){this._whenQuietFns.push(o)}_getPreviousPlayers(o,e,t,i,r){let a=[];if(e){let c=this.playersByQueriedElement.get(o);c&&(a=c)}else{let c=this.playersByElement.get(o);if(c){let p=!r||r==k0;c.forEach(u=>{u.queued||!p&&u.triggerName!=i||a.push(u)})}}return(t||i)&&(a=a.filter(c=>!(t&&t!=c.namespaceId||i&&i!=c.triggerName))),a}_beforeAnimationBuild(o,e,t){let i=e.triggerName,r=e.element,a=e.isRemovalTransition?void 0:o,c=e.isRemovalTransition?void 0:i;for(let p of e.timelines){let u=p.element,h=u!==r,g=us(t,u,[]);this._getPreviousPlayers(u,h,a,c,e.toState).forEach(b=>{let x=b.getRealPlayer();x.beforeDestroy&&x.beforeDestroy(),b.destroy(),g.push(b)})}Tm(r,e.fromStyles)}_buildAnimation(o,e,t,i,r,a){let c=e.triggerName,p=e.element,u=[],h=new Set,g=new Set,y=e.timelines.map(x=>{let M=x.element;h.add(M);let w=M[Yl];if(w&&w.removedBeforeQueried)return new Rc(x.duration,x.delay);let S=M!==p,E=Dee((t.get(M)||See).map(L=>L.getRealPlayer())).filter(L=>{let se=L;return se.element?se.element===M:!1}),O=r.get(M),D=a.get(M),N=kD(this._normalizer,x.keyframes,O,D),P=this._buildPlayer(x,N,E);if(x.subTimeline&&i&&g.add(M),S){let L=new D0(o,c,M);L.setRealPlayer(P),u.push(L)}return P});u.forEach(x=>{us(this.playersByQueriedElement,x.element,[]).push(x),x.onDone(()=>Mee(this.playersByQueriedElement,x.element,x))}),h.forEach(x=>ul(x,AD));let b=Dd(y);return b.onDestroy(()=>{h.forEach(x=>ef(x,AD)),Kl(p,e.toStyles)}),g.forEach(x=>{us(i,x,[]).push(b)}),b}_buildPlayer(o,e,t){return e.length>0?this.driver.animate(o.element,e,o.duration,o.delay,o.easing,t):new Rc(o.duration,o.delay)}},D0=class{namespaceId;triggerName;element;_player=new Rc;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(o,e,t){this.namespaceId=o,this.triggerName=e,this.element=t}setRealPlayer(o){this._containsRealPlayer||(this._player=o,this._queuedCallbacks.forEach((e,t)=>{e.forEach(i=>Ax(o,t,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(o.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(o){this.totalTime=o}syncPlayerEvents(o){let e=this._player;e.triggerCallback&&o.onStart(()=>e.triggerCallback("start")),o.onDone(()=>this.finish()),o.onDestroy(()=>this.destroy())}_queueEvent(o,e){us(this._queuedCallbacks,o,[]).push(e)}onDone(o){this.queued&&this._queueEvent("done",o),this._player.onDone(o)}onStart(o){this.queued&&this._queueEvent("start",o),this._player.onStart(o)}onDestroy(o){this.queued&&this._queueEvent("destroy",o),this._player.onDestroy(o)}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(o){this.queued||this._player.setPosition(o)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(o){let e=this._player;e.triggerCallback&&e.triggerCallback(o)}};function Mee(n,o,e){let t=n.get(o);if(t){if(t.length){let i=t.indexOf(e);t.splice(i,1)}t.length==0&&n.delete(o)}return t}function kee(n){return n??null}function jx(n){return n&&n.nodeType===1}function Tee(n){return n=="start"||n=="done"}function JR(n,o){let e=n.style.display;return n.style.display=o??"none",e}function e8(n,o,e,t,i){let r=[];e.forEach(p=>r.push(JR(p)));let a=[];t.forEach((p,u)=>{let h=new Map;p.forEach(g=>{let y=o.computeStyle(u,g,i);h.set(g,y),(!y||y.length==0)&&(u[Yl]=wee,a.push(u))}),n.set(u,h)});let c=0;return e.forEach(p=>JR(p,r[c++])),a}function t8(n,o){let e=new Map;if(n.forEach(c=>e.set(c,[])),o.length==0)return e;let t=1,i=new Set(o),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:i.has(u)?p=t:p=a(u),r.set(c,p),p}return o.forEach(c=>{let p=a(c);p!==t&&e.get(p).push(c)}),e}function ul(n,o){n.classList?.add(o)}function ef(n,o){n.classList?.remove(o)}function Eee(n,o,e){Dd(e).onDone(()=>n.processLeaveNode(o))}function Dee(n){let o=[];return l8(n,o),o}function l8(n,o){for(let e=0;ei.add(r)):o.set(n,t),e.delete(n),!0}var tf=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(o,e)=>{};constructor(o,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new QD(o.body,e,t),this._timelineEngine=new GD(o.body,e,t),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(o,e,t,i,r){let a=o+"-"+i,c=this._triggerCache[a];if(!c){let p=[],u=[],h=o8(this._driver,r,p,u);if(p.length)throw IR(i,p);c=gee(i,h,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(e,i,c)}register(o,e){this._transitionEngine.register(o,e)}destroy(o,e){this._transitionEngine.destroy(o,e)}onInsert(o,e,t,i){this._transitionEngine.insertNode(o,e,t,i)}onRemove(o,e,t){this._transitionEngine.removeNode(o,e,t)}disableAnimations(o,e){this._transitionEngine.markElementAsDisabled(o,e)}process(o,e,t,i){if(t.charAt(0)=="@"){let[r,a]=TD(t),c=i;this._timelineEngine.command(r,e,a,c)}else this._transitionEngine.trigger(o,e,t,i)}listen(o,e,t,i,r){if(t.charAt(0)=="@"){let[a,c]=TD(t);return this._timelineEngine.listen(a,e,c,r)}return this._transitionEngine.listen(o,e,t,i,r)}flush(o=-1){this._transitionEngine.flush(o)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(o){this._transitionEngine.afterFlushAnimationsDone(o)}};function Iee(n,o){let e=null,t=null;return Array.isArray(o)&&o.length?(e=VD(o[0]),o.length>1&&(t=VD(o[o.length-1]))):o instanceof Map&&(e=VD(o)),e||t?new Aee(n,e,t):null}var Aee=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,i){this._element=e,this._startStyles=t,this._endStyles=i;let r=n.initialStylesByElement.get(e);r||n.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Kl(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Kl(this._element,this._initialStyles),this._endStyles&&(Kl(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Tm(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Tm(this._element,this._endStyles),this._endStyles=null),Kl(this._element,this._initialStyles),this._state=3)}}return n})();function VD(n){let o=null;return n.forEach((e,t)=>{Oee(t)&&(o=o||new Map,o.set(t,e))}),o}function Oee(n){return n==="display"||n==="position"}var Qx=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(o,e,t,i){this.element=o,this.keyframes=e,this.options=t,this._specialStyles=i,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let o=this.keyframes,e=this._triggerWebAnimation(this.element,o,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=o.length?o[o.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(o){let e=[];return o.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(o,e,t){let i=this._convertKeyframesToObject(e);try{return o.animate(i,t)}catch{return null}}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}play(){let o=this._buildPlayer();o&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),o.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(o=>o()),this._onDestroyFns=[])}setPosition(o){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=o*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 o=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,i)=>{i!=="offset"&&o.set(i,this._finished?t:Vx(this.element,i))}),this.currentSnapshot=o}triggerCallback(o){let e=o==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Xx=class{validateStyleProperty(o){return!0}validateAnimatableStyleProperty(o){return!0}containsElement(o,e){return ED(o,e)}getParentElement(o){return Nx(o)}query(o,e,t){return DD(o,e,t)}computeStyle(o,e,t){return Vx(o,e)}animate(o,e,t,i,r,a=[]){let c=i==0?"both":"forwards",p={duration:t,delay:i,fill:c};r&&(p.easing=r);let u=new Map,h=a.filter(b=>b instanceof Qx);WR(t,i)&&h.forEach(b=>{b.currentSnapshot.forEach((x,M)=>u.set(M,x))});let g=HR(e).map(b=>new Map(b));g=GR(o,g,u);let y=Iee(o,g);return new Qx(o,g,p,y)}};var $x="@",c8="@.disabled",Kx=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(o,e,t,i){this.namespaceId=o,this.delegate=e,this.engine=t,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(o){this.delegate.destroyNode?.(o)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(o,e){return this.delegate.createElement(o,e)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}appendChild(o,e){this.delegate.appendChild(o,e),this.engine.onInsert(this.namespaceId,e,o,!1)}insertBefore(o,e,t,i=!0){this.delegate.insertBefore(o,e,t),this.engine.onInsert(this.namespaceId,e,o,i)}removeChild(o,e,t,i){if(i){this.delegate.removeChild(o,e,t,i);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(o,e){return this.delegate.selectRootElement(o,e)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,e,t,i){this.delegate.setAttribute(o,e,t,i)}removeAttribute(o,e,t){this.delegate.removeAttribute(o,e,t)}addClass(o,e){this.delegate.addClass(o,e)}removeClass(o,e){this.delegate.removeClass(o,e)}setStyle(o,e,t,i){this.delegate.setStyle(o,e,t,i)}removeStyle(o,e,t){this.delegate.removeStyle(o,e,t)}setProperty(o,e,t){e.charAt(0)==$x&&e==c8?this.disableAnimations(o,!!t):this.delegate.setProperty(o,e,t)}setValue(o,e){this.delegate.setValue(o,e)}listen(o,e,t,i){return this.delegate.listen(o,e,t,i)}disableAnimations(o,e){this.engine.disableAnimations(o,e)}},XD=class extends Kx{factory;constructor(o,e,t,i,r){super(e,t,i,r),this.factory=o,this.namespaceId=e}setProperty(o,e,t){e.charAt(0)==$x?e.charAt(1)=="."&&e==c8?(t=t===void 0?!0:!!t,this.disableAnimations(o,t)):this.engine.process(this.namespaceId,o,e.slice(1),t):this.delegate.setProperty(o,e,t)}listen(o,e,t,i){if(e.charAt(0)==$x){let r=Nee(o),a=e.slice(1),c="";return a.charAt(0)!=$x&&([a,c]=Fee(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(o,e,t,i)}};function Nee(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function Fee(n){let o=n.indexOf("."),e=n.substring(0,o),t=n.slice(o+1);return[e,t]}var Yx=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(o,e,t){this.delegate=o,this.engine=e,this._zone=t,e.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(o,e){let i=this.delegate.createRenderer(o,e);if(!o||!e?.data?.animation){let u=this._rendererCache,h=u.get(i);if(!h){let g=()=>u.delete(i);h=new Kx("",i,this.engine,g),u.set(i,h)}return h}let r=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,o);let c=u=>{Array.isArray(u)?u.forEach(c):this.engine.registerTrigger(r,a,o,u.name,u)};return e.data.animation.forEach(c),new XD(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(o,e,t){if(o>=0&&oe(t));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[a,c]=r;a(c)}),this._animationCallbacksBuffer=[]})}),i.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(o){this.engine.flush(),this.delegate.componentReplaced?.(o)}};var Lee=(()=>{class n extends tf{constructor(e,t,i){super(e,t,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||n)(ge(Qi),ge(hu),ge(fu))};static \u0275prov=te({token:n,factory:n.\u0275fac})}return n})();function Vee(){return new Hx}function Bee(){return new Yx(f(r4),f(tf),f(Ai))}var m8=[{provide:fu,useFactory:Vee},{provide:tf,useClass:Lee},{provide:md,useFactory:Bee}],zee=[{provide:hu,useClass:KD},{provide:Tk,useValue:"NoopAnimations"},...m8],d8=[{provide:hu,useFactory:()=>new Xx},{provide:Tk,useFactory:()=>"BrowserAnimations"},...m8],p8=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?zee:d8}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({providers:d8,imports:[fC]})}return n})();function jee(n,o){return typeof n>"u"?typeof o>"u"?n:o:n}function tP(n,o){return n=jee(n,o),typeof n=="function"?function(){for(var t=arguments,i=arguments.length,r=Array(i),a=0;a"u"?"undefined":ZD(n))==="object"&&n.nodeType===1&&ZD(n.style)==="object"&&ZD(n.ownerDocument)==="object"};function f8(n,o){if(o=oP(o,!0),!h8(o))return-1;for(var e=0;e0;)e[t]=o[t+1];return e=e.map(oP),$ee(n,e)}function Uee(n){for(var o=arguments,e=[],t=arguments.length-1;t-- >0;)e[t]=o[t+1];return e.map(oP).reduce(function(i,r){var a=f8(n,r);return a!==-1?i.concat(n.splice(a,1)):i},[])}function oP(n,o){if(typeof n=="string")try{return document.querySelector(n)}catch(e){throw e}if(!h8(n)&&!o)throw new TypeError(n+" is not a DOM element.");return n}function Wee(n,o){o=o||{};var e=tP(o.allowUpdate,!0);return function(i){if(i=i||window.event,n.target=i.target||i.srcElement||i.originalTarget,n.element=this,n.type=i.type,!!e(i)){if(i.targetTouches)n.x=i.targetTouches[0].clientX,n.y=i.targetTouches[0].clientY,n.pageX=i.targetTouches[0].pageX,n.pageY=i.targetTouches[0].pageY,n.screenX=i.targetTouches[0].screenX,n.screenY=i.targetTouches[0].screenY;else{if(i.pageX===null&&i.clientX!==null){var r=i.target&&i.target.ownerDocument||document,a=r.documentElement,c=r.body;n.pageX=i.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),n.pageY=i.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)}else n.pageX=i.pageX,n.pageY=i.pageY;n.x=i.clientX,n.y=i.clientY,n.screenX=i.screenX,n.screenY=i.screenY}n.clientX=n.x,n.clientY=n.y}}}function Gee(){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 o={};return Object.defineProperties(o,n),o}function g8(n){if(n===window)return Gee();try{var o=n.getBoundingClientRect();return o.x===void 0&&(o.x=o.left,o.y=o.top),o}catch{throw new TypeError("Can't call getBoundingClientRect on "+n)}}function qee(n,o){var e=g8(o);return n.y>e.top&&n.ye.left&&n.x"u")return function(){};for(var n=0,o=I0.length;n"u")return function(){};for(var n=0,o=I0.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&&re($,me),be&&W($,be)})}function re($,ue){$===window?window.scrollTo($.pageXOffset,$.pageYOffset+ue):$.scrollTop+=ue}function W($,ue){$===window?window.scrollTo($.pageXOffset+ue,$.pageYOffset):$.scrollLeft+=ue}}function Yee(n,o){return new Kee(n,o)}function u8(n,o,e){return e?n.y>e.top&&n.ye.left&&n.x{class n{constructor(){this.currentDrag=new We}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Jee=(()=>{class n{constructor(){this.elementRef=f(Jt)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=vt({type:n,selectors:[["","mwlDraggableScrollContainer",""]]})}}return n})();function ete(n,o,e){e&&e.split(" ").forEach(t=>n.addClass(o.nativeElement,t))}function tte(n,o,e){e&&e.split(" ").forEach(t=>n.removeClass(o.nativeElement,t))}var v8=(()=>{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 _e,this.dragStart=new _e,this.ghostElementCreated=new _e,this.dragging=new _e,this.dragEnd=new _e,this.pointerDown$=new We,this.pointerMove$=new We,this.pointerUp$=new We,this.eventListenerSubscriptions={},this.destroy$=new We,this.timeLongPress={timerBegin:0,timerEnd:0},this.element=f(Jt),this.renderer=f(Si),this.draggableHelper=f(Zee),this.zone=f(Ai),this.vcr=f(ro),this.scrollContainer=f(Jee,{optional:!0}),this.document=f(Qi)}ngOnInit(){this.checkEventListeners();let e=this.pointerDown$.pipe(ci(()=>this.canDrag()),dc(t=>{t.event.stopPropagation&&!this.scrollContainer&&t.event.stopPropagation();let i=this.renderer.createElement("style");this.renderer.setAttribute(i,"type","text/css"),this.renderer.appendChild(i,this.renderer.createText(` body * { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; } `)),requestAnimationFrame(()=>{this.document.head.appendChild(i)});let r=this.getScrollPosition(),a=new Rr(b=>{let x=this.scrollContainer?this.scrollContainer.elementRef.nativeElement:"window";return this.renderer.listen(x,"scroll",M=>b.next(M))}).pipe(gi(r),Bt(()=>this.getScrollPosition())),c=new We,p=new Xd;this.dragPointerDown.observers.length>0&&this.zone.run(()=>{this.dragPointerDown.next({x:0,y:0})});let u=Wn(this.pointerUp$,this.pointerDown$,p,this.destroy$).pipe($l()),h=Lr([this.pointerMove$,a]).pipe(Bt(([b,x])=>({currentDrag$:c,transformX:b.clientX-t.clientX,transformY:b.clientY-t.clientY,clientX:b.clientX,clientY:b.clientY,scrollLeft:x.left,scrollTop:x.top,target:b.event.target})),Bt(b=>(this.dragSnapGrid.x&&(b.transformX=Math.round(b.transformX/this.dragSnapGrid.x)*this.dragSnapGrid.x),this.dragSnapGrid.y&&(b.transformY=Math.round(b.transformY/this.dragSnapGrid.y)*this.dragSnapGrid.y),b)),Bt(b=>(this.dragAxis.x||(b.transformX=0),this.dragAxis.y||(b.transformY=0),b)),Bt(b=>{let x=b.scrollLeft-r.left,M=b.scrollTop-r.top;return Ye(Z({},b),{x:b.transformX+x,y:b.transformY+M})}),ci(({x:b,y:x,transformX:M,transformY:w})=>!this.validateDrag||this.validateDrag({x:b,y:x,transform:{x:M,y:w}})),Ge(u),$l()),g=h.pipe(Fo(1),$l()),y=h.pipe(HO(1),$l());return g.subscribe(({clientX:b,clientY:x,x:M,y:w})=>{if(this.dragStart.observers.length>0&&this.zone.run(()=>{this.dragStart.next({cancelDrag$:p})}),this.scroller=_8([this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.defaultView],Ye(Z({},this.autoScroll),{autoScroll(){return!0}})),ete(this.renderer,this.element,this.dragActiveClass),this.ghostDragEnabled){let S=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:`${S.top}px`,left:`${S.left}px`,width:`${S.width}px`,height:`${S.height}px`,cursor:this.dragCursor,margin:"0",willChange:"transform",pointerEvents:"none"}),this.ghostElementTemplate){let O=this.vcr.createEmbeddedView(this.ghostElementTemplate);E.innerHTML="",O.rootNodes.filter(D=>D instanceof Node).forEach(D=>{E.appendChild(D)}),y.subscribe(()=>{this.vcr.remove(this.vcr.indexOf(O))})}this.ghostElementCreated.observers.length>0&&this.zone.run(()=>{this.ghostElementCreated.emit({clientX:b-M,clientY:x-w,element:E})}),y.subscribe(()=>{E.parentElement.removeChild(E),this.ghostElement=null,this.renderer.setStyle(this.element.nativeElement,"visibility","")})}this.draggableHelper.currentDrag.next(c)}),y.pipe(dc(b=>{let x=p.pipe(VO(),Fo(1),Bt(M=>Ye(Z({},b),{dragCancelled:M>0})));return p.complete(),x})).subscribe(({x:b,y:x,dragCancelled:M})=>{this.scroller.destroy(),this.dragEnd.observers.length>0&&this.zone.run(()=>{this.dragEnd.next({x:b,y:x,dragCancelled:M})}),tte(this.renderer,this.element,this.dragActiveClass),c.complete()}),Wn(u,y).pipe(Fo(1)).subscribe(()=>{requestAnimationFrame(()=>{this.document.head.removeChild(i)})}),h}),$l());Wn(e.pipe(Fo(1),Bt(t=>[,t])),e.pipe(sC())).pipe(ci(([t,i])=>t?t.x!==i.x||t.y!==i.y:!0),Bt(([t,i])=>i)).subscribe(({x:t,y:i,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:i})}),requestAnimationFrame(()=>{if(this.ghostElement){let g=`translate3d(${p}px, ${u}px, 0px)`;this.setElementStyles(this.ghostElement,{transform:g,"-webkit-transform":g,"-ms-transform":g,"-moz-transform":g,"-o-transform":g})}}),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",i=>{this.onMouseDown(i)}),this.eventListenerSubscriptions.mouseup=this.renderer.listen("document","mouseup",i=>{this.onMouseUp(i)}),this.eventListenerSubscriptions.touchstart=this.renderer.listen(this.element.nativeElement,"touchstart",i=>{this.onTouchStart(i)}),this.eventListenerSubscriptions.touchend=this.renderer.listen("document","touchend",i=>{this.onTouchEnd(i)}),this.eventListenerSubscriptions.touchcancel=this.renderer.listen("document","touchcancel",i=>{this.onTouchEnd(i)}),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,i,r;if(this.touchStartLongPress&&(this.timeLongPress.timerBegin=Date.now(),i=!1,r=this.hasScrollbar(),t=this.getScrollPosition()),!this.eventListenerSubscriptions.touchmove){let a=No(this.document,"contextmenu").subscribe(p=>{p.preventDefault()}),c=No(this.document,"touchmove",{passive:!1}).subscribe(p=>{this.touchStartLongPress&&!i&&r&&(i=this.shouldBeginDrag(e,p,t)),(!this.touchStartLongPress||!r||i)&&(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(i=>{this.renderer.setStyle(e,i,t[i])})}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,i){let r=this.getScrollPosition(),a={top:Math.abs(r.top-i.top),left:Math.abs(r.left-i.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,i=e.scrollHeight>e.clientHeight;return t||i}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=vt({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:[Pn]})}}return n})();var Zx=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=Gt({type:n})}static{this.\u0275inj=Wt({})}}return n})();var A0=class{constructor(o){this.rawFile=o;let e=o instanceof HTMLInputElement?o.value:o;this[`_createFrom${typeof e=="string"?"FakePath":"Object"}`](e)}_createFromFakePath(o){this.lastModifiedDate=void 0,this.size=void 0,this.type=`like/${o.slice(o.lastIndexOf(".")+1).toLowerCase()}`,this.name=o.slice(o.lastIndexOf("/")+o.lastIndexOf("\\")+2)}_createFromObject(o){this.size=o.size,this.type=o.type,this.name=o.name}},rP=class{constructor(o,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=o,this.some=e,this.options=t,this.file=new A0(e),this._file=e,o.options&&(this.method=o.options.method||"POST",this.alias=o.options.itemAlias||"file"),this.url=o.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(o){return{form:o}}onProgress(o){return{progress:o}}onSuccess(o,e,t){return{response:o,status:e,headers:t}}onError(o,e,t){return{response:o,status:e,headers:t}}onCancel(o,e,t){return{response:o,status:e,headers:t}}onComplete(o,e,t){return{response:o,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(o){this.onBuildForm(o)}_onProgress(o){this.progress=o,this.onProgress(o)}_onSuccess(o,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(o,e,t)}_onError(o,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(o,e,t)}_onCancel(o,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(o,e,t)}_onComplete(o,e,t){this.onComplete(o,e,t),this.uploader.options.removeAfterUpload&&this.remove()}_prepareToUploading(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},ite=(()=>{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"},i=e.split(".");if(i.length<2)return"application";let r=i[i.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 ote(n){return File&&n instanceof File}var Wa=class{constructor(o){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(o),this.response=new _e}setOptions(o){this.options=Object.assign(this.options,o),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{i||(i=this.options);let h=new A0(u);if(this._isValidFile(h,a,i)){let g=new rP(this,u,i);p.push(g),this.queue.push(g),this._onAfterAddingFile(g)}else if(this._failFilterIndex){let g=a[this._failFilterIndex];this._onWhenAddingFileFailed(h,g,i)}}),this.queue.length!==c&&(this._onAfterAddingAll(p),this.progress=this._getTotalProgress()),this._render(),this.options.autoUpload&&this.uploadAll()}removeFromQueue(o){let e=this.getIndexOfItem(o),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(o){let e=this.getIndexOfItem(o),t=this.queue[e],i=this.options.isHTML5?"_xhrTransport":"_iframeTransport";t._prepareToUploading(),!this.isUploading&&(this.isUploading=!0,this[i](t))}cancelItem(o){let e=this.getIndexOfItem(o),t=this.queue[e],i=this.options.isHTML5?t._xhr:t._form;t&&t.isUploading&&i.abort()}uploadAll(){let o=this.getNotUploadedItems().filter(e=>!e.isUploading);o.length&&(o.map(e=>e._prepareToUploading()),o[0].upload())}cancelAll(){this.getNotUploadedItems().map(e=>e.cancel())}isFile(o){return ote(o)}isFileLikeObject(o){return o instanceof A0}getIndexOfItem(o){return typeof o=="number"?o:this.queue.indexOf(o)}getNotUploadedItems(){return this.queue.filter(o=>!o.isUploaded)}getReadyItems(){return this.queue.filter(o=>o.isReady&&!o.isUploading).sort((o,e)=>o.index-e.index)}onAfterAddingAll(o){return{fileItems:o}}onBuildItemForm(o,e){return{fileItem:o,form:e}}onAfterAddingFile(o){return{fileItem:o}}onWhenAddingFileFailed(o,e,t){return{item:o,filter:e,options:t}}onBeforeUploadItem(o){return{fileItem:o}}onProgressItem(o,e){return{fileItem:o,progress:e}}onProgressAll(o){return{progress:o}}onSuccessItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onErrorItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onCancelItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onCompleteItem(o,e,t,i){return{item:o,response:e,status:t,headers:i}}onCompleteAll(){}_mimeTypeFilter(o){return!(o?.type&&this.options.allowedMimeType&&this.options.allowedMimeType?.indexOf(o.type)===-1)}_fileSizeFilter(o){return!(this.options.maxFileSize&&o.size>this.options.maxFileSize)}_fileTypeFilter(o){return!(this.options.allowedFileType&&this.options.allowedFileType.indexOf(ite.getMimeClass(o))===-1)}_onErrorItem(o,e,t,i){o._onError(e,t,i),this.onErrorItem(o,e,t,i)}_onCompleteItem(o,e,t,i){o._onComplete(e,t,i),this.onCompleteItem(o,e,t,i);let r=this.getReadyItems()[0];if(this.isUploading=!1,r){r.upload();return}this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render()}_headersGetter(o){return e=>e?o[e.toLowerCase()]||void 0:o}_xhrTransport(o){let e=this,t=o._xhr=new XMLHttpRequest,i;if(this._onBeforeUploadItem(o),typeof o._file.size!="number")throw new TypeError("The file specified is no longer valid");if(this.options.disableMultipart)this.options.formatDataFunction&&(i=this.options.formatDataFunction(o));else{i=new FormData,this._onBuildItemForm(o,i);let r=()=>i.append(o.alias,o._file,o.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&&o.file?.name&&(c=c.replace("{{file_name}}",o.file.name)),i.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(o,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](o,a,t.status,r),this._onCompleteItem(o,a,t.status,r)},t.onerror=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onErrorItem(o,a,t.status,r),this._onCompleteItem(o,a,t.status,r)},t.onabort=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onCancelItem(o,a,t.status,r),this._onCompleteItem(o,a,t.status,r)},o.method&&o.url&&t.open(o.method,o.url,!0),t.withCredentials=o.withCredentials,this.options.headers)for(let r of this.options.headers)t.setRequestHeader(r.name,r.value);if(o.headers.length)for(let r of o.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?i.then(r=>t.send(JSON.stringify(r))):t.send(i),this._render()}_getTotalProgress(o=0){if(this.options.removeAfterUpload)return o;let e=this.getNotUploadedItems().length,t=e?this.queue.length-e:this.queue.length,i=100/this.queue.length,r=o*i/100;return Math.round(t*i+r)}_getFilters(o){if(!o)return this.options?.filters||[];if(Array.isArray(o))return o;if(typeof o=="string"){let e=o.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++,i.fn.call(this,o,t))):!0}_isSuccessCode(o){return o>=200&&o<300||o===304}_transformResponse(o,e){return o}_parseHeaders(o){let e={},t,i,r;return o&&o.split(` `).map(a=>{r=a.indexOf(":"),t=a.slice(0,r).trim().toLowerCase(),i=a.slice(r+1).trim(),t&&(e[t]=e[t]?e[t]+", "+i:i)}),e}_onWhenAddingFileFailed(o,e,t){this.onWhenAddingFileFailed(o,e,t)}_onAfterAddingFile(o){this.onAfterAddingFile(o)}_onAfterAddingAll(o){this.onAfterAddingAll(o)}_onBeforeUploadItem(o){o._onBeforeUpload(),this.onBeforeUploadItem(o)}_onBuildItemForm(o,e){o._onBuildForm(e),this.onBuildItemForm(o,e)}_onProgressItem(o,e){let t=this._getTotalProgress(e);this.progress=t,o._onProgress(e),this.onProgressItem(o,e),this.onProgressAll(t),this._render()}_onSuccessItem(o,e,t,i){o._onSuccess(e,t,i),this.onSuccessItem(o,e,t,i)}_onCancelItem(o,e,t,i){o._onCancel(e,t,i),this.onCancelItem(o,e,t,i)}};var Vc=(()=>{class n{constructor(e){this.onFileSelected=new _e,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(),i=this.getFilters();this.uploader?.addToQueue(e,t,i),this.onFileSelected.emit(e),this.isEmptyAfterSelection()&&(this.element.nativeElement.value="")}}return n.\u0275fac=function(e){return new(e||n)(at(Jt))},n.\u0275dir=vt({type:n,selectors:[["","ng2FileSelect",""]],hostBindings:function(e,t){e&1&&_("change",function(){return t.onChange()})},inputs:{uploader:"uploader"},outputs:{onFileSelected:"onFileSelected"},standalone:!1}),n})(),hl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Gt({type:n}),n.\u0275inj=Wt({imports:[ne]}),n})();var _u=class{visible;error;clear;constructor(o,e,t=!1){this.visible=o,this.error=e,this.clear=t}},io=(()=>{class n{state=new tn(new _u(!1));constructor(){}setError(e){this.state.next(new _u(!1,e.error))}clear(){this.state.next(new _u(!1,null,!0))}activate(){this.state.next(new _u(!0))}deactivate(){this.state.next(new _u(!1))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=te({token:n,factory:n.\u0275fac})}return n})();function rte(n,o){n&1&&(s(0,"div",1),R(1,"mat-spinner",3),l())}function ate(n,o){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),_("click",function(){k(e);let i=v(2);return T(i.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 ste(n,o){if(n&1&&(s(0,"div",0),I(1,rte,2,0,"div",1),I(2,ate,13,1,"div",2),l()),n&2){let e=v();m(),A(e.visible()&&!e.error()?1:-1),m(),A(e.error()?2:-1)}}var Em=(()=>{class n{progressService=f(io);router=f(_t);visible=Q(!1);error=Q(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,i){t&1&&I(0,ste,3,2,"div",0),t&2&&A(i.visible()||i.error()?0:-1)},dependencies:[ne,dn,qn,oe,de,G,pe,ht,Mt,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 Jx=(()=>{class n{document;router=f(_t);controllerService=f(nt);progressService=f(io);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)(at(Qi))};static \u0275cmp=F({type:n,selectors:[["app-bundled-controller-finder"]],decls:1,vars:0,template:function(t,i){t&1&&R(0,"app-progress")},dependencies:[Em],encapsulation:2,changeDetection:0})}return n})();var lte=["mat-menu-item",""],cte=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],dte=["mat-icon, [matMenuItemIcon]","*"];function mte(n,o){n&1&&(ti(),s(0,"svg",2),R(1,"polygon",3),l())}var pte=["*"];function ute(n,o){if(n&1){let e=z();Co(0,"div",0),cC("click",function(){k(e);let i=v();return T(i.closed.emit("click"))})("animationstart",function(i){k(e);let r=v();return T(r._onAnimationStart(i.animationName))})("animationend",function(i){k(e);let r=v();return T(r._onAnimationDone(i.animationName))})("animationcancel",function(i){k(e);let r=v();return T(r._onAnimationDone(i.animationName))}),Co(1,"div",1),an(2),ko()()}if(n&2){let e=v();ar(e._classList),Ae("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),Jo("id",e.panelId),Qt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var sP=new cn("MAT_MENU_PANEL"),tt=(()=>{class n{_elementRef=f(Jt);_document=f(Qi);_focusMonitor=f(Fa);_parentMenu=f(sP,{optional:!0});_changeDetectorRef=f(X);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new We;_focused=new We;_highlighted=!1;_triggersSubmenu=!1;constructor(){f(sr).load(la),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 i=0;i{class n{_template=f(Ro);_appRef=f(XO);_injector=f(rr);_viewContainerRef=f(ro);_document=f(Qi);_changeDetectorRef=f(X);_portal;_outlet;_attached=new We;constructor(){}attach(e={}){this._portal||(this._portal=new gd(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new b4(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=vt({type:n,selectors:[["ng-template","matMenuContent",""]],features:[fn([{provide:b8,useExisting:n}])]})}return n})(),hte=new cn("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),aP="_mat-menu-enter",eb="_mat-menu-exit",Kn=(()=>{class n{_elementRef=f(Jt);_changeDetectorRef=f(X);_injector=f(rr);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=er();_allItems;_directDescendantItems=new Hl;_classList={};_panelAnimationState="void";_animationDone=new We;_isAnimating=Q(!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,i=Z({},this._classList);t&&t.length&&t.split(" ").forEach(r=>{i[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{i[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=i}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new _e;close=this.closed;panelId=f(To).getId("mat-menu-panel-");constructor(){let e=f(hte);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 Yd(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(gi(this._directDescendantItems),Vn(e=>Wn(...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 i=e.toArray(),r=Math.max(0,Math.min(i.length-1,t.activeItemIndex||0));i[r]&&!i[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(gi(this._directDescendantItems),Vn(t=>Wn(...t.map(i=>i._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,i=this._keyManager;switch(t){case 27:xa(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)&&i.setFocusOrigin("keyboard"),i.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Ja(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let i=this._keyManager;i.setFocusOrigin(e).setFirstItemActive(),!i.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=Ye(Z({},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===eb;(t||e===aP)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===aP||e===eb)&&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(eb),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?aP:eb)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(gi(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,i,r){if(t&1&&Zi(r,b8,5)(r,tt,5)(r,tt,4),t&2){let a;mt(a=pt())&&(i.lazyContent=a.first),mt(a=pt())&&(i._allItems=a),mt(a=pt())&&(i.items=a)}},viewQuery:function(t,i){if(t&1&&In(Ro,5),t&2){let r;mt(r=pt())&&(i.templateRef=r.first)}},hostVars:3,hostBindings:function(t,i){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",yt],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:yt(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[fn([{provide:sP,useExisting:n}])],ngContentSelectors:pte,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,i){t&1&&(ai(),Qu(0,ute,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: transparent; } .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: 0.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})(),fte=new cn("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=f(rr);return()=>SC(n)}});var of=new WeakMap,gte=(()=>{class n{_canHaveBackdrop;_element=f(Jt);_viewContainerRef=f(ro);_menuItemInstance=f(tt,{optional:!0,self:!0});_dir=f(es,{optional:!0});_focusMonitor=f(Fa);_ngZone=f(Ai);_injector=f(rr);_scrollStrategy=f(fte);_changeDetectorRef=f(X);_animationsDisabled=er();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=Mo.EMPTY;_menuCloseSubscription=Mo.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(sP,{optional:!0});this._parentMaterialMenu=t instanceof Kn?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&of.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 i=of.get(t);of.set(t,this),i&&i!==this&&i._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 Kn&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(Ge(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,i=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),i instanceof Kn&&this._ownsMenu(i)?(this._pendingRemoval=i._animationDone.pipe(Fo(1)).subscribe(()=>{t.detach(),of.has(i)||i.lazyContent?.detach()}),i._setIsOpen(!1)):(t.detach(),i?.lazyContent?.detach()),i&&this._ownsMenu(i)&&of.delete(i),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=kC(this._injector,t),this._overlayRef.keydownEvents().subscribe(i=>{this._menu instanceof Kn&&this._menu._handleKeydown(i)})}return this._overlayRef}_getOverlayConfig(e){return new wC({positionStrategy:MC(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(i=>{this._ngZone.run(()=>{let r=i.connectionPair.overlayX==="start"?"after":"before",a=i.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(r,a)})})}_setPosition(e,t){let[i,r]=e.xPosition==="before"?["end","start"]:["start","end"],[a,c]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[p,u]=[a,c],[h,g]=[i,r],y=0;if(this._triggersSubmenu()){if(g=i=e.xPosition==="before"?"start":"end",r=h=i==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let b=this._parentMaterialMenu.items.first;this._parentInnerPadding=b?b._getHostElement().offsetTop:0}y=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(p=a==="top"?"bottom":"top",u=c==="top"?"bottom":"top");t.withPositions([{originX:i,originY:p,overlayX:h,overlayY:a,offsetY:y},{originX:r,originY:p,overlayX:g,overlayY:a,offsetY:y},{originX:i,originY:u,overlayX:h,overlayY:c,offsetY:-y},{originX:r,originY:u,overlayX:g,overlayY:c,offsetY:-y}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),i=this._parentMaterialMenu?this._parentMaterialMenu.closed:Nn(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ci(a=>this._menuOpen&&a!==this._menuItemInstance)):Nn();return Wn(e,i,r,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new gd(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return of.get(e)===this}_triggerIsAriaDisabled(){return yt(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){qO()};static \u0275dir=vt({type:n})}return n})(),Fn=(()=>{class n extends gte{_cleanupTouchstart;_hoverSubscription=Mo.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 _e;onMenuOpen=this.menuOpened;menuClosed=new _e;onMenuClose=this.menuClosed;constructor(){super(!0);let e=f(Si);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{xC(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=vt({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,i){t&1&&_("click",function(a){return i._handleClick(a)})("mousedown",function(a){return i._handleMousedown(a)})("keydown",function(a){return i._handleKeydown(a)}),t&2&&Qt("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu==null?null:i.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:[di]})}return n})();var qe=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({imports:[_c,th,_i,fd]})}return n})();var _te=[[["caption"]],[["colgroup"],["col"]],"*"],vte=["caption","colgroup, col","*"];function Cte(n,o){n&1&&an(0,2)}function xte(n,o){n&1&&(s(0,"thead",0),Fi(1,1),l(),s(2,"tbody",2),Fi(3,3)(4,4),l(),s(5,"tfoot",0),Fi(6,5),l())}function bte(n,o){n&1&&Fi(0,1)(1,3)(2,4)(3,5)}var Cn=(()=>{class n extends CD{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||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,i){t&2&&Ae("mat-table-fixed-layout",i.fixedLayout)},exportAs:["matTable"],features:[fn([{provide:CD,useExisting:n},{provide:Xl,useExisting:n},{provide:b0,useValue:null}]),di],ngContentSelectors:vte,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(ai(_te),an(0),an(1,1),I(2,Cte,1,0),I(3,xte,7,0)(4,bte,4,0)),t&2&&(m(2),A(i._isServer?2:-1),m(),A(i._isNativeHtmlTable?3:4))},dependencies:[gD,fD,vD,_D],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})(),xn=(()=>{class n extends Tx{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["","matCellDef",""]],features:[fn([{provide:Tx,useExisting:n}]),di]})}return n})(),bn=(()=>{class n extends Ex{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["","matHeaderCellDef",""]],features:[fn([{provide:Ex,useExisting:n}]),di]})}return n})();var yn=(()=>{class n extends km{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(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[fn([{provide:km,useExisting:n}]),di]})}return n})(),Sn=(()=>{class n extends dR{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[di]})}return n})();var wn=(()=>{class n extends mR{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[di]})}return n})();var Mn=(()=>{class n extends y0{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",yt]},features:[fn([{provide:y0,useExisting:n}]),di]})}return n})();var kn=(()=>{class n extends Dx{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[fn([{provide:Dx,useExisting:n}]),di]})}return n})(),Tn=(()=>{class n extends uD{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||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:uD,useExisting:n}]),di],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&Fi(0,0)},dependencies:[cu],encapsulation:2})}return n})();var En=(()=>{class n extends hD{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Oi(n)))(i||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:hD,useExisting:n}]),di],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&Fi(0,0)},dependencies:[cu],encapsulation:2})}return n})();var pn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({imports:[Px,_i]})}return n})(),yte=9007199254740991,_r=class extends ud{_data;_renderData=new tn([]);_filter=new tn("");_internalPageChanges=new We;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(o){o=Array.isArray(o)?o:[],this._data.next(o),this._renderChangesSubscription||this._filterData(o)}get filter(){return this._filter.value}set filter(o){this._filter.next(o),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(o){this._sort=o,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(o){this._paginator=o,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(o,e)=>{let t=o[e];if(u4(t)){let i=Number(t);return i{let t=e.active,i=e.direction;return!t||i==""?o:o.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 g=0;return c!=null&&p!=null?c>p?g=1:c{let t=e.trim().toLowerCase();return Object.values(o).some(i=>`${i}`.toLowerCase().includes(t))};constructor(o=[]){super(),this._data=new tn(o),this._updateChangeSubscription()}_updateChangeSubscription(){let o=this._sort?Wn(this._sort.sortChange,this._sort.initialized):Nn(null),e=this._paginator?Wn(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Nn(null),t=this._data,i=Lr([t,this._filter]).pipe(Bt(([c])=>this._filterData(c))),r=Lr([i,o]).pipe(Bt(([c])=>this._orderData(c))),a=Lr([r,e]).pipe(Bt(([c])=>this._pageData(c)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=a.subscribe(c=>this._renderData.next(c))}_filterData(o){return this.filteredData=this.filter==null||this.filter===""?o:o.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(o){return this.sort?this.sortData(o.slice(),this.sort):o}_pageData(o){if(!this.paginator)return o;let e=this.paginator.pageIndex*this.paginator.pageSize;return o.slice(e,e+this.paginator.pageSize)}_updatePaginator(o){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=o,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,i=Math.min(e.pageIndex,t);i!==e.pageIndex&&(e.pageIndex=i,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var S8=(()=>{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,i){},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})(),Ste={passive:!0},w8=(()=>{class n{_platform=f(Es);_ngZone=f(Ai);_renderer=f(md).createRenderer(null,null);_styleLoader=f(sr);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Uu;this._styleLoader.load(S8);let t=Ul(e),i=this._monitoredElements.get(t);if(i)return i.subject;let r=new We,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,Ste)));return this._monitoredElements.set(t,{subject:r,unlisten:p}),r}stopMonitoring(e){let t=Ul(e),i=this._monitoredElements.get(t);i&&(i.unlisten(),i.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=te({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Bc=(()=>{class n{_elementRef=f(Jt);_platform=f(Es);_ngZone=f(Ai);_renderer=f(Si);_resizeEvents=new We;_previousValue;_initialHeight;_destroyed=new We;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(e){this._minRows=bC(e),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(e){this._maxRows=bC(e),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&((this._enabled=e)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(e){this._cachedPlaceholderHeight=void 0,e?this._textareaElement.setAttribute("placeholder",e):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}_cachedLineHeight;_cachedPlaceholderHeight;_document=f(Qi);_hasFocus=!1;_isViewInited=!1;constructor(){f(sr).load(S8),this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){let e=this.minRows&&this._cachedLineHeight?`${this.minRows*this._cachedLineHeight}px`:null;e&&(this._textareaElement.style.minHeight=e)}_setMaxHeight(){let e=this.maxRows&&this._cachedLineHeight?`${this.maxRows*this._cachedLineHeight}px`:null;e&&(this._textareaElement.style.maxHeight=e)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[this._renderer.listen("window","resize",()=>this._resizeEvents.next()),this._renderer.listen(this._textareaElement,"focus",this._handleFocusEvent),this._renderer.listen(this._textareaElement,"blur",this._handleFocusEvent)],this._resizeEvents.pipe(Qs(16)).subscribe(()=>{this._cachedLineHeight=this._cachedPlaceholderHeight=void 0,this.resizeToFitContent(!0)})}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._listenerCleanups?.forEach(e=>e()),this._resizeEvents.complete(),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let e=this._textareaElement.cloneNode(!1),t=e.style;e.rows=1,t.position="absolute",t.visibility="hidden",t.border="none",t.padding="0",t.height="",t.minHeight="",t.maxHeight="",t.top=t.bottom=t.left=t.right="auto",t.overflow="hidden",this._textareaElement.parentNode.appendChild(e),this._cachedLineHeight=e.clientHeight,e.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){let e=this._textareaElement,t=e.style.marginBottom||"",i=this._platform.FIREFOX,r=this._hasFocus,a=i?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";r&&(e.style.marginBottom=`${e.clientHeight}px`),e.classList.add(a);let c=e.scrollHeight-4;return e.classList.remove(a),r&&(e.style.marginBottom=t),c}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||this._cachedPlaceholderHeight!=null)return;if(!this.placeholder){this._cachedPlaceholderHeight=0;return}let e=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=e}_handleFocusEvent=e=>{this._hasFocus=e.type==="focus"};ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(e=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;let t=this._elementRef.nativeElement,i=t.value;if(!e&&this._minRows===this._previousMinRows&&i===this._previousValue)return;let r=this._measureScrollHeight(),a=Math.max(r,this._cachedPlaceholderHeight||0);t.style.height=`${a}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(t)):setTimeout(()=>this._scrollToCaretPosition(t))}),this._previousValue=i,this._previousMinRows=this._minRows}reset(){this._initialHeight!==void 0&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_scrollToCaretPosition(e){let{selectionStart:t,selectionEnd:i}=e;!this._destroyed.isStopped&&this._hasFocus&&e.setSelectionRange(t,i)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(t,i){t&1&&_("input",function(){return i._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",yt],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]})}return n})(),M8=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({})}return n})();var k8=new cn("MAT_INPUT_VALUE_ACCESSOR");var wte=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Mte=new cn("MAT_INPUT_CONFIG"),Te=(()=>{class n{_elementRef=f(Jt);_platform=f(Es);ngControl=f(EC,{optional:!0,self:!0});_autofillMonitor=f(w8);_ngZone=f(Ai);_formField=f(rh,{optional:!0});_renderer=f(Si);_uid=f(To).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=f(Mte,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new We;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=FC(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(je.required)??!1}set required(e){this._required=FC(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Ik().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=FC(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=>Ik().has(e));constructor(){let e=f(Gn,{optional:!0}),t=f(Ft,{optional:!0}),i=f(Cd),r=f(k8,{optional:!0,self:!0}),a=this._elementRef.nativeElement,c=a.nodeName.toLowerCase();r?QO(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 VC(i,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&&ur(()=>{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(){wte.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=vt({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,i){t&1&&_("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),t&2&&(Jo("id",i.id)("disabled",i.disabled&&!i.disabledInteractive)("required",i.required),Qt("name",i.name||null)("readonly",i._getReadonlyAttribute())("aria-disabled",i.disabled&&i.disabledInteractive?"true":null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),Ae("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mat-mdc-input-disabled-interactive",i.disabledInteractive)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._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",yt]},exportAs:["matInput"],features:[fn([{provide:LC,useExisting:n}]),Pn]})}return n})(),Se=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({imports:[we,we,M8,_i]})}return n})();var Pm=(()=>{class n{data;dialogRef=f(Ie);templateName=Q("");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)(at(Ct))};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,i){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),_("click",function(){return i.onNoClick()}),d(6,"No, cancel"),l(),s(7,"button",4),_("click",function(){return i.onYesClick()}),d(8,"Yes, delete!"),l()()),t&2&&(m(3),ee("Are you sure you want to delete template ",i.templateName(),"?"))},dependencies:[ve,Le,Ve,G,pe],encapsulation:2,changeDetection:0})}return n})();var kte=(n,o)=>o.compute_id;function Tte(n,o){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 Ete(n,o){if(n&1){let e=z();s(0,"button",13),_("click",function(){k(e);let i=v();return T(i.openAddDialog())}),s(1,"mat-icon"),d(2,"add_circle_outline"),l()()}}function Dte(n,o){n&1&&(s(0,"div",10),d(1,"Loading..."),l())}function Pte(n,o){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 Ite(n,o){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 Ate(n,o){n&1&&(s(0,"span",21),d(1,"Offline"),l())}function Ote(n,o){if(n&1){let e=z();s(0,"button",24),_("click",function(i){return i.stopPropagation()}),s(1,"mat-icon"),d(2,"more_vert"),l()(),s(3,"mat-menu",25,0)(5,"button",26),_("click",function(){k(e);let i=v().$implicit,r=v(2);return T(r.openEditDialog(i))}),s(6,"mat-icon"),d(7,"edit"),l(),s(8,"span"),d(9,"Edit"),l()(),s(10,"button",26),_("click",function(){k(e);let i=v().$implicit,r=v(2);return T(r.connectCompute(i))}),s(11,"mat-icon"),d(12,"link"),l(),s(13,"span"),d(14,"Connect"),l()(),s(15,"button",26),_("click",function(){k(e);let i=v().$implicit,r=v(2);return T(r.deleteCompute(i))}),s(16,"mat-icon"),d(17,"delete"),l(),s(18,"span"),d(19,"Delete"),l()()()}if(n&2){let e=ke(4);C("matMenuTriggerFor",e)}}function Nte(n,o){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),I(9,Ite,12,3)(10,Ate,2,0,"span",21),l(),I(11,Ote,20,1),l()),n&2){let e=o.$implicit,t=v(2);m(),Yt("color",t.getStatusColor(e)),C("matTooltip",e.connected?"Connected":"Disconnected"),m(),ee(" ",t.getStatusIcon(e)," "),m(3),B(e.name||e.compute_id),m(2),B(t.formatHost(e)),m(2),A(e.connected?9:10),m(2),A(e.compute_id!=="local"?11:-1)}}function Fte(n,o){if(n&1&&(s(0,"nav",12),K(1,Nte,12,8,"div",15,kte),l()),n&2){let e=v();m(),Y(e.computes())}}var Rte=(n,o)=>o.key;function Lte(n,o){if(n&1&&(s(0,"mat-option",6),d(1),l()),n&2){let e=o.$implicit;C("value",e.key),m(),B(e.name)}}function Vte(n,o){n&1&&(s(0,"mat-error"),d(1,"You must select a protocol"),l())}function Bte(n,o){n&1&&(s(0,"mat-error"),d(1,"You must enter a host"),l())}function zte(n,o){n&1&&(s(0,"mat-error"),d(1,"You must enter a port"),l())}function jte(n,o){n&1&&(s(0,"mat-error"),d(1,"Port must be between 1 and 65535"),l())}var E8=(()=>{class n{route=f(lt);controllerService=f(nt);computeService=f(Eo);notificationService=f(Js);toasterService=f(ie);dialog=f(it);cd=f(X);controller;_computes=Q([]);computes=$t(()=>[...this._computes()].sort((t,i)=>t.compute_id==="local"?-1:i.compute_id==="local"?1:(t.name||"").localeCompare(i.name||"")));displayedColumns=["status","name","host","connected","cpu","memory","disk","actions"];loading=Q(!0);subscription=new Mo;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 i=this.notificationService.getCachedComputes();this._computes.set(i),this.loading.set(!1),this.cd.markForCheck()}else this.loadComputes();this.subscription.add(this.notificationService.computeNotificationEmitter.subscribe(i=>{this.handleComputeNotification(i)})),this.subscription.add(this.notificationService.computeCacheUpdated.subscribe(i=>{this._computes.set(i),this.loading.set(!1),this.cd.markForCheck()}))},t=>{let i=t.error?.message||t.message||"Failed to load controller";this.toasterService.error(i),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(i=>i.compute_id===e.event.compute_id?e.event:i));break;case"compute.deleted":this._computes.update(t=>t.filter(i=>i.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(T8,{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:i=>{let r=i.error?.message||i.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(T8,{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 i=t.error?.message||t.message||"Failed to load compute details";this.toasterService.error(i),this.cd.markForCheck()}})}deleteCompute(e){this.dialog.open(Pm,{panelClass:["base-confirmation-dialog-panel","confirmation-danger-panel"],autoFocus:!1,disableClose:!0,data:{templateName:e.name||e.compute_id}}).afterClosed().subscribe(i=>{i&&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 i=this.computes().map(r=>r.compute_id===t.compute_id?t:r);this._computes.set(i),this.cd.markForCheck()},error:()=>{this.loadComputes()}})},error:t=>{let i=t.error?.message||t.message||"Failed to connect compute";this.toasterService.error(i),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,i){t&1&&(s(0,"div",1)(1,"header",2),I(2,Tte,3,1,"button",3),s(3,"h1",4),d(4,"Computes"),l(),I(5,Ete,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()(),I(12,Dte,2,0,"div",10),I(13,Pte,5,0,"div",11),I(14,Fte,3,0,"nav",12),l()()),t&2&&(m(2),A(i.controller?2:-1),m(3),A(i.controller?5:-1),m(7),A(i.loading()?12:-1),m(),A(!i.loading()&&!i.computes().length?13:-1),m(),A(!i.loading()&&i.computes().length?14:-1))},dependencies:[ne,dt,vn,G,ze,oe,de,qe,Kn,tt,Fn,pn,ht,Mt,ve,we,Se,gt,Et],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})(),T8=(()=>{class n{dialogRef=f(Ie);data=f(Ct);protocols=[{key:"http",name:"HTTP"},{key:"https",name:"HTTPS"}];computeForm=new Ho({name:new $e(""),protocol:new $e("http",[je.required]),host:new $e("",[je.required]),port:new $e(3080,[je.required,je.min(1),je.max(65535)]),user:new $e("gns3"),password:new $e("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,i){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),K(12,Lte,2,2,"mat-option",6,Rte),l(),I(14,Vte,2,0,"mat-error"),l(),s(15,"mat-form-field",3)(16,"mat-label"),d(17,"Host"),l(),R(18,"input",7),I(19,Bte,2,0,"mat-error"),l(),s(20,"mat-form-field",3)(21,"mat-label"),d(22,"Port"),l(),R(23,"input",8),I(24,zte,2,0,"mat-error"),I(25,jte,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),_("click",function(){return i.onCancelClick()}),d(36,"Cancel"),l(),s(37,"button",13),_("click",function(){return i.onSaveClick()}),d(38),l()()()),t&2&&(m(),B(i.isEditMode?"Edit Compute":"Add Compute"),m(),C("formGroup",i.computeForm),m(10),Y(i.protocols),m(2),A(i.computeForm.get("protocol").hasError("required")?14:-1),m(5),A(i.computeForm.get("host").hasError("required")?19:-1),m(5),A(i.computeForm.get("port").hasError("required")?24:-1),m(),A(i.computeForm.get("port").hasError("min")||i.computeForm.get("port").hasError("max")?25:-1),m(12),C("disabled",i.computeForm.invalid),m(),ee(" ",i.isEditMode?"Update":"Add"," "))},dependencies:[ne,Et,rt,Nt,Uo,Dt,ot,Ft,Vt,ve,Le,Ve,St,G,pe,we,Me,Xe,ni,Se,Te,gt,Pt,ft],encapsulation:2,changeDetection:0})}return n})();var $te=["*"];var Hte=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],Ute=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]`,"*"],Wte=new cn("MAT_CARD_CONFIG"),On=(()=>{class n{appearance;constructor(){let e=f(Wte,{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,i){t&2&&Ae("mat-mdc-card-outlined",i.appearance==="outlined")("mdc-card--outlined",i.appearance==="outlined")("mat-mdc-card-filled",i.appearance==="filled")("mdc-card--filled",i.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:$te,decls:1,vars:0,template:function(t,i){t&1&&(ai(),an(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 transparent; 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})(),zc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return n})();var fl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return n})();var tb=(()=>{class n{align="start";static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(t,i){t&2&&Ae("mat-mdc-card-actions-align-end",i.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return n})(),jc=(()=>{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:Ute,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(t,i){t&1&&(ai(Hte),an(0),Co(1,"div",0),an(2,1),ko(),an(3,2))},encapsulation:2,changeDetection:0})}return n})();var kt=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({imports:[_i]})}return n})();var Im=(()=>{class n{dataChange=new tn([]);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=te({token:n,factory:n.\u0275fac})}return n})();var D8=(n,o)=>o.key;function Gte(n,o){n&1&&(s(0,"mat-error"),d(1,"You must enter a value"),l())}function qte(n,o){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=o.$implicit;C("value",e.key),m(),ee(" ",e.name," ")}}function Qte(n,o){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=o.$implicit;C("value",e.key),m(),ee(" ",e.name," ")}}var nb=(()=>{class n{controllerService=f(nt);controllerDatabase=f(Im);route=f(lt);router=f(_t);toasterService=f(ie);cdr=f(X);controllerOptionsVisibility=Q(!1);controllerIp;controllerPort;projectId;protocols=[{key:"http:",name:"HTTP"},{key:"https:",name:"HTTPS"}];locations=[{key:"local",name:"Local"},{key:"remote",name:"Remote"}];controllerForm=new Ho({name:new $e("",[je.required]),location:new $e(""),protocol:new $e("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(i=>i.host===this.controllerIp&&i.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 H4;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 i=t.error?.message||t.message||"Failed to create controller";this.toasterService.error(i),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,i){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),I(10,Gte,2,0,"mat-error"),l(),s(11,"mat-form-field")(12,"mat-select",8),K(13,qte,2,2,"mat-option",9,D8),l()(),s(15,"mat-form-field")(16,"mat-select",10),K(17,Qte,2,2,"mat-option",9,D8),l()()()(),s(19,"div",11)(20,"button",12),_("click",function(){return i.createController()}),d(21,"Add controller"),l()()()()),t&2&&(C("hidden",!i.controllerOptionsVisibility()),m(7),C("formGroup",i.controllerForm),m(3),A(i.controllerForm.get("name").hasError("required")?10:-1),m(3),Y(i.locations),m(4),Y(i.protocols))},dependencies:[ne,Et,rt,Nt,Dt,ot,Ft,Vt,dt,kt,On,we,Me,ni,Se,Te,gt,Pt,ft,Vo,G,pe],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return n})();var lP=new cn("CdkAccordion"),P8=(()=>{class n{_stateChanges=new We;_openCloseAllActions=new We;id=f(To).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=vt({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",yt]},exportAs:["cdkAccordion"],features:[fn([{provide:lP,useExisting:n}]),Pn]})}return n})(),I8=(()=>{class n{accordion=f(lP,{optional:!0,skipSelf:!0});_changeDetectorRef=f(X);_expansionDispatcher=f(oh);_openCloseAllSubscription=Mo.EMPTY;closed=new _e;opened=new _e;destroyed=new _e;expandedChange=new _e;id=f(To).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=Q(!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=vt({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",yt],disabled:[2,"disabled","disabled",yt]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[fn([{provide:lP,useValue:void 0}])]})}return n})(),ib=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({})}return n})();var Xte=["body"],Kte=["bodyWrapper"],Yte=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Zte=["mat-expansion-panel-header","*","mat-action-row"];function Jte(n,o){}var ene=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],tne=["mat-panel-title","mat-panel-description","*"];function nne(n,o){n&1&&(Co(0,"span",1),ti(),Co(1,"svg",2),ks(2,"path",3),ko()())}var cP=new cn("MAT_ACCORDION"),A8=new cn("MAT_EXPANSION_PANEL"),ine=(()=>{class n{_template=f(Ro);_expansionPanel=f(A8,{optional:!0});constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]})}return n})(),O8=new cn("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Pd=(()=>{class n extends I8{_viewContainerRef=f(ro);_animationsDisabled=er();_document=f(Qi);_ngZone=f(Ai);_elementRef=f(Jt);_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 _e;afterCollapse=new _e;_inputChanges=new We;accordion=f(cP,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=f(To).getId("mat-expansion-panel-header-");constructor(){super();let e=f(O8,{optional:!0});this._expansionDispatcher=f(oh),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(gi(null),ci(()=>this.expanded&&!this._portal),Fo(1)).subscribe(()=>{this._portal=new gd(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,i,r){if(t&1&&Zi(r,ine,5),t&2){let a;mt(a=pt())&&(i._lazyContent=a.first)}},viewQuery:function(t,i){if(t&1&&In(Xte,5)(Kte,5),t&2){let r;mt(r=pt())&&(i._body=r.first),mt(r=pt())&&(i._bodyWrapper=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,i){t&2&&Ae("mat-expanded",i.expanded)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",yt],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[fn([{provide:cP,useValue:void 0},{provide:A8,useExisting:n}]),di,Pn],ngContentSelectors:Zte,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,i){t&1&&(ai(Yte),an(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),an(6,1),Ce(7,Jte,0,0,"ng-template",5),l(),an(8,2),l()()),t&2&&(m(),Qt("inert",i.expanded?null:""),m(2),C("id",i.id),Qt("aria-labelledby",i._headerId),m(4),C("cdkPortalOutlet",i._portal))},dependencies:[Zu],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 Id=(()=>{class n{panel=f(Pd,{host:!0});_element=f(Jt);_focusMonitor=f(Fa);_changeDetectorRef=f(X);_parentChangeSubscription=Mo.EMPTY;constructor(){f(sr).load(la);let e=this.panel,t=f(O8,{optional:!0}),i=f(new hc("tabindex"),{optional:!0}),r=e.accordion?e.accordion._stateChanges.pipe(ci(a=>!!(a.hideToggle||a.togglePosition))):Uu;this.tabIndex=parseInt(i||"")||0,this._parentChangeSubscription=Wn(e.opened,e.closed,r,e._inputChanges.pipe(ci(a=>!!(a.hideToggle||a.disabled||a.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(ci(()=>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:xa(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,i){t&1&&_("click",function(){return i._toggle()})("keydown",function(a){return i._keydown(a)}),t&2&&(Qt("id",i.panel._headerId)("tabindex",i.disabled?-1:i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Yt("height",i._getHeaderHeight()),Ae("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after",i._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",i._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Lo(e)]},ngContentSelectors:tne,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,i){t&1&&(ai(ene),Co(0,"span",0),an(1),an(2,1),an(3,2),ko(),I(4,nne,3,0,"span",1)),t&2&&(Ae("mat-content-hide-toggle",!i._showToggle()),m(4),A(i._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})(),ob=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return n})(),Am=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=vt({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return n})(),Om=(()=>{class n extends P8{_keyManager;_ownHeaders=new Hl;_headers;hideToggle=!1;displayMode="default";togglePosition="after";ngAfterContentInit(){this._headers.changes.pipe(gi(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Yd(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(i){return(e||(e=Oi(n)))(i||n)}})();static \u0275dir=vt({type:n,selectors:[["mat-accordion"]],contentQueries:function(t,i,r){if(t&1&&Zi(r,Id,5),t&2){let a;mt(a=pt())&&(i._headers=a)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,i){t&2&&Ae("mat-accordion-multi",i.multi)},inputs:{hideToggle:[2,"hideToggle","hideToggle",yt],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[fn([{provide:cP,useExisting:n}]),di]})}return n})(),gl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Gt({type:n});static \u0275inj=Wt({imports:[ib,Ju,_i]})}return n})();var ab=(()=>{class n{httpClient=f(Ks);sanitizer=f(xr);toasterService=f(ie);cd=f(X);thirdpartylicenses=Q("");releasenotes=Q("");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,i){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),_("click",function(){return i.goToDocumentation()}),d(38," Go to documentation "),l()()()),t&2&&(m(31),C("innerHTML",i.thirdpartylicenses(),wp),m(5),C("innerHTML",i.releasenotes(),wp))},dependencies:[G,pe,gl,Om,Pd,Id,Am,eo,i5,Zd],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 sb=(()=>{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=te({token:n,factory:n.\u0275fac})}return n})();var lb=(()=>{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 ki.solarputty_download_url&&(t.resource=ki.solarputty_download_url,e.push(t)),e}getForLinux(){return[]}getForDarwin(){return[]}static \u0275fac=function(t){return new(t||n)(ge(sb))};static \u0275prov=te({token:n,factory:n.\u0275fac})}return n})();var cb=(()=>{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(lb))};static \u0275prov=te({token:n,factory:n.\u0275fac})}return n})();var ane=(n,o)=>({hidden:n,lightTheme:o}),sne=/(.*)<\/a>(.*)\s*