Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terminal-cv/node_modules/prettier/parser-angular.js

67 lines
99 KiB

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.angular=t())}(this,(function(){"use strict";var e=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const t=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var r=t,n=t;r.default=n;const i=t=>{if("string"!=typeof t||0===t.length)return 0;if(0===(t=e(t)).length)return 0;t=t.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD
Print (to stderr) where a cursor at the given position would move to after formatting.
This option cannot be used with --range-start and --range-end.
`,cliCategory:Br},endOfLine:{since:"1.15.0",category:Tr,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:Nr`
Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)
`}]},filepath:{since:"1.4.0",category:Lr,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:Pr,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:Lr,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:Pr},parser:{since:"0.0.10",category:Tr,type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:Tr,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:br},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:Tr,description:Nr`
Custom directory that contains prettier plugins in node_modules subdirectory.
Overrides default behavior when plugins are searched relatively to the location of Prettier.
Multiple values are accepted.
`,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:br},printWidth:{since:"0.0.0",category:Tr,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:Lr,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Nr`
Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:Br},rangeStart:{since:"1.4.0",category:Lr,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Nr`
Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:Br},requirePragma:{since:"1.7.0",category:Lr,type:"boolean",default:!1,description:Nr`
Require either '@prettier' or '@format' to be present in the file's first docblock comment
in order for it to be formatted.
`,cliCategory:Pr},tabWidth:{type:"int",category:Tr,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:Tr,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:Tr,type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};const kr=["cliName","cliCategory","cliDescription"],$r={compare:wr,lt:Sr,gte:Ir},Mr="2.4.1",_r={CATEGORY_CONFIG:br,CATEGORY_EDITOR:Br,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:Pr,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:Tr,CATEGORY_SPECIAL:Lr,options:Rr}.options;var jr={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:n=!1}={}){const i=Mr.split("-",1)[0],s=e.flatMap((e=>e.languages||[])).filter(D),u=(a=Object.assign({},...e.map((({options:e})=>e)),_r),o="name",Object.entries(a).map((([e,t])=>Object.assign({[o]:e},t)))).filter((e=>D(e)&&p(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(n)return e;return c(e,kr)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(D).sort(((e,t)=>$r.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>D(e)&&p(e))),"parser"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!n.has(t)){n.add(t);const s=r.find((e=>e.parsers&&e.parsers[t]));let u=i.name;s&&s.name&&(u+=` (plugin: ${s.name})`),e.choices.push({value:t,description:u})}}(t,s,e));const r=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:r})}));var a,o;return{languages:s,options:u};function D(e){return t||!("since"in e)||e.since&&$r.gte(i,e.since)}function p(e){return r||!("deprecated"in e)||e.deprecated&&$r.lt(i,e.deprecated)}}};const{getSupportInfo:Kr}=jr,Gr=/[^\x20-\x7F]/;function Ur(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:s}=t;let u=r;for(;u>=0&&u<s;){const r=t.charAt(u);if(e instanceof RegExp){if(!e.test(r))return u}else if(!e.includes(r))return u;i?u--:u++}return(-1===u||u===s)&&u}}const Wr=Ur(/\s/),Vr=Ur(" \t"),Xr=Ur(",; \t"),zr=Ur(/[^\n\r]/);function qr(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t}function Qr(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?zr(e,t):t)}function Yr(e,t,r){const n=r&&r.backwards;if(!1===t)return!1;const i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function Hr(e,t,r={}){const n=Vr(e,r.backwards?t-1:t,r);return n!==Yr(e,n,r)}function Jr(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Xr(e,n),n=qr(e,n),n=Vr(e,n);return n=Qr(e,n),n=Yr(e,n),!1!==n&&Hr(e,n)}function Zr(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Vr(e,n),n=qr(e,n),n=Qr(e,n),n=Yr(e,n);return n}function en(e,t,r){return Zr(e,r(t))}function tn(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n}function rn(e,t){const r=e.slice(1,-1),n={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},s="'"===t?i:n,u=s===i?n:i;let a=s.quote;if(r.includes(s.quote)||r.includes(u.quote)){a=(r.match(s.regex)||[]).length>(r.match(u.regex)||[]).length?u.quote:s.quote}return a}function nn(e,t,r){const n='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function sn(e,t){(e.
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class fn{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}}class En{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new Un(e+this.start,e+this.end)}}class vn{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}}class Cn extends vn{constructor(e,t,r){super(e,t),this.nameSpan=r}}class gn extends vn{constructor(e,t,r,n,i){super(e,t),this.prefix=r,this.uninterpretedExpression=n,this.location=i}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class Fn extends vn{visit(e,t=null){}}class mn extends vn{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class yn extends mn{visit(e,t=null){var r;return null===(r=e.visitThisReceiver)||void 0===r?void 0:r.call(e,this,t)}}class xn extends vn{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitChain(this,t)}}class An extends vn{constructor(e,t,r,n,i){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}}class wn extends Cn{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}}class Sn extends Cn{constructor(e,t,r,n,i,s){super(e,t,r),this.receiver=n,this.name=i,this.value=s}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class In extends Cn{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class On extends vn{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}}class Nn extends vn{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}}class bn extends vn{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class Bn extends Cn{constructor(e,t,r,n,i,s){super(e,t,s),this.exp=r,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}}class Pn extends vn{constructor(e,t,r){super(e,t),this.value=r}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class Tn extends vn{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitLiteralArray(this,t)}}class Ln extends vn{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}}class Rn extends vn{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}}class kn extends vn{constructor(e,t,r,n,i){super(e,t),this.operation=r,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}}class $n extends kn{constructor(e,t,r,n,i,s,u){super(e,t,i,s,u),this.operator=r,this.expr=n}static createMinus(e,t,r){return new $n(e,t,"-",r,"-",new Pn(e,t,0),r)}static createPlus(e,t,r){return new $n(e,t,"+",r,"-",r,new Pn(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class Mn extends vn{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitPrefixNot(this,t)}}class _n extends vn{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class jn extends Cn{constructor(e,t,r,n,i,s,u){super(e,t,r),this.receiver=n,this.name=i,this.args=s,this.argumentSpan=u}visit(e,t=null){return e.visitMethodCall(this,t)}}class Kn extends Cn{constructor(e,t,r,n,i,s,u){super(e,t,r),this.receiver=n,this.name=i,this.args=s,this.argumentSpan=u}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Gn extends vn{constructor(e,t,r,n){super(e,t),this.target=r,this.args=n}visit(e,t=null){return e.visitFunctionCall(this,t)}}class Un{constructor(e,t){this.start=e,this.end=t}}class Wn extends vn{constructor(e,t,r,n,i){super(new En(0,null===t?0:t.length),new Un(n,null===t?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class V
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/const Qn=41,Yn=46,Hn=58,Jn=125;function Zn(e){return 48<=e&&e<=57}function ei(e){return 39===e||34===e||96===e}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var ti;!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.PrivateIdentifier=2]="PrivateIdentifier",e[e.Keyword=3]="Keyword",e[e.String=4]="String",e[e.Operator=5]="Operator",e[e.Number=6]="Number",e[e.Error=7]="Error"}(ti||(ti={}));const ri=["var","let","as","null","undefined","true","false","if","else","this"];class ni{constructor(e,t,r,n,i){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==ti.Character&&this.numValue==e}isNumber(){return this.type==ti.Number}isString(){return this.type==ti.String}isOperator(e){return this.type==ti.Operator&&this.strValue==e}isIdentifier(){return this.type==ti.Identifier}isPrivateIdentifier(){return this.type==ti.PrivateIdentifier}isKeyword(){return this.type==ti.Keyword}isKeywordLet(){return this.type==ti.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==ti.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==ti.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==ti.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==ti.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==ti.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==ti.Keyword&&"this"==this.strValue}isError(){return this.type==ti.Error}toNumber(){return this.type==ti.Number?this.numValue:-1}toString(){switch(this.type){case ti.Character:case ti.Identifier:case ti.Keyword:case ti.Operator:case ti.PrivateIdentifier:case ti.String:case ti.Error:return this.strValue;case ti.Number:return this.numValue.toString();default:return null}}}function ii(e,t,r){return new ni(e,t,ti.Character,r,String.fromCharCode(r))}function si(e,t,r){return new ni(e,t,ti.Operator,0,r)}const ui=new ni(-1,-1,ti.Character,0,"");class ai{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let r=this.peek,n=this.index;for(;r<=32;){if(++n>=t){r=0;break}r=e.charCodeAt(n)}if(this.peek=r,this.index=n,n>=t)return null;if(oi(r))return this.scanIdentifier();if(Zn(r))return this.scanNumber(n);const i=n;switch(r){case Yn:return this.advance(),Zn(this.peek)?this.scanNumber(i):ii(i,this.index,Yn);case 40:case Qn:case 123:case Jn:case 91:case 93:case 44:case Hn:case 59:return this.scanCharacter(i,r);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(r));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;(s=this.peek)>=9&&s<=32||160==s;)this.advance();return this.scanToken()}var s;return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),ii(e,this.index,t)}scanOperator(e,t){return this.advance(),si(e,this.index,t)}scanComplexOperator(e,t,r,n,i,s){this.advance();let u=t;return this.peek==r&&(this.advance(),u+=n),null!=i&&this.peek==i&&(this.advance(),u+=s),si(e,this.index,u)}scanIdentifier(){const e=this.index;for(this.advance();Di(this.peek);)this.advance();const t=this.input.substring(e,this.index);return ri.indexOf(t)>-1?(r=e,n=this.index,i=t,new ni(r,n,ti.Keyword,0,i)):function(e,t,r){return new ni(e,t,ti.Identifier,0,r)}(e,this.index,t);var r,n,i}scanPrivateIdentifier(){const e=this.index;if(this.advance(),!oi(this.peek))return this.error("Invalid character [#]",-1);for(;Di(this.peek);)this.advance();const t=this.input.substring(e,this.index);return r=e,n=this.index,i=t,new ni(r,n,ti.PrivateIdentifier,0,i);var r,n,i}scanNumber(e){let t=this.index===e,r=!1;for(this.advance();;){if(Zn(this.peek));else if(95===this.peek){if(!Zn(this.input.charCodeAt(this.index-1))||!Zn(this.in
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/const di=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class fi{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(null!=t){const e=t[0],r=t[1];di.forEach((t=>{if(t.test(e)||t.test(r))throw new Error(`['${e}', '${r}'] contains unusable interpolation symbol.`)}))}}("interpolation",e),new fi(e[0],e[1])):Ei}}const Ei=new fi("{{","}}");
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/class vi{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}}class Ci{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}}class gi{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=yi}parseAction(e,t,r,n=Ei){this._checkNoInterpolation(e,t,n);const i=this._stripComments(e),s=this._lexer.tokenize(this._stripComments(e)),u=new mi(e,t,r,s,i.length,!0,this.errors,e.length-i.length).parseChain();return new Wn(u,e,t,r,this.errors)}parseBinding(e,t,r,n=Ei){const i=this._parseBindingAst(e,t,r,n);return new Wn(i,e,t,r,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,r,n=Ei){const i=this._parseBindingAst(e,t,r,n),s=this.checkSimpleExpression(i);return s.length>0&&this._reportError(`Host binding expression cannot contain ${s.join(" ")}`,e,t),new Wn(i,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new fn(e,t,r,n))}_parseBindingAst(e,t,r,n){const i=this._parseQuote(e,t,r);if(null!=i)return i;this._checkNoInterpolation(e,t,n);const s=this._stripComments(e),u=this._lexer.tokenize(s);return new mi(e,t,r,u,s.length,!1,this.errors,e.length-s.length).parseChain()}_parseQuote(e,t,r){if(null==e)return null;const n=e.indexOf(":");if(-1==n)return null;const i=e.substring(0,n).trim();if(!ci(i))return null;const s=e.substring(n+1),u=new En(0,e.length);return new gn(u,u.toAbsolute(r),i,s,t)}parseTemplateBindings(e,t,r,n,i){const s=this._lexer.tokenize(t);return new mi(t,r,i,s,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new Un(n,n+e.length)})}parseInterpolation(e,t,r,n=Ei){const{strings:i,expressions:s,offsets:u}=this.splitInterpolation(e,t,n);if(0===s.length)return null;const a=[];for(let n=0;n<s.length;++n){const i=s[n].text,o=this._stripComments(i),c=this._lexer.tokenize(o),D=new mi(e,t,r,c,o.length,!1,this.errors,u[n]+(i.length-o.length)).parseChain();a.push(D)}return this.createInterpolationAst(i.map((e=>e.text)),a,e,t,r)}parseInterpolationExpression(e,t,r){const n=this._stripComments(e),i=this._lexer.tokenize(n),s=new mi(e,t,r,i,n.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[s],e,t,r)}createInterpolationAst(e,t,r,n,i){const s=new En(0,r.length),u=new Rn(s,s.toAbsolute(i),e,t);return new Wn(u,r,n,i,this.errors)}splitInterpolation(e,t,r=Ei){const n=[],i=[],s=[];let u=0,a=!1,o=!1,{start:c,end:D}=r;for(;u<e.length;)if(a){const r=u,n=r+c.length,p=this._getInterpolationEndIndex(e,D,n);if(-1===p){a=!1,o=!0;break}const l=p+D.length,h=e.substring(n,p);0===h.trim().length&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${u} in`,t),i.push({text:h,start:r,end:l}),s.push(n),u=l,a=!1}else{const t=u;u=e.indexOf(c,u),-1===u&&(u=e.length);const r=e.substring(t,u);n.push({text:r,start:t,end:u}),a=!0}if(!a)if(o){const t=n[n.length-1];t.text+=e.substring(u),t.end=e.length}else n.push({text:e.substring(u),start:u,end:e.length});return new vi(n,i,s)}wrapLiteralPrimitive(e,t,r){const n=new En(0,null==e?0:e.length);return new Wn(new Pn(n,n.toAbsolute(r),e),e,t,r,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let r=0;r<e.length-1;r++){const n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(47===n&&47==i&&null==t)return r;t===n?t=null:null==t&&ei(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:r,end:n}){let i=-1,s=-1;for(const t of this._forEachUnquotedChar(e,0))if(-1===i)e.startsWith(r)&&(i=t);else if(s=this._getInterpolationEndIndex(e,n,t),s>-1)break;i>-1&&s>-1&&this._reportError(`Got interpolation (${r}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,r){for(const n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let i=t;i<e.length;i++){const t=e[i];!ei(e.charCodeAt(i))||null!==r&&r!==t||n%2!=0?null===r&&(yield i):r=null===r?t:null,n="\\"===t?n+1:0}}}var Fi;!function(e){